增加结算币种
This commit is contained in:
parent
596af2202c
commit
7314b545ea
|
|
@ -11,4 +11,8 @@ public interface DictTypeConstants {
|
|||
String BILL_STATUS = "oms_bill_status"; // 单据状态
|
||||
|
||||
String ORDER_STATUS = "oms_order_status"; // 订单状态
|
||||
|
||||
String OMS_CONTRACT_TYPE = "oms_contract_type"; // 合约类型
|
||||
|
||||
String OMS_CURRENCY_TYPE = "currency_type"; // 结算币种
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,6 +40,16 @@ public class SaleOrderRespVO {
|
|||
@DictFormat(DictTypeConstants.ORDER_STATUS)
|
||||
private Integer orderStatus;
|
||||
|
||||
@Schema(description = "合约类型", example = "2")
|
||||
@ExcelProperty(value = "合约类型", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.OMS_CONTRACT_TYPE)
|
||||
private String contractType;
|
||||
|
||||
@Schema(description = "结算币种", example = "2")
|
||||
@ExcelProperty(value = "结算币种", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.OMS_CURRENCY_TYPE)
|
||||
private String currencyType;
|
||||
|
||||
@Schema(description = "业务日期")
|
||||
@ExcelProperty("业务日期")
|
||||
private LocalDateTime bizdate;
|
||||
|
|
|
|||
|
|
@ -59,6 +59,12 @@ public class SaleOrderSaveReqVO {
|
|||
@Schema(description = "单据状态", example = "2")
|
||||
private String billStatus;
|
||||
|
||||
@Schema(description = "合约类型", example = "2")
|
||||
private String contractType;
|
||||
|
||||
@Schema(description = "结算币种", example = "2")
|
||||
private String currencyType;
|
||||
|
||||
@Schema(description = "订单状态", example = "2")
|
||||
private Integer orderStatus;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,9 @@ public interface SaleOrderConvert {
|
|||
@Mapping(source = "invoiceCode", target = "invoiceCode"),
|
||||
@Mapping(source = "invoiceName", target = "invoiceName"),
|
||||
@Mapping(source = "address", target = "address"),
|
||||
@Mapping(source = "emails", target = "emails")
|
||||
@Mapping(source = "emails", target = "emails"),
|
||||
@Mapping(source = "contractType", target = "contractType"),
|
||||
@Mapping(source = "currencyType", target = "currencyType")
|
||||
})
|
||||
SaleOrderRespVO convert(SaleOrderDO bean);
|
||||
|
||||
|
|
|
|||
|
|
@ -164,6 +164,16 @@ public class SaleOrderDO extends BaseDO {
|
|||
*/
|
||||
private String orderFollowerUser;
|
||||
|
||||
/**
|
||||
* 合约类型
|
||||
*/
|
||||
private String contractType;
|
||||
|
||||
/**
|
||||
* 结算币种
|
||||
*/
|
||||
private String currencyType;
|
||||
|
||||
public SaleOrderDO(CreateSaleOrderDTO dto) {
|
||||
BeanUtil.copyProperties(dto, this,"bizdate","plansenddate");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -322,8 +322,15 @@ public class SaleOrderServiceImpl implements SaleOrderService {
|
|||
case "audit": //审核
|
||||
for (SaleOrderDO saleOrder : saleOrders) {
|
||||
if (BillStatusEnum.SUBMIT.getValue().equals(saleOrder.getBillStatus())) {
|
||||
|
||||
List<SaleOrderEntryDO> entrys = getSaleOrderEntryListByParentId(saleOrder.getId());
|
||||
String contractType = saleOrder.getContractType();
|
||||
String currencyType = saleOrder.getCurrencyType();
|
||||
if(StringUtils.isBlank(contractType)){
|
||||
throw new ServiceException(001, "合约类型不允许为空!");
|
||||
}
|
||||
if(StringUtils.isBlank(currencyType)){
|
||||
throw new ServiceException(001, "结算币种不允许为空!");
|
||||
}
|
||||
if (entrys == null || entrys.isEmpty()) {
|
||||
throw new ServiceException(001, "产品明细为空");
|
||||
}
|
||||
|
|
@ -439,7 +446,7 @@ public class SaleOrderServiceImpl implements SaleOrderService {
|
|||
ProductInfoDO productInfo = productInfoService.getProductInfo(entry.getMaterialId());
|
||||
ProduceOrderSaveReqVO saveReqVO = new ProduceOrderSaveReqVO();
|
||||
saveReqVO.setOrderNo(saleOrder.getBillno());
|
||||
saveReqVO.setSaleContractNo(saleOrder.getBillno());
|
||||
saveReqVO.setSaleContractNo(saleOrder.getContractCode());
|
||||
saveReqVO.setCustomerId(customer.getId());
|
||||
saveReqVO.setCustomerCode(customer.getNumber());
|
||||
saveReqVO.setProductId(entry.getMaterialId());
|
||||
|
|
@ -978,6 +985,10 @@ public class SaleOrderServiceImpl implements SaleOrderService {
|
|||
if (FuncUtil.isEmpty(billno)) {
|
||||
billno = getNewContractCode2();
|
||||
}
|
||||
String contractType = saleOrder.getContractType();
|
||||
if(StringUtils.isNotBlank(contractType)){
|
||||
billno = billno.replace("XSHY-",contractType+"-");
|
||||
}
|
||||
saveReqVO.setBillno(billno);
|
||||
saveReqVO.setCustomerId(saleOrder.getCustomerId());
|
||||
saveReqVO.setCustomerName(customer.getName());
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@
|
|||
<th style="width: 5%;text-align: center;">数量</th>
|
||||
<th style="width: 8%;text-align: center;">单位订价RMB</th>
|
||||
<th style="width: 5%;text-align: center;">折扣%</th>
|
||||
<th style="width: 7%;text-align: center;">金额RMB</th>
|
||||
<th style="width: 7%;text-align: center;">金额<span th:text="${currencyType}"></span></th>
|
||||
<th style="width: 7%;text-align: center;">交货日期</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
@ -252,7 +252,7 @@
|
|||
<span
|
||||
style="font-weight: bold;font-size: 16px; padding: 8px 0px 8px 0px;border-top: 1px solid #dddddd;border-bottom: 2px solid #dddddd;">
|
||||
|
||||
<span style="margin-right: 80px;">RMB</span>
|
||||
<span style="margin-right: 80px;" th:text="${currencyType}">RMB</span>
|
||||
<span th:text="${totalAmount}">XXXXXXXxXX</span>
|
||||
</span>
|
||||
</span>
|
||||
|
|
|
|||
Loading…
Reference in New Issue