Просмотр исходного кода

[铜锣湾][修改][预账单]

release_toaliyun_real
luozukai 7 лет назад
committed by Stormeye Wu
Родитель
Сommit
78736c9565
2 измененных файлов: 35 добавлений и 48 удалений
  1. +4
    -7
      mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java
  2. +31
    -41
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java

+ 4
- 7
mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java Просмотреть файл

@@ -276,9 +276,10 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
message = "更新物业合同信息成功";
}

try {
record.getFlowParams().put("businessId",record.getId().toString());
wxFlowService.start(record.getFlowParams(),userId,userName,record.getTenantId());
//启动审批流
if(!CollectionUtils.isEmpty(record.getFlowParams())) {
record.getFlowParams().put("businessId", record.getId().toString());
wxFlowService.start(record.getFlowParams(), userId, userName, record.getTenantId());

// 合同状态改成待签约
WxPropertyContract updateRentContract = new WxPropertyContract();
@@ -286,10 +287,6 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
updateRentContract.setStatus(EnumRentContractStatus.WAIT_SIGN.getCode());
wxPropertyContractMapper.updateStatus(updateRentContract);
logger.info("id:{},启动审批流成功",record.getId().toString());
} catch (Exception e) {
e.printStackTrace();
logger.error("启动审批流失败,e:" + e.getMessage());
throw new MallinkException(ErrorCode.FLOW_FAIL.getCode(), "FLOW FAILD " + e.getMessage());
}

// 保存调整金额(预账单调整)


+ 31
- 41
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java Просмотреть файл

@@ -217,25 +217,20 @@ public class WxRentContractServiceImpl implements WxRentContractService {
throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage());
}

try {
// 启动审批流
if(record.getFlowParams() != null){
record.getFlowParams().put("businessId",record.getId().toString());
if(record.getMerchantId() != null) {
record.getFlowParams().put("supplement", true); //设置补录
}
wxFlowService.start(record.getFlowParams(),userId,userName,record.getTenantId());

// 合同状态改成待签约
WxRentContract updateRentContract = new WxRentContract();
updateRentContract.setId(record.getId());
updateRentContract.setStatus(EnumRentContractStatus.WAIT_SIGN.getCode());
wxRentContractMapper.updateStatus(updateRentContract);
logger.info("id:{},启动审批流成功, 是否补录:{}",record.getId().toString(),record.getMerchantId() != null);
// 启动审批流
if(record.getFlowParams() != null){
record.getFlowParams().put("businessId",record.getId().toString());
if(record.getMerchantId() != null) {
record.getFlowParams().put("supplement", true); //设置补录
}
} catch (Exception e) {
logger.error("启动审批流失败,e:" + e.getMessage());
throw new MallinkException(ErrorCode.FLOW_FAIL.getCode(), "FLOW FAILD " + e.getMessage());
wxFlowService.start(record.getFlowParams(),userId,userName,record.getTenantId());

// 合同状态改成待签约
WxRentContract updateRentContract = new WxRentContract();
updateRentContract.setId(record.getId());
updateRentContract.setStatus(EnumRentContractStatus.WAIT_SIGN.getCode());
wxRentContractMapper.updateStatus(updateRentContract);
logger.info("id:{},启动审批流成功, 是否补录:{}",record.getId().toString(),record.getMerchantId() != null);
}

//生成预览账单(补录第二步,第三步走编辑)
@@ -928,32 +923,27 @@ public class WxRentContractServiceImpl implements WxRentContractService {
@Transactional(rollbackFor = {Exception.class})
public ResultData updateFile(WxRentContract record, Long userId,String userName) {
ResultData resultData = getResultDataForUpdate(record, userId);
try {
// 启动审批流
if(record.getFlowParams() != null){
record.getFlowParams().put("businessId",record.getId().toString());
if(record.getMerchantId() != null) {
record.getFlowParams().put("supplement", true); //设置补录
}
wxFlowService.start(record.getFlowParams(),userId,userName,record.getTenantId());

// 合同状态改成待签约
WxRentContract updateRentContract = new WxRentContract();
updateRentContract.setId(record.getId());
updateRentContract.setStatus(EnumRentContractStatus.WAIT_SIGN.getCode());
wxRentContractMapper.updateStatus(updateRentContract);
logger.info("id:{},启动审批流成功,是否补录:{}",record.getId().toString(),record.getMerchantId() != null);
// 启动审批流
if(record.getFlowParams() != null){
record.getFlowParams().put("businessId",record.getId().toString());
if(record.getMerchantId() != null) {
record.getFlowParams().put("supplement", true); //设置补录
}
wxFlowService.start(record.getFlowParams(),userId,userName,record.getTenantId());

// 保存调整金额(预账单调整)
if(!CollectionUtils.isEmpty(record.getPreviewBillRentList())){
for (WxBillRent wxBillRent:record.getPreviewBillRentList()) {
wxBillRentMapper.update(wxBillRent);
}
// 合同状态改成待签约
WxRentContract updateRentContract = new WxRentContract();
updateRentContract.setId(record.getId());
updateRentContract.setStatus(EnumRentContractStatus.WAIT_SIGN.getCode());
wxRentContractMapper.updateStatus(updateRentContract);
logger.info("id:{},启动审批流成功,是否补录:{}",record.getId().toString(),record.getMerchantId() != null);
}

// 保存调整金额(预账单调整)
if(!CollectionUtils.isEmpty(record.getPreviewBillRentList())){
for (WxBillRent wxBillRent:record.getPreviewBillRentList()) {
wxBillRentMapper.update(wxBillRent);
}
} catch (Exception e) {
logger.error("启动审批流失败,e:" + e.getMessage());
throw new MallinkException(ErrorCode.FLOW_FAIL.getCode(), "FLOW FAILD " + e.getMessage());
}
return resultData;
}


Загрузка…
Отмена
Сохранить