From a92ba67876712439528bb55dc1341f35f55bef6d Mon Sep 17 00:00:00 2001 From: yinq Date: Fri, 23 Aug 2024 16:46:33 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20add=E5=90=8C=E6=AD=A5=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E8=AE=A1=E5=88=92=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mes/api/controller/ERPPortController.java | 13 + .../com/os/mes/api/domain/ERPParamDto.java | 14 + .../com/os/mes/api/domain/ERPPlanListVo.java | 27 + .../os/mes/api/service/IERPPortService.java | 7 + .../api/service/impl/ERPPortServiceImpl.java | 72 +- .../com/os/mes/api/utils/ERPConstants.java | 5 + .../controller/ProdPlanErpInfoController.java | 100 ++ .../os/mes/prod/domain/ProdPlanErpInfo.java | 985 ++++++++++++++++++ .../prod/mapper/ProdPlanErpInfoMapper.java | 61 ++ .../prod/service/IProdPlanErpInfoService.java | 70 ++ .../impl/ProdPlanErpInfoServiceImpl.java | 141 +++ .../mapper/mes/prod/ProdPlanErpInfoMapper.xml | 501 +++++++++ .../main/java/com/os/quartz/task/ERPTask.java | 9 + 13 files changed, 1996 insertions(+), 9 deletions(-) create mode 100644 os-mes/src/main/java/com/os/mes/api/domain/ERPPlanListVo.java create mode 100644 os-mes/src/main/java/com/os/mes/prod/controller/ProdPlanErpInfoController.java create mode 100644 os-mes/src/main/java/com/os/mes/prod/domain/ProdPlanErpInfo.java create mode 100644 os-mes/src/main/java/com/os/mes/prod/mapper/ProdPlanErpInfoMapper.java create mode 100644 os-mes/src/main/java/com/os/mes/prod/service/IProdPlanErpInfoService.java create mode 100644 os-mes/src/main/java/com/os/mes/prod/service/impl/ProdPlanErpInfoServiceImpl.java create mode 100644 os-mes/src/main/resources/mapper/mes/prod/ProdPlanErpInfoMapper.xml diff --git a/os-mes/src/main/java/com/os/mes/api/controller/ERPPortController.java b/os-mes/src/main/java/com/os/mes/api/controller/ERPPortController.java index c610d0c..cf0a426 100644 --- a/os-mes/src/main/java/com/os/mes/api/controller/ERPPortController.java +++ b/os-mes/src/main/java/com/os/mes/api/controller/ERPPortController.java @@ -80,5 +80,18 @@ public class ERPPortController extends BaseController { return AjaxResult.success(portService.addSalaryBreakdown(recordStaffSalary)); } + /** + * 获取生产计划管理 + * + * @param paramMap + * @return + */ + @PostMapping("/getERPProductionPlan") + public AjaxResult getERPProductionPlan(@RequestBody Map paramMap) { + ERPParamDto paramDto = new ERPParamDto(); + paramDto.setTaskCode(String.valueOf(paramMap.get("TaskCode"))); + return AjaxResult.success(portService.getERPProductionPlan(paramDto)); + } + } diff --git a/os-mes/src/main/java/com/os/mes/api/domain/ERPParamDto.java b/os-mes/src/main/java/com/os/mes/api/domain/ERPParamDto.java index 122df26..7539360 100644 --- a/os-mes/src/main/java/com/os/mes/api/domain/ERPParamDto.java +++ b/os-mes/src/main/java/com/os/mes/api/domain/ERPParamDto.java @@ -55,6 +55,20 @@ public class ERPParamDto { @JsonProperty(value = "OrderEndTime") private String OrderEndTime; + /** + * 获取计划任务编号 + */ + @JsonProperty(value = "TaskCode") + private String TaskCode; + + public String getTaskCode() { + return TaskCode; + } + + public void setTaskCode(String taskCode) { + TaskCode = taskCode; + } + public String getAppCode() { return AppCode; } diff --git a/os-mes/src/main/java/com/os/mes/api/domain/ERPPlanListVo.java b/os-mes/src/main/java/com/os/mes/api/domain/ERPPlanListVo.java new file mode 100644 index 0000000..4dc3104 --- /dev/null +++ b/os-mes/src/main/java/com/os/mes/api/domain/ERPPlanListVo.java @@ -0,0 +1,27 @@ +package com.os.mes.api.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.os.common.annotation.Excel; +import com.os.common.core.domain.BaseEntity; +import com.os.mes.prod.domain.ProdPlanErpInfo; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + +/** + * 生产计划信息对象 prod_plan_erp_info + * + * @author Yinq + * @date 2024-08-22 + */ +public class ERPPlanListVo extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + + List ProdPlanErpInfo; + +} diff --git a/os-mes/src/main/java/com/os/mes/api/service/IERPPortService.java b/os-mes/src/main/java/com/os/mes/api/service/IERPPortService.java index f38e131..0a1d8f5 100644 --- a/os-mes/src/main/java/com/os/mes/api/service/IERPPortService.java +++ b/os-mes/src/main/java/com/os/mes/api/service/IERPPortService.java @@ -47,4 +47,11 @@ public interface IERPPortService { */ String addSalaryBreakdown(RecordStaffSalary recordStaffSalary); + /** + * 获取生产计划管理 + * @param paramDto + * @return + */ + String getERPProductionPlan(ERPParamDto paramDto); + } diff --git a/os-mes/src/main/java/com/os/mes/api/service/impl/ERPPortServiceImpl.java b/os-mes/src/main/java/com/os/mes/api/service/impl/ERPPortServiceImpl.java index 4a64bd9..ccd284e 100644 --- a/os-mes/src/main/java/com/os/mes/api/service/impl/ERPPortServiceImpl.java +++ b/os-mes/src/main/java/com/os/mes/api/service/impl/ERPPortServiceImpl.java @@ -1,5 +1,6 @@ package com.os.mes.api.service.impl; +import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.PropertyNamingStrategy; @@ -11,7 +12,9 @@ import com.os.mes.api.utils.ERPConstants; import com.os.mes.base.domain.BaseStaffInfo; import com.os.mes.base.service.IBaseStaffInfoService; import com.os.mes.prod.domain.ProdOrderDetail; +import com.os.mes.prod.domain.ProdPlanErpInfo; import com.os.mes.prod.service.IProdOrderInfoService; +import com.os.mes.prod.service.IProdPlanErpInfoService; import com.os.mes.prod.service.impl.ProdOrderInfoServiceImpl; import com.os.mes.record.domain.RecordStaffSalary; import org.slf4j.Logger; @@ -43,6 +46,9 @@ public class ERPPortServiceImpl implements IERPPortService { @Autowired private IBaseStaffInfoService staffInfoService; + @Autowired + private IProdPlanErpInfoService prodPlanErpInfoService; + /** * 获取ERP订单接口 * @@ -81,6 +87,7 @@ public class ERPPortServiceImpl implements IERPPortService { /** * 获取员工工资系数 + * * @param paramDto * @return */ @@ -99,8 +106,8 @@ public class ERPPortServiceImpl implements IERPPortService { ObjectMapper resultMapper = new ObjectMapper(); // 将 JSON 字符串转换为 Java 对象 HashMap hashMap = resultMapper.readValue(result, HashMap.class); - HashMap returnData = (HashMap)hashMap.get("ReturnData"); - List> dataList = (List>)returnData.get("data"); + HashMap returnData = (HashMap) hashMap.get("ReturnData"); + List> dataList = (List>) returnData.get("data"); for (HashMap data : dataList) { BaseStaffInfo baseStaffInfo = staffInfoService.insertStaffByERP(data); resultList.add(baseStaffInfo); @@ -115,6 +122,7 @@ public class ERPPortServiceImpl implements IERPPortService { /** * 最新工资系数 + * * @param paramDto * @return */ @@ -124,13 +132,13 @@ public class ERPPortServiceImpl implements IERPPortService { String requestParam = null; String result = null; - if (StringUtils.isEmpty(paramDto.getAppCode())){ + if (StringUtils.isEmpty(paramDto.getAppCode())) { paramDto.setAppCode(ERPConstants.salaryAppCode); } - if (StringUtils.isEmpty(paramDto.getController())){ + if (StringUtils.isEmpty(paramDto.getController())) { paramDto.setController(ERPConstants.salaryController); } - if (StringUtils.isEmpty(paramDto.getActionName())){ + if (StringUtils.isEmpty(paramDto.getActionName())) { paramDto.setActionName(ERPConstants.salaryActionName); } try { @@ -143,8 +151,8 @@ public class ERPPortServiceImpl implements IERPPortService { ObjectMapper resultMapper = new ObjectMapper(); // 将 JSON 字符串转换为 Java 对象 HashMap hashMap = resultMapper.readValue(result, HashMap.class); - HashMap returnData = (HashMap)hashMap.get("ReturnData"); - HashMap data = (HashMap)returnData.get("data"); + HashMap returnData = (HashMap) hashMap.get("ReturnData"); + HashMap data = (HashMap) returnData.get("data"); latestSalary = resultMapper.readValue(objectMapper.writeValueAsString(data), LatestSalary.class); } catch (Exception e) { logger.warn("获取最新工资系数异常:" + requestParam + "|" + result + "|" + e); @@ -154,6 +162,7 @@ public class ERPPortServiceImpl implements IERPPortService { /** * 新增【薪资明细】 + * * @param recordStaffSalary * @return */ @@ -196,8 +205,8 @@ public class ERPPortServiceImpl implements IERPPortService { ObjectMapper resultMapper = new ObjectMapper(); // 将 JSON 字符串转换为 Java 对象 HashMap hashMap = resultMapper.readValue(result, HashMap.class); - HashMap returnData = (HashMap)hashMap.get("ReturnData"); - HashMap data = (HashMap)returnData.get("data"); + HashMap returnData = (HashMap) hashMap.get("ReturnData"); + HashMap data = (HashMap) returnData.get("data"); objectId = String.valueOf(data.get("ObjectId")); } catch (Exception e) { logger.warn("新增【薪资明细】异常:" + requestParam + "|" + result + "|" + e); @@ -205,5 +214,50 @@ public class ERPPortServiceImpl implements IERPPortService { return objectId; } + /** + * 获取生产计划管理 + * + * @param + * @return + */ + @Override + public String getERPProductionPlan(ERPParamDto paramDto) { + String requestParam = null; + String result = null; + if (StringUtils.isEmpty(paramDto.getAppCode())) { + paramDto.setAppCode(ERPConstants.planAppCode); + } + if (StringUtils.isEmpty(paramDto.getController())) { + paramDto.setController(ERPConstants.planController); + } + if (StringUtils.isEmpty(paramDto.getActionName())) { + paramDto.setActionName(ERPConstants.planActionName); + } + if (StringUtils.isEmpty(paramDto.getTaskCode())) { + return null; + } + + try { + // 创建ObjectMapper实例 对象转JSON字符串 + ObjectMapper objectMapper = new ObjectMapper(); + objectMapper.setPropertyNamingStrategy(PropertyNamingStrategy.UPPER_CAMEL_CASE); + requestParam = objectMapper.writeValueAsString(paramDto); + result = ApiUtils.sendERPHttpPost(ERPConstants.ERP_URL, requestParam); + + // 处理接口返回消息 + ObjectMapper resMapper = new ObjectMapper(); + HashMap map = resMapper.readValue(result, new TypeReference>() {}); + HashMap returnData = (HashMap) map.get("ReturnData"); + List dataList = resMapper.convertValue(returnData.get("data"), new TypeReference>() {}); + // 新增生产计划信息List + prodPlanErpInfoService.insertOrUpdateProdPlanErpInfoList(dataList); + logger.warn("获取生产计划管理成功:" + requestParam + "|" + result); + } catch (JsonProcessingException e) { + logger.warn("获取生产计划管理异常:" + requestParam + "|" + result + "|" + e); + } + + return result; + } + } diff --git a/os-mes/src/main/java/com/os/mes/api/utils/ERPConstants.java b/os-mes/src/main/java/com/os/mes/api/utils/ERPConstants.java index d6fa3de..eba603e 100644 --- a/os-mes/src/main/java/com/os/mes/api/utils/ERPConstants.java +++ b/os-mes/src/main/java/com/os/mes/api/utils/ERPConstants.java @@ -47,4 +47,9 @@ public class ERPConstants { public static final String addSalaryController = "SalaryDetailApiController"; public static final String addSalaryActionName = "CreateSalaryDetail"; + //获取生产计划管理 + public static final String planAppCode = "Afb7b276a38a04d52b7bd4ca314a42b0c"; + public static final String planController = "ProductionPlanApiController"; + public static final String planActionName = "GetProductionPlan"; + } diff --git a/os-mes/src/main/java/com/os/mes/prod/controller/ProdPlanErpInfoController.java b/os-mes/src/main/java/com/os/mes/prod/controller/ProdPlanErpInfoController.java new file mode 100644 index 0000000..2c2e138 --- /dev/null +++ b/os-mes/src/main/java/com/os/mes/prod/controller/ProdPlanErpInfoController.java @@ -0,0 +1,100 @@ +package com.os.mes.prod.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.os.common.annotation.Log; +import com.os.common.core.controller.BaseController; +import com.os.common.core.domain.AjaxResult; +import com.os.common.enums.BusinessType; +import com.os.mes.prod.domain.ProdPlanErpInfo; +import com.os.mes.prod.service.IProdPlanErpInfoService; +import com.os.common.utils.poi.ExcelUtil; +import com.os.common.core.page.TableDataInfo; + +/** + * 生产计划信息Controller + * + * @author Yinq + * @date 2024-08-22 + */ +@RestController +@RequestMapping("/mes/prod/prodPlanErpInfo") +public class ProdPlanErpInfoController extends BaseController { + @Autowired + private IProdPlanErpInfoService prodPlanErpInfoService; + + /** + * 查询生产计划信息列表 + */ + @PreAuthorize("@ss.hasPermi('mes/prod:prodPlanErpInfo:list')") + @GetMapping("/list") + public TableDataInfo list(ProdPlanErpInfo prodPlanErpInfo) { + startPage(); + List list = prodPlanErpInfoService.selectProdPlanErpInfoList(prodPlanErpInfo); + return getDataTable(list); + } + + /** + * 导出生产计划信息列表 + */ + @PreAuthorize("@ss.hasPermi('mes/prod:prodPlanErpInfo:export')") + @Log(title = "生产计划信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, ProdPlanErpInfo prodPlanErpInfo) { + List list = prodPlanErpInfoService.selectProdPlanErpInfoList(prodPlanErpInfo); + ExcelUtil util = new ExcelUtil(ProdPlanErpInfo.class); + util.exportExcel(response, list, "生产计划信息数据"); + } + + /** + * 获取生产计划信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('mes/prod:prodPlanErpInfo:query')") + @GetMapping(value = "/{objId}") + public AjaxResult getInfo(@PathVariable("objId") Long objId) { + return success(prodPlanErpInfoService.selectProdPlanErpInfoByObjId(objId)); + } + + /** + * 新增生产计划信息 + */ + @PreAuthorize("@ss.hasPermi('mes/prod:prodPlanErpInfo:add')") + @Log(title = "生产计划信息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody ProdPlanErpInfo prodPlanErpInfo) { + prodPlanErpInfo.setCreateBy(getUsername()); + return toAjax(prodPlanErpInfoService.insertProdPlanErpInfo(prodPlanErpInfo)); + } + + /** + * 修改生产计划信息 + */ + @PreAuthorize("@ss.hasPermi('mes/prod:prodPlanErpInfo:edit')") + @Log(title = "生产计划信息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody ProdPlanErpInfo prodPlanErpInfo) { + prodPlanErpInfo.setUpdateBy(getUsername()); + return toAjax(prodPlanErpInfoService.updateProdPlanErpInfo(prodPlanErpInfo)); + } + + /** + * 删除生产计划信息 + */ + @PreAuthorize("@ss.hasPermi('mes/prod:prodPlanErpInfo:remove')") + @Log(title = "生产计划信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{objIds}") + public AjaxResult remove(@PathVariable Long[] objIds) { + return toAjax(prodPlanErpInfoService.deleteProdPlanErpInfoByObjIds(objIds)); + } +} diff --git a/os-mes/src/main/java/com/os/mes/prod/domain/ProdPlanErpInfo.java b/os-mes/src/main/java/com/os/mes/prod/domain/ProdPlanErpInfo.java new file mode 100644 index 0000000..ad13cb8 --- /dev/null +++ b/os-mes/src/main/java/com/os/mes/prod/domain/ProdPlanErpInfo.java @@ -0,0 +1,985 @@ +package com.os.mes.prod.domain; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.os.common.annotation.Excel; +import com.os.common.core.domain.BaseEntity; + +/** + * 生产计划信息对象 prod_plan_erp_info + * + * @author Yinq + * @date 2024-08-22 + */ +public class ProdPlanErpInfo extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键标识 */ + private Long objId; + + /** 硬件 */ + @Excel(name = "硬件") + private String hardware; + + /** 软件 */ + @Excel(name = "软件") + private String software; + + /** 阶段文字 */ + @Excel(name = "阶段文字") + private String stageText; + + /** 计划流水号 */ + @Excel(name = "计划流水号") + private String seqNo; + + /** 计划开始时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "计划开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date planStartTime; + + /** 计划结束时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "计划结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date planEndTime; + + /** 关联资源 */ + @Excel(name = "关联资源") + private String associationResource; + + /** 工作效率 */ + @Excel(name = "工作效率") + private String workingEfficiency; + + /** 设备码 */ + @Excel(name = "设备码") + private String equipmentNo; + + /** 准备时间(分) */ + @Excel(name = "准备时间", readConverterExp = "分=") + private BigDecimal preparationDuration; + + /** 收尾时间(分) */ + @Excel(name = "收尾时间", readConverterExp = "分=") + private BigDecimal windUpDuration; + + /** 出布最小速度(米 / 分) */ + @Excel(name = "出布最小速度", readConverterExp = "米=,/=,分=") + private BigDecimal clothMinimumSpeed; + + /** 出布最大速度(米 / 分) */ + @Excel(name = "出布最大速度", readConverterExp = "米=,/=,分=") + private BigDecimal clothMaximumSpeed; + + /** 成型最小速度(米 / 分) */ + @Excel(name = "成型最小速度", readConverterExp = "米=,/=,分=") + private BigDecimal formingMinimumSpeed; + + /** 成型最大速度(米 / 分) */ + @Excel(name = "成型最大速度", readConverterExp = "米=,/=,分=") + private BigDecimal formingMaximumSpeed; + + /** 包胶最小速度(米 / 分) */ + @Excel(name = "包胶最小速度", readConverterExp = "米=,/=,分=") + private BigDecimal glueMinimumSpeed; + + /** 包胶最大速度(米 / 分) */ + @Excel(name = "包胶最大速度", readConverterExp = "米=,/=,分=") + private BigDecimal glueMaximumSpeed; + + /** 每锅硫化米数(m) */ + @Excel(name = "每锅硫化米数", readConverterExp = "m=") + private BigDecimal sulfurizationLength; + + /** 硫化机类型 */ + @Excel(name = "硫化机类型") + private String vulcanizingMachineType; + + /** 硫化板层数 */ + @Excel(name = "硫化板层数") + private String vulcanizedBoardNumber; + + /** 资源名称 */ + @Excel(name = "资源名称") + private String resourceName; + + /** 工艺阶段 */ + @Excel(name = "工艺阶段") + private String processStage; + + /** 前置工艺 */ + @Excel(name = "前置工艺") + private String preProcess; + + /** 发布订单 */ + @Excel(name = "发布订单") + private String releaseOrder; + + /** 任务编号 */ + @Excel(name = "任务编号") + private String taskCode; + + /** 输送带长度规格 */ + @Excel(name = "输送带长度规格") + private String conveyorLengthSpecification; + + /** 上胶厚度(mm) */ + @Excel(name = "上胶厚度", readConverterExp = "m=m") + private BigDecimal upGlueThickness; + + /** 上缓冲胶厚度(mm) */ + @Excel(name = "上缓冲胶厚度", readConverterExp = "m=m") + private BigDecimal upBufferGlueThickness; + + /** 下胶厚度(mm) */ + @Excel(name = "下胶厚度", readConverterExp = "m=m") + private BigDecimal belowGlueThickness; + + /** 下缓冲胶厚度(mm) */ + @Excel(name = "下缓冲胶厚度", readConverterExp = "m=m") + private BigDecimal belowBufferGlueThickness; + + /** 输送带宽度(mm) */ + @Excel(name = "输送带宽度", readConverterExp = "m=m") + private BigDecimal beltWidth; + + /** 客户要求输送带长度(m) */ + @Excel(name = "客户要求输送带长度", readConverterExp = "m=") + private BigDecimal customerRequestConveyorLength; + + /** 压延生产米数(m) */ + @Excel(name = "压延生产米数", readConverterExp = "m=") + private BigDecimal rollingProductionMeters; + + /** 需要硫化米数 */ + @Excel(name = "需要硫化米数") + private BigDecimal vulcanizationMeters; + + /** 推荐硫化时间 */ + @Excel(name = "推荐硫化时间") + private BigDecimal recommendVulcanizationTime; + + /** 出大布米数 */ + @Excel(name = "出大布米数") + private BigDecimal largeClothMeters; + + /** 出小布米数 */ + @Excel(name = "出小布米数") + private BigDecimal smallClothMeters; + + /** 包胶米数 */ + @Excel(name = "包胶米数") + private BigDecimal encapsulationMeters; + + /** 工作速度(每小时) */ + @Excel(name = "工作速度", readConverterExp = "每=小时") + private BigDecimal workSpeed; + + /** 需要工时(小时) */ + @Excel(name = "需要工时", readConverterExp = "小=时") + private BigDecimal workingHours; + + /** 出布面积(㎡) */ + @Excel(name = "出布面积", readConverterExp = "㎡=") + private BigDecimal distributionArea; + + /** 包胶面积(㎡) */ + @Excel(name = "包胶面积", readConverterExp = "㎡=") + private BigDecimal encapsulationArea; + + /** 硫化面积(㎡) */ + @Excel(name = "硫化面积", readConverterExp = "㎡=") + private BigDecimal vulcanizationArea; + + /** 输送带总面积(㎡) */ + @Excel(name = "输送带总面积", readConverterExp = "㎡=") + private BigDecimal conveyorTotalArea; + + /** 胶料工艺 */ + @Excel(name = "胶料工艺") + private String glueProcess; + + /** 上胶使用胶料 */ + @Excel(name = "上胶使用胶料") + private String upGlue; + + /** 上胶系数 */ + @Excel(name = "上胶系数") + private BigDecimal upGlueCoefficient; + + /** 上胶标准用胶量(KG) */ + @Excel(name = "上胶标准用胶量", readConverterExp = "K=G") + private BigDecimal upGlueDosage; + + /** 下胶使用胶料 */ + @Excel(name = "下胶使用胶料") + private String belowGlue; + + /** 下胶系数 */ + @Excel(name = "下胶系数") + private BigDecimal belowGlueCoefficient; + + /** 下胶标准用胶量(KG) */ + @Excel(name = "下胶标准用胶量", readConverterExp = "K=G") + private BigDecimal belowGlueDosage; + + /** 缓冲/布胶使用胶料 */ + @Excel(name = "缓冲/布胶使用胶料") + private String bufferGlue; + + /** 缓冲胶系数 */ + @Excel(name = "缓冲胶系数") + private BigDecimal bufferGlueCoefficient; + + /** 缓冲胶标准用胶量(KG) */ + @Excel(name = "缓冲胶标准用胶量", readConverterExp = "K=G") + private BigDecimal bufferGlueDosage; + + /** 大布布料规格 */ + @Excel(name = "大布布料规格") + private BigDecimal largeClothSpecifications; + + /** 大布擦胶系数 */ + @Excel(name = "大布擦胶系数") + private BigDecimal largeClothFrictioningCoefficient; + + /** 胶布标准用胶量(KG) */ + @Excel(name = "胶布标准用胶量", readConverterExp = "K=G") + private BigDecimal largeClothDosage; + + /** 中间胶使用胶料 */ + @Excel(name = "中间胶使用胶料") + private String middleGlue; + + /** 中间胶系数 */ + @Excel(name = "中间胶系数") + private BigDecimal middleGlueCoefficient; + + /** 中间胶标准用胶量(KG) */ + @Excel(name = "中间胶标准用胶量", readConverterExp = "K=G") + private BigDecimal middleGlueDosage; + + /** 设备使用限制 */ + @Excel(name = "设备使用限制") + private String deviceUsageRestrictions; + + /** 判断工段 */ + @Excel(name = "判断工段") + private String workshopSection; + + /** 班次 */ + @Excel(name = "班次") + private String classes; + + /** 参加任务小组 */ + @Excel(name = "参加任务小组") + private String taskForce; + + /** 班组名称 */ + @Excel(name = "班组名称") + private String teamName; + + /** 组长 */ + @Excel(name = "组长") + private String groupLeader; + + /** 人员活动详情 */ + @Excel(name = "人员活动详情") + private List personnelOperationDetails; + + public void setObjId(Long objId) + { + this.objId = objId; + } + + public Long getObjId() + { + return objId; + } + public void setHardware(String hardware) + { + this.hardware = hardware; + } + + public String getHardware() + { + return hardware; + } + public void setSoftware(String software) + { + this.software = software; + } + + public String getSoftware() + { + return software; + } + public void setStageText(String stageText) + { + this.stageText = stageText; + } + + public String getStageText() + { + return stageText; + } + public void setSeqNo(String seqNo) + { + this.seqNo = seqNo; + } + + public String getSeqNo() + { + return seqNo; + } + public void setPlanStartTime(Date planStartTime) + { + this.planStartTime = planStartTime; + } + + public Date getPlanStartTime() + { + return planStartTime; + } + public void setPlanEndTime(Date planEndTime) + { + this.planEndTime = planEndTime; + } + + public Date getPlanEndTime() + { + return planEndTime; + } + public void setAssociationResource(String associationResource) + { + this.associationResource = associationResource; + } + + public String getAssociationResource() + { + return associationResource; + } + public void setWorkingEfficiency(String workingEfficiency) + { + this.workingEfficiency = workingEfficiency; + } + + public String getWorkingEfficiency() + { + return workingEfficiency; + } + public void setEquipmentNo(String equipmentNo) + { + this.equipmentNo = equipmentNo; + } + + public String getEquipmentNo() + { + return equipmentNo; + } + public void setPreparationDuration(BigDecimal preparationDuration) + { + this.preparationDuration = preparationDuration; + } + + public BigDecimal getPreparationDuration() + { + return preparationDuration; + } + public void setWindUpDuration(BigDecimal windUpDuration) + { + this.windUpDuration = windUpDuration; + } + + public BigDecimal getWindUpDuration() + { + return windUpDuration; + } + public void setClothMinimumSpeed(BigDecimal clothMinimumSpeed) + { + this.clothMinimumSpeed = clothMinimumSpeed; + } + + public BigDecimal getClothMinimumSpeed() + { + return clothMinimumSpeed; + } + public void setClothMaximumSpeed(BigDecimal clothMaximumSpeed) + { + this.clothMaximumSpeed = clothMaximumSpeed; + } + + public BigDecimal getClothMaximumSpeed() + { + return clothMaximumSpeed; + } + public void setFormingMinimumSpeed(BigDecimal formingMinimumSpeed) + { + this.formingMinimumSpeed = formingMinimumSpeed; + } + + public BigDecimal getFormingMinimumSpeed() + { + return formingMinimumSpeed; + } + public void setFormingMaximumSpeed(BigDecimal formingMaximumSpeed) + { + this.formingMaximumSpeed = formingMaximumSpeed; + } + + public BigDecimal getFormingMaximumSpeed() + { + return formingMaximumSpeed; + } + public void setGlueMinimumSpeed(BigDecimal glueMinimumSpeed) + { + this.glueMinimumSpeed = glueMinimumSpeed; + } + + public BigDecimal getGlueMinimumSpeed() + { + return glueMinimumSpeed; + } + public void setGlueMaximumSpeed(BigDecimal glueMaximumSpeed) + { + this.glueMaximumSpeed = glueMaximumSpeed; + } + + public BigDecimal getGlueMaximumSpeed() + { + return glueMaximumSpeed; + } + public void setSulfurizationLength(BigDecimal sulfurizationLength) + { + this.sulfurizationLength = sulfurizationLength; + } + + public BigDecimal getSulfurizationLength() + { + return sulfurizationLength; + } + public void setVulcanizingMachineType(String vulcanizingMachineType) + { + this.vulcanizingMachineType = vulcanizingMachineType; + } + + public String getVulcanizingMachineType() + { + return vulcanizingMachineType; + } + public void setVulcanizedBoardNumber(String vulcanizedBoardNumber) + { + this.vulcanizedBoardNumber = vulcanizedBoardNumber; + } + + public String getVulcanizedBoardNumber() + { + return vulcanizedBoardNumber; + } + public void setResourceName(String resourceName) + { + this.resourceName = resourceName; + } + + public String getResourceName() + { + return resourceName; + } + public void setProcessStage(String processStage) + { + this.processStage = processStage; + } + + public String getProcessStage() + { + return processStage; + } + public void setPreProcess(String preProcess) + { + this.preProcess = preProcess; + } + + public String getPreProcess() + { + return preProcess; + } + public void setReleaseOrder(String releaseOrder) + { + this.releaseOrder = releaseOrder; + } + + public String getReleaseOrder() + { + return releaseOrder; + } + public void setTaskCode(String taskCode) + { + this.taskCode = taskCode; + } + + public String getTaskCode() + { + return taskCode; + } + public void setConveyorLengthSpecification(String conveyorLengthSpecification) + { + this.conveyorLengthSpecification = conveyorLengthSpecification; + } + + public String getConveyorLengthSpecification() + { + return conveyorLengthSpecification; + } + public void setUpGlueThickness(BigDecimal upGlueThickness) + { + this.upGlueThickness = upGlueThickness; + } + + public BigDecimal getUpGlueThickness() + { + return upGlueThickness; + } + public void setUpBufferGlueThickness(BigDecimal upBufferGlueThickness) + { + this.upBufferGlueThickness = upBufferGlueThickness; + } + + public BigDecimal getUpBufferGlueThickness() + { + return upBufferGlueThickness; + } + public void setBelowGlueThickness(BigDecimal belowGlueThickness) + { + this.belowGlueThickness = belowGlueThickness; + } + + public BigDecimal getBelowGlueThickness() + { + return belowGlueThickness; + } + public void setBelowBufferGlueThickness(BigDecimal belowBufferGlueThickness) + { + this.belowBufferGlueThickness = belowBufferGlueThickness; + } + + public BigDecimal getBelowBufferGlueThickness() + { + return belowBufferGlueThickness; + } + public void setBeltWidth(BigDecimal beltWidth) + { + this.beltWidth = beltWidth; + } + + public BigDecimal getBeltWidth() + { + return beltWidth; + } + public void setCustomerRequestConveyorLength(BigDecimal customerRequestConveyorLength) + { + this.customerRequestConveyorLength = customerRequestConveyorLength; + } + + public BigDecimal getCustomerRequestConveyorLength() + { + return customerRequestConveyorLength; + } + public void setRollingProductionMeters(BigDecimal rollingProductionMeters) + { + this.rollingProductionMeters = rollingProductionMeters; + } + + public BigDecimal getRollingProductionMeters() + { + return rollingProductionMeters; + } + public void setVulcanizationMeters(BigDecimal vulcanizationMeters) + { + this.vulcanizationMeters = vulcanizationMeters; + } + + public BigDecimal getVulcanizationMeters() + { + return vulcanizationMeters; + } + public void setRecommendVulcanizationTime(BigDecimal recommendVulcanizationTime) + { + this.recommendVulcanizationTime = recommendVulcanizationTime; + } + + public BigDecimal getRecommendVulcanizationTime() + { + return recommendVulcanizationTime; + } + public void setLargeClothMeters(BigDecimal largeClothMeters) + { + this.largeClothMeters = largeClothMeters; + } + + public BigDecimal getLargeClothMeters() + { + return largeClothMeters; + } + public void setSmallClothMeters(BigDecimal smallClothMeters) + { + this.smallClothMeters = smallClothMeters; + } + + public BigDecimal getSmallClothMeters() + { + return smallClothMeters; + } + public void setEncapsulationMeters(BigDecimal encapsulationMeters) + { + this.encapsulationMeters = encapsulationMeters; + } + + public BigDecimal getEncapsulationMeters() + { + return encapsulationMeters; + } + public void setWorkSpeed(BigDecimal workSpeed) + { + this.workSpeed = workSpeed; + } + + public BigDecimal getWorkSpeed() + { + return workSpeed; + } + public void setWorkingHours(BigDecimal workingHours) + { + this.workingHours = workingHours; + } + + public BigDecimal getWorkingHours() + { + return workingHours; + } + public void setDistributionArea(BigDecimal distributionArea) + { + this.distributionArea = distributionArea; + } + + public BigDecimal getDistributionArea() + { + return distributionArea; + } + public void setEncapsulationArea(BigDecimal encapsulationArea) + { + this.encapsulationArea = encapsulationArea; + } + + public BigDecimal getEncapsulationArea() + { + return encapsulationArea; + } + public void setVulcanizationArea(BigDecimal vulcanizationArea) + { + this.vulcanizationArea = vulcanizationArea; + } + + public BigDecimal getVulcanizationArea() + { + return vulcanizationArea; + } + public void setConveyorTotalArea(BigDecimal conveyorTotalArea) + { + this.conveyorTotalArea = conveyorTotalArea; + } + + public BigDecimal getConveyorTotalArea() + { + return conveyorTotalArea; + } + public void setGlueProcess(String glueProcess) + { + this.glueProcess = glueProcess; + } + + public String getGlueProcess() + { + return glueProcess; + } + public void setUpGlue(String upGlue) + { + this.upGlue = upGlue; + } + + public String getUpGlue() + { + return upGlue; + } + public void setUpGlueCoefficient(BigDecimal upGlueCoefficient) + { + this.upGlueCoefficient = upGlueCoefficient; + } + + public BigDecimal getUpGlueCoefficient() + { + return upGlueCoefficient; + } + public void setUpGlueDosage(BigDecimal upGlueDosage) + { + this.upGlueDosage = upGlueDosage; + } + + public BigDecimal getUpGlueDosage() + { + return upGlueDosage; + } + public void setBelowGlue(String belowGlue) + { + this.belowGlue = belowGlue; + } + + public String getBelowGlue() + { + return belowGlue; + } + public void setBelowGlueCoefficient(BigDecimal belowGlueCoefficient) + { + this.belowGlueCoefficient = belowGlueCoefficient; + } + + public BigDecimal getBelowGlueCoefficient() + { + return belowGlueCoefficient; + } + public void setBelowGlueDosage(BigDecimal belowGlueDosage) + { + this.belowGlueDosage = belowGlueDosage; + } + + public BigDecimal getBelowGlueDosage() + { + return belowGlueDosage; + } + public void setBufferGlue(String bufferGlue) + { + this.bufferGlue = bufferGlue; + } + + public String getBufferGlue() + { + return bufferGlue; + } + public void setBufferGlueCoefficient(BigDecimal bufferGlueCoefficient) + { + this.bufferGlueCoefficient = bufferGlueCoefficient; + } + + public BigDecimal getBufferGlueCoefficient() + { + return bufferGlueCoefficient; + } + public void setBufferGlueDosage(BigDecimal bufferGlueDosage) + { + this.bufferGlueDosage = bufferGlueDosage; + } + + public BigDecimal getBufferGlueDosage() + { + return bufferGlueDosage; + } + public void setLargeClothSpecifications(BigDecimal largeClothSpecifications) + { + this.largeClothSpecifications = largeClothSpecifications; + } + + public BigDecimal getLargeClothSpecifications() + { + return largeClothSpecifications; + } + public void setLargeClothFrictioningCoefficient(BigDecimal largeClothFrictioningCoefficient) + { + this.largeClothFrictioningCoefficient = largeClothFrictioningCoefficient; + } + + public BigDecimal getLargeClothFrictioningCoefficient() + { + return largeClothFrictioningCoefficient; + } + public void setLargeClothDosage(BigDecimal largeClothDosage) + { + this.largeClothDosage = largeClothDosage; + } + + public BigDecimal getLargeClothDosage() + { + return largeClothDosage; + } + public void setMiddleGlue(String middleGlue) + { + this.middleGlue = middleGlue; + } + + public String getMiddleGlue() + { + return middleGlue; + } + public void setMiddleGlueCoefficient(BigDecimal middleGlueCoefficient) + { + this.middleGlueCoefficient = middleGlueCoefficient; + } + + public BigDecimal getMiddleGlueCoefficient() + { + return middleGlueCoefficient; + } + public void setMiddleGlueDosage(BigDecimal middleGlueDosage) + { + this.middleGlueDosage = middleGlueDosage; + } + + public BigDecimal getMiddleGlueDosage() + { + return middleGlueDosage; + } + public void setDeviceUsageRestrictions(String deviceUsageRestrictions) + { + this.deviceUsageRestrictions = deviceUsageRestrictions; + } + + public String getDeviceUsageRestrictions() + { + return deviceUsageRestrictions; + } + public void setWorkshopSection(String workshopSection) + { + this.workshopSection = workshopSection; + } + + public String getWorkshopSection() + { + return workshopSection; + } + public void setClasses(String classes) + { + this.classes = classes; + } + + public String getClasses() + { + return classes; + } + public void setTaskForce(String taskForce) + { + this.taskForce = taskForce; + } + + public String getTaskForce() + { + return taskForce; + } + public void setTeamName(String teamName) + { + this.teamName = teamName; + } + + public String getTeamName() + { + return teamName; + } + public void setGroupLeader(String groupLeader) + { + this.groupLeader = groupLeader; + } + + public String getGroupLeader() + { + return groupLeader; + } + + public List getPersonnelOperationDetails() { + return personnelOperationDetails; + } + + public void setPersonnelOperationDetails(List personnelOperationDetails) { + this.personnelOperationDetails = personnelOperationDetails; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("objId", getObjId()) + .append("hardware", getHardware()) + .append("software", getSoftware()) + .append("stageText", getStageText()) + .append("seqNo", getSeqNo()) + .append("planStartTime", getPlanStartTime()) + .append("planEndTime", getPlanEndTime()) + .append("associationResource", getAssociationResource()) + .append("workingEfficiency", getWorkingEfficiency()) + .append("equipmentNo", getEquipmentNo()) + .append("preparationDuration", getPreparationDuration()) + .append("windUpDuration", getWindUpDuration()) + .append("clothMinimumSpeed", getClothMinimumSpeed()) + .append("clothMaximumSpeed", getClothMaximumSpeed()) + .append("formingMinimumSpeed", getFormingMinimumSpeed()) + .append("formingMaximumSpeed", getFormingMaximumSpeed()) + .append("glueMinimumSpeed", getGlueMinimumSpeed()) + .append("glueMaximumSpeed", getGlueMaximumSpeed()) + .append("sulfurizationLength", getSulfurizationLength()) + .append("vulcanizingMachineType", getVulcanizingMachineType()) + .append("vulcanizedBoardNumber", getVulcanizedBoardNumber()) + .append("resourceName", getResourceName()) + .append("processStage", getProcessStage()) + .append("preProcess", getPreProcess()) + .append("releaseOrder", getReleaseOrder()) + .append("taskCode", getTaskCode()) + .append("conveyorLengthSpecification", getConveyorLengthSpecification()) + .append("upGlueThickness", getUpGlueThickness()) + .append("upBufferGlueThickness", getUpBufferGlueThickness()) + .append("belowGlueThickness", getBelowGlueThickness()) + .append("belowBufferGlueThickness", getBelowBufferGlueThickness()) + .append("beltWidth", getBeltWidth()) + .append("customerRequestConveyorLength", getCustomerRequestConveyorLength()) + .append("rollingProductionMeters", getRollingProductionMeters()) + .append("vulcanizationMeters", getVulcanizationMeters()) + .append("recommendVulcanizationTime", getRecommendVulcanizationTime()) + .append("largeClothMeters", getLargeClothMeters()) + .append("smallClothMeters", getSmallClothMeters()) + .append("encapsulationMeters", getEncapsulationMeters()) + .append("workSpeed", getWorkSpeed()) + .append("workingHours", getWorkingHours()) + .append("distributionArea", getDistributionArea()) + .append("encapsulationArea", getEncapsulationArea()) + .append("vulcanizationArea", getVulcanizationArea()) + .append("conveyorTotalArea", getConveyorTotalArea()) + .append("glueProcess", getGlueProcess()) + .append("upGlue", getUpGlue()) + .append("upGlueCoefficient", getUpGlueCoefficient()) + .append("upGlueDosage", getUpGlueDosage()) + .append("belowGlue", getBelowGlue()) + .append("belowGlueCoefficient", getBelowGlueCoefficient()) + .append("belowGlueDosage", getBelowGlueDosage()) + .append("bufferGlue", getBufferGlue()) + .append("bufferGlueCoefficient", getBufferGlueCoefficient()) + .append("bufferGlueDosage", getBufferGlueDosage()) + .append("largeClothSpecifications", getLargeClothSpecifications()) + .append("largeClothFrictioningCoefficient", getLargeClothFrictioningCoefficient()) + .append("largeClothDosage", getLargeClothDosage()) + .append("middleGlue", getMiddleGlue()) + .append("middleGlueCoefficient", getMiddleGlueCoefficient()) + .append("middleGlueDosage", getMiddleGlueDosage()) + .append("deviceUsageRestrictions", getDeviceUsageRestrictions()) + .append("workshopSection", getWorkshopSection()) + .append("classes", getClasses()) + .append("taskForce", getTaskForce()) + .append("teamName", getTeamName()) + .append("groupLeader", getGroupLeader()) + .append("personnelOperationDetails", getPersonnelOperationDetails()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/os-mes/src/main/java/com/os/mes/prod/mapper/ProdPlanErpInfoMapper.java b/os-mes/src/main/java/com/os/mes/prod/mapper/ProdPlanErpInfoMapper.java new file mode 100644 index 0000000..904dceb --- /dev/null +++ b/os-mes/src/main/java/com/os/mes/prod/mapper/ProdPlanErpInfoMapper.java @@ -0,0 +1,61 @@ +package com.os.mes.prod.mapper; + +import java.util.List; + +import com.os.mes.prod.domain.ProdPlanErpInfo; + +/** + * 生产计划信息Mapper接口 + * + * @author Yinq + * @date 2024-08-22 + */ +public interface ProdPlanErpInfoMapper { + /** + * 查询生产计划信息 + * + * @param objId 生产计划信息主键 + * @return 生产计划信息 + */ + public ProdPlanErpInfo selectProdPlanErpInfoByObjId(Long objId); + + /** + * 查询生产计划信息列表 + * + * @param prodPlanErpInfo 生产计划信息 + * @return 生产计划信息集合 + */ + public List selectProdPlanErpInfoList(ProdPlanErpInfo prodPlanErpInfo); + + /** + * 新增生产计划信息 + * + * @param prodPlanErpInfo 生产计划信息 + * @return 结果 + */ + public int insertProdPlanErpInfo(ProdPlanErpInfo prodPlanErpInfo); + + /** + * 修改生产计划信息 + * + * @param prodPlanErpInfo 生产计划信息 + * @return 结果 + */ + public int updateProdPlanErpInfo(ProdPlanErpInfo prodPlanErpInfo); + + /** + * 删除生产计划信息 + * + * @param objId 生产计划信息主键 + * @return 结果 + */ + public int deleteProdPlanErpInfoByObjId(Long objId); + + /** + * 批量删除生产计划信息 + * + * @param objIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteProdPlanErpInfoByObjIds(Long[] objIds); +} diff --git a/os-mes/src/main/java/com/os/mes/prod/service/IProdPlanErpInfoService.java b/os-mes/src/main/java/com/os/mes/prod/service/IProdPlanErpInfoService.java new file mode 100644 index 0000000..88fe27c --- /dev/null +++ b/os-mes/src/main/java/com/os/mes/prod/service/IProdPlanErpInfoService.java @@ -0,0 +1,70 @@ +package com.os.mes.prod.service; + +import java.util.List; +import com.os.mes.prod.domain.ProdPlanErpInfo; + +/** + * 生产计划信息Service接口 + * + * @author Yinq + * @date 2024-08-22 + */ +public interface IProdPlanErpInfoService +{ + /** + * 查询生产计划信息 + * + * @param objId 生产计划信息主键 + * @return 生产计划信息 + */ + public ProdPlanErpInfo selectProdPlanErpInfoByObjId(Long objId); + + /** + * 查询生产计划信息列表 + * + * @param prodPlanErpInfo 生产计划信息 + * @return 生产计划信息集合 + */ + public List selectProdPlanErpInfoList(ProdPlanErpInfo prodPlanErpInfo); + + /** + * 新增生产计划信息 + * + * @param prodPlanErpInfo 生产计划信息 + * @return 结果 + */ + public int insertProdPlanErpInfo(ProdPlanErpInfo prodPlanErpInfo); + + /** + * 修改生产计划信息 + * + * @param prodPlanErpInfo 生产计划信息 + * @return 结果 + */ + public int updateProdPlanErpInfo(ProdPlanErpInfo prodPlanErpInfo); + + /** + * 批量删除生产计划信息 + * + * @param objIds 需要删除的生产计划信息主键集合 + * @return 结果 + */ + public int deleteProdPlanErpInfoByObjIds(Long[] objIds); + + /** + * 删除生产计划信息信息 + * + * @param objId 生产计划信息主键 + * @return 结果 + */ + public int deleteProdPlanErpInfoByObjId(Long objId); + + /** + * 新增生产计划信息List + * + * @param dataList 生产计划信息 + * @return 结果 + */ + void insertOrUpdateProdPlanErpInfoList(List dataList); + +} diff --git a/os-mes/src/main/java/com/os/mes/prod/service/impl/ProdPlanErpInfoServiceImpl.java b/os-mes/src/main/java/com/os/mes/prod/service/impl/ProdPlanErpInfoServiceImpl.java new file mode 100644 index 0000000..2565772 --- /dev/null +++ b/os-mes/src/main/java/com/os/mes/prod/service/impl/ProdPlanErpInfoServiceImpl.java @@ -0,0 +1,141 @@ +package com.os.mes.prod.service.impl; + +import java.util.List; + +import com.os.common.utils.DateUtils; +import com.os.mes.prod.domain.ProdPlanInfo; +import com.os.mes.prod.service.IProdPlanInfoService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.os.mes.prod.mapper.ProdPlanErpInfoMapper; +import com.os.mes.prod.domain.ProdPlanErpInfo; +import com.os.mes.prod.service.IProdPlanErpInfoService; +import org.springframework.transaction.annotation.Transactional; + +/** + * 生产计划信息Service业务层处理 + * + * @author Yinq + * @date 2024-08-22 + */ +@Service +public class ProdPlanErpInfoServiceImpl implements IProdPlanErpInfoService { + @Autowired + private ProdPlanErpInfoMapper prodPlanErpInfoMapper; + + @Autowired + private IProdPlanInfoService prodPlanInfoService; + + /** + * 查询生产计划信息 + * + * @param objId 生产计划信息主键 + * @return 生产计划信息 + */ + @Override + public ProdPlanErpInfo selectProdPlanErpInfoByObjId(Long objId) { + return prodPlanErpInfoMapper.selectProdPlanErpInfoByObjId(objId); + } + + /** + * 查询生产计划信息列表 + * + * @param prodPlanErpInfo 生产计划信息 + * @return 生产计划信息 + */ + @Override + public List selectProdPlanErpInfoList(ProdPlanErpInfo prodPlanErpInfo) { + return prodPlanErpInfoMapper.selectProdPlanErpInfoList(prodPlanErpInfo); + } + + /** + * 新增生产计划信息 + * + * @param prodPlanErpInfo 生产计划信息 + * @return 结果 + */ + @Override + public int insertProdPlanErpInfo(ProdPlanErpInfo prodPlanErpInfo) { + prodPlanErpInfo.setCreateTime(DateUtils.getNowDate()); + return prodPlanErpInfoMapper.insertProdPlanErpInfo(prodPlanErpInfo); + } + + /** + * 修改生产计划信息 + * + * @param prodPlanErpInfo 生产计划信息 + * @return 结果 + */ + @Override + public int updateProdPlanErpInfo(ProdPlanErpInfo prodPlanErpInfo) { + prodPlanErpInfo.setUpdateTime(DateUtils.getNowDate()); + return prodPlanErpInfoMapper.updateProdPlanErpInfo(prodPlanErpInfo); + } + + /** + * 批量删除生产计划信息 + * + * @param objIds 需要删除的生产计划信息主键 + * @return 结果 + */ + @Override + public int deleteProdPlanErpInfoByObjIds(Long[] objIds) { + return prodPlanErpInfoMapper.deleteProdPlanErpInfoByObjIds(objIds); + } + + /** + * 删除生产计划信息信息 + * + * @param objId 生产计划信息主键 + * @return 结果 + */ + @Override + public int deleteProdPlanErpInfoByObjId(Long objId) { + return prodPlanErpInfoMapper.deleteProdPlanErpInfoByObjId(objId); + } + + /** + * 新增生产计划信息List + * + * @param dataList 生产计划信息 + * @return 结果 + */ + @Override + @Transactional + public void insertOrUpdateProdPlanErpInfoList(List dataList) { + for (ProdPlanErpInfo planErpInfo : dataList) { + String seqNo = planErpInfo.getSeqNo(); + ProdPlanErpInfo selectErpInfo = new ProdPlanErpInfo(); + selectErpInfo.setSeqNo(seqNo); + List infoList = prodPlanErpInfoMapper.selectProdPlanErpInfoList(selectErpInfo); + if (infoList.size() > 0){ + ProdPlanInfo prodPlanInfo = new ProdPlanInfo(); + prodPlanInfo.setPlanCode(seqNo); + List planInfoList = prodPlanInfoService.selectProdPlanInfoList(prodPlanInfo); + ProdPlanInfo planInfo = planInfoList.get(0); + planInfo.setPlanCode(seqNo); + planInfo.setOrderCode(planErpInfo.getTaskCode()); + planInfo.setPlanAmount(planErpInfo.getCustomerRequestConveyorLength()); + planInfo.setPlanBeginTime(planErpInfo.getPlanStartTime()); + planInfo.setPlanEndTime(planErpInfo.getPlanEndTime()); + prodPlanInfoService.updateProdPlanInfo(planInfo); + + ProdPlanErpInfo prodPlanErpInfo = infoList.get(0); + planErpInfo.setObjId(prodPlanErpInfo.getObjId()); + this.updateProdPlanErpInfo(planErpInfo); + } else { + ProdPlanInfo planInfo = new ProdPlanInfo(); + planInfo.setPlanCode(planErpInfo.getSeqNo()); + planInfo.setOrderCode(planErpInfo.getTaskCode()); + planInfo.setPlanAmount(planErpInfo.getCustomerRequestConveyorLength()); +// planInfo.setDeviceCode(planErpInfo.getResourceName()); + planInfo.setPlanBeginTime(planErpInfo.getPlanStartTime()); + planInfo.setPlanEndTime(planErpInfo.getPlanEndTime()); + + prodPlanInfoService.insertProdPlanInfo(planInfo); + this.insertProdPlanErpInfo(planErpInfo); + } + + } + } +} diff --git a/os-mes/src/main/resources/mapper/mes/prod/ProdPlanErpInfoMapper.xml b/os-mes/src/main/resources/mapper/mes/prod/ProdPlanErpInfoMapper.xml new file mode 100644 index 0000000..de48b72 --- /dev/null +++ b/os-mes/src/main/resources/mapper/mes/prod/ProdPlanErpInfoMapper.xml @@ -0,0 +1,501 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select obj_id, + hardware, + software, + stageText, + seqNo, + planStartTime, + planEndTime, + associationResource, + workingEfficiency, + equipmentNo, + preparationDuration, + windUpDuration, + clothMinimumSpeed, + clothMaximumSpeed, + formingMinimumSpeed, + formingMaximumSpeed, + glueMinimumSpeed, + glueMaximumSpeed, + sulfurizationLength, + vulcanizingMachineType, + vulcanizedBoardNumber, + resourceName, + processStage, + preProcess, + releaseOrder, + taskCode, + conveyorLengthSpecification, + upGlueThickness, + upBufferGlueThickness, + belowGlueThickness, + belowBufferGlueThickness, + beltWidth, + customerRequestConveyorLength, + rollingProductionMeters, + vulcanizationMeters, + recommendVulcanizationTime, + largeClothMeters, + smallClothMeters, + encapsulationMeters, + workSpeed, + workingHours, + distributionArea, + encapsulationArea, + vulcanizationArea, + conveyorTotalArea, + glueProcess, + upGlue, + upGlueCoefficient, + upGlueDosage, + belowGlue, + belowGlueCoefficient, + belowGlueDosage, + bufferGlue, + bufferGlueCoefficient, + bufferGlueDosage, + largeClothSpecifications, + largeClothFrictioningCoefficient, + largeClothDosage, + middleGlue, + middleGlueCoefficient, + middleGlueDosage, + deviceUsageRestrictions, + workshopSection, + classes, + taskForce, + teamName, + groupLeader, + create_by, + create_time, + update_by, + update_time + from prod_plan_erp_info + + + + + + + + insert into prod_plan_erp_info + + hardware, + software, + stageText, + seqNo, + planStartTime, + planEndTime, + associationResource, + workingEfficiency, + equipmentNo, + preparationDuration, + windUpDuration, + clothMinimumSpeed, + clothMaximumSpeed, + formingMinimumSpeed, + formingMaximumSpeed, + glueMinimumSpeed, + glueMaximumSpeed, + sulfurizationLength, + vulcanizingMachineType, + vulcanizedBoardNumber, + resourceName, + processStage, + preProcess, + releaseOrder, + taskCode, + conveyorLengthSpecification, + upGlueThickness, + upBufferGlueThickness, + belowGlueThickness, + belowBufferGlueThickness, + beltWidth, + customerRequestConveyorLength, + rollingProductionMeters, + vulcanizationMeters, + recommendVulcanizationTime, + largeClothMeters, + smallClothMeters, + encapsulationMeters, + workSpeed, + workingHours, + distributionArea, + encapsulationArea, + vulcanizationArea, + conveyorTotalArea, + glueProcess, + upGlue, + upGlueCoefficient, + upGlueDosage, + belowGlue, + belowGlueCoefficient, + belowGlueDosage, + bufferGlue, + bufferGlueCoefficient, + bufferGlueDosage, + largeClothSpecifications, + largeClothFrictioningCoefficient, + largeClothDosage, + middleGlue, + middleGlueCoefficient, + middleGlueDosage, + deviceUsageRestrictions, + workshopSection, + classes, + taskForce, + teamName, + groupLeader, + create_by, + create_time, + update_by, + update_time, + + + #{hardware}, + #{software}, + #{stageText}, + #{seqNo}, + #{planStartTime}, + #{planEndTime}, + #{associationResource}, + #{workingEfficiency}, + #{equipmentNo}, + #{preparationDuration}, + #{windUpDuration}, + #{clothMinimumSpeed}, + #{clothMaximumSpeed}, + #{formingMinimumSpeed}, + #{formingMaximumSpeed}, + #{glueMinimumSpeed}, + #{glueMaximumSpeed}, + #{sulfurizationLength}, + #{vulcanizingMachineType}, + #{vulcanizedBoardNumber}, + #{resourceName}, + #{processStage}, + #{preProcess}, + #{releaseOrder}, + #{taskCode}, + #{conveyorLengthSpecification}, + #{upGlueThickness}, + #{upBufferGlueThickness}, + #{belowGlueThickness}, + #{belowBufferGlueThickness}, + #{beltWidth}, + #{customerRequestConveyorLength}, + #{rollingProductionMeters}, + #{vulcanizationMeters}, + #{recommendVulcanizationTime}, + #{largeClothMeters}, + #{smallClothMeters}, + #{encapsulationMeters}, + #{workSpeed}, + #{workingHours}, + #{distributionArea}, + #{encapsulationArea}, + #{vulcanizationArea}, + #{conveyorTotalArea}, + #{glueProcess}, + #{upGlue}, + #{upGlueCoefficient}, + #{upGlueDosage}, + #{belowGlue}, + #{belowGlueCoefficient}, + #{belowGlueDosage}, + #{bufferGlue}, + #{bufferGlueCoefficient}, + #{bufferGlueDosage}, + #{largeClothSpecifications}, + #{largeClothFrictioningCoefficient}, + #{largeClothDosage}, + #{middleGlue}, + #{middleGlueCoefficient}, + #{middleGlueDosage}, + #{deviceUsageRestrictions}, + #{workshopSection}, + #{classes}, + #{taskForce}, + #{teamName}, + #{groupLeader}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update prod_plan_erp_info + + hardware = #{hardware}, + software = #{software}, + stageText = #{stageText}, + seqNo = #{seqNo}, + planStartTime = #{planStartTime}, + planEndTime = #{planEndTime}, + associationResource = #{associationResource}, + workingEfficiency = #{workingEfficiency}, + equipmentNo = #{equipmentNo}, + preparationDuration = #{preparationDuration}, + windUpDuration = #{windUpDuration}, + clothMinimumSpeed = #{clothMinimumSpeed}, + clothMaximumSpeed = #{clothMaximumSpeed}, + formingMinimumSpeed = #{formingMinimumSpeed}, + formingMaximumSpeed = #{formingMaximumSpeed}, + glueMinimumSpeed = #{glueMinimumSpeed}, + glueMaximumSpeed = #{glueMaximumSpeed}, + sulfurizationLength = #{sulfurizationLength}, + vulcanizingMachineType = #{vulcanizingMachineType}, + vulcanizedBoardNumber = #{vulcanizedBoardNumber}, + resourceName = #{resourceName}, + processStage = #{processStage}, + preProcess = #{preProcess}, + releaseOrder = #{releaseOrder}, + taskCode = #{taskCode}, + conveyorLengthSpecification = + #{conveyorLengthSpecification}, + + upGlueThickness = #{upGlueThickness}, + upBufferGlueThickness = #{upBufferGlueThickness}, + belowGlueThickness = #{belowGlueThickness}, + belowBufferGlueThickness = #{belowBufferGlueThickness}, + beltWidth = #{beltWidth}, + customerRequestConveyorLength = + #{customerRequestConveyorLength}, + + rollingProductionMeters = #{rollingProductionMeters}, + vulcanizationMeters = #{vulcanizationMeters}, + recommendVulcanizationTime = #{recommendVulcanizationTime}, + + largeClothMeters = #{largeClothMeters}, + smallClothMeters = #{smallClothMeters}, + encapsulationMeters = #{encapsulationMeters}, + workSpeed = #{workSpeed}, + workingHours = #{workingHours}, + distributionArea = #{distributionArea}, + encapsulationArea = #{encapsulationArea}, + vulcanizationArea = #{vulcanizationArea}, + conveyorTotalArea = #{conveyorTotalArea}, + glueProcess = #{glueProcess}, + upGlue = #{upGlue}, + upGlueCoefficient = #{upGlueCoefficient}, + upGlueDosage = #{upGlueDosage}, + belowGlue = #{belowGlue}, + belowGlueCoefficient = #{belowGlueCoefficient}, + belowGlueDosage = #{belowGlueDosage}, + bufferGlue = #{bufferGlue}, + bufferGlueCoefficient = #{bufferGlueCoefficient}, + bufferGlueDosage = #{bufferGlueDosage}, + largeClothSpecifications = #{largeClothSpecifications}, + largeClothFrictioningCoefficient = + #{largeClothFrictioningCoefficient}, + + largeClothDosage = #{largeClothDosage}, + middleGlue = #{middleGlue}, + middleGlueCoefficient = #{middleGlueCoefficient}, + middleGlueDosage = #{middleGlueDosage}, + deviceUsageRestrictions = #{deviceUsageRestrictions}, + workshopSection = #{workshopSection}, + classes = #{classes}, + taskForce = #{taskForce}, + teamName = #{teamName}, + groupLeader = #{groupLeader}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where obj_id = #{objId} + + + + delete + from prod_plan_erp_info + where obj_id = #{objId} + + + + delete from prod_plan_erp_info where obj_id in + + #{objId} + + + \ No newline at end of file diff --git a/os-quartz/src/main/java/com/os/quartz/task/ERPTask.java b/os-quartz/src/main/java/com/os/quartz/task/ERPTask.java index 84cb100..7638133 100644 --- a/os-quartz/src/main/java/com/os/quartz/task/ERPTask.java +++ b/os-quartz/src/main/java/com/os/quartz/task/ERPTask.java @@ -49,6 +49,15 @@ public class ERPTask { portService.getERPEmployeeWageData(paramDto); } + public void ERPProductionPlanTask() { + //获取生产计划管理 + ERPParamDto paramDto = new ERPParamDto(); + paramDto.setAppCode(ERPConstants.salaryAppCode); + paramDto.setController(ERPConstants.salaryController); + paramDto.setActionName(ERPConstants.salaryActionName); + portService.getERPEmployeeWageData(paramDto); + } + /** * 输出days天type的日期 * type: 0-减法;1-加法