From 56363c66c2d6d021b63080a9f847b899f93aa8fc Mon Sep 17 00:00:00 2001 From: yangwl <1726150332@qq.com> Date: Mon, 27 Jun 2022 10:18:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=94=E4=BF=AE=E5=B7=A5=E8=89=BA=E5=86=85?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/AbnormalPlanController.java | 10 +- .../mesnac/anomaly/dto/AbnormalPlanDto.java | 10 + .../mesnac/anomaly/model/AbnormalPlan.java | 22 ++ .../anomaly/service/AbnormalPlanService.java | 2 +- .../service/impl/AbnormalPlanServiceImpl.java | 271 +++++++++++++++++- .../resources/mapper/AbnormalPlanMapper.xml | 7 +- .../main/resources/mapper/ReportMapper.xml | 1 + .../common/controller/BoardController.java | 9 +- .../src/main/resources/mapper/BoardMapper.xml | 37 ++- .../resources/mapper/ReportDataMapper.xml | 12 +- console/src/main/resources/application.yml | 2 +- .../controller/SfcDispatchController.java | 10 +- .../dto/AbnormalShopOrderReleaseDto.java | 49 ++++ .../impl/ShopOrderReleaseServiceImpl.java | 14 +- .../service/impl/InterfaceServiceImpl.java | 7 +- .../mesnac/meapi/dto/DisRouterStepDto.java | 49 ++++ .../mesnac/meapi/enums/HandleEnum.java | 181 ++++++++++++ .../mesnac/meapi/mapper/RouterMapper.java | 2 + .../mesnac/meapi/model/DisRouter.java | 74 +++++ .../mesnac/meapi/service/RouterService.java | 4 +- .../meapi/service/impl/RouterServiceImpl.java | 6 + .../main/resources/mapper/RouterMapper.xml | 7 + .../mapper/RouterStepcontentMapper.xml | 3 - meapi/src/main/resources/mapper/SfcMapper.xml | 2 +- .../service/impl/PodTemplateServiceImpl.java | 13 +- .../main/resources/mapper/SfcCrossMapper.xml | 6 +- 26 files changed, 757 insertions(+), 53 deletions(-) create mode 100644 dispatch/src/main/java/com/foreverwin/mesnac/dispatch/dto/AbnormalShopOrderReleaseDto.java create mode 100644 meapi/src/main/java/com/foreverwin/mesnac/meapi/dto/DisRouterStepDto.java create mode 100644 meapi/src/main/java/com/foreverwin/mesnac/meapi/enums/HandleEnum.java create mode 100644 meapi/src/main/java/com/foreverwin/mesnac/meapi/model/DisRouter.java diff --git a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/controller/AbnormalPlanController.java b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/controller/AbnormalPlanController.java index a3e6df12..e01e634c 100644 --- a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/controller/AbnormalPlanController.java +++ b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/controller/AbnormalPlanController.java @@ -135,7 +135,13 @@ public class AbnormalPlanController { @PostMapping("/processes") public R processes(@RequestBody List abnormalPlanList){ - abnormalPlanService.processes(abnormalPlanList); - return R.ok(); + try { + abnormalPlanService.processes(abnormalPlanList); + return R.ok(); + }catch (Exception e){ + return R.failed(e.getMessage().trim()); + } + + } } \ No newline at end of file diff --git a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/dto/AbnormalPlanDto.java b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/dto/AbnormalPlanDto.java index fdca7a43..7bbc400f 100644 --- a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/dto/AbnormalPlanDto.java +++ b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/dto/AbnormalPlanDto.java @@ -23,6 +23,16 @@ public class AbnormalPlanDto extends AbnormalPlan { private String item; + private String ReapirContent; + + public String getReapirContent() { + return ReapirContent; + } + + public void setReapirContent(String reapirContent) { + ReapirContent = reapirContent; + } + public String getItemDescription() { return itemDescription; } diff --git a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/model/AbnormalPlan.java b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/model/AbnormalPlan.java index fb910ae5..fcff9b7a 100644 --- a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/model/AbnormalPlan.java +++ b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/model/AbnormalPlan.java @@ -120,6 +120,28 @@ public class AbnormalPlan extends Model { @TableField("MODIFIED_DATE_TIME") private LocalDateTime modifiedDateTime; + private String repairRouter; + + private String rtHandle; + + public String getRtHandle() { + return rtHandle; + } + + public void setRtHandle(String rtHandle) { + this.rtHandle = rtHandle; + } + + public String getRepairRouter() { + return repairRouter; + } + + public void setRepairRouter(String repairRouter) { + this.repairRouter = repairRouter; + } + + + public String getHandle() { return handle; diff --git a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/AbnormalPlanService.java b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/AbnormalPlanService.java index 43c44cf8..90c71263 100644 --- a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/AbnormalPlanService.java +++ b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/AbnormalPlanService.java @@ -37,7 +37,7 @@ public interface AbnormalPlanService extends IService { List findAbnormalPlan(AbnormalPlanDto abnormalPlanDto); - void processes(List abnormalPlanList); + void processes(List abnormalPlanList) throws Exception; void sendMessage(AbnormalBill abnormalBill, AbnormalPlan abnormalPlan); } \ No newline at end of file diff --git a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/AbnormalPlanServiceImpl.java b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/AbnormalPlanServiceImpl.java index c47ed487..9335a223 100644 --- a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/AbnormalPlanServiceImpl.java +++ b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/AbnormalPlanServiceImpl.java @@ -14,32 +14,41 @@ import com.foreverwin.mesnac.anomaly.model.AbnormalPlan; import com.foreverwin.mesnac.anomaly.service.AbnormalBillService; import com.foreverwin.mesnac.anomaly.service.AbnormalPlanService; import com.foreverwin.mesnac.common.constant.Constants; +import com.foreverwin.mesnac.common.constant.CustomFieldConstant; import com.foreverwin.mesnac.common.enums.HandleEnum; import com.foreverwin.mesnac.common.mapper.MessageMapper; import com.foreverwin.mesnac.common.model.Message; import com.foreverwin.mesnac.common.service.MessageService; import com.foreverwin.mesnac.common.util.ActiveMQUtil; import com.foreverwin.mesnac.common.util.StringUtil; +import com.foreverwin.mesnac.integration.service.InterfaceService; import com.foreverwin.mesnac.listener.mapper.UsrMapper; import com.foreverwin.mesnac.meapi.mapper.MessageTypeMapper; import com.foreverwin.mesnac.meapi.mapper.UserGroupMapper; -import com.foreverwin.mesnac.meapi.model.MessageType; -import com.foreverwin.mesnac.meapi.model.NwaUser; -import com.foreverwin.mesnac.meapi.model.UserGroup; -import com.foreverwin.mesnac.meapi.service.NwaUserService; +import com.foreverwin.mesnac.meapi.model.*; +import com.foreverwin.mesnac.meapi.service.*; import com.foreverwin.modular.core.exception.BaseException; +import com.foreverwin.modular.core.exception.BusinessException; +import com.foreverwin.modular.core.meext.MEServices; import com.foreverwin.modular.core.util.CommonMethods; import com.foreverwin.modular.core.util.FrontPage; +import com.sap.me.common.RouterType; +import com.sap.me.demand.CreateShopOrderRequest; +import com.sap.me.demand.ShopOrderServiceInterface; +import com.sap.me.demand.ShopOrderStatus; +import com.sap.me.demand.ShopOrderType; +import com.sap.me.productdefinition.BomType; +import com.visiprise.globalization.DateGlobalizationServiceInterface; +import com.visiprise.globalization.GlobalizationService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.math.BigDecimal; import java.time.LocalDateTime; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; -import java.util.UUID; +import java.util.*; +import java.util.stream.Collectors; /** *

@@ -66,12 +75,18 @@ public class AbnormalPlanServiceImpl extends ServiceImpl selectPage(FrontPage frontPage, AbnormalPlan abnormalPlan) { @@ -152,15 +178,65 @@ public class AbnormalPlanServiceImpl extends ServiceImpl findAbnormalPlan=abnormalPlanMapper.findAbnormalPlan(locale,abnormalPlanDto); + Map map=new HashMap(); + map.put("site",site); +// List abnormalPlanDtoList = findAbnormalPlan.stream().map(dto -> { +// AbnormalPlanDto planDto = dto; +// map.put("abnormalBo",planDto.getAbnormalNo()); +// map.put("routerBo",planDto.getRepairRouter()); +// List> result =routerStepcontentService.selectDisRouterInfo(map); +// String ReapirContent=""; +// if(result!=null&&result.size()!=0){ +// for (int j = 0; j < result.size(); j++) { +// ReapirContent=ReapirContent+"【"+(String) result.get(j).get("STEP_ID")+"】"+ +// (String) result.get(j).get("ROUTER_STEP_CONTENT"); +// } +// } +// planDto.setReapirContent(ReapirContent); +// return planDto; +// +// }).collect(Collectors.toList()); + + for (int i = 0; i < findAbnormalPlan.size(); i++) { + String abnormalBo = findAbnormalPlan.get(i).getAbnormalNo(); + String routerBo=findAbnormalPlan.get(i).getRtHandle(); + map.put("abnormalBo",abnormalBo); + map.put("routerBo",routerBo); + List> result =routerStepcontentService.selectDisRouterInfo(map); + String ReapirContent=""; + if(result!=null&&result.size()!=0){ + for (int j = 0; j < result.size(); j++) { + ReapirContent=ReapirContent+"【"+(String) result.get(j).get("STEP_ID")+"】"+ + (String) result.get(j).get("ROUTER_STEP_CONTENT"); + } + } + findAbnormalPlan.get(i).setReapirContent(ReapirContent); + } + +// for (AbnormalPlanDto planDto:findAbnormalPlan){ +// String abnormalBo = planDto.getAbnormalNo(); +// String routerBo=planDto.getRepairRouter(); +// map.put("abnormalBo",abnormalBo); +// map.put("routerBo",routerBo); +// List> result =routerStepcontentService.selectDisRouterInfo(map); +// String ReapirContent=""; +// if(result!=null&&result.size()!=0){ +// for (int j = 0; j < result.size(); j++) { +// ReapirContent=ReapirContent+"【"+(String) result.get(j).get("STEP_ID")+"】"+ +// (String) result.get(j).get("ROUTER_STEP_CONTENT"); +// } +// } +// } + return findAbnormalPlan; } @Override - public void processes(List abnormalPlanList) { + public void processes(List abnormalPlanList) { String site = CommonMethods.getSite(); LocalDateTime now = LocalDateTime.now(); String user = CommonMethods.getUser(); - + ShopOrder shopOrder=new ShopOrder(); List abnormalPlans = new ArrayList<>(); List abnormalBills = new ArrayList<>(); for (AbnormalPlan abnormalPlan : abnormalPlanList){ @@ -180,12 +256,34 @@ public class AbnormalPlanServiceImpl extends ServiceImpl customFieldsList = new ArrayList<>(); +// CustomFields customFields = new CustomFields(); +// if (StringUtil.notBlank(shopOrderSyncRequest.getFACTORY())) { +// customFields.setHandle(shopOrderBo); +// customFields.setAttribute(CustomFieldConstant.SO_FACTORY); +// customFields.setValue(shopOrderSyncRequest.getFACTORY()); +// customFieldsList.add(customFields); +// } +// +// if (StringUtil.notBlank(shopOrderSyncRequest.getWORK_ORDER())) { +// customFields = new CustomFields(); +// customFields.setHandle(shopOrderBo); +// customFields.setAttribute(CustomFieldConstant.SO_WORK_ORDER); +// customFields.setValue(shopOrderSyncRequest.getWORK_ORDER()); +// customFieldsList.add(customFields); +// } + +// if (StringUtil.notBlank(repairshopOrder.getItemBo())) { +// customFields = new CustomFields(); +// customFields.setHandle(shopOrderBo); +// customFields.setAttribute(CustomFieldConstant.SO_ITEM_NUMBER); +// customFields.setValue(repairshopOrder.getItemBo()); +// customFieldsList.add(customFields); +// } + +// if (StringUtil.notBlank(shopOrderSyncRequest.getSHOP_ORDER_TYPE())) { +// customFields = new CustomFields(); +// customFields.setHandle(shopOrderBo); +// customFields.setAttribute(CustomFieldConstant.SO_SHOP_ORDER_TYPE); +// customFields.setValue(shopOrderSyncRequest.getSHOP_ORDER_TYPE()); +// customFieldsList.add(customFields); +// } +// +// if (StringUtil.notBlank(shopOrderSyncRequest.getPRODUCT_CATEGORY())) { +// customFields = new CustomFields(); +// customFields.setHandle(shopOrderBo); +// customFields.setAttribute(CustomFieldConstant.SO_PRODUCT_CATEGORY); +// customFields.setValue(shopOrderSyncRequest.getPRODUCT_CATEGORY()); +// customFieldsList.add(customFields); +// } +// +// if (StringUtil.notBlank(shopOrderSyncRequest.getCOMMENTS())) { +// customFields = new CustomFields(); +// customFields.setHandle(shopOrderBo); +// customFields.setAttribute(CustomFieldConstant.SO_COMMENTS); +// customFields.setValue(shopOrderSyncRequest.getCOMMENTS()); +// customFieldsList.add(customFields); +// } +// +// if (StringUtil.notBlank(shopOrderSyncRequest.getSTART_PRODUCT())) { +// customFields = new CustomFields(); +// customFields.setHandle(shopOrderBo); +// customFields.setAttribute(CustomFieldConstant.SO_START_PRODUCT); +// customFields.setValue(shopOrderSyncRequest.getSTART_PRODUCT()); +// customFieldsList.add(customFields); +// } + + + //自定义字段保存 +// if (customFieldsList != null && customFieldsList.size() > 0) { +// customFieldsService.saveOrUpdateCustomFields(customFieldsList); +// } + } + + + } \ No newline at end of file diff --git a/anomaly/src/main/resources/mapper/AbnormalPlanMapper.xml b/anomaly/src/main/resources/mapper/AbnormalPlanMapper.xml index be5c2594..dcd18ebe 100644 --- a/anomaly/src/main/resources/mapper/AbnormalPlanMapper.xml +++ b/anomaly/src/main/resources/mapper/AbnormalPlanMapper.xml @@ -23,6 +23,8 @@ + + @@ -34,6 +36,7 @@ + @@ -554,10 +557,12 @@ SELECT ZAP.ABNORMAL_NO ABNORMAL_NO ,ZAP.ABNORMAL_METHOD ABNORMAL_METHOD , ZAP.SHOP_ORDER SHOP_ORDER ,R.RESRCE RESRCE,R.DESCRIPTION RESRCE_DESCRIPTION,ZAP.STATUS STATUS ,I.ITEM ITEM, IT.DESCRIPTION ITEM_DESCRIPTION,ZAP.QTY QTY ,ZNU.FULL_NAME FULL_NAME, - ZAP.SEND_USER_GROUP SEND_USER_GROUP + ZAP.SEND_USER_GROUP SEND_USER_GROUP,RT.ROUTER REPAIR_ROUTER,RT.HANDLE RT_HANDLE FROM Z_ABNORMAL_PLAN ZAP INNER JOIN Z_ABNORMAL_BILL ZAB ON ZAB.ABNORMAL_NO = ZAP.ABNORMAL_NO AND ZAB.SITE = #{abnormalPlanDto.site} AND ZAB.TYPE = 'Z' + INNER JOIN Z_ABNORMAL_BILL_DISPOSE ZBD ON ZAB.HANDLE=ZBD.ABNORMAL_BILL_BO + LEFT JOIN ROUTER RT ON RT.HANDLE=ZBD.ROUTER_BO LEFT JOIN RESRCE R ON R.RESRCE = ZAP.RESRCE AND R.SITE = ZAP.SITE LEFT JOIN ITEM I ON I.HANDLE = ZAP.ITEM_BO LEFT JOIN ITEM_T IT ON IT.ITEM_BO = ZAP.ITEM_BO AND IT.LOCALE = #{locale} diff --git a/anomaly/src/main/resources/mapper/ReportMapper.xml b/anomaly/src/main/resources/mapper/ReportMapper.xml index 48eb96e5..b9eebbfb 100644 --- a/anomaly/src/main/resources/mapper/ReportMapper.xml +++ b/anomaly/src/main/resources/mapper/ReportMapper.xml @@ -379,6 +379,7 @@ AND ZRRT.ACTUAL_START_DATE <= TO_DATE(#{param.endDateTime}|| '15:59:59','YYYY-MM-DD HH24:MI:SS') + ORDER BY REPORT_DATE_TIME DESC - + SELECT + ZSD.SHOP_ORDER, + IT.DESCRIPTION, + ZSD.DISPATCH_QTY, + RS.DESCRIPTION RESRCE_DESCRIPTION, + ZUR.USER_DESCRIPTION, + ZSD.ACTUAL_START_DATE + FROM + "Z_SFC_DISPATCH" ZSD + INNER JOIN SHOP_ORDER SO ON SO.SHOP_ORDER = ZSD.SHOP_ORDER + INNER JOIN ITEM IM ON IM.HANDLE = SO.ITEM_BO + LEFT JOIN ITEM_T IT ON IT.ITEM_BO = IM.HANDLE + LEFT JOIN RESRCE RS ON ZSD.RESRCE = RS.RESRCE + LEFT JOIN Z_USER_RESOURCE ZUR ON ZSD.EMPLOYEE = ZUR.USER_ID + AND IT.LOCALE = 'zh' + WHERE + DISPATCH_STATUS = 'START' + AND TO_CHAR( ZSD.ACTUAL_START_DATE + 8 / 24, 'YYYY-MM' ) = TO_CHAR( SYSDATE, 'YYYY-MM' ) + + AND ZSD.WORK_CENTER = #{workCenter} + + GROUP BY + ZSD.SHOP_ORDER, + ZSD.ACTUAL_START_DATE, + IT.DESCRIPTION, + RS.DESCRIPTION, + ZSD.DISPATCH_QTY, + ZUR.USER_DESCRIPTION diff --git a/common/src/main/resources/mapper/ReportDataMapper.xml b/common/src/main/resources/mapper/ReportDataMapper.xml index bc72a66a..5099f16c 100644 --- a/common/src/main/resources/mapper/ReportDataMapper.xml +++ b/common/src/main/resources/mapper/ReportDataMapper.xml @@ -351,9 +351,11 @@ OT.DESCRIPTION OPERATION_DESCRIPTION, ZSD.RESRCE , R.DESCRIPTION RESOURCE_DESCRIPTION , ZSD.DISPATCH_STATUS OPERATION_STATUS , ZSD.PROD_HOURS ,ZSD.ACTUAL_PROD_HOURS , ZSD.PLANNED_START_DATE , ZSD.PLANNED_COMP_DATE , ZSD.ACTUAL_START_DATE , ZSD.ACTUAL_COMPLETE_DATE, CASE WHEN ZSD.ACTUAL_COMPLETE_DATE IS NOT NULL THEN ROUND(TO_NUMBER(ZSD.ACTUAL_COMPLETE_DATE -ZSD.PLANNED_COMP_DATE)) - ELSE ROUND(TO_NUMBER(sysdate -ZSD.PLANNED_COMP_DATE)) END TARDINESS_TIME,CASE WHEN TO_NUMBER(zsd.DISPATCH_SEQ)=1 THEN NULL - WHEN SS.STEP_SEQUENCE>TO_NUMBER(zsd.DISPATCH_SEQ)-1 THEN '已完成' - ELSE '未完成' END LAST_OPERATION_STATUS,PREZSD.EMPLOYEE_DESCRIPTION,ZSD.BLANKING_SIZE + ELSE ROUND(TO_NUMBER(sysdate -ZSD.PLANNED_COMP_DATE)) END TARDINESS_TIME,PREZSD.EMPLOYEE_DESCRIPTION,ZSD.BLANKING_SIZE, + CASE WHEN ZSD.OTHER_2='RK' THEN '入库' + WHEN ZSD.OTHER_2='H' THEN '转入焊接' + WHEN ZSD.OTHER_2='Z' THEN '转装配' + END ITEM_GO FROM Z_SFC_DISPATCH ZSD LEFT JOIN Z_SFC_DISPATCH PREZSD @@ -373,9 +375,7 @@ LEFT JOIN RESRCE R ON R.RESRCE = ZSD.RESRCE AND R.SITE = ZSD.SITE LEFT JOIN CUSTOM_FIELDS CF ON CF.HANDLE = R.HANDLE AND CF."ATTRIBUTE" = 'CHECK_USR' JOIN SFC S ON S.SFC=ZSD.SFC AND S.SITE=ZSD.SITE - JOIN SFC_ROUTING SR ON SR.SFC_BO=S.HANDLE - JOIN SFC_ROUTER SR2 ON SR.HANDLE =SR2.SFC_ROUTING_BO - LEFT JOIN SFC_STEP SS ON SR2.HANDLE =SS.SFC_ROUTER_BO AND (SS.QTY_IN_QUEUE>0 or SS.QTY_IN_WORK>0) + WHERE ZSD.SITE = #{site} AND CFB.VALUE LIKE '%'||#{itemNumber}||'%' diff --git a/console/src/main/resources/application.yml b/console/src/main/resources/application.yml index 29ee7c20..71d6f48a 100644 --- a/console/src/main/resources/application.yml +++ b/console/src/main/resources/application.yml @@ -32,7 +32,7 @@ spring: # 国际化资源文件路径 basename: i18n/messages jackson: - time-zone: GMT+8 + time-zone: GMT+8generateLabel date-format: yyyy-MM-dd HH:mm:ss profiles: # active: prd diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/controller/SfcDispatchController.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/controller/SfcDispatchController.java index 7b1e1c35..9089a047 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/controller/SfcDispatchController.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/controller/SfcDispatchController.java @@ -240,12 +240,14 @@ public class SfcDispatchController { for (int i = 0; i < sfcDispatchList.size(); i++) { paramMap.put("routerStepBo", "RouterStepBO:"+sfcDispatchList.get(i).getRouterBo()+","+sfcDispatchList.get(i).getStepId()); result=routerStepcontentService.selectDisRouterInfo(paramMap); - } - if (result!=null&&result.size()!=0){ - for (int i = 0; i < result.size(); i++) { - msg=msg+ result.get(i).get("ROUTER_STEP_CONTENT"); + if (result!=null&&result.size()!=0){ + for (int j = 0; j < result.size(); j++) { + msg=msg+"【"+result.get(j).get("STEP_ID")+"】"+ + result.get(j).get("ROUTER_STEP_CONTENT"); + } } } + return R.ok(msg); }catch (Exception e){ return R.failed(e.getMessage()); diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/dto/AbnormalShopOrderReleaseDto.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/dto/AbnormalShopOrderReleaseDto.java new file mode 100644 index 00000000..d4d74b68 --- /dev/null +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/dto/AbnormalShopOrderReleaseDto.java @@ -0,0 +1,49 @@ +package com.foreverwin.mesnac.dispatch.dto; + +public class AbnormalShopOrderReleaseDto { + private String ABNORMAL_NO; + private String STATUS; + private String ITEM_BO; + private String OPERATION; + private String SHOP_ORDER; + + public String getABNORMAL_NO() { + return ABNORMAL_NO; + } + + public void setABNORMAL_NO(String ABNORMAL_NO) { + this.ABNORMAL_NO = ABNORMAL_NO; + } + + public String getSTATUS() { + return STATUS; + } + + public void setSTATUS(String STATUS) { + this.STATUS = STATUS; + } + + public String getITEM_BO() { + return ITEM_BO; + } + + public void setITEM_BO(String ITEM_BO) { + this.ITEM_BO = ITEM_BO; + } + + public String getOPERATION() { + return OPERATION; + } + + public void setOPERATION(String OPERATION) { + this.OPERATION = OPERATION; + } + + public String getSHOP_ORDER() { + return SHOP_ORDER; + } + + public void setSHOP_ORDER(String SHOP_ORDER) { + this.SHOP_ORDER = SHOP_ORDER; + } +} diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/ShopOrderReleaseServiceImpl.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/ShopOrderReleaseServiceImpl.java index b907eb82..f0cfe101 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/ShopOrderReleaseServiceImpl.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/ShopOrderReleaseServiceImpl.java @@ -461,12 +461,12 @@ public class ShopOrderReleaseServiceImpl implements ShopOrderReleaseService { throw new BaseException("工单[" + shopOrder + "]还未下达, 不允许刷新动作"); } //判断是否存在返修工艺路线 - AbnormalShopOrderReleaseDto abnormalShopOrderReleaseDto=new AbnormalShopOrderReleaseDto(); - abnormalShopOrderReleaseDto.setSHOP_ORDER(shopOrderReleaseModel.getShopOrder()); - List abnormalShopOrderReleaseDtoList=shopOrderReleaseMapper.findAbnormalShopOrderReleaseDtoList(abnormalShopOrderReleaseDto); - if (abnormalShopOrderReleaseDtoList != null || abnormalShopOrderReleaseDtoList.size() > 0) { - throw new BaseException("工单号【"+shopOrderReleaseModel.getShopOrder()+"】存在返修工艺路线"); - } +// AbnormalShopOrderReleaseDto abnormalShopOrderReleaseDto=new AbnormalShopOrderReleaseDto(); +// abnormalShopOrderReleaseDto.setSHOP_ORDER(shopOrderReleaseModel.getShopOrder()); +// List abnormalShopOrderReleaseDtoList=shopOrderReleaseMapper.findAbnormalShopOrderReleaseDtoList(abnormalShopOrderReleaseDto); +// if (abnormalShopOrderReleaseDtoList.size() > 0) { +// throw new BaseException("工单号【"+shopOrderReleaseModel.getShopOrder()+"】存在返修工艺路线"); +// } //查询工单下的生产批次清单 List sfcList = sfcService.getSfcListByShopOrderBo(shopOrderBo); if (sfcList == null || sfcList.size() <= 0) { @@ -496,8 +496,6 @@ public class ShopOrderReleaseServiceImpl implements ShopOrderReleaseService { throw new BaseException("工艺路线[" +StringUtils.trimHandle(routerBo)+ "]不存在"); } - - sfcDispatchRefresh(site, user, shopOrderModel, sfcModel, routerList); }//end for -- sfcList diff --git a/integration/src/main/java/com/foreverwin/mesnac/integration/service/impl/InterfaceServiceImpl.java b/integration/src/main/java/com/foreverwin/mesnac/integration/service/impl/InterfaceServiceImpl.java index 5fba65b2..3d2a9d33 100644 --- a/integration/src/main/java/com/foreverwin/mesnac/integration/service/impl/InterfaceServiceImpl.java +++ b/integration/src/main/java/com/foreverwin/mesnac/integration/service/impl/InterfaceServiceImpl.java @@ -79,8 +79,9 @@ public class InterfaceServiceImpl implements InterfaceService { //版本:MES物料只有一个版本:A String revision = "A"; //revision = StringUtil.notBlank(revision) ? revision : "A"; - //物料描述 - String itemDescription = itemSyncRequest.getMAKTX(); + //物料描述=物料名+图号 + String dwgNo=itemSyncRequest.getDWG_NO(); + String itemDescription =dwgNo+" "+itemSyncRequest.getMAKTX(); //计量单位 String unitOfMeasure = itemSyncRequest.getUNIT_OF_MEASURE(); @@ -162,7 +163,7 @@ public class InterfaceServiceImpl implements InterfaceService { List itemTranslationList = new ArrayList<>(); ItemTranslation itemTranslation = new ItemTranslation(); Locale locale = LocaleContextHolder.getLocale(); - itemTranslation.setLocale(locale.getLanguage()); + itemTranslation.setLocale("zh"); itemTranslation.setDescription(itemDescription); itemTranslationList.add(itemTranslation); updateItem.setItemTranslationList(itemTranslationList); diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/dto/DisRouterStepDto.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/dto/DisRouterStepDto.java new file mode 100644 index 00000000..b4a80997 --- /dev/null +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/dto/DisRouterStepDto.java @@ -0,0 +1,49 @@ +package com.foreverwin.mesnac.meapi.dto; + +public class DisRouterStepDto { + private String step; + private String operation; + private String operationDescription; + private String operationInfo; + private String repairTime; + + public String getRepairTime() { + return repairTime; + } + + public void setRepairTime(String repairTime) { + this.repairTime = repairTime; + } + + public String getOperationInfo() { + return operationInfo; + } + + public void setOperationInfo(String operationInfo) { + this.operationInfo = operationInfo; + } + + public String getStep() { + return step; + } + + public void setStep(String step) { + this.step = step; + } + + public String getOperation() { + return operation; + } + + public void setOperation(String operation) { + this.operation = operation; + } + + public String getOperationDescription() { + return operationDescription; + } + + public void setOperationDescription(String operationDescription) { + this.operationDescription = operationDescription; + } +} diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/enums/HandleEnum.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/enums/HandleEnum.java new file mode 100644 index 00000000..2e54551e --- /dev/null +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/enums/HandleEnum.java @@ -0,0 +1,181 @@ +package com.foreverwin.mesnac.meapi.enums; + +import java.text.MessageFormat; + +/** + * 数据库表HANDLE拼接 + * + * @author Ervin Chen + * @date 2020/2/5 14:50 + */ + +public enum HandleEnum { + + /**车间作业控制*/ + SFC( "SFCBO:", "SFCBO:{0},{1}" ), + + /**用户**/ + USER("UserBO:", "UserBO:{0},{1}"), + + /**物料清单**/ + BOM("BOMBO:","BOMBO:{0},{1},{2},{3}"), + + PRINT("PrintBO:", "PrintBO:{0},{1}"), + + /**叫料**/ + CALL_ITEM("CallItemBO:", "CallItemBO:{0},{1}"), + + /**工单*/ + SHOP_ORDER( "ShopOrderBO:", "ShopOrderBO:{0},{1}" ), + + /**车间作业控制*/ + SFC_BOM( "SFCBOMBO:", "SFCBOMBO:{0}" ), + + SFC_DATA( "SFCDataBO:", "SFCDataBO:{0},{1}" ), + + /**物料*/ + ITEM( "ItemBO:", "ItemBO:{0},{1},{2}" ), + + /**资源*/ + RESOURCE( "ResourceBO:", "ResourceBO:{0},{1}" ), + + /**设备状态**/ + STATUS("StatusBO:", "StatusBO:{0},{1}"), + + /**设备类型**/ + RESOURCE_TYPE("ResourceTypeBO:", "ResourceTypeBO:{0},{1}"), + + /****/ + RESOURCE_TYPE_RESOURCEBO("ResourceTypeResourceBO","ResourceTypeResourceBO:{0},{1}"), + + /**工艺路线*/ + ROUTER( "RouterBO:", "RouterBO:{0},{1},{2},{3}" ), + + ROUTER_OPERATION( "RouterOperationBO:", "RouterOperationBO:RouterStepBO:{0},{1}" ), + + /****/ //站点、工艺路线、异常单号、工序步骤 + ROUTER_STEP_CONTENT("RouterStepContentBO:", "RouterStepContentBO:{0},{1},{2}"), + + /**工艺路线步骤**/ + ROUTER_STEP("RouterStepBO:", "RouterStepBO:{0},{1}"), + + /**库存*/ + INVENTORY( "InventoryBO:", "InventoryBO:{0},{1}" ), + + /**物料组*/ + ITEM_GROUP( "ItemGroupBO:", "ItemGroupBO:{0},{1}" ), + + /**数据字段*/ + DATA_FIELD( "DataFieldBO:", "DataFieldBO:{0},{1}" ), + + /**编码规则*/ + NEXT_NUMBER("NextNumberBO:","NextNumberBO:{0},{1}"), + + /**工序*/ + OPERATION( "OperationBO:", "OperationBO:{0},{1},{2}" ), + + /**工作中心**/ + WORK_CENTER("WorkCenterBO:", "WorkCenterBO:{0},{1}"), + + /****/ + SFC_DISPATCH("SfcDispatchBO:", "SfcDispatchBO:{0},{1}"), + + + /**检验项目维护*/ + INSPECTION_ITEM("InspectionItemBO:","InspectionItemBO:{0},{1},{2}"), + + /**编码规则*/ + NEXT_NUMBER_CODE("NextNumberCodeBO:","NextNumberCodeBO:{0},{1},{2}"), + + /**设备检验计划**/ + RESOURCE_INSPECT_PLAN("ResourceInspectPlanBo","ResourceInspectPlanBo:{0},{1},{2}"), + + /**设备检验计划的设备清单:站点,点检计划HANDLE,设备HANDLE**/ + RESOURCE_INSPECT_RESOURCE("ResourceInspectResourceBo","ResourceInspectResourceBo:{0},{1},{2}"), + + /**设备检验任务**/ + RESOURCE_INSPECT_TASK("ResourceInspectTaskBo","ResourceInspectTaskBo:{0},{1}"), + + /**设备检验任务**/ + SPLIT_SFC("SplitSfcBo","SplitSfcBo:{0},{1}"), + + /**设备检验任务**/ + RESOURCE_REPAIR_TASK("ResourceRepairTaskBo","ResourceRepairTaskBo:{0},{1}"), + + /**物料批次**/ + ITEM_BATCH("ItemBatchBo", "ItemBatchBo:{0},{1},{2}"), + + /**产前准备任务**/ + PROD_READY_TASK("ProdReadyTaskBO", "ProdReadyTaskBO:{0},{1}"), + + /**产前准备任务**/ + PROD_READY_TASK_DETAIL("ProdReadyTaskDetailBO", "ProdReadyTaskDetailBO:{0},{1}"), + + /**设备检验任务的检验项**/ + RESOURCE_INSPECT_TASK_PARAM("ResourceInspectTaskParamBo","ResourceInspectTaskParamBo:{0},{1}"), + + /**异常单**/ + ABNORMAL_BILL("AbnormalBillBo","AbnormalBillBo:{0},{1}"), + + /**异常单详细表**/ + ABNORMAL_BILL_DISPOSE("AbnormalBillDisposeBo","AbnormalBillDisposeBo:{0},{1}"), + + /**不良代码**/ + NC_CODE("NCCodeBO","NCCodeBO:{0},{1}"), + + /**不良代码组**/ + NC_GROUP("NCGroupBO","NCGroupBO:{0},{1}"), + + /**数据类型**/ + DATA_TYPE("DataTypeBO", "DataTypeBO:{0},{1},{2}"), + + /**设备检验任务的检验项**/ + RESOURCE_INSPECT_TASK_SPARE("ResourceInspectTaskSpareBo","ResourceInspectTaskSpareBo:{0},{1}"), + + /**检验任务**/ + INSPECTION_TASK("InspectionBO:","InspectionBO:{0},{1}"), + + /**检验任务明细**/ + INSPECTION_TASK_DETAIL("InspectionTaskDetailBO:","InspectionTaskDetailBO:{0},{1}"), + /**自报任务**/ + SELF_REPORT("SelfReportBO:","SelfReportBO:{0},{1}"), + /**上料**/ + LOAD_INVENTORY("LoadInventoryBO:","LoadInventoryBO:{0},{1}"), + + /**用户**/ + USR("UserBO","UserBO:{0},{1}"), + + TOOL("ToolBO","ToolBO:{0},{1}"), + + USER_RESOURCE("UserResourceBo","UserResourceBo:{0},{1},{2}"), + + SFC_SCRAP("SfcScrapBo","SfcScrapBo:{0},{1}"), + + ABNORMAL_PLAN("AbnormalPlanBo","AbnormalPlanBo:{0},{1}"); + + private String prefix; + private String pattern; + + HandleEnum(String prefix, String pattern) { + this.prefix = prefix; + this.pattern = pattern; + } + + public String getHandle(String... parts) { + return MessageFormat.format(pattern, parts); + } + + public String getPart(String handle, int position) { + String handleParts = handle.replace(prefix, ""); + String[] parts = handleParts.split(","); + if (position >= parts.length) { + return null; + } else { + return parts[position]; + } + } + + public String getPrefix() { + return prefix; + } +} diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/RouterMapper.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/RouterMapper.java index 9c8a8ca1..ed2b1455 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/RouterMapper.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/RouterMapper.java @@ -23,4 +23,6 @@ public interface RouterMapper extends BaseMapper { Router selectCurrentRouter(@Param("routerBo") String routerBo); List selectRouterList4RevisionDesc(@Param("site") String site, @Param("router") String router); + + boolean findRepairOperation(@Param("site") String site, @Param("routerBo") String routerBo, @Param("stepId") String stepId); } \ No newline at end of file diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/model/DisRouter.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/model/DisRouter.java new file mode 100644 index 00000000..7f5641cd --- /dev/null +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/model/DisRouter.java @@ -0,0 +1,74 @@ +package com.foreverwin.mesnac.meapi.model; + + +import com.baomidou.mybatisplus.extension.activerecord.Model; +import com.foreverwin.mesnac.meapi.dto.DisRouterStepDto; + +import java.io.Serializable; +import java.util.List; + +public class DisRouter extends Model { + + private static final long serialVersionUID = 1L; + + private String handle; + + private String abnormalNo; + + private String router; + + private String item; + + private List disRouterStepDtoList; + + @Override + public String toString() { + return "DisRouter{" + + "handle='" + handle + '\'' + + ", abnormalNo='" + abnormalNo + '\'' + + ", router='" + router + '\'' + + ", item='" + item + '\'' + + ", disRouterStepDtoList=" + disRouterStepDtoList + + '}'; + } + + public String getHandle() { + return handle; + } + + public void setHandle(String handle) { + this.handle = handle; + } + + public String getAbnormalNo() { + return abnormalNo; + } + + public void setAbnormalNo(String abnormalNo) { + this.abnormalNo = abnormalNo; + } + + public String getRouter() { + return router; + } + + public void setRouter(String router) { + this.router = router; + } + + public String getItem() { + return item; + } + + public void setItem(String item) { + this.item = item; + } + + public List getDisRouterStepDtoList() { + return disRouterStepDtoList; + } + + public void setDisRouterStepDtoList(List disRouterStepDtoList) { + this.disRouterStepDtoList = disRouterStepDtoList; + } +} diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/RouterService.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/RouterService.java index 0b4e81a3..48b4e566 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/RouterService.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/RouterService.java @@ -40,7 +40,9 @@ public interface RouterService extends IService { */ Router getMaxRevisionRouter(String site, String router); - void CreateDisRouter(DisRouter disRouter) throws Exception;; + void CreateDisRouter(DisRouter disRouter) throws Exception; + //判断是否为返修工序 + boolean findRepairOperation(String site,String routerBo,String stepId); } \ No newline at end of file diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/impl/RouterServiceImpl.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/impl/RouterServiceImpl.java index 6a908d0e..085d758d 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/impl/RouterServiceImpl.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/impl/RouterServiceImpl.java @@ -261,4 +261,10 @@ public class RouterServiceImpl extends ServiceImpl impleme customFieldsService.saveOrUpdateCustomFields(customFieldsList); } } + + @Override + public boolean findRepairOperation(String site, String routerBo, String stepId) { + return routerMapper.findRepairOperation(site,routerBo,stepId); + } + } \ No newline at end of file diff --git a/meapi/src/main/resources/mapper/RouterMapper.xml b/meapi/src/main/resources/mapper/RouterMapper.xml index d900873b..14a35c92 100644 --- a/meapi/src/main/resources/mapper/RouterMapper.xml +++ b/meapi/src/main/resources/mapper/RouterMapper.xml @@ -658,4 +658,11 @@ WHERE SITE = #{site} AND ROUTER = #{router} ORDER BY TO_NUMBER(REVISION) DESC + diff --git a/meapi/src/main/resources/mapper/RouterStepcontentMapper.xml b/meapi/src/main/resources/mapper/RouterStepcontentMapper.xml index 2c66f1ca..fa6b848a 100644 --- a/meapi/src/main/resources/mapper/RouterStepcontentMapper.xml +++ b/meapi/src/main/resources/mapper/RouterStepcontentMapper.xml @@ -204,9 +204,6 @@ AND ZRS.ABNORMAL_NO=#{abnormalBo} - - AND ZRS.ABNORMAL_NO=#{abnormalBo} - AND ZRS.ROUTER_STEP_BO=#{routerStepBo} diff --git a/meapi/src/main/resources/mapper/SfcMapper.xml b/meapi/src/main/resources/mapper/SfcMapper.xml index e355fe4e..5e5ea765 100644 --- a/meapi/src/main/resources/mapper/SfcMapper.xml +++ b/meapi/src/main/resources/mapper/SfcMapper.xml @@ -667,7 +667,7 @@ WHERE SC.SITE = #{site} AND SC.SFC = #{sfc} - SELECT * FROM ( SELECT S.SITE,PREZSD.EMPLOYEE_DESCRIPTION, CASE WHEN SS.STEP_SEQUENCE>TO_NUMBER(zsd.DISPATCH_SEQ)-1 THEN '完成' diff --git a/production/src/main/java/com/foreverwin/mesnac/production/service/impl/PodTemplateServiceImpl.java b/production/src/main/java/com/foreverwin/mesnac/production/service/impl/PodTemplateServiceImpl.java index 003334a2..f40fa376 100644 --- a/production/src/main/java/com/foreverwin/mesnac/production/service/impl/PodTemplateServiceImpl.java +++ b/production/src/main/java/com/foreverwin/mesnac/production/service/impl/PodTemplateServiceImpl.java @@ -315,10 +315,15 @@ public class PodTemplateServiceImpl implements PodTemplateService { if (status.equals("404")) { throw new BaseException("产品条码" + sfc + "已暂停"); } - //返修工序不报工 -// if (stepId.startsWith("9")){ -// enabled=false; -// } + /** + * 判断是否为返修工序、返修工序不报工 + */ + boolean flag=routerService.findRepairOperation(site,sfcDispatchById.getRouterBo(),stepId); + if (flag){ + enabled=false; + } + + BigDecimal workHour=BigDecimal.ZERO; BigDecimal qty = new BigDecimal(sfcServiceById.getQty().toString()); if (!operation.equals("WX_6106GX")&&!operation.equals("HJ_6106JYGX")&&!operation.equals("HJ_6106JRGX")) { diff --git a/production/src/main/resources/mapper/SfcCrossMapper.xml b/production/src/main/resources/mapper/SfcCrossMapper.xml index c9ab4461..1213b844 100644 --- a/production/src/main/resources/mapper/SfcCrossMapper.xml +++ b/production/src/main/resources/mapper/SfcCrossMapper.xml @@ -98,7 +98,7 @@ TO_CHAR( SOD.PLANNED_START_DATE + INTERVAL '8' HOUR,'yyyy-mm-dd hh24:mi:ss')START_DATE, TO_CHAR(SOD.PLANNED_COMP_DATE + INTERVAL '8' HOUR ,'yyyy-mm-dd hh24:mi:ss')COMP_DATE, TO_CHAR((SOD.PLANNED_COMP_DATE - SOD.PLANNED_START_DATE )*24,'fm9999999990.00')||'H' ADD_DATE, - CASE WHEN OT.DESCRIPTION LIKE 'CH%' THEN SUBSTR(OT.DESCRIPTION, 0, 3) ELSE N'' END SLOT + CASE WHEN OT.DESCRIPTION LIKE 'CH%' THEN SUBSTR(OT.DESCRIPTION, 0, 3) ELSE N'' END SLOT,SOD.ROUTER_BO FROM SFC S INNER JOIN STATUS ST ON ST.HANDLE = S.STATUS_BO INNER JOIN SFC_ROUTING SR ON SR.SFC_BO = S.HANDLE @@ -117,13 +117,13 @@ INNER JOIN ITEM I ON I.HANDLE = S.ITEM_BO LEFT JOIN ITEM_T IT ON IT.ITEM_BO = I.HANDLE AND IT.LOCALE =#{locale} INNER JOIN ( - SELECT SD.HANDLE, SD.SFC,SD.RESRCE,SD.OPERATION,SD.STEP_ID,SD.PLANNED_COMP_DATE, SD.PLANNED_START_DATE,SD.DISPATCH_NO,SD.WORK_CENTER,SD.PROD_HOURS,SD.EMPLOYEE_DESCRIPTION,SD.EMPLOYEE,SD.BLANKING_SIZE + SELECT SD.HANDLE, SD.SFC,SD.RESRCE,SD.OPERATION,SD.STEP_ID,SD.PLANNED_COMP_DATE, SD.PLANNED_START_DATE,SD.DISPATCH_NO,SD.WORK_CENTER,SD.PROD_HOURS,SD.EMPLOYEE_DESCRIPTION,SD.EMPLOYEE,SD.BLANKING_SIZE,SD.ROUTER_BO FROM Z_PROD_READY_TASK RB INNER JOIN Z_SFC_DISPATCH SD ON SD.HANDLE = RB.SFC_DISPATCH_BO WHERE RB.SITE =#{site} AND RB.STATUS = 'FINISH' AND RB."RESULT"='OK' ) SOD ON SOD.RESRCE =#{dto.resrce} AND SOD.SFC= S.SFC AND SOD.OPERATION = OP.OPERATION and SS.STEP_ID=SOD.STEP_ID WHERE S.SITE = #{site} AND S.SFC = #{dto.sfc} AND ROWNUM=1 - GROUP BY SO.SHOP_ORDER, SO_CF.VALUE , I.ITEM, IT.DESCRIPTION ,SOD.WORK_CENTER,SO_CF2.VALUE,SOD.PROD_HOURS,SOD.EMPLOYEE_DESCRIPTION,SOD.EMPLOYEE,SOD.BLANKING_SIZE, + GROUP BY SO.SHOP_ORDER, SO_CF.VALUE , I.ITEM, IT.DESCRIPTION ,SOD.WORK_CENTER,SOD.ROUTER_BO,SO_CF2.VALUE,SOD.PROD_HOURS,SOD.EMPLOYEE_DESCRIPTION,SOD.EMPLOYEE,SOD.BLANKING_SIZE, CASE WHEN ST.STATUS='403' AND SS.QTY_IN_QUEUE > 0 THEN N'402' ELSE ST.STATUS END, OP.OPERATION, OT.DESCRIPTION ,OP.OPERATION||'/'||RS.STEP_ID ,RO_CF2.VALUE, S.SFC,S.QTY ,RS.STEP_ID,SOD.DISPATCH_NO , SOD.HANDLE ,