diff --git a/anomaly/src/main/resources/mapper/ReportMapper.xml b/anomaly/src/main/resources/mapper/ReportMapper.xml index 6e265122..2501e99a 100644 --- a/anomaly/src/main/resources/mapper/ReportMapper.xml +++ b/anomaly/src/main/resources/mapper/ReportMapper.xml @@ -749,11 +749,15 @@ WHEN zab.NC_QTY IS NOT NULL THEN ROUND((zsd.DISPATCH_QTY - TO_NUMBER(zab.NC_QTY))*ZSD.PROD_HOURS ,4) ELSE ROUND(zsd.DISPATCH_QTY*ZSD.PROD_HOURS ,4) END TOTAL_PROD_HOURS , zsd.EMPLOYEE_DESCRIPTION, - zsd.ACTUAL_START_DATE, - zsd.ACTUAL_COMPLETE_DATE, - zsd.REMARK + CASE WHEN ZUR.TEMPORARY_USER = 'true' THEN '临时' + WHEN ZUR.TEMPORARY_USER = 'false' THEN '正式' END EMPLOYEE_ATTR, + zsd.ACTUAL_START_DATE, + zsd.ACTUAL_COMPLETE_DATE, + zsd.REMARK FROM Z_SFC_DISPATCH zsd - INNER JOIN SHOP_ORDER so ON so.SHOP_ORDER = zsd.SHOP_ORDER AND so.SITE = zsd.SITE + LEFT JOIN Z_USER_RESOURCE ZUR ON zsd.RESRCE = ZUR.RESRCE + AND zsd.EMPLOYEE_DESCRIPTION like CONCAT(ZUR.USER_DESCRIPTION, '%') + INNER JOIN SHOP_ORDER so ON so.SHOP_ORDER = zsd.SHOP_ORDER AND so.SITE = zsd.SITE LEFT JOIN CUSTOM_FIELDS cf ON cf.HANDLE = so.HANDLE AND cf."ATTRIBUTE" = 'ITEM_NUMBER' LEFT JOIN CUSTOM_FIELDS cf2 ON cf2.HANDLE = so.HANDLE AND cf2."ATTRIBUTE" = 'WORK_ORDER' INNER JOIN ITEM i ON i.HANDLE = so.ITEM_BO diff --git a/common/pom.xml b/common/pom.xml index 1b0d3575..cab7f265 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -83,6 +83,7 @@ meapi + org.apache.axis axis @@ -109,5 +110,6 @@ commons-net commons-net + \ No newline at end of file diff --git a/common/src/main/java/com/foreverwin/mesnac/common/controller/FileController.java b/common/src/main/java/com/foreverwin/mesnac/common/controller/FileController.java index 28d12399..3d1aae91 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/controller/FileController.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/controller/FileController.java @@ -4,6 +4,7 @@ import com.foreverwin.mesnac.common.ftp.CappFtpClient; import com.foreverwin.mesnac.common.service.FileService; import com.foreverwin.mesnac.meapi.util.StringUtils; import com.foreverwin.modular.core.exception.BaseException; +import com.foreverwin.modular.core.util.CommonMethods; import com.foreverwin.modular.core.util.R; import org.apache.commons.net.ftp.FTPClient; import org.slf4j.Logger; @@ -11,10 +12,7 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -46,12 +44,13 @@ public class FileController { */ @ResponseBody @RequestMapping(method = RequestMethod.GET, value = "/getPdfPath") - public R getPdfPath(String sfc) { + public R getPdfPath(@RequestParam("sfc") String sfc, @RequestParam("operation") String operation,@RequestParam("step") String step) { try { if(StringUtils.isBlank(sfc)){ - throw new BaseException("产品条码不能为空!"); + throw new BaseException("派工单号不能为空!"); } - return R.ok(fileService.getFilePaths(sfc)); + String site = CommonMethods.getSite(); + return R.ok(fileService.getFilePaths(site,sfc,operation,step)); }catch (Exception e){ return R.failed("获取图纸路径失败:"+e.getMessage()); } diff --git a/common/src/main/java/com/foreverwin/mesnac/common/service/FileService.java b/common/src/main/java/com/foreverwin/mesnac/common/service/FileService.java index 019e0b5a..4ef3cda6 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/service/FileService.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/service/FileService.java @@ -7,6 +7,6 @@ import java.util.Map; */ public interface FileService { - Map getFilePaths(String sfc) throws Exception; + Map getFilePaths(String site,String sfc,String operation,String step) throws Exception; Map getFilePathsByItemBo(String itemBo) throws Exception; } diff --git a/common/src/main/java/com/foreverwin/mesnac/common/service/impl/FileServiceImpl.java b/common/src/main/java/com/foreverwin/mesnac/common/service/impl/FileServiceImpl.java index 65ac2283..849757f2 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/service/impl/FileServiceImpl.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/service/impl/FileServiceImpl.java @@ -1,11 +1,14 @@ package com.foreverwin.mesnac.common.service.impl; +import com.foreverwin.mesnac.common.dto.SfcDispatchDto; import com.foreverwin.mesnac.common.enums.HandleEnum; import com.foreverwin.mesnac.common.ftp.CappFtpClient; import com.foreverwin.mesnac.common.service.FileService; import com.foreverwin.mesnac.common.util.ExceptionUtil; import com.foreverwin.mesnac.common.util.StringUtil; import com.foreverwin.mesnac.meapi.model.Sfc; +import com.foreverwin.mesnac.meapi.model.SfcDispatchDrawing; +import com.foreverwin.mesnac.meapi.service.SfcDispatchDrawingService; import com.foreverwin.mesnac.meapi.service.SfcService; import com.foreverwin.modular.core.exception.BaseException; import com.foreverwin.modular.core.util.CommonMethods; @@ -14,8 +17,10 @@ import org.apache.commons.net.ftp.FTPFile; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.io.File; import java.io.IOException; import java.util.HashMap; +import java.util.List; import java.util.Map; @Service @@ -23,16 +28,23 @@ public class FileServiceImpl implements FileService { @Autowired private SfcService sfcService; @Autowired + private SfcDispatchDrawingService sfcDispatchDrawingService; + @Autowired private CappFtpClient cappFtpClient; + @Override - public Map getFilePaths(String sfc) throws IOException { + public Map getFilePaths(String site,String sfc,String operation,String step) throws IOException { Sfc sfcServiceById = sfcService.getById(HandleEnum.SFC.getHandle(CommonMethods.getSite(), sfc)); if (sfcServiceById==null){ throw new BaseException("未找到产品条码"+sfc); } + SfcDispatchDrawing sfcDispatchDrawing = sfcDispatchDrawingService.findSfcDispatch(site,sfc,operation,step); + if (sfcDispatchDrawing==null||sfcDispatchDrawing.getDrawingsRevision()==null){ + throw new BaseException("未找到图纸相应信息"); + } String itemBo = sfcServiceById.getItemBo(); - String path="/"+ StringUtil.trimHandle(itemBo)+"_"+StringUtil.trimRevision(itemBo)+"/"; + String path="/"+ StringUtil.trimHandle(itemBo)+"_"+sfcDispatchDrawing.getDrawingsRevision()+"/"; FTPClient connect = null; Map pathMap = new HashMap<>(); try { @@ -41,12 +53,17 @@ public class FileServiceImpl implements FileService { connect.enterLocalPassiveMode(); FTPFile[] files = connect.listFiles(); if(files!=null){ - for (int i = 0; i < files.length; i++) { - if(files[i].isFile()){ - String filename=files[i].getName(); - pathMap.put(filename,path+filename); + for (FTPFile ftpFile:files){ + if (ftpFile.getName().equals(path.substring(1,path.length()-1))&&ftpFile.isFile()){ + pathMap.put(ftpFile.getName(),path+ftpFile.getName()); } } +// for (int i = 0; i < files.length; i++) { +// if(files[i].isFile()){ +// String filename=files[i].getName(); +// pathMap.put(filename,path+filename); +// } +// } } connect.disconnect(); }catch (Exception e){ @@ -88,8 +105,8 @@ public class FileServiceImpl implements FileService { connect.disconnect(); } } - return pathMap; } + } diff --git a/console/src/main/resources/application-local.yml b/console/src/main/resources/application-local.yml index 10cf3217..31107874 100644 --- a/console/src/main/resources/application-local.yml +++ b/console/src/main/resources/application-local.yml @@ -6,7 +6,7 @@ spring: primary: wip #设置默认的数据源或者数据源组,默认值即为master datasource: wip: - url: jdbc:oracle:thin:@113.98.201.217:1521/ORD + url: jdbc:oracle:thin:@172.16.251.133:1521/ORQ username: wip password: wip driver-class-name: oracle.jdbc.OracleDriver diff --git a/console/src/main/resources/application.yml b/console/src/main/resources/application.yml index c9cd59e3..29ee7c20 100644 --- a/console/src/main/resources/application.yml +++ b/console/src/main/resources/application.yml @@ -36,7 +36,7 @@ spring: date-format: yyyy-MM-dd HH:mm:ss profiles: # active: prd -# active: qas +# active: qas active: local # active: dev # 文件上传 diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/SfcDispatchService.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/SfcDispatchService.java index 9d8fee61..ece9344b 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/SfcDispatchService.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/SfcDispatchService.java @@ -5,6 +5,7 @@ import com.foreverwin.mesnac.common.dto.SfcDispatchDto; import com.foreverwin.mesnac.dispatch.model.SfcDispatch; import org.springframework.web.multipart.MultipartFile; +import java.io.IOException; import java.util.List; import java.util.Map; @@ -36,7 +37,7 @@ public interface SfcDispatchService extends IService { * @param paramMap * @return */ - List findSfcDispatchList(Map paramMap); + List findSfcDispatchList(Map paramMap) throws IOException; /** * 派工保存 @@ -108,7 +109,7 @@ public interface SfcDispatchService extends IService { * @param paramMap * @return */ - Map ganttList(String site, Map paramMap); + Map ganttList(String site, Map paramMap) throws IOException; } \ No newline at end of file diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/SfcDispatchServiceImpl.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/SfcDispatchServiceImpl.java index f26d04a7..28de0ef8 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/SfcDispatchServiceImpl.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/SfcDispatchServiceImpl.java @@ -8,18 +8,16 @@ import com.foreverwin.mesnac.common.constant.Constants; import com.foreverwin.mesnac.common.dto.SfcDispatchDto; import com.foreverwin.mesnac.common.enums.DispatchStatusEnum; import com.foreverwin.mesnac.common.enums.HandleEnum; +import com.foreverwin.mesnac.common.ftp.CappFtpClient; import com.foreverwin.mesnac.common.service.ProdReadyTaskService; import com.foreverwin.mesnac.common.service.SfcDispatchCommonService; -import com.foreverwin.mesnac.common.util.DateUtil; -import com.foreverwin.mesnac.common.util.ExcelUtils; -import com.foreverwin.mesnac.common.util.StringUtil; +import com.foreverwin.mesnac.common.util.*; import com.foreverwin.mesnac.dispatch.dto.RouterDTO; import com.foreverwin.mesnac.dispatch.dto.SfcDispatchEmployeeDto; import com.foreverwin.mesnac.dispatch.dto.WorkCenterWorkTimeDTO; import com.foreverwin.mesnac.dispatch.mapper.SfcDispatchMapper; import com.foreverwin.mesnac.dispatch.model.CallItem; import com.foreverwin.mesnac.dispatch.model.SfcDispatch; -import com.foreverwin.mesnac.dispatch.model.SfcDispatchEmployee; import com.foreverwin.mesnac.dispatch.model.UserResource; import com.foreverwin.mesnac.dispatch.service.*; import com.foreverwin.mesnac.meapi.dto.WorkCenterLinkDTO; @@ -30,6 +28,7 @@ import com.foreverwin.modular.core.exception.BaseException; import com.foreverwin.modular.core.exception.BusinessException; import com.foreverwin.modular.core.util.CommonMethods; import org.apache.commons.fileupload.FileItem; +import org.apache.commons.net.ftp.FTPClient; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -40,7 +39,7 @@ import javax.servlet.http.HttpServletRequest; import java.io.IOException; import java.io.InputStream; import java.math.BigDecimal; -import java.text.SimpleDateFormat; +import java.net.InetAddress; import java.time.LocalDateTime; import java.util.*; import java.util.stream.Collectors; @@ -87,6 +86,8 @@ public class SfcDispatchServiceImpl extends ServiceImpl findSfcDispatch(String site, String sfc, String operation, String stepId) { @@ -94,24 +95,11 @@ public class SfcDispatchServiceImpl extends ServiceImpl findSfcDispatchList(Map paramMap) { + public List findSfcDispatchList(Map paramMap) throws IOException { List list = sfcDispatchMapper.findSfcDispatchList(paramMap); if (list == null || list.size() <= 0) { -// List sfcDispatchDtoList=new ArrayList<>(); -// for(SfcDispatchDto sfcDispatchDto:list){ -// Sfc sfcServiceById = sfcService.getById(HandleEnum.SFC.getHandle(CommonMethods.getSite(), sfcDispatchDto.getSfc())); -// if (sfcServiceById==null){ -// sfcDispatchDto.setDrawingsRevision(null); -// }else { -// String itemBo = sfcServiceById.getItemBo(); -// String path="/"+ StringUtil.trimHandle(itemBo)+"_"+StringUtil.trimRevision(itemBo)+"/"; -// sfcDispatchDto.setDrawingsRevision(path); -// } -// sfcDispatchDtoList.add(sfcDispatchDto); -// } return list; } - //查询用户对应用户组 String site = CommonMethods.getSite(); String user = CommonMethods.getUser(); @@ -136,10 +124,26 @@ public class SfcDispatchServiceImpl extends ServiceImpl callItemList = callItemService.getEffectedCallItemByDispatchBo(sfcDispatchBo); - if (callItemList != null && callItemList.size() > 0) { - throw BusinessException.build("工单[" + shopOrder + "]的派工单[" + dispatchNo + "]已有发料,不能取消!"); - } +// List callItemList = callItemService.getEffectedCallItemByDispatchBo(sfcDispatchBo); +// if (callItemList != null && callItemList.size() > 0) { +// throw BusinessException.build("工单[" + shopOrder + "]的派工单[" + dispatchNo + "]已有发料,不能取消!"); +// } sfcDispatch = new SfcDispatch(); @@ -303,7 +306,7 @@ public class SfcDispatchServiceImpl extends ServiceImpl ganttList(String site, Map paramMap) { + public Map ganttList(String site, Map paramMap) throws IOException { Map map = new HashMap<>(); //查询派工数据 @@ -637,6 +640,7 @@ public class SfcDispatchServiceImpl extends ServiceImpl AND SD.PLANNED_COMP_DATE <= TO_DATE(#{completeToDate}|| '23:59:59', 'YYYY-MM-DD HH24:MI:SS') - GROUP BY SD.HANDLE, SD.SITE, SD.SHOP_ORDER, SD.DISPATCH_NO, SD.ROUTER_BO, C2.VALUE, C1.VALUE, IM.HANDLE, IM.ITEM, IT.DESCRIPTION, SD.SFC, SD.DISPATCH_STATUS, + GROUP BY SD.HANDLE, SD.SITE, SD.SHOP_ORDER, SD.DISPATCH_NO, SD.ROUTER_BO, C2.VALUE, C1.VALUE, IM.HANDLE, IM.ITEM, IT.DESCRIPTION, SD.SFC, SD.DISPATCH_STATUS,SD.DRAWINGS_REVISION, SD.STEP_ID, SD.OPERATION, OT.DESCRIPTION, SD.RESOURCE_TYPE, SD.RESRCE, SD.EMPLOYEE, SD.EMPLOYEE, SD.DISPATCH_QTY, SD.PROD_HOURS, RS.DESCRIPTION, SD.DISPATCH_STATUS, SD.DISPATCH_QTY, SD.PLANNED_START_DATE, SD.PLANNED_COMP_DATE, SD.WORK_CENTER, SD.IS_DISPATCH, SD.EMPLOYEE_DESCRIPTION, SD.ACTUAL_START_DATE, SD.ACTUAL_COMPLETE_DATE, SD.REMARK, SD.DISPATCH_SEQ, SD.EARLIEST_START_DATE, SD.LATEST_END_DATE, diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/controller/ShopOrderController.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/controller/ShopOrderController.java index 5fd6ecce..848dd89e 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/controller/ShopOrderController.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/controller/ShopOrderController.java @@ -92,8 +92,8 @@ public class ShopOrderController { * 查出只有异常的工单 */ @GetMapping("/findAbnormalShopOrder") - public R findAbnormalShopOrder(ShopOrder shopOrder){ - return R.ok(shopOrderService.findAbnormalShopOrder(shopOrder)); + public R findAbnormalShopOrder(String type,ShopOrder shopOrder){ + return R.ok(shopOrderService.findAbnormalShopOrder(type,shopOrder)); } diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/model/ShopOrder.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/model/ShopOrder.java index 7b5fe9b1..6d315b42 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/model/ShopOrder.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/model/ShopOrder.java @@ -137,6 +137,17 @@ public class ShopOrder extends Model { @TableField("TOLERANCE_DEFINED_IN") private String toleranceDefinedIn; + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + //异常类型,查询异常工单时传参 + private String type; + public String getHandle() { return handle; diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/SfcDispatchDrawingService.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/SfcDispatchDrawingService.java new file mode 100644 index 00000000..f1db9b3d --- /dev/null +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/SfcDispatchDrawingService.java @@ -0,0 +1,31 @@ +package com.foreverwin.mesnac.meapi.service; + +import com.baomidou.mybatisplus.extension.service.IService; + +import com.foreverwin.mesnac.meapi.model.SfcDispatchDrawing; + +import java.util.List; + +/** + *

+ * 服务类 + *

+ * + * @author Leon.L + * @since 2021-06-02 + */ +public interface SfcDispatchDrawingService extends IService { + + + /** + * 查询派工数据 + * + * @param site + * @param sfc + * @param operation 非必须 + * @param stepId 非必须 + * @return + */ + SfcDispatchDrawing findSfcDispatch(String site, String sfc, String operation, String stepId); + +} \ No newline at end of file diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/ShopOrderService.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/ShopOrderService.java index a9e924f3..adf598c6 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/ShopOrderService.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/ShopOrderService.java @@ -36,7 +36,7 @@ public interface ShopOrderService extends IService { ShopOrderDto findByShopOrderBo(String handle); - List findAbnormalShopOrder(ShopOrder shopOrder); + List findAbnormalShopOrder(String type,ShopOrder shopOrder); } \ No newline at end of file diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/impl/ShopOrderServiceImpl.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/impl/ShopOrderServiceImpl.java index 13ce5eee..2b6cec81 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/impl/ShopOrderServiceImpl.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/impl/ShopOrderServiceImpl.java @@ -65,9 +65,10 @@ public class ShopOrderServiceImpl extends ServiceImpl findAbnormalShopOrder(ShopOrder shopOrder) { + public List findAbnormalShopOrder(String type,ShopOrder shopOrder) { String site = CommonMethods.getSite(); shopOrder.setSite(site); + shopOrder.setType(type); return shopOrderMapper.findAbnormalShopOrder(shopOrder); } diff --git a/meapi/src/main/resources/mapper/ShopOrderMapper.xml b/meapi/src/main/resources/mapper/ShopOrderMapper.xml index e0e4574a..34ef3ef9 100644 --- a/meapi/src/main/resources/mapper/ShopOrderMapper.xml +++ b/meapi/src/main/resources/mapper/ShopOrderMapper.xml @@ -1041,6 +1041,9 @@ INNER JOIN ITEM i ON i.HANDLE = so.PLANNED_ITEM_BO so.SITE = #{site} + + AND zab.TYPE = #{type} + 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 47c5c856..eaf41cc1 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 @@ -165,10 +165,12 @@ public class PodTemplateServiceImpl implements PodTemplateService { if (resultMap == null) { throw new BaseException("根据当前资源未找到条码[" + sfc + "]的基本信息!"); } + if(resultMap.get("EMPLOYEE_DESCRIPTION")==null||resultMap.get("EMPLOYEE_DESCRIPTION").equals("")){ + throw new BaseException("产品条码[" + sfc + "]的操作人员为空!请联系调度人员维护!"); + } //List> substepList = sfcCrossMapper.querySfcStep(site, sfc, operationBySfcBo.getOperation()); List> substepList = new ArrayList<>(); resultMap.put("SFC_STEP_LIST", substepList); - //是否需要自检和互检 String isCreateH = "N"; String isCreateZ = "N"; @@ -284,7 +286,7 @@ public class PodTemplateServiceImpl implements PodTemplateService { } BigDecimal workHour=BigDecimal.ZERO; BigDecimal qty = new BigDecimal(sfcServiceById.getQty().toString()); - if (!operation.equals("WX_6106GX")) { + if (!operation.equals("WX_6106GX")&&!operation.equals("HJ_6106JYGX")&&!operation.equals("HJ_6106JRGX")) { //是否有自检检验项目 List inspectionItemDetails = inspectionItemService.selectQualityInspection(sfc, operation, stepId, Constants.INSPECTION_TYPE_Z); if (inspectionItemDetails.size() > 0 && inspectionItemDetails.get(0) != null) { diff --git a/production/src/main/resources/mapper/SfcCrossMapper.xml b/production/src/main/resources/mapper/SfcCrossMapper.xml index 1530d3b5..1a88e754 100644 --- a/production/src/main/resources/mapper/SfcCrossMapper.xml +++ b/production/src/main/resources/mapper/SfcCrossMapper.xml @@ -94,7 +94,7 @@ CASE WHEN ST.STATUS='403' AND SS.QTY_IN_QUEUE > 0 THEN N'402' ELSE ST.STATUS END STATUS, OP.OPERATION, OT.DESCRIPTION OPERATION_DESC,OP.OPERATION||'/'||RS.STEP_ID OPERATION_STEP, RO_CF2.VALUE TOOL ,SOD.HANDLE SFC_DISPATCH_DETAIL_BO,SOD.WORK_CENTER,SOD.PROD_HOURS, - S.SFC,S.QTY SFC_QTY,RS.STEP_ID, SOD.DISPATCH_NO , + S.SFC,S.QTY SFC_QTY,RS.STEP_ID, SOD.DISPATCH_NO ,SOD.EMPLOYEE_DESCRIPTION, 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, @@ -117,7 +117,7 @@ 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 + 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 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'