From a5549c343b4ef5eb7e9cb380ff93f4b64cd284cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=AE=E7=AC=91=E7=9D=80=E9=9D=A2=E5=AF=B9=E6=98=8E?= =?UTF-8?q?=E5=A4=A9?= <752558143@qq.com> Date: Thu, 16 May 2024 20:42:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=BA=E7=A1=80=E4=B8=BB=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/base/IMesAssemblyPartNosortCfgService.java | 14 + .../ext/mes/api/base/IMesPartSapService.java | 13 + .../mes/api/base/IMesProdRuleNosortCfgService.java | 14 + .../mes/api/base/IMesProdRuleSortCfgService.java | 14 + .../mes/api/base/IMesTimeEfficientCfgService.java | 14 + .../ext/mes/api/busi/IEquipmentExtService.java | 31 ++ .../controller/base/BaseExtDataController.java | 615 +++++++++++++++------ .../controller/base/BaseMesController.java | 4 +- .../controller/base/ExtProdOrgController.java | 5 +- .../base/MesAssemblyPartNosortCfgController.java | 17 + .../controller/base/MesPartSapController.java | 17 + .../base/MesProdRuleNosortCfgController.java | 17 + .../base/MesProdRuleSortCfgController.java | 17 + .../base/MesTimeEfficientCfgController.java | 17 + .../serviceimpl/base/EquipmentExtService.java | 72 +++ .../base/MesAssemblyPartNosortCfgService.java | 14 + .../serviceimpl/base/MesPartSapService.java | 21 + .../base/MesProdRuleNosortCfgService.java | 86 +++ .../base/MesProdRuleSortCfgService.java | 84 +++ .../base/MesTimeEfficientCfgService.java | 16 + 20 files changed, 942 insertions(+), 160 deletions(-) create mode 100644 modules/i3plus-ext-mes-api/src/main/java/cn/estsh/i3plus/ext/mes/api/base/IMesAssemblyPartNosortCfgService.java create mode 100644 modules/i3plus-ext-mes-api/src/main/java/cn/estsh/i3plus/ext/mes/api/base/IMesPartSapService.java create mode 100644 modules/i3plus-ext-mes-api/src/main/java/cn/estsh/i3plus/ext/mes/api/base/IMesProdRuleNosortCfgService.java create mode 100644 modules/i3plus-ext-mes-api/src/main/java/cn/estsh/i3plus/ext/mes/api/base/IMesProdRuleSortCfgService.java create mode 100644 modules/i3plus-ext-mes-api/src/main/java/cn/estsh/i3plus/ext/mes/api/base/IMesTimeEfficientCfgService.java create mode 100644 modules/i3plus-ext-mes-api/src/main/java/cn/estsh/i3plus/ext/mes/api/busi/IEquipmentExtService.java create mode 100644 modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/controller/base/MesAssemblyPartNosortCfgController.java create mode 100644 modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/controller/base/MesPartSapController.java create mode 100644 modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/controller/base/MesProdRuleNosortCfgController.java create mode 100644 modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/controller/base/MesProdRuleSortCfgController.java create mode 100644 modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/controller/base/MesTimeEfficientCfgController.java create mode 100644 modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/base/EquipmentExtService.java create mode 100644 modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/base/MesAssemblyPartNosortCfgService.java create mode 100644 modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/base/MesPartSapService.java create mode 100644 modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/base/MesProdRuleNosortCfgService.java create mode 100644 modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/base/MesProdRuleSortCfgService.java create mode 100644 modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/base/MesTimeEfficientCfgService.java diff --git a/modules/i3plus-ext-mes-api/src/main/java/cn/estsh/i3plus/ext/mes/api/base/IMesAssemblyPartNosortCfgService.java b/modules/i3plus-ext-mes-api/src/main/java/cn/estsh/i3plus/ext/mes/api/base/IMesAssemblyPartNosortCfgService.java new file mode 100644 index 0000000..af32e9d --- /dev/null +++ b/modules/i3plus-ext-mes-api/src/main/java/cn/estsh/i3plus/ext/mes/api/base/IMesAssemblyPartNosortCfgService.java @@ -0,0 +1,14 @@ +package cn.estsh.i3plus.ext.mes.api.base; + +import cn.estsh.i3plus.pojo.mes.bean.MesAssemblyPartNosortCfg; +import cn.estsh.i3plus.pojo.mes.bean.MesPart; + +/** + * @Description: + * @CreateDate 2024/04/16 + * @Author zxw + */ +public interface IMesAssemblyPartNosortCfgService extends IBaseMesService { + + +} diff --git a/modules/i3plus-ext-mes-api/src/main/java/cn/estsh/i3plus/ext/mes/api/base/IMesPartSapService.java b/modules/i3plus-ext-mes-api/src/main/java/cn/estsh/i3plus/ext/mes/api/base/IMesPartSapService.java new file mode 100644 index 0000000..0bf828d --- /dev/null +++ b/modules/i3plus-ext-mes-api/src/main/java/cn/estsh/i3plus/ext/mes/api/base/IMesPartSapService.java @@ -0,0 +1,13 @@ +package cn.estsh.i3plus.ext.mes.api.base; + +import cn.estsh.i3plus.pojo.mes.bean.MesPart; +import cn.estsh.i3plus.pojo.mes.bean.MesPartSap; + +/** + * @Description: + * @CreateDate 2024/04/16 + * @Author zxw + */ +public interface IMesPartSapService extends IBaseMesService { + +} diff --git a/modules/i3plus-ext-mes-api/src/main/java/cn/estsh/i3plus/ext/mes/api/base/IMesProdRuleNosortCfgService.java b/modules/i3plus-ext-mes-api/src/main/java/cn/estsh/i3plus/ext/mes/api/base/IMesProdRuleNosortCfgService.java new file mode 100644 index 0000000..1b392ae --- /dev/null +++ b/modules/i3plus-ext-mes-api/src/main/java/cn/estsh/i3plus/ext/mes/api/base/IMesProdRuleNosortCfgService.java @@ -0,0 +1,14 @@ +package cn.estsh.i3plus.ext.mes.api.base; + +import cn.estsh.i3plus.pojo.mes.bean.MesPart; +import cn.estsh.i3plus.pojo.mes.bean.MesProdRuleNosortCfg; + +/** + * @Description: + * @CreateDate 2024/04/16 + * @Author zxw + */ +public interface IMesProdRuleNosortCfgService extends IBaseMesService { + + +} diff --git a/modules/i3plus-ext-mes-api/src/main/java/cn/estsh/i3plus/ext/mes/api/base/IMesProdRuleSortCfgService.java b/modules/i3plus-ext-mes-api/src/main/java/cn/estsh/i3plus/ext/mes/api/base/IMesProdRuleSortCfgService.java new file mode 100644 index 0000000..9ba1234 --- /dev/null +++ b/modules/i3plus-ext-mes-api/src/main/java/cn/estsh/i3plus/ext/mes/api/base/IMesProdRuleSortCfgService.java @@ -0,0 +1,14 @@ +package cn.estsh.i3plus.ext.mes.api.base; + +import cn.estsh.i3plus.pojo.mes.bean.MesPart; +import cn.estsh.i3plus.pojo.mes.bean.MesProdRuleSortCfg; + +/** + * @Description: + * @CreateDate 2024/04/16 + * @Author zxw + */ +public interface IMesProdRuleSortCfgService extends IBaseMesService { + + +} diff --git a/modules/i3plus-ext-mes-api/src/main/java/cn/estsh/i3plus/ext/mes/api/base/IMesTimeEfficientCfgService.java b/modules/i3plus-ext-mes-api/src/main/java/cn/estsh/i3plus/ext/mes/api/base/IMesTimeEfficientCfgService.java new file mode 100644 index 0000000..254c430 --- /dev/null +++ b/modules/i3plus-ext-mes-api/src/main/java/cn/estsh/i3plus/ext/mes/api/base/IMesTimeEfficientCfgService.java @@ -0,0 +1,14 @@ +package cn.estsh.i3plus.ext.mes.api.base; + +import cn.estsh.i3plus.pojo.mes.bean.MesPart; +import cn.estsh.i3plus.pojo.mes.bean.MesTimeEfficientCfg; + +/** + * @Description: + * @CreateDate 2024/04/16 + * @Author zxw + */ +public interface IMesTimeEfficientCfgService extends IBaseMesService { + + +} diff --git a/modules/i3plus-ext-mes-api/src/main/java/cn/estsh/i3plus/ext/mes/api/busi/IEquipmentExtService.java b/modules/i3plus-ext-mes-api/src/main/java/cn/estsh/i3plus/ext/mes/api/busi/IEquipmentExtService.java new file mode 100644 index 0000000..eaed263 --- /dev/null +++ b/modules/i3plus-ext-mes-api/src/main/java/cn/estsh/i3plus/ext/mes/api/busi/IEquipmentExtService.java @@ -0,0 +1,31 @@ +package cn.estsh.i3plus.ext.mes.api.busi; + +import cn.estsh.i3plus.pojo.base.bean.ListPager; +import cn.estsh.i3plus.pojo.base.common.Pager; +import cn.estsh.i3plus.pojo.mes.bean.MesEquipment; +import cn.estsh.i3plus.pojo.mes.model.MesEquipmentModel; +import io.swagger.annotations.ApiOperation; + +import java.util.List; + +/** + * @Description : mes设备管理 + * @Reference : + * @Author : wangjie + * @CreateDate : 2019-08-26 + * @Modify: + **/ +public interface IEquipmentExtService { + + + /** + * 按条件分页查询mes设备台账-组织模型 + * + * @param equipment 设备台账 + * @param pager 分页条件 + * @return 数据集合 + */ + @ApiOperation(value = "按条件分页查询mes设备台账-组织模型") + ListPager queryMesEquipmentByPagerOrg(MesEquipment equipment, Pager pager); + +} diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/controller/base/BaseExtDataController.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/controller/base/BaseExtDataController.java index d904058..0b08b47 100644 --- a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/controller/base/BaseExtDataController.java +++ b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/controller/base/BaseExtDataController.java @@ -1,3 +1,4 @@ +/* package cn.estsh.i3plus.ext.mes.apiservice.controller.base; import cn.estsh.i3plus.ext.mes.api.base.IMesEnumExtService; @@ -6,8 +7,7 @@ import cn.estsh.i3plus.icloud.core.sdk.ICoreLocaleResourceCloud; import cn.estsh.i3plus.icloud.core.sdk.ICorePersonnelCloud; import cn.estsh.i3plus.icloud.core.sdk.ICoreSysFileCloud; import cn.estsh.i3plus.mes.api.iservice.base.*; -import cn.estsh.i3plus.mes.api.iservice.busi.IElectrotestingPrintDataService; -import cn.estsh.i3plus.mes.api.iservice.busi.IEquipmentService; +import cn.estsh.i3plus.mes.api.iservice.busi.*; import cn.estsh.i3plus.mes.apiservice.serviceimpl.base.FileService; import cn.estsh.i3plus.platform.common.convert.ConvertBean; import cn.estsh.i3plus.platform.common.exception.BaseImppException; @@ -56,13 +56,15 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; +*/ /** * @Description: * @Reference: * @Author: yiming.gu * @CreateDate:2019-05-06-9:51 * @Modify: - **/ + **//* + @RestController @Api(description = "MES基础数据") @RequestMapping(MesCommonConstant.MES_YANFEN + "/base-data") @@ -251,7 +253,9 @@ public class BaseExtDataController extends MesBaseController { private static final String EXCEL_NAME = "MES_PROD_CFG_CACHE_IMPORTSPEED"; - /*************MES BYPASS项映射关系****start***********/ + */ +/*************MES BYPASS项映射关系****start***********//* + @GetMapping(value = "/mes-bypass-mapping/query") @ApiOperation(value = "按条件分页查询MES BYPASS项映射关系数据") @@ -328,9 +332,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES MES_BYPASS项映射关系****end***********/ + */ +/*************MES MES_BYPASS项映射关系****end***********//* + + + */ +/*************MES 库存排程配置****start***********//* - /*************MES 库存排程配置****start***********/ @GetMapping(value = "/mes-part-stock-schedule/query") @ApiOperation(value = "按条件分页查询MES库存排程配置数据") @@ -431,9 +439,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 质量检测标准****start***********/ + */ +/*************MES 质量检测标准****start***********//* + + + */ +/*************MES 质量检测标准****start***********//* - /*************MES 质量检测标准****start***********/ @GetMapping(value = "/mes-quality-standard-cfg/query") @ApiOperation(value = "按条件分页查询MES质量检测标准数据") @@ -513,9 +525,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 质量检测标准****start***********/ + */ +/*************MES 质量检测标准****start***********//* + + + */ +/*************MES 物料对象****start***********//* - /*************MES 物料对象****start***********/ @GetMapping(value = "/mes-part-object/query") @ApiOperation(value = "按条件分页查询MES物料对象数据") @@ -592,9 +608,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 物料对象****start***********/ + */ +/*************MES 物料对象****start***********//* + + + */ +/*************MES 接口清单****start***********//* - /*************MES 接口清单****start***********/ @GetMapping(value = "/mes-if/query") @ApiOperation(value = "按条件分页查询MES接口清单数据") @@ -673,9 +693,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 接口清单****start***********/ + */ +/*************MES 接口清单****start***********//* + + + */ +/*************MES 动作接口配置****start***********//* - /*************MES 动作接口配置****start***********/ @GetMapping(value = "/mes-action-if/query") @ApiOperation(value = "按条件分页查询MES动作接口配置数据") @@ -752,9 +776,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 动作接口配置****start***********/ + */ +/*************MES 动作接口配置****start***********//* + + + */ +/*************MES 关键动作****start***********//* - /*************MES 关键动作****start***********/ @GetMapping(value = "/mes-key-action/query") @ApiOperation(value = "按条件分页查询MES关键动作数据") @@ -831,9 +859,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 关键动作****start***********/ + */ +/*************MES 关键动作****start***********//* + + + */ +/*************MES 模板配置****start***********//* - /*************MES 模板配置****start***********/ @GetMapping(value = "/mes-label-template/query") @ApiOperation(value = "获取模板配置") @@ -850,9 +882,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 模板配置****start***********/ + */ +/*************MES 模板配置****start***********//* + + + */ +/*************MES 工厂初始化****start***********//* - /*************MES 工厂初始化****start***********/ @PostMapping(value = "/mes-org-init/insert") @ApiOperation(value = "工厂初始化") @@ -875,9 +911,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 工厂初始化****start***********/ + */ +/*************MES 工厂初始化****start***********//* + + + */ +/*************MES 产品编码配置****start***********//* - /*************MES 产品编码配置****start***********/ @GetMapping(value = "/mes-prod-encode-cfg/query") @ApiOperation(value = "按条件分页查询MES产品编码配置数据") @@ -957,9 +997,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 产品编码配置****start***********/ + */ +/*************MES 产品编码配置****start***********//* + + + */ +/*************MES 数据对象****start***********//* - /*************MES 数据对象****start***********/ @GetMapping(value = "/mes-data-object/query") @ApiOperation(value = "按条件分页查询MES数据对象数据") @@ -1041,9 +1085,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 数据对象****start***********/ + */ +/*************MES 数据对象****start***********//* + + + */ +/*************MES 产品包装关系****start***********//* - /*************MES 产品包装关系****start***********/ @GetMapping(value = "/mes-prod-pack/query") @ApiOperation(value = "按条件分页查询MES产品包装关系数据") @@ -1126,9 +1174,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 产品包装关系****start***********/ + */ +/*************MES 产品包装关系****start***********//* + + + */ +/*************MES 对象结构****start***********//* - /*************MES 对象结构****start***********/ @GetMapping(value = "/mes-object-cfg/query") @ApiOperation(value = "按条件分页查询MES对象结构数据") @@ -1208,9 +1260,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 对象结构****start***********/ + */ +/*************MES 对象结构****start***********//* + + + */ +/*************MES 首检件配置****start***********//* - /*************MES 首检件配置****start***********/ @GetMapping(value = "/mes-fi-cfg/query") @ApiOperation(value = "按条件分页查询MES首检件配置数据") @@ -1290,9 +1346,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 首检件配置****start***********/ + */ +/*************MES 首检件配置****start***********//* + + + */ +/*************MES 缺陷原因****start***********//* - /*************MES 缺陷原因****start***********/ @GetMapping(value = "/mes-defect-causes/query") @ApiOperation(value = "查询MES缺陷原因") @@ -1387,9 +1447,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 缺陷原因*****end***********/ + */ +/*************MES 缺陷原因*****end***********//* + + + */ +/*************MES 类型信息****start***********//* - /*************MES 类型信息****start***********/ @GetMapping(value = "/mes-type-cfg/query") @ApiOperation(value = "按条件分页查询MES类型信息") @@ -1484,9 +1548,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 类型信息*****end***********/ + */ +/*************MES 类型信息*****end***********//* + + + */ +/*************MES 产品类型图片****start***********//* - /*************MES 产品类型图片****start***********/ @GetMapping(value = "/mes-produce-ctgy-picture/query") @ApiOperation(value = "按条件分页查询MES产品类型图片信息") @@ -1576,9 +1644,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 产品类型图片*****end***********/ + */ +/*************MES 产品类型图片*****end***********//* + + + */ +/*************MES 缺陷****start***********//* - /*************MES 缺陷****start***********/ @GetMapping(value = "/mes-defects/query") @ApiOperation(value = "查询MES缺陷信息") @@ -1683,9 +1755,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 缺陷*****end***********/ + */ +/*************MES 缺陷*****end***********//* + + + */ +/*************MES 过程质量检验****start***********//* - /*************MES 过程质量检验****start***********/ @GetMapping(value = "/mes-qc-check-standard/query") @ApiOperation(value = "按条件分页查询MES过程质量检验信息") @@ -1773,9 +1849,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 过程质量检验*****end***********/ + */ +/*************MES 过程质量检验*****end***********//* + + + */ +/*************MES_DB地址清单*****start***********//* - /*************MES_DB地址清单*****start***********/ @GetMapping(value = "/mes-datasource/query") @ApiOperation(value = "按条件分页查询MES_DB地址清单信息") @@ -1864,9 +1944,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES_DB地址清单*****end***********/ + */ +/*************MES_DB地址清单*****end***********//* + + + */ +/*************新版-PLC设备信息配置服务*****start***********//* - /*************新版-PLC设备信息配置服务*****start***********/ @GetMapping(value = "/plc/query") @ApiOperation(value = "按条件分页查询PLC设备信息配置信息") @@ -1963,9 +2047,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************新版-PLC设备信息配置服务*****end***********/ + */ +/*************新版-PLC设备信息配置服务*****end***********//* + + + */ +/*************MES按钮条件配置服务*****start***********//* - /*************MES按钮条件配置服务*****start***********/ @GetMapping(value = "/mes-button-status/query") @ApiOperation(value = "按条件分页查询MES按钮条件配置数据") @@ -2048,9 +2136,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES按钮条件配置服务*****end***********/ + */ +/*************MES按钮条件配置服务*****end***********//* + + + */ +/*************MES班组服务*****start***********//* - /*************MES班组服务*****start***********/ @GetMapping(value = "/mes-shift-group/query") @ApiOperation(value = "按条件分页查询MES班组数据") @@ -2147,9 +2239,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES班组服务*****end***********/ + */ +/*************MES班组服务*****end***********//* + + + */ +/*************获取类的field*****start***********//* - /*************获取类的field*****start***********/ @GetMapping(value = "/mes-class-field/query") @ApiOperation(value = "按class名字获取没有transient的field") public ResultBean queryClassField(MesPcnSyncCfg mesPcnSyncCfg) { @@ -2162,8 +2258,12 @@ public class BaseExtDataController extends MesBaseController { return ImppExceptionBuilder.newInstance().buildExceptionResult(e); } } - /*************获取类的field*****end***********/ - /*************MES条码生成规则*****start***********/ + */ +/*************获取类的field*****end***********//* + + */ +/*************MES条码生成规则*****start***********//* + @GetMapping(value = "/mes-number-rule/query") @ApiOperation(value = "按条件分页查询MES条码生成规则") @@ -2268,10 +2368,14 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES条码生成规则*****end***********/ + */ +/*************MES条码生成规则*****end***********//* + + + */ +/*************MES班次服务*****start***********//* - /*************MES班次服务*****start***********/ @GetMapping(value = "/mes-shift/query") @ApiOperation(value = "按条件分页查询MES班次数据") @@ -2373,9 +2477,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES班次服务*****end***********/ + */ +/*************MES班次服务*****end***********//* + + + */ +/*************MES班次休息服务*****start***********//* - /*************MES班次休息服务*****start***********/ @GetMapping(value = "/mes-shift-rest/query") @ApiOperation(value = "按条件分页查询MES班次休息数据") @@ -2453,9 +2561,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES班次休息服务*****end***********/ + */ +/*************MES班次休息服务*****end***********//* + + + */ +/*************MES BOM服务*****start***********//* - /*************MES BOM服务*****start***********/ @GetMapping(value = "/mes-bom/query") @ApiOperation(value = "按条件分页查询MES BOM数据") @@ -2531,9 +2643,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES BOM服务*****end***********/ + */ +/*************MES BOM服务*****end***********//* + + + */ +/*************MES工位BOM服务*****start***********//* - /*************MES工位BOM服务*****start***********/ @GetMapping(value = "/mes-station-bom/query") @ApiOperation(value = "按条件分页查询MES工位BOM数据") @@ -2615,9 +2731,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES工位BOM服务*****end***********/ + */ +/*************MES工位BOM服务*****end***********//* + + + */ +/*************MES设备关键数据服务*****start***********//* - /*************MES设备关键数据服务*****start***********/ @GetMapping(value = "/mes-key-data/query") @ApiOperation(value = "按条件分页查询设备关键数据信息") @@ -2711,9 +2831,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES设备关键数据服务*****end***********/ + */ +/*************MES设备关键数据服务*****end***********//* + + + */ +/*************MES物料关键数据关系服务*****start***********//* - /*************MES物料关键数据关系服务*****start***********/ @GetMapping(value = "/mes-kp-data/query") @ApiOperation(value = "按条件分页查询物料关键数据关系信息") @@ -2792,9 +2916,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES物料关键数据关系服务*****end***********/ + */ +/*************MES物料关键数据关系服务*****end***********//* + + + */ +/*************MES产品配置类型服务*****start***********//* - /*************MES产品配置类型服务*****start***********/ @GetMapping(value = "/mes-prod-cfg-type/query") @ApiOperation(value = "按条件分页查询产品配置类型信息") @@ -2904,9 +3032,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES产品配置类型服务*****end***********/ + */ +/*************MES产品配置类型服务*****end***********//* + + + */ +/*************MES产品配置服务*****start***********//* - /*************MES产品配置服务*****start***********/ @GetMapping(value = "/mes-prod-cfg/query") @ApiOperation(value = "按条件分页查询产品配置信息") @@ -3001,9 +3133,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES产品配置服务*****end***********/ + */ +/*************MES产品配置服务*****end***********//* + + + */ +/*************MES设备服务*****start***********//* - /*************MES设备服务*****start***********/ @GetMapping("/equipment/get-by-work-center") @ApiOperation(value = "根据工作中心查询设备") public ResultBean queryEquipmentByWorkCenter(MesEquipment mesEquipment) { @@ -3042,9 +3178,13 @@ public class BaseExtDataController extends MesBaseController { return ResultBean.success("查询成功").setResultList(mesEquipments) .setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()); } - /*************MES设备服务*****end***********/ + */ +/*************MES设备服务*****end***********//* + + + */ +/*************MES产品配置明细服务*****start***********//* - /*************MES产品配置明细服务*****start***********/ @GetMapping(value = "/mes-prod-cfg-detail/query") @ApiOperation(value = "按条件分页查询产品配置明细信息") @@ -3122,9 +3262,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES产品配置明细服务*****end***********/ + */ +/*************MES产品配置明细服务*****end***********//* + + + */ +/*************MES物料服务*****start***********//* - /*************MES物料服务*****start***********/ @GetMapping(value = "/mes-part/query") @ApiOperation(value = "按条件分页查询物料信息") @@ -3201,9 +3345,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES物料服务*****end***********/ + */ +/*************MES物料服务*****end***********//* + + + */ +/*************MES物料类型服务*****start***********//* - /*************MES物料类型服务*****start***********/ @GetMapping(value = "/mes-part-category/query") @ApiOperation(value = "按条件分页查询物料类型信息") @@ -3298,9 +3446,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES物料类型服务*****end***********/ + */ +/*************MES物料类型服务*****end***********//* + + + */ +/*************MES包装规格服务*****start***********//* - /*************MES包装规格服务*****start***********/ @GetMapping(value = "/mes-pack-spec/query") @ApiOperation(value = "按条件分页查询包装规格信息") @@ -3410,9 +3562,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES包装规格服务*****end***********/ + */ +/*************MES包装规格服务*****end***********//* + + + */ +/*************MES产品类型服务*****start***********//* - /*************MES产品类型服务*****start***********/ @GetMapping(value = "/mes-prod-category/query") @ApiOperation(value = "按条件分页查询产品类型信息") @@ -3508,9 +3664,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES产品类型服务*****end***********/ + */ +/*************MES产品类型服务*****end***********//* + + + */ +/*************MES关键件条码规则服务*****start***********//* - /*************MES关键件条码规则服务*****start***********/ @GetMapping(value = "/mes-kpsn-rule/query") @ApiOperation(value = "按条件分页查询关键件条码规则信息") @@ -3585,9 +3745,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES关键件条码规则服务*****end***********/ + */ +/*************MES关键件条码规则服务*****end***********//* + + + */ +/*************PLC设备信息配置服务*****start***********//* - /*************PLC设备信息配置服务*****start***********/ @GetMapping(value = "/plc-configure/query") @ApiOperation(value = "按条件分页查询PLC设备信息配置信息") @@ -3666,10 +3830,14 @@ public class BaseExtDataController extends MesBaseController { } } - /*************PLC设备信息配置服务*****end***********/ + */ +/*************PLC设备信息配置服务*****end***********//* - /*************MES ODS组件文件基础服务*****start***********/ + + */ +/*************MES ODS组件文件基础服务*****start***********//* + @GetMapping(value = "/mes-ods-file/query") @ApiOperation(value = "按条件分页查询MES ODS文件数据") @@ -3842,10 +4010,14 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES ODS组件文件基础服务*****end***********/ + */ +/*************MES ODS组件文件基础服务*****end***********//* + - /*************MES 事件基础服务*****start***********/ + */ +/*************MES 事件基础服务*****start***********//* + @GetMapping(value = "/mes-event/queryPager") @ApiOperation(value = "按条件分页查询MES Event数据") public ResultBean queryMesEventByPager(MesEvent mesEvent, Pager pager) { @@ -4010,10 +4182,14 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 事件基础服务*****end***********/ + */ +/*************MES 事件基础服务*****end***********//* + - /*************MES 事件与动作服务*****start***********/ + */ +/*************MES 事件与动作服务*****start***********//* + @GetMapping("/mes-event-action/query") @ApiOperation(value = "按条件分页查询MES Event Action数据") public ResultBean queryMesEventActionByPager(MesEventAction mesEventAction, Pager pager) { @@ -4066,10 +4242,14 @@ public class BaseExtDataController extends MesBaseController { return ImppExceptionBuilder.newInstance().buildExceptionResult(e); } } - /*************MES 事件与动作服务*****end***********/ + */ +/*************MES 事件与动作服务*****end***********//* + + + */ +/*************MES 动作基础服务*****start***********//* - /*************MES 动作基础服务*****start***********/ @GetMapping(value = "/mes-action/queryPager") @ApiOperation(value = "按条件分页查询MES Action") public ResultBean queryMesActionByPager(MesAction mesAction, Pager pager) { @@ -4213,10 +4393,14 @@ public class BaseExtDataController extends MesBaseController { return ImppExceptionBuilder.newInstance().buildExceptionResult(e); } } - /*************MES 动作基础服务*****end***********/ + */ +/*************MES 动作基础服务*****end***********//* + + + */ +/*************MES 函数基础服务*****start***********//* - /*************MES 函数基础服务*****start***********/ @GetMapping(value = "/mes-method/queryPager") @ApiOperation(value = "按条件分页查询MES method") public ResultBean queryMesMethodByPager(MesMethod mesMethod, Pager pager) { @@ -4356,10 +4540,14 @@ public class BaseExtDataController extends MesBaseController { return ImppExceptionBuilder.newInstance().buildExceptionResult(e); } } - /*************MES 函数基础服务*****end***********/ + */ +/*************MES 函数基础服务*****end***********//* - /*************MES 动作与方法服务*****start***********/ + + */ +/*************MES 动作与方法服务*****start***********//* + @GetMapping("/mes-action-method/query") @ApiOperation(value = "按条件分页查询MES Action Method数据") public ResultBean queryMesActionMethodByPager(MesActionMethod mesActionMethod, Pager pager) { @@ -4410,9 +4598,13 @@ public class BaseExtDataController extends MesBaseController { return ImppExceptionBuilder.newInstance().buildExceptionResult(e); } } - /*************MES 动作与方法服务*****end***********/ + */ +/*************MES 动作与方法服务*****end***********//* + + + */ +/*************MES 维修信息基础服务*****start***********//* - /*************MES 维修信息基础服务*****start***********/ @GetMapping(value = "/mes-repairs/query") @ApiOperation(value = "查询维修信息数据") public ResultBean queryMesRepairs() { @@ -4520,9 +4712,13 @@ public class BaseExtDataController extends MesBaseController { return ImppExceptionBuilder.newInstance().buildExceptionResult(e); } } - /*************MES 维修信息基础服务*****end***********/ + */ +/*************MES 维修信息基础服务*****end***********//* + + + */ +/*************MES 报废信息基础服务*****start***********//* - /*************MES 报废信息基础服务*****start***********/ @GetMapping(value = "/mes-scrap/query") @ApiOperation(value = "按条件分页查询报废信息数据") public ResultBean queryMesScrapByPager(MesScrap mesScrap, Pager pager) { @@ -4614,10 +4810,14 @@ public class BaseExtDataController extends MesBaseController { return ImppExceptionBuilder.newInstance().buildExceptionResult(e); } } - /*************MES 报废信息基础服务*****end***********/ + */ +/*************MES 报废信息基础服务*****end***********//* + + + */ +/*************MES 开线管控基础服务*****start***********//* - /*************MES 开线管控基础服务*****start***********/ @GetMapping(value = "/mes-wc-check/query") @ApiOperation(value = "按条件分页查询开线管控数据") public ResultBean queryMesWcCheckByPager(MesWcCheck mesWcCheck, Pager pager) { @@ -4729,10 +4929,14 @@ public class BaseExtDataController extends MesBaseController { return ImppExceptionBuilder.newInstance().buildExceptionResult(e); } } - /*************MES 开线管控基础服务*****end***********/ + */ +/*************MES 开线管控基础服务*****end***********//* + + + */ +/*************MES 枚举信息*****start***********//* - /*************MES 枚举信息*****start***********/ @GetMapping(value = "/enumlist") @ApiOperation(value = "获取MES系统所有枚举") public ResultBean enumlist(@RequestParam(name = "enumName", required = false) String enumName) { @@ -4796,9 +5000,13 @@ public class BaseExtDataController extends MesBaseController { return ImppExceptionBuilder.newInstance().buildExceptionResult(e); } } - /*************MES 枚举信息*****end***********/ + */ +/*************MES 枚举信息*****end***********//* + + + */ +/*************MES和PCN的国际化资源*****start***********//* - /*************MES和PCN的国际化资源*****start***********/ @GetMapping(value = "/getLocaleRes") @ApiOperation(value = "获取MES系统所有枚举") public BaseResultBean getLocaleRes(String softType) { @@ -4857,7 +5065,9 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES和PCN的国际化资源*****end***********/ + */ +/*************MES和PCN的国际化资源*****end***********//* + @GetMapping(value = "/ppt/drop-data") @@ -5096,12 +5306,14 @@ public class BaseExtDataController extends MesBaseController { } } - /** + */ +/** * 导入产品配方 * * @param file * @return - */ + *//* + public ResultBean importMesPartFormula(MultipartFile file) { try { ExcelTool excelTool = new ExcelTool(entityManager, redisRes).setThrowAllErrorMode(true); @@ -5150,7 +5362,9 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 散件产品组配置****start***********/ + */ +/*************MES 散件产品组配置****start***********//* + @GetMapping(value = "/mes-scatter-detail/query") @ApiOperation(value = "按条件分页查询MES散件产品组配置") @@ -5268,9 +5482,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 散件产品组配置****start***********/ + */ +/*************MES 散件产品组配置****start***********//* + + + */ +/*************MES 海纳川 基础数据-车型等级****start***********//* - /*************MES 海纳川 基础数据-车型等级****start***********/ @GetMapping(value = "/mes-model-grade/query") @ApiOperation(value = "按条件分页查询MES车型等级") public ResultBean queryMesModelGrade(MesModelGrade modelGrade, Pager pager) { @@ -5367,9 +5585,13 @@ public class BaseExtDataController extends MesBaseController { return ImppExceptionBuilder.newInstance().buildExceptionResult(e); } } - /*************MES 海纳川 基础数据-车型等级****end***********/ + */ +/*************MES 海纳川 基础数据-车型等级****end***********//* + + + */ +/*************MES 海纳川 基础数据-产品颜色****start***********//* - /*************MES 海纳川 基础数据-产品颜色****start***********/ @GetMapping(value = "/mes-part-color/query") @ApiOperation(value = "按条件分页查询MES产品颜色") public ResultBean queryMesPartColor(MesPartColor partColor, Pager pager) { @@ -5468,9 +5690,13 @@ public class BaseExtDataController extends MesBaseController { return ImppExceptionBuilder.newInstance().buildExceptionResult(e); } } - /*************MES 海纳川 基础数据-产品颜色****end***********/ + */ +/*************MES 海纳川 基础数据-产品颜色****end***********//* + + + */ +/*************MES 海纳川 基础数据-产品车型配置****start***********//* - /*************MES 海纳川 基础数据-产品车型配置****start***********/ @GetMapping(value = "/mes-prod-model-cfg/query") @ApiOperation(value = "按条件分页查询MES产品车型配置") public ResultBean queryMesProdModelCfg(MesProdModelCfg prodModelCfg, Pager pager) { @@ -5575,9 +5801,13 @@ public class BaseExtDataController extends MesBaseController { return ImppExceptionBuilder.newInstance().buildExceptionResult(e); } } - /*************MES 海纳川 基础数据-产品车型配置****end***********/ + */ +/*************MES 海纳川 基础数据-产品车型配置****end***********//* + + + */ +/*************MES 海纳川 基础数据-车型散件配置清单****start***********//* - /*************MES 海纳川 基础数据-车型散件配置清单****start***********/ @GetMapping(value = "/mes-scatter-part-cfg-bom/query") @ApiOperation(value = "按条件分页查询MES车型散件配置清单") public ResultBean queryMesScatterPartCfgBom(MesScatterPartCfgBom scatterPartCfgBom, Pager pager) { @@ -5682,9 +5912,13 @@ public class BaseExtDataController extends MesBaseController { return ImppExceptionBuilder.newInstance().buildExceptionResult(e); } } - /*************MES 海纳川 基础数据-车型散件配置清单****end***********/ + */ +/*************MES 海纳川 基础数据-车型散件配置清单****end***********//* + + + */ +/*************MES 海纳川 基础数据-散件零件生产配置****start***********//* - /*************MES 海纳川 基础数据-散件零件生产配置****start***********/ @GetMapping(value = "/mes-scatter-part-prod-cfg/query") @ApiOperation(value = "按条件分页查询MES散件零件生产配置") public ResultBean queryMesScatterPartProdCfg(MesScatterPartProdCfg scatterPartProdCfg, Pager pager) { @@ -5781,9 +6015,13 @@ public class BaseExtDataController extends MesBaseController { return ImppExceptionBuilder.newInstance().buildExceptionResult(e); } } - /*************MES 海纳川 基础数据-散件零件生产配置****end***********/ + */ +/*************MES 海纳川 基础数据-散件零件生产配置****end***********//* + + + */ +/*************MES 海纳川 基础数据-盲检记录****start***********//* - /*************MES 海纳川 基础数据-盲检记录****start***********/ @GetMapping(value = "/mes-blind-history/find") @ApiOperation(value = "按条件查询MES盲检记录") public ResultBean findMesBlindHistory(MesBlindHistory mesBlindHistory, Pager pager) { @@ -5797,9 +6035,13 @@ public class BaseExtDataController extends MesBaseController { return ImppExceptionBuilder.newInstance().buildExceptionResult(e); } } - /*************MES 海纳川 基础数据-盲检记录****end***********/ + */ +/*************MES 海纳川 基础数据-盲检记录****end***********//* + + + */ +/*************MES 海纳川 基础数据-盲检规则****start***********//* - /*************MES 海纳川 基础数据-盲检规则****start***********/ @PostMapping(value = "/mes-blind-rule/insert") @ApiOperation(value = "新增盲检规则信息") @@ -5920,12 +6162,14 @@ public class BaseExtDataController extends MesBaseController { } } - /** + */ +/** * 导入盲检规则 * * @param file * @return - */ + *//* + public ResultBean importMesBlindRule(MultipartFile file) { try { ExcelTool excelTool = new ExcelTool(entityManager, redisRes).setThrowAllErrorMode(true); @@ -5974,9 +6218,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 海纳川 基础数据-盲检规则****end***********/ + */ +/*************MES 海纳川 基础数据-盲检规则****end***********//* + + + */ +/*************MES 海纳川 基础数据-盲检问题设置****start***********//* - /*************MES 海纳川 基础数据-盲检问题设置****start***********/ @PostMapping(value = "/mes-blind-topic-setting/insert") @ApiOperation(value = "新增盲检问题设置信息") @@ -6083,9 +6331,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 海纳川 基础数据-盲检问题设置****end***********/ + */ +/*************MES 海纳川 基础数据-盲检问题设置****end***********//* + + + */ +/*************MES 北京麦格纳 基础数据-散件BOM****start***********//* - /*************MES 北京麦格纳 基础数据-散件BOM****start***********/ @GetMapping(value = "/mes-scatter-bom-cfg/query") @ApiOperation(value = "按条件分页查询MES散件BOM") @@ -6177,9 +6429,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 北京麦格纳 基础数据-散件BOM****end***********/ + */ +/*************MES 北京麦格纳 基础数据-散件BOM****end***********//* + + + */ +/*************MES 北京麦格纳 基础数据-物料项目关系****start***********//* - /*************MES 北京麦格纳 基础数据-物料项目关系****start***********/ @GetMapping(value = "/mes-part-prod-cfg-type/query") @ApiOperation(value = "按条件分页查询MES物料项目关系") @@ -6257,9 +6513,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 北京麦格纳 基础数据-物料项目关系****end***********/ + */ +/*************MES 北京麦格纳 基础数据-物料项目关系****end***********//* + + + */ +/*************MES 北京麦格纳 基础数据-工位缺陷****start***********//* - /*************MES 北京麦格纳 基础数据-工位缺陷****start***********/ @GetMapping(value = "/mes-work-cell-defect/query") @ApiOperation(value = "按条件分页查询MES工位缺陷") @@ -6328,9 +6588,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 北京麦格纳 基础数据-工位缺陷****end***********/ + */ +/*************MES 北京麦格纳 基础数据-工位缺陷****end***********//* + + + */ +/*************MES 北京麦格纳 基础数据-编码规则映射****start***********//* - /*************MES 北京麦格纳 基础数据-编码规则映射****start***********/ @GetMapping(value = "/mes-en-code-rule/query") @ApiOperation(value = "按条件分页查询MES编码规则映射") @@ -6410,7 +6674,9 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 北京麦格纳 基础数据-编码规则映射****end***********/ + */ +/*************MES 北京麦格纳 基础数据-编码规则映射****end***********//* + @GetMapping(value = "/spc-key-data/query") @@ -6481,7 +6747,9 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 天津 基础数据-库位信息****start***********/ + */ +/*************MES 天津 基础数据-库位信息****start***********//* + @PostMapping(value = "/mes-location/insert") @ApiOperation(value = "新增库位信息") @@ -6577,9 +6845,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 海纳川 基础数据-库位信息****end***********/ + */ +/*************MES 海纳川 基础数据-库位信息****end***********//* + + + */ +/*************MES 中航 基础数据-替代料****start***********//* - /*************MES 中航 基础数据-替代料****start***********/ @PostMapping(value = "/mes-sub-part/insert") @ApiOperation(value = "新增替代料信息") @@ -6764,11 +7036,13 @@ public class BaseExtDataController extends MesBaseController { } } - /** + */ +/** * 登陆后再次调用,传参同步userLoginSid和cookie * * @return - */ + *//* + @GetMapping(value = "/core/personnel/query-ref-department") @ApiOperation(value = "获取帐号信息", notes = "获取 Core 的帐号信息") public BaseResultBean findCoreSysUser(UserDetailModel model) { @@ -6790,7 +7064,9 @@ public class BaseExtDataController extends MesBaseController { return personnelCloud.queryRefDepartment(model); } - /*************MES 卡斯马 基础数据-物料上炉模式****start***********/ + */ +/*************MES 卡斯马 基础数据-物料上炉模式****start***********//* + @PostMapping(value = "/mes-part-furnace/insert") @ApiOperation(value = "添加MES_物料上炉模式") public ResultBean insertPartFurnace(@RequestParam("file") MultipartFile file, MesPartFurnace partFurnace) { @@ -6909,9 +7185,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 卡斯马 基础数据-物料上炉模式位置****end***********/ + */ +/*************MES 卡斯马 基础数据-物料上炉模式位置****end***********//* + + + */ +/*************MES 卡斯马 基础数据-客户条码规则****start***********//* - /*************MES 卡斯马 基础数据-客户条码规则****start***********/ @GetMapping(value = "/mes-query-customer") @ApiOperation(value = "查询MES_客户") @@ -7031,9 +7311,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 卡斯马 基础数据-客户条码规则****end***********/ + */ +/*************MES 卡斯马 基础数据-客户条码规则****end***********//* + + + */ +/*************MES 卡斯马 基础数据-产品料架容量配置****start***********//* - /*************MES 卡斯马 基础数据-产品料架容量配置****start***********/ @GetMapping(value = "/mes-query-container-type") @ApiOperation(value = "查询MES_容器类型代码") @@ -7149,9 +7433,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 卡斯马 基础数据-产品容器容量配置****end***********/ + */ +/*************MES 卡斯马 基础数据-产品容器容量配置****end***********//* + + + */ +/*************MES 泰国 基础数据-电检打印数据****start***********//* - /*************MES 泰国 基础数据-电检打印数据****start***********/ @GetMapping(value = "/mes-electrotesting-print-data/enum-print") @ApiOperation(value = "获取MES_电检打印数据打印状态枚举") public ResultBean getPrintStatusEnumPrint() { @@ -7260,9 +7548,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 泰国 基础数据-电检打印数据****end***********/ + */ +/*************MES 泰国 基础数据-电检打印数据****end***********//* + + + */ +/*************MES 基础数据-枚举****start***********//* - /*************MES 基础数据-枚举****start***********/ @PostMapping(value = "/mes-enum/insert") @ApiOperation(value = "添加MES_枚举信息") public ResultBean insertMesEnum(MesEnum mesEnum) { @@ -7363,9 +7655,13 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 基础数据-枚举****end***********/ + */ +/*************MES 基础数据-枚举****end***********//* + + + */ +/*************MES 基础数据-产品类型图片****start***********//* - /*************MES 基础数据-产品类型图片****start***********/ @PostMapping(value = "/produce-ctgy-picture/insert") @ApiOperation(value = "添加MES_产品类型图片") @@ -7507,7 +7803,9 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 基础数据-产品类型图片****end***********/ + */ +/*************MES 基础数据-产品类型图片****end***********//* + @PostMapping(value = "/mes-part-car-model/insert") @ApiOperation(value = "添加MES_车型零件关系信息") @@ -7648,7 +7946,9 @@ public class BaseExtDataController extends MesBaseController { } - /*************MES节假日****start***********/ + */ +/*************MES节假日****start***********//* + @GetMapping(value = "/holiday-vacation/query") @ApiOperation(value = "按条件分页查询MES节假日数据") @@ -7740,7 +8040,9 @@ public class BaseExtDataController extends MesBaseController { } } - /*************MES 节假日****start***********/ + */ +/*************MES 节假日****start***********//* + @PostMapping(value = "/mes-db-data-check/insert") @ApiOperation(value = "添加MES_DB数据检查配置信息") @@ -8066,3 +8368,4 @@ public class BaseExtDataController extends MesBaseController { } } +*/ diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/controller/base/BaseMesController.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/controller/base/BaseMesController.java index 8382c41..dd342b6 100644 --- a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/controller/base/BaseMesController.java +++ b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/controller/base/BaseMesController.java @@ -203,8 +203,8 @@ public abstract class BaseMesController extends BaseControll try { validateInsert(bean); //新增初始化 - bean.setOrganizeCode(AuthUtilExt.getOrganizeCode()); - ConvertBean.serviceModelInitialize(bean, AuthUtil.getSessionUser().getUserName()); + bean.setOrganizeCode("1154"); + ConvertBean.serviceModelInitialize(bean, "12331"); T t = (T) getBaseService().insert(bean); afterInsert(t); return ResultBean.success("操作成功") diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/controller/base/ExtProdOrgController.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/controller/base/ExtProdOrgController.java index 84e732f..8b1398c 100644 --- a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/controller/base/ExtProdOrgController.java +++ b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/controller/base/ExtProdOrgController.java @@ -2,9 +2,10 @@ package cn.estsh.i3plus.ext.mes.apiservice.controller.base; import cn.estsh.i3plus.ext.mes.api.base.IMesWorkCellService; import cn.estsh.i3plus.ext.mes.api.base.IMesWorkCenterService; +import cn.estsh.i3plus.ext.mes.api.busi.IEquipmentExtService; import cn.estsh.i3plus.ext.mes.pojo.constant.MesCommonConstant; import cn.estsh.i3plus.mes.api.iservice.base.IProdOrgService; -import cn.estsh.i3plus.mes.api.iservice.busi.IEquipmentService; +import cn.estsh.i3plus.mes.api.iservice.base.IEquipmentService; import cn.estsh.i3plus.mes.apiservice.util.MesCommConstWords; import cn.estsh.i3plus.platform.common.convert.ConvertBean; import cn.estsh.i3plus.platform.common.exception.ImppExceptionEnum; @@ -54,7 +55,7 @@ public class ExtProdOrgController extends MesBaseController { private IProdOrgService prodOrgService; @Autowired - private IEquipmentService mesEquipmentService; + private IEquipmentExtService mesEquipmentService; @Autowired private IMesWorkCenterService mesWorkCenterService; diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/controller/base/MesAssemblyPartNosortCfgController.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/controller/base/MesAssemblyPartNosortCfgController.java new file mode 100644 index 0000000..c49bc6a --- /dev/null +++ b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/controller/base/MesAssemblyPartNosortCfgController.java @@ -0,0 +1,17 @@ +package cn.estsh.i3plus.ext.mes.apiservice.controller.base; + +import cn.estsh.i3plus.ext.mes.pojo.constant.MesCommonConstant; +import cn.estsh.i3plus.pojo.mes.bean.MesAssemblyPartNosortCfg; +import cn.estsh.i3plus.pojo.mes.bean.MesProdRuleNosortCfg; +import io.swagger.annotations.Api; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 非排序产品加工规则配置 + */ +@Api("非排序装配件维护表") +@RestController +@RequestMapping(MesCommonConstant.MES_YANFEN + "/mesAssemblyPartNosortCfg") +public class MesAssemblyPartNosortCfgController extends BaseMesController{ +} diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/controller/base/MesPartSapController.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/controller/base/MesPartSapController.java new file mode 100644 index 0000000..cd95616 --- /dev/null +++ b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/controller/base/MesPartSapController.java @@ -0,0 +1,17 @@ +package cn.estsh.i3plus.ext.mes.apiservice.controller.base; + +import cn.estsh.i3plus.ext.mes.pojo.constant.MesCommonConstant; +import cn.estsh.i3plus.pojo.mes.bean.MesPart; +import cn.estsh.i3plus.pojo.mes.bean.MesPartSap; +import io.swagger.annotations.Api; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 零件管理 + */ +@Api("物料信息SAP") +@RestController +@RequestMapping(MesCommonConstant.MES_YANFEN + "/mesPartSap") +public class MesPartSapController extends BaseMesController{ +} diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/controller/base/MesProdRuleNosortCfgController.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/controller/base/MesProdRuleNosortCfgController.java new file mode 100644 index 0000000..0364793 --- /dev/null +++ b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/controller/base/MesProdRuleNosortCfgController.java @@ -0,0 +1,17 @@ +package cn.estsh.i3plus.ext.mes.apiservice.controller.base; + +import cn.estsh.i3plus.ext.mes.pojo.constant.MesCommonConstant; +import cn.estsh.i3plus.pojo.mes.bean.MesProdRuleNosortCfg; +import cn.estsh.i3plus.pojo.mes.bean.MesTimeEfficientCfg; +import io.swagger.annotations.Api; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 非排序产品加工规则配置 + */ +@Api("非排序产品加工规则配置") +@RestController +@RequestMapping(MesCommonConstant.MES_YANFEN + "/mesProdRuleNosortCfg") +public class MesProdRuleNosortCfgController extends BaseMesController{ +} diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/controller/base/MesProdRuleSortCfgController.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/controller/base/MesProdRuleSortCfgController.java new file mode 100644 index 0000000..0419b15 --- /dev/null +++ b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/controller/base/MesProdRuleSortCfgController.java @@ -0,0 +1,17 @@ +package cn.estsh.i3plus.ext.mes.apiservice.controller.base; + +import cn.estsh.i3plus.ext.mes.pojo.constant.MesCommonConstant; +import cn.estsh.i3plus.pojo.mes.bean.MesProdRuleSortCfg; +import cn.estsh.i3plus.pojo.mes.bean.MesTimeEfficientCfg; +import io.swagger.annotations.Api; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 排序产品加工规则配置 + */ +@Api("排序产品加工规则配置") +@RestController +@RequestMapping(MesCommonConstant.MES_YANFEN + "/mesProdRuleSortCfg") +public class MesProdRuleSortCfgController extends BaseMesController{ +} diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/controller/base/MesTimeEfficientCfgController.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/controller/base/MesTimeEfficientCfgController.java new file mode 100644 index 0000000..2471b03 --- /dev/null +++ b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/controller/base/MesTimeEfficientCfgController.java @@ -0,0 +1,17 @@ +package cn.estsh.i3plus.ext.mes.apiservice.controller.base; + +import cn.estsh.i3plus.ext.mes.pojo.constant.MesCommonConstant; +import cn.estsh.i3plus.pojo.mes.bean.MesPart; +import cn.estsh.i3plus.pojo.mes.bean.MesTimeEfficientCfg; +import io.swagger.annotations.Api; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 时效性维护 + */ +@Api("时效性维护") +@RestController +@RequestMapping(MesCommonConstant.MES_YANFEN + "/mesTimeEfficientCfg") +public class MesTimeEfficientCfgController extends BaseMesController{ +} diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/base/EquipmentExtService.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/base/EquipmentExtService.java new file mode 100644 index 0000000..582580b --- /dev/null +++ b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/base/EquipmentExtService.java @@ -0,0 +1,72 @@ +package cn.estsh.i3plus.ext.mes.apiservice.serviceimpl.base; + +import cn.estsh.i3plus.ext.mes.api.busi.IEquipmentExtService; +import cn.estsh.i3plus.mes.api.iservice.base.IEnumService; +import cn.estsh.i3plus.mes.apiservice.dao.IEquipmentDao; +import cn.estsh.i3plus.mes.apiservice.serviceimpl.busi.CommonService; +import cn.estsh.i3plus.mes.apiservice.serviceimpl.busi.EquipmentService; +import cn.estsh.i3plus.platform.common.convert.ConvertBean; +import cn.estsh.i3plus.platform.common.exception.ImppExceptionEnum; +import cn.estsh.i3plus.platform.common.tool.TimeTool; +import cn.estsh.i3plus.platform.common.util.MesConstWords; +import cn.estsh.i3plus.pojo.base.bean.ListPager; +import cn.estsh.i3plus.pojo.base.common.Pager; +import cn.estsh.i3plus.pojo.base.common.PagerHelper; +import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil; +import cn.estsh.i3plus.pojo.base.enumutil.MesEnumUtil; +import cn.estsh.i3plus.pojo.mes.bean.MesEquipment; +import cn.estsh.i3plus.pojo.mes.bean.MesWcEquipment; +import cn.estsh.i3plus.pojo.mes.model.MesEquipmentModel; +import cn.estsh.i3plus.pojo.mes.repository.MesEquipmentRepository; +import cn.estsh.i3plus.pojo.mes.repository.MesWcEquipmentRepository; +import cn.estsh.impp.framework.boot.auth.AuthUtil; +import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder; +import cn.estsh.impp.framework.boot.util.LocaleUtils; +import lombok.extern.slf4j.Slf4j; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; + +import java.util.*; +import java.util.stream.Collectors; + +/** + * @Description : mes设备管理方法调度类 + * @Reference : + * @Author : wangjie + * @CreateDate : 2019-08-26 + * @Modify: + **/ +@Slf4j +@Service +public class EquipmentExtService implements IEquipmentExtService { + public static final Logger LOGGER = LoggerFactory.getLogger(EquipmentService.class); + + @Autowired + private IEquipmentDao equipmentDao; + + @Autowired + private IEnumService enumService; + /** + * 按条件分页查询mes设备台账-组织模型 + * + * @param mesEquipment + * @param pager + */ + @Override + public ListPager queryMesEquipmentByPagerOrg(MesEquipment mesEquipment, Pager pager) { + Map equStatusEnumMap = enumService.getEnumLangeuageKeyByClazzEnum(MesEnumUtil.MES_EQUIPMENT_STATUS.class); + pager = PagerHelper.getPager(pager, equipmentDao.queryMesEquipmentByPagerOrgCount(mesEquipment)); + List equipmentModels = equipmentDao.queryMesEquipmentByPagerOrg(mesEquipment, pager); + for (MesEquipmentModel equipmentModel : equipmentModels) { + if(equipmentModel.getStatus() != null){ + equipmentModel.setStatusName(LocaleUtils.getLocaleRes(equStatusEnumMap.get(equipmentModel.getStatus().toString()))); + } + } + return new ListPager(equipmentModels, pager); + } + +} diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/base/MesAssemblyPartNosortCfgService.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/base/MesAssemblyPartNosortCfgService.java new file mode 100644 index 0000000..95b04ac --- /dev/null +++ b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/base/MesAssemblyPartNosortCfgService.java @@ -0,0 +1,14 @@ +package cn.estsh.i3plus.ext.mes.apiservice.serviceimpl.base; + +import cn.estsh.i3plus.ext.mes.api.base.IMesAssemblyPartNosortCfgService; +import cn.estsh.i3plus.ext.mes.api.base.IMesTimeEfficientCfgService; +import cn.estsh.i3plus.pojo.mes.bean.MesAssemblyPartNosortCfg; +import cn.estsh.i3plus.pojo.mes.bean.MesTimeEfficientCfg; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +@Service +@Slf4j +public class MesAssemblyPartNosortCfgService extends BaseMesService implements IMesAssemblyPartNosortCfgService { + +} diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/base/MesPartSapService.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/base/MesPartSapService.java new file mode 100644 index 0000000..6734719 --- /dev/null +++ b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/base/MesPartSapService.java @@ -0,0 +1,21 @@ +package cn.estsh.i3plus.ext.mes.apiservice.serviceimpl.base; + +import cn.estsh.i3plus.ext.mes.api.base.IMesPartSapService; +import cn.estsh.i3plus.ext.mes.api.base.IMesPartService; +import cn.estsh.i3plus.ext.mes.apiservice.unit.exception.MesException; +import cn.estsh.i3plus.pojo.base.bean.DdlPackBean; +import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack; +import cn.estsh.i3plus.pojo.mes.bean.MesPart; +import cn.estsh.i3plus.pojo.mes.bean.MesPartSap; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +@Service +@Slf4j +public class MesPartSapService extends BaseMesService implements IMesPartSapService { + + protected void setPackQueryBean(MesPartSap bean, DdlPackBean packBean) { + DdlPreparedPack.getStringEqualPack(bean.getPartNo(), "partNo", packBean); + DdlPreparedPack.getStringLikeEqualPack(bean.getPartName(), "partName", packBean); + } +} diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/base/MesProdRuleNosortCfgService.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/base/MesProdRuleNosortCfgService.java new file mode 100644 index 0000000..aaefa60 --- /dev/null +++ b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/base/MesProdRuleNosortCfgService.java @@ -0,0 +1,86 @@ +package cn.estsh.i3plus.ext.mes.apiservice.serviceimpl.base; + +import cn.estsh.i3plus.ext.mes.api.base.IMesProdRuleNosortCfgService; +import cn.estsh.i3plus.ext.mes.api.base.IMesTimeEfficientCfgService; +import cn.estsh.i3plus.platform.common.exception.ImppExceptionEnum; +import cn.estsh.i3plus.pojo.base.bean.DdlPackBean; +import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil; +import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack; +import cn.estsh.i3plus.pojo.mes.bean.MesPartShippingGroup; +import cn.estsh.i3plus.pojo.mes.bean.MesProdRuleNosortCfg; +import cn.estsh.i3plus.pojo.mes.bean.MesTimeEfficientCfg; +import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder; +import cn.estsh.impp.framework.boot.util.ValidatorBean; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import org.springframework.util.StringUtils; + +@Service +@Slf4j +public class MesProdRuleNosortCfgService extends BaseMesService implements IMesProdRuleNosortCfgService { + + + protected void setPackQueryBean(MesProdRuleNosortCfg bean, DdlPackBean packBean) { + DdlPreparedPack.getStringEqualPack(bean.getInPartNo(), "inPartNo", packBean); + DdlPreparedPack.getStringEqualPack(bean.getOutPartNo(), "outPartNo", packBean); + DdlPreparedPack.getStringEqualPack(bean.getEquipmentCode(), "equipmentCode", packBean); + + } + + @Override + public MesProdRuleNosortCfg insert(MesProdRuleNosortCfg bean) { + //插入前构造并校验数据 + onInsertBean(bean); + + bean = baseRDao.insert(bean); + return bean; + } + + protected void onInsertBean(MesProdRuleNosortCfg item) { + // 数据校验 + //ValidatorBean.checkNotNull(item.getInPartNo(), "进件零件号不能为空"); + ValidatorBean.checkNotNull(item.getOutPartNo(), "产成零件号不能为空"); + ValidatorBean.checkNotNull(item.getOutPartNo(), "设备不能为空"); + + DdlPackBean seriesPackBean = DdlPackBean.getDdlPackBean(item.getOrganizeCode()); + if (StringUtils.isEmpty(item.getInPartNo())) { + DdlPreparedPack.getStringEqualPack(item.getInPartNo(), "inPartNo", seriesPackBean); + } + DdlPreparedPack.getStringEqualPack(item.getOutPartNo(), "outPartNo", seriesPackBean); + DdlPreparedPack.getStringEqualPack(item.getEquipmentCode(), "equipmentCode", seriesPackBean); + + + boolean flg = baseRDao.isExitByHql(seriesPackBean); + if (flg) { + throw ImppExceptionBuilder.newInstance() + .setSystemID(CommonEnumUtil.SOFT_TYPE.MES.getCode()) + .setErrorCode(ImppExceptionEnum.VARIFY_EXCEPTION.getCode()) + .setErrorDetail("该非排序加工规则已存在,请检查数据") + .build(); + } + + } + + protected void onUpdateBean(MesProdRuleNosortCfg item) { + // 数据校验 + ValidatorBean.checkNotNull(item.getOutPartNo(), "产成零件号不能为空"); + ValidatorBean.checkNotNull(item.getOutPartNo(), "设备不能为空"); + + DdlPackBean seriesPackBean = DdlPackBean.getDdlPackBean(item.getOrganizeCode()); + if (StringUtils.isEmpty(item.getInPartNo())) { + DdlPreparedPack.getStringEqualPack(item.getInPartNo(), "inPartNo", seriesPackBean); + } + DdlPreparedPack.getStringEqualPack(item.getOutPartNo(), "outPartNo", seriesPackBean); + DdlPreparedPack.getStringEqualPack(item.getEquipmentCode(), "equipmentCode", seriesPackBean); + + + boolean flg = baseRDao.isExitByHql(seriesPackBean); + if (flg) { + throw ImppExceptionBuilder.newInstance() + .setSystemID(CommonEnumUtil.SOFT_TYPE.MES.getCode()) + .setErrorCode(ImppExceptionEnum.VARIFY_EXCEPTION.getCode()) + .setErrorDetail("该非排序加工规则已存在,请检查数据") + .build(); + } + } +} diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/base/MesProdRuleSortCfgService.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/base/MesProdRuleSortCfgService.java new file mode 100644 index 0000000..edd1e8e --- /dev/null +++ b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/base/MesProdRuleSortCfgService.java @@ -0,0 +1,84 @@ +package cn.estsh.i3plus.ext.mes.apiservice.serviceimpl.base; + +import cn.estsh.i3plus.ext.mes.api.base.IMesProdRuleSortCfgService; +import cn.estsh.i3plus.ext.mes.api.base.IMesTimeEfficientCfgService; +import cn.estsh.i3plus.platform.common.exception.ImppExceptionEnum; +import cn.estsh.i3plus.pojo.base.bean.DdlPackBean; +import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil; +import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack; +import cn.estsh.i3plus.pojo.mes.bean.MesProdRuleSortCfg; +import cn.estsh.i3plus.pojo.mes.bean.MesProdRuleSortCfg; +import cn.estsh.i3plus.pojo.mes.bean.MesTimeEfficientCfg; +import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder; +import cn.estsh.impp.framework.boot.util.ValidatorBean; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import org.springframework.util.StringUtils; + +@Service +@Slf4j +public class MesProdRuleSortCfgService extends BaseMesService implements IMesProdRuleSortCfgService { + + protected void setPackQueryBean(MesProdRuleSortCfg bean, DdlPackBean packBean) { + DdlPreparedPack.getStringEqualPack(bean.getWorkCenterCode(), "workCenterCode", packBean); + DdlPreparedPack.getStringEqualPack(bean.getPartNo(), "partNo", packBean); + DdlPreparedPack.getStringLikerPack(bean.getPartName(), "partName", packBean); + + } + + @Override + public MesProdRuleSortCfg insert(MesProdRuleSortCfg bean) { + //插入前构造并校验数据 + onInsertBean(bean); + + bean = baseRDao.insert(bean); + return bean; + } + + protected void onInsertBean(MesProdRuleSortCfg item) { + // 数据校验 + //ValidatorBean.checkNotNull(item.getInPartNo(), "进件零件号不能为空"); + ValidatorBean.checkNotNull(item.getWorkCenterCode(), "产线不能为空"); + ValidatorBean.checkNotNull(item.getWorkCellCode(), "工位不能为空"); + ValidatorBean.checkNotNull(item.getPartNo(), "零件号不能为空"); + + DdlPackBean seriesPackBean = DdlPackBean.getDdlPackBean(item.getOrganizeCode()); + DdlPreparedPack.getStringEqualPack(item.getWorkCellCode(), "workCellCode", seriesPackBean); + DdlPreparedPack.getStringEqualPack(item.getWorkCenterCode(), "workCenterCode", seriesPackBean); + DdlPreparedPack.getStringEqualPack(item.getPartNo(), "partNo", seriesPackBean); + + + boolean flg = baseRDao.isExitByHql(seriesPackBean); + if (flg) { + throw ImppExceptionBuilder.newInstance() + .setSystemID(CommonEnumUtil.SOFT_TYPE.MES.getCode()) + .setErrorCode(ImppExceptionEnum.VARIFY_EXCEPTION.getCode()) + .setErrorDetail("该排序加工规则已存在,请检查数据") + .build(); + } + + } + + protected void onUpdateBean(MesProdRuleSortCfg item) { + // 数据校验 + //ValidatorBean.checkNotNull(item.getInPartNo(), "进件零件号不能为空"); + ValidatorBean.checkNotNull(item.getWorkCenterCode(), "产线不能为空"); + ValidatorBean.checkNotNull(item.getWorkCellCode(), "工位不能为空"); + ValidatorBean.checkNotNull(item.getPartNo(), "零件号不能为空"); + + DdlPackBean seriesPackBean = DdlPackBean.getDdlPackBean(item.getOrganizeCode()); + DdlPreparedPack.getStringEqualPack(item.getWorkCellCode(), "workCellCode", seriesPackBean); + DdlPreparedPack.getStringEqualPack(item.getWorkCenterCode(), "workCenterCode", seriesPackBean); + DdlPreparedPack.getStringEqualPack(item.getPartNo(), "partNo", seriesPackBean); + + + boolean flg = baseRDao.isExitByHql(seriesPackBean); + if (flg) { + throw ImppExceptionBuilder.newInstance() + .setSystemID(CommonEnumUtil.SOFT_TYPE.MES.getCode()) + .setErrorCode(ImppExceptionEnum.VARIFY_EXCEPTION.getCode()) + .setErrorDetail("该排序加工规则已存在,请检查数据") + .build(); + } + } +} diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/base/MesTimeEfficientCfgService.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/base/MesTimeEfficientCfgService.java new file mode 100644 index 0000000..c6bf6c1 --- /dev/null +++ b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/serviceimpl/base/MesTimeEfficientCfgService.java @@ -0,0 +1,16 @@ +package cn.estsh.i3plus.ext.mes.apiservice.serviceimpl.base; + +import cn.estsh.i3plus.ext.mes.api.base.IMesPartTypeService; +import cn.estsh.i3plus.ext.mes.api.base.IMesTimeEfficientCfgService; +import cn.estsh.i3plus.pojo.base.bean.DdlPackBean; +import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack; +import cn.estsh.i3plus.pojo.mes.bean.MesPartType; +import cn.estsh.i3plus.pojo.mes.bean.MesTimeEfficientCfg; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +@Service +@Slf4j +public class MesTimeEfficientCfgService extends BaseMesService implements IMesTimeEfficientCfgService { + +}