1.1.25 合同添加合同属地标识、合同属地国家/地区、结算币种、对人民币汇率字段。

dev
yinq 1 week ago
parent 2eacebd570
commit 44f8461783

@ -77,6 +77,31 @@ public class ErpContractInfo extends TenantEntity {
*/
private Date contractDate;
/**
* 1 2
*/
private String contractTerritorialFlag;
/**
* /
*/
private String contractTerritorialCountry;
/**
* CNY/USD/EUR
*/
private String settlementCurrency;
/**
*
*/
private BigDecimal rmbExchangeRate;
/**
* 1 0
*/
private String effectiveCustomerOrderFlag;
/**
*
*/

@ -80,6 +80,31 @@ public class ErpContractInfoBo extends BaseEntity {
*/
private Date contractDate;
/**
* 1 2
*/
private String contractTerritorialFlag;
/**
* /
*/
private String contractTerritorialCountry;
/**
* CNY/USD/EUR
*/
private String settlementCurrency;
/**
*
*/
private BigDecimal rmbExchangeRate;
/**
* 1 0
*/
private String effectiveCustomerOrderFlag;
/**
*
*/

@ -219,6 +219,11 @@ public class ErpProjectInfoBo extends BaseEntity {
*/
private Long finalCustomerId;
/**
* =2 erp_contract_info.rmb_exchange_rate
*/
private BigDecimal rmbExchangeRate;
/**
*
*/

@ -49,6 +49,18 @@ public class ContractLedgerReportVo implements Serializable {
@ExcelProperty({"合同信息", "签订时间"})
private String contractDate;
@ExcelProperty(value = {"合同信息", "合同属地标识"}, converter = org.dromara.common.excel.convert.ExcelDictConvert.class)
@org.dromara.common.excel.annotation.ExcelDictFormat(dictType = "contract_territorial_flag")
private String contractTerritorialFlag;
@ExcelProperty(value = {"合同信息", "合同属地国家/地区"}, converter = org.dromara.common.excel.convert.ExcelDictConvert.class)
@org.dromara.common.excel.annotation.ExcelDictFormat(dictType = "country_region")
private String contractTerritorialCountry;
@ExcelProperty(value = {"合同信息", "结算币种"}, converter = org.dromara.common.excel.convert.ExcelDictConvert.class)
@org.dromara.common.excel.annotation.ExcelDictFormat(dictType = "currency_type")
private String settlementCurrency;
@ExcelProperty({"合同信息", "软控SAP订单号"})
@ColumnWidth(20)
private String orderContractCode;

@ -98,6 +98,39 @@ public class ErpContractInfoVo implements Serializable {
@ExcelProperty(value = "合同签订日期")
private Date contractDate;
/**
* 1 2
*/
@ExcelProperty(value = "合同属地标识", converter = ExcelDictConvert.class)
@ExcelDictFormat(dictType = "contract_territorial_flag")
private String contractTerritorialFlag;
/**
* /
*/
@ExcelProperty(value = "合同属地国家/地区", converter = ExcelDictConvert.class)
@ExcelDictFormat(dictType = "country_region")
private String contractTerritorialCountry;
/**
* CNY/USD/EUR
*/
@ExcelProperty(value = "结算币种", converter = ExcelDictConvert.class)
@ExcelDictFormat(dictType = "currency_type")
private String settlementCurrency;
/**
*
*/
@ExcelProperty(value = "对人民币汇率")
private BigDecimal rmbExchangeRate;
/**
* 1 0
*/
@ExcelProperty(value = "已生效客户订单")
private String effectiveCustomerOrderFlag;
/**
*
*/

@ -224,6 +224,10 @@ public class ErpContractInfoServiceImpl implements IErpContractInfoService {
bo.getBusinessDirection())
.eq(bo.getContractDeptId() != null, ErpContractInfo::getContractDeptId, bo.getContractDeptId())
.eq(bo.getContractDate() != null, ErpContractInfo::getContractDate, bo.getContractDate())
.eq(StringUtils.isNotBlank(bo.getContractTerritorialFlag()), ErpContractInfo::getContractTerritorialFlag, bo.getContractTerritorialFlag())
.eq(StringUtils.isNotBlank(bo.getContractTerritorialCountry()), ErpContractInfo::getContractTerritorialCountry, bo.getContractTerritorialCountry())
.eq(StringUtils.isNotBlank(bo.getSettlementCurrency()), ErpContractInfo::getSettlementCurrency, bo.getSettlementCurrency())
.eq(bo.getRmbExchangeRate() != null, ErpContractInfo::getRmbExchangeRate, bo.getRmbExchangeRate())
.apply(StringUtils.isNotBlank(bo.getOneCustomerName()),
"c1.customer_name LIKE CONCAT('%', {0}, '%')", bo.getOneCustomerName())
.eq(bo.getTotalPrice() != null, ErpContractInfo::getTotalPrice, bo.getTotalPrice())
@ -472,6 +476,11 @@ public class ErpContractInfoServiceImpl implements IErpContractInfoService {
throw new ServiceException("合同编号【" + entity.getContractCode() + "】已存在,请勿重复");
}
}
// 已生效客户订单必须上传附件(无需盖章/签字即刻生效)
if (entity != null && "1".equals(entity.getEffectiveCustomerOrderFlag())
&& StringUtils.isBlank(entity.getOssId())) {
throw new ServiceException("已生效客户订单必须上传附件");
}
// 物料列表的强制校验
// if (entity.getContractMaterialList() == null ||

@ -304,16 +304,17 @@ public class ErpContractOrderServiceImpl implements IErpContractOrderService {
// 合同订单保存:将客户合同编号、最终客户
if (bo.getContractId() != null) {
ErpContractInfo contractPatch = new ErpContractInfo();
contractPatch.setContractId(bo.getContractId());
contractPatch.setCustomerContractCode(bo.getCustomerContractCode());
contractPatch.setFinalCustomerId(bo.getFinalCustomerId());
// 上传终版合同时:激活合同并校验甲方客户资料
if (StringUtils.isNotBlank(bo.getOssId())) {
ErpContractInfoVo contractInfoVo = contractInfoMapper.selectVoById(bo.getContractId());
if (contractInfoVo == null) {
throw new ServiceException("合同信息不存在,无法激活订单");
}
ErpContractInfo contractPatch = new ErpContractInfo();
contractPatch.setContractId(bo.getContractId());
contractPatch.setCustomerContractCode(bo.getCustomerContractCode());
contractPatch.setFinalCustomerId(bo.getFinalCustomerId());
contractPatch.setRmbExchangeRate(bo.getRmbExchangeRate());
// 上传终版合同时:激活合同并校验甲方客户资料
if (StringUtils.isNotBlank(bo.getOssId())) {
validPartyACustomerForOrderActivate(contractInfoVo.getOneCustomerId());
contractPatch.setSignatureAppendix(Convert.toLong(bo.getOssId().trim()));
// contractPatch.setContractDeptId(bo.getDeptId());

@ -13,6 +13,9 @@
t.customer_contract_code,
DATE_FORMAT(t.contract_date, '%Y-%m-%d') AS contract_date,
DATE_FORMAT(t.create_time, '%Y-%m') AS month,
t.contract_territorial_flag,
t.contract_territorial_country,
t.settlement_currency,
t.order_contract_code,
t.project_contract_code,
cust.customer_name AS customer_name,

@ -18,6 +18,11 @@
t.business_direction,
t.contract_dept_id,
t.contract_date,
t.contract_territorial_flag,
t.contract_territorial_country,
t.settlement_currency,
t.rmb_exchange_rate,
t.effective_customer_order_flag,
t.total_price,
t.one_customer_id,
t.one_represent,

Loading…
Cancel
Save