philip 3 years ago
commit 1af84f6800

@ -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

@ -83,6 +83,7 @@
<artifactId>meapi</artifactId>
</dependency>
<dependency>
<groupId>org.apache.axis</groupId>
<artifactId>axis</artifactId>
@ -109,5 +110,6 @@
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
</dependency>
</dependencies>
</project>

@ -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());
}

@ -7,6 +7,6 @@ import java.util.Map;
*/
public interface FileService {
Map<String,String> getFilePaths(String sfc) throws Exception;
Map<String,String> getFilePaths(String site,String sfc,String operation,String step) throws Exception;
Map<String,String> getFilePathsByItemBo(String itemBo) throws Exception;
}

@ -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<String, String> getFilePaths(String sfc) throws IOException {
public Map<String, String> 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<String,String> 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;
}
}

@ -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

@ -36,7 +36,7 @@ spring:
date-format: yyyy-MM-dd HH:mm:ss
profiles:
# active: prd
# active: qas
# active: qas
active: local
# active: dev
# 文件上传

@ -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<SfcDispatch> {
* @param paramMap
* @return
*/
List<SfcDispatchDto> findSfcDispatchList(Map paramMap);
List<SfcDispatchDto> findSfcDispatchList(Map paramMap) throws IOException;
/**
*
@ -108,7 +109,7 @@ public interface SfcDispatchService extends IService<SfcDispatch> {
* @param paramMap
* @return
*/
Map<String, Object> ganttList(String site, Map paramMap);
Map<String, Object> ganttList(String site, Map paramMap) throws IOException;
}

@ -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<SfcDispatchMapper, SfcDi
private ProductionCalendarService productionCalendarService;
@Autowired
private SfcDispatchEmployeeService sfcDispatchEmployeeService;
@Autowired
private CappFtpClient cappFtpClient;
@Override
public List<SfcDispatch> findSfcDispatch(String site, String sfc, String operation, String stepId) {
@ -94,24 +95,11 @@ public class SfcDispatchServiceImpl extends ServiceImpl<SfcDispatchMapper, SfcDi
}
@Override
public List<SfcDispatchDto> findSfcDispatchList(Map paramMap) {
public List<SfcDispatchDto> findSfcDispatchList(Map paramMap) throws IOException {
List<SfcDispatchDto> list = sfcDispatchMapper.findSfcDispatchList(paramMap);
if (list == null || list.size() <= 0) {
// List<SfcDispatchDto> 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<SfcDispatchMapper, SfcDi
}
}
}
//赋值用户组
for (SfcDispatchDto sfcDispatch: list) {
sfcDispatch.setRole(role);
GetDrawingVersionUtil getDrawingVersionUtil=new GetDrawingVersionUtil();
//登录Capp的FTP文件服务器
FTPClient connect = null;
try {
connect = cappFtpClient.login();
for (SfcDispatchDto sfcDispatch : list) {
if (sfcDispatch.getDrawingsRevision()==null||sfcDispatch.getDrawingsRevision()==""){
Sfc sfcServiceById = sfcService.getById(HandleEnum.SFC.getHandle(CommonMethods.getSite(), sfcDispatch.getSfc()));
String itemBo = sfcServiceById.getItemBo();
sfcDispatch.setDrawingsRevision(getDrawingVersionUtil.GetDrawingVerson(itemBo, connect));
sfcDispatch.setRole(role);
}
}
}catch (Exception e){
ExceptionUtil.throwException(e);
}finally {
if (connect!=null&&connect.isConnected()){
connect.logout();
connect.disconnect();
}
}
return list;
}
@ -216,7 +220,6 @@ public class SfcDispatchServiceImpl extends ServiceImpl<SfcDispatchMapper, SfcDi
if (!DispatchStatusEnum.NEW.getCode().equals(status) && !DispatchStatusEnum.RELEASE.getCode().equals(status)) {
throw BusinessException.build("工单[" + shopOrder + "]的派工单[" + dispatchNo + "]派工状态不是新建或发布状态,不能变更为暂挂!");
}
sfcDispatch = new SfcDispatch();
sfcDispatch.setHandle(sfcDispatchDto.getHandle());
sfcDispatch.setDispatchStatus(DispatchStatusEnum.PAUSE.getCode());
@ -250,10 +253,10 @@ public class SfcDispatchServiceImpl extends ServiceImpl<SfcDispatchMapper, SfcDi
}
//校验派工单领料状态为无需叫料或未叫料
List<CallItem> callItemList = callItemService.getEffectedCallItemByDispatchBo(sfcDispatchBo);
if (callItemList != null && callItemList.size() > 0) {
throw BusinessException.build("工单[" + shopOrder + "]的派工单[" + dispatchNo + "]已有发料,不能取消!");
}
// List<CallItem> 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<SfcDispatchMapper, SfcDi
}
@Override
public Map<String, Object> ganttList(String site, Map paramMap) {
public Map<String, Object> ganttList(String site, Map paramMap) throws IOException {
Map<String, Object> map = new HashMap<>();
//查询派工数据
@ -637,6 +640,7 @@ public class SfcDispatchServiceImpl extends ServiceImpl<SfcDispatchMapper, SfcDi
sfcDispatch.setEmployee(employees);
sfcDispatch.setEmployeeDescription(sfcDispatchDto.getEmployeeDescription());
sfcDispatch.setRemark(sfcDispatchDto.getRemark());
sfcDispatch.setDrawingsRevision(sfcDispatchDto.getDrawingsRevision());
sfcDispatch.setBlankingSize(sfcDispatchDto.getBlankingSize());
sfcDispatch.setPlannedStartDate(sfcDispatchDto.getPlannedStartDate());
sfcDispatch.setPlannedCompDate(sfcDispatchDto.getPlannedCompDate());
@ -907,6 +911,4 @@ public class SfcDispatchServiceImpl extends ServiceImpl<SfcDispatchMapper, SfcDi
}
return result;
}
}

@ -679,7 +679,7 @@
WHEN WIP.DISPATCH_STATUS = 'PAUSE' THEN N'暂停' WHEN WIP.DISPATCH_STATUS = 'RELEASE' THEN N'发布'
END AS STATUS_NAME, 'ADMINISTRATOR' AS ROLE
FROM (
SELECT SD.HANDLE, SD.SITE, SD.SHOP_ORDER, SD.DISPATCH_NO, SD.ROUTER_BO, C2.VALUE ITEM_NUMBER, C1.VALUE WORK_ORDER, IM.HANDLE ITEM_BO, IM.ITEM, IT.DESCRIPTION ITEM_DESCRIPTION, SD.SFC, SD.DISPATCH_STATUS,
SELECT SD.HANDLE, SD.SITE, SD.SHOP_ORDER, SD.DISPATCH_NO, SD.ROUTER_BO, C2.VALUE ITEM_NUMBER, C1.VALUE WORK_ORDER, IM.HANDLE ITEM_BO, IM.ITEM, IT.DESCRIPTION ITEM_DESCRIPTION, SD.SFC, SD.DISPATCH_STATUS,SD.DRAWINGS_REVISION,
SD.STEP_ID, SD.OPERATION, OT.DESCRIPTION OPERATION_DESCRIPTION, SD.RESOURCE_TYPE, SD.RESRCE, SD.EMPLOYEE, SD.EMPLOYEE USER_NAME, SD.DISPATCH_QTY, SD.PROD_HOURS, RS.DESCRIPTION RESOURCE_DESCRIPTION,
CASE WHEN SD.DISPATCH_STATUS = 'COMPLETE' THEN SD.DISPATCH_QTY ELSE 0 END COMPLETED_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.DISPATCH_SEQ-1 BEFORE_SEQ, SD.DISPATCH_SEQ+1 AFTER_SEQ, SD.EARLIEST_START_DATE, SD.LATEST_END_DATE,
@ -777,7 +777,7 @@
<if test="completeToDate != null">
AND SD.PLANNED_COMP_DATE &lt;= TO_DATE(#{completeToDate}|| '23:59:59', 'YYYY-MM-DD HH24:MI:SS')
</if>
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,

@ -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));
}

@ -137,6 +137,17 @@ public class ShopOrder extends Model<ShopOrder> {
@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;

@ -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;
/**
* <p>
*
* </p>
*
* @author Leon.L
* @since 2021-06-02
*/
public interface SfcDispatchDrawingService extends IService<SfcDispatchDrawing> {
/**
*
*
* @param site
* @param sfc
* @param operation
* @param stepId
* @return
*/
SfcDispatchDrawing findSfcDispatch(String site, String sfc, String operation, String stepId);
}

@ -36,7 +36,7 @@ public interface ShopOrderService extends IService<ShopOrder> {
ShopOrderDto findByShopOrderBo(String handle);
List<ShopOrder> findAbnormalShopOrder(ShopOrder shopOrder);
List<ShopOrder> findAbnormalShopOrder(String type,ShopOrder shopOrder);
}

@ -65,9 +65,10 @@ public class ShopOrderServiceImpl extends ServiceImpl<ShopOrderMapper, ShopOrder
}
@Override
public List<ShopOrder> findAbnormalShopOrder(ShopOrder shopOrder) {
public List<ShopOrder> findAbnormalShopOrder(String type,ShopOrder shopOrder) {
String site = CommonMethods.getSite();
shopOrder.setSite(site);
shopOrder.setType(type);
return shopOrderMapper.findAbnormalShopOrder(shopOrder);
}

@ -1041,6 +1041,9 @@
INNER JOIN ITEM i ON i.HANDLE = so.PLANNED_ITEM_BO
<where>
so.SITE = #{site}
<if test="type!=null and type!=''">
AND zab.TYPE = #{type}
</if>
</where>
</select>
</mapper>

@ -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<Map<String, Object>> substepList = sfcCrossMapper.querySfcStep(site, sfc, operationBySfcBo.getOperation());
List<Map<String, Object>> 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<InspectionItemDetail> inspectionItemDetails = inspectionItemService.selectQualityInspection(sfc, operation, stepId, Constants.INSPECTION_TYPE_Z);
if (inspectionItemDetails.size() > 0 && inspectionItemDetails.get(0) != null) {

@ -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'

Loading…
Cancel
Save