1.产品类别修改为手动必输项

2.异常状态,查询全部,产品类别根据异常填写的产品类别进行查询
master
赵嘉伟 4 years ago
parent ff4cffe3d6
commit 22b5ecf8ce

@ -14,8 +14,8 @@ import java.time.LocalDateTime;
*
* </p>
*
* @author zjw
* @since 2021-08-16
* @author Philip
* @since 2021-09-01
*/
@TableName("Z_ABNORMAL_BILL")
@ -224,6 +224,11 @@ public class AbnormalBill extends Model<AbnormalBill> {
*/
@TableField("MODIFIED_DATE_TIME")
private LocalDateTime modifiedDateTime;
/**
*
*/
@TableField("PRODUCT_CATEGORY")
private String productCategory;
@TableField(exist = false)
private String filePath;
@ -235,9 +240,6 @@ public class AbnormalBill extends Model<AbnormalBill> {
private String fileNum;
public String getHandle() {
return handle;
}
@ -558,6 +560,14 @@ public class AbnormalBill extends Model<AbnormalBill> {
this.modifiedDateTime = modifiedDateTime;
}
public String getProductCategory() {
return productCategory;
}
public void setProductCategory(String productCategory) {
this.productCategory = productCategory;
}
public String getFilePath() {
return filePath;
}
@ -582,7 +592,7 @@ public class AbnormalBill extends Model<AbnormalBill> {
this.fileNum = fileNum;
}
public static final String HANDLE = "HANDLE";
public static final String HANDLE = "HANDLE";
public static final String SITE = "SITE";
@ -663,54 +673,10 @@ public static final String MODIFIED_USER = "MODIFIED_USER";
public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME";
@Override
protected Serializable pkVal() {
return this.handle;
}
@Override
public String toString() {
return "AbnormalBill{" +
"handle = " + handle +
", site = " + site +
", abnormalNo = " + abnormalNo +
", status = " + status +
", correction = " + correction +
", program = " + program +
", type = " + type +
", itemBo = " + itemBo +
", sfc = " + sfc +
", operation = " + operation +
", workCenter = " + workCenter +
", shopOrder = " + shopOrder +
", messageType = " + messageType +
", resrce = " + resrce +
", ncCode = " + ncCode +
", shutDown = " + shutDown +
", responseUser = " + responseUser +
", responseDateTime = " + responseDateTime +
", pbDescription = " + pbDescription +
", ncQty = " + ncQty +
", pbGrade = " + pbGrade +
", pbUser = " + pbUser +
", pbQty = " + pbQty +
", repairDateTime = " + repairDateTime +
", discover = " + discover +
", inspector = " + inspector +
", entityLocation = " + entityLocation +
", reportFrom = " + reportFrom +
", objectBo = " + objectBo +
", pbPhotoshop = " + pbPhotoshop +
", cancelCode = " + cancelCode +
", cancelReason = " + cancelReason +
", cancelDateTime = " + cancelDateTime +
", cancelUser = " + cancelUser +
", reportSendUserGroup = " + reportSendUserGroup +
", cancelSendUserGroup = " + cancelSendUserGroup +
", createdUser = " + createdUser +
", createdDateTime = " + createdDateTime +
", modifiedUser = " + modifiedUser +
", modifiedDateTime = " + modifiedDateTime +
"}";
}
}

@ -1,10 +1,10 @@
package com.foreverwin.mesnac.anomaly.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.foreverwin.mesnac.anomaly.model.AbnormalBill;
import com.foreverwin.mesnac.anomaly.model.AbnormalBillDispose;
import com.foreverwin.mesnac.anomaly.model.AbnormalCause;
import com.baomidou.mybatisplus.extension.service.IService;
import com.foreverwin.modular.core.util.FrontPage;
import java.util.List;
@ -28,5 +28,5 @@ public interface AbnormalCauseService extends IService<AbnormalCause> {
List<AbnormalCause> selectList(AbnormalCause abnormalCause);
void insertByAbnormalBill(AbnormalBill abnormalBill, AbnormalBillDispose abnormalBillDispose,List<String> dutyCauseType);
void insertByAbnormalBill(AbnormalBill abnormalBill, AbnormalBillDispose abnormalBillDispose, List<String> dutyCauseType);
}

@ -39,5 +39,5 @@ public interface AbnormalPlanService extends IService<AbnormalPlan> {
void processes(List<AbnormalPlan> abnormalPlanList);
void sendMessage(AbnormalBill abnormalBill,AbnormalPlan abnormalPlan);
void sendMessage(AbnormalBill abnormalBill, AbnormalPlan abnormalPlan);
}

@ -332,6 +332,11 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
List<DataField> dutyTypeList = dataFieldListService.findDataFieldListById(dataField);
hashMap.put("dutyType",dutyTypeList);
//产品类别
dataField.setDataField("PRODUCT_CATEGORY");
List<DataField> productCategory = dataFieldListService.findDataFieldListById(dataField);
hashMap.put("productCategory",productCategory);
//当前登录用户的fullName
List<UsrDto> list = userService.findList(CommonMethods.getUser());

@ -51,7 +51,7 @@ public class AbnormalCauseServiceImpl extends ServiceImpl<AbnormalCauseMapper, A
}
@Override
public void insertByAbnormalBill(AbnormalBill abnormalBill, AbnormalBillDispose abnormalBillDispose,List<String> dutyCauseType) {
public void insertByAbnormalBill(AbnormalBill abnormalBill, AbnormalBillDispose abnormalBillDispose, List<String> dutyCauseType) {
String site = CommonMethods.getSite();
String user = CommonMethods.getUser();

@ -90,7 +90,7 @@ public class AnomalyJobServiceImpl implements AnomalyJobService {
abnormalMessage.setUpUser(null);
}
abnormalBill.setHandle(abnormalMessage.getMessageType());
abnormalBill.setHandle(abnormalMessage.getObjectBo());
String message = abnormalBillService.formatMessage(abnormalBill,abnormalMessage.getMessageType(),site);
abnormalMessage.setContent(message+"It's Job send");
@ -121,15 +121,17 @@ public class AnomalyJobServiceImpl implements AnomalyJobService {
StringBuilder sendUsers = new StringBuilder();
for (int i = 0; i < nwaUsers.size(); i++) {
if(i == (nwaUsers.size() - 1)){
sendUsers.append(nwaUsers.get(i));
sendUsers.append(nwaUsers.get(i).getUserName());
}else{
sendUsers.append(nwaUsers.get(i)).append("|");
sendUsers.append(nwaUsers.get(i).getUserName()).append("|");
}
}
activeMQUtil.wechatSendMessage(sendUsers.toString(),abnormalMessage.getContent());
// }
//保存升级的消息类型
messageService.saveOrUpdate(abnormalMessage);
// messageService.saveOrUpdate(_abnormalMessage);
//保存原先的消息类型让原先的消息类型的stauts改为Y
messageService.saveOrUpdate(_abnormalMessage);
}
}
}

@ -710,7 +710,7 @@
SELECT ZAB.ABNORMAL_NO ABNORMAL_NO ,ZAB.STATUS STATUS,I.ITEM ITEM,IT.DESCRIPTION ITEM_DESCRIPTION,
ZAB."TYPE" "TYPE" ,ZAB.SFC SFC,ZAB.MESSAGE_TYPE MESSAGE_TYPE,ZAB.SHOP_ORDER SHOP_ORDER,
ZAB.WORK_CENTER WORK_CENTER,ZAB.RESRCE RESRCE, WORKORDER.VALUE WORK_ORDER,ITEMNUMBER.VALUE ITEM_NUMBER,
PRODUCTCATEGORY.VALUE PRODUCT_CATEGORY,
ZAB.PRODUCT_CATEGORY PRODUCT_CATEGORY,
listagg(NG.DESCRIPTION || '/'||NCT.DESCRIPTION || ',') within GROUP(ORDER BY zab.ABNORMAL_NO) NC_CODE_DESCRIPTION,
ZAB.PB_DESCRIPTION PB_DESCRIPTION ,ZAB.NC_QTY NC_QTY,
ZAB.PB_GRADE PB_GRADE ,NWA.FULL_NAME PB_USER ,ZAB.PB_QTY PB_QTY ,ZAB.DISCOVER DISCOVER ,
@ -733,7 +733,6 @@
LEFT JOIN OPERATION_T OT ON O.HANDLE = OT.OPERATION_BO AND OT.LOCALE = #{locale}
LEFT JOIN CUSTOM_FIELDS WORKORDER ON WORKORDER.HANDLE = SO.HANDLE AND WORKORDER."ATTRIBUTE" = 'WORK_ORDER'
LEFT JOIN CUSTOM_FIELDS ITEMNUMBER ON ITEMNUMBER.HANDLE = SO.HANDLE AND ITEMNUMBER."ATTRIBUTE" = 'ITEM_NUMBER'
LEFT JOIN CUSTOM_FIELDS PRODUCTCATEGORY ON PRODUCTCATEGORY.HANDLE = SO.HANDLE AND PRODUCTCATEGORY."ATTRIBUTE" = 'PRODUCT_CATEGORY'
LEFT JOIN CUSTOM_FIELDS "MAP" ON "MAP".HANDLE = SO.HANDLE AND "MAP"."ATTRIBUTE" = 'MAP'
LEFT JOIN Z_ABNORMAL_NC_CODE ZANC ON ZAB.HANDLE = ZANC.ABNORMAL_BILL_BO
LEFT JOIN NC_CODE_T NCT ON ('NCCodeBO:' || ZAB.SITE || ',' || ZANC.NC_CODE) = NCT.NC_CODE_BO AND NCT.LOCALE = #{locale}
@ -750,13 +749,16 @@
<if test="abnormalBill.abnormalNo != null and abnormalBill.abnormalNo != ''">
AND ZAB.ABNORMAL_NO = #{abnormalBill.abnormalNo}
</if>
<if test="abnormalBill.handle != null and abnormalBill.handle != ''">
AND ZAB.HANDLE = #{abnormalBill.handle}
</if>
</if>
</where>
GROUP BY
ZAB.ABNORMAL_NO ,ZAB.STATUS ,I.ITEM ,IT.DESCRIPTION ,
ZAB."TYPE" ,ZAB.SFC ,ZAB.MESSAGE_TYPE ,ZAB.SHOP_ORDER ,
ZAB.WORK_CENTER ,ZAB.RESRCE , WORKORDER.VALUE ,ITEMNUMBER.VALUE ,
PRODUCTCATEGORY.VALUE, ZAB.PB_DESCRIPTION ,ZAB.NC_QTY ,
ZAB.PB_DESCRIPTION ,ZAB.NC_QTY ,ZAB.PRODUCT_CATEGORY,
ZAB.PB_GRADE ,NWA.FULL_NAME ,ZAB.PB_QTY ,ZAB.DISCOVER ,
NWA2.FULL_NAME ,ZAB.ENTITY_LOCATION ,ZAB.REPORT_FROM ,SUBSTR(ZAB.OBJECT_BO,INSTR(ZAB.OBJECT_BO,',')+1),
ZAB.PB_PHOTOSHOP ,ZABD.DUTY_CAUSE_DESCRIPTION ,ZABD.DUTY_CAUSE_TYPE ,ZABD.DUTY_DEPART ,

@ -44,10 +44,10 @@
<result column="CREATED_DATE_TIME" property="createdDateTime" />
<result column="MODIFIED_USER" property="modifiedUser" />
<result column="MODIFIED_DATE_TIME" property="modifiedDateTime" />
<result column="PRODUCT_CATEGORY" property="productCategory" />
</resultMap>
<resultMap id="abnormalBillDto" type="com.foreverwin.mesnac.anomaly.dto.AbnormalBillDto" extends="BaseResultMap">
<result column="SEQ" property="seq"/>
<result column="ITEM_DESCRIPTION" property="itemDescription"/>
@ -79,7 +79,7 @@
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
HANDLE, SITE, ABNORMAL_NO, STATUS, CORRECTION, PROGRAM, TYPE, ITEM_BO, SFC, OPERATION, WORK_CENTER, SHOP_ORDER, MESSAGE_TYPE, RESRCE, NC_CODE, SHUT_DOWN, RESPONSE_USER, RESPONSE_DATE_TIME, PB_DESCRIPTION, NC_QTY, PB_GRADE, PB_USER, PB_QTY, REPAIR_DATE_TIME, DISCOVER, INSPECTOR, ENTITY_LOCATION, REPORT_FROM, OBJECT_BO, PB_PHOTOSHOP, CANCEL_CODE, CANCEL_REASON, CANCEL_DATE_TIME, CANCEL_USER, REPORT_SEND_USER_GROUP, CANCEL_SEND_USER_GROUP, CREATED_USER, CREATED_DATE_TIME, MODIFIED_USER, MODIFIED_DATE_TIME
HANDLE, SITE, ABNORMAL_NO, STATUS, CORRECTION, PROGRAM, TYPE, ITEM_BO, SFC, OPERATION, WORK_CENTER, SHOP_ORDER, MESSAGE_TYPE, RESRCE, NC_CODE, SHUT_DOWN, RESPONSE_USER, RESPONSE_DATE_TIME, PB_DESCRIPTION, NC_QTY, PB_GRADE, PB_USER, PB_QTY, REPAIR_DATE_TIME, DISCOVER, INSPECTOR, ENTITY_LOCATION, REPORT_FROM, OBJECT_BO, PB_PHOTOSHOP, CANCEL_CODE, CANCEL_REASON, CANCEL_DATE_TIME, CANCEL_USER, REPORT_SEND_USER_GROUP, CANCEL_SEND_USER_GROUP, CREATED_USER, CREATED_DATE_TIME, MODIFIED_USER, MODIFIED_DATE_TIME, PRODUCT_CATEGORY
</sql>
<!-- BaseMapper标准查询/修改/删除 -->
@ -153,6 +153,7 @@
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.productCategory!=null"> AND PRODUCT_CATEGORY=#{ew.entity.productCategory}</if>
</where>
</select>
@ -203,6 +204,7 @@
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.productCategory!=null"> AND PRODUCT_CATEGORY=#{ew.entity.productCategory}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -261,6 +263,7 @@
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.productCategory!=null"> AND PRODUCT_CATEGORY=#{ew.entity.productCategory}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -319,6 +322,7 @@
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.productCategory!=null"> AND PRODUCT_CATEGORY=#{ew.entity.productCategory}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -377,6 +381,7 @@
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.productCategory!=null"> AND PRODUCT_CATEGORY=#{ew.entity.productCategory}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -435,6 +440,7 @@
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.productCategory!=null"> AND PRODUCT_CATEGORY=#{ew.entity.productCategory}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
AND ${ew.sqlSegment}
@ -493,6 +499,7 @@
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.productCategory!=null"> AND PRODUCT_CATEGORY=#{ew.entity.productCategory}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -547,6 +554,7 @@
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
<if test="modifiedUser!=null">MODIFIED_USER,</if>
<if test="modifiedDateTime!=null">MODIFIED_DATE_TIME,</if>
<if test="productCategory!=null">PRODUCT_CATEGORY,</if>
</trim> VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{handle},
@ -589,6 +597,7 @@
<if test="createdDateTime!=null">#{createdDateTime},</if>
<if test="modifiedUser!=null">#{modifiedUser},</if>
<if test="modifiedDateTime!=null">#{modifiedDateTime},</if>
<if test="productCategory!=null">#{productCategory},</if>
</trim>
</insert>
@ -638,6 +647,7 @@
#{createdDateTime},
#{modifiedUser},
#{modifiedDateTime},
#{productCategory},
</trim>
</insert>
@ -683,6 +693,7 @@
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
<if test="et.modifiedUser!=null">MODIFIED_USER=#{et.modifiedUser},</if>
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
<if test="et.productCategory!=null">PRODUCT_CATEGORY=#{et.productCategory},</if>
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
</update>
@ -728,6 +739,7 @@
CREATED_DATE_TIME=#{et.createdDateTime},
MODIFIED_USER=#{et.modifiedUser},
MODIFIED_DATE_TIME=#{et.modifiedDateTime},
PRODUCT_CATEGORY=#{et.productCategory},
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
</update>
@ -773,6 +785,7 @@
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
<if test="et.modifiedUser!=null">MODIFIED_USER=#{et.modifiedUser},</if>
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
<if test="et.productCategory!=null">PRODUCT_CATEGORY=#{et.productCategory},</if>
</trim>
<where>
<if test="ew!=null">
@ -817,6 +830,7 @@
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.productCategory!=null"> AND PRODUCT_CATEGORY=#{ew.entity.productCategory}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -892,6 +906,7 @@
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedUser!=null"> AND MODIFIED_USER=#{ew.entity.modifiedUser}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
<if test="ew.entity.productCategory!=null"> AND PRODUCT_CATEGORY=#{ew.entity.productCategory}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
@ -925,7 +940,6 @@
LEFT JOIN Z_NWA_USER ZNU ON ZNU.USER_NAME = ZAB.CREATED_USER AND ZNU.SITE = ZAB.SITE
LEFT JOIN SHOP_ORDER SO ON SO.SHOP_ORDER = ZAB.SHOP_ORDER AND SO.SITE = ZAB.SITE
LEFT JOIN CUSTOM_FIELDS CF ON CF.HANDLE = SO.HANDLE AND CF."ATTRIBUTE" = 'WORK_ORDER'
LEFT JOIN CUSTOM_FIELDS CF2 ON CF2.HANDLE = SO.HANDLE AND CF2."ATTRIBUTE" = 'PRODUCT_CATEGORY'
LEFT JOIN Z_ABNORMAL_NC_CODE ZANC ON ZANC.ABNORMAL_BILL_BO = ZAB.HANDLE
LEFT JOIN NC_CODE_T NCT ON NCT.NC_CODE_BO = 'NCCodeBO:'|| ZAB.SITE || ',' || ZANC.NC_CODE AND NCT.LOCALE = #{language}
<where>
@ -945,15 +959,12 @@
<if test="abnormalBill.status != null and abnormalBill.status != '' and abnormalBill.status != 'COMP'.toString()">
AND zab.STATUS = #{abnormalBill.status}
</if>
<if test="abnormalBill.status == 'J'.toString()">
AND zab.PROGRAM IS NULL
</if>
<if test="abnormalBill.status == 'F'.toString()">
AND zab.CORRECTION IS NULL
</if>
<if test="abnormalBill.status == 'COMP'.toString()">
AND zab.PROGRAM = 'true' AND zab.CORRECTION = 'true' AND zab.status != 'G'
</if>
<if test="abnormalBill.status == ''">
AND zab.STATUS != 'Q' AND zab.STATUS != 'G'
</if>
<if test="abnormalBill.startDateTime != null ">
AND zab.CREATED_DATE_TIME &gt;= #{abnormalBill.startDateTime}
</if>
@ -973,64 +984,65 @@
AND CF.VALUE LIKE '%${abnormalBill.workOrder}%'
</if>
<if test="abnormalBill.productionCategory != null and abnormalBill.productionCategory != ''">
AND CF2.VALUE LIKE '%${abnormalBill.productionCategory}'
AND zab.PRODUCT_CATEGORY LIKE '%${abnormalBill.productionCategory}'
</if>
<choose>
<when test="userGroupList != null and userGroupList.size != 0">
AND ZAB.REPORT_SEND_USER_GROUP IN
<foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">
UPPER(#{item.userGroup})
</foreach>
<!-- <choose>-->
<!-- <when test="userGroupList != null and userGroupList.size != 0">-->
<!-- AND ZAB.REPORT_SEND_USER_GROUP IN-->
<!-- <foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">-->
<!-- UPPER(#{item.userGroup})-->
<!-- </foreach>-->
<!-- OR ZAB.STATUS =-->
<!-- CASE WHEN ZAB.STATUS = 'X' AND ZAB.REPORT_SEND_USER_GROUP IN-->
<!-- <foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">-->
<!-- UPPER(#{item.userGroup})-->
<!-- </foreach>-->
<!-- THEN-->
<!-- 'X'-->
<!-- END-->
<!-- OR ZAB.STATUS =-->
<!-- CASE WHEN ZAB.STATUS = 'X' AND ZAB.REPORT_SEND_USER_GROUP IN-->
<!-- <foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">-->
<!-- UPPER(#{item.userGroup})-->
<!-- </foreach>-->
<!-- THEN-->
<!-- 'X'-->
<!-- END-->
<!-- OR ZAB.STATUS =-->
<!-- CASE WHEN ZAB.STATUS = 'Q' AND ZAB.CANCEL_SEND_USER_GROUP IN-->
<!-- <foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">-->
<!-- UPPER(#{item.userGroup})-->
<!-- </foreach>-->
<!-- THEN-->
<!-- 'Q'-->
<!-- END-->
<!-- OR ZAB.STATUS =-->
<!-- CASE WHEN ZAB.STATUS = 'Q' AND ZAB.CANCEL_SEND_USER_GROUP IN-->
<!-- <foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">-->
<!-- UPPER(#{item.userGroup})-->
<!-- </foreach>-->
<!-- THEN-->
<!-- 'Q'-->
<!-- END-->
<!-- OR ZAB.STATUS =-->
<!-- CASE WHEN ZAB.STATUS = 'J' AND ZABD.DUTY_SEND_USER_GROUP IN-->
<!-- <foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">-->
<!-- UPPER(#{item.userGroup})-->
<!-- </foreach>-->
<!-- THEN-->
<!-- 'J'-->
<!-- END-->
<!-- OR ZAB.STATUS =-->
<!-- CASE WHEN ZAB.STATUS = 'J' AND ZABD.DUTY_SEND_USER_GROUP IN-->
<!-- <foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">-->
<!-- UPPER(#{item.userGroup})-->
<!-- </foreach>-->
<!-- THEN-->
<!-- 'J'-->
<!-- END-->
<!-- OR ZAB.STATUS =-->
<!-- CASE WHEN ZAB.STATUS = 'F' AND ZABD.RESOLVE_SEND_USER_GROUP IN-->
<!-- <foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">-->
<!-- UPPER(#{item.userGroup})-->
<!-- </foreach>-->
<!-- THEN-->
<!-- 'F'-->
<!-- END)-->
</when>
<otherwise>
<if test="userGroupList == null">
<!-- OR ZAB.STATUS =-->
<!-- CASE WHEN ZAB.STATUS = 'F' AND ZABD.RESOLVE_SEND_USER_GROUP IN-->
<!-- <foreach item="item" index="index" collection="userGroupList" separator="," open="(" close=")">-->
<!-- UPPER(#{item.userGroup})-->
<!-- </foreach>-->
<!-- THEN-->
<!-- 'F'-->
<!-- END)-->
<!-- </when>-->
<!-- <otherwise>-->
<!-- <if test="userGroupList == null">-->
</if>
<if test="userGroupList != null and userGroupList.size == 0">
AND 1 == 2
</if>
</otherwise>
</choose>
<!-- </if>-->
<!-- <if test="userGroupList != null and userGroupList.size == 0">-->
<!-- AND 1 == 2-->
<!-- </if>-->
<!-- </otherwise>-->
<!-- </choose>-->
</if>
</where>
GROUP BY zab.ABNORMAL_NO,zab.STATUS,it.DESCRIPTION,zab.CREATED_DATE_TIME,zab.RESPONSE_DATE_TIME,
ZNU.FULL_NAME,zab.NC_CODE,zab.PB_DESCRIPTION
ORDER BY zab.CREATED_DATE_TIME DESC
</select>
<select id="findAllByAbnormalNoDevice" resultMap="abnormalBillDto">
@ -1098,14 +1110,14 @@
SELECT zabv.SFC SFC,zabv.HANDLE HANDLE
FROM Z_ABNORMAL_BILL_VIEW zabv
INNER JOIN (SELECT MAX(ZAB.HANDLE) HANDLE FROM Z_ABNORMAL_BILL_VIEW ZAB WHERE
ZAB.SITE = #{site}
<if test="sfc != null and sfc != ''">
AND ZAB.SFC = #{sfc}
</if>
<if test="abnormalBo != null and abnormalBo != ''">
AND ZAB.HANDLE = #{abnormalBo}
</if>
) ZAB ON ZAB.HANDLE = zabv.HANDLE
ZAB.SITE = #{site}
<if test="sfc != null and sfc != ''">
AND ZAB.SFC = #{sfc}
</if>
<if test="abnormalBo != null and abnormalBo != ''">
AND ZAB.HANDLE = #{abnormalBo}
</if>
) ZAB ON ZAB.HANDLE = zabv.HANDLE
WHERE zabv.SITE = #{site}
<if test="sfc != null and sfc != ''">
AND zabv.SFC = #{sfc}
@ -1113,7 +1125,7 @@
<if test="abnormalBo != null and abnormalBo != ''">
AND zabv.HANDLE = #{abnormalBo}
</if>
AND ABNORMAL_METHOD = 'C'
AND ABNORMAL_METHOD = 'C'
</select>

@ -1,13 +1,13 @@
package com.foreverwin.mesnac.meapi.model;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.IdType;
/**
* <p>
@ -153,6 +153,8 @@ public class Item extends Model<Item> {
private String labelControl;
@TableField(exist = false)
private String batchControl;
@TableField(exist = false)
private String mapNo;
public String getLabelControl() {
return labelControl;
@ -674,6 +676,14 @@ public class Item extends Model<Item> {
this.origin = origin;
}
public String getMapNo() {
return mapNo;
}
public void setMapNo(String mapNo) {
this.mapNo = mapNo;
}
public static final String HANDLE = "HANDLE";
public static final String CHANGE_STAMP = "CHANGE_STAMP";

@ -66,6 +66,7 @@
<result column="MATERIAL_TYPE" property="materialType" />
<result column="PROCUREMENT_TYPE" property="procurementType" />
<result column="ORIGIN" property="origin" />
<result column="MAP_NO" property="mapNo" />
</resultMap>
<!-- 通用查询结果列 -->
@ -79,9 +80,10 @@
<!-- BaseMapper标准查询/修改/删除 -->
<select id="selectById" resultMap="BaseResultMap">
SELECT I.*, IT.DESCRIPTION
SELECT I.*, IT.DESCRIPTION,MAP.VALUE MAP_NO
FROM ITEM I
LEFT JOIN ITEM_T IT ON I.HANDLE = IT.ITEM_BO AND IT.LOCALE = #{locale}
LEFT JOIN CUSTOM_FIELDS MAP ON MAP.HANDLE = I.HANDLE AND MAP."ATTRIBUTE" = 'DWG_NO'
WHERE I.HANDLE=#{handle}
</select>

Loading…
Cancel
Save