From db924c2dfacc134c535daed6fc9321a85b0d0c92 Mon Sep 17 00:00:00 2001 From: "xiangwei.zhang" <752558143@qq.com> Date: Thu, 16 Jan 2025 17:16:08 +0800 Subject: [PATCH] =?UTF-8?q?44858=20PCN:=E8=AE=BE=E5=A4=87=E6=8A=A5?= =?UTF-8?q?=E5=BA=9F=E7=9A=84=E6=95=B0=E6=8D=AE=E5=9C=A8mes=5Fpart=5Finspe?= =?UTF-8?q?ction=E4=BF=AE=E6=94=B9=E4=BA=BA=E4=B8=BA=E7=A9=BA=EF=BC=8C?= =?UTF-8?q?=E5=B9=B6=E4=B8=94=E6=95=B0=E6=8D=AE=E8=87=AA=E5=8A=A8=E7=94=B1?= =?UTF-8?q?=E5=8F=AF=E7=96=91=E8=BD=AC=E6=AD=A3=E5=B8=B8=EF=BC=8C=E5=90=8C?= =?UTF-8?q?=E6=97=B6=E6=B2=A1=E6=9C=89=E4=BA=A7=E7=94=9F=E5=88=9D=E5=88=A4?= =?UTF-8?q?=E7=9A=84=E7=A7=BB=E5=BA=93=2044805=20PCN=EF=BC=9A=E7=94=B5?= =?UTF-8?q?=E5=AD=90=E5=8C=96=E6=A3=80=E9=AA=8C=E9=80=89=E9=9B=B6=E4=BB=B6?= =?UTF-8?q?=E7=9A=84=E9=A1=B5=E9=9D=A2=E5=A2=9E=E5=8A=A0=E5=8D=95=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apiservice/controller/busi/MesPartController.java | 17 ++++++++++++++++- .../step/MesProductResultErrorHandleStepService.java | 5 +++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/MesPartController.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/MesPartController.java index 7b08899..6ca491d 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/MesPartController.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/controller/busi/MesPartController.java @@ -2,8 +2,11 @@ package cn.estsh.i3plus.ext.mes.pcn.apiservice.controller.busi; import cn.estsh.i3plus.ext.mes.pcn.api.base.IMesPartService; import cn.estsh.i3plus.ext.mes.pcn.pojo.constant.MesCommonConstant; +import cn.estsh.i3plus.pojo.base.bean.ListPager; import cn.estsh.i3plus.pojo.base.common.Pager; import cn.estsh.i3plus.pojo.mes.bean.MesPart; +import cn.estsh.i3plus.pojo.mes.bean.MesPartSap; +import cn.estsh.i3plus.pojo.mes.bean.MesPartType; import cn.estsh.impp.framework.boot.exception.ImppBusiException; import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder; import cn.estsh.impp.framework.boot.util.ResultBean; @@ -14,6 +17,8 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.List; + /** * @Description : 物料信息主数据 * @Reference : @@ -33,7 +38,17 @@ public class MesPartController { @ApiOperation(value = "查询信息") public ResultBean queryMesPart(MesPart mesPart, Pager pager) { try { - return ResultBean.success("查询成功").setListPager(mesPartService.queryMesPart(mesPart, pager)); + + ListPager mesPartListPager = mesPartService.queryMesPart(mesPart, pager); + List partList = mesPartListPager.getObjectList(); + for (MesPart part : partList) { + MesPartSap partSap = mesPartService.getMesPartSapByPartNo(part.getPartNo(), part.getOrganizeCode()); + if (partSap != null) { + part.setUnit(partSap.getUnit()); + } + } + mesPartListPager.setObjectList(partList); + return ResultBean.success("查询成功").setListPager(mesPartListPager); } catch (ImppBusiException imppException) { return ResultBean.fail(imppException); } catch (Exception e) { diff --git a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductResultErrorHandleStepService.java b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductResultErrorHandleStepService.java index 230acbb..d80deeb 100644 --- a/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductResultErrorHandleStepService.java +++ b/modules/i3plus-ext-mes-pcn-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/pcn/apiservice/serviceimpl/step/MesProductResultErrorHandleStepService.java @@ -127,6 +127,7 @@ public class MesProductResultErrorHandleStepService extends BaseStepService { //mesDefectType.setDefectType(MesExtEnumUtil.MES_DEFECT_TYPE); model.setSn(mesProduceSn.getProductSn()); model.setPerson(mesDefectType); + model.setUserName(reqBean.getUserInfo()); MesPartInspection partInspection = new MesPartInspection(); @@ -160,10 +161,10 @@ public class MesProductResultErrorHandleStepService extends BaseStepService { mesPartInspectionDetail.setDefectTypeCode(mesDefectType.getDefectTypeCode()); mesPartInspectionDetail.setDefectTypeName(mesDefectType.getDefectTypeName()); model.setPartInspection(partInspection); - model.setType(partInspection.getSourceType()); + model.setType(MesExtEnumUtil.EQUIP_VARIABLE_CFG_CATEGORY.PRODUCT_SUSPICIOUS.getCode()); model.setProductVersion(productVersion); - if (Objects.equal(MesExtEnumUtil.EQUIP_VARIABLE_CFG_CATEGORY.PRODUCT_SCRAP.getValue(), productResult)) { + if (Objects.equal(MesExtEnumUtil.EQUIP_VARIABLE_CFG_CATEGORY.PRODUCT_SCRAP.getCode(), productResult)) { model.setType(MesExtEnumUtil.NC_TYPE.SCRAP.getValue()); } MesPartSap mesPartSap = new MesPartSap();