|
|
|
@ -173,7 +173,6 @@ public class ApiController {
|
|
|
|
|
private IRecordInvalidatedService recordInvalidatedService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/xj/selectLite")
|
|
|
|
|
public String xjSelectLite(String user) {
|
|
|
|
|
List<StockDto> list = apiService.xjSelect(user);
|
|
|
|
@ -186,13 +185,21 @@ public class ApiController {
|
|
|
|
|
@Autowired
|
|
|
|
|
private IRecordInspectionService inspectionService;
|
|
|
|
|
|
|
|
|
|
@PostMapping("/inspection/skipTask")
|
|
|
|
|
public AjaxResult inspectionSubmit(long tableId, String remark) {
|
|
|
|
|
apiService.updataInspectionTaskByObjid(tableId,remark,"跳过");
|
|
|
|
|
return success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@PostMapping("/xj/submit")
|
|
|
|
|
public AjaxResult inspectionSubmit(long tableId, String json, long inspectionId, String user,List<MultipartFile> files) {
|
|
|
|
|
public AjaxResult inspectionSubmit(long tableId, String json, long inspectionId, String user, List<MultipartFile> files) {
|
|
|
|
|
//插入 info 表
|
|
|
|
|
List<StockDto> list = JSONObject.parseArray(json, StockDto.class);
|
|
|
|
|
String locationCode = list.get(0).getLocationCode();
|
|
|
|
|
apiService.deleteInspectionInfo(locationCode, inspectionId);
|
|
|
|
|
apiService.insertInspectionInfo(list, inspectionId);
|
|
|
|
|
//修改task状态
|
|
|
|
|
apiService.updataInspectionTaskByObjid(tableId);
|
|
|
|
|
apiService.updataInspectionTaskByObjid(tableId,null,"已完成");
|
|
|
|
|
|
|
|
|
|
//存储图片,插库
|
|
|
|
|
String filePath = RuoYiConfig.getUploadPath() + "/inspection";
|
|
|
|
@ -205,7 +212,8 @@ public class ApiController {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
System.out.println("上传图片路径:" + pathName);
|
|
|
|
|
apiService.insertInspetionPictrue(inspectionId, tableId,user, pathName);
|
|
|
|
|
|
|
|
|
|
apiService.insertInspetionPictrue(inspectionId, tableId, user, pathName, locationCode);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -213,20 +221,6 @@ public class ApiController {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询巡检机位
|
|
|
|
|
*
|
|
|
|
|
* @param user
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@PostMapping("/inspection/selectTask")
|
|
|
|
|
public AjaxResult inspectionSelectTask(String user) {
|
|
|
|
|
List<CheckTaskInfo> list = apiService.inspectionSelectTask(user);
|
|
|
|
|
if (list == null || list.isEmpty()) {
|
|
|
|
|
return error("需要创建");
|
|
|
|
|
}
|
|
|
|
|
return success(list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据机位查询轮挡
|
|
|
|
@ -263,17 +257,37 @@ public class ApiController {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询巡检机位
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@PostMapping("/inspection/selectTask")
|
|
|
|
|
public AjaxResult inspectionSelectTask(@RequestParam(value = "state", defaultValue = "") String state) {
|
|
|
|
|
try {
|
|
|
|
|
int inspectionid = apiService.selectCodeFromRecode();
|
|
|
|
|
System.out.println(inspectionid + "-" + state);
|
|
|
|
|
List<CheckTaskInfo> list = apiService.inspectionSelectTask(state, inspectionid);
|
|
|
|
|
// if (list == null || list.isEmpty()) {
|
|
|
|
|
// return error("需要领用轮挡到机位");
|
|
|
|
|
// }
|
|
|
|
|
return success(list);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
return error("需要创建");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 轮挡报废
|
|
|
|
|
*
|
|
|
|
|
* @param epc
|
|
|
|
|
* @param user
|
|
|
|
|
* @param remark
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@PostMapping("/bf/submit")
|
|
|
|
|
public AjaxResult bfSubmit(String epc, String reason,String user, String remark,List<MultipartFile> files) {
|
|
|
|
|
public AjaxResult bfSubmit(String epc, String reason, String user, String remark, List<MultipartFile> files) {
|
|
|
|
|
//插入记录
|
|
|
|
|
RecordInvalidated recordInvalidated = new RecordInvalidated();
|
|
|
|
|
recordInvalidated.setEpc(epc);
|
|
|
|
@ -296,7 +310,7 @@ public class ApiController {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
System.out.println("上传图片路径:" + pathName);
|
|
|
|
|
apiService.insertBfImg(recordInvalidated.getObjid(),epc,user, pathName);
|
|
|
|
|
apiService.insertBfImg(recordInvalidated.getObjid(), epc, user, pathName);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|