图纸版本号获取修改,是否修改总计划完成时间,Type字段问题。

master
yangwl 3 years ago
parent 1af84f6800
commit 7c9f2b4733

@ -7,6 +7,7 @@ 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.apache.poi.ss.usermodel.Workbook;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -16,9 +17,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.*;
/**
*
@ -128,4 +127,5 @@ public class FileController {
}
return R.ok(null,"获取CAPP文件成功!");
}
}

@ -15,6 +15,8 @@ import java.util.Date;
*/
public class SfcDispatchDto implements Serializable{
/**
*
*/
@ -144,6 +146,20 @@ public class SfcDispatchDto implements Serializable{
*
*/
private String isFirstOperation;
/**
*
*/
@ExcelColumn("是否修改总计划完成时间")
private String isUpdateZJHComplete;
public String getIsUpdateZJHComplete() {
return isUpdateZJHComplete;
}
public void setIsUpdateZJHComplete(String isUpdateZJHComplete) {
this.isUpdateZJHComplete = isUpdateZJHComplete;
}
/**
* &
*/

@ -19,9 +19,8 @@ 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;
import java.util.*;
import java.util.regex.Pattern;
@Service
public class FileServiceImpl implements FileService {
@ -46,24 +45,32 @@ public class FileServiceImpl implements FileService {
String itemBo = sfcServiceById.getItemBo();
String path="/"+ StringUtil.trimHandle(itemBo)+"_"+sfcDispatchDrawing.getDrawingsRevision()+"/";
FTPClient connect = null;
List<Integer> list=new ArrayList<Integer>();
Map<String,String> pathMap = new HashMap<>();
try {
connect = cappFtpClient.login();
connect.changeWorkingDirectory(path);
boolean flag=connect.changeWorkingDirectory(path);
connect.enterLocalPassiveMode();
FTPFile[] files = connect.listFiles();
if(files!=null){
if(files!=null&&flag){
for (FTPFile ftpFile:files){
if (ftpFile.getName().equals(path.substring(1,path.length()-1))&&ftpFile.isFile()){
String tmp=ftpFile.getName().substring(ftpFile.getName().lastIndexOf("_")+1,ftpFile.getName().lastIndexOf("_")+2);
Pattern pattern = Pattern.compile("^[-\\+]?[\\d]*$");
if (pattern.matcher(tmp).matches()){
list.add(Integer.parseInt(tmp));
}
if (ftpFile.getName().equals(path.substring(1,path.length()-1)+".pdf")&&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);
// }
// }
int max = (int) Collections.max(list);
for (FTPFile ftpFile:files){
if (ftpFile.getName().substring(ftpFile.getName().lastIndexOf("_")+1,ftpFile.getName().lastIndexOf("_")+2).equals(String.valueOf(max))&&ftpFile.isFile()){
pathMap.put(ftpFile.getName(),path+ftpFile.getName());
}
}
}else {
throw new BaseException("未找到当前工序的图纸版本号和工艺卡片相应信息,请联系计划部门确认");
}
connect.disconnect();
}catch (Exception e){
@ -74,7 +81,9 @@ public class FileServiceImpl implements FileService {
connect.disconnect();
}
}
if (pathMap==null){
throw new BaseException("未找到当前工序的图纸版本号和工艺卡片相应信息,请联系计划部门确认");
}
return pathMap;
}

@ -181,11 +181,19 @@ public class SfcDispatch extends Model<SfcDispatch> {
*/
@TableField("IS_DISPATCH")
private String isDispatch;
/**
/**
*
*/
@TableField("IS_IMPORT")
private String isImport;
/**
*
*/
@TableField("IS_UPDATE_ZJH_COMPLETE")
private String isUpdateZJHComplete;
/**
*
*/
@ -237,6 +245,13 @@ public class SfcDispatch extends Model<SfcDispatch> {
@TableField("OTHER_5")
private String other5;
public String getIsUpdateZJHComplete() {
return isUpdateZJHComplete;
}
public void setIsUpdateZJHComplete(String isUpdateZJHComplete) {
this.isUpdateZJHComplete = isUpdateZJHComplete;
}
public String getHandle() {
return handle;

@ -124,26 +124,29 @@ public class SfcDispatchServiceImpl extends ServiceImpl<SfcDispatchMapper, SfcDi
}
}
}
GetDrawingVersionUtil getDrawingVersionUtil=new GetDrawingVersionUtil();
// 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();
}
// 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();
// }
// }
for (SfcDispatchDto sfcDispatch: list) {
sfcDispatch.setRole(role);
}
return list;
}
@ -446,6 +449,7 @@ public class SfcDispatchServiceImpl extends ServiceImpl<SfcDispatchMapper, SfcDi
//是否导入
sfcDispatch.setIsImport(Constants.BOOL_TRUE);
//导入的是人员名称-查找人员编号,设备
String employee = "";
String employeeDescription = sfcDispatchDto.getEmployeeDescription();
@ -485,7 +489,7 @@ public class SfcDispatchServiceImpl extends ServiceImpl<SfcDispatchMapper, SfcDi
sfcDispatch.setEarliestStartDate(sfcDispatchDto.getEarliestStartDate());
sfcDispatch.setLatestEndDate(sfcDispatchDto.getLatestEndDate());
sfcDispatch.setOther2(sfcDispatchDto.getOther2());
sfcDispatch.setIsUpdateZJHComplete(sfcDispatchDto.getIsUpdateZJHComplete());
list.add(sfcDispatch);
@ -647,7 +651,7 @@ public class SfcDispatchServiceImpl extends ServiceImpl<SfcDispatchMapper, SfcDi
sfcDispatch.setEarliestStartDate(sfcDispatchDto.getEarliestStartDate());
sfcDispatch.setLatestEndDate(sfcDispatchDto.getLatestEndDate());
sfcDispatch.setOther2(sfcDispatchDto.getOther2());
sfcDispatch.setIsUpdateZJHComplete(sfcDispatchDto.getIsUpdateZJHComplete());
//是否分配资源
if (StringUtil.notBlank(resource)) {
sfcDispatch.setIsDispatch("true");

@ -35,6 +35,7 @@
<result column="RELEASED_COMPLETE_DATE" property="releasedCompleteDate" />
<result column="ACTUAL_START_DATE" property="actualStartDate" />
<result column="ACTUAL_COMPLETE_DATE" property="actualCompleteDate" />
<result column="IS_UPDATE_ZJH_COMPLETE" property="isUpdateZJHComplete" />
<result column="IS_DISPATCH" property="isDispatch" />
<result column="IS_IMPORT" property="isImport" />
<result column="REMARK" property="remark" />
@ -78,7 +79,7 @@
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
HANDLE, SITE, SHOP_ORDER, SFC, BLANKING_SIZE, DISPATCH_SEQ, DISPATCH_NO, DISPATCH_STATUS, DRAWINGS_NO, DRAWINGS_REVISION, IS_LOCK, ROUTER_BO, STEP_ID, OPERATION, RESOURCE_TYPE, WORK_CENTER, RESRCE, EMPLOYEE, EMPLOYEE_DESCRIPTION, TURN_OPERATION, DISPATCH_QTY, PROD_HOURS, PLANNED_START_DATE, PLANNED_COMP_DATE, EARLIEST_START_DATE, LATEST_END_DATE, SO_RELEASED_DATE, SFC_RELEASED_DATE, RELEASED_COMPLETE_DATE, ACTUAL_START_DATE, ACTUAL_COMPLETE_DATE, IS_DISPATCH, IS_IMPORT, REMARK, PREPOSITION_STEP_ID, PREPOSITION_OPERATION, IS_FIRST_OPERATION, CREATE_USER, CREATED_DATE_TIME, MODIFY_USER, MODIFIED_DATE_TIME, OTHER_1, OTHER_2, OTHER_3, OTHER_4, OTHER_5
HANDLE, SITE, SHOP_ORDER, SFC, BLANKING_SIZE, DISPATCH_SEQ, DISPATCH_NO, DISPATCH_STATUS, DRAWINGS_NO, DRAWINGS_REVISION, IS_LOCK, ROUTER_BO, STEP_ID, OPERATION, RESOURCE_TYPE, WORK_CENTER, RESRCE, EMPLOYEE, EMPLOYEE_DESCRIPTION, TURN_OPERATION, DISPATCH_QTY, PROD_HOURS, PLANNED_START_DATE, PLANNED_COMP_DATE, EARLIEST_START_DATE, LATEST_END_DATE, SO_RELEASED_DATE, SFC_RELEASED_DATE, RELEASED_COMPLETE_DATE, ACTUAL_START_DATE, ACTUAL_COMPLETE_DATE,IS_UPDATE_ZJH_COMPLETE, IS_DISPATCH, IS_IMPORT, REMARK, PREPOSITION_STEP_ID, PREPOSITION_OPERATION, IS_FIRST_OPERATION, CREATE_USER, CREATED_DATE_TIME, MODIFY_USER, MODIFIED_DATE_TIME, OTHER_1, OTHER_2, OTHER_3, OTHER_4, OTHER_5
</sql>
<!-- BaseMapper标准查询/修改/删除 -->
@ -219,6 +220,7 @@
<if test="drawingsNo!=null">DRAWINGS_NO,</if>
<if test="drawingsRevision!=null">DRAWINGS_REVISION,</if>
<if test="isLock!=null">IS_LOCK,</if>
<if test="isUpdateZJHComplete!=null">IS_UPDATE_ZJH_COMPLETE,</if>
<if test="routerBo!=null">ROUTER_BO,</if>
<if test="stepId!=null">STEP_ID,</if>
<if test="operation!=null">OPERATION,</if>
@ -287,6 +289,7 @@
<if test="releasedCompleteDate!=null">#{releasedCompleteDate},</if>
<if test="actualStartDate!=null">#{actualStartDate},</if>
<if test="actualCompleteDate!=null">#{actualCompleteDate},</if>
<if test="isUpdateZJHComplete!=null">#{isUpdateZJHComplete},</if>
<if test="isDispatch!=null">#{isDispatch},</if>
<if test="isImport!=null">#{isImport},</if>
<if test="remark!=null">#{remark},</if>
@ -342,6 +345,7 @@
#{releasedCompleteDate},
#{actualStartDate},
#{actualCompleteDate},
#{isUpdateZJHComplete},
#{isDispatch},
#{isImport},
#{remark},
@ -393,6 +397,7 @@
<if test="et.releasedCompleteDate!=null">RELEASED_COMPLETE_DATE=#{et.releasedCompleteDate},</if>
<if test="et.actualStartDate!=null">ACTUAL_START_DATE=#{et.actualStartDate},</if>
<if test="et.actualCompleteDate!=null">ACTUAL_COMPLETE_DATE=#{et.actualCompleteDate},</if>
<if test="et.isUpdateZJHComplete!=null">IS_UPDATE_ZJH_COMPLETE=#{et.isUpdateZJHComplete},</if>
<if test="et.isDispatch!=null">IS_DISPATCH=#{et.isDispatch},</if>
<if test="et.isImport!=null">IS_IMPORT=#{et.isImport},</if>
<if test="et.remark!=null">REMARK=#{et.remark},</if>
@ -444,6 +449,7 @@
RELEASED_COMPLETE_DATE=#{et.releasedCompleteDate},
ACTUAL_START_DATE=#{et.actualStartDate},
ACTUAL_COMPLETE_DATE=#{et.actualCompleteDate},
IS_UPDATE_ZJH_COMPLETE=#{et.isUpdateZJHComplete},
IS_DISPATCH=#{et.isDispatch},
IS_IMPORT=#{et.isImport},
REMARK=#{et.remark},
@ -495,6 +501,7 @@
<if test="et.releasedCompleteDate!=null">RELEASED_COMPLETE_DATE=#{et.releasedCompleteDate},</if>
<if test="et.actualStartDate!=null">ACTUAL_START_DATE=#{et.actualStartDate},</if>
<if test="et.actualCompleteDate!=null">ACTUAL_COMPLETE_DATE=#{et.actualCompleteDate},</if>
<if test="et.isUpdateZJHComplete!=null">IS_UPDATE_ZJH_COMPLETE=#{et.isUpdateZJHComplete},</if>
<if test="et.isDispatch!=null">IS_DISPATCH=#{et.isDispatch},</if>
<if test="et.isImport!=null">IS_IMPORT=#{et.isImport},</if>
<if test="et.remark!=null">REMARK=#{et.remark},</if>
@ -545,6 +552,7 @@
<if test="ew.entity.releasedCompleteDate!=null"> AND RELEASED_COMPLETE_DATE=#{ew.entity.releasedCompleteDate}</if>
<if test="ew.entity.actualStartDate!=null"> AND ACTUAL_START_DATE=#{ew.entity.actualStartDate}</if>
<if test="ew.entity.actualCompleteDate!=null"> AND ACTUAL_COMPLETE_DATE=#{ew.entity.actualCompleteDate}</if>
<if test="ew.isUpdateZJHComplete!=null">AND IS_UPDATE_ZJH_COMPLETE=#{ew.isUpdateZJHComplete},</if>
<if test="ew.entity.isDispatch!=null"> AND IS_DISPATCH=#{ew.entity.isDispatch}</if>
<if test="ew.entity.isImport!=null"> AND IS_IMPORT=#{ew.entity.isImport}</if>
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
@ -683,7 +691,7 @@
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,
CASE WHEN CC.VALUE = '9' THEN N'是' ELSE N'否' END IS_MAJOR, CASE WHEN SD.TURN_OPERATION = 'true' THEN N'是' ELSE N'否' END TURN_OPERATION, SD.BLANKING_SIZE, MAX(BC.COMPONENT_GBO) COMPONENT_BO,
CASE WHEN CC.VALUE = '9' THEN N'是' ELSE N'否' END IS_MAJOR, CASE WHEN SD.TURN_OPERATION = 'true' THEN N'是' ELSE N'否' END TURN_OPERATION, SD.IS_UPDATE_ZJH_COMPLETE, SD.BLANKING_SIZE, MAX(BC.COMPONENT_GBO) COMPONENT_BO,
WR.WORK_CENTER RESOURCE_WORK_CENTER, MAX(CP.ITEM) COMPONENT, MAX(CT.DESCRIPTION) COMPONENT_DESCRIPTION, MAX(C3.VALUE) TEXTURE, MAX(C4.VALUE) MAT_SPEC ,SD.OTHER_2
FROM Z_SFC_DISPATCH SD
INNER JOIN SFC SC ON SC.SITE = SD.SITE AND SC.SFC = SD.SFC
@ -781,7 +789,7 @@
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,
CC.VALUE, SD.TURN_OPERATION, SD.BLANKING_SIZE, WR.WORK_CENTER ,SD.OTHER_2
CC.VALUE, SD.TURN_OPERATION,SD.IS_UPDATE_ZJH_COMPLETE, SD.BLANKING_SIZE, WR.WORK_CENTER ,SD.OTHER_2
) WIP
LEFT JOIN Z_SFC_DISPATCH V1 ON V1.SITE = WIP.SITE AND V1.SFC = WIP.SFC AND V1.ROUTER_BO = WIP.ROUTER_BO AND V1.DISPATCH_SEQ = WIP.BEFORE_SEQ
LEFT JOIN Z_SFC_DISPATCH V2 ON V2.SITE = WIP.SITE AND V2.SFC = WIP.SFC AND V2.ROUTER_BO = WIP.ROUTER_BO AND V2.DISPATCH_SEQ = WIP.AFTER_SEQ
@ -789,7 +797,7 @@
<if test="isCompleted != null and isCompleted != ''">
WHERE WIP.IS_COMPLETED = #{isCompleted}
</if>
ORDER BY WIP.SHOP_ORDER, WIP.SFC, TO_NUMBER(WIP.DISPATCH_SEQ)
ORDER BY WIP.SHOP_ORDER,WIP.SFC,WIP.STEP_ID,TO_NUMBER(WIP.DISPATCH_SEQ)
</select>
<update id="updateSfcDispatchStatus" >

@ -9,10 +9,7 @@ import com.foreverwin.modular.core.util.FrontPage;
import com.foreverwin.modular.core.util.R;
import com.sap.me.status.StatusBOHandle;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
/**
*
@ -92,11 +89,9 @@ public class ShopOrderController {
*
*/
@GetMapping("/findAbnormalShopOrder")
public R findAbnormalShopOrder(String type,ShopOrder shopOrder){
return R.ok(shopOrderService.findAbnormalShopOrder(type,shopOrder));
public R findAbnormalShopOrder(ShopOrder shopOrder){
return R.ok(shopOrderService.findAbnormalShopOrder(shopOrder));
}
}

@ -137,19 +137,18 @@ 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;
}
//异常类型,查询异常工单时传参
@TableField(exist = false)
private String type;
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getHandle() {
public String getHandle() {
return handle;
}

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

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

@ -704,6 +704,7 @@
<otherwise>
AND T.SFC like '%${globalQuery}%'
OR T.ITEM_BO LIKE '%${globalQuery}%'
OR T.SHOP_ORDER_BO LIKE '%${globalQuery}%'
</otherwise>
</choose>
</if>

@ -1035,7 +1035,7 @@
</select>
<select id="findAbnormalShopOrder" parameterType="com.foreverwin.mesnac.meapi.model.ShopOrder" resultMap="BaseResultMap">
SELECT so.SHOP_ORDER,i.ITEM PLANNED_ITEM_BO,so.QTY_TO_BUILD,so.PLANNED_START_DATE
SELECT DISTINCT(so.SHOP_ORDER),i.ITEM PLANNED_ITEM_BO,so.QTY_TO_BUILD,so.PLANNED_START_DATE
FROM SHOP_ORDER so
INNER JOIN Z_ABNORMAL_BILL zab ON zab.SHOP_ORDER = so.SHOP_ORDER
INNER JOIN ITEM i ON i.HANDLE = so.PLANNED_ITEM_BO

@ -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 ,SOD.EMPLOYEE_DESCRIPTION,
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,
@ -123,7 +123,7 @@
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,
GROUP BY SO.SHOP_ORDER, SO_CF.VALUE , I.ITEM, IT.DESCRIPTION ,SOD.WORK_CENTER,SO_CF2.VALUE,SOD.PROD_HOURS,SOD.EMPLOYEE_DESCRIPTION,
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 ,

Loading…
Cancel
Save