Merge remote-tracking branch 'origin/master'

master
philip 3 years ago
commit 786c371f5d

@ -185,7 +185,7 @@
AND ZT.MODIFIED_DATE_TIME >= TO_DATE(#{startFromDate}, 'YYYY-MM-DD')
</if>
<if test="startToDate != null and startToDate != ''" >
AND ZT.MODIFIED_DATE_TIME &lt;= TO_DATE(#{startToDate}|| '23:55:59', 'YYYY-MM-DD HH24:MI:SS')
AND ZT.MODIFIED_DATE_TIME &lt;= TO_DATE(#{startToDate}|| '23:59:59', 'YYYY-MM-DD HH24:MI:SS')
</if>
</select>
</mapper>

@ -153,18 +153,18 @@ public class PrintLogServiceImpl extends ServiceImpl<PrintLogMapper, PrintLog> i
}
public void printServer(List<LabelPrintDto> list){
/*String post = HttpUtil.post(printServer, JSON.toJSONString(list), 60000);
*//**
String post = HttpUtil.post(printServer, JSON.toJSONString(list), 60000);
/**
* {"msg":"打印成功","code":0}
* {"msg":"打印失败","code":500}
* -printNameisPrint
*//*
*/
JSONObject jsonObject = JSONObject.parseObject(post);
Integer code = jsonObject.getInteger("code");
String msg = jsonObject.getString("msg");
if (code != 0){
throw BusinessException.build(msg);
}*/
}
}

@ -8,7 +8,7 @@ spring:
driver-class-name: com.sap.db.jdbc.Driver
jndi-name: jdbc/jts/wipPool
activemq:
enabled: false
enabled: true
brokerUrl: tcp://172.16.251.133:61616?wireFormat.maxInactivityDuration=0
password: admin
user: admin
@ -34,11 +34,12 @@ ws:
pwd: a123456
valid: N
#ftp
ftp:
host:
host: 172.16.251.165
port: 21
username:
password:
username: mesftp
password: mesnac1@3
#打印服务器配置
print:

@ -43,101 +43,20 @@ public class SfcDispatchController {
@Autowired
public SfcDispatchService sfcDispatchService;
/**
*
*
* @param workCenter
* @param dispatchStatus
* @param item
* @param workOrder
* @param shopOrder
* @param resrce
* @param resourceType
* @param operation
* @param sfc
* @param componentDescription
* @param turnOperation
* @param isDispatch
* @param startFromDate_S
* @param startToDate_S
* @param completeFromDate_S
* @param completeToDate_S
* @return
*/
@ResponseBody
@GetMapping("getSfcDispatch")
public R getSfcDispatch(String workCenter, String dispatchStatus, String item, String itemNumber, String workOrder, String shopOrder, String blankingSize,
String resrce, String resourceType, String operation, String operationDescription, String sfc, String component, String componentDescription, String turnOperation,
String isDispatch, String startFromDate_S, String startToDate_S, String completeFromDate_S, String completeToDate_S) {
List<SfcDispatchDto> list;
try {
SfcDispatchDto sfcDispatchDto = new SfcDispatchDto();
sfcDispatchDto.setSite(CommonMethods.getSite());
sfcDispatchDto.setUser(CommonMethods.getUser());
sfcDispatchDto.setWorkCenter(workCenter);
sfcDispatchDto.setDispatchStatus(dispatchStatus);
sfcDispatchDto.setItem(item);
sfcDispatchDto.setItemNumber(itemNumber);
sfcDispatchDto.setWorkOrder(workOrder);
sfcDispatchDto.setShopOrder(shopOrder);
sfcDispatchDto.setResrce(resrce);
sfcDispatchDto.setResourceType(resourceType);
sfcDispatchDto.setOperation(operation);
sfcDispatchDto.setSfc(sfc);
sfcDispatchDto.setBlankingSize(blankingSize);
sfcDispatchDto.setComponent(component);
sfcDispatchDto.setComponentDescription(componentDescription);
sfcDispatchDto.setTurnOperation(turnOperation);
sfcDispatchDto.setIsDispatch(isDispatch);
if (startFromDate_S != null) {
sfcDispatchDto.setStartFromDate(DateUtil.parse(startFromDate_S));
}
if (startToDate_S != null) {
sfcDispatchDto.setStartToDate(DateUtil.parse(startToDate_S));
}
if (completeFromDate_S != null) {
sfcDispatchDto.setCompleteFromDate(DateUtil.parse(completeFromDate_S));
}
if (completeToDate_S != null) {
sfcDispatchDto.setCompleteToDate(DateUtil.parse(completeToDate_S));
}
list = sfcDispatchService.findSfcDispatchList(sfcDispatchDto);
} catch (Exception e) {
return R.failed(e.getMessage());
}
return R.ok(list);
}
/**
*
*
* @param sfcDispatchDto
* @param paramMap
* @return
*/
@ResponseBody
@PostMapping("findSfcDispatch")
public R findSfcDispatch(@RequestBody SfcDispatchDto sfcDispatchDto) {
@GetMapping("findSfcDispatch")
public R findSfcDispatch(@RequestParam(required = false) Map paramMap) {
List<SfcDispatchDto> list;
try {
sfcDispatchDto.setSite(CommonMethods.getSite());
sfcDispatchDto.setUser(CommonMethods.getUser());
if (sfcDispatchDto.getStartFromDate_S() != null) {
sfcDispatchDto.setStartFromDate(DateUtil.parse(sfcDispatchDto.getStartFromDate_S()));
}
if (sfcDispatchDto.getStartToDate_S() != null) {
sfcDispatchDto.setStartToDate(DateUtil.parse(sfcDispatchDto.getStartToDate_S()));
}
if (sfcDispatchDto.getCompleteFromDate_S() != null) {
sfcDispatchDto.setCompleteFromDate(DateUtil.parse(sfcDispatchDto.getCompleteFromDate_S()));
}
if (sfcDispatchDto.getCompleteToDate_S() != null) {
sfcDispatchDto.setCompleteToDate(DateUtil.parse(sfcDispatchDto.getCompleteToDate_S()));
}
list = sfcDispatchService.findSfcDispatchList(sfcDispatchDto);
paramMap.put("site", CommonMethods.getSite());
list = sfcDispatchService.findSfcDispatchList(paramMap);
} catch (Exception e) {
return R.failed(e.getMessage());
}
@ -297,24 +216,16 @@ public class SfcDispatchController {
return R.ok(result);
}
@PostMapping("/gantt-list")
public R ganttList(@RequestBody SfcDispatchDto sfcDispatchDto) {
public R ganttList(@RequestParam(required = false) Map paramMap) {
Map<String, Object> result = new HashMap<>();
try {
String site = CommonMethods.getSite();
if (StringUtil.isBlank(sfcDispatchDto.getStartFromDate_S())) {
throw BusinessException.build("派工开始时间不能为空!");
}
if (StringUtil.isBlank(sfcDispatchDto.getStartToDate_S())) {
throw BusinessException.build("派工开始时间不能为空!");
}
sfcDispatchDto.setSite(site);
sfcDispatchDto.setDispatchStatus(DispatchStatusEnum.RELEASE.getCode());
sfcDispatchDto.setStartFromDate(DateUtil.parseDate(sfcDispatchDto.getStartFromDate_S()));
sfcDispatchDto.setStartToDate(DateUtil.parseDate(sfcDispatchDto.getStartToDate_S()));
result = sfcDispatchService.ganttList(site, sfcDispatchDto);
paramMap.put("site", site);
paramMap.put("", DispatchStatusEnum.RELEASE.getCode());
result = sfcDispatchService.ganttList(site, paramMap);
} catch (Exception e) {
return R.failed(e.getMessage());
}

@ -8,6 +8,7 @@ import org.springframework.stereotype.Repository;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
/**
* <p>
@ -25,10 +26,10 @@ public interface SfcDispatchMapper extends BaseMapper<SfcDispatch> {
/**
*
*
* @param sfcDispatchDto
* @param paramMap
* @return
*/
List<SfcDispatchDto> findSfcDispatchList(SfcDispatchDto sfcDispatchDto);
List<SfcDispatchDto> findSfcDispatchList(Map paramMap);
/**
*

@ -33,10 +33,10 @@ public interface SfcDispatchService extends IService<SfcDispatch> {
/**
*
*
* @param sfcDispatchDto
* @param paramMap
* @return
*/
List<SfcDispatchDto> findSfcDispatchList(SfcDispatchDto sfcDispatchDto);
List<SfcDispatchDto> findSfcDispatchList(Map paramMap);
/**
*
@ -105,10 +105,10 @@ public interface SfcDispatchService extends IService<SfcDispatch> {
*
*
* @param site
* @param sfcDispatchDto
* @param paramMap
* @return
*/
Map<String, Object> ganttList(String site, SfcDispatchDto sfcDispatchDto);
Map<String, Object> ganttList(String site, Map paramMap);
}

@ -88,8 +88,8 @@ public class SfcDispatchServiceImpl extends ServiceImpl<SfcDispatchMapper, SfcDi
}
@Override
public List<SfcDispatchDto> findSfcDispatchList(SfcDispatchDto sfcDispatchDto) {
List<SfcDispatchDto> list = sfcDispatchMapper.findSfcDispatchList(sfcDispatchDto);
public List<SfcDispatchDto> findSfcDispatchList(Map paramMap) {
List<SfcDispatchDto> list = sfcDispatchMapper.findSfcDispatchList(paramMap);
if (list == null || list.size() <= 0) {
return list;
}
@ -282,11 +282,11 @@ public class SfcDispatchServiceImpl extends ServiceImpl<SfcDispatchMapper, SfcDi
}
@Override
public Map<String, Object> ganttList(String site, SfcDispatchDto sfcDispatchDto) {
public Map<String, Object> ganttList(String site, Map paramMap) {
Map<String, Object> map = new HashMap<>();
//查询派工数据
List<SfcDispatchDto> scheduleList = this.findSfcDispatchList(sfcDispatchDto);
List<SfcDispatchDto> scheduleList = this.findSfcDispatchList(paramMap);
if (scheduleList == null || scheduleList.size() <= 0) {
return map;
}
@ -299,7 +299,9 @@ public class SfcDispatchServiceImpl extends ServiceImpl<SfcDispatchMapper, SfcDi
}
});
Map<String, Map<String, List<WorkCenterWorkTimeDTO>>> processedMap = this.processWorkCenterWorkTimes(site, workCenterList, sfcDispatchDto.getStartFromDate(), sfcDispatchDto.getStartToDate());
Date startFromDate = (Date) paramMap.get("startFromDate");
Date StartToDate = (Date) paramMap.get("StartToDate");
Map<String, Map<String, List<WorkCenterWorkTimeDTO>>> processedMap = this.processWorkCenterWorkTimes(site, workCenterList, startFromDate, StartToDate);
map.put("workCenterWorkTimes", processedMap);
return map;

@ -668,96 +668,102 @@
</select>
<select id="findSfcDispatchList" resultMap="FullResultMap">
SELECT WIP.*, V1.STEP_ID PREPOSITION_STEP_ID, V1.OPERATION PREPOSITION_OPERATION,
CASE WHEN WIP.DISPATCH_SEQ = 1 OR V1.DISPATCH_STATUS = 'COMPLETE' THEN N'是' ELSE N'否' END IS_COMPLETED,
CASE WHEN WIP.DISPATCH_STATUS = 'NEW' THEN N'新建' WHEN WIP.DISPATCH_STATUS = 'CANCEL' THEN N'取消'
WHEN WIP.DISPATCH_STATUS = 'PAUSE' THEN N'暂停' WHEN WIP.DISPATCH_STATUS = 'RELEASE' THEN N'发布'
END AS STATUS_NAME, 'ADMINISTRATOR' AS ROLE
SELECT WIP.*
FROM (
SELECT DISTINCT SD.HANDLE, SD.SITE, SD.SHOP_ORDER, SD.DISPATCH_NO, C2.VALUE ITEM_NUMBER, C1.VALUE WORK_ORDER, IM.HANDLE ITEM_BO, IM.ITEM, IT.DESCRIPTION ITEM_DESCRIPTION, SD.SFC, SD.DISPATCH_STATUS,
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 IM.LOT_SIZE = 1 THEN N'是' ELSE N'否' END IS_MAJOR, CASE WHEN SD.TURN_OPERATION = 'true' THEN N'是' ELSE N'否' END TURN_OPERATION, SD.BLANKING_SIZE,
WR.WORK_CENTER RESOURCE_WORK_CENTER
FROM Z_SFC_DISPATCH SD
LEFT JOIN RESRCE RS ON SD.SITE = RS.SITE AND SD.RESRCE = RS.RESRCE
INNER JOIN SHOP_ORDER SO ON SO.SITE = SD.SITE AND SO.SHOP_ORDER = SD.SHOP_ORDER
LEFT JOIN CUSTOM_FIELDS C1 ON C1.HANDLE = SO.HANDLE AND C1."ATTRIBUTE" = 'WORK_ORDER'
LEFT JOIN CUSTOM_FIELDS C2 ON C2.HANDLE = SO.HANDLE AND C2."ATTRIBUTE" = 'ITEM_NUMBER'
INNER JOIN ITEM IM ON IM.HANDLE = SO.ITEM_BO
LEFT JOIN ITEM_T IT ON IT.ITEM_BO = IM.HANDLE AND IT.LOCALE = 'zh'
INNER JOIN OPERATION O ON O.SITE = SD.SITE AND O.OPERATION = SD.OPERATION AND O.CURRENT_REVISION = 'true'
LEFT JOIN OPERATION_T OT ON OT.OPERATION_BO = O.HANDLE AND OT.LOCALE = 'zh'
INNER JOIN BOM_COMPONENT BC ON BC.BOM_BO = SO.BOM_BO
INNER JOIN ITEM CP ON CP.HANDLE = BC.COMPONENT_GBO
LEFT JOIN ITEM_T CPT ON CPT.ITEM_BO = CP.HANDLE AND CPT.LOCALE = 'zh'
LEFT JOIN WORK_CENTER_MEMBER WCM ON WCM.WORK_CENTER_OR_RESOURCE_GBO = 'ResourceBO:' || SD.SITE || ',' || SD.RESRCE
LEFT JOIN WORK_CENTER WR ON WR.HANDLE = WCM.WORK_CENTER_BO
WHERE SD.SITE = #{site}
<if test="workCenter != null and workCenter != ''">
AND SD.OPERATION LIKE #{workCenter}||'%'
</if>
<if test="dispatchStatus != null and dispatchStatus != ''">
AND SD.DISPATCH_STATUS = #{dispatchStatus}
</if>
<if test="item != null and item != ''">
AND IM.ITEM = #{item}
</if>
<if test="workOrder != null and workOrder != ''">
AND C1.VALUE LIKE '%' ||#{workOrder}|| '%'
</if>
<if test="itemNumber != null and itemNumber != ''">
AND C2.VALUE LIKE '%' ||#{itemNumber}|| '%'
</if>
<if test="shopOrder != null and shopOrder != ''">
AND SD.SHOP_ORDER = #{shopOrder}
</if>
<if test="resourceType != null and resourceType != ''">
AND SD.RESOURCE_TYPE = #{resourceType}
</if>
<if test="resrce != null and resrce != ''">
AND SD.RESRCE = #{resrce}
</if>
<if test="operation != null and operation != ''">
AND SD.OPERATION = #{operation}
</if>
<if test="operationDescription != null and operationDescription != ''">
AND OT.DESCRIPTION = #{operationDescription}
</if>
<if test="sfc != null and sfc != ''">
AND SD.SFC = #{sfc}
</if>
<if test="turnOperation != null and turnOperation != ''">
AND SD.TURN_OPERATION = #{turnOperation}
</if>
<if test="component != null and component != ''">
AND CP.ITEM = #{component}
</if>
<if test="componentDescription != null and componentDescription != ''">
AND CPT.DESCRIPTION LIKE '%' || #{componentDescription} || '%'
</if>
<if test="isDispatch != null and isDispatch != ''">
AND SD.IS_DISPATCH = #{isDispatch}
</if>
<if test="blankingSize != null and blankingSize != ''">
AND SD.BLANKING_SIZE LIKE '%'||#{blankingSize}||'%'
</if>
<if test="startFromDate != null">
AND SO.PLANNED_START_DATE >= #{startFromDate}
</if>
<if test="startToDate != null">
AND SO.PLANNED_START_DATE &lt;= #{startToDate}
</if>
<if test="completeFromDate != null">
AND SO.PLANNED_COMP_DATE >= #{completeFromDate}
</if>
<if test="completeToDate != null">
AND SO.PLANNED_COMP_DATE &lt;= #{completeToDate}
</if>
SELECT WIP.*, V1.STEP_ID PREPOSITION_STEP_ID, V1.OPERATION PREPOSITION_OPERATION,
CASE WHEN WIP.DISPATCH_SEQ = 1 OR V1.DISPATCH_STATUS = 'COMPLETE' THEN N'是' ELSE N'否' END IS_COMPLETED,
CASE WHEN WIP.DISPATCH_STATUS = 'NEW' THEN N'新建' WHEN WIP.DISPATCH_STATUS = 'CANCEL' THEN N'取消'
WHEN WIP.DISPATCH_STATUS = 'PAUSE' THEN N'暂停' WHEN WIP.DISPATCH_STATUS = 'RELEASE' THEN N'发布'
END AS STATUS_NAME, 'ADMINISTRATOR' AS ROLE
FROM (
SELECT DISTINCT SD.HANDLE, SD.SITE, SD.SHOP_ORDER, SD.DISPATCH_NO, C2.VALUE ITEM_NUMBER, C1.VALUE WORK_ORDER, IM.HANDLE ITEM_BO, IM.ITEM, IT.DESCRIPTION ITEM_DESCRIPTION, SD.SFC, SD.DISPATCH_STATUS,
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 IM.LOT_SIZE = 1 THEN N'是' ELSE N'否' END IS_MAJOR, CASE WHEN SD.TURN_OPERATION = 'true' THEN N'是' ELSE N'否' END TURN_OPERATION, SD.BLANKING_SIZE,
WR.WORK_CENTER RESOURCE_WORK_CENTER
FROM Z_SFC_DISPATCH SD
LEFT JOIN RESRCE RS ON SD.SITE = RS.SITE AND SD.RESRCE = RS.RESRCE
INNER JOIN SHOP_ORDER SO ON SO.SITE = SD.SITE AND SO.SHOP_ORDER = SD.SHOP_ORDER
LEFT JOIN CUSTOM_FIELDS C1 ON C1.HANDLE = SO.HANDLE AND C1."ATTRIBUTE" = 'WORK_ORDER'
LEFT JOIN CUSTOM_FIELDS C2 ON C2.HANDLE = SO.HANDLE AND C2."ATTRIBUTE" = 'ITEM_NUMBER'
INNER JOIN ITEM IM ON IM.HANDLE = SO.ITEM_BO
LEFT JOIN ITEM_T IT ON IT.ITEM_BO = IM.HANDLE AND IT.LOCALE = 'zh'
INNER JOIN OPERATION O ON O.SITE = SD.SITE AND O.OPERATION = SD.OPERATION AND O.CURRENT_REVISION = 'true'
LEFT JOIN OPERATION_T OT ON OT.OPERATION_BO = O.HANDLE AND OT.LOCALE = 'zh'
INNER JOIN BOM_COMPONENT BC ON BC.BOM_BO = SO.BOM_BO
INNER JOIN ITEM CP ON CP.HANDLE = BC.COMPONENT_GBO
LEFT JOIN ITEM_T CPT ON CPT.ITEM_BO = CP.HANDLE AND CPT.LOCALE = 'zh'
LEFT JOIN WORK_CENTER_MEMBER WCM ON WCM.WORK_CENTER_OR_RESOURCE_GBO = 'ResourceBO:' || SD.SITE || ',' || SD.RESRCE
LEFT JOIN WORK_CENTER WR ON WR.HANDLE = WCM.WORK_CENTER_BO
WHERE SD.SITE = #{site}
<if test="workCenter != null and workCenter != ''">
AND SD.OPERATION LIKE #{workCenter}||'%'
</if>
<if test="dispatchStatus != null and dispatchStatus != ''">
AND SD.DISPATCH_STATUS = #{dispatchStatus}
</if>
<if test="item != null and item != ''">
AND IM.ITEM = #{item}
</if>
<if test="workOrder != null and workOrder != ''">
AND C1.VALUE LIKE '%' ||#{workOrder}|| '%'
</if>
<if test="itemNumber != null and itemNumber != ''">
AND C2.VALUE LIKE '%' ||#{itemNumber}|| '%'
</if>
<if test="shopOrder != null and shopOrder != ''">
AND SD.SHOP_ORDER = #{shopOrder}
</if>
<if test="resourceType != null and resourceType != ''">
AND SD.RESOURCE_TYPE = #{resourceType}
</if>
<if test="resrce != null and resrce != ''">
AND SD.RESRCE = #{resrce}
</if>
<if test="operation != null and operation != ''">
AND SD.OPERATION = #{operation}
</if>
<if test="operationDescription != null and operationDescription != ''">
AND OT.DESCRIPTION = #{operationDescription}
</if>
<if test="sfc != null and sfc != ''">
AND SD.SFC = #{sfc}
</if>
<if test="turnOperation != null and turnOperation != ''">
AND SD.TURN_OPERATION = #{turnOperation}
</if>
<if test="component != null and component != ''">
AND CP.ITEM = #{component}
</if>
<if test="componentDescription != null and componentDescription != ''">
AND CPT.DESCRIPTION LIKE '%' || #{componentDescription} || '%'
</if>
<if test="isDispatch != null and isDispatch != ''">
AND SD.IS_DISPATCH = #{isDispatch}
</if>
<if test="blankingSize != null and blankingSize != ''">
AND SD.BLANKING_SIZE LIKE '%'||#{blankingSize}||'%'
</if>
<if test="startFromDate != null">
AND SO.PLANNED_START_DATE >= TO_DATE(#{startFromDate}, 'YYYY-MM-DD')
</if>
<if test="startToDate != null">
AND SO.PLANNED_START_DATE &lt;= TO_DATE(#{startToDate}|| '23:59:59', 'YYYY-MM-DD HH24:MI:SS')
</if>
<if test="completeFromDate != null">
AND SO.PLANNED_COMP_DATE >= TO_DATE(#{completeFromDate}, 'YYYY-MM-DD')
</if>
<if test="completeToDate != null">
AND SO.PLANNED_COMP_DATE &lt;= TO_DATE(#{completeToDate}|| '23:59:59', 'YYYY-MM-DD HH24:MI:SS')
</if>
) WIP
LEFT JOIN Z_SFC_DISPATCH V1 ON V1.SITE = WIP.SITE AND V1.SFC = WIP.SFC 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.DISPATCH_SEQ = WIP.AFTER_SEQ
) WIP
LEFT JOIN Z_SFC_DISPATCH V1 ON V1.SITE = WIP.SITE AND V1.SFC = WIP.SFC 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.DISPATCH_SEQ = WIP.AFTER_SEQ
<if test="isCompleted != null and isCompleted != ''">
WHERE WIP.IS_COMPLETED = #{isCompleted}
</if>
ORDER BY WIP.SHOP_ORDER, WIP.SFC, TO_NUMBER(WIP.DISPATCH_SEQ)
</select>

@ -212,6 +212,8 @@ public class InspectionTaskManageServiceImpl implements InspectionTaskManageServ
newInspectionTask.setStatus(Constants.INSPECTION_TASK_STATUS_NEW);
newInspectionTask.setResult(null);
newInspectionTask.setComments(null);
newInspectionTask.setCreatedDateTime(dateTime);
newInspectionTask.setModifiedDateTime(dateTime);
inspectionTaskService.save(newInspectionTask);
}
}

@ -39,14 +39,17 @@
<if test="workCenter != null and workCenter != ''">
AND B.WORK_CENTER = #{workCenter}
</if>
<choose>
<when test="category != null and category != ''">
AND B.CATEGORY = #{category}
</when>
<otherwise>
AND (B.CATEGORY = 'S' OR B.CATEGORY = 'P')
</otherwise>
</choose>
<choose>
<when test="category != null and category != ''">
AND B.CATEGORY = #{category}
</when>
<otherwise>
AND (B.CATEGORY = 'S' OR B.CATEGORY = 'P')
</otherwise>
</choose>
<if test="taskNo != null and taskNo != ''">
AND B.TASK_NO =#{taskNo}
</if>
<if test="status != null and status != ''">
AND B.STATUS = #{status}
</if>

Loading…
Cancel
Save