Merge remote-tracking branch 'origin/master'

master
赵嘉伟 3 years ago
commit c98141bb1a

@ -168,6 +168,8 @@ public class CallItem extends Model<CallItem> {
@TableField(exist = false)
private String resourceType;
@TableField(exist = false)
private String resourceDescription;
@TableField(exist = false)
private String blankingSize;
@TableField(exist = false)
private String operationDescription;
@ -484,6 +486,22 @@ public class CallItem extends Model<CallItem> {
this.resourceType = resourceType;
}
public String getWorkCenterDescription() {
return workCenterDescription;
}
public void setWorkCenterDescription(String workCenterDescription) {
this.workCenterDescription = workCenterDescription;
}
public String getResourceDescription() {
return resourceDescription;
}
public void setResourceDescription(String resourceDescription) {
this.resourceDescription = resourceDescription;
}
public String getBlankingSize() {
return blankingSize;
}

@ -397,8 +397,10 @@ public class SfcDispatchServiceImpl extends ServiceImpl<SfcDispatchMapper, SfcDi
}
//时间
sfcDispatchDto.setEarliestStartDate(sfcDispatchDto.getPlannedStartDate());
sfcDispatchDto.setLatestEndDate(sfcDispatchDto.getPlannedCompDate());
if (Constants.USER_GROUP_ZJH.equals(sfcDispatchDto.getRole())) {
sfcDispatchDto.setEarliestStartDate(sfcDispatchDto.getPlannedStartDate());
sfcDispatchDto.setLatestEndDate(sfcDispatchDto.getPlannedCompDate());
}
}
//派工导入

@ -41,6 +41,7 @@
<result column="DISPATCH_QTY" property="dispatchQty" />
<result column="RESOURCE_TYPE" property="resourceType" />
<result column="BLANKING_SIZE" property="blankingSize" />
<result column="RESOURCE_DESCRIPTION" property="resourceDescription" />
<result column="OPERATION_DESCRIPTION" property="operationDescription" />
<result column="PLANNED_START_DATE" property="plannedStartDate" />
<result column="REMARK" property="remark" />
@ -881,10 +882,11 @@
</select>
<select id="finsIssueItemListToResource" resultMap="FullResultMap">
SELECT VIP.SITE, VIP.WORK_ORDER, VIP.CALL_TYPE, VIP.ITEM_GROUP, VIP.ITEM_BO, VIP.ITEM, VIP.ITEM_DESCRIPTION, VIP.REQUIRED_QTY, VIP.BLANKING_SIZE, VIP.RESRCE, SIP.SOURCE_RESOURCE
SELECT VIP.SITE, VIP.WORK_ORDER, VIP.CALL_TYPE, VIP.ITEM_GROUP, VIP.ITEM_BO, VIP.ITEM, VIP.ITEM_DESCRIPTION, VIP.REQUIRED_QTY, VIP.BLANKING_SIZE, VIP.RESRCE, VIP.RESOURCE_DESCRIPTION, SIP.SOURCE_RESOURCE
FROM (
SELECT L.SITE, CF.VALUE WORK_ORDER, L.CALL_TYPE, IG.ITEM_GROUP, CP.HANDLE ITEM_BO, CP.ITEM, CT.DESCRIPTION ITEM_DESCRIPTION, SUM(L.REQUIRED_QTY)-SUM(NVL(L.ISSUE_QTY,0)) REQUIRED_QTY, W.BLANKING_SIZE, W.RESRCE
SELECT L.SITE, CF.VALUE WORK_ORDER, L.CALL_TYPE, IG.ITEM_GROUP, CP.HANDLE ITEM_BO, CP.ITEM, CT.DESCRIPTION ITEM_DESCRIPTION, SUM(L.REQUIRED_QTY)-SUM(NVL(L.ISSUE_QTY,0)) REQUIRED_QTY, W.BLANKING_SIZE, W.RESRCE, RS.DESCRIPTION RESOURCE_DESCRIPTION
FROM Z_CALL_ITEM L
INNER JOIN RESRCE RS ON L.SITE = RS.SITE AND L.RESRCE = RS.RESRCE
INNER JOIN Z_SFC_DISPATCH W ON L.SFC_DISPATCH_BO = W.HANDLE
INNER JOIN ITEM CP ON CP.HANDLE = L.COMPONENT_BO
LEFT JOIN ITEM_T CT ON CT.ITEM_BO = CP.HANDLE AND CT.LOCALE = 'zh'
@ -911,7 +913,7 @@
<if test="requiredToDT != null">
AND L.REQUIRED_DATE_TIME &lt;= #{requiredToDT}
</if>
GROUP BY L.SITE, CF.VALUE, L.CALL_TYPE, IG.ITEM_GROUP, CP.HANDLE, CP.ITEM, CT.DESCRIPTION, W.BLANKING_SIZE, W.RESRCE
GROUP BY L.SITE, CF.VALUE, L.CALL_TYPE, IG.ITEM_GROUP, CP.HANDLE, CP.ITEM, CT.DESCRIPTION, W.BLANKING_SIZE, W.RESRCE, RS.DESCRIPTION
) VIP
LEFT JOIN (
SELECT L.SITE, L.ITEM_BO, ZD.RESRCE SOURCE_RESOURCE

@ -681,7 +681,7 @@
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
INNER JOIN RESRCE RS ON SD.SITE = RS.SITE AND SD.RESRCE = RS.RESRCE
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'
@ -696,7 +696,7 @@
LEFT JOIN WORK_CENTER WR ON WR.HANDLE = WCM.WORK_CENTER_BO
WHERE SD.SITE = #{site}
<if test="workCenter != null and workCenter != ''">
AND SD.WORK_CENTER = #{workCenter}
AND SD.OPERATION LIKE #{workCenter}||'%'
</if>
<if test="dispatchStatus != null and dispatchStatus != ''">
AND SD.DISPATCH_STATUS = #{dispatchStatus}

@ -924,21 +924,29 @@
</select>
<!--根据维修任务HANDLE获取维修任务详细数据-->
<select id="findResourceRepairTaskByHandleAndSite" resultType="com.foreverwin.mesnac.equip.model.ResourceRepairTask">
SELECT RRT.*,R.DESCRIPTION AS RESOURCE_DESCRIPTION,R.RESRCE AS RESOURCE_NO,
NCT.DESCRIPTION AS NC_CODE_DESCRIPTION,
WCMA.WORK_CENTER_BO AS WORK_CENTER_BO,WCT.DESCRIPTION AS WORK_CENTER_DESCRIPTION
SELECT DISTINCT RRT.*,R.DESCRIPTION AS RESOURCE_DESCRIPTION,R.RESRCE AS RESOURCE_NO,
WCMA.WORK_CENTER_BO AS WORK_CENTER_BO,WCT.DESCRIPTION AS WORK_CENTER_DESCRIPTION
FROM
WIP.Z_RESOURCE_REPAIR_TASK RRT
LEFT JOIN WIP.RESRCE R ON R.RESRCE = RRT.RESOURCE_NO AND R.SITE = RRT.SITE
LEFT JOIN WIP.NC_CODE NC ON NC.NC_CODE = RRT.NC_CODE_NO AND NC.SITE = RRT.SITE
LEFT JOIN WIP.NC_CODE_T NCT ON NCT.NC_CODE_BO = NC.HANDLE
LEFT JOIN WIP.WORK_CENTER_MEMBER WCM ON WCM.WORK_CENTER_OR_RESOURCE_GBO = R.HANDLE
LEFT JOIN WIP.WORK_CENTER_MEMBER WCMA ON WCMA.WORK_CENTER_OR_RESOURCE_GBO = WCM.WORK_CENTER_BO
LEFT JOIN WIP.WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WCMA.WORK_CENTER_BO
INNER JOIN WIP.RESOURCE_TYPE_RESOURCE RTR ON RTR.RESOURCE_BO = R.HANDLE
WIP.Z_RESOURCE_REPAIR_TASK RRT
LEFT JOIN WIP.RESRCE R ON R.RESRCE = RRT.RESOURCE_NO AND R.SITE = RRT.SITE
LEFT JOIN WIP.WORK_CENTER_MEMBER WCM ON WCM.WORK_CENTER_OR_RESOURCE_GBO = R.HANDLE
LEFT JOIN WIP.WORK_CENTER_MEMBER WCMA ON WCMA.WORK_CENTER_OR_RESOURCE_GBO = WCM.WORK_CENTER_BO
LEFT JOIN WIP.WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WCMA.WORK_CENTER_BO
INNER JOIN WIP.RESOURCE_TYPE_RESOURCE RTR ON RTR.RESOURCE_BO = R.HANDLE
WHERE RRT.SITE = #{site} AND RRT.HANDLE = #{handle}
</select>
<!-- SELECT RRT.*,R.DESCRIPTION AS RESOURCE_DESCRIPTION,R.RESRCE AS RESOURCE_NO,
NCT.DESCRIPTION AS NC_CODE_DESCRIPTION,
WCMA.WORK_CENTER_BO AS WORK_CENTER_BO,WCT.DESCRIPTION AS WORK_CENTER_DESCRIPTION
FROM WIP.Z_RESOURCE_REPAIR_TASK RRT
LEFT JOIN WIP.RESRCE R ON R.RESRCE = RRT.RESOURCE_NO AND R.SITE = RRT.SITE
LEFT JOIN WIP.NC_CODE NC ON NC.NC_CODE = RRT.NC_CODE_NO AND NC.SITE = RRT.SITE
LEFT JOIN WIP.NC_CODE_T NCT ON NCT.NC_CODE_BO = NC.HANDLE
LEFT JOIN WIP.WORK_CENTER_MEMBER WCM ON WCM.WORK_CENTER_OR_RESOURCE_GBO = R.HANDLE
LEFT JOIN WIP.WORK_CENTER_MEMBER WCMA ON WCMA.WORK_CENTER_OR_RESOURCE_GBO = WCM.WORK_CENTER_BO
LEFT JOIN WIP.WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WCMA.WORK_CENTER_BO
INNER JOIN WIP.RESOURCE_TYPE_RESOURCE RTR ON RTR.RESOURCE_BO = R.HANDLE
WHERE RRT.SITE = #{site} AND RRT.HANDLE = #{handle}-->
<!--查询日志表中是否已有记录-->
<select id="selRepairTaskLogByHandle" resultType="java.lang.Integer">
SELECT COUNT(*) FROM WIP.Z_RESOURCE_REPAIR_TASK_LOG WHERE HANDLE = #{handle}

Loading…
Cancel
Save