change - 质检接口

master
yinq 10 months ago
parent b6b5a3a474
commit b221e983d7

@ -3,6 +3,8 @@ package com.aucma.api.controller;
import com.aucma.api.domain.dto.CheckInfoDto;
import com.aucma.api.domain.dto.RepairSubmitInfoDto;
import com.aucma.api.service.IPdaBindingService;
import com.aucma.base.domain.BaseProcessStation;
import com.aucma.base.service.IBaseProcessStationService;
import com.aucma.common.core.domain.AjaxResult;
import com.aucma.common.utils.StringUtils;
import com.aucma.report.domain.ReportQualityInspection;
@ -28,6 +30,9 @@ public class PdaApiController {
@Autowired
private IPdaBindingService service;
@Autowired
private IBaseProcessStationService baseProcessStationService;
//壳胆绑定-提交
@PostMapping("/boxBanding")
public AjaxResult binding(String boxCode, String innerCode, String loginName) {
@ -84,6 +89,9 @@ public class PdaApiController {
for (int i = 0; i < size; i++) {
ReportQualityInspection inspection = new ReportQualityInspection();
inspection.setBarCode(checkInfo.getCode());
//检验前一工位是否已完成质检
inspection.setMaterialName(checkInfo.getName());
String measure = checkInfo.getMeasure();
inspection.setTreatmentMeasure(measure);
@ -93,12 +101,21 @@ public class PdaApiController {
inspection.setInspectorTime(new Date());
inspection.setStationCode(checkInfo.getStationCode());
inspection.setGroupCode(checkInfo.getTeamCode());
try {
BaseProcessStation processStation = new BaseProcessStation();
processStation.setParentId(checkInfo.getStationCode());
List<BaseProcessStation> processStations = baseProcessStationService.selectBaseProcessStationList(processStation);
inspection.setProcessCode(processStations.get(0).getProcessCode());
} catch (Exception e) {
e.printStackTrace();
}
assert list != null;
if (!list.isEmpty()) {
CheckInfoDto.DefectBeen defectBeen = list.get(i);
inspection.setSubmitQualtyId(defectBeen.getObjId());
inspection.setTestItemCode(list.get(i).getStationCode());
inspection.setQualityDefectCode(list.get(i).getQualityDefectCode());
inspection.setQualityDefectName(list.get(i).getQualityDefectName());
}

@ -62,11 +62,19 @@
</select>
<select id="boxFoamingProductionInterface" resultType="java.util.HashMap" parameterType="java.util.HashMap">
SELECT BD.SORT EQUIPMENT_CODE,
SELECT BD.SORT EQUIPMENT_CODE,
VBF.FIXTUREBOXTYPE,
CASE WHEN VBF.FIXTURESTATUS = 1 THEN '生产中' ELSE '停用中' END FIXTURESTATUS,
CASE WHEN VBF.FIXTURESTATUS = 1 THEN '正常生产' ELSE '暂停生产' END FIXTURESTATUS,
TO_NUMBER(BCD.CUSTOM_DATA) TARGET,
VBF.ORDER_CODE,
(CASE
WHEN '20:00' > TO_CHAR(SYSDATE, 'HH24:MI') AND TO_CHAR(SYSDATE, 'HH24:MI') >= '08:00'
THEN round(TO_NUMBER(BCD.CUSTOM_DATA) / 12, 0) * (TO_CHAR(SYSDATE, 'HH24') - 7)
WHEN TO_CHAR(SYSDATE, 'HH24:MI') >= '20:00'
THEN round(TO_NUMBER(BCD.CUSTOM_DATA) / 12, 0) * (TO_CHAR(SYSDATE, 'HH24') - 19)
WHEN '08:00' > TO_CHAR(SYSDATE, 'HH24:MI')
THEN round(TO_NUMBER(BCD.CUSTOM_DATA) / 12, 0) * (TO_CHAR(SYSDATE, 'HH24') + 5)
END
) PLAN_SUM,
VBF.PRODUCTION PRO_SUM,
VBF.ANHOUR,
VBF.TWOHOUR,
@ -81,11 +89,11 @@
VBF.ELEVENHOUR,
VBF.TWELVEHOUR,
VBF.ACTUALVALUE,
TO_CHAR(VBF.UPDATETIME, 'YYYY-MM-DD HH24:MI:SS') UPDATETIME
TO_CHAR(VBF.UPDATETIME, 'YYYY-MM-DD HH24:MI:SS') UPDATETIME
FROM VIEW_BOX_FOAMDATA VBF
LEFT JOIN VIEW_BOX_DEVICEINFO BD ON BD.OBJ_ID = VBF.MAINID
LEFT JOIN BASE_CUSTOM_DATA BCD ON BCD.CUSTOM_CODE = 'XTFP_TARGET'
WHERE VBF.PRODUCT_LINE_CODE = 'CX_01'
LEFT JOIN BASE_CUSTOM_DATA BCD ON BCD.CUSTOM_CODE = 'XTFP_TARGET_' || #{PRODUCT_LINE_CODE}
WHERE VBF.PRODUCT_LINE_CODE = #{PRODUCT_LINE_CODE}
ORDER BY BD.SORT
</select>

Loading…
Cancel
Save