Merge branch 'dev' into test
This commit is contained in:
@@ -32,10 +32,10 @@ public class DeductRespDTO {
|
||||
private String rangeWay;
|
||||
|
||||
@Schema(description = "上限")
|
||||
private String up;
|
||||
private BigDecimal up;
|
||||
|
||||
@Schema(description = "下限")
|
||||
private String down;
|
||||
private BigDecimal down;
|
||||
|
||||
@Schema(description = "类型(字典:STLM_COEF)")
|
||||
private String type;
|
||||
|
||||
@@ -31,10 +31,10 @@ public class DeductRespVO {
|
||||
private String rangeWay;
|
||||
|
||||
@Schema(description = "上限")
|
||||
private String up;
|
||||
private BigDecimal up;
|
||||
|
||||
@Schema(description = "下限")
|
||||
private String down;
|
||||
private BigDecimal down;
|
||||
|
||||
@Schema(description = "类型(字典:STLM_COEF)")
|
||||
private String type;
|
||||
|
||||
@@ -31,10 +31,10 @@ public class DeductSaveReqVO {
|
||||
private String rangeWay;
|
||||
|
||||
@Schema(description = "上限")
|
||||
private String up;
|
||||
private BigDecimal up;
|
||||
|
||||
@Schema(description = "下限")
|
||||
private String down;
|
||||
private BigDecimal down;
|
||||
|
||||
@Schema(description = "类型(字典:STLM_COEF)")
|
||||
private String type;
|
||||
|
||||
@@ -63,12 +63,12 @@ public class ContractDeductDO extends BusinessBaseDO {
|
||||
* 上限
|
||||
*/
|
||||
@TableField("UP")
|
||||
private String up;
|
||||
private BigDecimal up;
|
||||
/**
|
||||
* 下限
|
||||
*/
|
||||
@TableField("DOWN")
|
||||
private String down;
|
||||
private BigDecimal down;
|
||||
/**
|
||||
* 类型(字典:STLM_COEF)
|
||||
*/
|
||||
|
||||
@@ -54,6 +54,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
@@ -171,7 +172,11 @@ public class ContractServiceImpl implements ContractService {
|
||||
// 合同状态保存为草稿
|
||||
contractMainDO.setStatus(DictEnum.BSE_CTRT_STS_DRAFT.getCode());
|
||||
// 生成系统合同编号
|
||||
contractMainDO.setSystemContractNumber(generateSystemContractNumber(reqVO.getCategory()));
|
||||
contractMainDO.setSystemContractNumber(generateSystemContractNumber(reqVO.getBusinessType()));
|
||||
// 原币金额-变更后
|
||||
if (contractMainDO.getChangeCooAmount() == null) contractMainDO.setChangeCooAmount(new BigDecimal(0));
|
||||
// 本币金额-变更后
|
||||
if (contractMainDO.getChangeBasicAmount() == null) contractMainDO.setChangeBasicAmount(new BigDecimal(0));
|
||||
|
||||
// 保存合同主信息
|
||||
contractMainMapper.insert(contractMainDO);
|
||||
@@ -1352,7 +1357,7 @@ public class ContractServiceImpl implements ContractService {
|
||||
} else {
|
||||
contractMainDO.setStatus(DictEnum.BSE_CTRT_STS_PUSH_ERROR.getCode());
|
||||
contractMainDO.setErpStatus(DictEnum.ERP_REQ_STS_RLBK.getCode());
|
||||
// contractMainDO.setCause(erpResult.getStr("errMsg"));
|
||||
contractMainDO.setCause(erpResult.getStr("errMsg"));
|
||||
contractMainMapper.updateById(contractMainDO);
|
||||
}
|
||||
} else {
|
||||
@@ -1366,8 +1371,14 @@ public class ContractServiceImpl implements ContractService {
|
||||
private JSONObject sendToErp(ErpContractSaveReqVO erpContractVO) {
|
||||
JSONObject erpResult = new JSONObject();
|
||||
try {
|
||||
String result = erpContractService.submitErp(erpContractVO);
|
||||
erpResult.putOnce("success", true);
|
||||
HashMap<String, String> result = erpContractService.submitErp(erpContractVO);
|
||||
if ("E".equals(result.get("flag"))) {
|
||||
erpResult.putOnce("success", false);
|
||||
erpResult.putOnce("errMsg", result.get("resStr")+":"+result.get("E_RESP"));
|
||||
} else {
|
||||
erpResult.putOnce("success", true);
|
||||
erpResult.putOnce("data", result);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
erpResult.putOnce("success", false);
|
||||
erpResult.putOnce("errMsg", e.getMessage());
|
||||
|
||||
Reference in New Issue
Block a user