From 78b3e29a8e9a3a8faa36d71b43cbf786c1e38bd5 Mon Sep 17 00:00:00 2001 From: luozukai Date: Sat, 15 Jun 2019 09:18:12 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=A1=E6=89=B9][=E4=BF=AE=E6=94=B9][?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=90=AF=E5=8A=A8=E5=AE=A1=E6=89=B9]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/WxPropertyContractServiceImpl.java | 14 +++++--- .../impl/WxRentContractServiceImpl.java | 34 ++++++++++--------- 2 files changed, 27 insertions(+), 21 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java index 6f0348b0f..e8e965389 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java @@ -330,11 +330,10 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService message = "更新物业合同信息成功"; } - //启动审批流 - if(record.getFlowParams()==null || wxFlowService.getModelByType((Integer)record.getFlowParams().get("businessType"),record.getTenantId()) == null){ - updatePropertyContractStatus(record.getId()); - }else{ - if(!CollectionUtils.isEmpty(record.getFlowParams())) { + if (!CollectionUtils.isEmpty(record.getFlowParams())) { + if(wxFlowService.getModelByType((Integer)record.getFlowParams().get("businessType"),record.getTenantId()) == null){ + updatePropertyContractStatus(record.getId()); + }else{ record.getFlowParams().put("businessId", record.getId().toString()); wxFlowService.start(record.getFlowParams(), userId, userName, record.getTenantId()); @@ -346,6 +345,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService logger.info("id:{},启动审批流成功", record.getId().toString()); } } + return new ResultData(Result.SUCCESS, message, record); } @@ -941,6 +941,10 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService wxBillProperty.setPropertyContractId(wxPropertyContract.getId()); wxBillPropertyMapper.updateInvalidStatus(wxBillProperty); } + + public static void main(String[] args) { + System.out.println(3&1100); + } } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java index 3649b85ca..e03625e64 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java @@ -354,11 +354,11 @@ public class WxRentContractServiceImpl implements WxRentContractService { throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); } - // 启动审批流 - if(record.getFlowParams()==null || wxFlowService.getModelByType((Integer)record.getFlowParams().get("businessType"),record.getTenantId()) == null){ - updateRentContractStatus(record.getId()); - }else{ - if(record.getFlowParams() != null) { + //有模板,启动审批流,没有,直接生产账单 + if (!CollectionUtils.isEmpty(record.getFlowParams())){ + if(wxFlowService.getModelByType((Integer)record.getFlowParams().get("businessType"),record.getTenantId()) == null){ + updateRentContractStatus(record.getId()); + }else{ record.getFlowParams().put("businessId", record.getId().toString()); if (record.getMerchantId() != null) { record.getFlowParams().put("supplement", true); //设置补录 @@ -410,11 +410,11 @@ public class WxRentContractServiceImpl implements WxRentContractService { } } - //启动审批流 - if(record.getFlowParams()==null || wxFlowService.getModelByType((Integer)record.getFlowParams().get("businessType"),record.getTenantId()) == null){ - updateRentContractStatus(record.getId()); - }else{ - if(record.getFlowParams() != null) { + //有模板,启动审批流,没有,直接生产账单 + if (!CollectionUtils.isEmpty(record.getFlowParams())) { + if(wxFlowService.getModelByType((Integer)record.getFlowParams().get("businessType"),record.getTenantId()) == null){ + updateRentContractStatus(record.getId()); + }else{ record.getFlowParams().put("businessId", record.getId().toString()); if (record.getMerchantId() != null) { record.getFlowParams().put("supplement", true); //设置补录 @@ -430,6 +430,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { } } + // 保存调整金额(预账单调整) if(!CollectionUtils.isEmpty(record.getPreviewBillRentList())){ wxBillRentMapper.updateBills(record.getPreviewBillRentList()); @@ -1299,12 +1300,12 @@ public class WxRentContractServiceImpl implements WxRentContractService { if (resultData.code != Result.SUCCESS) { return resultData; } - //启动审批流 - //判断是否配置模板 - if(record.getFlowParams()==null || wxFlowService.getModelByType((Integer)record.getFlowParams().get("businessType"),record.getTenantId()) == null){ - updateRentContractStatus(record.getId()); - }else{ - if(record.getFlowParams() != null) { + + //有模板,启动审批流,没有,直接生产账单 + if (!CollectionUtils.isEmpty(record.getFlowParams())) { + if(wxFlowService.getModelByType((Integer)record.getFlowParams().get("businessType"),record.getTenantId()) == null){ + updateRentContractStatus(record.getId()); + }else{ record.getFlowParams().put("businessId", record.getId().toString()); if (record.getMerchantId() != null) { record.getFlowParams().put("supplement", true); //设置补录 @@ -1319,6 +1320,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { logger.info("id:{},启动审批流成功,是否补录:{}", record.getId().toString(), record.getMerchantId() != null); } } + return resultData; }