叫料PDA新增——材质、规格字段

master
zpl 3 years ago
parent edcd7c3990
commit 62212348cb

@ -34,7 +34,7 @@ public interface CallItemMapper extends BaseMapper<CallItem> {
List<CallItem> findCallItemDetailList(CallItem callItem);
List<CallItem> findCallItemListPda(@Param("site") String site,@Param("local") String local,@Param("user") String user,@Param("callItem")CallItem callItem);
List<CallItem> findCallItemListPda(@Param("site") String site,@Param("locale") String locale,@Param("user") String user,@Param("callItem")CallItem callItem);
List<CallItem> findCallItemDetailListByDispatchBo(@Param("site") String site, @Param("list") List<String> list);

@ -197,6 +197,12 @@ public class CallItem extends Model<CallItem> {
private Date requireFromDate;
@TableField(exist = false)
private Date requireToDate;
/**规格**/
@TableField(exist = false)
private String spec;
/**材质**/
@TableField(exist = false)
private String texture;
public String getHandle() {
return handle;
@ -614,6 +620,22 @@ public class CallItem extends Model<CallItem> {
this.requireToDate = requireToDate;
}
public String getSpec() {
return spec;
}
public void setSpec(String spec) {
this.spec = spec;
}
public String getTexture() {
return texture;
}
public void setTexture(String texture) {
this.texture = texture;
}
public static final String HANDLE = "HANDLE";
public static final String SITE = "SITE";

@ -1074,8 +1074,9 @@
SELECT MML.* , ZSD.PLANNED_START_DATE FROM
( SELECT ZCI.SITE, CF.VALUE WORK_ORDER, ZCI.STATUS ,WC.WORK_CENTER, WCT.DESCRIPTION WORK_CENTER_DESCRIPTION,
ZCI.SHOP_ORDER , ZCI.RESRCE,
IM.ITEM, IT.DESCRIPTION ITEM_DESCRIPTION,ZCI.COMPONENT_BO ,
CP.ITEM COMPONENT, ITT.DESCRIPTION COMPONENT_DESCRIPTION, ZSD.BLANKING_SIZE,
IM.ITEM, IT.DESCRIPTION ITEM_DESCRIPTION,
ZCI.COMPONENT_BO , CP.ITEM COMPONENT, ITT.DESCRIPTION COMPONENT_DESCRIPTION,
CFA.VALUE SPEC, CFB.VALUE TEXTURE, ZSD.BLANKING_SIZE,
/*MIN(ZSD.PLANNED_START_DATE) ,
MIN(SO.PLANNED_START_DATE) , ZCI.CALL_TYPE,*/
SUM(ZCI.REQUIRED_QTY) REQUIRED_QTY
@ -1084,12 +1085,14 @@
INNER JOIN SHOP_ORDER SO ON SO.SHOP_ORDER = ZCI.SHOP_ORDER AND SO.SITE = ZCI.SITE
LEFT JOIN CUSTOM_FIELDS CF ON CF.HANDLE = SO.HANDLE AND CF."ATTRIBUTE" = 'WORK_ORDER'
INNER JOIN WORK_CENTER WC ON WC.WORK_CENTER = ZSD.WORK_CENTER AND WC.SITE = ZCI.SITE
INNER JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WC.HANDLE
INNER JOIN WORK_CENTER_T WCT ON WCT.WORK_CENTER_BO = WC.HANDLE AND WCT.LOCALE = #{locale}
INNER JOIN ITEM IM ON IM.HANDLE = SO.ITEM_BO
INNER JOIN ITEM_T IT ON IT.ITEM_BO = IM.HANDLE
INNER JOIN ITEM_T IT ON IT.ITEM_BO = IM.HANDLE AND IT.LOCALE = #{locale}
INNER JOIN ITEM CP ON CP.HANDLE = ZCI.COMPONENT_BO
INNER JOIN ITEM_T ITT ON ITT.ITEM_BO = CP.HANDLE
WHERE ZCI.SITE = #{site} AND WCT.LOCALE = #{local} AND IT.LOCALE = #{local} AND ITT.LOCALE = #{local}
INNER JOIN ITEM_T ITT ON ITT.ITEM_BO = CP.HANDLE AND ITT.LOCALE = #{locale}
LEFT JOIN CUSTOM_FIELDS CFA ON CFA.HANDLE = CP.HANDLE AND CFA."ATTRIBUTE" = 'MAT_SPEC'
LEFT JOIN CUSTOM_FIELDS CFB ON CFA.HANDLE = CP.HANDLE AND CFB."ATTRIBUTE" = 'TEXTTURE'
WHERE ZCI.SITE = #{site}
<if test="callItem.callType != null and callItem.callType != ''">
AND ZCI.CALL_TYPE = #{callItem.callType}
</if>
@ -1097,7 +1100,7 @@
AND ZSD.EMPLOYEE LIKE '%' ||#{user} || '%'
</if>
GROUP BY ZCI.SITE, CF.VALUE, ZCI.STATUS ,WC.WORK_CENTER, IM.ITEM, ZSD.BLANKING_SIZE, CP.ITEM, ZCI.RESRCE, ZCI.CALL_TYPE,ZCI.SHOP_ORDER ,ZCI.COMPONENT_BO ,
WCT.DESCRIPTION ,IT.DESCRIPTION , ITT.DESCRIPTION ) MML
WCT.DESCRIPTION ,IT.DESCRIPTION , ITT.DESCRIPTION ,CFA.VALUE , CFB.VALUE ) MML
LEFT JOIN
( SELECT MIN(ZSD.PLANNED_START_DATE) PLANNED_START_DATE,SHOP_ORDER FROM Z_SFC_DISPATCH zsd WHERE ZSD.SITE = #{site} GROUP BY ZSD.SHOP_ORDER) ZSD
ON ZSD.SHOP_ORDER = MML.SHOP_ORDER
@ -1108,20 +1111,28 @@
<if test="callItem.resrce != null and callItem.resrce != ''">
AND MML.RESRCE = #{callItem.resrce}
</if>
<if test="callItem.component != null and callItem.component != ''">
AND MML.COMPONENT = #{callItem.component}
<if test="callItem.componentDescription != null and callItem.componentDescription != ''">
AND MML.COMPONENT_DESCRIPTION LIKE '%'|| #{callItem.componentDescription} ||'%'
</if>
<if test="callItem.status != null and callItem.status != ''">
AND MML.STATUS = #{callItem.status}
</if>
<if test="callItem.spec != null and callItem.spec != ''">
AND MML.SPEC LIKE '%' || #{callItem.spec} || '%'
</if>
<if test="callItem.texture != null and callItem.texture != ''">
AND MML.TEXTURE LIKE '%' || #{callItem.texture} || '%'
</if>
<if test="callItem.startFromDate != null">
AND ZSD.PLANNED_START_DATE >= #{callItem.startFromDate}
</if>
<if test="callItem.startToDate != null">
AND ZSD.PLANNED_START_DATE &lt;= #{callItem.startToDate}
</if>
ORDER BY MML.SHOP_ORDER,MML.WORK_CENTER,MML.ITEM,MML.COMPONENT,MML.BLANKING_SIZE,ZSD.PLANNED_START_DATE
ORDER BY MML.COMPONENT_DESCRIPTION,MML.TEXTURE,MML.SPEC,MML.BLANKING_SIZE,ZSD.PLANNED_START_DATE
</select>
<!--ORDER BY MML.SHOP_ORDER,MML.WORK_CENTER,MML.ITEM,MML.COMPONENT,MML.BLANKING_SIZE,ZSD.PLANNED_START_DATE-->
<select id="findRefreshCallItemPda" resultMap="FullResultMap">
SELECT CI.HANDLE ,CI.SFC ,CI.COMPONENT_BO ,BC.QTY REQUIRED_QTY, CF.VALUE STEP_ID
FROM Z_CALL_ITEM CI

Loading…
Cancel
Save