Merge branch 'xinghong-dev' into 'master'
Xinghong dev
See merge request !3
| New file |
| | |
| | | package com.java110.community.listener.applyRoomDiscountRecord; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.constant.StatusConstant; |
| | | import com.java110.utils.exception.ListenerExecuteException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.entity.center.Business; |
| | | import com.java110.community.dao.IApplyRoomDiscountRecordServiceDao; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 删除验房记录信息 侦听 |
| | | * |
| | | * 处理节点 |
| | | * 1、businessApplyRoomDiscountRecord:{} 验房记录基本信息节点 |
| | | * 2、businessApplyRoomDiscountRecordAttr:[{}] 验房记录属性信息节点 |
| | | * 3、businessApplyRoomDiscountRecordPhoto:[{}] 验房记录照片信息节点 |
| | | * 4、businessApplyRoomDiscountRecordCerdentials:[{}] 验房记录证件信息节点 |
| | | * 协议地址 :https://github.com/java110/MicroCommunity/wiki/%E5%88%A0%E9%99%A4%E5%95%86%E6%88%B7%E4%BF%A1%E6%81%AF-%E5%8D%8F%E8%AE%AE |
| | | * Created by wuxw on 2018/5/18. |
| | | */ |
| | | @Java110Listener("deleteApplyRoomDiscountRecordInfoListener") |
| | | @Transactional |
| | | public class DeleteApplyRoomDiscountRecordInfoListener extends AbstractApplyRoomDiscountRecordBusinessServiceDataFlowListener { |
| | | |
| | | private final static Logger logger = LoggerFactory.getLogger(DeleteApplyRoomDiscountRecordInfoListener.class); |
| | | @Autowired |
| | | IApplyRoomDiscountRecordServiceDao applyRoomDiscountRecordServiceDaoImpl; |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return 3; |
| | | } |
| | | |
| | | @Override |
| | | public String getBusinessTypeCd() { |
| | | return BusinessTypeConstant.BUSINESS_TYPE_DELETE_APPLY_ROOM_DISCOUNT_RECORD; |
| | | } |
| | | |
| | | /** |
| | | * 根据删除信息 查出Instance表中数据 保存至business表 (状态写DEL) 方便撤单时直接更新回去 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) { |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理"); |
| | | |
| | | //处理 businessApplyRoomDiscountRecord 节点 |
| | | if(data.containsKey(ApplyRoomDiscountRecordPo.class.getSimpleName())){ |
| | | Object _obj = data.get(ApplyRoomDiscountRecordPo.class.getSimpleName()); |
| | | JSONArray businessApplyRoomDiscountRecords = null; |
| | | if(_obj instanceof JSONObject){ |
| | | businessApplyRoomDiscountRecords = new JSONArray(); |
| | | businessApplyRoomDiscountRecords.add(_obj); |
| | | }else { |
| | | businessApplyRoomDiscountRecords = (JSONArray)_obj; |
| | | } |
| | | //JSONObject businessApplyRoomDiscountRecord = data.getJSONObject(ApplyRoomDiscountRecordPo.class.getSimpleName()); |
| | | for (int _applyRoomDiscountRecordIndex = 0; _applyRoomDiscountRecordIndex < businessApplyRoomDiscountRecords.size();_applyRoomDiscountRecordIndex++) { |
| | | JSONObject businessApplyRoomDiscountRecord = businessApplyRoomDiscountRecords.getJSONObject(_applyRoomDiscountRecordIndex); |
| | | doBusinessApplyRoomDiscountRecord(business, businessApplyRoomDiscountRecord); |
| | | if(_obj instanceof JSONObject) { |
| | | dataFlowContext.addParamOut("ardrId", businessApplyRoomDiscountRecord.getString("ardrId")); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 删除 instance数据 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) { |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | |
| | | //验房记录信息 |
| | | Map info = new HashMap(); |
| | | info.put("bId",business.getbId()); |
| | | info.put("operate",StatusConstant.OPERATE_DEL); |
| | | |
| | | //验房记录信息 |
| | | List<Map> businessApplyRoomDiscountRecordInfos = applyRoomDiscountRecordServiceDaoImpl.getBusinessApplyRoomDiscountRecordInfo(info); |
| | | if( businessApplyRoomDiscountRecordInfos != null && businessApplyRoomDiscountRecordInfos.size() >0) { |
| | | for (int _applyRoomDiscountRecordIndex = 0; _applyRoomDiscountRecordIndex < businessApplyRoomDiscountRecordInfos.size();_applyRoomDiscountRecordIndex++) { |
| | | Map businessApplyRoomDiscountRecordInfo = businessApplyRoomDiscountRecordInfos.get(_applyRoomDiscountRecordIndex); |
| | | flushBusinessApplyRoomDiscountRecordInfo(businessApplyRoomDiscountRecordInfo,StatusConstant.STATUS_CD_INVALID); |
| | | applyRoomDiscountRecordServiceDaoImpl.updateApplyRoomDiscountRecordInfoInstance(businessApplyRoomDiscountRecordInfo); |
| | | dataFlowContext.addParamOut("ardrId",businessApplyRoomDiscountRecordInfo.get("ardr_id")); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 撤单 |
| | | * 从business表中查询到DEL的数据 将instance中的数据更新回来 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doRecover(DataFlowContext dataFlowContext, Business business) { |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | Map info = new HashMap(); |
| | | info.put("bId",bId); |
| | | info.put("statusCd",StatusConstant.STATUS_CD_INVALID); |
| | | |
| | | Map delInfo = new HashMap(); |
| | | delInfo.put("bId",business.getbId()); |
| | | delInfo.put("operate",StatusConstant.OPERATE_DEL); |
| | | //验房记录信息 |
| | | List<Map> applyRoomDiscountRecordInfo = applyRoomDiscountRecordServiceDaoImpl.getApplyRoomDiscountRecordInfo(info); |
| | | if(applyRoomDiscountRecordInfo != null && applyRoomDiscountRecordInfo.size() > 0){ |
| | | |
| | | //验房记录信息 |
| | | List<Map> businessApplyRoomDiscountRecordInfos = applyRoomDiscountRecordServiceDaoImpl.getBusinessApplyRoomDiscountRecordInfo(delInfo); |
| | | //除非程序出错了,这里不会为空 |
| | | if(businessApplyRoomDiscountRecordInfos == null || businessApplyRoomDiscountRecordInfos.size() == 0){ |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(applyRoomDiscountRecord),程序内部异常,请检查! "+delInfo); |
| | | } |
| | | for (int _applyRoomDiscountRecordIndex = 0; _applyRoomDiscountRecordIndex < businessApplyRoomDiscountRecordInfos.size();_applyRoomDiscountRecordIndex++) { |
| | | Map businessApplyRoomDiscountRecordInfo = businessApplyRoomDiscountRecordInfos.get(_applyRoomDiscountRecordIndex); |
| | | flushBusinessApplyRoomDiscountRecordInfo(businessApplyRoomDiscountRecordInfo,StatusConstant.STATUS_CD_VALID); |
| | | applyRoomDiscountRecordServiceDaoImpl.updateApplyRoomDiscountRecordInfoInstance(businessApplyRoomDiscountRecordInfo); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 处理 businessApplyRoomDiscountRecord 节点 |
| | | * @param business 总的数据节点 |
| | | * @param businessApplyRoomDiscountRecord 验房记录节点 |
| | | */ |
| | | private void doBusinessApplyRoomDiscountRecord(Business business,JSONObject businessApplyRoomDiscountRecord){ |
| | | |
| | | Assert.jsonObjectHaveKey(businessApplyRoomDiscountRecord,"ardrId","businessApplyRoomDiscountRecord 节点下没有包含 ardrId 节点"); |
| | | |
| | | if(businessApplyRoomDiscountRecord.getString("ardrId").startsWith("-")){ |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"ardrId 错误,不能自动生成(必须已经存在的ardrId)"+businessApplyRoomDiscountRecord); |
| | | } |
| | | //自动插入DEL |
| | | autoSaveDelBusinessApplyRoomDiscountRecord(business,businessApplyRoomDiscountRecord); |
| | | } |
| | | @Override |
| | | public IApplyRoomDiscountRecordServiceDao getApplyRoomDiscountRecordServiceDaoImpl() { |
| | | return applyRoomDiscountRecordServiceDaoImpl; |
| | | } |
| | | |
| | | public void setApplyRoomDiscountRecordServiceDaoImpl(IApplyRoomDiscountRecordServiceDao applyRoomDiscountRecordServiceDaoImpl) { |
| | | this.applyRoomDiscountRecordServiceDaoImpl = applyRoomDiscountRecordServiceDaoImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.community.listener.applyRoomDiscountRecord; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.StatusConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.community.dao.IApplyRoomDiscountRecordServiceDao; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.entity.center.Business; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 保存 验房记录信息 侦听 |
| | | * Created by wuxw on 2018/5/18. |
| | | */ |
| | | @Java110Listener("saveApplyRoomDiscountRecordInfoListener") |
| | | @Transactional |
| | | public class SaveApplyRoomDiscountRecordInfoListener extends AbstractApplyRoomDiscountRecordBusinessServiceDataFlowListener{ |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(SaveApplyRoomDiscountRecordInfoListener.class); |
| | | |
| | | @Autowired |
| | | private IApplyRoomDiscountRecordServiceDao applyRoomDiscountRecordServiceDaoImpl; |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public String getBusinessTypeCd() { |
| | | return BusinessTypeConstant.BUSINESS_TYPE_SAVE_APPLY_ROOM_DISCOUNT_RECORD; |
| | | } |
| | | |
| | | /** |
| | | * 保存验房记录信息 business 表中 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) { |
| | | JSONObject data = business.getDatas(); |
| | | Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理"); |
| | | |
| | | //处理 businessApplyRoomDiscountRecord 节点 |
| | | if(data.containsKey(ApplyRoomDiscountRecordPo.class.getSimpleName())){ |
| | | Object bObj = data.get(ApplyRoomDiscountRecordPo.class.getSimpleName()); |
| | | JSONArray businessApplyRoomDiscountRecords = null; |
| | | if(bObj instanceof JSONObject){ |
| | | businessApplyRoomDiscountRecords = new JSONArray(); |
| | | businessApplyRoomDiscountRecords.add(bObj); |
| | | }else { |
| | | businessApplyRoomDiscountRecords = (JSONArray)bObj; |
| | | } |
| | | //JSONObject businessApplyRoomDiscountRecord = data.getJSONObject(ApplyRoomDiscountRecordPo.class.getSimpleName()); |
| | | for (int bApplyRoomDiscountRecordIndex = 0; bApplyRoomDiscountRecordIndex < businessApplyRoomDiscountRecords.size();bApplyRoomDiscountRecordIndex++) { |
| | | JSONObject businessApplyRoomDiscountRecord = businessApplyRoomDiscountRecords.getJSONObject(bApplyRoomDiscountRecordIndex); |
| | | doBusinessApplyRoomDiscountRecord(business, businessApplyRoomDiscountRecord); |
| | | if(bObj instanceof JSONObject) { |
| | | dataFlowContext.addParamOut("ardrId", businessApplyRoomDiscountRecord.getString("ardrId")); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * business 数据转移到 instance |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) { |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Map info = new HashMap(); |
| | | info.put("bId",business.getbId()); |
| | | info.put("operate",StatusConstant.OPERATE_ADD); |
| | | |
| | | //验房记录信息 |
| | | List<Map> businessApplyRoomDiscountRecordInfo = applyRoomDiscountRecordServiceDaoImpl.getBusinessApplyRoomDiscountRecordInfo(info); |
| | | if( businessApplyRoomDiscountRecordInfo != null && businessApplyRoomDiscountRecordInfo.size() >0) { |
| | | reFreshShareColumn(info, businessApplyRoomDiscountRecordInfo.get(0)); |
| | | applyRoomDiscountRecordServiceDaoImpl.saveApplyRoomDiscountRecordInfoInstance(info); |
| | | if(businessApplyRoomDiscountRecordInfo.size() == 1) { |
| | | dataFlowContext.addParamOut("ardrId", businessApplyRoomDiscountRecordInfo.get(0).get("ardr_id")); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 刷 分片字段 |
| | | * |
| | | * @param info 查询对象 |
| | | * @param businessInfo 小区ID |
| | | */ |
| | | private void reFreshShareColumn(Map info, Map businessInfo) { |
| | | |
| | | if (info.containsKey("communityId")) { |
| | | return; |
| | | } |
| | | |
| | | if (!businessInfo.containsKey("community_id")) { |
| | | return; |
| | | } |
| | | |
| | | info.put("communityId", businessInfo.get("community_id")); |
| | | } |
| | | /** |
| | | * 撤单 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doRecover(DataFlowContext dataFlowContext, Business business) { |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | Map info = new HashMap(); |
| | | info.put("bId",bId); |
| | | info.put("statusCd",StatusConstant.STATUS_CD_VALID); |
| | | Map paramIn = new HashMap(); |
| | | paramIn.put("bId",bId); |
| | | paramIn.put("statusCd",StatusConstant.STATUS_CD_INVALID); |
| | | //验房记录信息 |
| | | List<Map> applyRoomDiscountRecordInfo = applyRoomDiscountRecordServiceDaoImpl.getApplyRoomDiscountRecordInfo(info); |
| | | if(applyRoomDiscountRecordInfo != null && applyRoomDiscountRecordInfo.size() > 0){ |
| | | reFreshShareColumn(paramIn, applyRoomDiscountRecordInfo.get(0)); |
| | | applyRoomDiscountRecordServiceDaoImpl.updateApplyRoomDiscountRecordInfoInstance(paramIn); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 处理 businessApplyRoomDiscountRecord 节点 |
| | | * @param business 总的数据节点 |
| | | * @param businessApplyRoomDiscountRecord 验房记录节点 |
| | | */ |
| | | private void doBusinessApplyRoomDiscountRecord(Business business,JSONObject businessApplyRoomDiscountRecord){ |
| | | |
| | | Assert.jsonObjectHaveKey(businessApplyRoomDiscountRecord,"ardrId","businessApplyRoomDiscountRecord 节点下没有包含 ardrId 节点"); |
| | | |
| | | if(businessApplyRoomDiscountRecord.getString("ardrId").startsWith("-")){ |
| | | //刷新缓存 |
| | | //flushApplyRoomDiscountRecordId(business.getDatas()); |
| | | |
| | | businessApplyRoomDiscountRecord.put("ardrId",GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_ardrId)); |
| | | |
| | | } |
| | | |
| | | businessApplyRoomDiscountRecord.put("bId",business.getbId()); |
| | | businessApplyRoomDiscountRecord.put("operate", StatusConstant.OPERATE_ADD); |
| | | //保存验房记录信息 |
| | | applyRoomDiscountRecordServiceDaoImpl.saveBusinessApplyRoomDiscountRecordInfo(businessApplyRoomDiscountRecord); |
| | | |
| | | } |
| | | @Override |
| | | public IApplyRoomDiscountRecordServiceDao getApplyRoomDiscountRecordServiceDaoImpl() { |
| | | return applyRoomDiscountRecordServiceDaoImpl; |
| | | } |
| | | |
| | | public void setApplyRoomDiscountRecordServiceDaoImpl(IApplyRoomDiscountRecordServiceDao applyRoomDiscountRecordServiceDaoImpl) { |
| | | this.applyRoomDiscountRecordServiceDaoImpl = applyRoomDiscountRecordServiceDaoImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.community.listener.applyRoomDiscountRecord; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.constant.StatusConstant; |
| | | import com.java110.utils.exception.ListenerExecuteException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.entity.center.Business; |
| | | import com.java110.community.dao.IApplyRoomDiscountRecordServiceDao; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 修改验房记录信息 侦听 |
| | | * |
| | | * 处理节点 |
| | | * 1、businessApplyRoomDiscountRecord:{} 验房记录基本信息节点 |
| | | * 2、businessApplyRoomDiscountRecordAttr:[{}] 验房记录属性信息节点 |
| | | * 3、businessApplyRoomDiscountRecordPhoto:[{}] 验房记录照片信息节点 |
| | | * 4、businessApplyRoomDiscountRecordCerdentials:[{}] 验房记录证件信息节点 |
| | | * 协议地址 :https://github.com/java110/MicroCommunity/wiki/%E4%BF%AE%E6%94%B9%E5%95%86%E6%88%B7%E4%BF%A1%E6%81%AF-%E5%8D%8F%E8%AE%AE |
| | | * Created by wuxw on 2018/5/18. |
| | | */ |
| | | @Java110Listener("updateApplyRoomDiscountRecordInfoListener") |
| | | @Transactional |
| | | public class UpdateApplyRoomDiscountRecordInfoListener extends AbstractApplyRoomDiscountRecordBusinessServiceDataFlowListener { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(UpdateApplyRoomDiscountRecordInfoListener.class); |
| | | @Autowired |
| | | private IApplyRoomDiscountRecordServiceDao applyRoomDiscountRecordServiceDaoImpl; |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return 2; |
| | | } |
| | | |
| | | @Override |
| | | public String getBusinessTypeCd() { |
| | | return BusinessTypeConstant.BUSINESS_TYPE_UPDATE_APPLY_ROOM_DISCOUNT_RECORD; |
| | | } |
| | | |
| | | /** |
| | | * business过程 |
| | | * @param dataFlowContext 上下文对象 |
| | | * @param business 业务对象 |
| | | */ |
| | | @Override |
| | | protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) { |
| | | |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Assert.notEmpty(data,"没有datas 节点,或没有子节点需要处理"); |
| | | |
| | | |
| | | //处理 businessApplyRoomDiscountRecord 节点 |
| | | if(data.containsKey(ApplyRoomDiscountRecordPo.class.getSimpleName())){ |
| | | Object _obj = data.get(ApplyRoomDiscountRecordPo.class.getSimpleName()); |
| | | JSONArray businessApplyRoomDiscountRecords = null; |
| | | if(_obj instanceof JSONObject){ |
| | | businessApplyRoomDiscountRecords = new JSONArray(); |
| | | businessApplyRoomDiscountRecords.add(_obj); |
| | | }else { |
| | | businessApplyRoomDiscountRecords = (JSONArray)_obj; |
| | | } |
| | | //JSONObject businessApplyRoomDiscountRecord = data.getJSONObject(ApplyRoomDiscountRecordPo.class.getSimpleName()); |
| | | for (int _applyRoomDiscountRecordIndex = 0; _applyRoomDiscountRecordIndex < businessApplyRoomDiscountRecords.size();_applyRoomDiscountRecordIndex++) { |
| | | JSONObject businessApplyRoomDiscountRecord = businessApplyRoomDiscountRecords.getJSONObject(_applyRoomDiscountRecordIndex); |
| | | doBusinessApplyRoomDiscountRecord(business, businessApplyRoomDiscountRecord); |
| | | if(_obj instanceof JSONObject) { |
| | | dataFlowContext.addParamOut("ardrId", businessApplyRoomDiscountRecord.getString("ardrId")); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * business to instance 过程 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) { |
| | | |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Map info = new HashMap(); |
| | | info.put("bId",business.getbId()); |
| | | info.put("operate",StatusConstant.OPERATE_ADD); |
| | | |
| | | //验房记录信息 |
| | | List<Map> businessApplyRoomDiscountRecordInfos = applyRoomDiscountRecordServiceDaoImpl.getBusinessApplyRoomDiscountRecordInfo(info); |
| | | if( businessApplyRoomDiscountRecordInfos != null && businessApplyRoomDiscountRecordInfos.size() >0) { |
| | | for (int _applyRoomDiscountRecordIndex = 0; _applyRoomDiscountRecordIndex < businessApplyRoomDiscountRecordInfos.size();_applyRoomDiscountRecordIndex++) { |
| | | Map businessApplyRoomDiscountRecordInfo = businessApplyRoomDiscountRecordInfos.get(_applyRoomDiscountRecordIndex); |
| | | flushBusinessApplyRoomDiscountRecordInfo(businessApplyRoomDiscountRecordInfo,StatusConstant.STATUS_CD_VALID); |
| | | applyRoomDiscountRecordServiceDaoImpl.updateApplyRoomDiscountRecordInfoInstance(businessApplyRoomDiscountRecordInfo); |
| | | if(businessApplyRoomDiscountRecordInfo.size() == 1) { |
| | | dataFlowContext.addParamOut("ardrId", businessApplyRoomDiscountRecordInfo.get("ardr_id")); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 撤单 |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doRecover(DataFlowContext dataFlowContext, Business business) { |
| | | |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | Map info = new HashMap(); |
| | | info.put("bId",bId); |
| | | info.put("statusCd",StatusConstant.STATUS_CD_VALID); |
| | | Map delInfo = new HashMap(); |
| | | delInfo.put("bId",business.getbId()); |
| | | delInfo.put("operate",StatusConstant.OPERATE_DEL); |
| | | //验房记录信息 |
| | | List<Map> applyRoomDiscountRecordInfo = applyRoomDiscountRecordServiceDaoImpl.getApplyRoomDiscountRecordInfo(info); |
| | | if(applyRoomDiscountRecordInfo != null && applyRoomDiscountRecordInfo.size() > 0){ |
| | | |
| | | //验房记录信息 |
| | | List<Map> businessApplyRoomDiscountRecordInfos = applyRoomDiscountRecordServiceDaoImpl.getBusinessApplyRoomDiscountRecordInfo(delInfo); |
| | | //除非程序出错了,这里不会为空 |
| | | if(businessApplyRoomDiscountRecordInfos == null || businessApplyRoomDiscountRecordInfos.size() == 0){ |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR,"撤单失败(applyRoomDiscountRecord),程序内部异常,请检查! "+delInfo); |
| | | } |
| | | for (int _applyRoomDiscountRecordIndex = 0; _applyRoomDiscountRecordIndex < businessApplyRoomDiscountRecordInfos.size();_applyRoomDiscountRecordIndex++) { |
| | | Map businessApplyRoomDiscountRecordInfo = businessApplyRoomDiscountRecordInfos.get(_applyRoomDiscountRecordIndex); |
| | | flushBusinessApplyRoomDiscountRecordInfo(businessApplyRoomDiscountRecordInfo,StatusConstant.STATUS_CD_VALID); |
| | | applyRoomDiscountRecordServiceDaoImpl.updateApplyRoomDiscountRecordInfoInstance(businessApplyRoomDiscountRecordInfo); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 处理 businessApplyRoomDiscountRecord 节点 |
| | | * @param business 总的数据节点 |
| | | * @param businessApplyRoomDiscountRecord 验房记录节点 |
| | | */ |
| | | private void doBusinessApplyRoomDiscountRecord(Business business,JSONObject businessApplyRoomDiscountRecord){ |
| | | |
| | | Assert.jsonObjectHaveKey(businessApplyRoomDiscountRecord,"ardrId","businessApplyRoomDiscountRecord 节点下没有包含 ardrId 节点"); |
| | | |
| | | if(businessApplyRoomDiscountRecord.getString("ardrId").startsWith("-")){ |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR,"ardrId 错误,不能自动生成(必须已经存在的ardrId)"+businessApplyRoomDiscountRecord); |
| | | } |
| | | //自动保存DEL |
| | | autoSaveDelBusinessApplyRoomDiscountRecord(business,businessApplyRoomDiscountRecord); |
| | | |
| | | businessApplyRoomDiscountRecord.put("bId",business.getbId()); |
| | | businessApplyRoomDiscountRecord.put("operate", StatusConstant.OPERATE_ADD); |
| | | //保存验房记录信息 |
| | | applyRoomDiscountRecordServiceDaoImpl.saveBusinessApplyRoomDiscountRecordInfo(businessApplyRoomDiscountRecord); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public IApplyRoomDiscountRecordServiceDao getApplyRoomDiscountRecordServiceDaoImpl() { |
| | | return applyRoomDiscountRecordServiceDaoImpl; |
| | | } |
| | | |
| | | public void setApplyRoomDiscountRecordServiceDaoImpl(IApplyRoomDiscountRecordServiceDao applyRoomDiscountRecordServiceDaoImpl) { |
| | | this.applyRoomDiscountRecordServiceDaoImpl = applyRoomDiscountRecordServiceDaoImpl; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | private List<FeeDto> fees; |
| | | |
| | | |
| | | private Date createTime; |
| | | |
| | | private String statusCd = "0"; |
| | | private String startTime; |
| | | private String endTime; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | public String getFeeCoefficient() { |
| | | return feeCoefficient; |
| | |
| | | this.floorNum = floorNum; |
| | | } |
| | | |
| | | |
| | | public String[] getRoomIds() { |
| | | return roomIds; |
| | | } |
| | |
| | | public void setRoomSubTypeName(String roomSubTypeName) { |
| | | this.roomSubTypeName = roomSubTypeName; |
| | | } |
| | | |
| | | public String getStartTime() { |
| | | return startTime; |
| | | } |
| | | |
| | | public void setStartTime(String startTime) { |
| | | this.startTime = startTime; |
| | | } |
| | | |
| | | public String getEndTime() { |
| | | return endTime; |
| | | } |
| | | |
| | | public void setEndTime(String endTime) { |
| | | this.endTime = endTime; |
| | | } |
| | | } |
| | |
| | | private String staffTel; |
| | | private String applyType; |
| | | private String applyTypeName; |
| | | private String unitCodeName; |
| | | private String miniUnitCodeName; |
| | | |
| | | public String getAsId() { |
| | | return asId; |
| | |
| | | public void setbId(String bId) { |
| | | this.bId = bId; |
| | | } |
| | | |
| | | public String getUnitCodeName() { |
| | | return unitCodeName; |
| | | } |
| | | |
| | | public void setUnitCodeName(String unitCodeName) { |
| | | this.unitCodeName = unitCodeName; |
| | | } |
| | | |
| | | public String getMiniUnitCodeName() { |
| | | return miniUnitCodeName; |
| | | } |
| | | |
| | | public void setMiniUnitCodeName(String miniUnitCodeName) { |
| | | this.miniUnitCodeName = miniUnitCodeName; |
| | | } |
| | | } |
| | |
| | | //调拨返还状态标识 |
| | | private String applyType; |
| | | private String applyTypeName; |
| | | //调拨源仓库 |
| | | private String shId; |
| | | |
| | | public String getApplyId() { |
| | | return applyId; |
| | |
| | | public void setbId(String bId) { |
| | | this.bId = bId; |
| | | } |
| | | |
| | | public String getShId() { |
| | | return shId; |
| | | } |
| | | |
| | | public void setShId(String shId) { |
| | | this.shId = shId; |
| | | } |
| | | } |
| | |
| | | private String subTotalQuantity; |
| | | //转赠总数量(大计) |
| | | private String highTotalQuantity; |
| | | private String unitCodeName; |
| | | private String miniUnitCodeName; |
| | | |
| | | |
| | | public String getAcceptUserId() { |
| | | return acceptUserId; |
| | |
| | | public void setHighTotalQuantity(String highTotalQuantity) { |
| | | this.highTotalQuantity = highTotalQuantity; |
| | | } |
| | | |
| | | public String getUnitCodeName() { |
| | | return unitCodeName; |
| | | } |
| | | |
| | | public void setUnitCodeName(String unitCodeName) { |
| | | this.unitCodeName = unitCodeName; |
| | | } |
| | | |
| | | public String getMiniUnitCodeName() { |
| | | return miniUnitCodeName; |
| | | } |
| | | |
| | | public void setMiniUnitCodeName(String miniUnitCodeName) { |
| | | this.miniUnitCodeName = miniUnitCodeName; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.dto.applyRoomDiscountRecord; |
| | | |
| | | import com.java110.dto.PageDto; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName FloorDto |
| | | * @Description 验房记录数据层封装 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 8:52 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | public class ApplyRoomDiscountRecordDto extends PageDto implements Serializable { |
| | | |
| | | private String ardrId; |
| | | private String ardId; |
| | | private String createUserId; |
| | | private String createUserName; |
| | | private String remark; |
| | | private String communityId; |
| | | private List<String> photos; |
| | | private String videoName; |
| | | private String isTrue; |
| | | private String isTrueName; |
| | | private String roomId; |
| | | private String roomName; |
| | | private String state; |
| | | private String stateName; |
| | | |
| | | //文件真实名称 |
| | | private String fileRealName; |
| | | |
| | | //文件存储名称 |
| | | private String fileSaveName; |
| | | |
| | | private String url; |
| | | |
| | | //文件类型 |
| | | private String relTypeCd; |
| | | |
| | | private Date createTime; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | |
| | | public String getArdrId() { |
| | | return ardrId; |
| | | } |
| | | |
| | | public void setArdrId(String ardrId) { |
| | | this.ardrId = ardrId; |
| | | } |
| | | |
| | | public String getArdId() { |
| | | return ardId; |
| | | } |
| | | |
| | | public void setArdId(String ardId) { |
| | | this.ardId = ardId; |
| | | } |
| | | |
| | | public String getCreateUserId() { |
| | | return createUserId; |
| | | } |
| | | |
| | | public void setCreateUserId(String createUserId) { |
| | | this.createUserId = createUserId; |
| | | } |
| | | |
| | | public String getCreateUserName() { |
| | | return createUserName; |
| | | } |
| | | |
| | | public void setCreateUserName(String createUserName) { |
| | | this.createUserName = createUserName; |
| | | } |
| | | |
| | | public String getRemark() { |
| | | return remark; |
| | | } |
| | | |
| | | public void setRemark(String remark) { |
| | | this.remark = remark; |
| | | } |
| | | |
| | | public String getCommunityId() { |
| | | return communityId; |
| | | } |
| | | |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | | } |
| | | |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | |
| | | public List<String> getPhotos() { |
| | | return photos; |
| | | } |
| | | |
| | | public void setPhotos(List<String> photos) { |
| | | this.photos = photos; |
| | | } |
| | | |
| | | public String getVideoName() { |
| | | return videoName; |
| | | } |
| | | |
| | | public void setVideoName(String videoName) { |
| | | this.videoName = videoName; |
| | | } |
| | | |
| | | public String getIsTrue() { |
| | | return isTrue; |
| | | } |
| | | |
| | | public void setIsTrue(String isTrue) { |
| | | this.isTrue = isTrue; |
| | | } |
| | | |
| | | public String getIsTrueName() { |
| | | return isTrueName; |
| | | } |
| | | |
| | | public void setIsTrueName(String isTrueName) { |
| | | this.isTrueName = isTrueName; |
| | | } |
| | | |
| | | public String getRoomId() { |
| | | return roomId; |
| | | } |
| | | |
| | | public void setRoomId(String roomId) { |
| | | this.roomId = roomId; |
| | | } |
| | | |
| | | public String getRoomName() { |
| | | return roomName; |
| | | } |
| | | |
| | | public void setRoomName(String roomName) { |
| | | this.roomName = roomName; |
| | | } |
| | | |
| | | public String getState() { |
| | | return state; |
| | | } |
| | | |
| | | public void setState(String state) { |
| | | this.state = state; |
| | | } |
| | | |
| | | public String getStateName() { |
| | | return stateName; |
| | | } |
| | | |
| | | public void setStateName(String stateName) { |
| | | this.stateName = stateName; |
| | | } |
| | | |
| | | public String getFileRealName() { |
| | | return fileRealName; |
| | | } |
| | | |
| | | public void setFileRealName(String fileRealName) { |
| | | this.fileRealName = fileRealName; |
| | | } |
| | | |
| | | public String getFileSaveName() { |
| | | return fileSaveName; |
| | | } |
| | | |
| | | public void setFileSaveName(String fileSaveName) { |
| | | this.fileSaveName = fileSaveName; |
| | | } |
| | | |
| | | public String getUrl() { |
| | | return url; |
| | | } |
| | | |
| | | public void setUrl(String url) { |
| | | this.url = url; |
| | | } |
| | | |
| | | public String getRelTypeCd() { |
| | | return relTypeCd; |
| | | } |
| | | |
| | | public void setRelTypeCd(String relTypeCd) { |
| | | this.relTypeCd = relTypeCd; |
| | | } |
| | | } |
| | |
| | | private String companyId; |
| | | private String companyName; |
| | | private String parentOrgId; |
| | | private String parentOrgName; |
| | | |
| | | |
| | | private Date createTime; |
| | |
| | | public void setRelCdName(String relCdName) { |
| | | this.relCdName = relCdName; |
| | | } |
| | | |
| | | public String getParentOrgName() { |
| | | return parentOrgName; |
| | | } |
| | | |
| | | public void setParentOrgName(String parentOrgName) { |
| | | this.parentOrgName = parentOrgName; |
| | | } |
| | | } |
| | |
| | | private String standardPrice; |
| | | private String originalStock; |
| | | private String supplierName; |
| | | private String unitCodeName; |
| | | private String miniUnitCodeName; |
| | | |
| | | public String getApplyOrderId() { |
| | | return applyOrderId; |
| | |
| | | public void setSupplierName(String supplierName) { |
| | | this.supplierName = supplierName; |
| | | } |
| | | |
| | | public String getUnitCodeName() { |
| | | return unitCodeName; |
| | | } |
| | | |
| | | public void setUnitCodeName(String unitCodeName) { |
| | | this.unitCodeName = unitCodeName; |
| | | } |
| | | |
| | | public String getMiniUnitCodeName() { |
| | | return miniUnitCodeName; |
| | | } |
| | | |
| | | public void setMiniUnitCodeName(String miniUnitCodeName) { |
| | | this.miniUnitCodeName = miniUnitCodeName; |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | private String storeId; |
| | | private String shId; |
| | | private String shName; |
| | | private String unitCodeName; |
| | | private String miniUnitCodeName; |
| | | |
| | | public String getApplyOrderId() { |
| | | return applyOrderId; |
| | |
| | | public void setShName(String shName) { |
| | | this.shName = shName; |
| | | } |
| | | |
| | | public String getUnitCodeName() { |
| | | return unitCodeName; |
| | | } |
| | | |
| | | public void setUnitCodeName(String unitCodeName) { |
| | | this.unitCodeName = unitCodeName; |
| | | } |
| | | |
| | | public String getMiniUnitCodeName() { |
| | | return miniUnitCodeName; |
| | | } |
| | | |
| | | public void setMiniUnitCodeName(String miniUnitCodeName) { |
| | | this.miniUnitCodeName = miniUnitCodeName; |
| | | } |
| | | } |
| | |
| | | private String visitType; |
| | | private String visitContext; |
| | | private List<String> repairChannels; |
| | | private String payType; |
| | | |
| | | //业主上传维修图片 |
| | | private List<PhotoVo> repairPhotos; |
| | |
| | | public void setAverage(String average) { |
| | | this.average = average; |
| | | } |
| | | |
| | | public String getPayType() { |
| | | return payType; |
| | | } |
| | | |
| | | public void setPayType(String payType) { |
| | | this.payType = payType; |
| | | } |
| | | } |
| | |
| | | //评分 |
| | | private String score; |
| | | |
| | | //支付方式 |
| | | private String payType; |
| | | |
| | | private String payTypeName; |
| | | |
| | | public String getContext() { |
| | | return context; |
| | | } |
| | |
| | | public void setScore(String score) { |
| | | this.score = score; |
| | | } |
| | | |
| | | public String getPayType() { |
| | | return payType; |
| | | } |
| | | |
| | | public void setPayType(String payType) { |
| | | this.payType = payType; |
| | | } |
| | | |
| | | public String getPayTypeName() { |
| | | return payTypeName; |
| | | } |
| | | |
| | | public void setPayTypeName(String payTypeName) { |
| | | this.payTypeName = payTypeName; |
| | | } |
| | | } |
| | |
| | | private String resourceStoreName; |
| | | private String startTime; |
| | | private String endTime; |
| | | private String unitCodeName; |
| | | private String miniUnitCodeName; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | |
| | | public void setEndTime(String endTime) { |
| | | this.endTime = endTime; |
| | | } |
| | | |
| | | public String getUnitCodeName() { |
| | | return unitCodeName; |
| | | } |
| | | |
| | | public void setUnitCodeName(String unitCodeName) { |
| | | this.unitCodeName = unitCodeName; |
| | | } |
| | | |
| | | public String getMiniUnitCodeName() { |
| | | return miniUnitCodeName; |
| | | } |
| | | |
| | | public void setMiniUnitCodeName(String miniUnitCodeName) { |
| | | this.miniUnitCodeName = miniUnitCodeName; |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | //物品调拨 |
| | | public static final String FLOW_TYPE_ALLOCATION_STOREHOUSE = "70007";//合同变更审核 |
| | | public static final String FLOW_TYPE_ALLOCATION_STOREHOUSE = "70007";//物品调拨 |
| | | |
| | | |
| | | //物品被调拨 |
| | | public static final String FLOW_TYPE_ALLOCATION_STOREHOUSE_GO = "80008";//物品被调拨 |
| | | |
| | | |
| | | |
| | |
| | | private String flowType; |
| | | private String flowTypeName; |
| | | private String processDefinitionKey; |
| | | private String operationType; |
| | | |
| | | private String[] flowTypes; |
| | | |
| | |
| | | public void setFlowTypes(String[] flowTypes) { |
| | | this.flowTypes = flowTypes; |
| | | } |
| | | |
| | | public String getOperationType() { |
| | | return operationType; |
| | | } |
| | | |
| | | public void setOperationType(String operationType) { |
| | | this.operationType = operationType; |
| | | } |
| | | } |
| | |
| | | private String communityId; |
| | | private String staffId; |
| | | private String staffRole; |
| | | private String flowType; |
| | | private String[] flowTypes; |
| | | |
| | | |
| | | private Date createTime; |
| | |
| | | public void setStaffRole(String staffRole) { |
| | | this.staffRole = staffRole; |
| | | } |
| | | |
| | | public String getFlowType() { |
| | | return flowType; |
| | | } |
| | | |
| | | public void setFlowType(String flowType) { |
| | | this.flowType = flowType; |
| | | } |
| | | |
| | | public String[] getFlowTypes() { |
| | | return flowTypes; |
| | | } |
| | | |
| | | public void setFlowTypes(String[] flowTypes) { |
| | | this.flowTypes = flowTypes; |
| | | } |
| | | } |
| | |
| | | private String createTime; |
| | | //调拨返还状态标识 |
| | | private String applyType; |
| | | //调拨源仓库 |
| | | private String shId; |
| | | |
| | | public String getApplyId() { |
| | | return applyId; |
| | |
| | | public void setApplyType(String applyType) { |
| | | this.applyType = applyType; |
| | | } |
| | | |
| | | public String getShId() { |
| | | return shId; |
| | | } |
| | | |
| | | public void setShId(String shId) { |
| | | this.shId = shId; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.po.applyRoomDiscountRecord; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | public class ApplyRoomDiscountRecordPo implements Serializable { |
| | | |
| | | private String ardrId; |
| | | private String ardId; |
| | | private String createUserId; |
| | | private String createUserName; |
| | | private String remark; |
| | | private String communityId; |
| | | private List<String> photos; |
| | | private String videoName; |
| | | private String isTrue; |
| | | private String isTrueName; |
| | | private String roomId; |
| | | private String roomName; |
| | | private String state; |
| | | private String stateName; |
| | | private String statusCd = "0"; |
| | | private String bId; |
| | | |
| | | |
| | | public String getArdrId() { |
| | | return ardrId; |
| | | } |
| | | |
| | | public void setArdrId(String ardrId) { |
| | | this.ardrId = ardrId; |
| | | } |
| | | |
| | | public String getArdId() { |
| | | return ardId; |
| | | } |
| | | |
| | | public void setArdId(String ardId) { |
| | | this.ardId = ardId; |
| | | } |
| | | |
| | | public String getCreateUserId() { |
| | | return createUserId; |
| | | } |
| | | |
| | | public void setCreateUserId(String createUserId) { |
| | | this.createUserId = createUserId; |
| | | } |
| | | |
| | | public String getCreateUserName() { |
| | | return createUserName; |
| | | } |
| | | |
| | | public void setCreateUserName(String createUserName) { |
| | | this.createUserName = createUserName; |
| | | } |
| | | |
| | | public String getRemark() { |
| | | return remark; |
| | | } |
| | | |
| | | public void setRemark(String remark) { |
| | | this.remark = remark; |
| | | } |
| | | |
| | | public String getCommunityId() { |
| | | return communityId; |
| | | } |
| | | |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | |
| | | public List<String> getPhotos() { |
| | | return photos; |
| | | } |
| | | |
| | | public void setPhotos(List<String> photos) { |
| | | this.photos = photos; |
| | | } |
| | | |
| | | public String getVideoName() { |
| | | return videoName; |
| | | } |
| | | |
| | | public void setVideoName(String videoName) { |
| | | this.videoName = videoName; |
| | | } |
| | | |
| | | public String getIsTrue() { |
| | | return isTrue; |
| | | } |
| | | |
| | | public void setIsTrue(String isTrue) { |
| | | this.isTrue = isTrue; |
| | | } |
| | | |
| | | public String getIsTrueName() { |
| | | return isTrueName; |
| | | } |
| | | |
| | | public void setIsTrueName(String isTrueName) { |
| | | this.isTrueName = isTrueName; |
| | | } |
| | | |
| | | public String getRoomId() { |
| | | return roomId; |
| | | } |
| | | |
| | | public void setRoomId(String roomId) { |
| | | this.roomId = roomId; |
| | | } |
| | | |
| | | public String getRoomName() { |
| | | return roomName; |
| | | } |
| | | |
| | | public void setRoomName(String roomName) { |
| | | this.roomName = roomName; |
| | | } |
| | | |
| | | public String getState() { |
| | | return state; |
| | | } |
| | | |
| | | public void setState(String state) { |
| | | this.state = state; |
| | | } |
| | | |
| | | public String getStateName() { |
| | | return stateName; |
| | | } |
| | | |
| | | public void setStateName(String stateName) { |
| | | this.stateName = stateName; |
| | | } |
| | | |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | | } |
| | | |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | |
| | | public String getbId() { |
| | | return bId; |
| | | } |
| | | |
| | | public void setbId(String bId) { |
| | | this.bId = bId; |
| | | } |
| | | } |
| | |
| | | private String statusCd; |
| | | private String repairMaterials; |
| | | private String repairFee; |
| | | |
| | | private String payType; |
| | | |
| | | public String getRepairId() { |
| | | return repairId; |
| | |
| | | this.statusCd = statusCd; |
| | | } |
| | | |
| | | |
| | | public String getRepairChannel() { |
| | | return repairChannel; |
| | | } |
| | |
| | | public void setRepairFee(String repairFee) { |
| | | this.repairFee = repairFee; |
| | | } |
| | | |
| | | public String getPayType() { |
| | | return payType; |
| | | } |
| | | |
| | | public void setPayType(String payType) { |
| | | this.payType = payType; |
| | | } |
| | | } |
| | |
| | | private String roomSubType; |
| | | private String roomRent; |
| | | private String roomArea; |
| | | |
| | | private String startTime; |
| | | private String endTime; |
| | | |
| | | public String getRoomId() { |
| | | return roomId; |
| | |
| | | public void setBuiltUpArea(String builtUpArea) { |
| | | this.builtUpArea = builtUpArea; |
| | | } |
| | | |
| | | |
| | | public String getUserId() { |
| | | return userId; |
| | |
| | | public void setRoomArea(String roomArea) { |
| | | this.roomArea = roomArea; |
| | | } |
| | | |
| | | public String getStartTime() { |
| | | return startTime; |
| | | } |
| | | |
| | | public void setStartTime(String startTime) { |
| | | this.startTime = startTime; |
| | | } |
| | | |
| | | public String getEndTime() { |
| | | return endTime; |
| | | } |
| | | |
| | | public void setEndTime(String endTime) { |
| | | this.endTime = endTime; |
| | | } |
| | | } |
| | |
| | | private String examineRemark; |
| | | private List<String> photos; |
| | | private String videoName; |
| | | private String isTrue; |
| | | private String isTrueName; |
| | | |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | |
| | | public void setVideoName(String videoName) { |
| | | this.videoName = videoName; |
| | | } |
| | | |
| | | public String getIsTrue() { |
| | | return isTrue; |
| | | } |
| | | |
| | | public void setIsTrue(String isTrue) { |
| | | this.isTrue = isTrue; |
| | | } |
| | | |
| | | public String getIsTrueName() { |
| | | return isTrueName; |
| | | } |
| | | |
| | | public void setIsTrueName(String isTrueName) { |
| | | this.isTrueName = isTrueName; |
| | | } |
| | | } |
| | |
| | | |
| | | private String communityId; |
| | | |
| | | //是否违规 |
| | | private String isTrue; |
| | | |
| | | private String isTrueName; |
| | | |
| | | public String getRecordId() { |
| | | return recordId; |
| | | } |
| | |
| | | public void setCommunityId(String communityId) { |
| | | this.communityId = communityId; |
| | | } |
| | | |
| | | public String getIsTrue() { |
| | | return isTrue; |
| | | } |
| | | |
| | | public void setIsTrue(String isTrue) { |
| | | this.isTrue = isTrue; |
| | | } |
| | | |
| | | public String getIsTrueName() { |
| | | return isTrueName; |
| | | } |
| | | |
| | | public void setIsTrueName(String isTrueName) { |
| | | this.isTrueName = isTrueName; |
| | | } |
| | | } |
| | |
| | | private String communityId; |
| | | private String staffId; |
| | | private String staffRole; |
| | | private String flowType; |
| | | |
| | | public String getWssId() { |
| | | return wssId; |
| | |
| | | public void setStaffRole(String staffRole) { |
| | | this.staffRole = staffRole; |
| | | } |
| | | |
| | | public String getFlowType() { |
| | | return flowType; |
| | | } |
| | | |
| | | public void setFlowType(String flowType) { |
| | | this.flowType = flowType; |
| | | } |
| | | } |
| | |
| | | private String ownerName; |
| | | private String idCard; |
| | | private String link; |
| | | private String startTime; |
| | | private String endTime; |
| | | |
| | | private List<RoomAttrDto> roomAttrDto; |
| | | |
| | |
| | | public void setApartment(String apartment) { |
| | | this.apartment = apartment; |
| | | } |
| | | |
| | | |
| | | public String getUnitNum() { |
| | | return unitNum; |
| | |
| | | public void setRoomSubTypeName(String roomSubTypeName) { |
| | | this.roomSubTypeName = roomSubTypeName; |
| | | } |
| | | |
| | | public String getStartTime() { |
| | | return startTime; |
| | | } |
| | | |
| | | public void setStartTime(String startTime) { |
| | | this.startTime = startTime; |
| | | } |
| | | |
| | | public String getEndTime() { |
| | | return endTime; |
| | | } |
| | | |
| | | public void setEndTime(String endTime) { |
| | | this.endTime = endTime; |
| | | } |
| | | } |
| | |
| | | private String warehousingWay; |
| | | private String createUserId; |
| | | private String createUserName; |
| | | private String unitCodeName; |
| | | private String miniUnitCodeName; |
| | | |
| | | |
| | | public String getApplyOrderId() { |
| | |
| | | public void setCreateUserName(String createUserName) { |
| | | this.createUserName = createUserName; |
| | | } |
| | | |
| | | public String getUnitCodeName() { |
| | | return unitCodeName; |
| | | } |
| | | |
| | | public void setUnitCodeName(String unitCodeName) { |
| | | this.unitCodeName = unitCodeName; |
| | | } |
| | | |
| | | public String getMiniUnitCodeName() { |
| | | return miniUnitCodeName; |
| | | } |
| | | |
| | | public void setMiniUnitCodeName(String miniUnitCodeName) { |
| | | this.miniUnitCodeName = miniUnitCodeName; |
| | | } |
| | | } |
| | |
| | | private String originalStock; |
| | | private String supplierName; |
| | | private String shName; |
| | | private String unitCodeName; |
| | | private String miniUnitCodeName; |
| | | |
| | | |
| | | public String getApplyOrderId() { |
| | |
| | | public void setShName(String shName) { |
| | | this.shName = shName; |
| | | } |
| | | |
| | | public String getUnitCodeName() { |
| | | return unitCodeName; |
| | | } |
| | | |
| | | public void setUnitCodeName(String unitCodeName) { |
| | | this.unitCodeName = unitCodeName; |
| | | } |
| | | |
| | | public String getMiniUnitCodeName() { |
| | | return miniUnitCodeName; |
| | | } |
| | | |
| | | public void setMiniUnitCodeName(String miniUnitCodeName) { |
| | | this.miniUnitCodeName = miniUnitCodeName; |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | private String specName; |
| | | private String shId; |
| | | private String shName; |
| | | private String unitCodeName; |
| | | private String miniUnitCodeName; |
| | | |
| | | public String getOperate() { |
| | | return operate; |
| | |
| | | public void setShName(String shName) { |
| | | this.shName = shName; |
| | | } |
| | | |
| | | public String getUnitCodeName() { |
| | | return unitCodeName; |
| | | } |
| | | |
| | | public void setUnitCodeName(String unitCodeName) { |
| | | this.unitCodeName = unitCodeName; |
| | | } |
| | | |
| | | public String getMiniUnitCodeName() { |
| | | return miniUnitCodeName; |
| | | } |
| | | |
| | | public void setMiniUnitCodeName(String miniUnitCodeName) { |
| | | this.miniUnitCodeName = miniUnitCodeName; |
| | | } |
| | | } |
| | |
| | | public static final String CODE_PREFIX_vipAcctId = "32"; |
| | | public static final String CODE_PREFIX_rssId = "33"; |
| | | public static final String CODE_PREFIX_pfId = "34"; |
| | | public static final String CODE_PREFIX_ARDRID = "35"; |
| | | public static final String CODE_PREFIX_bankId = "74"; |
| | | public static final String CODE_PREFIX_bondId = "76"; |
| | | public static final String CODE_PREFIX_bobjId = "77"; |
| | |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | <if test="communityId !=null and communityId != '' and operationType==null "> |
| | | and t.community_id in (#{communityId},'9999') |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | |
| | | <!-- 保存工作流节点信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBusinessWorkflowStepStaffInfo" parameterType="Map"> |
| | | insert into business_workflow_step_staff( |
| | | wss_id,operate,step_id,staff_name,b_id,community_id,staff_id,staff_role |
| | | wss_id,operate,step_id,staff_name,b_id,community_id,staff_id,staff_role,flow_type |
| | | ) values ( |
| | | #{wssId},#{operate},#{stepId},#{staffName},#{bId},#{communityId},#{staffId},#{staffRole} |
| | | #{wssId},#{operate},#{stepId},#{staffName},#{bId},#{communityId},#{staffId},#{staffRole},#{flowType} |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <!-- 查询工作流节点信息(Business) add by wuxw 2018-07-03 --> |
| | | <select id="getBusinessWorkflowStepStaffInfo" parameterType="Map" resultType="Map"> |
| | | select t.wss_id,t.wss_id wssId,t.operate,t.step_id,t.step_id stepId,t.staff_name,t.staff_name |
| | | staffName,t.b_id,t.b_id bId,t.community_id,t.community_id communityId,t.staff_id,t.staff_id staffId,t.staff_role, |
| | | t.staff_role staffRole |
| | | staffName,t.b_id,t.b_id bId,t.community_id,t.community_id communityId,t.staff_id,t.staff_id |
| | | staffId,t.staff_role, |
| | | t.staff_role staffRole,t.flow_type,t.flow_type flowType |
| | | from business_workflow_step_staff t |
| | | where 1 =1 |
| | | <if test="wssId !=null and wssId != ''"> |
| | |
| | | <!-- 保存工作流节点信息至 instance表中 add by wuxw 2018-07-03 --> |
| | | <insert id="saveWorkflowStepStaffInfoInstance" parameterType="Map"> |
| | | insert into workflow_step_staff( |
| | | wss_id,step_id,staff_name,status_cd,b_id,community_id,staff_id,staff_role |
| | | ) select t.wss_id,t.step_id,t.staff_name,'0',t.b_id,t.community_id,t.staff_id,t.staff_role |
| | | wss_id,step_id,staff_name,status_cd,b_id,community_id,staff_id,staff_role,flow_type |
| | | ) select t.wss_id,t.step_id,t.staff_name,'0',t.b_id,t.community_id,t.staff_id,t.staff_role,t.flow_type |
| | | from business_workflow_step_staff |
| | | t where 1=1 |
| | | <if test="wssId !=null and wssId != ''"> |
| | |
| | | <select id="getWorkflowStepStaffInfo" parameterType="Map" resultType="Map"> |
| | | select t.wss_id,t.wss_id wssId,t.step_id,t.step_id stepId,t.staff_name,t.staff_name |
| | | staffName,t.status_cd,t.status_cd statusCd,t.b_id,t.b_id bId,t.community_id,t.community_id |
| | | communityId,t.staff_id,t.staff_id staffId,t.staff_role,t.staff_role staffRole |
| | | communityId,t.staff_id,t.staff_id staffId,t.staff_role,t.staff_role staffRole,t.flow_type,t.flow_type flowType |
| | | from workflow_step_staff t |
| | | where 1 =1 |
| | | <if test="wssId !=null and wssId != ''"> |
| | |
| | | </if> |
| | | <if test="staffRole !=null and staffRole != ''"> |
| | | and t.staff_role= #{staffRole} |
| | | </if> |
| | | <if test="flowType !=null and flowType != ''"> |
| | | and t.flow_type= #{flowType} |
| | | </if> |
| | | <if test="flowTypes !=null and flowTypes != ''"> |
| | | and t.flow_type in |
| | | <foreach collection="flowTypes" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | |
| | | </if> |
| | | <if test="staffRole !=null and staffRole != ''"> |
| | | , t.staff_role= #{staffRole} |
| | | </if> |
| | | <if test="flowType !=null and flowType != ''"> |
| | | , t.flow_type= #{flowType} |
| | | </if> |
| | | where 1=1 |
| | | <if test="wssId !=null and wssId != ''"> |
| | |
| | | <if test="staffId !=null and staffId != ''"> |
| | | and t.staff_id= #{staffId} |
| | | </if> |
| | | <if test="flowType !=null and flowType != ''"> |
| | | and t.flow_type= #{flowType} |
| | | </if> |
| | | <if test="flowTypes !=null and flowTypes != ''"> |
| | | and t.flow_type in |
| | | <foreach collection="flowTypes" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | |
| | | |
| | | </select> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="applyRoomDiscountRecordServiceDaoImpl"> |
| | | |
| | | <!-- 保存验房记录信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveBusinessApplyRoomDiscountRecordInfo" parameterType="Map"> |
| | | insert into business_apply_room_discount_record( |
| | | ardr_id,ard_id,create_user_id,create_user_name,remark,b_id,community_id,is_true,state |
| | | ) values ( |
| | | #{ardrId},#{ardId},#{createUserId},#{createUserName},#{remark},#{bId},#{communityId},#{isTrue},#{state} |
| | | ) |
| | | </insert> |
| | | |
| | | <!-- 保存验房记录信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveApplyRoomDiscountRecordInfo" parameterType="Map"> |
| | | insert into apply_room_discount_record( |
| | | ardr_id,ard_id,create_user_id,create_user_name,remark,b_id,community_id,is_true,state,status_cd |
| | | ) values ( |
| | | #{ardrId},#{ardId},#{createUserId},#{createUserName},#{remark},#{bId},#{communityId},#{isTrue},#{state},#{statusCd} |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询验房记录信息(Business) add by wuxw 2018-07-03 --> |
| | | <select id="getBusinessApplyRoomDiscountRecordInfo" parameterType="Map" resultType="Map"> |
| | | select t.ardr_id,t.ardr_id ardrId,t.ard_id,t.ard_id ardId,t.create_user_id,t.create_user_id |
| | | createUserId,t.create_user_name,t.create_user_name createUserName,t.remark,t.b_id,t.b_id |
| | | bId,t.community_id,t.community_id communityId,t.is_true,t.is_true isTrue,t.state |
| | | from business_apply_room_discount_record t |
| | | where 1 =1 |
| | | <if test="ardrId !=null and ardrId != ''"> |
| | | and t.ardr_id= #{ardrId} |
| | | </if> |
| | | <if test="ardId !=null and ardId != ''"> |
| | | and t.ard_id= #{ardId} |
| | | </if> |
| | | <if test="createUserId !=null and createUserId != ''"> |
| | | and t.create_user_id= #{createUserId} |
| | | </if> |
| | | <if test="createUserName !=null and createUserName != ''"> |
| | | and t.create_user_name= #{createUserName} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="isTrue !=null and isTrue != ''"> |
| | | and t.is_true= #{isTrue} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <!-- 保存验房记录信息至 instance表中 add by wuxw 2018-07-03 --> |
| | | <insert id="saveApplyRoomDiscountRecordInfoInstance" parameterType="Map"> |
| | | insert into apply_room_discount_record( |
| | | ardr_id,ard_id,create_user_id,create_user_name,status_cd,remark,b_id,community_id,is_true,state |
| | | ) select |
| | | t.ardr_id,t.ard_id,t.create_user_id,t.create_user_name,'0',t.remark,t.b_id,t.community_id,t.is_true,t.state |
| | | from |
| | | business_apply_room_discount_record t where 1=1 |
| | | <if test="ardrId !=null and ardrId != ''"> |
| | | and t.ardr_id= #{ardrId} |
| | | </if> |
| | | <if test="ardId !=null and ardId != ''"> |
| | | and t.ard_id= #{ardId} |
| | | </if> |
| | | <if test="createUserId !=null and createUserId != ''"> |
| | | and t.create_user_id= #{createUserId} |
| | | </if> |
| | | <if test="createUserName !=null and createUserName != ''"> |
| | | and t.create_user_name= #{createUserName} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="isTrue !=null and isTrue != ''"> |
| | | and t.is_true= #{isTrue} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询验房记录信息 add by wuxw 2018-07-03 --> |
| | | <select id="getApplyRoomDiscountRecordInfo" parameterType="Map" resultType="Map"> |
| | | select t.ardr_id,t.ardr_id ardrId,t.ard_id,t.ard_id ardId,t.create_user_id,t.create_user_id |
| | | createUserId,t.create_user_name,t.create_user_name createUserName,t.status_cd,t.status_cd |
| | | statusCd,t.remark,t.b_id,t.b_id bId,t.community_id,t.community_id communityId,t.is_true,t.is_true isTrue, |
| | | t.state,ard.room_id roomId,ard.room_name roomName,fr.file_real_name fileRealName,fr.file_save_name fileSaveName, |
| | | fr.rel_type_cd relTypeCd,t.create_time,t.create_time createTime,td.name stateName,td2.name isTrueName |
| | | from apply_room_discount_record t |
| | | left join apply_room_discount ard on t.ard_id = ard.ard_id and ard.status_cd = '0' |
| | | LEFT JOIN t_dict td ON td.table_name = 'apply_room_discount_record' |
| | | AND td.table_columns = 'state' |
| | | AND t.state = td.status_cd |
| | | left join t_dict td2 on td2.table_name = 'apply_room_discount_record' |
| | | and td2.table_columns = 'is_true' |
| | | and t.is_true = td2.status_cd |
| | | LEFT JOIN file_rel fr ON t.ardr_id = fr.obj_id |
| | | AND fr.status_cd = "0" |
| | | where 1 = 1 |
| | | <if test="ardrId !=null and ardrId != ''"> |
| | | and t.ardr_id= #{ardrId} |
| | | </if> |
| | | <if test="ardId !=null and ardId != ''"> |
| | | and t.ard_id= #{ardId} |
| | | </if> |
| | | <if test="createUserId !=null and createUserId != ''"> |
| | | and t.create_user_id= #{createUserId} |
| | | </if> |
| | | <if test="createUserName !=null and createUserName != ''"> |
| | | and t.create_user_name= #{createUserName} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="isTrue !=null and isTrue != ''"> |
| | | and t.is_true= #{isTrue} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="roomId !=null and roomId != ''"> |
| | | and t.room_id= #{roomId} |
| | | </if> |
| | | <if test="roomName !=null and roomName != ''"> |
| | | and t.room_name= #{roomName} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改验房记录信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateApplyRoomDiscountRecordInfoInstance" parameterType="Map"> |
| | | update apply_room_discount_record t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="ardId !=null and ardId != ''"> |
| | | , t.ard_id= #{ardId} |
| | | </if> |
| | | <if test="createUserId !=null and createUserId != ''"> |
| | | , t.create_user_id= #{createUserId} |
| | | </if> |
| | | <if test="createUserName !=null and createUserName != ''"> |
| | | , t.create_user_name= #{createUserName} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | , t.remark= #{remark} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | , t.community_id= #{communityId} |
| | | </if> |
| | | <if test="isTrue !=null and isTrue != ''"> |
| | | , t.is_true= #{isTrue} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | , t.state= #{state} |
| | | </if> |
| | | where 1=1 |
| | | <if test="ardrId !=null and ardrId != ''"> |
| | | and t.ardr_id= #{ardrId} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | </update> |
| | | |
| | | <!-- 查询验房记录数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryApplyRoomDiscountRecordsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from apply_room_discount_record t |
| | | left join apply_room_discount ard on t.ard_id = ard.ard_id and ard.status_cd = '0' |
| | | LEFT JOIN t_dict td ON td.table_name = 'apply_room_discount_record' |
| | | AND td.table_columns = 'state' |
| | | AND t.state = td.status_cd |
| | | left join t_dict td2 on td2.table_name = 'apply_room_discount_record' |
| | | and td2.table_columns = 'is_true' |
| | | and t.is_true = td2.status_cd |
| | | LEFT JOIN file_rel fr ON t.ardr_id = fr.obj_id |
| | | AND fr.status_cd = "0" |
| | | where 1 = 1 |
| | | <if test="ardrId !=null and ardrId != ''"> |
| | | and t.ardr_id= #{ardrId} |
| | | </if> |
| | | <if test="ardId !=null and ardId != ''"> |
| | | and t.ard_id= #{ardId} |
| | | </if> |
| | | <if test="createUserId !=null and createUserId != ''"> |
| | | and t.create_user_id= #{createUserId} |
| | | </if> |
| | | <if test="createUserName !=null and createUserName != ''"> |
| | | and t.create_user_name= #{createUserName} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="isTrue !=null and isTrue != ''"> |
| | | and t.is_true= #{isTrue} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- 查询验房记录数量 add by wuxw 2018-07-03 --> |
| | | <select id="selectApplyRoomDiscountRecordsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from apply_room_discount_record t |
| | | where 1 = 1 |
| | | <if test="ardrId !=null and ardrId != ''"> |
| | | and t.ardr_id= #{ardrId} |
| | | </if> |
| | | <if test="ardId !=null and ardId != ''"> |
| | | and t.ard_id= #{ardId} |
| | | </if> |
| | | <if test="createUserId !=null and createUserId != ''"> |
| | | and t.create_user_id= #{createUserId} |
| | | </if> |
| | | <if test="createUserName !=null and createUserName != ''"> |
| | | and t.create_user_name= #{createUserName} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="isTrue !=null and isTrue != ''"> |
| | | and t.is_true= #{isTrue} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- 查询验房记录信息 add by wuxw 2018-07-03 --> |
| | | <select id="selectApplyRoomDiscountRecordInfo" parameterType="Map" resultType="Map"> |
| | | select t.ardr_id,t.ardr_id ardrId,t.ard_id,t.ard_id ardId,t.create_user_id,t.create_user_id |
| | | createUserId,t.create_user_name,t.create_user_name createUserName,t.status_cd,t.status_cd |
| | | statusCd,t.remark,t.b_id,t.b_id bId,t.community_id,t.community_id communityId,t.is_true,t.is_true isTrue, |
| | | t.state,ard.room_id roomId,ard.room_name roomName,t.create_time,t.create_time createTime,td.name stateName, |
| | | td2.name isTrueName from apply_room_discount_record t |
| | | left join apply_room_discount ard on t.ard_id = ard.ard_id and ard.status_cd = '0' |
| | | LEFT JOIN t_dict td ON td.table_name = 'apply_room_discount_record' |
| | | AND td.table_columns = 'state' |
| | | AND t.state = td.status_cd |
| | | left join t_dict td2 on td2.table_name = 'apply_room_discount_record' |
| | | and td2.table_columns = 'is_true' |
| | | and t.is_true = td2.status_cd |
| | | where 1 = 1 |
| | | <if test="ardrId !=null and ardrId != ''"> |
| | | and t.ardr_id= #{ardrId} |
| | | </if> |
| | | <if test="ardId !=null and ardId != ''"> |
| | | and t.ard_id= #{ardId} |
| | | </if> |
| | | <if test="createUserId !=null and createUserId != ''"> |
| | | and t.create_user_id= #{createUserId} |
| | | </if> |
| | | <if test="createUserName !=null and createUserName != ''"> |
| | | and t.create_user_name= #{createUserName} |
| | | </if> |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="isTrue !=null and isTrue != ''"> |
| | | and t.is_true= #{isTrue} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="roomId !=null and roomId != ''"> |
| | | and t.room_id= #{roomId} |
| | | </if> |
| | | <if test="roomName !=null and roomName != ''"> |
| | | and t.room_name= #{roomName} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | <insert id="saveBusinessRepairInfo" parameterType="Map"> |
| | | insert into business_repair_pool( |
| | | operate,repair_name,appointment_time,repair_type,context,repair_id,tel,state,community_id,b_id,repair_obj_type,repair_obj_id, |
| | | repair_obj_name, maintenance_type,repair_channel,repair_materials,repair_fee |
| | | repair_obj_name, maintenance_type,repair_channel,repair_materials,repair_fee,pay_type |
| | | ) values ( |
| | | #{operate},#{repairName},#{appointmentTime},#{repairType},#{context},#{repairId},#{tel},#{state},#{communityId},#{bId}, |
| | | #{repairObjType},#{repairObjId},#{repairObjName},#{maintenanceType},#{repairChannel},#{repairMaterials},#{repairFee} |
| | | #{repairObjType},#{repairObjId},#{repairObjName},#{maintenanceType},#{repairChannel},#{repairMaterials},#{repairFee},#{payType} |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | t.repair_obj_type,t.repair_obj_id,t.repair_obj_name,t.repair_obj_type repairObjType,t.repair_obj_id |
| | | repairObjId,t.repair_obj_name repairObjName,t.maintenance_type,t.maintenance_type maintenanceType, |
| | | t.repair_channel,t.repair_channel repairChannel,t.repair_materials,t.repair_materials repairMaterials, |
| | | t.repair_fee,t.repair_fee repairFee |
| | | t.repair_fee,t.repair_fee repairFee,t.pay_type,t.pay_type payType |
| | | from business_repair_pool t |
| | | where 1 =1 |
| | | <if test="operate !=null and operate != ''"> |
| | |
| | | <if test="repairFee !=null and repairFee != ''"> |
| | | and t.repair_fee= #{repairFee} |
| | | </if> |
| | | <if test="payType !=null and payType != ''"> |
| | | and t.pay_type= #{payType} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | |
| | | <insert id="saveRepairInfoInstance" parameterType="Map"> |
| | | insert into r_repair_pool( |
| | | repair_name,appointment_time,repair_type,context,repair_id,tel,status_cd,state,community_id,b_id, |
| | | repair_obj_type,repair_obj_id,repair_obj_name,repair_channel,maintenance_type,repair_materials,repair_fee |
| | | repair_obj_type,repair_obj_id,repair_obj_name,repair_channel,maintenance_type,repair_materials,repair_fee,pay_type |
| | | ) select |
| | | t.repair_name,t.appointment_time,t.repair_type,t.context,t.repair_id,t.tel,'0',t.state,t.community_id,t.b_id, |
| | | t.repair_obj_type,t.repair_obj_id,t.repair_obj_name,t.repair_channel,t.maintenance_type,t.repair_materials, |
| | | t.repair_fee |
| | | t.repair_fee,t.pay_type |
| | | from business_repair_pool t where 1=1 |
| | | and t.operate= 'ADD' |
| | | <if test="repairName !=null and repairName != ''"> |
| | |
| | | <if test="repairFee !=null and repairFee != ''"> |
| | | and t.repair_fee= #{repairFee} |
| | | </if> |
| | | <if test="payType !=null and payType != ''"> |
| | | and t.pay_type= #{payType} |
| | | </if> |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | |
| | | t.repair_materials,t.repair_materials repairMaterials,t.repair_fee,t.repair_fee repairFee, |
| | | rs.repair_type_name repairTypeName,rs.repair_way repairWay,rs.return_visit_flag returnVisitFlag, |
| | | t.repair_obj_type,t.repair_obj_id,t.repair_obj_name,t.repair_obj_type repairObjType,t.repair_obj_id repairObjId, |
| | | t.repair_obj_name repairObjName,rrv.visit_type visitType,rrv.context visitContext,a.appraise_score appraiseScore, |
| | | a.door_speed_score doorSpeedScore,a.repairman_service_score repairmanServiceScore |
| | | t.repair_obj_name repairObjName,rrv.visit_type visitType,rrv.context visitContext,a.appraise_score |
| | | appraiseScore, a.door_speed_score doorSpeedScore,a.repairman_service_score repairmanServiceScore, |
| | | t.pay_type,t.pay_type payType |
| | | <if test="staffId != null and staffId != ''"> |
| | | ,rru.state repairDispatchState,rru.context repairDispatchContext,td.name repairDispatchStateName |
| | | </if> |
| | |
| | | <if test="repairFee !=null and repairFee != ''"> |
| | | and t.repair_fee= #{repairFee} |
| | | </if> |
| | | <if test="payType !=null and payType != ''"> |
| | | and t.pay_type= #{payType} |
| | | </if> |
| | | <if test="repairChannels !=null"> |
| | | and t.repair_channel in |
| | | <foreach collection="repairChannels" item="item" open="(" close=")" separator=","> |
| | |
| | | <if test="repairFee !=null and repairFee != ''"> |
| | | , t.repair_fee= #{repairFee} |
| | | </if> |
| | | <if test="payType !=null and payType != ''"> |
| | | , t.pay_type= #{payType} |
| | | </if> |
| | | where 1=1 |
| | | <if test="repairId !=null and repairId != ''"> |
| | | and t.repair_id= #{repairId} |
| | |
| | | </if> |
| | | <if test="repairType !=null and repairType != ''"> |
| | | and t.repair_type= #{repairType} |
| | | </if> |
| | | <if test="payType !=null and payType != ''"> |
| | | and t.pay_type= #{payType} |
| | | </if> |
| | | <if test="context !=null and context != ''"> |
| | | and t.context= #{context} |
| | |
| | | repairObjId,t.repair_obj_name repairObjName,t.repair_channel repairChannel, |
| | | sru.ru_id startRuId,ru.ru_id ruId,ru.pre_ru_id preRuId,t.maintenance_type,t.maintenance_type maintenanceType, |
| | | t.repair_channel,t.repair_channel repairChannel,t.repair_materials,t.repair_materials repairMaterials, |
| | | t.repair_fee,t.repair_fee repairFee |
| | | t.repair_fee,t.repair_fee repairFee,t.pay_type,t.pay_type payType |
| | | from r_repair_pool t |
| | | left join t_dict d on t.state = d.status_cd and d.table_name = 'r_repair_pool' and d.table_columns = 'state' |
| | | left join r_repair_setting rs on rs.repair_type = t.repair_type and rs.status_cd = '0' |
| | |
| | | </if> |
| | | <if test="repairFee !=null and repairFee != ''"> |
| | | and t.repair_fee= #{repairFee} |
| | | </if> |
| | | <if test="payType !=null and payType != ''"> |
| | | and t.pay_type= #{payType} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | |
| | | <if test="repairObjId !=null and repairObjId != ''"> |
| | | and t.repair_obj_id= #{repairObjId} |
| | | </if> |
| | | <if test="payType !=null and payType != ''"> |
| | | and t.pay_type= #{payType} |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- 查询报修信息信息 add by wuxw 2018-07-03 --> |
| | |
| | | t.repair_obj_type,t.repair_obj_id,t.repair_obj_name,t.repair_obj_type repairObjType,t.repair_obj_id |
| | | repairObjId,t.repair_obj_name repairObjName,t.maintenance_type,t.maintenance_type maintenanceType, |
| | | t.repair_channel,t.repair_channel repairChannel,t.repair_materials,t.repair_materials repairMaterials, |
| | | t.repair_fee,t.repair_fee repairFee |
| | | t.repair_fee,t.repair_fee repairFee,t.pay_type,t.pay_type payType |
| | | from r_repair_pool t |
| | | left join t_dict d on t.state = d.status_cd and d.table_name = 'r_repair_pool' and d.table_columns = 'state' |
| | | left join r_repair_setting rs on rs.repair_type = t.repair_type and rs.status_cd = '0' |
| | |
| | | </if> |
| | | <if test="repairObjId !=null and repairObjId != ''"> |
| | | and t.repair_obj_id= #{repairObjId} |
| | | </if> |
| | | <if test="payType !=null and payType != ''"> |
| | | and t.pay_type= #{payType} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | |
| | | <if test="repairObjId !=null and repairObjId != ''"> |
| | | and t.repair_obj_id= #{repairObjId} |
| | | </if> |
| | | <if test="payType !=null and payType != ''"> |
| | | and t.pay_type= #{payType} |
| | | </if> |
| | | <if test="staffId != null and staffId != ''"> |
| | | group by ru.staff_id |
| | | </if> |
| | |
| | | t.b_id bId,t.staff_id,t.staff_id staffId,t.staff_name,t.staff_name staffName, |
| | | t.pre_staff_id,t.pre_staff_id preStaffId,t.pre_staff_name,t.pre_staff_name preStaffName, |
| | | t.start_time,t.start_time startTime,t.end_time,t.end_time endTime,d.name stateName, |
| | | t.repair_event,t.repair_event repairEvent, t.pre_ru_id,t.pre_ru_id preRuId,t.create_time createTime |
| | | t.repair_event,t.repair_event repairEvent, t.pre_ru_id,t.pre_ru_id preRuId,t.create_time createTime, |
| | | rp.pay_type payType,d2.name payTypeName |
| | | from r_repair_user t |
| | | left join r_repair_pool rp on t.repair_id = rp.repair_id and t.state in ('10009','12000') |
| | | left join t_dict d on t.state = d.status_cd and d.table_name = 'r_repair_user' and d.table_columns = 'state' |
| | | where 1 =1 |
| | | left join t_dict d2 on rp.pay_type = d2.status_cd and d2.table_name = 'r_repair_pool' and d2.table_columns = 'pay_type' |
| | | where 1 = 1 |
| | | <if test="context !=null and context != ''"> |
| | | and t.context= #{context} |
| | | </if> |
| | |
| | | <select id="queryRepairUsersCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from r_repair_user t |
| | | left join r_repair_pool rp on t.repair_id = rp.repair_id and t.state in ('10009','12000') |
| | | left join t_dict d on t.state = d.status_cd and d.table_name = 'r_repair_user' and d.table_columns = 'state' |
| | | where 1 =1 |
| | | left join t_dict d2 on rp.pay_type = d2.status_cd and d2.table_name = 'r_repair_pool' and d2.table_columns = 'pay_type' |
| | | where 1 = 1 |
| | | <if test="context !=null and context != ''"> |
| | | and t.context= #{context} |
| | | </if> |
| | |
| | | |
| | | <!-- 保存装修记录信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveRoomRenovationRecordInfo" parameterType="Map"> |
| | | insert into room_renovation_record(record_id,r_id,staff_id,staff_name,state,remark,create_time) values (#{recordId},#{rId},#{staffId},#{staffName},#{state},#{remark},#{createTime}) |
| | | insert into room_renovation_record(record_id,r_id,staff_id,staff_name,state,remark,create_time,is_true) values (#{recordId},#{rId},#{staffId},#{staffName},#{state},#{remark},#{createTime},#{isTrue}) |
| | | </insert> |
| | | |
| | | <!-- 查询装修记录信息(与文件表关联) --> |
| | |
| | | re.staff_name staffName, |
| | | re.remark, |
| | | re.state, |
| | | re.is_true isTrue, |
| | | td. NAME stateName, |
| | | re.create_time createTime, |
| | | r.room_id roomId, |
| | |
| | | </if> |
| | | <if test="statusCd != null and statusCd != ''"> |
| | | and re.status_cd = #{statusCd} |
| | | </if> |
| | | <if test="isTrue != null and isTrue != ''"> |
| | | and re.is_true = #{isTrue} |
| | | </if> |
| | | <if test="createTime !=null and createTime != ''"> |
| | | and re.create_time= #{createTime} |
| | |
| | | <if test="statusCd != null and statusCd != ''"> |
| | | and re.status_cd = #{statusCd} |
| | | </if> |
| | | <if test="isTrue != null and isTrue != ''"> |
| | | and re.is_true = #{isTrue} |
| | | </if> |
| | | <if test="createTime !=null and createTime != ''"> |
| | | and re.create_time= #{createTime} |
| | | </if> |
| | |
| | | re.staff_name staffName, |
| | | re.remark, |
| | | re.state, |
| | | td. NAME stateName, |
| | | td.name stateName, |
| | | re.is_true isTrue, |
| | | td2.name isTrueName, |
| | | re.create_time createTime, |
| | | r.room_id roomId, |
| | | r.room_name roomName |
| | |
| | | LEFT JOIN t_dict td ON td.table_name = 'room_renovation_record' |
| | | AND td.table_columns = 'state' |
| | | AND re.state = td.status_cd |
| | | LEFT JOIN t_dict td2 ON td2.table_name = 'room_renovation_record' |
| | | AND td2.table_columns = 'is_true' AND re.is_true = td2.status_cd |
| | | WHERE 1 = 1 |
| | | <if test="recordId !=null and recordId != ''"> |
| | | and re.record_id= #{recordId} |
| | |
| | | </if> |
| | | <if test="statusCd != null and statusCd != ''"> |
| | | and re.status_cd = #{statusCd} |
| | | </if> |
| | | <if test="isTrue != null and isTrue != ''"> |
| | | and re.is_true = #{isTrue} |
| | | </if> |
| | | <if test="createTime !=null and createTime != ''"> |
| | | and re.create_time= #{createTime} |
| | |
| | | <if test="statusCd != null and statusCd != ''"> |
| | | and re.status_cd = #{statusCd} |
| | | </if> |
| | | <if test="isTrue != null and isTrue != ''"> |
| | | and re.is_true = #{isTrue} |
| | | </if> |
| | | <if test="createTime !=null and createTime != ''"> |
| | | and re.create_time= #{createTime} |
| | | </if> |
| | |
| | | <insert id="saveBusinessRoomInfo" parameterType="Map"> |
| | | insert into business_building_room( |
| | | fee_coefficient,section,remark,user_id,room_id,layer,built_up_area,operate,room_num,unit_id,b_id,apartment,state,community_id, |
| | | room_type,room_sub_type,room_rent,room_area |
| | | room_type,room_sub_type,room_rent,room_area,start_time,end_time |
| | | ) values ( |
| | | #{feeCoefficient},#{section},#{remark},#{userId},#{roomId},#{layer},#{builtUpArea},#{operate},#{roomNum},#{unitId},#{bId},#{apartment},#{state}, |
| | | #{communityId},#{roomType},#{roomSubType},#{roomRent},#{roomArea} |
| | | #{communityId},#{roomType},#{roomSubType},#{roomRent},#{roomArea},#{startTime},#{endTime} |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | userId,t.room_id,t.room_id |
| | | roomId,t.layer,t.built_up_area,t.built_up_area builtUpArea,t.operate,t.room_num,t.room_num |
| | | roomNum,t.unit_id,t.unit_id unitId,t.b_id,t.b_id bId,t.apartment,t.state,t.community_id,t.community_id |
| | | communityId,t.room_type,t.room_type roomType,t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type roomSubType,t.room_rent roomRent,t.room_area roomArea |
| | | communityId,t.room_type,t.room_type roomType,t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type |
| | | roomSubType, |
| | | t.room_rent roomRent,t.room_area roomArea,t.start_time,t.start_time startTime,t.end_time,t.end_time endTime |
| | | from business_building_room t |
| | | where 1 =1 |
| | | <if test="feeCoefficient !=null and feeCoefficient != ''"> |
| | |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | |
| | | <if test="startTime !=null"> |
| | | and t.start_time= #{startTime} |
| | | </if> |
| | | <if test="endTime !=null"> |
| | | and t.end_time= #{endTime} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | |
| | | <insert id="saveRoomInfoInstance" parameterType="Map"> |
| | | insert into building_room( |
| | | fee_coefficient,section,status_cd,remark,user_id,room_id,layer,built_up_area,room_num,unit_id,b_id,apartment,state,community_id, |
| | | room_type,room_sub_type,room_rent,room_area |
| | | room_type,room_sub_type,room_rent,room_area,start_time,end_time |
| | | ) select |
| | | t.fee_coefficient,t.section,'0',t.remark,t.user_id,t.room_id,t.layer,t.built_up_area,t.room_num,t.unit_id,t.b_id,t.apartment,t.state,t.community_id, |
| | | t.room_type,t.room_sub_type,t.room_rent,t.room_area |
| | | t.room_type,t.room_sub_type,t.room_rent,t.room_area,t.start_time,t.end_time |
| | | from business_building_room t where 1=1 |
| | | <if test="feeCoefficient !=null and feeCoefficient != ''"> |
| | | and t.fee_coefficient= #{feeCoefficient} |
| | |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | |
| | | <if test="startTime !=null"> |
| | | and t.start_time= #{startTime} |
| | | </if> |
| | | <if test="endTime !=null"> |
| | | and t.end_time= #{endTime} |
| | | </if> |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询小区房屋信息 add by wuxw 2018-07-03 --> |
| | | <select id="getRoomInfo" parameterType="Map" resultType="Map"> |
| | |
| | | statusCd,t.remark,t.user_id,t.user_id userId,t.room_id,t.room_id roomId,t.layer,t.built_up_area,t.built_up_area |
| | | builtUpArea,t.room_num,t.room_num roomNum,t.unit_id,t.unit_id unitId,t.b_id,t.b_id |
| | | bId,t.apartment,t.state,t.community_id,t.community_id communityId,t.room_type,t.room_type roomType, |
| | | t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type roomSubType,t.room_rent roomRent,t.room_area roomArea |
| | | t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type roomSubType,t.room_rent roomRent,t.room_area roomArea, |
| | | t.start_time,t.start_time startTime,t.end_time,t.end_time endTime |
| | | from building_room t |
| | | where 1 =1 |
| | | <if test="feeCoefficient !=null and feeCoefficient != ''"> |
| | |
| | | <if test="roomId !=null and roomId != ''"> |
| | | and t.room_id= #{roomId} |
| | | </if> |
| | | |
| | | <if test="roomIds != null"> |
| | | and t.room_id in |
| | | <foreach collection="roomIds" item="item" open="(" close=")" separator=","> |
| | |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="startTime !=null"> |
| | | and t.start_time= #{startTime} |
| | | </if> |
| | | <if test="endTime !=null"> |
| | | and t.end_time= #{endTime} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null"> |
| | | limit #{page},#{row} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改小区房屋信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateRoomInfoInstance" parameterType="Map"> |
| | |
| | | <if test="roomArea !=null and roomArea != ''"> |
| | | , t.room_area= #{roomArea} |
| | | </if> |
| | | <if test="startTime !=null"> |
| | | , t.start_time= #{startTime} |
| | | </if> |
| | | <if test="endTime !=null"> |
| | | , t.end_time= #{endTime} |
| | | </if> |
| | | where 1=1 |
| | | <if test="roomId !=null and roomId != ''"> |
| | | and t.room_id= #{roomId} |
| | |
| | | <if test="bId !=null and bId != ''"> |
| | | and t.b_id= #{bId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询小区房屋数量 add by wuxw 2018-07-03 --> |
| | |
| | | <if test="roomSubType !=null and roomSubType != ''"> |
| | | and t.room_sub_type= #{roomSubType} |
| | | </if> |
| | | |
| | | |
| | | |
| | | <if test="startTime !=null"> |
| | | and t.start_time= #{startTime} |
| | | </if> |
| | | <if test="endTime !=null"> |
| | | and t.end_time= #{endTime} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <!-- 查询小区房屋数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryRoomsByCommunityIdCount" parameterType="Map" resultType="Map"> |
| | |
| | | <if test="floorId !=null and floorId != ''"> |
| | | and f.`floor_id`= #{floorId} |
| | | </if> |
| | | |
| | | <if test="feeCoefficient !=null and feeCoefficient != ''"> |
| | | and t.fee_coefficient= #{feeCoefficient} |
| | | </if> |
| | |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | | </if> |
| | | |
| | | <if test="roomId !=null and roomId != ''"> |
| | | and t.room_id= #{roomId} |
| | | </if> |
| | |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | |
| | | <if test="floorNum !=null and floorNum != ''"> |
| | | and f.`floor_num`= #{floorNum} |
| | | </if> |
| | | <if test="unitNum !=null and unitNum != ''"> |
| | | and u.unit_num= #{unitNum} |
| | | </if> |
| | | |
| | | |
| | | <if test="startTime !=null"> |
| | | and t.start_time= #{startTime} |
| | | </if> |
| | | <if test="endTime !=null"> |
| | | and t.end_time= #{endTime} |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- 查询小区房屋数量 add by wuxw 2018-07-03 --> |
| | |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="startTime !=null"> |
| | | and t.start_time= #{startTime} |
| | | </if> |
| | | <if test="endTime !=null"> |
| | | and t.end_time= #{endTime} |
| | | </if> |
| | | and borr.`room_id` is null |
| | | |
| | | |
| | | </select> |
| | | |
| | | <!-- 查询小区房屋数量 add by wuxw 2018-07-03 --> |
| | |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="startTime !=null"> |
| | | and t.start_time= #{startTime} |
| | | </if> |
| | | <if test="endTime !=null"> |
| | | and t.end_time= #{endTime} |
| | | </if> |
| | | AND borr.`room_id` is not null |
| | | |
| | | |
| | | </select> |
| | | |
| | | <!-- 查询小区房屋信息 add by wuxw 2018-07-03 --> |
| | |
| | | SELECT t.fee_coefficient,t.fee_coefficient feeCoefficient,t.section,t.status_cd,t.status_cd |
| | | statusCd,t.remark,t.user_id, |
| | | t.user_id userId,t.room_id,t.room_id roomId,t.layer,t.built_up_area,t.built_up_area builtUpArea,t.room_num, |
| | | t.room_num roomNum,t.unit_id,t.unit_id unitId,t.b_id,t.b_id bId,t.apartment,t.state,u.`unit_num` unitNum,f.floor_num floorNum |
| | | ,t.room_type roomType,t.room_type,t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type roomSubType,t.room_rent roomRent,t.room_area roomArea |
| | | t.room_num roomNum,t.unit_id,t.unit_id unitId,t.b_id,t.b_id bId,t.apartment,t.state,u.`unit_num` |
| | | unitNum,f.floor_num floorNum |
| | | ,t.room_type roomType,t.room_type,t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type |
| | | roomSubType,t.room_rent roomRent,t.room_area roomArea,t.start_time,t.start_time startTime,t.end_time,t.end_time endTime |
| | | FROM |
| | | building_room t |
| | | INNER JOIN building_unit u on t.`unit_id` = u.`unit_id` and u.`status_cd` = '0' |
| | |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="startTime !=null"> |
| | | and t.start_time= #{startTime} |
| | | </if> |
| | | <if test="endTime !=null"> |
| | | and t.end_time= #{endTime} |
| | | </if> |
| | | and borr.`room_id` is null |
| | | <if test="page != -1 and page != null"> |
| | | limit #{page},#{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | <!-- 查询小区房屋信息 add by wuxw 2018-07-03 --> |
| | |
| | | statusCd,t.remark,t.user_id, |
| | | t.user_id userId,t.room_id,t.room_id roomId,t.layer,t.built_up_area,t.built_up_area builtUpArea,t.room_num, |
| | | t.room_num roomNum,t.unit_id,t.unit_id unitId,t.b_id,t.b_id bId,t.apartment,t.state,u.`unit_num` unitNum, |
| | | t.room_type roomType,t.room_type,t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type roomSubType,t.room_rent roomRent,t.room_area roomArea |
| | | t.room_type roomType,t.room_type,t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type roomSubType,t.room_rent |
| | | roomRent,t.room_area roomArea,t.start_time,t.start_time startTime,t.end_time,t.end_time endTime |
| | | FROM |
| | | building_room t |
| | | INNER JOIN building_unit u on t.`unit_id` = u.`unit_id` and u.`status_cd` = '0' |
| | |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="startTime !=null"> |
| | | and t.start_time= #{startTime} |
| | | </if> |
| | | <if test="endTime !=null"> |
| | | and t.end_time= #{endTime} |
| | | </if> |
| | | AND borr.`room_id` is not null |
| | | <if test="page != -1 and page != null"> |
| | | limit #{page},#{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 查询小区房屋信息 add by wuxw 2018-07-03 --> |
| | | <select id="getRoomInfoByCommunityId" parameterType="Map" resultType="Map"> |
| | |
| | | t.room_num roomNum,t.unit_id,t.unit_id unitId,t.b_id,t.b_id bId,t.apartment,t.state,u.`unit_num` unitNum, |
| | | u.unit_id unitId,f.floor_id floorId,f.floor_num floorNum,f.floor_area floorArea,u.unit_area unitArea,td.name |
| | | stateName,t.room_type roomType,t.room_type,t.`community_id` communityId,td1.`name` roomSubTypeName |
| | | ,t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type roomSubType,t.room_rent roomRent,t.room_area roomArea |
| | | ,t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type roomSubType,t.room_rent roomRent,t.room_area roomArea, |
| | | t.start_time,t.start_time startTime,t.end_time,t.end_time endTime |
| | | FROM building_room t |
| | | inner join building_unit u on t.`unit_id` = u.`unit_id` and u.`status_cd` = '0' |
| | | inner JOIN f_floor f on u.`floor_id` = f.`floor_id` AND f.`community_id` = t.`community_id` AND f.`status_cd` = '0' |
| | | inner JOIN f_floor f on u.`floor_id` = f.`floor_id` AND f.`community_id` = t.`community_id` AND f.`status_cd` = |
| | | '0' |
| | | left join t_dict td on t.state = td.status_cd and td.table_name = 'building_room' and td.table_columns = 'state' |
| | | left join t_dict td1 on t.room_sub_type = td1.status_cd and td1.table_name = 'building_room' and td1.table_columns = 'room_sub_type' |
| | | left join t_dict td1 on t.room_sub_type = td1.status_cd and td1.table_name = 'building_room' and |
| | | td1.table_columns = 'room_sub_type' |
| | | WHERE 1 =1 |
| | | <if test="floorId !=null and floorId != ''"> |
| | | AND t.`community_id` = #{communityId} |
| | |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="startTime !=null"> |
| | | and t.start_time= #{startTime} |
| | | </if> |
| | | <if test="endTime !=null"> |
| | | and t.end_time= #{endTime} |
| | | </if> |
| | | order by f.floor_num ,u.unit_num,t.room_num |
| | | <if test="page != -1 and page != null"> |
| | | limit #{page},#{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | <!-- 根据业主查询房屋信息 --> |
| | |
| | | t.user_id userId,t.room_id,t.room_id roomId,t.layer,t.built_up_area,t.built_up_area builtUpArea,t.room_num, |
| | | t.room_num roomNum,t.unit_id,t.unit_id unitId,t.b_id,t.b_id bId,t.apartment,t.state,u.`unit_num` |
| | | unitNum,f.`floor_num` floorNum,t.room_type roomType,t.room_type,f.floor_id floorId |
| | | ,t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type roomSubType,t.room_rent roomRent,t.room_area roomArea |
| | | ,t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type roomSubType,t.room_rent roomRent,t.room_area roomArea, |
| | | t.start_time,t.start_time startTime,t.end_time ,t.end_time endTime |
| | | FROM |
| | | building_owner bo,building_room t,building_owner_room_rel borr,building_unit u,f_floor f |
| | | WHERE |
| | |
| | | <if test="ownerTypeCd !=null and ownerTypeCd != ''"> |
| | | and bo.owner_type_cd= #{ownerTypeCd} |
| | | </if> |
| | | <if test="startTime !=null"> |
| | | and t.start_time= #{startTime} |
| | | </if> |
| | | <if test="endTime !=null"> |
| | | and t.end_time= #{endTime} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <!-- 查询小区房屋信息 add by wuxw 2018-07-03 --> |
| | | <select id="getRoomInfos" parameterType="Map" resultType="Map"> |
| | |
| | | t.user_id userId,t.room_id,t.room_id roomId,t.layer,t.built_up_area,t.built_up_area builtUpArea,t.room_num, |
| | | t.room_num roomNum,t.unit_id,t.unit_id unitId,t.b_id,t.b_id bId,t.apartment,t.state,u.`unit_num` unitNum, |
| | | t.room_type roomType,t.room_type,f.floor_num floorNum |
| | | ,t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type roomSubType,t.room_rent roomRent,t.room_area roomArea |
| | | ,t.room_sub_type,t.room_rent,t.room_area,t.room_sub_type roomSubType,t.room_rent roomRent,t.room_area roomArea, |
| | | t.start_time,t.start_time startTime,t.end_time,t.end_time endTime |
| | | FROM |
| | | building_room t |
| | | INNER JOIN building_unit u on t.`unit_id` = u.`unit_id` and u.`status_cd` = '0' |
| | |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | <if test="startTime !=null"> |
| | | and t.start_time= #{startTime} |
| | | </if> |
| | | <if test="endTime !=null"> |
| | | and t.end_time= #{endTime} |
| | | </if> |
| | | <if test="page != -1 and page != null"> |
| | | limit #{page},#{row} |
| | | </if> |
| | | |
| | | </select> |
| | | </mapper> |
| | |
| | | statusCd,t.check_remark,t.check_remark checkRemark,t.room_id,t.room_id roomId,t.room_name,t.room_name |
| | | roomName,t.review_user_id,t.review_user_id reviewUserId,t.review_remark,t.review_remark |
| | | reviewRemark,t.start_time,t.start_time startTime,t.end_time,t.end_time |
| | | endTime,t.state,td.name stateName,t.community_id,t.community_id communityId,t.discount_id,t.discount_id discountId,t.in_use,t.in_use inUse, |
| | | endTime,t.state,td.name stateName,t.community_id,t.community_id communityId,t.discount_id,t.discount_id discountId,t.in_use,t.in_use inUse,t.create_time,t.create_time createTime, |
| | | ardt.type_name applyTypeName,fd.discount_name discountName |
| | | from apply_room_discount t |
| | | left join t_dict td on t.state = td.status_cd and td.table_name='apply_room_discount' and td.table_columns ='state' |
| | |
| | | <if test="oweAmount !=null and oweAmount != ''"> |
| | | , t.owe_amount= #{oweAmount} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | , t.community_id= #{communityId} |
| | | </if> |
| | | |
| | | <if test="feeCreateTime !=null and feeCreateTime != ''"> |
| | | , t.fee_create_time= #{feeCreateTime} |
| | | </if> |
| | |
| | | , t.obj_type= #{objType} |
| | | </if> |
| | | where 1=1 |
| | | <if test="statisticsId !=null and statisticsId != ''"> |
| | | and t.statistics_id= #{statisticsId} |
| | | and t.statistics_id= #{statisticsId} |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询费用月统计数量 add by wuxw 2018-07-03 --> |
| | |
| | | and pfc.config_id= #{configId} |
| | | </if> |
| | | <if test="objId !=null and objId != ''"> |
| | | and t.obj_id= #{objId} |
| | | and pf.payer_obj_id= #{objId} |
| | | </if> |
| | | <if test="feeName !=null and feeName != ''"> |
| | | and t.fee_name= #{feeName} |
| | |
| | | and pfc.config_id= #{configId} |
| | | </if> |
| | | <if test="objId !=null and objId != ''"> |
| | | and t.obj_id= #{objId} |
| | | and pf.payer_obj_id = #{objId} |
| | | </if> |
| | | <if test="feeName !=null and feeName != ''"> |
| | | and t.fee_name= #{feeName} |
| | |
| | | and pfc.config_id= #{configId} |
| | | </if> |
| | | <if test="objId !=null and objId != ''"> |
| | | and t.obj_id= #{objId} |
| | | and pf.payer_obj_id= #{objId} |
| | | </if> |
| | | <if test="feeName !=null and feeName != ''"> |
| | | and t.fee_name= #{feeName} |
| | |
| | | and pfc.config_id= #{configId} |
| | | </if> |
| | | <if test="objId !=null and objId != ''"> |
| | | and t.obj_id= #{objId} |
| | | and pf.payer_obj_id= #{objId} |
| | | </if> |
| | | <if test="feeName !=null and feeName != ''"> |
| | | and t.fee_name= #{feeName} |
| | |
| | | <select id="queryHuaningOweFeeDetailCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from ( |
| | | select t.payer_obj_name payerObjName,br.built_up_area builtUpArea,pfc.square_price squarePrice, t.fee_id feeId,t.end_time startTime,t.deadline_time endTime,t.amount_owed oweAmount |
| | | select t.payer_obj_name payerObjName,br.built_up_area builtUpArea,pfc.square_price squarePrice, t.fee_id |
| | | feeId,t.end_time startTime,t.deadline_time endTime,t.amount_owed oweAmount |
| | | from report_owe_fee t |
| | | left join building_room br on t.payer_obj_id = br.room_id and br.status_cd = '0' |
| | | left join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0' |
| | |
| | | |
| | | <!-- 查询费用月统计信息 add by wuxw 2018-07-03 --> |
| | | <select id="queryHuaningOweFeeDetail" parameterType="Map" resultType="Map"> |
| | | select t.payer_obj_name payerObjName,br.built_up_area builtUpArea,pfc.square_price squarePrice, t.fee_id feeId,t.end_time startTime,t.deadline_time endTime,t.amount_owed oweAmount |
| | | select t.payer_obj_name payerObjName,br.built_up_area builtUpArea,pfc.square_price squarePrice, t.fee_id |
| | | feeId,t.end_time startTime,t.deadline_time endTime,t.amount_owed oweAmount |
| | | from report_owe_fee t |
| | | left join building_room br on t.payer_obj_id = br.room_id and br.status_cd = '0' |
| | | left join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0' |
| | |
| | | resId,t.sh_id_z,t.sh_id_z shIdz,t.res_name,t.res_name resName,t.start_user_id,t.start_user_id |
| | | startUserId,t.sh_id_a,t.sh_id_a shIda,t.start_user_name,t.start_user_name startUserName,asa.state,t.b_id,t.b_id |
| | | bId,t.stock,t.original_stock,t.original_stock originalStock,t.remark,t.create_time createTime,td.name stateName,a.sh_name shaName,z.sh_name shzName, |
| | | rs.res_code,rs.res_code resCode,t.apply_id,t.apply_id applyId,rst.name rstName,rss.spec_name specName,asa.apply_type,asa.apply_type applyType,td1.name applyTypeName |
| | | rs.res_code,rs.res_code resCode,t.apply_id,t.apply_id applyId,rst.name rstName,rss.spec_name specName,asa.apply_type,asa.apply_type applyType,td1.name applyTypeName,td2.name unitCodeName,td3.name miniUnitCodeName |
| | | from allocation_storehouse t |
| | | left join allocation_storehouse_apply asa on asa.apply_id = t.apply_id and asa.status_cd = '0' |
| | | left join t_dict td on asa.state = td.status_cd and td.table_name = 'allocation_storehouse_apply' and td.table_columns = 'state' |
| | |
| | | left join storehouse a on t.sh_id_a = a.sh_id and a.store_id = t.store_id and a.status_cd = '0' |
| | | left join storehouse z on t.sh_id_z = z.sh_id and z.store_id = t.store_id and z.status_cd = '0' |
| | | left join resource_store rs on t.res_id = rs.res_id and rs.status_cd = '0' |
| | | left join t_dict td2 on rs.unit_code = td2.status_cd and td2.table_name = 'resource_store' and td2.table_columns = 'unit_code' |
| | | left join t_dict td3 on rs.mini_unit_code = td3.status_cd and td3.table_name = 'resource_store' and td3.table_columns = 'unit_code' |
| | | left join resource_store_type rst on rs.rst_id = rst.rst_id and rst.status_cd = '0' |
| | | left join resource_store_specification rss on rs.rss_id = rss.rss_id and rss.status_cd = '0' |
| | | where 1 = 1 |
| | |
| | | resId,t.res_name,t.res_name resName,t.start_user_id,t.start_user_id startUserId,t.start_user_name, |
| | | t.start_user_name startUserName,t.aus_id,t.aus_id ausId,t.b_id,t.b_id |
| | | bId,t.stock,t.give_quantity,t.give_quantity giveQuantity,t.create_time createTime,rst.name rstName,rss.spec_name |
| | | specName |
| | | specName,td1.name unitCodeName,td2.name miniUnitCodeName |
| | | from allocation_user_storehouse t |
| | | left join resource_store rs on t.res_id = rs.res_id and rs.status_cd = '0' |
| | | left join resource_store_type rst on rs.rst_id = rst.rst_id and rst.status_cd = '0' |
| | | left join resource_store_specification rss on rs.rss_id=rss.rss_id and rss.status_cd = '0' |
| | | left join t_dict td1 on rs.unit_code = td1.status_cd and td1.table_name = 'resource_store' and td1.table_columns = 'unit_code' |
| | | left join t_dict td2 on rs.mini_unit_code = td2.status_cd and td2.table_name = 'resource_store' and td2.table_columns = 'unit_code' |
| | | where 1 = 1 |
| | | <if test="acceptUserId !=null and acceptUserId != ''"> |
| | | and t.accept_user_id= #{acceptUserId} |
| | |
| | | left join resource_store rs on t.res_id = rs.res_id and rs.status_cd = '0' |
| | | left join resource_store_type rst on rs.rst_id = rst.rst_id and rst.status_cd = '0' |
| | | left join resource_store_specification rss on rs.rss_id=rss.rss_id and rss.status_cd = '0' |
| | | left join t_dict td1 on rs.unit_code = td1.status_cd and td1.table_name = 'resource_store' and td1.table_columns = 'unit_code' |
| | | left join t_dict td2 on rs.mini_unit_code = td2.status_cd and td2.table_name = 'resource_store' and td2.table_columns = 'unit_code' |
| | | where 1 =1 |
| | | <if test="acceptUserId !=null and acceptUserId != ''"> |
| | | and t.accept_user_id= #{acceptUserId} |
| | |
| | | rst.name rstName, |
| | | rss.spec_name specName, |
| | | rs.sh_id shId, |
| | | td4.name unitCodeName, |
| | | td5.name miniUnitCodeName, |
| | | sh.sh_name shName |
| | | from purchase_apply_detail t |
| | | inner join purchase_apply pa on t.apply_order_id = pa.apply_order_id and pa.status_cd = '0' |
| | | left join resource_store rs on rs.res_id = t.res_id and rs.status_cd = '0' |
| | | left join t_dict td4 on rs.unit_code = td4.status_cd and td4.table_name = 'resource_store' and td4.table_columns = 'unit_code' |
| | | left join t_dict td5 on rs.mini_unit_code = td5.status_cd and td5.table_name = 'resource_store' and td5.table_columns = 'unit_code' |
| | | left join storehouse sh on rs.sh_id = sh.sh_id and sh.status_cd = '0' |
| | | left join resource_supplier rsp on rsp.rs_id = t.rs_id |
| | | left join t_dict td1 on pa.res_order_type = td1.status_cd and td1.table_name = 'purchase_apply' and |
| | |
| | | p.res_id resId,p.quantity,p.remark,p.purchase_quantity purchaseQuantity,p.purchase_remark purchaseRemark,p.price |
| | | purchasePrice,p.original_stock originalStock, |
| | | r.res_name resName,r.res_code resCode, |
| | | r.price,r.price standardPrice,r.stock,rst.name rstName,rss.spec_name specName,rs.supplier_name supplierName |
| | | r.price,r.price standardPrice,r.stock,rst.name rstName,rss.spec_name specName,rs.supplier_name supplierName, |
| | | td1.name unitCodeName, |
| | | td2.name miniUnitCodeName |
| | | from |
| | | purchase_apply_detail p inner join resource_store r on p.res_id = r.res_id and r.status_cd = '0' |
| | | purchase_apply_detail p |
| | | inner join resource_store r on p.res_id = r.res_id and r.status_cd = '0' |
| | | left join t_dict td1 on r.unit_code = td1.status_cd and td1.table_name = 'resource_store' and td1.table_columns = 'unit_code' |
| | | left join t_dict td2 on r.mini_unit_code = td2.status_cd and td2.table_name = 'resource_store' and td2.table_columns = 'unit_code' |
| | | LEFT JOIN resource_supplier rs on p.rs_id=rs.rs_id |
| | | LEFT JOIN resource_store_type rst on r.rst_id=rst.rst_id |
| | | LEFT JOIN resource_store_specification rss on r.rss_id=rss.rss_id |
| | |
| | | statusCd,t.remark,t.store_id,t.store_id storeId,t.res_id,t.res_id |
| | | resId,t.resource_store_name,t.resource_store_name resourceStoreName,rs.res_name resName, |
| | | t.b_id,t.b_id bId,t.community_id,t.community_id communityId,t.create_time createTime, rst.name |
| | | rstName,rss.spec_name specName |
| | | rstName,rss.spec_name specName,td1.name unitCodeName,td2.name miniUnitCodeName |
| | | from resource_store_use_record t |
| | | left join resource_store rs on rs.res_id = t.res_id |
| | | left join resource_store_type rst on rs.rst_id = rst.rst_id |
| | | left join resource_store_specification rss on rs.rss_id = rss.rss_id |
| | | left join t_dict td1 on rs.unit_code = td1.status_cd and td1.table_name = 'resource_store' and td1.table_columns = 'unit_code' |
| | | left join t_dict td2 on rs.mini_unit_code = td2.status_cd and td2.table_name = 'resource_store' and td2.table_columns = 'unit_code' |
| | | where 1 = 1 |
| | | <if test="unitPrice !=null and unitPrice != ''"> |
| | | and t.unit_price= #{unitPrice} |
| | |
| | | left join resource_store rs on rs.res_id = t.res_id |
| | | left join resource_store_type rst on rs.rst_id = rst.rst_id |
| | | left join resource_store_specification rss on rs.rss_id = rss.rss_id |
| | | left join t_dict td1 on rs.unit_code = td1.status_cd and td1.table_name = 'resource_store' and td1.table_columns = 'unit_code' |
| | | left join t_dict td2 on rs.mini_unit_code = td2.status_cd and td2.table_name = 'resource_store' and td2.table_columns = 'unit_code' |
| | | where 1 =1 |
| | | <if test="unitPrice !=null and unitPrice != ''"> |
| | | and t.unit_price= #{unitPrice} |
| | |
| | | <select id="getOrgStaffRelInfo" parameterType="Map" resultType="Map"> |
| | | select t.rel_id,t.rel_id relId,t.status_cd,t.status_cd statusCd,t.store_id,t.store_id storeId,t.b_id,t.b_id |
| | | bId,t.org_id,t.org_id orgId,t.staff_id,t.staff_id staffId,t.rel_cd,t.rel_cd relCd,uo.parent_org_id parentOrgId, |
| | | uu.name staffName,uo.org_name departmentName,uo.org_id departmentId,td.`name` relCdName |
| | | uu.name staffName,uo.org_name departmentName,uo.org_id departmentId,td.`name` relCdName,puo.org_name parentOrgName |
| | | from u_org_staff_rel t |
| | | inner join u_org uo on t.org_id = uo.org_id and uo.status_cd = '0' |
| | | inner join u_org puo on uo.parent_org_id = puo.org_id and puo.status_cd = '0' |
| | | inner join u_user uu on t.staff_id = uu.user_id |
| | | left join t_dict td on t.rel_cd = td.status_cd and td.table_name = 'u_org_staff_rel' and td.table_columns = 'rel_cd' |
| | | where 1=1 |
| | |
| | | <if test="roomIds != null "> |
| | | ,building_owner_room_rel borr |
| | | </if> |
| | | where 1 =1 |
| | | where 1 = 1 |
| | | <if test="roomId != null and roomId != ''"> |
| | | and t.owner_id = borr.owner_id |
| | | and borr.status_cd = '0' |
| | | and borr.status_cd = t.status_cd |
| | | and borr.room_id = #{roomId} |
| | | </if> |
| | | <if test="roomIds != null"> |
| | | and t.owner_id = borr.owner_id |
| | | and borr.status_cd = '0' |
| | | and borr.status_cd = t.status_cd |
| | | and borr.room_id in |
| | | <foreach collection="roomIds" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| New file |
| | |
| | | { |
| | | "autoMove": true, |
| | | "id": "ardrId", |
| | | "name": "applyRoomDiscountRecord", |
| | | "desc": "验房记录", |
| | | "shareParam": "communityId", |
| | | "shareColumn": "community_id", |
| | | "shareName": "community", |
| | | "newBusinessTypeCd": "BUSINESS_TYPE_SAVE_APPLY_ROOM_DISCOUNT_RECORD", |
| | | "updateBusinessTypeCd": "BUSINESS_TYPE_UPDATE_APPLY_ROOM_DISCOUNT_RECORD", |
| | | "deleteBusinessTypeCd": "BUSINESS_TYPE_DELETE_APPLY_ROOM_DISCOUNT_RECORD", |
| | | "newBusinessTypeCdValue": "671200030011", |
| | | "updateBusinessTypeCdValue": "671200040011", |
| | | "deleteBusinessTypeCdValue": "671200050011", |
| | | "businessTableName": "business_apply_room_discount_record", |
| | | "tableName": "apply_room_discount_record", |
| | | "param": { |
| | | "ardrId": "ardr_id", |
| | | "ardId": "ard_id", |
| | | "bId": "b_id", |
| | | "communityId": "community_id", |
| | | "createUserId": "create_user_id", |
| | | "createUserName": "create_user_name", |
| | | "statusCd": "status_cd", |
| | | "remark": "remark" |
| | | }, |
| | | "required": [ |
| | | { |
| | | "code": "ardId", |
| | | "msg": "空置房ID不能为空" |
| | | }, |
| | | { |
| | | "code": "communityId", |
| | | "msg": "小区不能为空" |
| | | }, |
| | | { |
| | | "code": "createUserId", |
| | | "msg": "创建人不能为空" |
| | | } |
| | | ] |
| | | } |
| New file |
| | |
| | | package com.java110.intf.community; |
| | | |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.applyRoomDiscountRecord.ApplyRoomDiscountRecordDto; |
| | | import com.java110.po.applyRoomDiscountRecord.ApplyRoomDiscountRecordPo; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName IApplyRoomDiscountRecordInnerServiceSMO |
| | | * @Description 验房记录接口类 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 9:04 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | @FeignClient(name = "community-service", configuration = {FeignConfiguration.class}) |
| | | @RequestMapping("/applyRoomDiscountRecordApi") |
| | | public interface IApplyRoomDiscountRecordInnerServiceSMO { |
| | | |
| | | /** |
| | | * <p>查询小区楼信息</p> |
| | | * |
| | | * |
| | | * @param applyRoomDiscountRecordDto 数据对象分享 |
| | | * @return ApplyRoomDiscountRecordDto 对象数据 |
| | | */ |
| | | @RequestMapping(value = "/queryApplyRoomDiscountRecords", method = RequestMethod.POST) |
| | | List<ApplyRoomDiscountRecordDto> queryApplyRoomDiscountRecords(@RequestBody ApplyRoomDiscountRecordDto applyRoomDiscountRecordDto); |
| | | |
| | | /** |
| | | * <p>查询空置房验房记录(不关联文件表)</p> |
| | | * |
| | | * |
| | | * @param applyRoomDiscountRecordDto 数据对象分享 |
| | | * @return ApplyRoomDiscountRecordDto 对象数据 |
| | | */ |
| | | @RequestMapping(value = "/selectApplyRoomDiscountRecords", method = RequestMethod.POST) |
| | | List<ApplyRoomDiscountRecordDto> selectApplyRoomDiscountRecords(@RequestBody ApplyRoomDiscountRecordDto applyRoomDiscountRecordDto); |
| | | |
| | | /** |
| | | * 查询<p>小区楼</p>总记录数 |
| | | * |
| | | * @param applyRoomDiscountRecordDto 数据对象分享 |
| | | * @return 小区下的小区楼记录数 |
| | | */ |
| | | @RequestMapping(value = "/queryApplyRoomDiscountRecordsCount", method = RequestMethod.POST) |
| | | int queryApplyRoomDiscountRecordsCount(@RequestBody ApplyRoomDiscountRecordDto applyRoomDiscountRecordDto); |
| | | |
| | | /** |
| | | * 查询空置房验房记录数(不关联文件表) |
| | | * |
| | | * @param applyRoomDiscountRecordDto 数据对象分享 |
| | | * @return 记录数 |
| | | */ |
| | | @RequestMapping(value = "/selectApplyRoomDiscountRecordsCount", method = RequestMethod.POST) |
| | | int selectApplyRoomDiscountRecordsCount(@RequestBody ApplyRoomDiscountRecordDto applyRoomDiscountRecordDto); |
| | | |
| | | /** |
| | | * 新增空置房验房记录 |
| | | * |
| | | * @param applyRoomDiscountRecordPo |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/saveApplyRoomDiscountRecord", method = RequestMethod.POST) |
| | | int saveApplyRoomDiscountRecord(@RequestBody ApplyRoomDiscountRecordPo applyRoomDiscountRecordPo); |
| | | |
| | | /** |
| | | * 删除空置房验房记录 |
| | | * |
| | | * @param applyRoomDiscountRecordPo |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/deleteApplyRoomDiscountRecord", method = RequestMethod.POST) |
| | | int deleteApplyRoomDiscountRecord(@RequestBody ApplyRoomDiscountRecordPo applyRoomDiscountRecordPo); |
| | | } |
| | |
| | | */ |
| | | public static final String BUSINESS_TYPE_DELETE_RESOURCE_STORE_SPECIFICATION="671100050011"; |
| | | |
| | | |
| | | /** |
| | | * 删除工作流节点 处理员工 |
| | | */ |
| | | public static final String BUSINESS_TYPE_SAVE_APPLY_ROOM_DISCOUNT_RECORD="671200030011"; |
| | | |
| | | /** |
| | | * 修改工作流节点 处理员工 |
| | | * 3保存 |
| | | */ |
| | | public static final String BUSINESS_TYPE_UPDATE_APPLY_ROOM_DISCOUNT_RECORD="671200040011"; |
| | | |
| | | /** |
| | | * 修改工作流节点 处理员工 |
| | | * 3保存 |
| | | */ |
| | | public static final String BUSINESS_TYPE_DELETE_APPLY_ROOM_DISCOUNT_RECORD="671200050011"; |
| | | |
| | | /** |
| | | * 删除工作流节点 处理员工 |
| | | */ |
| New file |
| | |
| | | package com.java110.utils.constant; |
| | | |
| | | /** |
| | | * 验房记录常量类 |
| | | * Created by wuxw on 2017/5/20. |
| | | */ |
| | | public class ServiceCodeApplyRoomDiscountRecordConstant { |
| | | |
| | | /** |
| | | * 添加 验房记录 |
| | | */ |
| | | public static final String ADD_APPLYROOMDISCOUNTRECORD = "applyRoomDiscountRecord.saveApplyRoomDiscountRecord"; |
| | | |
| | | |
| | | /** |
| | | * 修改 验房记录 |
| | | */ |
| | | public static final String UPDATE_APPLYROOMDISCOUNTRECORD = "applyRoomDiscountRecord.updateApplyRoomDiscountRecord"; |
| | | /** |
| | | * 删除 验房记录 |
| | | */ |
| | | public static final String DELETE_APPLYROOMDISCOUNTRECORD = "applyRoomDiscountRecord.deleteApplyRoomDiscountRecord"; |
| | | |
| | | |
| | | /** |
| | | * 查询 验房记录 |
| | | */ |
| | | public static final String LIST_APPLYROOMDISCOUNTRECORDS = "applyRoomDiscountRecord.listApplyRoomDiscountRecords"; |
| | | |
| | | |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.acct.bmo.account.IGetAccountBMO; |
| | | import com.java110.acct.bmo.account.IOwnerPrestoreAccountBMO; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.account.AccountDto; |
| | | import com.java110.dto.accountDetail.AccountDetailDto; |
| | | import com.java110.dto.fee.FeeDto; |
| | | import com.java110.dto.owner.OwnerCarDto; |
| | | import com.java110.dto.owner.OwnerDto; |
| | | import com.java110.dto.owner.OwnerRoomRelDto; |
| | | import com.java110.intf.fee.IFeeInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerCarInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerRoomRelInnerServiceSMO; |
| | | import com.java110.po.accountDetail.AccountDetailPo; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.StringUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName AccountApi |
| | |
| | | |
| | | @Autowired |
| | | private IOwnerPrestoreAccountBMO ownerPrestoreAccountBMOImpl; |
| | | |
| | | @Autowired |
| | | private IFeeInnerServiceSMO feeInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOwnerRoomRelInnerServiceSMO ownerRoomRelInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOwnerCarInnerServiceSMO ownerCarInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * 微信删除消息模板 |
| | |
| | | @RequestMapping(value = "/queryOwnerAccount", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryOwnerAccount( |
| | | @RequestParam(value = "communityId") String communityId, |
| | | @RequestParam(value = "ownerId",required = false) String ownerId, |
| | | @RequestParam(value = "ownerName",required = false) String ownerName, |
| | | @RequestParam(value = "tel",required = false) String tel, |
| | | @RequestParam(value = "idCard",required = false) String idCard, |
| | | @RequestParam(value = "ownerId", required = false) String ownerId, |
| | | @RequestParam(value = "ownerName", required = false) String ownerName, |
| | | @RequestParam(value = "feeId", required = false) String feeId, |
| | | @RequestParam(value = "tel", required = false) String tel, |
| | | @RequestParam(value = "idCard", required = false) String idCard, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | AccountDto accountDto = new AccountDto(); |
| | | accountDto.setPage(page); |
| | | accountDto.setRow(row); |
| | | accountDto.setObjId(ownerId); |
| | | if (!StringUtil.isEmpty(feeId)) { |
| | | FeeDto feeDto = new FeeDto(); |
| | | feeDto.setFeeId(feeId); |
| | | List<FeeDto> feeDtos = feeInnerServiceSMOImpl.queryFees(feeDto); |
| | | Assert.listOnlyOne(feeDtos, "查询费用信息错误!"); |
| | | //获取付费对象类型(3333 房屋 6666 是车位) |
| | | String payerObjType = feeDtos.get(0).getPayerObjType(); |
| | | //获取付费对象id |
| | | String payerObjId = feeDtos.get(0).getPayerObjId(); |
| | | if (!StringUtil.isEmpty(payerObjType) && payerObjType.equals("3333")) { //房屋 |
| | | OwnerRoomRelDto ownerRoomRelDto = new OwnerRoomRelDto(); |
| | | ownerRoomRelDto.setRoomId(payerObjId); |
| | | List<OwnerRoomRelDto> ownerRoomRelDtos = ownerRoomRelInnerServiceSMOImpl.queryOwnerRoomRels(ownerRoomRelDto); |
| | | Assert.listOnlyOne(ownerRoomRelDtos, "查询业主房屋关系表错误!"); |
| | | ownerId = ownerRoomRelDtos.get(0).getOwnerId(); |
| | | } else if (!StringUtil.isEmpty(payerObjType) && payerObjType.equals("6666")) { |
| | | OwnerCarDto ownerCarDto = new OwnerCarDto(); |
| | | ownerCarDto.setCarId(payerObjId); |
| | | List<OwnerCarDto> ownerCarDtos = ownerCarInnerServiceSMOImpl.queryOwnerCars(ownerCarDto); |
| | | Assert.listOnlyOne(ownerCarDtos, "查询业主车辆关系表错误!"); |
| | | ownerId = ownerCarDtos.get(0).getOwnerId(); |
| | | } |
| | | accountDto.setObjId(ownerId); |
| | | } else { |
| | | accountDto.setObjId(ownerId); |
| | | } |
| | | accountDto.setObjType(AccountDto.OBJ_TYPE_PERSON); |
| | | accountDto.setAcctName(ownerName); |
| | | accountDto.setPartId(communityId); |
| | |
| | | ownerDto.setCommunityId(communityId); |
| | | ownerDto.setLink(tel); |
| | | ownerDto.setIdCard(idCard); |
| | | return getAccountBMOImpl.queryOwnerAccount(accountDto,ownerDto); |
| | | return getAccountBMOImpl.queryOwnerAccount(accountDto, ownerDto); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @RequestMapping(value = "/queryOwnerAccountDetail", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryOwnerAccountDetail(@RequestParam(value = "objId", required = false) String objId, |
| | | @RequestParam(value = "acctId", required = false) String acctId, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | @RequestParam(value = "acctId", required = false) String acctId, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | AccountDetailDto accountDto = new AccountDetailDto(); |
| | | accountDto.setPage(page); |
| | | accountDto.setRow(row); |
| | |
| | | accountDetailPo.setRemark(reqJson.getString("remark")); |
| | | accountDetailPo.setObjId(reqJson.getString("ownerId")); |
| | | accountDetailPo.setAmount(reqJson.getString("amount")); |
| | | return ownerPrestoreAccountBMOImpl.prestore(accountDetailPo,reqJson); |
| | | return ownerPrestoreAccountBMOImpl.prestore(accountDetailPo, reqJson); |
| | | } |
| | | } |
| | |
| | | import com.java110.po.accountDetail.AccountDetailPo; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | |
| | | List<AccountDto> accountDtos = accountInnerServiceSMOImpl.queryAccounts(accountDto); |
| | | if (accountDtos == null || accountDtos.size() < 1) { |
| | | accountDto = addAccountDto(reqJson); |
| | | //保存交易明细 |
| | | AccountDetailPo accountDetail = BeanConvertUtil.covertBean(accountDetailPo, AccountDetailPo.class); |
| | | accountDetail.setOrderId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_orderId)); |
| | | accountDetail.setAcctId(accountDto.getAcctId()); |
| | | accountDetail.setObjType(AccountDetailDto.ORDER_TYPE_USER); |
| | | accountDetail.setDetailType(AccountDetailDto.DETAIL_TYPE_IN); |
| | | if (StringUtil.isEmpty(accountDetail.getDetailId())) { |
| | | accountDetail.setDetailId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_detailId)); |
| | | } |
| | | if (StringUtil.isEmpty(accountDetail.getRelAcctId())) { |
| | | accountDetail.setRelAcctId("-1"); |
| | | } |
| | | accountDetailInnerServiceSMOImpl.saveAccountDetails(accountDetail); |
| | | } else { |
| | | accountDto = accountDtos.get(0); |
| | | } |
| | | accountDetailPo.setOrderId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_orderId)); |
| | | accountDetailPo.setAcctId(accountDto.getAcctId()); |
| | | accountDetailPo.setObjType(AccountDetailDto.ORDER_TYPE_USER); |
| | | |
| | | int flag = accountInnerServiceSMOImpl.prestoreAccount(accountDetailPo); |
| | | if (flag < 1) { |
| | | return ResultVo.error("预存失败"); |
| | | accountDetailPo.setOrderId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_orderId)); |
| | | accountDetailPo.setAcctId(accountDto.getAcctId()); |
| | | accountDetailPo.setObjType(AccountDetailDto.ORDER_TYPE_USER); |
| | | int flag = accountInnerServiceSMOImpl.prestoreAccount(accountDetailPo); |
| | | if (flag < 1) { |
| | | return ResultVo.error("预存失败"); |
| | | } |
| | | } |
| | | return ResultVo.success(); |
| | | } |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.acct.dao.IAccountServiceDao; |
| | | import com.java110.dto.account.AccountDto; |
| | | import com.java110.dto.accountDetail.AccountDetailDto; |
| | | import com.java110.po.account.AccountPo; |
| | | import com.java110.po.accountDetail.AccountDetailPo; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.StatusConstant; |
| | | import com.java110.utils.lock.DistributedLock; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.acct.dao.IAccountDetailServiceDao; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.entity.center.Business; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | |
| | | @Autowired |
| | | private IAccountDetailServiceDao accountDetailServiceDaoImpl; |
| | | |
| | | @Autowired |
| | | private IAccountServiceDao accountServiceDaoImpl; |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | |
| | | if(businessAccountDetailInfo.size() == 1) { |
| | | dataFlowContext.addParamOut("detailId", businessAccountDetailInfo.get(0).get("detail_id")); |
| | | } |
| | | } |
| | | |
| | | //修改账户信息 |
| | | //开始枷锁 |
| | | String requestId = DistributedLock.getLockUUID(); |
| | | String key = businessAccountDetailInfo.get(0).get("acctId").toString(); |
| | | int flag = 0; |
| | | String detailType = ""; |
| | | try { |
| | | DistributedLock.waitGetDistributedLock(key, requestId); |
| | | AccountDto accountDto = new AccountDto(); |
| | | accountDto.setObjId(businessAccountDetailInfo.get(0).get("objId").toString()); |
| | | accountDto.setAcctId(businessAccountDetailInfo.get(0).get("acctId").toString()); |
| | | List<AccountDto> accounts = BeanConvertUtil.covertBeanList(accountServiceDaoImpl.getAccountInfo(BeanConvertUtil.beanCovertMap(accountDto)), AccountDto.class); |
| | | if (accounts == null || accounts.size() < 1) { |
| | | throw new IllegalArgumentException("账户不存在"); |
| | | } |
| | | //在账户增加 |
| | | double amount = Double.parseDouble(accounts.get(0).getAmount()); |
| | | BigDecimal amountBig = new BigDecimal(amount); |
| | | detailType = businessAccountDetailInfo.get(0).get("detailType").toString(); |
| | | if(AccountDetailDto.DETAIL_TYPE_IN.equals(detailType)) { |
| | | amount = amountBig.add(new BigDecimal(businessAccountDetailInfo.get(0).get("amount").toString())).doubleValue(); |
| | | }else{ |
| | | amount = amountBig.subtract(new BigDecimal(businessAccountDetailInfo.get(0).get("amount").toString())).doubleValue(); |
| | | } |
| | | AccountPo accountPo = new AccountPo(); |
| | | accountPo.setObjId(businessAccountDetailInfo.get(0).get("objId").toString()); |
| | | accountPo.setAcctId(businessAccountDetailInfo.get(0).get("acctId").toString()); |
| | | accountPo.setAmount(amount + ""); |
| | | flag = accountServiceDaoImpl.updateAccount(BeanConvertUtil.beanCovertMap(accountPo)); |
| | | if (flag < 1) { |
| | | throw new IllegalArgumentException("更新账户失败"); |
| | | } |
| | | } finally { |
| | | DistributedLock.releaseDistributedLock(requestId, key); |
| | | } |
| | | } |
| | | |
| | |
| | | accountDetailServiceDaoImpl.saveBusinessAccountDetailInfo(businessAccountDetail); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public IAccountDetailServiceDao getAccountDetailServiceDaoImpl() { |
| | | return accountDetailServiceDaoImpl; |
| | |
| | | */ |
| | | void deleteAccountDetail(JSONObject paramInJson, DataFlowContext dataFlowContext); |
| | | |
| | | |
| | | |
| | | /** |
| | | * 账户处理 |
| | | * @param paramObj |
| | | * @param dataFlowContext |
| | | */ |
| | | void dealAccount(JSONObject paramObj, DataFlowContext dataFlowContext); |
| | | } |
| | |
| | | import com.java110.api.bmo.ApiBaseBMO; |
| | | import com.java110.api.bmo.account.IAccountDetailBMO; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.account.AccountDto; |
| | | import com.java110.dto.accountDetail.AccountDetailDto; |
| | | import com.java110.intf.acct.IAccountDetailInnerServiceSMO; |
| | | import com.java110.intf.acct.IAccountInnerServiceSMO; |
| | | import com.java110.po.accountDetail.AccountDetailPo; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Service("accountDetailBMOImpl") |
| | | public class AccountDetailBMOImpl extends ApiBaseBMO implements IAccountDetailBMO { |
| | | |
| | | @Autowired |
| | | private IAccountDetailInnerServiceSMO accountDetailInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IAccountInnerServiceSMO accountInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * 添加小区信息 |
| | |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | public void addAccountDetail(JSONObject paramInJson, DataFlowContext dataFlowContext) { |
| | | |
| | | paramInJson.put("detailId", "-1"); |
| | | AccountDetailPo accountDetailPo = BeanConvertUtil.covertBean(paramInJson, AccountDetailPo.class); |
| | | super.insert(dataFlowContext, accountDetailPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_ACCT_DETAIL); |
| | |
| | | super.update(dataFlowContext, accountDetailPo, BusinessTypeConstant.BUSINESS_TYPE_DELETE_ACCT_DETAIL); |
| | | } |
| | | |
| | | @Override |
| | | public void dealAccount(JSONObject paramObj, DataFlowContext dataFlowContext) { |
| | | //账户金额 |
| | | double deductionAmount = paramObj.getDouble("deductionAmount"); //抵扣金额 |
| | | double redepositAmount = paramObj.getDouble("redepositAmount"); //转存金额 |
| | | |
| | | if (deductionAmount == 0 || redepositAmount == 0) { //抵扣金额 |
| | | return; |
| | | } |
| | | String acctId = paramObj.getString("acctId"); |
| | | if (StringUtil.isEmpty(acctId)) { |
| | | throw new IllegalArgumentException("账户id为空!"); |
| | | } |
| | | AccountDto accountDto = new AccountDto(); |
| | | accountDto.setAcctId(acctId); |
| | | //查询账户金额 |
| | | List<AccountDto> accountDtos = accountInnerServiceSMOImpl.queryAccounts(accountDto); |
| | | Assert.listOnlyOne(accountDtos, "查询账户金额错误!"); |
| | | //获取金额 |
| | | double amount = Double.parseDouble(accountDtos.get(0).getAmount()); |
| | | |
| | | if (amount < deductionAmount && deductionAmount > 0) { |
| | | throw new IllegalArgumentException("余额不足"); |
| | | } |
| | | |
| | | AccountDetailPo accountDetailPo = new AccountDetailPo(); |
| | | accountDetailPo.setDetailId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_detailId)); |
| | | if (deductionAmount > 0) { |
| | | //accountDetailPo.setAmount((deductionAmount * -1) + ""); |
| | | accountDetailPo.setAmount(deductionAmount + ""); |
| | | accountDetailPo.setDetailType(AccountDetailDto.DETAIL_TYPE_OUT); |
| | | accountDetailPo.setRemark("前台缴费扣款"); |
| | | } else { |
| | | accountDetailPo.setAmount(redepositAmount + ""); |
| | | accountDetailPo.setDetailType(AccountDetailDto.DETAIL_TYPE_IN); |
| | | accountDetailPo.setRemark("前台缴费预存"); |
| | | } |
| | | accountDetailPo.setOrderId("-1"); |
| | | accountDetailPo.setObjType(accountDtos.get(0).getObjType()); |
| | | accountDetailPo.setObjId(accountDtos.get(0).getObjId()); |
| | | accountDetailPo.setAcctId(accountDtos.get(0).getAcctId()); |
| | | accountDetailPo.setRelAcctId("-1"); |
| | | super.insert(dataFlowContext, accountDetailPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_ACCT_DETAIL); |
| | | |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.api.bmo.applyRoomDiscountRecord; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.bmo.IApiBaseBMO; |
| | | import com.java110.core.context.DataFlowContext; |
| | | |
| | | public interface IApplyRoomDiscountRecordBMO extends IApiBaseBMO { |
| | | |
| | | |
| | | /** |
| | | * 添加验房记录 |
| | | * @param paramInJson |
| | | * @param dataFlowContext |
| | | * @return |
| | | */ |
| | | void addApplyRoomDiscountRecord(JSONObject paramInJson, DataFlowContext dataFlowContext); |
| | | |
| | | /** |
| | | * 添加验房记录信息 |
| | | * |
| | | * @param paramInJson 接口调用放传入入参 |
| | | * @param dataFlowContext 数据上下文 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | void updateApplyRoomDiscountRecord(JSONObject paramInJson, DataFlowContext dataFlowContext); |
| | | |
| | | /** |
| | | * 删除验房记录 |
| | | * |
| | | * @param paramInJson 接口调用放传入入参 |
| | | * @param dataFlowContext 数据上下文 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | void deleteApplyRoomDiscountRecord(JSONObject paramInJson, DataFlowContext dataFlowContext); |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.api.bmo.applyRoomDiscountRecord.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.bmo.ApiBaseBMO; |
| | | import com.java110.api.bmo.applyRoomDiscountRecord.IApplyRoomDiscountRecordBMO; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.intf.community.IApplyRoomDiscountRecordInnerServiceSMO; |
| | | import com.java110.po.applyRoomDiscountRecord.ApplyRoomDiscountRecordPo; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | |
| | | @Service("applyRoomDiscountRecordBMOImpl") |
| | | public class ApplyRoomDiscountRecordBMOImpl extends ApiBaseBMO implements IApplyRoomDiscountRecordBMO { |
| | | |
| | | @Autowired |
| | | private IApplyRoomDiscountRecordInnerServiceSMO applyRoomDiscountRecordInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * 添加小区信息 |
| | | * |
| | | * @param paramInJson 接口调用放传入入参 |
| | | * @param dataFlowContext 数据上下文 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | public void addApplyRoomDiscountRecord(JSONObject paramInJson, DataFlowContext dataFlowContext) { |
| | | |
| | | paramInJson.put("ardrId", "-1"); |
| | | ApplyRoomDiscountRecordPo applyRoomDiscountRecordPo = BeanConvertUtil.covertBean(paramInJson, ApplyRoomDiscountRecordPo.class); |
| | | super.insert(dataFlowContext, applyRoomDiscountRecordPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_APPLY_ROOM_DISCOUNT_RECORD); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 添加活动信息 |
| | | * |
| | | * @param paramInJson 接口调用放传入入参 |
| | | * @param dataFlowContext 数据上下文 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | public void updateApplyRoomDiscountRecord(JSONObject paramInJson, DataFlowContext dataFlowContext) { |
| | | ApplyRoomDiscountRecordPo applyRoomDiscountRecordPo = BeanConvertUtil.covertBean(paramInJson, ApplyRoomDiscountRecordPo.class); |
| | | super.update(dataFlowContext, applyRoomDiscountRecordPo, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_APPLY_ROOM_DISCOUNT_RECORD); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 添加小区信息 |
| | | * |
| | | * @param paramInJson 接口调用放传入入参 |
| | | * @param dataFlowContext 数据上下文 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | public void deleteApplyRoomDiscountRecord(JSONObject paramInJson, DataFlowContext dataFlowContext) { |
| | | |
| | | ApplyRoomDiscountRecordPo applyRoomDiscountRecordPo = BeanConvertUtil.covertBean(paramInJson, ApplyRoomDiscountRecordPo.class); |
| | | super.update(dataFlowContext, applyRoomDiscountRecordPo, BusinessTypeConstant.BUSINESS_TYPE_DELETE_APPLY_ROOM_DISCOUNT_RECORD); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | public void updateShellRoom(JSONObject paramInJson, DataFlowContext dataFlowContext) { |
| | | |
| | | //获取房屋状态 |
| | | String state = paramInJson.getString("state"); |
| | | if (!StringUtil.isEmpty(paramInJson.getString("startTime")) && !StringUtil.isEmpty(state) && state.equals("2006")) { |
| | | String startTime = paramInJson.getString("startTime"); |
| | | paramInJson.put("startTime", startTime + " 00:00:00"); |
| | | } |
| | | if (!StringUtil.isEmpty(paramInJson.getString("endTime")) && !StringUtil.isEmpty(state) && state.equals("2006")) { |
| | | String endTime = paramInJson.getString("endTime"); |
| | | paramInJson.put("endTime", endTime + " 23:59:59"); |
| | | } |
| | | JSONObject businessUnit = new JSONObject(); |
| | | businessUnit.putAll(paramInJson); |
| | | businessUnit.put("userId", dataFlowContext.getRequestCurrentHeaders().get(CommonConstant.HTTP_USER_ID)); |
| | |
| | | * @param event 事件对象 |
| | | * @param reqJson 请求报文数据 |
| | | */ |
| | | protected abstract void validate(ServiceDataFlowEvent event, JSONObject reqJson); |
| | | protected abstract void validate(ServiceDataFlowEvent event, JSONObject reqJson) throws ParseException; |
| | | |
| | | |
| | | /** |
| New file |
| | |
| | | package com.java110.api.listener.applyRoomDiscountRecord; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.bmo.applyRoomDiscountRecord.IApplyRoomDiscountRecordBMO; |
| | | import com.java110.api.listener.AbstractServiceApiPlusListener; |
| | | import com.java110.core.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.utils.constant.ServiceCodeApplyRoomDiscountRecordConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpMethod; |
| | | |
| | | |
| | | /** |
| | | * 保存小区侦听 |
| | | * add by wuxw 2019-06-30 |
| | | */ |
| | | @Java110Listener("deleteApplyRoomDiscountRecordListener") |
| | | public class DeleteApplyRoomDiscountRecordListener extends AbstractServiceApiPlusListener { |
| | | |
| | | @Autowired |
| | | private IApplyRoomDiscountRecordBMO applyRoomDiscountRecordBMOImpl; |
| | | |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | | //Assert.hasKeyAndValue(reqJson, "xxx", "xxx"); |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "ardrId", "ardrId不能为空"); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) { |
| | | |
| | | applyRoomDiscountRecordBMOImpl.deleteApplyRoomDiscountRecord(reqJson, context); |
| | | } |
| | | |
| | | @Override |
| | | public String getServiceCode() { |
| | | return ServiceCodeApplyRoomDiscountRecordConstant.DELETE_APPLYROOMDISCOUNTRECORD; |
| | | } |
| | | |
| | | @Override |
| | | public HttpMethod getHttpMethod() { |
| | | return HttpMethod.POST; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.api.listener.applyRoomDiscountRecord; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.listener.AbstractServiceApiListener; |
| | | import com.java110.core.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.dto.applyRoomDiscountRecord.ApplyRoomDiscountRecordDto; |
| | | import com.java110.intf.community.IApplyRoomDiscountRecordInnerServiceSMO; |
| | | import com.java110.utils.constant.ServiceCodeApplyRoomDiscountRecordConstant; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 查询小区侦听类 |
| | | */ |
| | | @Java110Listener("listApplyRoomDiscountRecordsListener") |
| | | public class ListApplyRoomDiscountRecordsListener extends AbstractServiceApiListener { |
| | | |
| | | @Autowired |
| | | private IApplyRoomDiscountRecordInnerServiceSMO applyRoomDiscountRecordInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public String getServiceCode() { |
| | | return ServiceCodeApplyRoomDiscountRecordConstant.LIST_APPLYROOMDISCOUNTRECORDS; |
| | | } |
| | | |
| | | @Override |
| | | public HttpMethod getHttpMethod() { |
| | | return HttpMethod.GET; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return DEFAULT_ORDER; |
| | | } |
| | | |
| | | |
| | | public IApplyRoomDiscountRecordInnerServiceSMO getApplyRoomDiscountRecordInnerServiceSMOImpl() { |
| | | return applyRoomDiscountRecordInnerServiceSMOImpl; |
| | | } |
| | | |
| | | public void setApplyRoomDiscountRecordInnerServiceSMOImpl(IApplyRoomDiscountRecordInnerServiceSMO applyRoomDiscountRecordInnerServiceSMOImpl) { |
| | | this.applyRoomDiscountRecordInnerServiceSMOImpl = applyRoomDiscountRecordInnerServiceSMOImpl; |
| | | } |
| | | |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | | super.validatePageInfo(reqJson); |
| | | } |
| | | |
| | | @Override |
| | | protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) { |
| | | |
| | | ApplyRoomDiscountRecordDto applyRoomDiscountRecordDto = BeanConvertUtil.covertBean(reqJson, ApplyRoomDiscountRecordDto.class); |
| | | |
| | | int count = applyRoomDiscountRecordInnerServiceSMOImpl.queryApplyRoomDiscountRecordsCount(applyRoomDiscountRecordDto); |
| | | |
| | | List<ApplyRoomDiscountRecordDto> applyRoomDiscountRecordDtos = null; |
| | | |
| | | if (count > 0) { |
| | | applyRoomDiscountRecordDtos = applyRoomDiscountRecordInnerServiceSMOImpl.queryApplyRoomDiscountRecords(applyRoomDiscountRecordDto); |
| | | } else { |
| | | applyRoomDiscountRecordDtos = new ArrayList<>(); |
| | | } |
| | | |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, applyRoomDiscountRecordDtos); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | | context.setResponseEntity(responseEntity); |
| | | |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.api.listener.applyRoomDiscountRecord; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.bmo.applyRoomDiscountRecord.IApplyRoomDiscountRecordBMO; |
| | | import com.java110.api.listener.AbstractServiceApiPlusListener; |
| | | import com.java110.core.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.utils.constant.ServiceCodeApplyRoomDiscountRecordConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpMethod; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | |
| | | /** |
| | | * 保存商户侦听 |
| | | * add by wuxw 2019-06-30 |
| | | */ |
| | | @Java110Listener("saveApplyRoomDiscountRecordListener") |
| | | public class SaveApplyRoomDiscountRecordListener extends AbstractServiceApiPlusListener { |
| | | |
| | | @Autowired |
| | | private IApplyRoomDiscountRecordBMO applyRoomDiscountRecordBMOImpl; |
| | | |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | | //Assert.hasKeyAndValue(reqJson, "xxx", "xxx"); |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "ardId", "请求报文中未包含ardId"); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId"); |
| | | Assert.hasKeyAndValue(reqJson, "createUserId", "请求报文中未包含createUserId"); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) { |
| | | applyRoomDiscountRecordBMOImpl.addApplyRoomDiscountRecord(reqJson, context); |
| | | } |
| | | |
| | | @Override |
| | | public String getServiceCode() { |
| | | return ServiceCodeApplyRoomDiscountRecordConstant.ADD_APPLYROOMDISCOUNTRECORD; |
| | | } |
| | | |
| | | @Override |
| | | public HttpMethod getHttpMethod() { |
| | | return HttpMethod.POST; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.api.listener.applyRoomDiscountRecord; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.bmo.applyRoomDiscountRecord.IApplyRoomDiscountRecordBMO; |
| | | import com.java110.api.listener.AbstractServiceApiPlusListener; |
| | | import com.java110.core.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.utils.constant.ServiceCodeApplyRoomDiscountRecordConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpMethod; |
| | | |
| | | /** |
| | | * 保存验房记录侦听 |
| | | * add by wuxw 2019-06-30 |
| | | */ |
| | | @Java110Listener("updateApplyRoomDiscountRecordListener") |
| | | public class UpdateApplyRoomDiscountRecordListener extends AbstractServiceApiPlusListener { |
| | | |
| | | @Autowired |
| | | private IApplyRoomDiscountRecordBMO applyRoomDiscountRecordBMOImpl; |
| | | |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "ardrId", "ardrId不能为空"); |
| | | Assert.hasKeyAndValue(reqJson, "ardId", "请求报文中未包含ardId"); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId"); |
| | | Assert.hasKeyAndValue(reqJson, "createUserId", "请求报文中未包含createUserId"); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) { |
| | | |
| | | applyRoomDiscountRecordBMOImpl.updateApplyRoomDiscountRecord(reqJson, context); |
| | | } |
| | | |
| | | @Override |
| | | public String getServiceCode() { |
| | | return ServiceCodeApplyRoomDiscountRecordConstant.UPDATE_APPLYROOMDISCOUNTRECORD; |
| | | } |
| | | |
| | | @Override |
| | | public HttpMethod getHttpMethod() { |
| | | return HttpMethod.POST; |
| | | } |
| | | } |
| | |
| | | auditUser.setPage(reqJson.getInteger("page")); |
| | | auditUser.setRow(reqJson.getInteger("row")); |
| | | auditUser.setStoreId(reqJson.getString("storeId")); |
| | | auditUser.setCommunityId(reqJson.getString("communityId")); |
| | | |
| | | long count = goodCollectionUserInnerServiceSMOImpl.getUserHistoryTaskCount(auditUser); |
| | | //领用已办(默认只查询和当前登录用户相关并且是参与流程审批或者自己提交已经结束的审批数据) |
| | |
| | | import com.java110.intf.common.IWorkflowInnerServiceSMO; |
| | | import com.java110.po.workflow.WorkflowPo; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.CommonConstant; |
| | | import com.java110.utils.constant.ServiceCodeConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | workflowPo.setSkipLevel(WorkflowDto.DEFAULT_SKIP_LEVEL); |
| | | workflowPo.setStoreId(reqJson.getString("storeId")); |
| | | super.insert(context, workflowPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_WORKFLOW); |
| | | |
| | | WorkflowPo workflowPo1 = null; |
| | | workflowPo1 = new WorkflowPo(); |
| | | workflowPo1.setCommunityId(reqJson.getString("communityId")); |
| | | workflowPo1.setFlowId("-2"); |
| | | workflowPo1.setFlowName("物品领用"); |
| | | workflowPo1.setFlowType(WorkflowDto.FLOW_TYPE_COLLECTION); |
| | | workflowPo1.setSkipLevel(WorkflowDto.DEFAULT_SKIP_LEVEL); |
| | | workflowPo1.setStoreId(reqJson.getString("storeId")); |
| | | super.insert(context, workflowPo1, BusinessTypeConstant.BUSINESS_TYPE_SAVE_WORKFLOW); |
| | | |
| | | WorkflowPo workflowPo2 = new WorkflowPo(); |
| | | workflowPo2.setCommunityId(reqJson.getString("communityId")); //被调拨小区 |
| | | workflowPo2.setFlowId("-5"); |
| | | workflowPo2.setFlowName("物品被调拨"); |
| | | workflowPo2.setFlowType(WorkflowDto.FLOW_TYPE_ALLOCATION_STOREHOUSE_GO); |
| | | workflowPo2.setSkipLevel(WorkflowDto.DEFAULT_SKIP_LEVEL); |
| | | workflowPo2.setStoreId(reqJson.getString("storeId")); |
| | | super.insert(context, workflowPo2, BusinessTypeConstant.BUSINESS_TYPE_SAVE_WORKFLOW); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | refreshRoomOwners(userId, reqJson.getString("communityId"), roomDtoList, flag); |
| | | |
| | | apiRoomVo.setRooms(BeanConvertUtil.covertBeanList(roomDtoList, ApiRoomDataVo.class)); |
| | | } else { |
| | | throw new IllegalArgumentException("查询业主房屋错误!"); |
| | | } |
| | | int row = reqJson.getInteger("row"); |
| | | apiRoomVo.setRecords((int) Math.ceil((double) total / (double) row)); |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.api.bmo.account.IAccountBMO; |
| | | import com.java110.api.bmo.account.IAccountDetailBMO; |
| | | import com.java110.api.bmo.fee.IFeeBMO; |
| | | import com.java110.api.bmo.payFeeDetailDiscount.IPayFeeDetailDiscountBMO; |
| | | import com.java110.api.listener.AbstractServiceApiDataFlowListener; |
| | |
| | | import com.java110.dto.repair.RepairDto; |
| | | import com.java110.dto.repair.RepairUserDto; |
| | | import com.java110.entity.center.AppService; |
| | | import com.java110.intf.acct.IAccountInnerServiceSMO; |
| | | import com.java110.intf.community.IParkingSpaceInnerServiceSMO; |
| | | import com.java110.intf.community.IRepairInnerServiceSMO; |
| | | import com.java110.intf.community.IRepairUserInnerServiceSMO; |
| | |
| | | private IPayFeeDetailDiscountBMO payFeeDetailDiscountBMOImpl; |
| | | |
| | | @Autowired |
| | | private IAccountBMO accountBMOImpl; |
| | | |
| | | @Autowired |
| | | private IFeeReceiptDetailInnerServiceSMO feeReceiptDetailInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | |
| | | |
| | | @Autowired |
| | | private IParkingSpaceInnerServiceSMO parkingSpaceInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IAccountDetailBMO accountDetailBMOImpl; |
| | | |
| | | |
| | | |
| | | @Override |
| | | public String getServiceCode() { |
| | |
| | | businesses.add(feeBMOImpl.addFeeDetail(paramObj, dataFlowContext, feeReceiptDetailPo, feeReceiptPo)); |
| | | businesses.add(feeBMOImpl.modifyFee(paramObj, dataFlowContext)); |
| | | |
| | | //账户处理 |
| | | accountDetailBMOImpl.dealAccount(paramObj, dataFlowContext); |
| | | |
| | | |
| | | //折扣管理 |
| | | if (paramObj.containsKey("selectDiscount")) { |
| | | JSONObject discountBusiness = null; |
| | |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.app.AppDto; |
| | | import com.java110.dto.fee.FeeAttrDto; |
| | | import com.java110.dto.feeReceipt.FeeReceiptDetailDto; |
| | | import com.java110.dto.repair.RepairDto; |
| | | import com.java110.dto.repair.RepairUserDto; |
| | | import com.java110.entity.center.AppService; |
| | | import com.java110.intf.community.IParkingSpaceInnerServiceSMO; |
| | | import com.java110.intf.community.IRepairInnerServiceSMO; |
| | | import com.java110.intf.community.IRepairUserInnerServiceSMO; |
| | | import com.java110.intf.community.IRoomInnerServiceSMO; |
| | | import com.java110.intf.fee.*; |
| | | import com.java110.intf.user.IOwnerCarInnerServiceSMO; |
| | | import com.java110.po.feeReceipt.FeeReceiptPo; |
| | | import com.java110.po.feeReceiptDetail.FeeReceiptDetailPo; |
| | | import com.java110.po.owner.RepairPoolPo; |
| | | import com.java110.po.owner.RepairUserPo; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.CommonConstant; |
| | | import com.java110.utils.constant.ServiceCodeConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.slf4j.Logger; |
| | |
| | | private IFeeConfigInnerServiceSMO feeConfigInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOwnerCarInnerServiceSMO ownerCarInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFeeReceiptInnerServiceSMO feeReceiptInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFeeReceiptDetailInnerServiceSMO feeReceiptDetailInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IPayFeeDetailDiscountBMO payFeeDetailDiscountBMOImpl; |
| | | private IRepairUserInnerServiceSMO repairUserInnerServiceSMO; |
| | | |
| | | @Autowired |
| | | private IRepairInnerServiceSMO repairInnerServiceSMO; |
| | | |
| | | |
| | | @Override |
| | |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put(RepairPoolPo.class.getSimpleName(), BeanConvertUtil.beanCovertMap(repairPoolPo)); |
| | | businesses.add(business); |
| | | } |
| | | //修改 派单流程状态 |
| | | if (feeAttrDtos != null && feeAttrDtos.size() > 0) { |
| | | JSONObject business = JSONObject.parseObject("{\"datas\":{}}"); |
| | | business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_REPAIR_USER); |
| | | business.put(CommonConstant.HTTP_SEQ, DEFAULT_SEQ + 3); |
| | | business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S); |
| | | RepairDto repairDto = new RepairDto(); |
| | | repairDto.setRepairId(feeAttrDtos.get(0).getValue()); |
| | | //查询报修记录 |
| | | List<RepairDto> repairDtos = repairInnerServiceSMO.queryRepairs(repairDto); |
| | | Assert.listOnlyOne(repairDtos, "报修信息错误!"); |
| | | //获取报修渠道 |
| | | String repairChannel = repairDtos.get(0).getRepairChannel(); |
| | | RepairUserDto repairUserDto = new RepairUserDto(); |
| | | repairUserDto.setRepairId(feeAttrDtos.get(0).getValue()); |
| | | repairUserDto.setState(RepairUserDto.STATE_PAY_FEE); |
| | | //查询待支付状态的记录 |
| | | List<RepairUserDto> repairUserDtoList = repairUserInnerServiceSMO.queryRepairUsers(repairUserDto); |
| | | Assert.listOnlyOne(repairUserDtoList, "信息错误!"); |
| | | RepairUserPo repairUserPo = new RepairUserPo(); |
| | | repairUserPo.setRuId(repairUserDtoList.get(0).getRuId()); |
| | | if (repairChannel.equals("Z")) { //如果业主是自主报修,状态就变成已支付,并新增一条待评价状态 |
| | | repairUserPo.setState(RepairUserDto.STATE_FINISH_PAY_FEE); |
| | | //如果是待评价状态,就更新结束时间 |
| | | repairUserPo.setEndTime(DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A)); |
| | | repairUserPo.setContext("已支付" + paramObj.getString("receivedAmount") + "元"); |
| | | //新增待评价状态 |
| | | JSONObject object = JSONObject.parseObject("{\"datas\":{}}"); |
| | | object.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_SAVE_REPAIR_USER); |
| | | object.put(CommonConstant.HTTP_SEQ, DEFAULT_SEQ + 4); |
| | | object.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S); |
| | | RepairUserPo repairUser = new RepairUserPo(); |
| | | repairUser.setRuId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_ruId)); |
| | | repairUser.setStartTime(repairUserPo.getEndTime()); |
| | | repairUser.setState(RepairUserDto.STATE_EVALUATE); |
| | | repairUser.setContext("待评价"); |
| | | repairUser.setCommunityId(paramObj.getString("communityId")); |
| | | repairUser.setCreateTime(DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A)); |
| | | repairUser.setRepairId(repairUserDtoList.get(0).getRepairId()); |
| | | repairUser.setStaffId(repairUserDtoList.get(0).getStaffId()); |
| | | repairUser.setStaffName(repairUserDtoList.get(0).getStaffName()); |
| | | repairUser.setPreStaffId(repairUserDtoList.get(0).getStaffId()); |
| | | repairUser.setPreStaffName(repairUserDtoList.get(0).getStaffName()); |
| | | repairUser.setPreRuId(repairUserDtoList.get(0).getRuId()); |
| | | repairUser.setRepairEvent("auditUser"); |
| | | object.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put(RepairUserPo.class.getSimpleName(), BeanConvertUtil.beanCovertMap(repairUser)); |
| | | businesses.add(object); |
| | | } else { //如果是员工代客报修或电话报修,状态就变成已支付 |
| | | repairUserPo.setState(RepairUserDto.STATE_FINISH_PAY_FEE); |
| | | //如果是已支付状态,就更新结束时间 |
| | | repairUserPo.setEndTime(DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A)); |
| | | repairUserPo.setContext("已支付" + paramObj.getString("receivedAmount") + "元"); |
| | | } |
| | | business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put(RepairUserPo.class.getSimpleName(), BeanConvertUtil.beanCovertMap(repairUserPo)); |
| | | businesses.add(business); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | apiFeeDetailVo.setTotal(total); |
| | | if (total > 0) { |
| | | List<FeeDetailDto> feeDetailDtos = feeDetailInnerServiceSMOImpl.queryFeeDetails(BeanConvertUtil.covertBean(reqJson, FeeDetailDto.class)); |
| | | List<ApiFeeDetailDataVo> feeDetails = BeanConvertUtil.covertBeanList(feeDetailDtos, ApiFeeDetailDataVo.class); |
| | | List<FeeDetailDto> feeDetailList = new ArrayList<>(); |
| | | for (FeeDetailDto feeDetail : feeDetailDtos) { |
| | | //获取状态 |
| | | String state = feeDetail.getState(); |
| | | if (!StringUtil.isEmpty(state) && (state.equals("1300") || state.equals("1100") || state.equals("1200"))) { //退费单、已退费、退费失败状态 |
| | | //获取周期 |
| | | String cycles = feeDetail.getCycles(); |
| | | if (!StringUtil.isEmpty(cycles) && cycles.contains("-")) { |
| | | feeDetail.setCycles(cycles.substring(1)); |
| | | } |
| | | //获取应收金额 |
| | | String receivableAmount = feeDetail.getReceivableAmount(); |
| | | if (!StringUtil.isEmpty(receivableAmount) && receivableAmount.contains("-")) { |
| | | feeDetail.setReceivableAmount(receivableAmount.substring(1)); |
| | | } |
| | | //获取实收金额 |
| | | String receivedAmount = feeDetail.getReceivedAmount(); |
| | | if (!StringUtil.isEmpty(receivedAmount) && receivedAmount.contains("-")) { |
| | | feeDetail.setReceivedAmount(receivedAmount.substring(1)); |
| | | } |
| | | } |
| | | feeDetailList.add(feeDetail); |
| | | } |
| | | List<ApiFeeDetailDataVo> feeDetails = BeanConvertUtil.covertBeanList(feeDetailList, ApiFeeDetailDataVo.class); |
| | | |
| | | //reFreshCreateTime(feeDetails, feeDetailDtos); |
| | | |
| | |
| | | import com.java110.intf.community.IRepairTypeUserInnerServiceSMO; |
| | | import com.java110.intf.community.IRepairUserInnerServiceSMO; |
| | | import com.java110.po.owner.RepairUserPo; |
| | | import com.java110.utils.cache.MappingCache; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.ServiceCodeRepairDispatchStepConstant; |
| | | import com.java110.utils.lock.DistributedLock; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | @Java110Listener("grabbingRepairListener") |
| | | public class GrabbingRepairListener extends AbstractServiceApiPlusListener { |
| | | |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(GrabbingRepairListener.class); |
| | | |
| | | @Autowired |
| | |
| | | @Autowired |
| | | private IRepairTypeUserInnerServiceSMO repairTypeUserInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IRepairTypeUserInnerServiceSMO repairTypeUserInnerServiceSMO; |
| | | |
| | | //域 |
| | | public static final String DOMAIN_COMMON = "DOMAIN.COMMON"; |
| | | |
| | | //键(维修师傅未处理最大单数) |
| | | public static final String REPAIR_NUMBER = "REPAIR_NUMBER"; |
| | | |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "repairId", "未包含报修单信息"); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "未包含小区信息"); |
| | | Assert.hasKeyAndValue(reqJson, "userId", "未包含用户ID"); |
| | | Assert.hasKeyAndValue(reqJson, "userName", "未包含用户名称"); |
| | | |
| | | |
| | | } |
| | | |
| | | @Override |
| | |
| | | String key = this.getClass().getSimpleName() + reqJson.getString("repairId"); |
| | | try { |
| | | DistributedLock.waitGetDistributedLock(key, requestId); |
| | | //获取当前处理员工id |
| | | String staffId = reqJson.getString("userId"); |
| | | RepairUserDto repairUser = new RepairUserDto(); |
| | | repairUser.setStaffId(staffId); |
| | | repairUser.setState("10001"); //处理中 |
| | | int i = repairUserInnerServiceSMOImpl.queryRepairUsersCount(repairUser); |
| | | //取出开关映射的值(维修师傅未处理最大单数) |
| | | String repairNumber = MappingCache.getValue(DOMAIN_COMMON, REPAIR_NUMBER); |
| | | if (i >= Integer.parseInt(repairNumber)) { |
| | | ResponseEntity<String> responseEntity = ResultVo.createResponseEntity(ResultVo.CODE_BUSINESS_VERIFICATION, "您有超过" + Integer.parseInt(repairNumber) + "条未处理的订单急需处理,请处理完成后再进行抢单!"); |
| | | context.setResponseEntity(responseEntity); |
| | | return; |
| | | } |
| | | RepairDto repairDtoData = new RepairDto(); |
| | | repairDtoData.setRepairId(reqJson.getString("repairId")); |
| | | repairDtoData.setCommunityId(reqJson.getString("communityId")); |
| | |
| | | context.setResponseEntity(responseEntity); |
| | | return; |
| | | } |
| | | //获取报修类型 |
| | | String repairType = repairDtoList.get(0).getRepairType(); |
| | | RepairTypeUserDto repairTypeUser = new RepairTypeUserDto(); |
| | | repairTypeUser.setStaffId(staffId); |
| | | repairTypeUser.setRepairType(repairType); |
| | | //查询工单设置表 |
| | | List<RepairTypeUserDto> repairTypeUserDtos = repairTypeUserInnerServiceSMO.queryRepairTypeUsers(repairTypeUser); |
| | | if (repairTypeUserDtos != null && repairTypeUserDtos.size() != 1) { //报修类型设置未添加改操作的员工! |
| | | ResponseEntity<String> responseEntity = ResultVo.createResponseEntity(ResultVo.CODE_BUSINESS_VERIFICATION, "对不起,您还没权限进行此操作,请联系管理员处理!"); |
| | | context.setResponseEntity(responseEntity); |
| | | return; |
| | | } |
| | | //获取维修师傅状态 |
| | | String staffState = repairTypeUserDtos.get(0).getState(); |
| | | if (!StringUtil.isEmpty(staffState) && staffState.equals("8888")) { //离线状态 |
| | | ResponseEntity<String> responseEntity = ResultVo.createResponseEntity(ResultVo.CODE_BUSINESS_VERIFICATION, "员工处于离线状态,无法进行操作!"); |
| | | context.setResponseEntity(responseEntity); |
| | | return; |
| | | } |
| | | RepairTypeUserDto repairTypeUserDto = new RepairTypeUserDto(); |
| | | repairTypeUserDto.setCommunityId(reqJson.getString("communityId")); |
| | | repairTypeUserDto.setRepairType(repairType); |
| | |
| | | context.setResponseEntity(responseEntity); |
| | | return; |
| | | } |
| | | |
| | | //获取报修id |
| | | String repairId = reqJson.getString("repairId"); |
| | | RepairDto repairDto = new RepairDto(); |
| | |
| | | repairUserDto.setRepairEvent(RepairUserDto.REPAIR_EVENT_START_USER); |
| | | List<RepairUserDto> repairUserDtos = repairUserInnerServiceSMOImpl.queryRepairUsers(repairUserDto); |
| | | Assert.listOnlyOne(repairUserDtos, "未找到开始节点或找到多条"); |
| | | |
| | | String userId = reqJson.getString("userId"); |
| | | String userName = reqJson.getString("userName"); |
| | | RepairUserPo repairUserPo = new RepairUserPo(); |
| | |
| | | repairUserPo.setRepairEvent(RepairUserDto.REPAIR_EVENT_AUDIT_USER); |
| | | repairUserPo.setContext(""); |
| | | repairUserPo.setCommunityId(reqJson.getString("communityId")); |
| | | |
| | | super.insert(context, repairUserPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_REPAIR_USER); |
| | | ownerRepairBMOImpl.modifyBusinessRepairDispatch(reqJson, context, RepairDto.STATE_TAKING); |
| | | ResponseEntity<String> responseEntity = ResultVo.createResponseEntity(ResultVo.CODE_OK, ResultVo.MSG_OK); |
| | |
| | | } finally { |
| | | DistributedLock.releaseDistributedLock(requestId, key); |
| | | } |
| | | |
| | | } |
| | | |
| | | @Override |
| | |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.dto.basePrivilege.BasePrivilegeDto; |
| | | import com.java110.dto.user.UserDto; |
| | | import com.java110.intf.community.IMenuInnerServiceSMO; |
| | | import com.java110.intf.community.IRepairInnerServiceSMO; |
| | | import com.java110.dto.repair.RepairDto; |
| | | import com.java110.intf.user.IUserInnerServiceSMO; |
| | | import com.java110.utils.cache.MappingCache; |
| | | import com.java110.utils.constant.ServiceCodeOwnerRepairConstant; |
| | | import com.java110.utils.util.Assert; |
| | |
| | | import com.java110.po.fee.FeeAttrPo; |
| | | import com.java110.po.fee.PayFeePo; |
| | | import com.java110.po.owner.RepairUserPo; |
| | | import com.java110.utils.cache.MappingCache; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.ServiceCodeRepairDispatchStepConstant; |
| | | import com.java110.utils.util.Assert; |
| | |
| | | @Autowired |
| | | private IFeeInnerServiceSMO feeInnerServiceSMOImpl; |
| | | |
| | | //域 |
| | | public static final String DOMAIN_COMMON = "DOMAIN.COMMON"; |
| | | |
| | | //键(维修师傅未处理最大单数) |
| | | public static final String REPAIR_NUMBER = "REPAIR_NUMBER"; |
| | | |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | | //Assert.hasKeyAndValue(reqJson, "xxx", "xxx"); |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "staffId", "未包含员工ID信息"); |
| | | Assert.hasKeyAndValue(reqJson, "staffName", "未包含员工名称信息"); |
| | | Assert.hasKeyAndValue(reqJson, "repairId", "未包含报修单信息"); |
| | | Assert.hasKeyAndValue(reqJson, "context", "未包含派单内容"); |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "未包含小区信息"); |
| | | Assert.hasKeyAndValue(reqJson, "action", "未包含处理动作"); |
| | | |
| | | |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | private void backRepair(DataFlowContext context, JSONObject reqJson) { |
| | | |
| | | //查询订单状态 |
| | | RepairDto repairDto = new RepairDto(); |
| | | repairDto.setRepairId(reqJson.getString("repairId")); |
| | |
| | | * @param reqJson |
| | | */ |
| | | private void transferRepair(DataFlowContext context, JSONObject reqJson) { |
| | | //获取接受转单的员工 |
| | | String staffId = reqJson.getString("staffId"); |
| | | RepairUserDto repairUser = new RepairUserDto(); |
| | | repairUser.setStaffId(staffId); |
| | | repairUser.setState("10001"); //处理中 |
| | | int i = repairUserInnerServiceSMOImpl.queryRepairUsersCount(repairUser); |
| | | //取出开关映射的值(维修师傅未处理最大单数) |
| | | String repairNumber = MappingCache.getValue(DOMAIN_COMMON, REPAIR_NUMBER); |
| | | if (i >= Integer.parseInt(repairNumber)) { |
| | | ResponseEntity<String> responseEntity = ResultVo.createResponseEntity(ResultVo.CODE_BUSINESS_VERIFICATION, "该员工有超过" + Integer.parseInt(repairNumber) + "条未处理的订单急需处理,请安排其他维修人员处理!"); |
| | | context.setResponseEntity(responseEntity); |
| | | return; |
| | | } |
| | | String userId = reqJson.getString("userId"); |
| | | String userName = reqJson.getString("userName"); |
| | | |
| | | RepairUserDto repairUserDto = new RepairUserDto(); |
| | | repairUserDto.setRepairId(reqJson.getString("repairId")); |
| | | repairUserDto.setCommunityId(reqJson.getString("communityId")); |
| | |
| | | * @param reqJson |
| | | */ |
| | | private void dispacthRepair(DataFlowContext context, JSONObject reqJson) { |
| | | //获取接受派单的员工 |
| | | String staffId = reqJson.getString("staffId"); |
| | | RepairUserDto repairUser = new RepairUserDto(); |
| | | repairUser.setStaffId(staffId); |
| | | repairUser.setState("10001"); //处理中 |
| | | int i = repairUserInnerServiceSMOImpl.queryRepairUsersCount(repairUser); |
| | | //取出开关映射的值(维修师傅未处理最大单数) |
| | | String repairNumber = MappingCache.getValue(DOMAIN_COMMON, REPAIR_NUMBER); |
| | | if (i >= Integer.parseInt(repairNumber)) { |
| | | ResponseEntity<String> responseEntity = ResultVo.createResponseEntity(ResultVo.CODE_BUSINESS_VERIFICATION, "该员工有超过" + Integer.parseInt(repairNumber) + "条未处理的订单急需处理,请安排其他维修人员处理!"); |
| | | context.setResponseEntity(responseEntity); |
| | | return; |
| | | } |
| | | //获取报修id |
| | | String repairId = reqJson.getString("repairId"); |
| | | RepairDto repairDto = new RepairDto(); |
| | |
| | | repairPoolPo.setRepairMaterials(repairMaterial.substring(0, repairMaterial.length() - 1)); |
| | | //费用明细 |
| | | repairPoolPo.setRepairFee(repairFee.substring(0, repairFee.length() - 1)); |
| | | //支付方式 |
| | | repairPoolPo.setPayType(reqJson.getString("payType")); |
| | | super.update(context, repairPoolPo, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_REPAIR); |
| | | ownerRepairBMOImpl.modifyBusinessRepairDispatch(reqJson, context, RepairDto.STATE_PAY); |
| | | } else if ("T".equals(publicArea)) { //公共区域走这里 |
| | |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.fee.FeeConfigDto; |
| | | import com.java110.dto.fee.FeeDto; |
| | | import com.java110.dto.file.FileDto; |
| | | import com.java110.dto.file.FileRelDto; |
| | | import com.java110.dto.repair.RepairDto; |
| | | import com.java110.dto.repair.RepairUserDto; |
| | | import com.java110.intf.common.IFileInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeConfigInnerServiceSMO; |
| | | import com.java110.intf.fee.IFeeInnerServiceSMO; |
| | | import com.java110.po.file.FileRelPo; |
| | | import com.java110.po.owner.RepairPoolPo; |
| | | import com.java110.po.owner.RepairUserPo; |
| | | import com.java110.utils.cache.MappingCache; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.FeeTypeConstant; |
| | | import com.java110.utils.constant.ServiceCodeOwnerRepairConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 保存小区侦听 |
| | |
| | | |
| | | @Autowired |
| | | private IFileInnerServiceSMO fileInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFeeConfigInnerServiceSMO feeConfigInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFeeInnerServiceSMO feeInnerServiceSMOImpl; |
| | | |
| | | //域 |
| | | public static final String DOMAIN_COMMON = "DOMAIN.COMMON"; |
| | | |
| | | //键(报修业主未处理费用条数) |
| | | public static final String REPAIR_FEE_NUMBER = "REPAIR_FEE_NUMBER"; |
| | | |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | |
| | | |
| | | @Override |
| | | protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) { |
| | | //获取当前小区id |
| | | String communityId = reqJson.getString("communityId"); |
| | | //查询默认费用项 |
| | | FeeConfigDto feeConfigDto = new FeeConfigDto(); |
| | | feeConfigDto.setCommunityId(communityId); |
| | | feeConfigDto.setFeeTypeCd(FeeTypeConstant.FEE_TYPE_REPAIR); |
| | | feeConfigDto.setIsDefault(FeeConfigDto.DEFAULT_FEE_CONFIG); |
| | | List<FeeConfigDto> feeConfigDtos = feeConfigInnerServiceSMOImpl.queryFeeConfigs(feeConfigDto); |
| | | if (feeConfigDtos.size() != 1) { |
| | | ResponseEntity<String> responseEntity = ResultVo.createResponseEntity(ResultVo.CODE_BUSINESS_VERIFICATION, "默认维修费用有多条或不存在!"); |
| | | context.setResponseEntity(responseEntity); |
| | | return; |
| | | } |
| | | FeeDto feeDto = new FeeDto(); |
| | | feeDto.setConfigId(feeConfigDtos.get(0).getConfigId()); |
| | | feeDto.setPayerObjId(reqJson.getString("repairObjId")); |
| | | feeDto.setState(FeeDto.STATE_DOING); |
| | | //查询报修业主处理中的报修费 |
| | | List<FeeDto> feeDtos = feeInnerServiceSMOImpl.queryFees(feeDto); |
| | | //取出开关映射的值(维修师傅未处理最大单数) |
| | | String repairFeeNumber = MappingCache.getValue(DOMAIN_COMMON, REPAIR_FEE_NUMBER); |
| | | if (feeDtos != null && feeDtos.size() >= Integer.parseInt(repairFeeNumber)) { |
| | | ResponseEntity<String> responseEntity = ResultVo.createResponseEntity(ResultVo.CODE_BUSINESS_VERIFICATION, "该房屋存在" + Integer.parseInt(repairFeeNumber) + "条未处理的费用,请缴费后再进行报修!"); |
| | | context.setResponseEntity(responseEntity); |
| | | return; |
| | | } |
| | | JSONObject businessOwnerRepair = new JSONObject(); |
| | | businessOwnerRepair.putAll(reqJson); |
| | | businessOwnerRepair.put("repairId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_repairId)); |
| | |
| | | purchaseApplyPo.setApplyOrderId(purchaseApplyDtos.get(0).getApplyOrderId()); |
| | | super.update(context, purchaseApplyPo, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_PURCHASE_APPLY); |
| | | super.commit(context); |
| | | } else if (purchaseApplyDtos.get(0).getState().equals(purchaseApplyDto.STATE_NOT_PASS) && reqJson.getString("state").equals("1200")) { //如果状态未通过 并且是结束, |
| | | PurchaseApplyPo purchaseApplyPo = new PurchaseApplyPo(); |
| | | purchaseApplyPo.setApplyOrderId(purchaseApplyDtos.get(0).getApplyOrderId()); |
| | | super.update(context, purchaseApplyPo, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_PURCHASE_APPLY); |
| | | super.commit(context); |
| | | } |
| | | |
| | | boolean isLastTask = purchaseApplyUserInnerServiceSMOImpl.completeTask(purchaseApplyDto); |
| | |
| | | commit(dataFlowContext); |
| | | } |
| | | } |
| | | }else if(allocationStorehouseApplyDtos.get(0).getState().equals("1203")){ |
| | | allocationStorehouseApplyPo.setState( AllocationStorehouseDto.STATE_FAIL); |
| | | super.update(dataFlowContext, allocationStorehouseApplyPo, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_ALLOCATION_STOREHOUSE_APPLY); |
| | | } |
| | | } |
| | | |
| | |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.dto.allocationStorehouseApply.AllocationStorehouseApplyDto; |
| | | import com.java110.dto.org.OrgStaffRelDto; |
| | | import com.java110.entity.audit.AuditUser; |
| | | import com.java110.intf.common.IAllocationStorehouseUserInnerServiceSMO; |
| | | import com.java110.intf.user.IOrgStaffRelInnerServiceSMO; |
| | | import com.java110.utils.constant.ServiceCodeAuditUserConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.vo.ResultVo; |
| | |
| | | return DEFAULT_ORDER; |
| | | } |
| | | |
| | | @Autowired |
| | | private IOrgStaffRelInnerServiceSMO orgStaffRelInnerServiceSMOImpl; |
| | | |
| | | |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.dto.allocationStorehouseApply.AllocationStorehouseApplyDto; |
| | | import com.java110.dto.org.OrgStaffRelDto; |
| | | import com.java110.dto.userLogin.UserLoginDto; |
| | | import com.java110.entity.audit.AuditUser; |
| | | import com.java110.intf.common.IAllocationStorehouseUserInnerServiceSMO; |
| | | import com.java110.intf.user.IOrgStaffRelInnerServiceSMO; |
| | | import com.java110.intf.user.IUserLoginInnerServiceSMO; |
| | | import com.java110.utils.constant.ServiceCodeAuditUserConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.vo.ResultVo; |
| | |
| | | return DEFAULT_ORDER; |
| | | } |
| | | |
| | | @Autowired |
| | | private IOrgStaffRelInnerServiceSMO orgStaffRelInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | |
| | | import com.java110.intf.store.IStorehouseInnerServiceSMO; |
| | | import com.java110.utils.constant.ServiceCodeStorehouseConstant; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpMethod; |
| | |
| | | basePrivilegeDto.setResource("/viewGroupWarehouse"); |
| | | basePrivilegeDto.setUserId(userId); |
| | | List<Map> privileges = menuInnerServiceSMOImpl.checkUserHasResource(basePrivilegeDto); |
| | | if (privileges.size()==0) { |
| | | if (privileges.size() == 0) { |
| | | storehouseDto.setShObjIds(new String[]{reqJson.getString("communityId")}); |
| | | }else{ |
| | | } else { |
| | | storehouseDto.setShObjIds(new String[]{reqJson.getString("communityId"), reqJson.getString("storeId")}); |
| | | } |
| | | if (StringUtil.isEmpty(reqJson.getString("shType"))) {//调拨申请查看所有仓库 |
| | | storehouseDto.setShObjIds(null); |
| | | } |
| | | int count = storehouseInnerServiceSMOImpl.queryStorehousesCount(storehouseDto); |
| | | |
| | | List<StorehouseDto> storehouseDtos = null; |
| | |
| | | allocationStorehousePo.setResName(resObj.getString("resName")); |
| | | if (!StringUtil.isEmpty(applyType) && applyType.equals("10000")) { //调拨操作时保存前仓库id |
| | | allocationStorehousePo.setShIda(resObj.getString("shId")); |
| | | allocationStorehouseApplyPo.setShId(resObj.getString("shId")); |
| | | } else { //返还操作时保存返还申请人id |
| | | allocationStorehousePo.setShIda(allocationStorehouseApplyPo.getStartUserId()); |
| | | } |
| | |
| | | import com.java110.core.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.utils.constant.ServiceCodeReturnPayFeeConstant; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.api.returnPayFee.ApiReturnPayFeeDataVo; |
| | | import com.java110.vo.api.returnPayFee.ApiReturnPayFeeVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | int count = returnPayFeeInnerServiceSMOImpl.queryReturnPayFeesCount(returnPayFeeDto); |
| | | |
| | | List<ApiReturnPayFeeDataVo> returnPayFees = null; |
| | | List<ApiReturnPayFeeDataVo> returnPayFees = new ArrayList<>(); |
| | | |
| | | if (count > 0) { |
| | | returnPayFees = BeanConvertUtil.covertBeanList(returnPayFeeInnerServiceSMOImpl.queryReturnPayFees(returnPayFeeDto), ApiReturnPayFeeDataVo.class); |
| | | List<ApiReturnPayFeeDataVo> apiReturnPayFeeDataVos = BeanConvertUtil.covertBeanList(returnPayFeeInnerServiceSMOImpl.queryReturnPayFees(returnPayFeeDto), ApiReturnPayFeeDataVo.class); |
| | | for (ApiReturnPayFeeDataVo apiReturnPayFeeDataVo : apiReturnPayFeeDataVos) { |
| | | //获取周期 |
| | | String cycles = apiReturnPayFeeDataVo.getCycles(); |
| | | if (!StringUtil.isEmpty(cycles) && cycles.contains("-")) { |
| | | String substring = cycles.substring(1); |
| | | apiReturnPayFeeDataVo.setCycles(substring); |
| | | } |
| | | //获取应收金额 |
| | | String receivableAmount = apiReturnPayFeeDataVo.getReceivableAmount(); |
| | | if (!StringUtil.isEmpty(receivableAmount) && receivableAmount.contains("-")) { |
| | | String substring = receivableAmount.substring(1); |
| | | apiReturnPayFeeDataVo.setReceivableAmount(substring); |
| | | } |
| | | //获取实收金额 |
| | | String receivedAmount = apiReturnPayFeeDataVo.getReceivedAmount(); |
| | | if (!StringUtil.isEmpty(receivedAmount) && receivedAmount.contains("-")) { |
| | | String substring = receivedAmount.substring(1); |
| | | apiReturnPayFeeDataVo.setReceivedAmount(substring); |
| | | } |
| | | returnPayFees.add(apiReturnPayFeeDataVo); |
| | | } |
| | | } else { |
| | | returnPayFees = new ArrayList<>(); |
| | | } |
| | |
| | | //检查 请求报文中是否有floorNum 小区楼编号,如果没有就随机选一个 |
| | | try { |
| | | //if (!reqJson.containsKey("floorNum") || StringUtils.isEmpty(reqJson.getString("floorNum"))) { |
| | | |
| | | floorDto.setPage(1); |
| | | List<FloorDto> floorDtos = floorInnerServiceSMOImpl.queryFloors(floorDto); |
| | | |
| | | if (floorDtos.size() == 0) { |
| | |
| | | **/ |
| | | @Java110Listener("saveOwnerShopsListener") |
| | | public class SaveOwnerShopsListener extends AbstractServiceApiPlusListener { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(SaveOwnerShopsListener.class); |
| | | |
| | | @Autowired |
| | |
| | | public HttpMethod getHttpMethod() { |
| | | return HttpMethod.POST; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpMethod; |
| | | |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | |
| | | |
| | | @Override |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) { |
| | | protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) throws ParseException { |
| | | Assert.jsonObjectHaveKey(reqJson, "roomId", "请求报文中未包含roomId节点"); |
| | | Assert.jsonObjectHaveKey(reqJson, "communityId", "请求报文中未包含communityId节点"); |
| | | Assert.jsonObjectHaveKey(reqJson, "roomNum", "请求报文中未包含roomNum节点"); |
| | |
| | | Assert.isMoney(reqJson.getString("feeCoefficient"), "算费系数数据格式错误"); |
| | | } |
| | | |
| | | |
| | | //获取房屋状态 |
| | | String state = reqJson.getString("state"); |
| | | if (!StringUtil.isEmpty(state) && state.equals("2006")) { //已出租 |
| | | //获取起租时间 |
| | | String startTime = reqJson.getString("startTime"); |
| | | //获取截租时间 |
| | | String endTime = reqJson.getString("endTime"); |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
| | | Date beginTime = format.parse(startTime); |
| | | Date finishTime = format.parse(endTime); |
| | | if (beginTime.getTime() > finishTime.getTime()) { |
| | | throw new IllegalArgumentException("起租时间不能大于截租时间!"); |
| | | } |
| | | } |
| | | |
| | | UnitDto unitDto = new UnitDto(); |
| | | unitDto.setCommunityId(reqJson.getString("communityId")); |
| | |
| | | businesses.add(storeBMOImpl.addOrgHeadPart(paramObj)); |
| | | businesses.add(storeBMOImpl.addStaffOrg(paramObj)); |
| | | businesses.add(storeBMOImpl.addPurchase(paramObj)); |
| | | businesses.add(storeBMOImpl.addCollection(paramObj)); |
| | | //businesses.add(storeBMOImpl.addCollection(paramObj)); //物品领用 各个小区设置各自的流程 废弃次操作 |
| | | businesses.add(storeBMOImpl.contractApply(paramObj)); |
| | | businesses.add(storeBMOImpl.contractChange(paramObj)); |
| | | //物品调拨流程 |
| | |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.event.service.api.ServiceDataFlowEvent; |
| | | import com.java110.dto.workflow.WorkflowDto; |
| | | import com.java110.intf.common.IWorkflowStepStaffInnerServiceSMO; |
| | | import com.java110.dto.workflow.WorkflowStepStaffDto; |
| | | import com.java110.utils.constant.ServiceCodeWorkflowStepStaffConstant; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpMethod; |
| | |
| | | |
| | | @Override |
| | | protected void doSoService(ServiceDataFlowEvent event, DataFlowContext context, JSONObject reqJson) { |
| | | |
| | | WorkflowStepStaffDto workflowStepStaffDto = BeanConvertUtil.covertBean(reqJson, WorkflowStepStaffDto.class); |
| | | if (!StringUtil.isEmpty(reqJson.getString("requestType")) && "purchaseHandle".equals(reqJson.getString("requestType"))) {//采购 |
| | | workflowStepStaffDto.setFlowType(WorkflowDto.FLOW_TYPE_PURCHASE); |
| | | } |
| | | if (!StringUtil.isEmpty(reqJson.getString("requestType")) && "grantHandle".equals(reqJson.getString("requestType"))) {//领用 |
| | | workflowStepStaffDto.setFlowType(WorkflowDto.FLOW_TYPE_COLLECTION); |
| | | } |
| | | if (!StringUtil.isEmpty(reqJson.getString("requestType")) && "allocationHandle".equals(reqJson.getString("requestType"))) {//调拨 |
| | | String[] fllowTypes = new String[]{WorkflowDto.FLOW_TYPE_ALLOCATION_STOREHOUSE, WorkflowDto.FLOW_TYPE_ALLOCATION_STOREHOUSE_GO}; |
| | | workflowStepStaffDto.setFlowTypes(fllowTypes); |
| | | } |
| | | |
| | | |
| | | int count = workflowStepStaffInnerServiceSMOImpl.queryWorkflowStepStaffsCount(workflowStepStaffDto); |
| | | |
| | |
| | | if (reqJson.containsKey("flowType")) { |
| | | String flowType = reqJson.getString("flowType"); |
| | | if (WorkflowDto.FLOW_TYPE_PURCHASE.equals(flowType) |
| | | || WorkflowDto.FLOW_TYPE_COLLECTION.equals(flowType) |
| | | || WorkflowDto.FLOW_TYPE_CONTRACT_CHANGE.equals(flowType) |
| | | || WorkflowDto.FLOW_TYPE_ALLOCATION_STOREHOUSE.equals(flowType) |
| | | || WorkflowDto.FLOW_TYPE_CONTRACT_APPLY.equals(flowType)) { |
| | | reqJson.put("communityId", "9999"); |
| | | } |
| | |
| | | workflowStepStaffPo.setStaffId(step.getString("staffId")); |
| | | workflowStepStaffPo.setStaffName(step.getString("staffName")); |
| | | workflowStepStaffPo.setStepId(workflowStepPo.getStepId()); |
| | | workflowStepStaffPo.setFlowType(reqJson.getString("flowType")); |
| | | workflowStepStaffPo.setStaffRole(StringUtil.isEmpty(step.getString("staffRole")) ? "1001" : step.getString("staffRole")); |
| | | super.insert(context, workflowStepStaffPo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_WORKFLOW_STEP_STAFF); |
| | | workflowStepStaffDtos.add(BeanConvertUtil.covertBean(workflowStepStaffPo, WorkflowStepStaffDto.class)); |
| | |
| | | businessWorkflowStepStaffInfo.put("communityId", businessWorkflowStepStaffInfo.get("community_id")); |
| | | businessWorkflowStepStaffInfo.put("staffId", businessWorkflowStepStaffInfo.get("staff_id")); |
| | | businessWorkflowStepStaffInfo.put("staffRole", businessWorkflowStepStaffInfo.get("staff_role")); |
| | | businessWorkflowStepStaffInfo.put("flowType", businessWorkflowStepStaffInfo.get("flow_type")); |
| | | businessWorkflowStepStaffInfo.remove("bId"); |
| | | businessWorkflowStepStaffInfo.put("statusCd", statusCd); |
| | | } |
| | |
| | | currentWorkflowStepStaffInfo.put("communityId", currentWorkflowStepStaffInfo.get("community_id")); |
| | | currentWorkflowStepStaffInfo.put("staffId", currentWorkflowStepStaffInfo.get("staff_id")); |
| | | currentWorkflowStepStaffInfo.put("staffRole", currentWorkflowStepStaffInfo.get("staff_role")); |
| | | currentWorkflowStepStaffInfo.put("flowType", currentWorkflowStepStaffInfo.get("flow_type")); |
| | | |
| | | |
| | | currentWorkflowStepStaffInfo.put("operate", StatusConstant.OPERATE_DEL); |
| | |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.allocationStorehouseApply.AllocationStorehouseApplyDto; |
| | | import com.java110.dto.area.AreaDto; |
| | | import com.java110.dto.businessDatabus.CustomBusinessDatabusDto; |
| | | import com.java110.dto.purchaseApply.PurchaseApplyDto; |
| | | import com.java110.dto.storehouse.StorehouseDto; |
| | | import com.java110.dto.userLogin.UserLoginDto; |
| | | import com.java110.dto.workflow.WorkflowDto; |
| | | import com.java110.entity.audit.AuditUser; |
| | | import com.java110.intf.common.IAllocationStorehouseUserInnerServiceSMO; |
| | |
| | | import com.java110.intf.job.IDataBusInnerServiceSMO; |
| | | import com.java110.intf.store.IAllocationStorehouseApplyInnerServiceSMO; |
| | | import com.java110.intf.store.IPurchaseApplyInnerServiceSMO; |
| | | import com.java110.intf.store.IStorehouseInnerServiceSMO; |
| | | import com.java110.intf.user.IUserLoginInnerServiceSMO; |
| | | import com.java110.po.machine.MachineRecordPo; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.util.Assert; |
| | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import static com.java110.dto.storehouse.StorehouseDto.SH_TYPE_GROUP; |
| | | |
| | | //@Service("resourceEntryStoreSMOImpl") |
| | | @RestController |
| | | public class AllocationStorehouseUserInnerServiceSMOImpl extends BaseServiceSMO implements IAllocationStorehouseUserInnerServiceSMO { |
| | |
| | | @Autowired |
| | | private IDataBusInnerServiceSMO dataBusInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IStorehouseInnerServiceSMO iStorehouseInnerServiceSMO; |
| | | |
| | | |
| | | /** |
| | | * 启动流程 |
| | | * |
| | |
| | | variables.put("allocationStorehouseApplyDto", allocationStorehouseApplyDto); |
| | | variables.put("userId", allocationStorehouseApplyDto.getCurrentUserId()); |
| | | variables.put("startUserId", allocationStorehouseApplyDto.getCurrentUserId()); |
| | | //查询调拨源仓库是集团仓库还是小区仓库,小区仓库走被调拨流程审批 |
| | | StorehouseDto storehouseDto = new StorehouseDto(); |
| | | storehouseDto.setShId(allocationStorehouseApplyDto.getShId()); |
| | | List<StorehouseDto> storehouseDtoList = iStorehouseInnerServiceSMO.queryStorehouses(storehouseDto); |
| | | StorehouseDto storehouseDto1 = new StorehouseDto(); |
| | | String communityId = null; |
| | | if (storehouseDtoList != null && storehouseDtoList.size() == 1) { |
| | | storehouseDto1 = storehouseDtoList.get(0); |
| | | } |
| | | if (SH_TYPE_GROUP.equals(storehouseDto1.getShType())) {//集团仓库 |
| | | communityId = "9999"; |
| | | } else {//小区仓库 |
| | | communityId = storehouseDto1.getShObjId(); |
| | | } |
| | | //开启流程 |
| | | ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(getWorkflowDto(allocationStorehouseApplyDto.getStoreId()), allocationStorehouseApplyDto.getApplyId(), variables); |
| | | ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(getWorkflowDto(allocationStorehouseApplyDto.getStoreId(), communityId), allocationStorehouseApplyDto.getApplyId(), variables); |
| | | //将得到的实例流程id值赋给之前设置的变量 |
| | | String processInstanceId = processInstance.getId(); |
| | | // System.out.println("流程开启成功.......实例流程id:" + processInstanceId); |
| | |
| | | */ |
| | | public long getUserTaskCount(@RequestBody AuditUser user) { |
| | | TaskService taskService = processEngine.getTaskService(); |
| | | TaskQuery query = taskService.createTaskQuery().processDefinitionKey(getWorkflowDto(user.getStoreId())); |
| | | List<String> workflowlist = getWorkflowDto1(user.getStoreId()); |
| | | TaskQuery query = taskService.createTaskQuery().processDefinitionKeyIn(workflowlist); |
| | | // TaskQuery query = taskService.createTaskQuery().processDefinitionKey(getWorkflowDto(user.getStoreId(), user.getCommunityId())); |
| | | query.taskAssignee(user.getUserId()); |
| | | return query.count(); |
| | | } |
| | |
| | | */ |
| | | public List<AllocationStorehouseApplyDto> getUserTasks(@RequestBody AuditUser user) { |
| | | TaskService taskService = processEngine.getTaskService(); |
| | | TaskQuery query = taskService.createTaskQuery().processDefinitionKey(getWorkflowDto(user.getStoreId())); |
| | | TaskQuery query = taskService.createTaskQuery().processDefinitionKeyIn(getWorkflowDto1(user.getStoreId())); |
| | | query.taskAssignee(user.getUserId()); |
| | | query.orderByTaskCreateTime().desc(); |
| | | List<Task> list = null; |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | private String getWorkflowDto(String storeId) { |
| | | private String getWorkflowDto(String storeId, String communityId) { |
| | | //开启流程 |
| | | //WorkflowDto.DEFAULT_PROCESS + workflowDto.getFlowId() |
| | | WorkflowDto workflowDto = new WorkflowDto(); |
| | | workflowDto.setFlowType(WorkflowDto.FLOW_TYPE_ALLOCATION_STOREHOUSE); |
| | | if (!StringUtil.isEmpty(communityId) && "9999".equals(communityId)) { |
| | | workflowDto.setFlowType(WorkflowDto.FLOW_TYPE_ALLOCATION_STOREHOUSE); |
| | | } else { |
| | | workflowDto.setFlowType(WorkflowDto.FLOW_TYPE_ALLOCATION_STOREHOUSE_GO); |
| | | } |
| | | workflowDto.setStoreId(storeId); |
| | | workflowDto.setCommunityId(communityId); |
| | | List<WorkflowDto> workflowDtos = workflowInnerServiceSMOImpl.queryWorkflows(workflowDto); |
| | | Assert.listOnlyOne(workflowDtos, "未找到 投诉建议流程或找到多条,请在物业账号系统管理下流程管理中配置流程"); |
| | | |
| | | Assert.listOnlyOne(workflowDtos, "未找到 调拨流程或找到多条,请在物业账号系统管理下流程管理中配置流程"); |
| | | WorkflowDto tmpWorkflowDto = workflowDtos.get(0); |
| | | if (StringUtil.isEmpty(tmpWorkflowDto.getProcessDefinitionKey())) { |
| | | throw new IllegalArgumentException("合同起草续签流程还未部署"); |
| | | throw new IllegalArgumentException("调拨流程流程还未部署"); |
| | | } |
| | | return WorkflowDto.DEFAULT_PROCESS + tmpWorkflowDto.getFlowId(); |
| | | } |
| | | |
| | | private List<String> getWorkflowDto1(String storeId) { |
| | | |
| | | //开启流程 |
| | | //WorkflowDto.DEFAULT_PROCESS + workflowDto.getFlowId() |
| | | WorkflowDto workflowDto = new WorkflowDto(); |
| | | String[] flowTypes = new String[]{WorkflowDto.FLOW_TYPE_ALLOCATION_STOREHOUSE, WorkflowDto.FLOW_TYPE_ALLOCATION_STOREHOUSE_GO}; |
| | | workflowDto.setFlowTypes(flowTypes); |
| | | workflowDto.setStoreId(storeId); |
| | | List<WorkflowDto> workflowDtos = workflowInnerServiceSMOImpl.queryWorkflows(workflowDto); |
| | | if (workflowDtos != null && workflowDtos.size() == 0) { |
| | | throw new IllegalArgumentException("未找到 调拨流程或找到多条,请在物业账号系统管理下流程管理中配置流程!"); |
| | | } |
| | | List<String> flowIdList = new ArrayList<String>(); |
| | | for (WorkflowDto workflowDto1 : workflowDtos) { |
| | | if (StringUtil.isEmpty(workflowDto1.getProcessDefinitionKey())) { |
| | | throw new IllegalArgumentException("调拨流程流程还未部署"); |
| | | } |
| | | flowIdList.add(WorkflowDto.DEFAULT_PROCESS + workflowDto1.getFlowId()); |
| | | } |
| | | return flowIdList; |
| | | } |
| | | |
| | | /** |
| | |
| | | // .taskAssignee(user.getUserId()); |
| | | |
| | | HistoricTaskInstanceQuery historicTaskInstanceQuery = historyService.createHistoricTaskInstanceQuery() |
| | | .processDefinitionKey(getWorkflowDto(user.getStoreId())) |
| | | .processDefinitionKeyIn(getWorkflowDto1(user.getStoreId())) |
| | | .taskAssignee(user.getUserId()) |
| | | .finished(); |
| | | if (!StringUtil.isEmpty(user.getAuditLink()) && "START".equals(user.getAuditLink())) { |
| | |
| | | HistoryService historyService = processEngine.getHistoryService(); |
| | | |
| | | HistoricTaskInstanceQuery historicTaskInstanceQuery = historyService.createHistoricTaskInstanceQuery() |
| | | .processDefinitionKey(getWorkflowDto(user.getStoreId())) |
| | | .processDefinitionKeyIn(getWorkflowDto1(user.getStoreId())) |
| | | .taskAssignee(user.getUserId()) |
| | | .finished(); |
| | | // if (!StringUtil.isEmpty(user.getAuditLink()) && "START".equals(user.getAuditLink())) { |
| | |
| | | |
| | | WorkflowDto tmpWorkflowDto = workflowDtos.get(0); |
| | | if (StringUtil.isEmpty(tmpWorkflowDto.getProcessDefinitionKey())) { |
| | | throw new IllegalArgumentException("流程还未部署"); |
| | | throw new IllegalArgumentException("投诉建议流程还未部署"); |
| | | } |
| | | return WorkflowDto.DEFAULT_PROCESS + tmpWorkflowDto.getFlowId(); |
| | | } |
| | |
| | | workflowDto.setFlowType(WorkflowDto.FLOW_TYPE_CONTRACT_APPLY); |
| | | workflowDto.setStoreId(storeId); |
| | | List<WorkflowDto> workflowDtos = workflowInnerServiceSMOImpl.queryWorkflows(workflowDto); |
| | | Assert.listOnlyOne(workflowDtos, "未找到 投诉建议流程或找到多条,请在物业账号系统管理下流程管理中配置流程"); |
| | | Assert.listOnlyOne(workflowDtos, "未找到 合同起草续签流程或找到多条,请在物业账号系统管理下流程管理中配置流程"); |
| | | |
| | | WorkflowDto tmpWorkflowDto = workflowDtos.get(0); |
| | | if (StringUtil.isEmpty(tmpWorkflowDto.getProcessDefinitionKey())) { |
| | |
| | | variables.put("userId", purchaseApplyDto.getCurrentUserId()); |
| | | variables.put("startUserId", purchaseApplyDto.getCurrentUserId()); |
| | | //开启流程 |
| | | ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(getWorkflowDto(purchaseApplyDto.getStoreId()), purchaseApplyDto.getApplyOrderId(), variables); |
| | | ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(getWorkflowDto(purchaseApplyDto.getStoreId(),purchaseApplyDto.getCommunityId()), purchaseApplyDto.getApplyOrderId(), variables); |
| | | //将得到的实例流程id值赋给之前设置的变量 |
| | | String processInstanceId = processInstance.getId(); |
| | | String processDefinitionId = processInstance.getProcessDefinitionId(); |
| | |
| | | } |
| | | |
| | | |
| | | private String getWorkflowDto(String storeId) { |
| | | private String getWorkflowDto(String storeId,String communityId) { |
| | | //开启流程 |
| | | //WorkflowDto.DEFAULT_PROCESS + workflowDto.getFlowId() |
| | | WorkflowDto workflowDto = new WorkflowDto(); |
| | | workflowDto.setFlowType(WorkflowDto.FLOW_TYPE_COLLECTION); |
| | | workflowDto.setStoreId(storeId); |
| | | workflowDto.setCommunityId(communityId); |
| | | List<WorkflowDto> workflowDtos = workflowInnerServiceSMOImpl.queryWorkflows(workflowDto); |
| | | |
| | | Assert.listOnlyOne(workflowDtos, "未找到 投诉建议流程或找到多条,请在物业账号系统管理下流程管理中配置流程"); |
| | | Assert.listOnlyOne(workflowDtos, "未找到 物品领用流程或找到多条,请在物业账号系统管理下流程管理中配置流程"); |
| | | |
| | | WorkflowDto tmpWorkflowDto = workflowDtos.get(0); |
| | | if (StringUtil.isEmpty(tmpWorkflowDto.getProcessDefinitionKey())) { |
| | | throw new IllegalArgumentException("流程还未部署"); |
| | | throw new IllegalArgumentException("物品领用流程还未部署"); |
| | | } |
| | | return WorkflowDto.DEFAULT_PROCESS + tmpWorkflowDto.getFlowId(); |
| | | } |
| | |
| | | */ |
| | | public long getUserTaskCount(@RequestBody AuditUser user) { |
| | | TaskService taskService = processEngine.getTaskService(); |
| | | TaskQuery query = taskService.createTaskQuery().processDefinitionKey(getWorkflowDto(user.getStoreId())); |
| | | TaskQuery query = taskService.createTaskQuery().processDefinitionKey(getWorkflowDto(user.getStoreId(),user.getCommunityId())); |
| | | query.taskAssignee(user.getUserId()); |
| | | return query.count(); |
| | | } |
| | |
| | | */ |
| | | public List<PurchaseApplyDto> getUserTasks(@RequestBody AuditUser user) { |
| | | TaskService taskService = processEngine.getTaskService(); |
| | | TaskQuery query = taskService.createTaskQuery().processDefinitionKey(getWorkflowDto(user.getStoreId())); |
| | | TaskQuery query = taskService.createTaskQuery().processDefinitionKey(getWorkflowDto(user.getStoreId(),user.getCommunityId())); |
| | | query.taskAssignee(user.getUserId()); |
| | | query.orderByTaskCreateTime().desc(); |
| | | List<Task> list = null; |
| | |
| | | // .taskAssignee(user.getUserId()); |
| | | |
| | | HistoricTaskInstanceQuery historicTaskInstanceQuery = historyService.createHistoricTaskInstanceQuery() |
| | | .processDefinitionKey(getWorkflowDto(user.getStoreId())) |
| | | .processDefinitionKey(getWorkflowDto(user.getStoreId(),user.getCommunityId())) |
| | | .taskAssignee(user.getUserId()) |
| | | .finished(); |
| | | if (!StringUtil.isEmpty(user.getAuditLink()) && "START".equals(user.getAuditLink())) { |
| | |
| | | HistoryService historyService = processEngine.getHistoryService(); |
| | | |
| | | HistoricTaskInstanceQuery historicTaskInstanceQuery = historyService.createHistoricTaskInstanceQuery() |
| | | .processDefinitionKey(getWorkflowDto(user.getStoreId())) |
| | | .processDefinitionKey(getWorkflowDto(user.getStoreId(),user.getCommunityId())) |
| | | .taskAssignee(user.getUserId()) |
| | | .finished(); |
| | | // if (!StringUtil.isEmpty(user.getAuditLink()) && "START".equals(user.getAuditLink())) { |
| | |
| | | workflowDto.setStoreId(storeId); |
| | | List<WorkflowDto> workflowDtos = workflowInnerServiceSMOImpl.queryWorkflows(workflowDto); |
| | | |
| | | Assert.listOnlyOne(workflowDtos, "未找到 投诉建议流程或找到多条,请在物业账号系统管理下流程管理中配置流程"); |
| | | Assert.listOnlyOne(workflowDtos, "未找到 采购流程或找到多条,请在物业账号系统管理下流程管理中配置流程"); |
| | | |
| | | WorkflowDto tmpWorkflowDto = workflowDtos.get(0); |
| | | if (StringUtil.isEmpty(tmpWorkflowDto.getProcessDefinitionKey())) { |
| | |
| | | workflowDto.setFlowType(WorkflowDto.FLOW_TYPE_PURCHASE); |
| | | workflowDto.setStoreId(storeId); |
| | | List<WorkflowDto> workflowDtos = workflowInnerServiceSMOImpl.queryWorkflows(workflowDto); |
| | | Assert.listOnlyOne(workflowDtos, "未找到 投诉建议流程或找到多条,请在物业账号系统管理下流程管理中配置流程"); |
| | | Assert.listOnlyOne(workflowDtos, "未找到 采购入库流程或找到多条,请在物业账号系统管理下流程管理中配置流程"); |
| | | |
| | | WorkflowDto tmpWorkflowDto = workflowDtos.get(0); |
| | | if (StringUtil.isEmpty(tmpWorkflowDto.getProcessDefinitionKey())) { |
| | | throw new IllegalArgumentException("流程还未部署"); |
| | | throw new IllegalArgumentException("采购入库流程还未部署"); |
| | | } |
| | | return WorkflowDto.DEFAULT_PROCESS + tmpWorkflowDto.getFlowId(); |
| | | } |
| New file |
| | |
| | | package com.java110.community.api; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.community.bmo.applyRoomDiscountRecord.IDeleteApplyRoomDiscountRecordBMO; |
| | | import com.java110.community.bmo.applyRoomDiscountRecord.IGetApplyRoomDiscountRecordBMO; |
| | | import com.java110.community.bmo.applyRoomDiscountRecord.ISaveApplyRoomDiscountRecordBMO; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.applyRoomDiscountRecord.ApplyRoomDiscountRecordDto; |
| | | import com.java110.dto.file.FileDto; |
| | | import com.java110.dto.file.FileRelDto; |
| | | import com.java110.dto.user.UserDto; |
| | | import com.java110.intf.common.IFileInnerServiceSMO; |
| | | import com.java110.intf.common.IFileRelInnerServiceSMO; |
| | | import com.java110.intf.user.IUserInnerServiceSMO; |
| | | import com.java110.po.applyRoomDiscountRecord.ApplyRoomDiscountRecordPo; |
| | | import com.java110.po.file.FileRelPo; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping(value = "/applyRoomDiscountRecord") |
| | | public class ApplyRoomDiscountRecordApi { |
| | | |
| | | @Autowired |
| | | private IGetApplyRoomDiscountRecordBMO getApplyRoomDiscountRecordBMOImpl; |
| | | |
| | | @Autowired |
| | | private IUserInnerServiceSMO userInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFileInnerServiceSMO fileInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IFileRelInnerServiceSMO fileRelInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private ISaveApplyRoomDiscountRecordBMO saveApplyRoomDiscountRecordBMOImpl; |
| | | |
| | | @Autowired |
| | | private IDeleteApplyRoomDiscountRecordBMO deleteApplyRoomDiscountRecordBMOImpl; |
| | | |
| | | /** |
| | | * 查询验房记录 |
| | | * |
| | | * @param communityId 小区ID |
| | | * @return |
| | | * @serviceCode /applyRoomDiscountRecord/queryApplyRoomDiscountRecord |
| | | * @path /app/applyRoomDiscountRecord/queryApplyRoomDiscountRecord |
| | | */ |
| | | @RequestMapping(value = "/queryApplyRoomDiscountRecord", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryApplyRoomDiscountRecord(@RequestParam(value = "communityId") String communityId, |
| | | @RequestParam(value = "ardId", required = false) String ardId, |
| | | @RequestParam(value = "roomId", required = false) String roomId, |
| | | @RequestParam(value = "state", required = false) String state, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | ApplyRoomDiscountRecordDto applyRoomDiscountRecordDto = new ApplyRoomDiscountRecordDto(); |
| | | applyRoomDiscountRecordDto.setCommunityId(communityId); |
| | | applyRoomDiscountRecordDto.setArdId(ardId); |
| | | applyRoomDiscountRecordDto.setPage(page); |
| | | applyRoomDiscountRecordDto.setRow(row); |
| | | return getApplyRoomDiscountRecordBMOImpl.get(applyRoomDiscountRecordDto); |
| | | } |
| | | |
| | | /** |
| | | * 查询验房记录详情 |
| | | * |
| | | * @return |
| | | * @serviceCode /applyRoomDiscountRecord/queryApplyRoomDiscountRecordDetail |
| | | * @path /app/applyRoomDiscountRecord/queryApplyRoomDiscountRecordDetail |
| | | */ |
| | | @RequestMapping(value = "/queryApplyRoomDiscountRecordDetail", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryRoomRenovationRecordDetail(@RequestParam(value = "ardrId", required = false) String ardrId, |
| | | @RequestParam(value = "page", required = false) int page, |
| | | @RequestParam(value = "row", required = false) int row) { |
| | | ApplyRoomDiscountRecordDto applyRoomDiscountRecordDto = new ApplyRoomDiscountRecordDto(); |
| | | applyRoomDiscountRecordDto.setArdrId(ardrId); |
| | | applyRoomDiscountRecordDto.setPage(page); |
| | | applyRoomDiscountRecordDto.setRow(row); |
| | | return getApplyRoomDiscountRecordBMOImpl.getRecord(applyRoomDiscountRecordDto); |
| | | } |
| | | |
| | | /** |
| | | * 添加验房记录 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /applyRoomDiscountRecord/addApplyRoomDiscountRecord |
| | | * @path /app/applyRoomDiscountRecord/addApplyRoomDiscountRecord |
| | | */ |
| | | @RequestMapping(value = "/addApplyRoomDiscountRecord", method = RequestMethod.POST) |
| | | public ResponseEntity<String> addApplyRoomDiscountRecord(@RequestBody JSONObject reqJson, @RequestHeader(value = "user-id") String userId) { |
| | | ApplyRoomDiscountRecordPo applyRoomDiscountRecordPo = BeanConvertUtil.covertBean(reqJson, ApplyRoomDiscountRecordPo.class); |
| | | //图片 |
| | | List<String> photos = applyRoomDiscountRecordPo.getPhotos(); |
| | | //视频 |
| | | String videoName = applyRoomDiscountRecordPo.getVideoName(); |
| | | //备注 |
| | | String remark = applyRoomDiscountRecordPo.getRemark(); |
| | | //优惠申请id |
| | | String ardId = applyRoomDiscountRecordPo.getArdId(); |
| | | //状态 |
| | | String state = applyRoomDiscountRecordPo.getState(); |
| | | //是否违规 |
| | | String isTrue = applyRoomDiscountRecordPo.getIsTrue(); |
| | | //小区id |
| | | String communityId = applyRoomDiscountRecordPo.getCommunityId(); |
| | | //查询当前用户信息 |
| | | UserDto userDto = new UserDto(); |
| | | userDto.setUserId(userId); |
| | | userDto.setStatusCd("0"); |
| | | List<UserDto> users = userInnerServiceSMOImpl.getUsers(userDto); |
| | | Assert.listOnlyOne(users, "查询用户错误!"); |
| | | ApplyRoomDiscountRecordPo applyRoomDiscountRecord = new ApplyRoomDiscountRecordPo(); |
| | | applyRoomDiscountRecord.setArdrId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_ARDRID)); |
| | | applyRoomDiscountRecord.setArdId(ardId); |
| | | applyRoomDiscountRecord.setRemark(remark); |
| | | applyRoomDiscountRecord.setState(state); |
| | | applyRoomDiscountRecord.setCreateUserId(userId); |
| | | applyRoomDiscountRecord.setCreateUserName(users.get(0).getName()); |
| | | applyRoomDiscountRecord.setIsTrue(isTrue); |
| | | applyRoomDiscountRecord.setCommunityId(communityId); |
| | | applyRoomDiscountRecord.setbId("-1"); |
| | | saveApplyRoomDiscountRecordBMOImpl.saveRecord(applyRoomDiscountRecord); |
| | | FileRelPo fileRelPo = new FileRelPo(); |
| | | fileRelPo.setFileRelId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_relId)); |
| | | fileRelPo.setObjId(applyRoomDiscountRecord.getArdrId()); |
| | | //table表示表存储 ftp表示ftp文件存储 |
| | | fileRelPo.setSaveWay("ftp"); |
| | | fileRelPo.setCreateTime(new Date()); |
| | | //图片上传 |
| | | if (photos != null && photos.size() > 0) { |
| | | //19000表示装修图片 |
| | | fileRelPo.setRelTypeCd("19000"); |
| | | for (String photo : photos) { |
| | | FileDto fileDto = new FileDto(); |
| | | fileDto.setCommunityId("-1"); |
| | | fileDto.setContext(photo); |
| | | fileDto.setFileId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_file_id)); |
| | | fileDto.setFileName(fileDto.getFileId()); |
| | | String fileName = fileInnerServiceSMOImpl.saveFile(fileDto); |
| | | fileRelPo.setFileRealName(fileName); |
| | | fileRelPo.setFileSaveName(fileName); |
| | | fileRelInnerServiceSMOImpl.saveFileRel(fileRelPo); |
| | | } |
| | | } |
| | | //视频上传 |
| | | if (!StringUtil.isEmpty(videoName)) { |
| | | //21000表示装修视频 |
| | | fileRelPo.setRelTypeCd("21000"); |
| | | fileRelPo.setFileRealName(videoName); |
| | | fileRelPo.setFileSaveName(videoName); |
| | | fileRelInnerServiceSMOImpl.saveFileRel(fileRelPo); |
| | | } |
| | | ApplyRoomDiscountRecordDto applyRoomDiscountRecordDto = new ApplyRoomDiscountRecordDto(); |
| | | applyRoomDiscountRecordDto.setArdrId(applyRoomDiscountRecord.getArdrId()); |
| | | return getApplyRoomDiscountRecordBMOImpl.get(applyRoomDiscountRecordDto); |
| | | } |
| | | |
| | | /** |
| | | * 删除空置房验房记录 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /applyRoomDiscountRecord/cutApplyRoomDiscountRecord |
| | | * @path /app/applyRoomDiscountRecord/cutApplyRoomDiscountRecord |
| | | */ |
| | | @RequestMapping(value = "/cutApplyRoomDiscountRecord", method = RequestMethod.POST) |
| | | public ResponseEntity<String> deleteApplyRoomDiscountRecord(@RequestBody JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空"); |
| | | Assert.hasKeyAndValue(reqJson, "ardrId", "ardrId不能为空"); |
| | | ApplyRoomDiscountRecordPo applyRoomDiscountRecordPo = BeanConvertUtil.covertBean(reqJson, ApplyRoomDiscountRecordPo.class); |
| | | //获取验房记录id |
| | | String ardrId = reqJson.getString("ardrId"); |
| | | FileRelPo fileRelpo = new FileRelPo(); |
| | | fileRelpo.setObjId(ardrId); |
| | | FileRelDto fileRelDto = new FileRelDto(); |
| | | fileRelDto.setObjId(ardrId); |
| | | List<FileRelDto> fileRelDtos = fileRelInnerServiceSMOImpl.queryFileRels(fileRelDto); |
| | | if (fileRelDtos != null && fileRelDtos.size() > 0) { |
| | | //删除文件表图片和视频 |
| | | fileRelInnerServiceSMOImpl.deleteFileRel(fileRelpo); |
| | | } |
| | | return deleteApplyRoomDiscountRecordBMOImpl.delete(applyRoomDiscountRecordPo); |
| | | } |
| | | |
| | | } |
| | |
| | | String rId = roomRenovationPo.getrId(); |
| | | //状态 |
| | | String state = roomRenovationPo.getState(); |
| | | //是否违规 |
| | | String isTrue = roomRenovationPo.getIsTrue(); |
| | | //查询当前用户信息 |
| | | UserDto userDto = new UserDto(); |
| | | userDto.setUserId(userId); |
| | |
| | | roomRenovationRecordPo.setCreateTime(format.format(new Date())); |
| | | roomRenovationRecordPo.setStaffId(userId); |
| | | roomRenovationRecordPo.setStaffName(users.get(0).getName()); |
| | | roomRenovationRecordPo.setIsTrue(isTrue); |
| | | saveRoomRenovationRecordBMO.saveRecord(roomRenovationRecordPo); |
| | | FileRelPo fileRelPo = new FileRelPo(); |
| | | fileRelPo.setFileRelId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_relId)); |
| | |
| | | @RequestParam(value = "roomName", required = false) String roomName, |
| | | @RequestParam(value = "personName", required = false) String personName, |
| | | @RequestParam(value = "personTel", required = false) String personTel, |
| | | @RequestParam(value = "state", required = false) String state, |
| | | @RequestHeader(value = "user-id") String userId, |
| | | @RequestParam(value = "page", required = false) int page, |
| | | @RequestParam(value = "row", required = false) int row) { |
| | |
| | | roomRenovationDto.setRoomName(roomName); |
| | | roomRenovationDto.setPersonName(personName); |
| | | roomRenovationDto.setPersonTel(personTel); |
| | | roomRenovationDto.setState(state); |
| | | roomRenovationDto.setUserId(userId); |
| | | return getRoomRenovationBMOImpl.get(roomRenovationDto); |
| | | } |
| New file |
| | |
| | | package com.java110.community.bmo.applyRoomDiscountRecord; |
| | | |
| | | import com.java110.po.applyRoomDiscountRecord.ApplyRoomDiscountRecordPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | /** |
| | | * 删除空置房验房记录 |
| | | * |
| | | * @author fqz |
| | | * @date 2021-09-01 10:37 |
| | | */ |
| | | public interface IDeleteApplyRoomDiscountRecordBMO { |
| | | |
| | | /** |
| | | * 删除装修记录 |
| | | * |
| | | * @param applyRoomDiscountRecordPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> delete(ApplyRoomDiscountRecordPo applyRoomDiscountRecordPo); |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.community.bmo.applyRoomDiscountRecord; |
| | | |
| | | import com.java110.dto.applyRoomDiscountRecord.ApplyRoomDiscountRecordDto; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | /** |
| | | * 查询空置房验房记录 |
| | | * |
| | | * @author fqz |
| | | * @date 2021-08-31 17:41 |
| | | */ |
| | | public interface IGetApplyRoomDiscountRecordBMO { |
| | | |
| | | /** |
| | | * 查询验房记录(关联文件表) |
| | | * |
| | | * @param applyRoomDiscountRecordDto |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> get(ApplyRoomDiscountRecordDto applyRoomDiscountRecordDto); |
| | | |
| | | /** |
| | | * 查询验房记录(关联文件表) |
| | | * |
| | | * @param applyRoomDiscountRecordDto |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> getRecord(ApplyRoomDiscountRecordDto applyRoomDiscountRecordDto); |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.community.bmo.applyRoomDiscountRecord; |
| | | |
| | | import com.java110.po.applyRoomDiscountRecord.ApplyRoomDiscountRecordPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | /** |
| | | * 添加空置房验房记录 |
| | | * |
| | | * @author fqz |
| | | * @date 2021-09-01 |
| | | */ |
| | | public interface ISaveApplyRoomDiscountRecordBMO { |
| | | |
| | | /** |
| | | * 添加空置房验房记录 |
| | | * |
| | | * @param applyRoomDiscountRecordPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> saveRecord(ApplyRoomDiscountRecordPo applyRoomDiscountRecordPo); |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.community.bmo.applyRoomDiscountRecord.impl; |
| | | |
| | | import com.java110.community.bmo.applyRoomDiscountRecord.IDeleteApplyRoomDiscountRecordBMO; |
| | | import com.java110.intf.community.IApplyRoomDiscountRecordInnerServiceSMO; |
| | | import com.java110.po.applyRoomDiscountRecord.ApplyRoomDiscountRecordPo; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * 删除空置房验房记录 |
| | | * |
| | | * @author fqz |
| | | * @date 2021-09-01 10:39 |
| | | */ |
| | | @Service("deleteApplyRoomDiscountRecordBMOImpl") |
| | | public class DeleteApplyRoomDiscountRecordBMOImpl implements IDeleteApplyRoomDiscountRecordBMO { |
| | | |
| | | @Autowired |
| | | private IApplyRoomDiscountRecordInnerServiceSMO applyRoomDiscountRecordInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public ResponseEntity<String> delete(ApplyRoomDiscountRecordPo applyRoomDiscountRecordPo) { |
| | | int flag = applyRoomDiscountRecordInnerServiceSMOImpl.deleteApplyRoomDiscountRecord(applyRoomDiscountRecordPo); |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "删除成功"); |
| | | } |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "删除失败"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.community.bmo.applyRoomDiscountRecord.impl; |
| | | |
| | | import com.java110.community.bmo.applyRoomDiscountRecord.IGetApplyRoomDiscountRecordBMO; |
| | | import com.java110.dto.applyRoomDiscountRecord.ApplyRoomDiscountRecordDto; |
| | | import com.java110.intf.community.IApplyRoomDiscountRecordInnerServiceSMO; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 查询装修记录信息 |
| | | * |
| | | * @author fqz |
| | | * @date 2021-08-31 17:44 |
| | | */ |
| | | @Service("getApplyRoomDiscountRecordBMOImpl") |
| | | public class GetApplyRoomDiscountRecordBMOImpl implements IGetApplyRoomDiscountRecordBMO { |
| | | |
| | | @Autowired |
| | | private IApplyRoomDiscountRecordInnerServiceSMO applyRoomDiscountRecordInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public ResponseEntity<String> getRecord(ApplyRoomDiscountRecordDto applyRoomDiscountRecordDto) { |
| | | int count = applyRoomDiscountRecordInnerServiceSMOImpl.queryApplyRoomDiscountRecordsCount(applyRoomDiscountRecordDto); |
| | | List<ApplyRoomDiscountRecordDto> applyRoomDiscountRecordDtos = new ArrayList<>(); |
| | | if (count > 0) { |
| | | List<ApplyRoomDiscountRecordDto> applyRoomDiscountRecordDtoList = applyRoomDiscountRecordInnerServiceSMOImpl.queryApplyRoomDiscountRecords(applyRoomDiscountRecordDto); |
| | | for (ApplyRoomDiscountRecordDto applyRoomDiscountRecord : applyRoomDiscountRecordDtoList) { |
| | | if (!StringUtil.isEmpty(applyRoomDiscountRecord.getFileRealName()) && applyRoomDiscountRecord.getRelTypeCd().equals("19000")) { |
| | | applyRoomDiscountRecord.setUrl("/callComponent/download/getFile/file?fileId=" + |
| | | applyRoomDiscountRecord.getFileRealName() + "&communityId=-1"); |
| | | } else if (!StringUtil.isEmpty(applyRoomDiscountRecord.getFileRealName()) && applyRoomDiscountRecord.getRelTypeCd().equals("21000")) { |
| | | applyRoomDiscountRecord.setUrl("/video/" + applyRoomDiscountRecord.getFileRealName()); |
| | | } |
| | | applyRoomDiscountRecordDtos.add(applyRoomDiscountRecord); |
| | | } |
| | | } else { |
| | | applyRoomDiscountRecordDtos = new ArrayList<>(); |
| | | } |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) applyRoomDiscountRecordDto.getRow()), count, applyRoomDiscountRecordDtos); |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | return responseEntity; |
| | | } |
| | | |
| | | @Override |
| | | public ResponseEntity<String> get(ApplyRoomDiscountRecordDto applyRoomDiscountRecordDto) { |
| | | int count = applyRoomDiscountRecordInnerServiceSMOImpl.selectApplyRoomDiscountRecordsCount(applyRoomDiscountRecordDto); |
| | | List<ApplyRoomDiscountRecordDto> applyRoomDiscountRecordDtos = null; |
| | | if (count > 0) { |
| | | applyRoomDiscountRecordDtos = applyRoomDiscountRecordInnerServiceSMOImpl.selectApplyRoomDiscountRecords(applyRoomDiscountRecordDto); |
| | | } else { |
| | | applyRoomDiscountRecordDtos = new ArrayList<>(); |
| | | } |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) applyRoomDiscountRecordDto.getRow()), count, applyRoomDiscountRecordDtos); |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | return responseEntity; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.community.bmo.applyRoomDiscountRecord.impl; |
| | | |
| | | import com.java110.community.bmo.applyRoomDiscountRecord.ISaveApplyRoomDiscountRecordBMO; |
| | | import com.java110.intf.community.IApplyRoomDiscountRecordInnerServiceSMO; |
| | | import com.java110.po.applyRoomDiscountRecord.ApplyRoomDiscountRecordPo; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * 添加空置房验房记录实现类 |
| | | * |
| | | * @author fqz |
| | | * @date 2021-09-01 |
| | | */ |
| | | @Service("saveApplyRoomDiscountRecordBMOImpl") |
| | | public class SaveApplyRoomDiscountRecordBMOImpl implements ISaveApplyRoomDiscountRecordBMO { |
| | | |
| | | @Autowired |
| | | private IApplyRoomDiscountRecordInnerServiceSMO applyRoomDiscountRecordInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public ResponseEntity<String> saveRecord(ApplyRoomDiscountRecordPo applyRoomDiscountRecordPo) { |
| | | int flag = applyRoomDiscountRecordInnerServiceSMOImpl.saveApplyRoomDiscountRecord(applyRoomDiscountRecordPo); |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| | |
| | | public interface IDeleteRoomRenovationRecordBMO { |
| | | |
| | | /** |
| | | * 查询装修记录 |
| | | * 删除装修记录 |
| | | * |
| | | * @param roomRenovationRecordPo |
| | | * @return |
| New file |
| | |
| | | package com.java110.community.dao; |
| | | |
| | | |
| | | import com.java110.utils.exception.DAOException; |
| | | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 验房记录组件内部之间使用,没有给外围系统提供服务能力 |
| | | * 验房记录服务接口类,要求全部以字符串传输,方便微服务化 |
| | | * 新建客户,修改客户,删除客户,查询客户等功能 |
| | | * <p> |
| | | * Created by wuxw on 2016/12/27. |
| | | */ |
| | | public interface IApplyRoomDiscountRecordServiceDao { |
| | | |
| | | /** |
| | | * 保存 验房记录信息 |
| | | * |
| | | * @param businessApplyRoomDiscountRecordInfo 验房记录信息 封装 |
| | | * @throws DAOException 操作数据库异常 |
| | | */ |
| | | void saveBusinessApplyRoomDiscountRecordInfo(Map businessApplyRoomDiscountRecordInfo) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 查询验房记录信息(business过程) |
| | | * 根据bId 查询验房记录信息 |
| | | * |
| | | * @param info bId 信息 |
| | | * @return 验房记录信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | List<Map> getBusinessApplyRoomDiscountRecordInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 保存 验房记录信息 Business数据到 Instance中 |
| | | * |
| | | * @param info |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | int saveApplyRoomDiscountRecordInfoInstance(Map info) throws DAOException; |
| | | |
| | | /** |
| | | * 保存 验房记录信息 |
| | | * |
| | | * @param info |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | int saveApplyRoomDiscountRecordInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 查询验房记录信息(instance过程)(关联文件表) |
| | | * 根据bId 查询验房记录信息 |
| | | * |
| | | * @param info bId 信息 |
| | | * @return 验房记录信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | List<Map> getApplyRoomDiscountRecordInfo(Map info) throws DAOException; |
| | | |
| | | /** |
| | | * 查询验房记录信息(instance过程) |
| | | * 根据bId 查询验房记录信息 |
| | | * |
| | | * @param info bId 信息 |
| | | * @return 验房记录信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | List<Map> selectApplyRoomDiscountRecordInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 修改验房记录信息 |
| | | * |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void updateApplyRoomDiscountRecordInfoInstance(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 查询验房记录总数(关联文件表) |
| | | * |
| | | * @param info 验房记录信息 |
| | | * @return 验房记录数量 |
| | | */ |
| | | int queryApplyRoomDiscountRecordsCount(Map info); |
| | | |
| | | /** |
| | | * 查询验房记录总数 |
| | | * |
| | | * @param info 验房记录信息 |
| | | * @return 验房记录数量 |
| | | */ |
| | | int selectApplyRoomDiscountRecordsCount(Map info); |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.community.dao.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.exception.DAOException; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.core.base.dao.BaseServiceDao; |
| | | import com.java110.community.dao.IApplyRoomDiscountRecordServiceDao; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 验房记录服务 与数据库交互 |
| | | * Created by wuxw on 2017/4/5. |
| | | */ |
| | | @Service("applyRoomDiscountRecordServiceDaoImpl") |
| | | //@Transactional |
| | | public class ApplyRoomDiscountRecordServiceDaoImpl extends BaseServiceDao implements IApplyRoomDiscountRecordServiceDao { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(ApplyRoomDiscountRecordServiceDaoImpl.class); |
| | | |
| | | /** |
| | | * 验房记录信息封装 |
| | | * |
| | | * @param businessApplyRoomDiscountRecordInfo 验房记录信息 封装 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void saveBusinessApplyRoomDiscountRecordInfo(Map businessApplyRoomDiscountRecordInfo) throws DAOException { |
| | | businessApplyRoomDiscountRecordInfo.put("month", DateUtil.getCurrentMonth()); |
| | | // 查询business_user 数据是否已经存在 |
| | | logger.debug("保存验房记录信息 入参 businessApplyRoomDiscountRecordInfo : {}", businessApplyRoomDiscountRecordInfo); |
| | | int saveFlag = sqlSessionTemplate.insert("applyRoomDiscountRecordServiceDaoImpl.saveBusinessApplyRoomDiscountRecordInfo", businessApplyRoomDiscountRecordInfo); |
| | | |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存验房记录数据失败:" + JSONObject.toJSONString(businessApplyRoomDiscountRecordInfo)); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询验房记录信息 |
| | | * |
| | | * @param info bId 信息 |
| | | * @return 验房记录信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public List<Map> getBusinessApplyRoomDiscountRecordInfo(Map info) throws DAOException { |
| | | |
| | | logger.debug("查询验房记录信息 入参 info : {}", info); |
| | | |
| | | List<Map> businessApplyRoomDiscountRecordInfos = sqlSessionTemplate.selectList("applyRoomDiscountRecordServiceDaoImpl.getBusinessApplyRoomDiscountRecordInfo", info); |
| | | |
| | | return businessApplyRoomDiscountRecordInfos; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 保存验房记录信息 到 instance |
| | | * |
| | | * @param info bId 信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public int saveApplyRoomDiscountRecordInfoInstance(Map info) throws DAOException { |
| | | logger.debug("保存验房记录信息Instance 入参 info : {}", info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("applyRoomDiscountRecordServiceDaoImpl.saveApplyRoomDiscountRecordInfoInstance", info); |
| | | |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存验房记录信息Instance数据失败:" + JSONObject.toJSONString(info)); |
| | | } |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int saveApplyRoomDiscountRecordInfo(Map info) throws DAOException { |
| | | logger.debug("保存验房记录信息Instance 入参 info : {}", info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("applyRoomDiscountRecordServiceDaoImpl.saveApplyRoomDiscountRecordInfo", info); |
| | | |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存验房记录信息Instance数据失败:" + JSONObject.toJSONString(info)); |
| | | } |
| | | return saveFlag; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询验房记录信息(instance) |
| | | * |
| | | * @param info bId 信息 |
| | | * @return List<Map> |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public List<Map> getApplyRoomDiscountRecordInfo(Map info) throws DAOException { |
| | | logger.debug("查询验房记录信息 入参 info : {}", info); |
| | | |
| | | List<Map> businessApplyRoomDiscountRecordInfos = sqlSessionTemplate.selectList("applyRoomDiscountRecordServiceDaoImpl.getApplyRoomDiscountRecordInfo", info); |
| | | |
| | | return businessApplyRoomDiscountRecordInfos; |
| | | } |
| | | |
| | | @Override |
| | | public List<Map> selectApplyRoomDiscountRecordInfo(Map info) throws DAOException { |
| | | logger.debug("查询验房记录信息 入参 info : {}", info); |
| | | |
| | | List<Map> businessApplyRoomDiscountRecordInfos = sqlSessionTemplate.selectList("applyRoomDiscountRecordServiceDaoImpl.selectApplyRoomDiscountRecordInfo", info); |
| | | |
| | | return businessApplyRoomDiscountRecordInfos; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改验房记录信息 |
| | | * |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void updateApplyRoomDiscountRecordInfoInstance(Map info) throws DAOException { |
| | | logger.debug("修改验房记录信息Instance 入参 info : {}", info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("applyRoomDiscountRecordServiceDaoImpl.updateApplyRoomDiscountRecordInfoInstance", info); |
| | | |
| | | if (saveFlag < 1) { |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "修改验房记录信息Instance数据失败:" + JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询验房记录数量 |
| | | * |
| | | * @param info 验房记录信息 |
| | | * @return 验房记录数量 |
| | | */ |
| | | @Override |
| | | public int queryApplyRoomDiscountRecordsCount(Map info) { |
| | | logger.debug("查询验房记录数据 入参 info : {}", info); |
| | | |
| | | List<Map> businessApplyRoomDiscountRecordInfos = sqlSessionTemplate.selectList("applyRoomDiscountRecordServiceDaoImpl.queryApplyRoomDiscountRecordsCount", info); |
| | | if (businessApplyRoomDiscountRecordInfos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(businessApplyRoomDiscountRecordInfos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | @Override |
| | | public int selectApplyRoomDiscountRecordsCount(Map info) { |
| | | logger.debug("查询验房记录数据 入参 info : {}", info); |
| | | |
| | | List<Map> businessApplyRoomDiscountRecordInfos = sqlSessionTemplate.selectList("applyRoomDiscountRecordServiceDaoImpl.selectApplyRoomDiscountRecordsCount", info); |
| | | if (businessApplyRoomDiscountRecordInfos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(businessApplyRoomDiscountRecordInfos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.community.listener.applyRoomDiscountRecord; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.core.event.service.AbstractBusinessServiceDataFlowListener; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.constant.StatusConstant; |
| | | import com.java110.utils.exception.ListenerExecuteException; |
| | | import com.java110.entity.center.Business; |
| | | import com.java110.community.dao.IApplyRoomDiscountRecordServiceDao; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 验房记录 服务侦听 父类 |
| | | * Created by wuxw on 2018/7/4. |
| | | */ |
| | | public abstract class AbstractApplyRoomDiscountRecordBusinessServiceDataFlowListener extends AbstractBusinessServiceDataFlowListener { |
| | | private static Logger logger = LoggerFactory.getLogger(AbstractApplyRoomDiscountRecordBusinessServiceDataFlowListener.class); |
| | | |
| | | |
| | | /** |
| | | * 获取 DAO工具类 |
| | | * |
| | | * @return |
| | | */ |
| | | public abstract IApplyRoomDiscountRecordServiceDao getApplyRoomDiscountRecordServiceDaoImpl(); |
| | | |
| | | /** |
| | | * 刷新 businessApplyRoomDiscountRecordInfo 数据 |
| | | * 主要将 数据库 中字段和 接口传递字段建立关系 |
| | | * |
| | | * @param businessApplyRoomDiscountRecordInfo |
| | | */ |
| | | protected void flushBusinessApplyRoomDiscountRecordInfo(Map businessApplyRoomDiscountRecordInfo, String statusCd) { |
| | | businessApplyRoomDiscountRecordInfo.put("newBId", businessApplyRoomDiscountRecordInfo.get("b_id")); |
| | | businessApplyRoomDiscountRecordInfo.put("ardrId", businessApplyRoomDiscountRecordInfo.get("ardr_id")); |
| | | businessApplyRoomDiscountRecordInfo.put("ardId", businessApplyRoomDiscountRecordInfo.get("ard_id")); |
| | | businessApplyRoomDiscountRecordInfo.put("createUserId", businessApplyRoomDiscountRecordInfo.get("create_user_id")); |
| | | businessApplyRoomDiscountRecordInfo.put("createUserName", businessApplyRoomDiscountRecordInfo.get("create_user_name")); |
| | | businessApplyRoomDiscountRecordInfo.put("remark", businessApplyRoomDiscountRecordInfo.get("remark")); |
| | | businessApplyRoomDiscountRecordInfo.put("communityId", businessApplyRoomDiscountRecordInfo.get("community_id")); |
| | | businessApplyRoomDiscountRecordInfo.put("isTrue", businessApplyRoomDiscountRecordInfo.get("is_true")); |
| | | businessApplyRoomDiscountRecordInfo.put("state", businessApplyRoomDiscountRecordInfo.get("state")); |
| | | businessApplyRoomDiscountRecordInfo.remove("bId"); |
| | | businessApplyRoomDiscountRecordInfo.put("statusCd", statusCd); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 当修改数据时,查询instance表中的数据 自动保存删除数据到business中 |
| | | * |
| | | * @param businessApplyRoomDiscountRecord 验房记录信息 |
| | | */ |
| | | protected void autoSaveDelBusinessApplyRoomDiscountRecord(Business business, JSONObject businessApplyRoomDiscountRecord) { |
| | | //自动插入DEL |
| | | Map info = new HashMap(); |
| | | info.put("ardrId", businessApplyRoomDiscountRecord.getString("ardrId")); |
| | | info.put("statusCd", StatusConstant.STATUS_CD_VALID); |
| | | List<Map> currentApplyRoomDiscountRecordInfos = getApplyRoomDiscountRecordServiceDaoImpl().getApplyRoomDiscountRecordInfo(info); |
| | | if (currentApplyRoomDiscountRecordInfos == null || currentApplyRoomDiscountRecordInfos.size() != 1) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR, "未找到需要修改数据信息,入参错误或数据有问题,请检查" + info); |
| | | } |
| | | |
| | | Map currentApplyRoomDiscountRecordInfo = currentApplyRoomDiscountRecordInfos.get(0); |
| | | |
| | | currentApplyRoomDiscountRecordInfo.put("bId", business.getbId()); |
| | | |
| | | currentApplyRoomDiscountRecordInfo.put("ardrId", currentApplyRoomDiscountRecordInfo.get("ardr_id")); |
| | | currentApplyRoomDiscountRecordInfo.put("ardId", currentApplyRoomDiscountRecordInfo.get("ard_id")); |
| | | currentApplyRoomDiscountRecordInfo.put("createUserId", currentApplyRoomDiscountRecordInfo.get("create_user_id")); |
| | | currentApplyRoomDiscountRecordInfo.put("createUserName", currentApplyRoomDiscountRecordInfo.get("create_user_name")); |
| | | currentApplyRoomDiscountRecordInfo.put("remark", currentApplyRoomDiscountRecordInfo.get("remark")); |
| | | currentApplyRoomDiscountRecordInfo.put("communityId", currentApplyRoomDiscountRecordInfo.get("community_id")); |
| | | currentApplyRoomDiscountRecordInfo.put("isTrue", currentApplyRoomDiscountRecordInfo.get("is_true")); |
| | | currentApplyRoomDiscountRecordInfo.put("state", currentApplyRoomDiscountRecordInfo.get("state")); |
| | | currentApplyRoomDiscountRecordInfo.put("operate", StatusConstant.OPERATE_DEL); |
| | | getApplyRoomDiscountRecordServiceDaoImpl().saveBusinessApplyRoomDiscountRecordInfo(currentApplyRoomDiscountRecordInfo); |
| | | for (Object key : currentApplyRoomDiscountRecordInfo.keySet()) { |
| | | if (businessApplyRoomDiscountRecord.get(key) == null) { |
| | | businessApplyRoomDiscountRecord.put(key.toString(), currentApplyRoomDiscountRecordInfo.get(key)); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.community.listener.applyRoomDiscountRecord; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.po.applyRoomDiscountRecord.ApplyRoomDiscountRecordPo; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.constant.StatusConstant; |
| | | import com.java110.utils.exception.ListenerExecuteException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.entity.center.Business; |
| | | import com.java110.community.dao.IApplyRoomDiscountRecordServiceDao; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 删除验房记录信息 侦听 |
| | | * <p> |
| | | * 处理节点 |
| | | * 1、businessApplyRoomDiscountRecord:{} 验房记录基本信息节点 |
| | | * 2、businessApplyRoomDiscountRecordAttr:[{}] 验房记录属性信息节点 |
| | | * 3、businessApplyRoomDiscountRecordPhoto:[{}] 验房记录照片信息节点 |
| | | * 4、businessApplyRoomDiscountRecordCerdentials:[{}] 验房记录证件信息节点 |
| | | * 协议地址 :https://github.com/java110/MicroCommunity/wiki/%E5%88%A0%E9%99%A4%E5%95%86%E6%88%B7%E4%BF%A1%E6%81%AF-%E5%8D%8F%E8%AE%AE |
| | | * Created by wuxw on 2018/5/18. |
| | | */ |
| | | @Java110Listener("deleteApplyRoomDiscountRecordInfoListener") |
| | | @Transactional |
| | | public class DeleteApplyRoomDiscountRecordInfoListener extends AbstractApplyRoomDiscountRecordBusinessServiceDataFlowListener { |
| | | |
| | | private final static Logger logger = LoggerFactory.getLogger(DeleteApplyRoomDiscountRecordInfoListener.class); |
| | | @Autowired |
| | | IApplyRoomDiscountRecordServiceDao applyRoomDiscountRecordServiceDaoImpl; |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return 3; |
| | | } |
| | | |
| | | @Override |
| | | public String getBusinessTypeCd() { |
| | | return BusinessTypeConstant.BUSINESS_TYPE_DELETE_APPLY_ROOM_DISCOUNT_RECORD; |
| | | } |
| | | |
| | | /** |
| | | * 根据删除信息 查出Instance表中数据 保存至business表 (状态写DEL) 方便撤单时直接更新回去 |
| | | * |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) { |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Assert.notEmpty(data, "没有datas 节点,或没有子节点需要处理"); |
| | | |
| | | //处理 businessApplyRoomDiscountRecord 节点 |
| | | if (data.containsKey(ApplyRoomDiscountRecordPo.class.getSimpleName())) { |
| | | Object _obj = data.get(ApplyRoomDiscountRecordPo.class.getSimpleName()); |
| | | JSONArray businessApplyRoomDiscountRecords = null; |
| | | if (_obj instanceof JSONObject) { |
| | | businessApplyRoomDiscountRecords = new JSONArray(); |
| | | businessApplyRoomDiscountRecords.add(_obj); |
| | | } else { |
| | | businessApplyRoomDiscountRecords = (JSONArray) _obj; |
| | | } |
| | | //JSONObject businessApplyRoomDiscountRecord = data.getJSONObject(ApplyRoomDiscountRecordPo.class.getSimpleName()); |
| | | for (int _applyRoomDiscountRecordIndex = 0; _applyRoomDiscountRecordIndex < businessApplyRoomDiscountRecords.size(); _applyRoomDiscountRecordIndex++) { |
| | | JSONObject businessApplyRoomDiscountRecord = businessApplyRoomDiscountRecords.getJSONObject(_applyRoomDiscountRecordIndex); |
| | | doBusinessApplyRoomDiscountRecord(business, businessApplyRoomDiscountRecord); |
| | | if (_obj instanceof JSONObject) { |
| | | dataFlowContext.addParamOut("ardrId", businessApplyRoomDiscountRecord.getString("ardrId")); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 删除 instance数据 |
| | | * |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) { |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | |
| | | //验房记录信息 |
| | | Map info = new HashMap(); |
| | | info.put("bId", business.getbId()); |
| | | info.put("operate", StatusConstant.OPERATE_DEL); |
| | | |
| | | //验房记录信息 |
| | | List<Map> businessApplyRoomDiscountRecordInfos = applyRoomDiscountRecordServiceDaoImpl.getBusinessApplyRoomDiscountRecordInfo(info); |
| | | if (businessApplyRoomDiscountRecordInfos != null && businessApplyRoomDiscountRecordInfos.size() > 0) { |
| | | for (int _applyRoomDiscountRecordIndex = 0; _applyRoomDiscountRecordIndex < businessApplyRoomDiscountRecordInfos.size(); _applyRoomDiscountRecordIndex++) { |
| | | Map businessApplyRoomDiscountRecordInfo = businessApplyRoomDiscountRecordInfos.get(_applyRoomDiscountRecordIndex); |
| | | flushBusinessApplyRoomDiscountRecordInfo(businessApplyRoomDiscountRecordInfo, StatusConstant.STATUS_CD_INVALID); |
| | | applyRoomDiscountRecordServiceDaoImpl.updateApplyRoomDiscountRecordInfoInstance(businessApplyRoomDiscountRecordInfo); |
| | | dataFlowContext.addParamOut("ardrId", businessApplyRoomDiscountRecordInfo.get("ardr_id")); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 撤单 |
| | | * 从business表中查询到DEL的数据 将instance中的数据更新回来 |
| | | * |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doRecover(DataFlowContext dataFlowContext, Business business) { |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | Map info = new HashMap(); |
| | | info.put("bId", bId); |
| | | info.put("statusCd", StatusConstant.STATUS_CD_INVALID); |
| | | |
| | | Map delInfo = new HashMap(); |
| | | delInfo.put("bId", business.getbId()); |
| | | delInfo.put("operate", StatusConstant.OPERATE_DEL); |
| | | //验房记录信息 |
| | | List<Map> applyRoomDiscountRecordInfo = applyRoomDiscountRecordServiceDaoImpl.getApplyRoomDiscountRecordInfo(info); |
| | | if (applyRoomDiscountRecordInfo != null && applyRoomDiscountRecordInfo.size() > 0) { |
| | | |
| | | //验房记录信息 |
| | | List<Map> businessApplyRoomDiscountRecordInfos = applyRoomDiscountRecordServiceDaoImpl.getBusinessApplyRoomDiscountRecordInfo(delInfo); |
| | | //除非程序出错了,这里不会为空 |
| | | if (businessApplyRoomDiscountRecordInfos == null || businessApplyRoomDiscountRecordInfos.size() == 0) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR, "撤单失败(applyRoomDiscountRecord),程序内部异常,请检查! " + delInfo); |
| | | } |
| | | for (int _applyRoomDiscountRecordIndex = 0; _applyRoomDiscountRecordIndex < businessApplyRoomDiscountRecordInfos.size(); _applyRoomDiscountRecordIndex++) { |
| | | Map businessApplyRoomDiscountRecordInfo = businessApplyRoomDiscountRecordInfos.get(_applyRoomDiscountRecordIndex); |
| | | flushBusinessApplyRoomDiscountRecordInfo(businessApplyRoomDiscountRecordInfo, StatusConstant.STATUS_CD_VALID); |
| | | applyRoomDiscountRecordServiceDaoImpl.updateApplyRoomDiscountRecordInfoInstance(businessApplyRoomDiscountRecordInfo); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 处理 businessApplyRoomDiscountRecord 节点 |
| | | * |
| | | * @param business 总的数据节点 |
| | | * @param businessApplyRoomDiscountRecord 验房记录节点 |
| | | */ |
| | | private void doBusinessApplyRoomDiscountRecord(Business business, JSONObject businessApplyRoomDiscountRecord) { |
| | | |
| | | Assert.jsonObjectHaveKey(businessApplyRoomDiscountRecord, "ardrId", "businessApplyRoomDiscountRecord 节点下没有包含 ardrId 节点"); |
| | | |
| | | if (businessApplyRoomDiscountRecord.getString("ardrId").startsWith("-")) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR, "ardrId 错误,不能自动生成(必须已经存在的ardrId)" + businessApplyRoomDiscountRecord); |
| | | } |
| | | //自动插入DEL |
| | | autoSaveDelBusinessApplyRoomDiscountRecord(business, businessApplyRoomDiscountRecord); |
| | | } |
| | | |
| | | @Override |
| | | public IApplyRoomDiscountRecordServiceDao getApplyRoomDiscountRecordServiceDaoImpl() { |
| | | return applyRoomDiscountRecordServiceDaoImpl; |
| | | } |
| | | |
| | | public void setApplyRoomDiscountRecordServiceDaoImpl(IApplyRoomDiscountRecordServiceDao applyRoomDiscountRecordServiceDaoImpl) { |
| | | this.applyRoomDiscountRecordServiceDaoImpl = applyRoomDiscountRecordServiceDaoImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.community.listener.applyRoomDiscountRecord; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.po.applyRoomDiscountRecord.ApplyRoomDiscountRecordPo; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.StatusConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.community.dao.IApplyRoomDiscountRecordServiceDao; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.entity.center.Business; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 保存 验房记录信息 侦听 |
| | | * Created by wuxw on 2018/5/18. |
| | | */ |
| | | @Java110Listener("saveApplyRoomDiscountRecordInfoListener") |
| | | @Transactional |
| | | public class SaveApplyRoomDiscountRecordInfoListener extends AbstractApplyRoomDiscountRecordBusinessServiceDataFlowListener { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(SaveApplyRoomDiscountRecordInfoListener.class); |
| | | |
| | | @Autowired |
| | | private IApplyRoomDiscountRecordServiceDao applyRoomDiscountRecordServiceDaoImpl; |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return 0; |
| | | } |
| | | |
| | | @Override |
| | | public String getBusinessTypeCd() { |
| | | return BusinessTypeConstant.BUSINESS_TYPE_SAVE_APPLY_ROOM_DISCOUNT_RECORD; |
| | | } |
| | | |
| | | /** |
| | | * 保存验房记录信息 business 表中 |
| | | * |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) { |
| | | JSONObject data = business.getDatas(); |
| | | Assert.notEmpty(data, "没有datas 节点,或没有子节点需要处理"); |
| | | |
| | | //处理 businessApplyRoomDiscountRecord 节点 |
| | | if (data.containsKey(ApplyRoomDiscountRecordPo.class.getSimpleName())) { |
| | | Object bObj = data.get(ApplyRoomDiscountRecordPo.class.getSimpleName()); |
| | | JSONArray businessApplyRoomDiscountRecords = null; |
| | | if (bObj instanceof JSONObject) { |
| | | businessApplyRoomDiscountRecords = new JSONArray(); |
| | | businessApplyRoomDiscountRecords.add(bObj); |
| | | } else { |
| | | businessApplyRoomDiscountRecords = (JSONArray) bObj; |
| | | } |
| | | //JSONObject businessApplyRoomDiscountRecord = data.getJSONObject(ApplyRoomDiscountRecordPo.class.getSimpleName()); |
| | | for (int bApplyRoomDiscountRecordIndex = 0; bApplyRoomDiscountRecordIndex < businessApplyRoomDiscountRecords.size(); bApplyRoomDiscountRecordIndex++) { |
| | | JSONObject businessApplyRoomDiscountRecord = businessApplyRoomDiscountRecords.getJSONObject(bApplyRoomDiscountRecordIndex); |
| | | doBusinessApplyRoomDiscountRecord(business, businessApplyRoomDiscountRecord); |
| | | if (bObj instanceof JSONObject) { |
| | | dataFlowContext.addParamOut("ardrId", businessApplyRoomDiscountRecord.getString("ardrId")); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * business 数据转移到 instance |
| | | * |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) { |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Map info = new HashMap(); |
| | | info.put("bId", business.getbId()); |
| | | info.put("operate", StatusConstant.OPERATE_ADD); |
| | | |
| | | //验房记录信息 |
| | | List<Map> businessApplyRoomDiscountRecordInfo = applyRoomDiscountRecordServiceDaoImpl.getBusinessApplyRoomDiscountRecordInfo(info); |
| | | if (businessApplyRoomDiscountRecordInfo != null && businessApplyRoomDiscountRecordInfo.size() > 0) { |
| | | reFreshShareColumn(info, businessApplyRoomDiscountRecordInfo.get(0)); |
| | | applyRoomDiscountRecordServiceDaoImpl.saveApplyRoomDiscountRecordInfoInstance(info); |
| | | if (businessApplyRoomDiscountRecordInfo.size() == 1) { |
| | | dataFlowContext.addParamOut("ardrId", businessApplyRoomDiscountRecordInfo.get(0).get("ardr_id")); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 刷 分片字段 |
| | | * |
| | | * @param info 查询对象 |
| | | * @param businessInfo 小区ID |
| | | */ |
| | | private void reFreshShareColumn(Map info, Map businessInfo) { |
| | | |
| | | if (info.containsKey("communityId")) { |
| | | return; |
| | | } |
| | | |
| | | if (!businessInfo.containsKey("community_id")) { |
| | | return; |
| | | } |
| | | |
| | | info.put("communityId", businessInfo.get("community_id")); |
| | | } |
| | | |
| | | /** |
| | | * 撤单 |
| | | * |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doRecover(DataFlowContext dataFlowContext, Business business) { |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | Map info = new HashMap(); |
| | | info.put("bId", bId); |
| | | info.put("statusCd", StatusConstant.STATUS_CD_VALID); |
| | | Map paramIn = new HashMap(); |
| | | paramIn.put("bId", bId); |
| | | paramIn.put("statusCd", StatusConstant.STATUS_CD_INVALID); |
| | | //验房记录信息 |
| | | List<Map> applyRoomDiscountRecordInfo = applyRoomDiscountRecordServiceDaoImpl.getApplyRoomDiscountRecordInfo(info); |
| | | if (applyRoomDiscountRecordInfo != null && applyRoomDiscountRecordInfo.size() > 0) { |
| | | reFreshShareColumn(paramIn, applyRoomDiscountRecordInfo.get(0)); |
| | | applyRoomDiscountRecordServiceDaoImpl.updateApplyRoomDiscountRecordInfoInstance(paramIn); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 处理 businessApplyRoomDiscountRecord 节点 |
| | | * |
| | | * @param business 总的数据节点 |
| | | * @param businessApplyRoomDiscountRecord 验房记录节点 |
| | | */ |
| | | private void doBusinessApplyRoomDiscountRecord(Business business, JSONObject businessApplyRoomDiscountRecord) { |
| | | |
| | | Assert.jsonObjectHaveKey(businessApplyRoomDiscountRecord, "ardrId", "businessApplyRoomDiscountRecord 节点下没有包含 ardrId 节点"); |
| | | |
| | | if (businessApplyRoomDiscountRecord.getString("ardrId").startsWith("-")) { |
| | | //刷新缓存 |
| | | //flushApplyRoomDiscountRecordId(business.getDatas()); |
| | | |
| | | businessApplyRoomDiscountRecord.put("ardrId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_ARDRID)); |
| | | |
| | | } |
| | | |
| | | businessApplyRoomDiscountRecord.put("bId", business.getbId()); |
| | | businessApplyRoomDiscountRecord.put("operate", StatusConstant.OPERATE_ADD); |
| | | //保存验房记录信息 |
| | | applyRoomDiscountRecordServiceDaoImpl.saveBusinessApplyRoomDiscountRecordInfo(businessApplyRoomDiscountRecord); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public IApplyRoomDiscountRecordServiceDao getApplyRoomDiscountRecordServiceDaoImpl() { |
| | | return applyRoomDiscountRecordServiceDaoImpl; |
| | | } |
| | | |
| | | public void setApplyRoomDiscountRecordServiceDaoImpl(IApplyRoomDiscountRecordServiceDao applyRoomDiscountRecordServiceDaoImpl) { |
| | | this.applyRoomDiscountRecordServiceDaoImpl = applyRoomDiscountRecordServiceDaoImpl; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.community.listener.applyRoomDiscountRecord; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.po.applyRoomDiscountRecord.ApplyRoomDiscountRecordPo; |
| | | import com.java110.utils.constant.BusinessTypeConstant; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.constant.StatusConstant; |
| | | import com.java110.utils.exception.ListenerExecuteException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.core.annotation.Java110Listener; |
| | | import com.java110.core.context.DataFlowContext; |
| | | import com.java110.entity.center.Business; |
| | | import com.java110.community.dao.IApplyRoomDiscountRecordServiceDao; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 修改验房记录信息 侦听 |
| | | * <p> |
| | | * 处理节点 |
| | | * 1、businessApplyRoomDiscountRecord:{} 验房记录基本信息节点 |
| | | * 2、businessApplyRoomDiscountRecordAttr:[{}] 验房记录属性信息节点 |
| | | * 3、businessApplyRoomDiscountRecordPhoto:[{}] 验房记录照片信息节点 |
| | | * 4、businessApplyRoomDiscountRecordCerdentials:[{}] 验房记录证件信息节点 |
| | | * 协议地址 :https://github.com/java110/MicroCommunity/wiki/%E4%BF%AE%E6%94%B9%E5%95%86%E6%88%B7%E4%BF%A1%E6%81%AF-%E5%8D%8F%E8%AE%AE |
| | | * Created by wuxw on 2018/5/18. |
| | | */ |
| | | @Java110Listener("updateApplyRoomDiscountRecordInfoListener") |
| | | @Transactional |
| | | public class UpdateApplyRoomDiscountRecordInfoListener extends AbstractApplyRoomDiscountRecordBusinessServiceDataFlowListener { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(UpdateApplyRoomDiscountRecordInfoListener.class); |
| | | @Autowired |
| | | private IApplyRoomDiscountRecordServiceDao applyRoomDiscountRecordServiceDaoImpl; |
| | | |
| | | @Override |
| | | public int getOrder() { |
| | | return 2; |
| | | } |
| | | |
| | | @Override |
| | | public String getBusinessTypeCd() { |
| | | return BusinessTypeConstant.BUSINESS_TYPE_UPDATE_APPLY_ROOM_DISCOUNT_RECORD; |
| | | } |
| | | |
| | | /** |
| | | * business过程 |
| | | * |
| | | * @param dataFlowContext 上下文对象 |
| | | * @param business 业务对象 |
| | | */ |
| | | @Override |
| | | protected void doSaveBusiness(DataFlowContext dataFlowContext, Business business) { |
| | | |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Assert.notEmpty(data, "没有datas 节点,或没有子节点需要处理"); |
| | | |
| | | |
| | | //处理 businessApplyRoomDiscountRecord 节点 |
| | | if (data.containsKey(ApplyRoomDiscountRecordPo.class.getSimpleName())) { |
| | | Object _obj = data.get(ApplyRoomDiscountRecordPo.class.getSimpleName()); |
| | | JSONArray businessApplyRoomDiscountRecords = null; |
| | | if (_obj instanceof JSONObject) { |
| | | businessApplyRoomDiscountRecords = new JSONArray(); |
| | | businessApplyRoomDiscountRecords.add(_obj); |
| | | } else { |
| | | businessApplyRoomDiscountRecords = (JSONArray) _obj; |
| | | } |
| | | //JSONObject businessApplyRoomDiscountRecord = data.getJSONObject(ApplyRoomDiscountRecordPo.class.getSimpleName()); |
| | | for (int _applyRoomDiscountRecordIndex = 0; _applyRoomDiscountRecordIndex < businessApplyRoomDiscountRecords.size(); _applyRoomDiscountRecordIndex++) { |
| | | JSONObject businessApplyRoomDiscountRecord = businessApplyRoomDiscountRecords.getJSONObject(_applyRoomDiscountRecordIndex); |
| | | doBusinessApplyRoomDiscountRecord(business, businessApplyRoomDiscountRecord); |
| | | if (_obj instanceof JSONObject) { |
| | | dataFlowContext.addParamOut("ardrId", businessApplyRoomDiscountRecord.getString("ardrId")); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * business to instance 过程 |
| | | * |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doBusinessToInstance(DataFlowContext dataFlowContext, Business business) { |
| | | |
| | | JSONObject data = business.getDatas(); |
| | | |
| | | Map info = new HashMap(); |
| | | info.put("bId", business.getbId()); |
| | | info.put("operate", StatusConstant.OPERATE_ADD); |
| | | |
| | | //验房记录信息 |
| | | List<Map> businessApplyRoomDiscountRecordInfos = applyRoomDiscountRecordServiceDaoImpl.getBusinessApplyRoomDiscountRecordInfo(info); |
| | | if (businessApplyRoomDiscountRecordInfos != null && businessApplyRoomDiscountRecordInfos.size() > 0) { |
| | | for (int _applyRoomDiscountRecordIndex = 0; _applyRoomDiscountRecordIndex < businessApplyRoomDiscountRecordInfos.size(); _applyRoomDiscountRecordIndex++) { |
| | | Map businessApplyRoomDiscountRecordInfo = businessApplyRoomDiscountRecordInfos.get(_applyRoomDiscountRecordIndex); |
| | | flushBusinessApplyRoomDiscountRecordInfo(businessApplyRoomDiscountRecordInfo, StatusConstant.STATUS_CD_VALID); |
| | | applyRoomDiscountRecordServiceDaoImpl.updateApplyRoomDiscountRecordInfoInstance(businessApplyRoomDiscountRecordInfo); |
| | | if (businessApplyRoomDiscountRecordInfo.size() == 1) { |
| | | dataFlowContext.addParamOut("ardrId", businessApplyRoomDiscountRecordInfo.get("ardr_id")); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 撤单 |
| | | * |
| | | * @param dataFlowContext 数据对象 |
| | | * @param business 当前业务对象 |
| | | */ |
| | | @Override |
| | | protected void doRecover(DataFlowContext dataFlowContext, Business business) { |
| | | |
| | | String bId = business.getbId(); |
| | | //Assert.hasLength(bId,"请求报文中没有包含 bId"); |
| | | Map info = new HashMap(); |
| | | info.put("bId", bId); |
| | | info.put("statusCd", StatusConstant.STATUS_CD_VALID); |
| | | Map delInfo = new HashMap(); |
| | | delInfo.put("bId", business.getbId()); |
| | | delInfo.put("operate", StatusConstant.OPERATE_DEL); |
| | | //验房记录信息 |
| | | List<Map> applyRoomDiscountRecordInfo = applyRoomDiscountRecordServiceDaoImpl.getApplyRoomDiscountRecordInfo(info); |
| | | if (applyRoomDiscountRecordInfo != null && applyRoomDiscountRecordInfo.size() > 0) { |
| | | |
| | | //验房记录信息 |
| | | List<Map> businessApplyRoomDiscountRecordInfos = applyRoomDiscountRecordServiceDaoImpl.getBusinessApplyRoomDiscountRecordInfo(delInfo); |
| | | //除非程序出错了,这里不会为空 |
| | | if (businessApplyRoomDiscountRecordInfos == null || businessApplyRoomDiscountRecordInfos.size() == 0) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_INNER_ERROR, "撤单失败(applyRoomDiscountRecord),程序内部异常,请检查! " + delInfo); |
| | | } |
| | | for (int _applyRoomDiscountRecordIndex = 0; _applyRoomDiscountRecordIndex < businessApplyRoomDiscountRecordInfos.size(); _applyRoomDiscountRecordIndex++) { |
| | | Map businessApplyRoomDiscountRecordInfo = businessApplyRoomDiscountRecordInfos.get(_applyRoomDiscountRecordIndex); |
| | | flushBusinessApplyRoomDiscountRecordInfo(businessApplyRoomDiscountRecordInfo, StatusConstant.STATUS_CD_VALID); |
| | | applyRoomDiscountRecordServiceDaoImpl.updateApplyRoomDiscountRecordInfoInstance(businessApplyRoomDiscountRecordInfo); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 处理 businessApplyRoomDiscountRecord 节点 |
| | | * |
| | | * @param business 总的数据节点 |
| | | * @param businessApplyRoomDiscountRecord 验房记录节点 |
| | | */ |
| | | private void doBusinessApplyRoomDiscountRecord(Business business, JSONObject businessApplyRoomDiscountRecord) { |
| | | |
| | | Assert.jsonObjectHaveKey(businessApplyRoomDiscountRecord, "ardrId", "businessApplyRoomDiscountRecord 节点下没有包含 ardrId 节点"); |
| | | |
| | | if (businessApplyRoomDiscountRecord.getString("ardrId").startsWith("-")) { |
| | | throw new ListenerExecuteException(ResponseConstant.RESULT_PARAM_ERROR, "ardrId 错误,不能自动生成(必须已经存在的ardrId)" + businessApplyRoomDiscountRecord); |
| | | } |
| | | //自动保存DEL |
| | | autoSaveDelBusinessApplyRoomDiscountRecord(business, businessApplyRoomDiscountRecord); |
| | | |
| | | businessApplyRoomDiscountRecord.put("bId", business.getbId()); |
| | | businessApplyRoomDiscountRecord.put("operate", StatusConstant.OPERATE_ADD); |
| | | //保存验房记录信息 |
| | | applyRoomDiscountRecordServiceDaoImpl.saveBusinessApplyRoomDiscountRecordInfo(businessApplyRoomDiscountRecord); |
| | | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public IApplyRoomDiscountRecordServiceDao getApplyRoomDiscountRecordServiceDaoImpl() { |
| | | return applyRoomDiscountRecordServiceDaoImpl; |
| | | } |
| | | |
| | | public void setApplyRoomDiscountRecordServiceDaoImpl(IApplyRoomDiscountRecordServiceDao applyRoomDiscountRecordServiceDaoImpl) { |
| | | this.applyRoomDiscountRecordServiceDaoImpl = applyRoomDiscountRecordServiceDaoImpl; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | * Created by wuxw on 2018/7/4. |
| | | */ |
| | | public abstract class AbstractRepairBusinessServiceDataFlowListener extends AbstractBusinessServiceDataFlowListener { |
| | | private static Logger logger = LoggerFactory.getLogger(AbstractRepairBusinessServiceDataFlowListener.class); |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(AbstractRepairBusinessServiceDataFlowListener.class); |
| | | |
| | | /** |
| | | * 获取 DAO工具类 |
| | |
| | | businessRepairInfo.put("maintenanceType", businessRepairInfo.get("maintenance_type")); |
| | | businessRepairInfo.put("repairMaterials", businessRepairInfo.get("repair_materials")); |
| | | businessRepairInfo.put("repairFee", businessRepairInfo.get("repair_fee")); |
| | | businessRepairInfo.put("payType", businessRepairInfo.get("pay_type")); |
| | | businessRepairInfo.remove("bId"); |
| | | businessRepairInfo.put("statusCd", statusCd); |
| | | } |
| | |
| | | * @param businessRepair 报修信息信息 |
| | | */ |
| | | protected void autoSaveDelBusinessRepair(Business business, JSONObject businessRepair) { |
| | | //自动插入DEL |
| | | //自动插入DEL |
| | | Map info = new HashMap(); |
| | | info.put("repairId", businessRepair.getString("repairId")); |
| | | info.put("statusCd", StatusConstant.STATUS_CD_VALID); |
| | |
| | | currentRepairInfo.put("maintenanceType", currentRepairInfo.get("maintenance_type")); |
| | | currentRepairInfo.put("repairMaterials", currentRepairInfo.get("repair_materials")); |
| | | currentRepairInfo.put("repairFee", currentRepairInfo.get("repair_fee")); |
| | | currentRepairInfo.put("payType", currentRepairInfo.get("pay_type")); |
| | | currentRepairInfo.put("operate", StatusConstant.OPERATE_DEL); |
| | | getRepairServiceDaoImpl().saveBusinessRepairInfo(currentRepairInfo); |
| | | |
| | |
| | | * Created by wuxw on 2018/7/4. |
| | | */ |
| | | public abstract class AbstractRoomBusinessServiceDataFlowListener extends AbstractBusinessServiceDataFlowListener { |
| | | private static Logger logger = LoggerFactory.getLogger(AbstractRoomBusinessServiceDataFlowListener.class); |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(AbstractRoomBusinessServiceDataFlowListener.class); |
| | | |
| | | /** |
| | | * 获取 DAO工具类 |
| | |
| | | businessRoomInfo.put("roomSubType", businessRoomInfo.get("room_sub_type")); |
| | | businessRoomInfo.put("roomRent", businessRoomInfo.get("room_rent")); |
| | | businessRoomInfo.put("roomArea", businessRoomInfo.get("room_area")); |
| | | businessRoomInfo.put("startTime", businessRoomInfo.get("start_time")); |
| | | businessRoomInfo.put("endTime", businessRoomInfo.get("end_time")); |
| | | businessRoomInfo.remove("bId"); |
| | | businessRoomInfo.put("statusCd", statusCd); |
| | | } |
| | |
| | | currentRoomInfo.put("roomSubType", currentRoomInfo.get("room_sub_type")); |
| | | currentRoomInfo.put("roomRent", currentRoomInfo.get("room_rent")); |
| | | currentRoomInfo.put("roomArea", currentRoomInfo.get("room_area")); |
| | | currentRoomInfo.put("startTime", currentRoomInfo.get("start_time")); |
| | | currentRoomInfo.put("endTime", currentRoomInfo.get("end_time")); |
| | | |
| | | currentRoomInfo.put("operate", StatusConstant.OPERATE_DEL); |
| | | getRoomServiceDaoImpl().saveBusinessRoomInfo(currentRoomInfo); |
| New file |
| | |
| | | package com.java110.community.smo.impl; |
| | | |
| | | import com.java110.community.dao.IApplyRoomDiscountRecordServiceDao; |
| | | import com.java110.intf.community.IApplyRoomDiscountRecordInnerServiceSMO; |
| | | import com.java110.dto.applyRoomDiscountRecord.ApplyRoomDiscountRecordDto; |
| | | import com.java110.intf.user.IUserInnerServiceSMO; |
| | | import com.java110.po.applyRoomDiscountRecord.ApplyRoomDiscountRecordPo; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.dto.user.UserDto; |
| | | import com.java110.dto.PageDto; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName FloorInnerServiceSMOImpl |
| | | * @Description 验房记录内部服务实现类 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 9:20 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | @RestController |
| | | public class ApplyRoomDiscountRecordInnerServiceSMOImpl extends BaseServiceSMO implements IApplyRoomDiscountRecordInnerServiceSMO { |
| | | |
| | | @Autowired |
| | | private IApplyRoomDiscountRecordServiceDao applyRoomDiscountRecordServiceDaoImpl; |
| | | |
| | | @Autowired |
| | | private IUserInnerServiceSMO userInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public List<ApplyRoomDiscountRecordDto> queryApplyRoomDiscountRecords(@RequestBody ApplyRoomDiscountRecordDto applyRoomDiscountRecordDto) { |
| | | |
| | | //校验是否传了 分页信息 |
| | | |
| | | int page = applyRoomDiscountRecordDto.getPage(); |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | applyRoomDiscountRecordDto.setPage((page - 1) * applyRoomDiscountRecordDto.getRow()); |
| | | } |
| | | |
| | | List<ApplyRoomDiscountRecordDto> applyRoomDiscountRecords = BeanConvertUtil.covertBeanList(applyRoomDiscountRecordServiceDaoImpl.getApplyRoomDiscountRecordInfo(BeanConvertUtil.beanCovertMap(applyRoomDiscountRecordDto)), ApplyRoomDiscountRecordDto.class); |
| | | |
| | | if (applyRoomDiscountRecords == null || applyRoomDiscountRecords.size() == 0) { |
| | | return applyRoomDiscountRecords; |
| | | } |
| | | |
| | | String[] userIds = getUserIds(applyRoomDiscountRecords); |
| | | //根据 userId 查询用户信息 |
| | | List<UserDto> users = userInnerServiceSMOImpl.getUserInfo(userIds); |
| | | |
| | | for (ApplyRoomDiscountRecordDto applyRoomDiscountRecord : applyRoomDiscountRecords) { |
| | | refreshApplyRoomDiscountRecord(applyRoomDiscountRecord, users); |
| | | } |
| | | return applyRoomDiscountRecords; |
| | | } |
| | | |
| | | @Override |
| | | public List<ApplyRoomDiscountRecordDto> selectApplyRoomDiscountRecords(@RequestBody ApplyRoomDiscountRecordDto applyRoomDiscountRecordDto) { |
| | | |
| | | //校验是否传了 分页信息 |
| | | |
| | | int page = applyRoomDiscountRecordDto.getPage(); |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | applyRoomDiscountRecordDto.setPage((page - 1) * applyRoomDiscountRecordDto.getRow()); |
| | | } |
| | | |
| | | List<ApplyRoomDiscountRecordDto> applyRoomDiscountRecords = BeanConvertUtil.covertBeanList(applyRoomDiscountRecordServiceDaoImpl.selectApplyRoomDiscountRecordInfo(BeanConvertUtil.beanCovertMap(applyRoomDiscountRecordDto)), ApplyRoomDiscountRecordDto.class); |
| | | |
| | | if (applyRoomDiscountRecords == null || applyRoomDiscountRecords.size() == 0) { |
| | | return applyRoomDiscountRecords; |
| | | } |
| | | |
| | | String[] userIds = getUserIds(applyRoomDiscountRecords); |
| | | //根据 userId 查询用户信息 |
| | | List<UserDto> users = userInnerServiceSMOImpl.getUserInfo(userIds); |
| | | |
| | | for (ApplyRoomDiscountRecordDto applyRoomDiscountRecord : applyRoomDiscountRecords) { |
| | | refreshApplyRoomDiscountRecord(applyRoomDiscountRecord, users); |
| | | } |
| | | return applyRoomDiscountRecords; |
| | | } |
| | | |
| | | /** |
| | | * 从用户列表中查询用户,将用户中的信息 刷新到 floor对象中 |
| | | * |
| | | * @param applyRoomDiscountRecord 小区验房记录信息 |
| | | * @param users 用户列表 |
| | | */ |
| | | private void refreshApplyRoomDiscountRecord(ApplyRoomDiscountRecordDto applyRoomDiscountRecord, List<UserDto> users) { |
| | | for (UserDto user : users) { |
| | | if (applyRoomDiscountRecord.getArdrId().equals(user.getUserId())) { |
| | | BeanConvertUtil.covertBean(user, applyRoomDiscountRecord); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取批量userId |
| | | * |
| | | * @param applyRoomDiscountRecords 小区楼信息 |
| | | * @return 批量userIds 信息 |
| | | */ |
| | | private String[] getUserIds(List<ApplyRoomDiscountRecordDto> applyRoomDiscountRecords) { |
| | | List<String> userIds = new ArrayList<String>(); |
| | | for (ApplyRoomDiscountRecordDto applyRoomDiscountRecord : applyRoomDiscountRecords) { |
| | | userIds.add(applyRoomDiscountRecord.getArdrId()); |
| | | } |
| | | |
| | | return userIds.toArray(new String[userIds.size()]); |
| | | } |
| | | |
| | | @Override |
| | | public int queryApplyRoomDiscountRecordsCount(@RequestBody ApplyRoomDiscountRecordDto applyRoomDiscountRecordDto) { |
| | | return applyRoomDiscountRecordServiceDaoImpl.queryApplyRoomDiscountRecordsCount(BeanConvertUtil.beanCovertMap(applyRoomDiscountRecordDto)); |
| | | } |
| | | |
| | | @Override |
| | | public int selectApplyRoomDiscountRecordsCount(@RequestBody ApplyRoomDiscountRecordDto applyRoomDiscountRecordDto) { |
| | | return applyRoomDiscountRecordServiceDaoImpl.selectApplyRoomDiscountRecordsCount(BeanConvertUtil.beanCovertMap(applyRoomDiscountRecordDto)); |
| | | } |
| | | |
| | | @Override |
| | | public int saveApplyRoomDiscountRecord(@RequestBody ApplyRoomDiscountRecordPo applyRoomDiscountRecordPo) { |
| | | return applyRoomDiscountRecordServiceDaoImpl.saveApplyRoomDiscountRecordInfo(BeanConvertUtil.beanCovertMap(applyRoomDiscountRecordPo)); |
| | | } |
| | | |
| | | @Override |
| | | public int deleteApplyRoomDiscountRecord(@RequestBody ApplyRoomDiscountRecordPo applyRoomDiscountRecordPo) { |
| | | int saveFlag = 1; |
| | | applyRoomDiscountRecordPo.setStatusCd("1"); |
| | | applyRoomDiscountRecordServiceDaoImpl.updateApplyRoomDiscountRecordInfoInstance(BeanConvertUtil.beanCovertMap(applyRoomDiscountRecordPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | public IApplyRoomDiscountRecordServiceDao getApplyRoomDiscountRecordServiceDaoImpl() { |
| | | return applyRoomDiscountRecordServiceDaoImpl; |
| | | } |
| | | |
| | | public void setApplyRoomDiscountRecordServiceDaoImpl(IApplyRoomDiscountRecordServiceDao applyRoomDiscountRecordServiceDaoImpl) { |
| | | this.applyRoomDiscountRecordServiceDaoImpl = applyRoomDiscountRecordServiceDaoImpl; |
| | | } |
| | | |
| | | public IUserInnerServiceSMO getUserInnerServiceSMOImpl() { |
| | | return userInnerServiceSMOImpl; |
| | | } |
| | | |
| | | public void setUserInnerServiceSMOImpl(IUserInnerServiceSMO userInnerServiceSMOImpl) { |
| | | this.userInnerServiceSMOImpl = userInnerServiceSMOImpl; |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 修改优惠申请 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /applyRoomDiscount/editApplyRoomDiscount |
| | | * @path /app/applyRoomDiscount/editApplyRoomDiscount |
| | | */ |
| | | @RequestMapping(value = "/editApplyRoomDiscount", method = RequestMethod.POST) |
| | | public ResponseEntity<String> editApplyRoomDiscount(@RequestBody JSONObject reqJson, @RequestHeader(value = "user-id") String userId) { |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId"); |
| | | Assert.hasKeyAndValue(reqJson, "state", "请求报文中未包含验房状态"); |
| | | Assert.hasKeyAndValue(reqJson, "startTime", "请求报文中未包含开始时间"); |
| | | Assert.hasKeyAndValue(reqJson, "endTime", "请求报文中未包含结束时间"); |
| | | Assert.hasKeyAndValue(reqJson, "ardId", "ardId不能为空"); |
| | | ApplyRoomDiscountPo applyRoomDiscountPo = BeanConvertUtil.covertBean(reqJson, ApplyRoomDiscountPo.class); |
| | | return updateApplyRoomDiscountBMOImpl.update(applyRoomDiscountPo); |
| | | } |
| | | |
| | | /** |
| | | * 审批接口 |
| | | * |
| | | * @param reqJson |
| | |
| | | row.createCell(7).setCellValue(dataObj.getString("supplierName")); |
| | | row.createCell(8).setCellValue(dataObj.getString("shName")); |
| | | row.createCell(9).setCellValue(dataObj.getString("warehousingWayName") + dataObj.getString("resOrderTypeName")); |
| | | row.createCell(10).setCellValue(dataObj.getString("quantity")); |
| | | row.createCell(11).setCellValue(dataObj.getString("purchaseQuantity")); |
| | | row.createCell(10).setCellValue(dataObj.getString("quantity") + dataObj.getString("unitCodeName")); |
| | | row.createCell(11).setCellValue(dataObj.getString("purchaseQuantity") + dataObj.getString("unitCodeName")); |
| | | row.createCell(12).setCellValue(dataObj.getString("price")); |
| | | if (!StringUtil.isEmpty(dataObj.getString("resOrderType")) && dataObj.getString("resOrderType").equals("10000") && |
| | | !StringUtil.isEmpty(dataObj.getString("purchaseQuantity")) && !StringUtil.isEmpty(dataObj.getString("price"))) { //状态是入库 |
| | |
| | | row.createCell(2).setCellValue("物品类型"); |
| | | row.createCell(3).setCellValue("物品名称"); |
| | | row.createCell(4).setCellValue("物品规格"); |
| | | row.createCell(5).setCellValue("原有库存"); |
| | | row.createCell(5).setCellValue("被调仓库原库存"); |
| | | row.createCell(6).setCellValue("调拨数量"); |
| | | row.createCell(7).setCellValue("前仓库名称"); |
| | | row.createCell(8).setCellValue("后仓库名称"); |
| | | row.createCell(7).setCellValue("被调仓库"); |
| | | row.createCell(8).setCellValue("目标仓库"); |
| | | row.createCell(9).setCellValue("申请人ID"); |
| | | row.createCell(10).setCellValue("申请人"); |
| | | row.createCell(11).setCellValue("调拨说明"); |
| | |
| | | row.createCell(2).setCellValue(dataObj.getString("rstName")); |
| | | row.createCell(3).setCellValue(dataObj.getString("resName")); |
| | | row.createCell(4).setCellValue(dataObj.getString("specName")); |
| | | row.createCell(5).setCellValue(dataObj.getString("originalStock")); |
| | | row.createCell(6).setCellValue(dataObj.getString("stock")); |
| | | row.createCell(5).setCellValue(dataObj.getString("originalStock") + dataObj.getString("unitCodeName")); |
| | | row.createCell(6).setCellValue(dataObj.getString("stock") + dataObj.getString("unitCodeName")); |
| | | if (!StringUtil.isEmpty(dataObj.getString("applyType")) && dataObj.getString("applyType").equals("20000")) { //返还 |
| | | row.createCell(7).setCellValue(dataObj.getString("startUserName")); |
| | | } else { |
| | |
| | | } else { |
| | | row.createCell(7).setCellValue("--"); |
| | | } |
| | | row.createCell(8).setCellValue(dataObj.getString("stock")); |
| | | row.createCell(9).setCellValue(dataObj.getString("unitCodeName") + "=" + dataObj.getString("miniUnitStock") + dataObj.getString("miniUnitCodeName")); |
| | | row.createCell(10).setCellValue(dataObj.getString("miniStock")); |
| | | row.createCell(8).setCellValue(dataObj.getString("stock") + dataObj.getString("unitCodeName")); |
| | | row.createCell(9).setCellValue(dataObj.getString("stock") + dataObj.getString("unitCodeName") + "=" + dataObj.getString("miniUnitStock") + dataObj.getString("miniUnitCodeName")); |
| | | row.createCell(10).setCellValue(dataObj.getString("miniStock") + dataObj.getString("miniUnitCodeName")); |
| | | row.createCell(11).setCellValue(dataObj.getString("averagePrice")); |
| | | if (!StringUtil.isEmpty(dataObj.getString("stock")) && !StringUtil.isEmpty(dataObj.getString("averagePrice"))) { |
| | | //获取物品库存数量 |
| | |
| | | row.createCell(4).setCellValue(dataObj.getString("specName")); |
| | | row.createCell(5).setCellValue(dataObj.getString("acceptUserId")); |
| | | row.createCell(6).setCellValue(dataObj.getString("acceptUserName")); |
| | | row.createCell(7).setCellValue(dataObj.getString("stock")); |
| | | row.createCell(8).setCellValue(dataObj.getString("giveQuantity")); |
| | | row.createCell(7).setCellValue(dataObj.getString("stock") + dataObj.getString("unitCodeName")); |
| | | row.createCell(8).setCellValue(dataObj.getString("giveQuantity") + dataObj.getString("miniUnitCodeName")); |
| | | row.createCell(9).setCellValue(dataObj.getString("createTime")); |
| | | row.createCell(10).setCellValue(dataObj.getString("remark")); |
| | | } |
| | |
| | | row.createCell(3).setCellValue(dataObj.getString("rstName")); |
| | | row.createCell(4).setCellValue(dataObj.getString("resourceStoreName")); |
| | | row.createCell(5).setCellValue(dataObj.getString("specName")); |
| | | row.createCell(6).setCellValue(dataObj.getString("quantity")); |
| | | row.createCell(6).setCellValue(dataObj.getString("quantity") + dataObj.getString("miniUnitCodeName")); |
| | | row.createCell(7).setCellValue(dataObj.getString("unitPrice")); |
| | | row.createCell(8).setCellValue(dataObj.getString("createUserId")); |
| | | row.createCell(9).setCellValue(dataObj.getString("createUserName")); |
| | |
| | | @RequestParam(value = "configId", required = false) String configId, |
| | | @RequestParam(value = "startTime", required = false) String startTime, |
| | | @RequestParam(value = "endTime", required = false) String endTime, |
| | | @RequestParam(value = "objId", required = false) String objId, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto = new ReportFeeMonthStatisticsDto(); |
| | |
| | | reportFeeMonthStatisticsDto.setConfigId(configId); |
| | | reportFeeMonthStatisticsDto.setStartTime(startTime); |
| | | reportFeeMonthStatisticsDto.setEndTime(endTime); |
| | | reportFeeMonthStatisticsDto.setObjId(objId); |
| | | return getReportFeeMonthStatisticsBMOImpl.queryPayFeeDetail(reportFeeMonthStatisticsDto); |
| | | } |
| | | |
| | |
| | | OwnerRoomRelDto ownerRoomRelDto = new OwnerRoomRelDto(); |
| | | ownerRoomRelDto.setRoomId(repairDtos.get(0).getRepairObjId()); |
| | | List<OwnerRoomRelDto> ownerRoomRelDtos = ownerRoomRelInnerServiceSMOImpl.queryOwnerRoomRels(ownerRoomRelDto); |
| | | Assert.listOnlyOne(ownerRoomRelDtos, "查询业主房屋关系表错误!"); |
| | | OwnerDto ownerDto = new OwnerDto(); |
| | | ownerDto.setOwnerId(ownerRoomRelDtos.get(0).getOwnerId()); |
| | | ownerDto.setOwnerTypeCd("1001"); //业主本人 |
| | | List<OwnerDto> ownerDtos = ownerInnerServiceSMOImpl.queryOwners(ownerDto); |
| | | Assert.listOnlyOne(ownerDtos, "查询业主信息错误!"); |
| | | reportFeeMonthStatistics.setOwnerName(ownerDtos.get(0).getName()); |
| | | if (ownerRoomRelDtos != null && ownerRoomRelDtos.size() == 0) { //查询条数为0条 |
| | | OwnerRoomRelDto ownerRoomRel = new OwnerRoomRelDto(); |
| | | ownerRoomRel.setRoomId(repairDtos.get(0).getRepairObjId()); |
| | | ownerRoomRel.setStatusCd("1"); //看看业主房屋关系数据是否删除了 |
| | | List<OwnerRoomRelDto> ownerRoomRels = ownerRoomRelInnerServiceSMOImpl.queryOwnerRoomRels(ownerRoomRel); |
| | | Assert.listOnlyOne(ownerRoomRels, "查询业主房屋关系表错误!"); |
| | | OwnerDto owner = new OwnerDto(); |
| | | owner.setOwnerId(ownerRoomRels.get(0).getOwnerId()); |
| | | owner.setOwnerTypeCd("1001"); //业主本人 |
| | | List<OwnerDto> owners = ownerInnerServiceSMOImpl.queryOwners(owner); |
| | | if (owners != null && owners.size() == 0) { //查出条数为0条 |
| | | //判断业主是否删除了 |
| | | OwnerDto newOwner = new OwnerDto(); |
| | | newOwner.setOwnerId(ownerRoomRels.get(0).getOwnerId()); |
| | | newOwner.setOwnerTypeCd("1001"); //业主本人 |
| | | newOwner.setStatusCd("1"); |
| | | List<OwnerDto> newOwners = ownerInnerServiceSMOImpl.queryOwners(newOwner); |
| | | Assert.listOnlyOne(newOwners, "查询业主信息错误!"); |
| | | reportFeeMonthStatistics.setOwnerName(newOwners.get(0).getName()); |
| | | } else if (owners != null && owners.size() == 1) { //查出条数为1条 |
| | | reportFeeMonthStatistics.setOwnerName(owners.get(0).getName()); |
| | | } else { |
| | | throw new IllegalArgumentException("查询业主信息错误!"); |
| | | } |
| | | } else if (ownerRoomRelDtos != null && ownerRoomRelDtos.size() == 1) { //查询条数为1条 |
| | | OwnerDto ownerDto = new OwnerDto(); |
| | | ownerDto.setOwnerId(ownerRoomRelDtos.get(0).getOwnerId()); |
| | | ownerDto.setOwnerTypeCd("1001"); //业主本人 |
| | | List<OwnerDto> ownerDtos = ownerInnerServiceSMOImpl.queryOwners(ownerDto); |
| | | if (ownerDtos != null && ownerDtos.size() == 0) { //业主查询条数为0条 |
| | | //判断业主是否删除了 |
| | | OwnerDto newOwner = new OwnerDto(); |
| | | newOwner.setOwnerId(ownerRoomRelDtos.get(0).getOwnerId()); |
| | | newOwner.setOwnerTypeCd("1001"); //业主本人 |
| | | newOwner.setStatusCd("1"); |
| | | List<OwnerDto> newOwners = ownerInnerServiceSMOImpl.queryOwners(newOwner); |
| | | Assert.listOnlyOne(newOwners, "查询业主信息错误!"); |
| | | reportFeeMonthStatistics.setOwnerName(newOwners.get(0).getName()); |
| | | } else if (ownerDtos != null || ownerDtos.size() == 1) { |
| | | reportFeeMonthStatistics.setOwnerName(ownerDtos.get(0).getName()); |
| | | } else { |
| | | throw new IllegalArgumentException("查询业主信息错误!"); |
| | | } |
| | | } else { |
| | | throw new IllegalArgumentException("查询业主房屋关系表错误!"); |
| | | } |
| | | } |
| | | } |
| | | reportList.add(reportFeeMonthStatistics); |
| | |
| | | try { |
| | | doDealCarFee(tmpReportCarDto, tmpReportFeeDto); |
| | | } catch (Exception e) { |
| | | logger.error("处理房屋费用失败" + JSONObject.toJSONString(tmpReportFeeDto), e); |
| | | logger.error("处理车辆费用失败" + JSONObject.toJSONString(tmpReportFeeDto), e); |
| | | } |
| | | } |
| | | } |
| | |
| | | @RequestMapping(value = "/getCollectionAuditOrder", method = RequestMethod.GET) |
| | | public ResponseEntity<String> getCollectionAuditOrder(@RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row, |
| | | @RequestParam(value = "communityId") String communityId, |
| | | @RequestHeader(value = "user-id") String userId, |
| | | @RequestHeader(value = "store-id") String storeId) { |
| | | AuditUser auditUser = new AuditUser(); |
| | |
| | | auditUser.setPage(page); |
| | | auditUser.setRow(row); |
| | | auditUser.setStoreId(storeId); |
| | | auditUser.setCommunityId(communityId); |
| | | return getCollectionAuditOrderBMOImpl.auditOrder(auditUser); |
| | | } |
| | | |
| | |
| | | */ |
| | | private void reFreshShareColumn(Map info, Map businessInfo) { |
| | | |
| | | if (info.containsKey("resId")) { |
| | | if (info.containsKey("objId")) { |
| | | return; |
| | | } |
| | | |
| | | if (!businessInfo.containsKey("res_id")) { |
| | | if (!businessInfo.containsKey("obj_id")) { |
| | | return; |
| | | } |
| | | |
| | | info.put("resId", businessInfo.get("res_id")); |
| | | info.put("objId", businessInfo.get("obj_id")); |
| | | } |
| | | |
| | | /** |
| | |
| | | ownerInfo.put("ownerTypeCd", OwnerTypeConstant.OWNER); |
| | | // ownerInfo.put("ownerIds", getOwnerIds(communityMemberDtos)); |
| | | //ownerInfo.put("ownerTypeCd", ownerDto.getOwnerTypeCd()); |
| | | ownerInfo.put("statusCd", StatusConstant.STATUS_CD_VALID); |
| | | // ownerInfo.put("statusCd", StatusConstant.STATUS_CD_VALID); |
| | | |
| | | List<OwnerDto> owners = BeanConvertUtil.covertBeanList(ownerServiceDaoImpl.getOwnerInfo(ownerInfo), OwnerDto.class); |
| | | |