add - 查询返修

master
wangh 1 year ago
parent 7251da7f05
commit 8d5876a155

@ -22,7 +22,7 @@ import static com.aucma.common.core.domain.AjaxResult.success;
*/
@RestController
@RequestMapping(("/api"))
public class PdaBindingController {
public class PdaApiController {
@Autowired
private IPdaBindingService service;
@ -37,8 +37,12 @@ public class PdaBindingController {
}
return error("箱壳条码扫描错误");
}
//条码绑定
//条码绑定
@PostMapping("/barCodeBanding")
public AjaxResult barCodeBanding(String boxCode, String innerCode, String loginName) {
return success();
}
@Autowired
private IReportQualityInspectionService qualityService;
@ -51,7 +55,7 @@ public class PdaBindingController {
for (int i = 0; i < size; i++) {
ReportQualityInspection inspection = new ReportQualityInspection();
inspection.setBarCode(checkInfo.getCode());
inspection.setProcessResult(checkInfo.getMeasure());
inspection.setTreatmentMeasure(checkInfo.getMeasure());
inspection.setIsLowerLine(checkInfo.getOffline());
inspection.setInspectorCode(checkInfo.getUserName());
inspection.setInspectorTime(new Date());
@ -67,4 +71,14 @@ public class PdaBindingController {
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 INTO AUCMA_SCADA.CODE_BINDING (OBJ_ID, BOX_CODE, BOX_NAME, PRODUCT_CODE, BINDING_RESULT, RECORD_TIME1,
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>
</mapper>

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

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

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

@ -167,4 +167,13 @@
#{objId}
</foreach>
</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>
Loading…
Cancel
Save