add - 查询返修

master
wangh 12 months ago
parent 7251da7f05
commit 8d5876a155

@ -22,7 +22,7 @@ import static com.aucma.common.core.domain.AjaxResult.success;
*/ */
@RestController @RestController
@RequestMapping(("/api")) @RequestMapping(("/api"))
public class PdaBindingController { public class PdaApiController {
@Autowired @Autowired
private IPdaBindingService service; private IPdaBindingService service;
@ -37,8 +37,12 @@ public class PdaBindingController {
} }
return error("箱壳条码扫描错误"); return error("箱壳条码扫描错误");
} }
//条码绑定
//条码绑定
@PostMapping("/barCodeBanding")
public AjaxResult barCodeBanding(String boxCode, String innerCode, String loginName) {
return success();
}
@Autowired @Autowired
private IReportQualityInspectionService qualityService; private IReportQualityInspectionService qualityService;
@ -51,7 +55,7 @@ public class PdaBindingController {
for (int i = 0; i < size; i++) { for (int i = 0; i < size; i++) {
ReportQualityInspection inspection = new ReportQualityInspection(); ReportQualityInspection inspection = new ReportQualityInspection();
inspection.setBarCode(checkInfo.getCode()); inspection.setBarCode(checkInfo.getCode());
inspection.setProcessResult(checkInfo.getMeasure()); inspection.setTreatmentMeasure(checkInfo.getMeasure());
inspection.setIsLowerLine(checkInfo.getOffline()); inspection.setIsLowerLine(checkInfo.getOffline());
inspection.setInspectorCode(checkInfo.getUserName()); inspection.setInspectorCode(checkInfo.getUserName());
inspection.setInspectorTime(new Date()); inspection.setInspectorTime(new Date());
@ -67,4 +71,14 @@ public class PdaBindingController {
return success(); return success();
} }
//返修查询质检信息
@PostMapping("/findCheckInfoByCode")
public AjaxResult findCheckInfoByCode(String code) {
List<ReportQualityInspection> list= qualityService.findCheckInfoByCode(code);
if (list==null || list.isEmpty()){
return error("扫描条码不正确");
}
return success(list);
}
} }

@ -14,7 +14,7 @@
<insert id="insertBindingInfo"> <insert id="insertBindingInfo">
INSERT INTO AUCMA_SCADA.CODE_BINDING (OBJ_ID, BOX_CODE, BOX_NAME, PRODUCT_CODE, BINDING_RESULT, RECORD_TIME1, INSERT INTO AUCMA_SCADA.CODE_BINDING (OBJ_ID, BOX_CODE, BOX_NAME, PRODUCT_CODE, BINDING_RESULT, RECORD_TIME1,
RECORD_TIME2) RECORD_TIME2)
VALUES (SEQ_CODE_BINDING.nextval, #{boxCode}, #{boxName}, #{innerCode}, '成功', SYSDATE, SYSDATE) VALUES (AUCMA_SCADA.SEQ_CODE_BINDING.nextval, #{boxCode}, #{boxName}, #{innerCode}, '成功', SYSDATE, SYSDATE)
</insert> </insert>
</mapper> </mapper>

@ -58,4 +58,6 @@ public interface ReportQualityInspectionMapper
* @return * @return
*/ */
public int deleteReportQualityInspectionByObjIds(Long[] objIds); public int deleteReportQualityInspectionByObjIds(Long[] objIds);
List<ReportQualityInspection> findCheckInfoByCode(String code);
} }

@ -58,4 +58,6 @@ public interface IReportQualityInspectionService
* @return * @return
*/ */
public int deleteReportQualityInspectionByObjId(Long objId); public int deleteReportQualityInspectionByObjId(Long objId);
List<ReportQualityInspection> findCheckInfoByCode(String code);
} }

@ -90,4 +90,11 @@ public class ReportQualityInspectionServiceImpl implements IReportQualityInspect
{ {
return reportQualityInspectionMapper.deleteReportQualityInspectionByObjId(objId); return reportQualityInspectionMapper.deleteReportQualityInspectionByObjId(objId);
} }
@Override
public List<ReportQualityInspection> findCheckInfoByCode(String code) {
return reportQualityInspectionMapper.findCheckInfoByCode(code);
}
} }

@ -167,4 +167,13 @@
#{objId} #{objId}
</foreach> </foreach>
</delete> </delete>
<select id="findCheckInfoByCode" resultMap="ReportQualityInspectionResult">
select OBJ_ID,
QUALITY_DEFECT_CODE,
QUALITY_DEFECT_NAME
from AUCMA_MES.REPORT_QUALITY_INSPECTION
where BAR_CODE = #{code}
and PROCESS_RESULT is null
</select>
</mapper> </mapper>
Loading…
Cancel
Save