Merge remote-tracking branch 'origin/dev' into test

This commit is contained in:
qianshijiang
2026-01-22 09:28:51 +08:00
18 changed files with 240 additions and 70 deletions

View File

@@ -0,0 +1,34 @@
package com.zt.plat.module.contractorder.api.dto.contract;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
@Schema(description = "金额分配响应DTO")
@Data
public class AmountSplitRespDTO {
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "17357")
private Long id;
@Schema(description = "物料名称", example = "赵六")
private String materialName;
@Schema(description = "物料编码")
private String materialCode;
@Schema(description = "元素缩写")
private String elementAbbreviation;
@Schema(description = "元素名称", example = "张三")
private String elementName;
@Schema(description = "元素编码")
private String elementCode;
@Schema(description = "占比")
private BigDecimal ratio;
@Schema(description = "合同id", example = "3781")
private Long contractId;
}

View File

@@ -286,4 +286,7 @@ public class ContractRespDTO {
@Schema(description = "收发货规则")
private List<ContractReceiveSendRespDTO> contractReceiveSends;
@Schema(description = "金额拆分")
private List<AmountSplitRespDTO> amountSplits;
}

View File

@@ -125,10 +125,12 @@ public class ContractServiceImpl implements ContractService {
private ContractReceiveSendService contractReceiveSendService;
@Resource
private AmountDismantleService amountDismantleService;
@Override
public PageResult<ContractMainDO> getContractPage(ContractPageReqVO pageReqVO) {
return contractMainMapper.selectContractPage(pageReqVO);
}
boolean isContractReceiveSendValid(List<ContractReceiveSendSaveReqVO> contractReceiveSends) {
if (CollectionUtils.isEmpty(contractReceiveSends)) {
return true;
@@ -1423,7 +1425,11 @@ public class ContractServiceImpl implements ContractService {
if (contractReceiveSendListByContractId != null && !contractReceiveSendListByContractId.isEmpty()) {
respDTO.setContractReceiveSends(BeanUtils.toBean(contractReceiveSendListByContractId, ContractReceiveSendRespDTO.class));
}
//金额拆分
List<AmountDismantleDO> amountDismantleListByContractId = amountDismantleService.getAmountDismantleListByContractId(contractMainDO.getId());
if (amountDismantleListByContractId != null && !amountDismantleListByContractId.isEmpty()) {
respDTO.setAmountSplits(BeanUtils.toBean(amountDismantleListByContractId,AmountSplitRespDTO.class));
}
return respDTO;
}
@@ -1516,13 +1522,16 @@ public class ContractServiceImpl implements ContractService {
if (contractReceiveSendListByContractId != null && !contractReceiveSendListByContractId.isEmpty()) {
respDTO.setContractReceiveSends(BeanUtils.toBean(contractReceiveSendListByContractId, ContractReceiveSendRespDTO.class));
}
//金额拆分
List<AmountDismantleDO> amountDismantleListByContractId = amountDismantleService.getAmountDismantleListByContractId(contractMainDO.getId());
if (amountDismantleListByContractId != null && !amountDismantleListByContractId.isEmpty()) {
respDTO.setAmountSplits(BeanUtils.toBean(amountDismantleListByContractId,AmountSplitRespDTO.class));
}
return respDTO;
}
@Override
public JSONObject submitErp(Long id) {

View File

@@ -57,7 +57,7 @@ public interface ErrorCodeConstants {
ErrorCode ERP_PRODUCTIVE_ORDER_NOT_EXISTS = new ErrorCode(1_017_000_001, "ERP生产订单数据不存在");
ErrorCode MATERIAL_ERROR = new ErrorCode( 1_017_000_009, "主物料信息错误");
ErrorCode CUSTOM_ERROR = new ErrorCode(1_017_000_010, "{}");
ErrorCode INTERNAL_WAREHOUSE_NOT_EXISTS= new ErrorCode(1_017_000_011,"内部仓库不存在");
ErrorCode INTERNAL_WAREHOUSE_EXISTS=new ErrorCode(1_017_000_012,"内部仓库已存在");
ErrorCode WAREHOUSE_FACTORY_NOT_EXISTS=new ErrorCode(1_017_000_010,"库位与工厂信息不存在");

View File

@@ -130,7 +130,7 @@ public class ErpMaterialController implements BusinessControllerMarker {
@DeleteMapping("/deleteErpMaterialCorr")
@Operation(summary = "删除ERP物料关系")
@PreAuthorize("@ss.hasAnyPermissions({'sply:erp-material:delete','basic:material-config:delete'})")
public CommonResult<Boolean> deleteErpMaterialCorr(@RequestBody BatchDeleteReqVO req) {
public CommonResult<Boolean> deleteErpMaterialCorr(@RequestBody DeleteErpMaterialCorrVO req) {
erpMaterialService.deleteErpMaterialCorr(req);
return success(true);
}
@@ -148,8 +148,8 @@ public class ErpMaterialController implements BusinessControllerMarker {
@GetMapping("/getErpMaterialByMainMaterialById")
@Operation(summary = "通过主物料查询子物料信息")
@PreAuthorize("@ss.hasAnyPermissions({'sply:erp-material:query','basic:material-config:query'})")
public CommonResult<List<ErpMaterialRespVO>> getErpMaterialByMainMaterial(@RequestParam("id") Long mainMaterialId) {
List<ErpMaterialRespVO> erpMaterial = erpMaterialService.getErpMaterialByMainMaterial(mainMaterialId);
public CommonResult<List<ErpMaterialRespVO>> getErpMaterialByMainMaterial(@RequestParam("id") Long mainMaterialId, @RequestParam(value = "deptId",required = false) String companyCode) {
List<ErpMaterialRespVO> erpMaterial = erpMaterialService.getErpMaterialByMainMaterial(mainMaterialId, companyCode);
return success(BeanUtils.toBean(erpMaterial, ErpMaterialRespVO.class));
}
@@ -158,13 +158,8 @@ public class ErpMaterialController implements BusinessControllerMarker {
@Operation(summary = "通过接口查询物料")
@PreAuthorize("@ss.hasAnyPermissions({'sply:erp-material:query','basic:material-config:query'})")
public CommonResult<PageResult<ErpMaterialRespVO>> getErpMaterialByApi(@RequestBody MaterialInfomationApiVO vo) {
DepartmentMaterialPageReqDTO material = new DepartmentMaterialPageReqDTO();
material.setMaterialNumber(vo.getMaterialNumber());
material.setMaterialName(vo.getMaterialName());
material.setPageSize(vo.getPageSize());
material.setPageNo(vo.getPageNo());
material.setDeptId(Long.valueOf(vo.getDeptId()));
PageResult<ErpMaterialDO> erpMaterialByApi = erpMaterialService.getErpMaterialByApi(material);
PageResult<ErpMaterialDO> erpMaterialByApi = erpMaterialService.getErpMaterialByApi(vo);
return success(BeanUtils.toBean(erpMaterialByApi, ErpMaterialRespVO.class));
}
//通过主物料查询子物料信息

View File

@@ -0,0 +1,15 @@
package com.zt.plat.module.erp.controller.admin.erp.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.List;
@Data
@Schema(description = "删除ErpMaterialCorr请求参数")
public class DeleteErpMaterialCorrVO {
@Schema(description = "materialIds")
private List<Long> materialIds;
@Schema(description = "主物料Id")
private Long materialParentId;
}

View File

@@ -35,4 +35,26 @@ public class ErpMaterialCorrRspVO {
*/
@Schema(description = "拓展关系物料编号")
private String materialCode;
/**
* 公司编码
*/
@Schema(description = "公司编码")
@NotNull(message = "公司编码不能为空")
private String companyId;
/**
* 公司编码
*/
@Schema(description = "公司编码")
private String companyCode;
/**
* 部门ID
*/
@Schema(description = "部门ID", requiredMode = Schema.RequiredMode.REQUIRED)
private Long deptId;
/**
* 部门编码
*/
@Schema(description = "部门编码", requiredMode = Schema.RequiredMode.REQUIRED)
private String deptCode;
}

View File

@@ -1,6 +1,7 @@
package com.zt.plat.module.erp.controller.admin.erp.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
@@ -28,6 +29,22 @@ public class ErpMaterialCorrSaveReqVO {
*/
@Schema(description = "拓展关系主物料编号")
private String materialParentCode;
/**
* 公司编码
*/
@Schema(description = "公司编码")
private String companyCode;
/**
* 部门ID
*/
@Schema(description = "部门ID")
private Long deptId;
/**
* 部门编码
*/
@Schema(description = "部门编码")
private String deptCode;
/**
* 拓展关系物料
*/

View File

@@ -23,7 +23,7 @@ public class WarehouseFactoryPageReqVO extends PageParam {
private String operationType;
@Schema(description = "业务类型", example = "2")
private String mMSIType;
private String mmsiType;
@Schema(description = "erp源工厂名称", example = "赵六")
private String erpSourceFactoryName;

View File

@@ -30,7 +30,7 @@ public class WarehouseFactoryRespVO {
@Schema(description = "业务类型", example = "2")
@ExcelProperty("业务类型")
private String mMSIType;
private String mmsiType;
@Schema(description = "erp源工厂名称", example = "赵六")
@ExcelProperty("erp源工厂名称")

Some files were not shown because too many files have changed in this diff Show More