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

master
yinq 5 months ago
parent 1bddc62a1d
commit a5fa2133ec

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

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

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

@ -217,7 +217,9 @@
ZSD.QUALITY_DEFECT_CODE, ZSD.QUALITY_DEFECT_CODE,
ZSD.QUALITY_DEFECT_NAME, ZSD.QUALITY_DEFECT_NAME,
COUNT(*) Q_SUM, 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 ( FROM (
SELECT BF.FACTORY_NAME, SELECT BF.FACTORY_NAME,
PL2.PRODUCT_LINE_CODE, PL2.PRODUCT_LINE_CODE,

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

Loading…
Cancel
Save