Merge branch 'refs/heads/dev' into test

This commit is contained in:
liss
2025-11-03 15:38:51 +08:00
15 changed files with 218 additions and 82 deletions

View File

@@ -172,7 +172,7 @@ public class PurchaseOrderRespVO {
@ExcelProperty("物料类型(字典:MTRL_TP)")
private String mtrlTp;
@Schema(description = "订单分类", example = "2")
@Schema(description = "订单分类(字典SPLY_BSN_TP)", example = "2")
@ExcelProperty("订单分类")
private String splyBsnTp;

View File

@@ -175,7 +175,7 @@ public class PurchaseOrderSaveReqVO {
@ExcelProperty("物料类别")
private String mtrlTp;
@Schema(description = "订单分类", example = "2")
@Schema(description = "订单分类(字典SPLY_BSN_TP)", example = "2")
@ExcelProperty("订单分类")
private String splyBsnTp;
}

View File

@@ -252,7 +252,7 @@ public class PurchaseOrderDO extends BusinessBaseDO {
private String mtrlTp;
/**
* 订单分类
* 订单分类(字典SPLY_BSN_TP)
*
*/
@TableField("SPLY_BSN_TP")

View File

@@ -1,6 +1,7 @@
package com.zt.plat.module.erp.api;
import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.module.erp.api.dto.ErpMaterialDTO;
import com.zt.plat.module.erp.api.dto.ErpProductiveVersionReqDTO;
import com.zt.plat.module.erp.api.dto.ErpQueryReqDTO;
import com.zt.plat.module.erp.api.dto.ErpSubmitReqDTO;
@@ -33,4 +34,8 @@ public interface ErpExternalApi {
@GetMapping(PREFIX + "/queryProductiveVersion")
@Operation(summary = "生产版本数据查询")
CommonResult<String> getErpProductiveVersionByFM(@Valid @RequestBody ErpProductiveVersionReqDTO reqDTO);
@GetMapping(PREFIX + "/queryMaterial")
@Operation(summary = "物料数据查询")
CommonResult<ErpMaterialDTO> getErpMaterial(@Valid @RequestBody ErpMaterialDTO reqDTO);
}

View File

@@ -0,0 +1,75 @@
package com.zt.plat.module.erp.api.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - ERP物料数据 Response VO")
@Data
public class ErpMaterialDTO {
@Schema(description = "主键")
private Long id;
@Schema(description = "中铜物料编码;系统使用时使用该编码")
private String downCenterNumber;
@Schema(description = "物料编码")
private String materialNumber;
@Schema(description = "中铝物料编码")
private String centerNumber;
@Schema(description = "创建日期")
private LocalDateTime createDate;
@Schema(description = "物料类型", example = "2")
private String materialType;
@Schema(description = "物料大类组")
private String materialGroupDate;
@Schema(description = "外部物料小类组")
private String externalMaterialGroupDate;
@Schema(description = "计量单位编码")
private String unit;
@Schema(description = "计量单位描述")
private String unitDescription;
@Schema(description = "物料类型描述")
private String materialTypeDescription;
@Schema(description = "物料组描述")
private String materialGroupDescription;
@Schema(description = "外部物料小类组描述")
private String externalMaterialGroupDescription;
@Schema(description = "物料名称", example = "李四")
private String materialName;
@Schema(description = "物料长描述")
private String materialLengthDescription;
@Schema(description = "类型")
private String type;
@Schema(description = "金属元素缩写")
private String abbreviation;
@Schema(description = "金属元素名称", example = "赵六")
private String name;
@Schema(description = "金属元素编码")
private String coding;
@Schema(description = "品位单位")
private String gradeUnit;
@Schema(description = "小数位数")
private Long decimalValue;
}

View File

@@ -2,9 +2,12 @@ package com.zt.plat.module.erp.api;
import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.framework.common.util.object.BeanUtils;
import com.zt.plat.module.erp.api.dto.ErpMaterialDTO;
import com.zt.plat.module.erp.api.dto.ErpProductiveVersionReqDTO;
import com.zt.plat.module.erp.api.dto.ErpQueryReqDTO;
import com.zt.plat.module.erp.api.dto.ErpSubmitReqDTO;
import com.zt.plat.module.erp.controller.admin.erp.vo.ErpMaterialRespVO;
import com.zt.plat.module.erp.service.erp.ErpMaterialService;
import com.zt.plat.module.erp.service.erp.ErpProductiveVersionService;
import com.zt.plat.module.erp.utils.ErpConfig;
import jakarta.annotation.Resource;
@@ -34,6 +37,9 @@ public class ErpExternalApiImpl implements ErpExternalApi {
private ErpConfig erpConfig;
@Resource
private ErpProductiveVersionService erpProductiveVersionService;
@Resource
private ErpMaterialService erpMaterialService;
@Override
public HashMap<String, String> submitDataToErp(ErpSubmitReqDTO reqDTO) {
@@ -52,4 +58,10 @@ public class ErpExternalApiImpl implements ErpExternalApi {
String productiveVersionNumber = erpProductiveVersionService.getErpProductiveVersionByFM(reqDTO);
return success(productiveVersionNumber);
}
@Override
public CommonResult<ErpMaterialDTO> getErpMaterial(ErpMaterialDTO reqDTO) {
ErpMaterialDTO dto = erpMaterialService.getErpMaterial(reqDTO);
return success(dto);
}
}

View File

@@ -2,6 +2,7 @@ package com.zt.plat.module.erp.controller.admin.erp.vo;
import com.zt.plat.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
@@ -14,9 +15,11 @@ import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH
public class ErpProductiveOrderPageReqVO extends PageParam {
@Schema(description = "公司编号")
@NotEmpty(message = "公司编号不能为空")
private String companyNumber;
@Schema(description = "工厂编码")
@NotEmpty(message = "公司编号不能为空")
private String factoryNumber;
@Schema(description = "工厂名称", example = "赵六")
@@ -27,10 +30,12 @@ public class ErpProductiveOrderPageReqVO extends PageParam {
@Schema(description = "基本开始日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@NotEmpty(message = "公司编号不能为空")
private LocalDateTime[] startDate;
@Schema(description = "基本完成日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@NotEmpty(message = "公司编号不能为空")
private LocalDateTime[] endDate;
@Schema(description = "主产品物料编号")

View File

@@ -3,6 +3,7 @@ package com.zt.plat.module.erp.dal.mysql.erp;
import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.zt.plat.module.erp.api.dto.ErpMaterialDTO;
import com.zt.plat.module.erp.controller.admin.erp.vo.ErpMaterialPageReqVO;
import com.zt.plat.module.erp.dal.dataobject.erp.ErpMaterialDO;
import org.apache.ibatis.annotations.Mapper;
@@ -40,5 +41,11 @@ public interface ErpMaterialMapper extends BaseMapperX<ErpMaterialDO> {
String selectMaxCode();
Integer selectByErpMNumbers(List<String> erpMNumber);
Integer countByErpMNumbers(List<String> erpMNumber);
default ErpMaterialDO selectOne(ErpMaterialDTO dto) {
return selectOne(new LambdaQueryWrapperX<ErpMaterialDO>()
.eq(ErpMaterialDO::getDownCenterNumber, dto.getDownCenterNumber())
.last("limit 1"));
}
}

View File

@@ -30,6 +30,8 @@ public class ErpJob {
@Resource
private ErpProcessService erpProcessService;
@Resource
private ErpProductiveOrderService erpProductiveOrderService;
@Resource
private ErpProductiveVersionService erpProductiveVersionService;
@Resource
private ErpPurchaseOrganizationService erpPurchaseOrganizationService;
@@ -50,6 +52,7 @@ public class ErpJob {
erpInternalOrderService.callErpRfcInterface();
erpMaterialService.callErpRfcInterface();
erpProcessService.callErpRfcInterface();
erpProductiveOrderService.callErpRfcInterface();
erpProductiveVersionService.callErpRfcInterface();
erpPurchaseOrganizationService.callErpRfcInterface();
erpSalesOrganizationService.callErpRfcInterface();

View File

@@ -1,6 +1,7 @@
package com.zt.plat.module.erp.service.erp;
import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.module.erp.api.dto.ErpMaterialDTO;
import com.zt.plat.module.erp.controller.admin.erp.vo.ErpMaterialPageReqVO;
import com.zt.plat.module.erp.controller.admin.erp.vo.ErpMaterialRespVO;
import com.zt.plat.module.erp.controller.admin.erp.vo.ErpMaterialSaveReqVO;
@@ -64,4 +65,12 @@ public interface ErpMaterialService {
void callErpRfcInterface();
PageResult<ErpMaterialRespVO> getErpMaterialPageAndOther(ErpMaterialPageReqVO pageReqVO);
/**
* 获得ERP物料数据
*
* @param DTO
* @return ERP物料数据
*/
ErpMaterialDTO getErpMaterial(ErpMaterialDTO DTO);
}

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