Merge branch 'dev' into test
This commit is contained in:
@@ -15,7 +15,7 @@ public class AmountSplitRespDTO {
|
|||||||
private String materialName;
|
private String materialName;
|
||||||
|
|
||||||
@Schema(description = "物料编码")
|
@Schema(description = "物料编码")
|
||||||
private String materialCode;
|
private String materialNumber;
|
||||||
|
|
||||||
@Schema(description = "元素缩写")
|
@Schema(description = "元素缩写")
|
||||||
private String elementAbbreviation;
|
private String elementAbbreviation;
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public class AmountDismantlePageReqVO extends PageParam {
|
|||||||
private String materialName;
|
private String materialName;
|
||||||
|
|
||||||
@Schema(description = "物料编码")
|
@Schema(description = "物料编码")
|
||||||
private String materialCode;
|
private String materialNumber;
|
||||||
|
|
||||||
@Schema(description = "元素缩写")
|
@Schema(description = "元素缩写")
|
||||||
private String elementAbbreviation;
|
private String elementAbbreviation;
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ public class AmountDismantleRespVO {
|
|||||||
|
|
||||||
@Schema(description = "物料编码")
|
@Schema(description = "物料编码")
|
||||||
@ExcelProperty("物料编码")
|
@ExcelProperty("物料编码")
|
||||||
private String materialCode;
|
private String materialNumber;
|
||||||
|
|
||||||
@Schema(description = "元素缩写")
|
@Schema(description = "元素缩写")
|
||||||
@ExcelProperty("元素缩写")
|
@ExcelProperty("元素缩写")
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ public class AmountDismantleSaveReqVO {
|
|||||||
private String materialName;
|
private String materialName;
|
||||||
|
|
||||||
@Schema(description = "物料编码")
|
@Schema(description = "物料编码")
|
||||||
private String materialCode;
|
private String materialNumber;
|
||||||
|
|
||||||
@Schema(description = "元素缩写")
|
@Schema(description = "元素缩写")
|
||||||
private String elementAbbreviation;
|
private String elementAbbreviation;
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ package com.zt.plat.module.contractorder.api.vo.contract;
|
|||||||
|
|
||||||
import com.zt.plat.module.base.controller.admin.templtp.vo.TmplInscDatBsnRespVO;
|
import com.zt.plat.module.base.controller.admin.templtp.vo.TmplInscDatBsnRespVO;
|
||||||
import com.zt.plat.module.base.controller.admin.templtp.vo.TmplInscItmBsnRespVO;
|
import com.zt.plat.module.base.controller.admin.templtp.vo.TmplInscItmBsnRespVO;
|
||||||
|
import com.zt.plat.module.contractorder.api.dto.contract.AmountSplitRespDTO;
|
||||||
|
import com.zt.plat.module.contractorder.api.dto.contract.ContractReceiveSendRespDTO;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@@ -275,6 +277,12 @@ public class ContractRespVO {
|
|||||||
@Schema(description = "是否信用", example = "1")
|
@Schema(description = "是否信用", example = "1")
|
||||||
private String hasCredit;
|
private String hasCredit;
|
||||||
|
|
||||||
|
@Schema(description = "收发货规则")
|
||||||
|
private List<ContractReceiveSendRespVO> contractReceiveSends;
|
||||||
|
|
||||||
|
@Schema(description = "金额拆分")
|
||||||
|
private List<AmountDismantleRespVO> amountSplit;
|
||||||
|
|
||||||
// 物料信息
|
// 物料信息
|
||||||
private List<DetailRespVO> detail;
|
private List<DetailRespVO> detail;
|
||||||
|
|
||||||
|
|||||||
@@ -40,8 +40,8 @@ public class AmountDismantleDO extends BusinessBaseDO {
|
|||||||
/**
|
/**
|
||||||
* 物料编码
|
* 物料编码
|
||||||
*/
|
*/
|
||||||
@TableField("MTRL_CD")
|
@TableField("MTRL_NUM")
|
||||||
private String materialCode;
|
private String materialNumber;
|
||||||
/**
|
/**
|
||||||
* 元素缩写
|
* 元素缩写
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ public interface AmountDismantleMapper extends BaseMapperX<AmountDismantleDO> {
|
|||||||
default PageResult<AmountDismantleDO> selectPage(AmountDismantlePageReqVO reqVO) {
|
default PageResult<AmountDismantleDO> selectPage(AmountDismantlePageReqVO reqVO) {
|
||||||
return selectPage(reqVO, new LambdaQueryWrapperX<AmountDismantleDO>()
|
return selectPage(reqVO, new LambdaQueryWrapperX<AmountDismantleDO>()
|
||||||
.likeIfPresent(AmountDismantleDO::getMaterialName, reqVO.getMaterialName())
|
.likeIfPresent(AmountDismantleDO::getMaterialName, reqVO.getMaterialName())
|
||||||
.eqIfPresent(AmountDismantleDO::getMaterialCode, reqVO.getMaterialCode())
|
.eqIfPresent(AmountDismantleDO::getMaterialNumber, reqVO.getMaterialNumber())
|
||||||
.eqIfPresent(AmountDismantleDO::getElementAbbreviation, reqVO.getElementAbbreviation())
|
.eqIfPresent(AmountDismantleDO::getElementAbbreviation, reqVO.getElementAbbreviation())
|
||||||
.likeIfPresent(AmountDismantleDO::getElementName, reqVO.getElementName())
|
.likeIfPresent(AmountDismantleDO::getElementName, reqVO.getElementName())
|
||||||
.eqIfPresent(AmountDismantleDO::getElementCode, reqVO.getElementCode())
|
.eqIfPresent(AmountDismantleDO::getElementCode, reqVO.getElementCode())
|
||||||
|
|||||||
@@ -420,6 +420,16 @@ public class ContractServiceImpl implements ContractService {
|
|||||||
respVO.setDynamicsItems(tmplInscBsnRel.getTmplInscItmBsnRespVOS());
|
respVO.setDynamicsItems(tmplInscBsnRel.getTmplInscItmBsnRespVOS());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//收发货
|
||||||
|
List<ContractReceiveSendRespVO> contractReceiveSendListByContractId = contractReceiveSendService.getContractReceiveSendListByContractId(contractMainDO.getId());
|
||||||
|
if (contractReceiveSendListByContractId != null && !contractReceiveSendListByContractId.isEmpty()) {
|
||||||
|
respVO.setContractReceiveSends(contractReceiveSendListByContractId);
|
||||||
|
}
|
||||||
|
//金额拆分
|
||||||
|
List<AmountDismantleDO> amountDismantleListByContractId = amountDismantleService.getAmountDismantleListByContractId(contractMainDO.getId());
|
||||||
|
if (amountDismantleListByContractId != null && !amountDismantleListByContractId.isEmpty()) {
|
||||||
|
respVO.setAmountSplit(BeanUtils.toBean(amountDismantleListByContractId, AmountDismantleRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
return respVO;
|
return respVO;
|
||||||
}
|
}
|
||||||
@@ -966,7 +976,9 @@ public class ContractServiceImpl implements ContractService {
|
|||||||
if (reqVO.getContractReceiveSends() != null && !reqVO.getContractReceiveSends().isEmpty()) {
|
if (reqVO.getContractReceiveSends() != null && !reqVO.getContractReceiveSends().isEmpty()) {
|
||||||
//通过合同id删除收发货规则
|
//通过合同id删除收发货规则
|
||||||
List<ContractReceiveSendRespVO> contractReceiveSendListByContract = contractReceiveSendService.getContractReceiveSendListByContractId(id);
|
List<ContractReceiveSendRespVO> contractReceiveSendListByContract = contractReceiveSendService.getContractReceiveSendListByContractId(id);
|
||||||
contractReceiveSendService.deleteContractReceiveSendListByIds(contractReceiveSendListByContract.stream().map(ContractReceiveSendRespVO::getId).toList());
|
if (!contractReceiveSendListByContract.isEmpty()){
|
||||||
|
contractReceiveSendService.deleteContractReceiveSendListByIds(contractReceiveSendListByContract.stream().map(ContractReceiveSendRespVO::getId).toList());
|
||||||
|
}
|
||||||
//重新插入收发货规则
|
//重新插入收发货规则
|
||||||
reqVO.getContractReceiveSends().forEach(item -> {
|
reqVO.getContractReceiveSends().forEach(item -> {
|
||||||
item.setContractId(id);
|
item.setContractId(id);
|
||||||
@@ -977,7 +989,9 @@ public class ContractServiceImpl implements ContractService {
|
|||||||
//更新资金拆分表(直接先删除后面再插入)
|
//更新资金拆分表(直接先删除后面再插入)
|
||||||
if (reqVO.getAmountSplit() != null && !reqVO.getAmountSplit().isEmpty()) {
|
if (reqVO.getAmountSplit() != null && !reqVO.getAmountSplit().isEmpty()) {
|
||||||
List<AmountDismantleDO> amountDismantleList = amountDismantleService.getAmountDismantleListByContractId(id);
|
List<AmountDismantleDO> amountDismantleList = amountDismantleService.getAmountDismantleListByContractId(id);
|
||||||
amountDismantleService.deleteAmountDismantleListByIds(amountDismantleList.stream().map(AmountDismantleDO::getId).toList());
|
if(!amountDismantleList.isEmpty()){
|
||||||
|
amountDismantleService.deleteAmountDismantleListByIds(amountDismantleList.stream().map(AmountDismantleDO::getId).toList());
|
||||||
|
}
|
||||||
reqVO.getAmountSplit().forEach(item -> {
|
reqVO.getAmountSplit().forEach(item -> {
|
||||||
item.setContractId(id);
|
item.setContractId(id);
|
||||||
item.setId(null);
|
item.setId(null);
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ public class ErpErpMaterialCorrServiceImpl implements ErpErpMaterialCorrService{
|
|||||||
.materialParentId(reqVO.getMaterialParentId())
|
.materialParentId(reqVO.getMaterialParentId())
|
||||||
.materialParentCode(reqVO.getMaterialParentCode())
|
.materialParentCode(reqVO.getMaterialParentCode())
|
||||||
.materialId(materials.getMaterialId())
|
.materialId(materials.getMaterialId())
|
||||||
|
.deptId(reqVO.getDeptId())
|
||||||
|
.companyCode(reqVO.getCompanyCode())
|
||||||
.materialCode(materials.getMaterialCode())
|
.materialCode(materials.getMaterialCode())
|
||||||
.build());
|
.build());
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user