change - 箱体流转追溯报表添加内胆码显示、箱体发泡检验工位对壳胆绑定校验、补打条码添加打印人。

master
yinq 2 months ago
parent 5bb0163819
commit 877ac2150b

@ -101,6 +101,13 @@ public class PdaApiController {
} }
//检验前一工位是否已完成质检 //检验前一工位是否已完成质检
if (StringUtils.isNotEmpty(station)){ if (StringUtils.isNotEmpty(station)){
//箱体发泡检验01工位 对 壳胆绑定进行验证
if (station.equals("2003")){
String result = service.checkShellBinding(code, station);
if (StringUtils.isNotNull(result)){
return error(result);
}
}
String result = qualityService.checkBeforeStationInspection(code, station); String result = qualityService.checkBeforeStationInspection(code, station);
if (StringUtils.isNotNull(result)){ if (StringUtils.isNotNull(result)){
return error(result); return error(result);

@ -78,5 +78,5 @@ public interface PdaBindingMapper {
@DataSource(value = DataSourceType.SLAVE) @DataSource(value = DataSourceType.SLAVE)
int insertCodeBinding(@Param("boxCode") String boxCode); int insertCodeBinding(@Param("boxCode") String boxCode);
List<HashMap<String, String>> checkShellBinding(@Param("boxCode") String boxCode);
} }

@ -76,4 +76,11 @@ public interface IPdaBindingService {
*/ */
List<RecordExceptionProcess> selectExceptionProcessList(String inspectionUserFlag); List<RecordExceptionProcess> selectExceptionProcessList(String inspectionUserFlag);
/**
* 01
* @param code
* @param station
* @return
*/
String checkShellBinding(String code, String station);
} }

@ -18,6 +18,8 @@ import org.springframework.stereotype.Service;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import static com.aucma.common.utils.SecurityUtils.getUsername;
/** /**
* @author wanghao * @author wanghao
* @date 2023/11/14 9:56 * @date 2023/11/14 9:56
@ -152,6 +154,7 @@ public class PdaServiceImpl implements IPdaBindingService {
// 维护条码补打记录表 // 维护条码补打记录表
for (HashMap<String, String> map : barcodeList) { for (HashMap<String, String> map : barcodeList) {
map.put("print_reason", printReason); map.put("print_reason", printReason);
map.put("CREATE_BY", getUsername());
} }
mapper.printSupplementBarcode(barcodeList.get(0)); mapper.printSupplementBarcode(barcodeList.get(0));
} }
@ -243,4 +246,20 @@ public class PdaServiceImpl implements IPdaBindingService {
return recordExceptionProcessService.selectRecordExceptionProcessList(process); return recordExceptionProcessService.selectRecordExceptionProcessList(process);
} }
/**
* 01
* @param code
* @param station
* @return
*/
@Override
public String checkShellBinding(String code, String station) {
String result = null;
List<HashMap<String, String>> mapList = mapper.checkShellBinding(code);
if (mapList.size() == 0){
result = "该箱体未绑定内胆码!";
}
return result;
}
} }

@ -121,6 +121,18 @@
AND rep.QUALITY_MANAGER_TIME > (SYSDATE - 5.25) AND rep.QUALITY_MANAGER_TIME > (SYSDATE - 5.25)
AND (rep.INSPECTION_USER_CODE IS NULL OR rep.INSPECTION_USER_CODE NOT LIKE '%' || #{userName} || '%') AND (rep.INSPECTION_USER_CODE IS NULL OR rep.INSPECTION_USER_CODE NOT LIKE '%' || #{userName} || '%')
</select> </select>
<select id="checkShellBinding" resultType="java.util.HashMap">
select BOX_CODE,
BOX_NAME,
PRODUCT_CODE,
BINDING_RESULT,
RECORD_TIME1,
RECORD_TIME2,
LINER_CODE
from C##AUCMA_SCADA.CODE_BINDING S
WHERE LINER_CODE IS NOT NULL
AND BOX_CODE = #{boxCode}
</select>
<update id="unbindBarCode"> <update id="unbindBarCode">
@ -140,6 +152,7 @@
<if test="PRINT_BARTYPE != null">PRINT_BARTYPE,</if> <if test="PRINT_BARTYPE != null">PRINT_BARTYPE,</if>
<if test="PRINT_NAME != null">PRINT_NAME,</if> <if test="PRINT_NAME != null">PRINT_NAME,</if>
<if test="print_reason != null">print_reason,</if> <if test="print_reason != null">print_reason,</if>
<if test="CREATE_BY != null">CREATE_BY,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="ORDER_CODE != null">#{ORDER_CODE},</if> <if test="ORDER_CODE != null">#{ORDER_CODE},</if>
@ -149,6 +162,7 @@
<if test="PRINT_BARTYPE != null">#{PRINT_BARTYPE},</if> <if test="PRINT_BARTYPE != null">#{PRINT_BARTYPE},</if>
<if test="PRINT_NAME != null">#{PRINT_NAME},</if> <if test="PRINT_NAME != null">#{PRINT_NAME},</if>
<if test="print_reason != null">#{print_reason},</if> <if test="print_reason != null">#{print_reason},</if>
<if test="CREATE_BY != null">#{CREATE_BY},</if>
</trim> </trim>
</insert> </insert>

@ -77,6 +77,13 @@ public class BoxTurnoverTraceabilityReport extends BaseEntity {
@JsonProperty("BOX_CODE") @JsonProperty("BOX_CODE")
private String BOX_CODE; private String BOX_CODE;
/**
*
*/
@Excel(name = "内胆码")
@JsonProperty("LINER_CODE")
private String LINER_CODE;
/** /**
* MES * MES
*/ */
@ -85,6 +92,14 @@ public class BoxTurnoverTraceabilityReport extends BaseEntity {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private String PRINT_TIME; private String PRINT_TIME;
public String getLINER_CODE() {
return LINER_CODE;
}
public void setLINER_CODE(String LINER_CODE) {
this.LINER_CODE = LINER_CODE;
}
public String getPRODUCT_LINE_CODE() { public String getPRODUCT_LINE_CODE() {
return PRODUCT_LINE_CODE; return PRODUCT_LINE_CODE;
} }

@ -98,6 +98,7 @@ public class RecordSwitchOrderServiceImpl implements IRecordSwitchOrderService {
// 维护条码补打记录表 // 维护条码补打记录表
for (HashMap<String, String> map : barcodeList) { for (HashMap<String, String> map : barcodeList) {
map.put("print_reason", "切换订单"); map.put("print_reason", "切换订单");
map.put("CREATE_BY", getUsername());
} }
recordSwitchOrderMapper.printSupplementBarcode(barcodeList.get(0)); recordSwitchOrderMapper.printSupplementBarcode(barcodeList.get(0));
} catch (Exception e) { } catch (Exception e) {

@ -139,7 +139,7 @@ public class ReportQualityInspectionServiceImpl implements IReportQualityInspect
markLocation = i; markLocation = i;
} }
} }
if (markLocation <= 2){ if (markLocation <= 1){
return null; return null;
} }
BaseProductLine productLineInfo = productLineList.get(markLocation - 1); BaseProductLine productLineInfo = productLineList.get(markLocation - 1);

@ -520,13 +520,14 @@
</select> </select>
<select id="repairRateReportList" resultType="com.aucma.report.domain.RepairRateReport" <select id="repairRateReportList" resultType="com.aucma.report.domain.RepairRateReport"
parameterType="java.util.HashMap"> parameterType="java.util.HashMap">
SELECT RQI.INSPECTOR_TIME, SELECT VPO.PRODUCT_SCANTIME INSPECTOR_TIME,
RQI.QUALITY_SUM, NVL(RQI.QUALITY_SUM, 0) QUALITY_SUM,
VPO.OFF_LINE_NUM, VPO.OFF_LINE_NUM,
CASE CASE
WHEN NVL(OFF_LINE_NUM, 0) = 0 THEN '0.00' WHEN NVL(OFF_LINE_NUM, 0) = 0 THEN '0.00'
ELSE TO_CHAR(ROUND(QUALITY_SUM / NVL(OFF_LINE_NUM, 0) * 100, 2), 'FM99990.00') END || '%' REPAIR_RATE, ELSE TO_CHAR(ROUND(NVL(RQI.QUALITY_SUM, 0) / NVL(OFF_LINE_NUM, 1) * 100, 2), 'FM99990.00') END ||
TARGET '%' REPAIR_RATE,
TARGET
FROM (SELECT INSPECTOR_TIME, COUNT(*) QUALITY_SUM FROM (SELECT INSPECTOR_TIME, COUNT(*) QUALITY_SUM
FROM ( FROM (
SELECT TO_CHAR(RQI.INSPECTOR_TIME, 'YYYY-MM-DD') INSPECTOR_TIME, RQI.BAR_CODE SELECT TO_CHAR(RQI.INSPECTOR_TIME, 'YYYY-MM-DD') INSPECTOR_TIME, RQI.BAR_CODE
@ -547,7 +548,7 @@
GROUP BY TO_CHAR(RQI.INSPECTOR_TIME, 'YYYY-MM-DD'), RQI.BAR_CODE GROUP BY TO_CHAR(RQI.INSPECTOR_TIME, 'YYYY-MM-DD'), RQI.BAR_CODE
) )
GROUP BY INSPECTOR_TIME) RQI GROUP BY INSPECTOR_TIME) RQI
LEFT JOIN ( RIGHT JOIN (
SELECT PRODUCT_SCANTIME, COUNT(*) OFF_LINE_NUM SELECT PRODUCT_SCANTIME, COUNT(*) OFF_LINE_NUM
FROM ( FROM (
SELECT TO_CHAR(VPO.PRODUCT_SCANTIME, 'YYYY-MM-DD') PRODUCT_SCANTIME, SELECT TO_CHAR(VPO.PRODUCT_SCANTIME, 'YYYY-MM-DD') PRODUCT_SCANTIME,
@ -556,6 +557,9 @@
WHERE VPO.BOX_CODE IS NOT NULL WHERE VPO.BOX_CODE IS NOT NULL
<if test="PRODUCT_LINE_CODE != null and PRODUCT_LINE_CODE != ''"> <if test="PRODUCT_LINE_CODE != null and PRODUCT_LINE_CODE != ''">
AND VPO.PRODUCT_LINE_CODE = #{PRODUCT_LINE_CODE} AND VPO.PRODUCT_LINE_CODE = #{PRODUCT_LINE_CODE}
</if>
<if test="beginBeginTime != null and beginBeginTime != '' and endBeginTime != null and endBeginTime != ''">
AND TO_CHAR(VPO.PRODUCT_SCANTIME, 'YYYY-MM-DD') BETWEEN #{beginBeginTime} AND #{endBeginTime}
</if> </if>
GROUP BY TO_CHAR(VPO.PRODUCT_SCANTIME, 'YYYY-MM-DD'), VPO.BOX_CODE GROUP BY TO_CHAR(VPO.PRODUCT_SCANTIME, 'YYYY-MM-DD'), VPO.BOX_CODE
) )
@ -564,7 +568,7 @@
CROSS JOIN (SELECT TO_CHAR(CUSTOM_DATA) TARGET CROSS JOIN (SELECT TO_CHAR(CUSTOM_DATA) TARGET
FROM BASE_CUSTOM_DATA FROM BASE_CUSTOM_DATA
WHERE CUSTOM_CODE = 'REPAIR_RATE_' || #{PRODUCT_LINE_CODE}) TARGET WHERE CUSTOM_CODE = 'REPAIR_RATE_' || #{PRODUCT_LINE_CODE}) TARGET
ORDER BY RQI.INSPECTOR_TIME ORDER BY VPO.PRODUCT_SCANTIME
</select> </select>
<select id="boxTurnoverTraceabilityReportList" resultType="com.aucma.report.domain.BoxTurnoverTraceabilityReport" <select id="boxTurnoverTraceabilityReportList" resultType="com.aucma.report.domain.BoxTurnoverTraceabilityReport"
@ -579,11 +583,13 @@
PO.PRODUCT_SNCODE, PO.PRODUCT_SNCODE,
PB.MATERIAL_BARCODE BOX_CODE, PB.MATERIAL_BARCODE BOX_CODE,
PO.PRODUCT_SCANTIME, PO.PRODUCT_SCANTIME,
PB.PRINT_TIME PB.PRINT_TIME,
CB.LINER_CODE
FROM C##AUCMA_SCADA.PRINT_BARCODE PB FROM C##AUCMA_SCADA.PRINT_BARCODE PB
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 PL ON PL.WORK_CENTER_CODE = BO.WORK_CENTER_CODE LEFT JOIN BASE_PRODUCTLINE PL ON PL.WORK_CENTER_CODE = BO.WORK_CENTER_CODE
LEFT JOIN C##AUCMA_SCADA.PRODUCT_OFFLINE PO ON PB.MATERIAL_BARCODE = PO.BOX_CODE LEFT JOIN C##AUCMA_SCADA.PRODUCT_OFFLINE PO ON PB.MATERIAL_BARCODE = PO.BOX_CODE
LEFT JOIN C##AUCMA_SCADA.CODE_BINDING CB ON CB.BOX_CODE = PB.MATERIAL_BARCODE
<where> <where>
PB.PRINT_BARTYPE = 1 PB.PRINT_BARTYPE = 1
<if test="PRODUCT_LINE_CODE != null and PRODUCT_LINE_CODE != ''">and PL.PRODUCT_LINE_CODE = #{PRODUCT_LINE_CODE} <if test="PRODUCT_LINE_CODE != null and PRODUCT_LINE_CODE != ''">and PL.PRODUCT_LINE_CODE = #{PRODUCT_LINE_CODE}

@ -16,6 +16,7 @@
<result property="isPrint" column="is_print"/> <result property="isPrint" column="is_print"/>
<result property="printReason" column="print_reason"/> <result property="printReason" column="print_reason"/>
<result property="recordTime" column="record_time"/> <result property="recordTime" column="record_time"/>
<result property="createBy" column="create_by"/>
</resultMap> </resultMap>
<sql id="selectPrintSupplementBarCodeVo"> <sql id="selectPrintSupplementBarCodeVo">
@ -28,6 +29,7 @@
PS.PRINT_NAME, PS.PRINT_NAME,
PS.print_reason, PS.print_reason,
PS.record_time, PS.record_time,
PS.create_by,
CASE WHEN PS.IS_PRINT = '1' THEN '已打印' ELSE '未打印' END IS_PRINT CASE WHEN PS.IS_PRINT = '1' THEN '已打印' ELSE '未打印' END IS_PRINT
FROM C##AUCMA_SCADA.PRINT_SUPPLEMENTBARCODE PS FROM C##AUCMA_SCADA.PRINT_SUPPLEMENTBARCODE PS
LEFT JOIN C##AUCMA_MES.BASE_MATERIALINFO BM ON BM.MATERIAL_CODE = PS.MATERIAL_CODE LEFT JOIN C##AUCMA_MES.BASE_MATERIALINFO BM ON BM.MATERIAL_CODE = PS.MATERIAL_CODE
@ -79,6 +81,7 @@
<if test="printName != null">print_name,</if> <if test="printName != null">print_name,</if>
<if test="isPrint != null">is_print,</if> <if test="isPrint != null">is_print,</if>
<if test="printReason != null">print_reason,</if> <if test="printReason != null">print_reason,</if>
<if test="createBy != null">create_by,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="objId != null">#{objId},</if> <if test="objId != null">#{objId},</if>
@ -91,6 +94,7 @@
<if test="printName != null">#{printName},</if> <if test="printName != null">#{printName},</if>
<if test="isPrint != null">#{isPrint},</if> <if test="isPrint != null">#{isPrint},</if>
<if test="printReason != null">#{printReason},</if> <if test="printReason != null">#{printReason},</if>
<if test="createBy != null">#{createBy},</if>
</trim> </trim>
</insert> </insert>

@ -168,6 +168,7 @@
<if test="PRINT_BARTYPE != null">PRINT_BARTYPE,</if> <if test="PRINT_BARTYPE != null">PRINT_BARTYPE,</if>
<if test="PRINT_NAME != null">PRINT_NAME,</if> <if test="PRINT_NAME != null">PRINT_NAME,</if>
<if test="print_reason != null">print_reason,</if> <if test="print_reason != null">print_reason,</if>
<if test="CREATE_BY != null">CREATE_BY,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="ORDER_CODE != null">#{ORDER_CODE},</if> <if test="ORDER_CODE != null">#{ORDER_CODE},</if>
@ -176,7 +177,7 @@
<if test="MATERIAL_BARCODE != null">#{MATERIAL_BARCODE},</if> <if test="MATERIAL_BARCODE != null">#{MATERIAL_BARCODE},</if>
<if test="PRINT_BARTYPE != null">#{PRINT_BARTYPE},</if> <if test="PRINT_BARTYPE != null">#{PRINT_BARTYPE},</if>
<if test="PRINT_NAME != null">#{PRINT_NAME},</if> <if test="PRINT_NAME != null">#{PRINT_NAME},</if>
<if test="print_reason != null">#{print_reason},</if> <if test="CREATE_BY != null">#{CREATE_BY},</if>
</trim> </trim>
</insert> </insert>
</mapper> </mapper>
Loading…
Cancel
Save