yinq 12 months ago
commit 96ea56545f

@ -41,6 +41,9 @@ public class PdaApiController {
//条码绑定
@PostMapping("/barCodeBanding")
public AjaxResult barCodeBanding(String boxCode, String innerCode, String loginName) {
// 查询质检缺陷有没有修复 还没做
// 查询插入
// Long objid=service.select
return success();
}
@ -51,11 +54,17 @@ public class PdaApiController {
@PostMapping("/checkSubmit")
public AjaxResult checkSubmit(@RequestBody CheckInfoDto checkInfo) {
List<CheckInfoDto.DefectBeen> list = checkInfo.getList();
String boxName = service.selectBoxNameByCode(checkInfo.getCode());
if (boxName==null) {
return error("箱壳条码扫描错误");
}
int size = (list == null || list.isEmpty()) ? 1 : list.size();
for (int i = 0; i < size; i++) {
ReportQualityInspection inspection = new ReportQualityInspection();
inspection.setBarCode(checkInfo.getCode());
inspection.setMaterialName(boxName);
inspection.setTreatmentMeasure(checkInfo.getMeasure());
inspection.setProcessResult(checkInfo.getMeasureName());
inspection.setIsLowerLine(checkInfo.getOffline());
inspection.setInspectorCode(checkInfo.getUserName());
inspection.setInspectorTime(new Date());

@ -11,6 +11,7 @@ public class CheckInfoDto {
private List<DefectBeen> list;//缺陷列表
private String measure;//处理措施TREATMENT_MEASURE
private String measureName;//处理措施TREATMENT_MEASURE
private String offline;
private String processCode;
private String userName;
@ -39,7 +40,13 @@ public class CheckInfoDto {
this.code = code;
}
public String getMeasureName() {
return measureName;
}
public void setMeasureName(String measureName) {
this.measureName = measureName;
}
public List<DefectBeen> getList() {
return list;

@ -16,7 +16,8 @@ public class PdaServiceImpl implements IPdaBindingService {
@Override
public String selectBoxNameByCode(String boxCode) {
return mapper.selectBoxNameByCode(boxCode);
return mapper.selectBoxNameByCode(boxCode.substring(2,12));
}
@Override

@ -6,15 +6,13 @@
<select id="selectBoxNameByCode" resultType="string">
SELECT MATERIAL_NAME
FROM AUCMA_MES.BASE_BOMINFO
WHERE MATERIAL_CODE = #{boxCode}
select MATERIAL_NAME from AUCMA_MES.BASE_MATERIALINFO where MATERIAL_CODE = #{boxCode}
</select>
<insert id="insertBindingInfo">
INSERT INTO AUCMA_SCADA.CODE_BINDING (OBJ_ID, BOX_CODE, BOX_NAME, PRODUCT_CODE, BINDING_RESULT, RECORD_TIME1,
RECORD_TIME2)
VALUES (AUCMA_SCADA.SEQ_CODE_BINDING.nextval, #{boxCode}, #{boxName}, #{innerCode}, '成功', SYSDATE, SYSDATE)
INSERT INTO AUCMA_SCADA.CODE_BINDING
(OBJ_ID, BOX_CODE, BOX_NAME, LINER_CODE, BINDING_RESULT, RECORD_TIME1)
VALUES (AUCMA_SCADA.SEQ_CODE_BINDING.nextval, #{boxCode}, #{boxName}, #{innerCode}, '成功', SYSDATE)
</insert>
</mapper>
Loading…
Cancel
Save