change - 不合格品流程管理接口

master
yinq 5 months ago
parent 1bddc62a1d
commit a5fa2133ec

@ -143,9 +143,9 @@ public class PdaServiceImpl implements IPdaBindingService {
*/
@Override
public String messageNotifications(String userName) {
List<HashMap<String, String>> barcodeList = mapper.messageNotifications(userName);
String resultMessage = null;
StringBuilder boxCode = null;
List<HashMap<String, String>> barcodeList = mapper.messageNotifications(userName);
for (HashMap<String, String> map : barcodeList) {
String userNames = map.get("INSPECTION_USER_CODE");
if (userNames.equals("NULL")){
@ -161,12 +161,15 @@ public class PdaServiceImpl implements IPdaBindingService {
recordExceptionProcess.setInspectionUserCode(userNames);
recordExceptionProcessService.updateRecordExceptionProcess(recordExceptionProcess);
if (boxCode == null){
boxCode = new StringBuilder(map.get("BOX_BARCODE"));
boxCode = new StringBuilder(map.get("BOX_BARCODE")).append("(位置:").append(map.get("TEAM_NAME")).append(")");
} else {
boxCode.append(",").append(map.get("BOX_BARCODE"));
boxCode.append(",").append(map.get("BOX_BARCODE")).append("(位置:").append(map.get("TEAM_NAME")).append(")");
}
}
if (boxCode != null){
resultMessage = boxCode + "已审批完成,请进行降级处理!";
}
System.out.println("PDA降级消息通知:" + resultMessage);
return resultMessage;
}

@ -97,11 +97,15 @@
</select>
<select id="messageNotifications" resultType="java.util.HashMap">
SELECT OBJ_ID, BOX_BARCODE, NVL(INSPECTION_USER_CODE, 'NULL') INSPECTION_USER_CODE
FROM RECORD_EXCEPTION_PROCESS
WHERE PRODUCTION_USER_FLAG = '9'
AND QUALITY_MANAGER_TIME > (SYSDATE - 7.25)
AND (INSPECTION_USER_CODE IS NULL OR INSPECTION_USER_CODE NOT LIKE '%' || #{userName} || '%')
SELECT rep.OBJ_ID,
rep.BOX_BARCODE,
NVL(rep.INSPECTION_USER_CODE, 'NULL') INSPECTION_USER_CODE,
NVL(bt.TEAM_NAME, '') TEAM_NAME
FROM RECORD_EXCEPTION_PROCESS rep
left join BASE_TEAMMEMBERS bt on bt.TEAM_CODE = rep.TEAM_CODE
WHERE rep.PRODUCTION_USER_FLAG = '9'
AND rep.QUALITY_MANAGER_TIME > (SYSDATE - 5.25)
AND (rep.INSPECTION_USER_CODE IS NULL OR rep.INSPECTION_USER_CODE NOT LIKE '%' || #{userName} || '%')
</select>
<update id="unbindBarCode">

@ -62,6 +62,12 @@ public class RecordExceptionProcess extends BaseEntity {
@Excel(name = "班组")
private String teamCode;
/**
*
*/
@Excel(name = "班组名称")
private String teamName;
/**
*
*/
@ -170,7 +176,13 @@ public class RecordExceptionProcess extends BaseEntity {
@Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date updatedTime;
public String getTeamName() {
return teamName;
}
public void setTeamName(String teamName) {
this.teamName = teamName;
}
public String getProductLineCode() {
return productLineCode;

@ -217,7 +217,9 @@
ZSD.QUALITY_DEFECT_CODE,
ZSD.QUALITY_DEFECT_NAME,
COUNT(*) Q_SUM,
TO_CHAR(ROUND(COUNT(*) / OS.OFFLINE_NUM * 100, 2), 'FM99990.00') || '%' OFFLINE_NUM
CASE
WHEN OS.OFFLINE_NUM = 0 THEN '0.00'
ELSE TO_CHAR(ROUND(COUNT(*) / OS.OFFLINE_NUM * 100, 2), 'FM99990.00') END || '%' OFFLINE_NUM
FROM (
SELECT BF.FACTORY_NAME,
PL2.PRODUCT_LINE_CODE,

@ -9,6 +9,7 @@
<result property="boxBarcode" column="box_barcode"/>
<result property="productionUserFlag" column="production_user_flag"/>
<result property="teamCode" column="team_code"/>
<result property="teamName" column="team_name"/>
<result property="applyReason" column="apply_reason"/>
<result property="applyTime" column="apply_time"/>
<result property="qualityUserFlag" column="quality_user_flag"/>
@ -35,13 +36,14 @@
<sql id="selectRecordExceptionProcessVo">
select rep.obj_id,
PB.ORDER_CODE orderCode,
PB.ORDER_CODE orderCode,
BP.PRODUCT_LINE_CODE productLineCode,
BP.PRODUCT_LINE_NAME productLineName,
rep.box_barcode,
ML.MATERIAL_SPECIFICATIONS materialModel,
rep.production_user_flag,
rep.team_code,
bt.TEAM_NAME,
rep.apply_reason,
rep.apply_time,
rep.quality_user_flag,
@ -65,6 +67,7 @@
left join BASE_ORDERINFO bo on bo.ORDER_CODE = pb.ORDER_CODE
left join BASE_PRODUCTLINE BP ON BP.WORK_CENTER_CODE = BO.WORK_CENTER_CODE
LEFT JOIN BASE_MATERIALINFO ML ON ML.MATERIAL_CODE = PB.MATERIAL_CODE
left join BASE_TEAMMEMBERS bt on bt.TEAM_CODE = rep.TEAM_CODE
</sql>
<select id="selectRecordExceptionProcessList" parameterType="RecordExceptionProcess"

Loading…
Cancel
Save