|
@@ -197,12 +197,22 @@ public class FbsWorkingStatisticsController {
|
|
res.setMsg("参数不能为空");
|
|
res.setMsg("参数不能为空");
|
|
return new ResponseEntity<ResHttpStatus>(res, HttpStatus.OK);
|
|
return new ResponseEntity<ResHttpStatus>(res, HttpStatus.OK);
|
|
}
|
|
}
|
|
- if(StringUtils.isBlank(entity.getId())){
|
|
+
|
|
|
|
+
|
|
|
|
+ QueryWrapper<FbsWorkingStatistics> workingStatisticsQueryWrapper = new QueryWrapper<>();
|
|
|
|
+ workingStatisticsQueryWrapper.eq("personnel_Code", entity.getPersonnelCode()).eq("del_flag", 0);
|
|
|
|
+ workingStatisticsQueryWrapper.eq("order_number", entity.getOrderNumber());
|
|
|
|
+ workingStatisticsQueryWrapper.eq("final_State", 1);
|
|
|
|
+
|
|
|
|
+ List<FbsWorkingStatistics> list2 = fbsWorkingStatisticsService.list(workingStatisticsQueryWrapper);
|
|
|
|
+
|
|
|
|
+ if(list2.size() < 1){
|
|
res.setCode("1");
|
|
res.setCode("1");
|
|
- res.setMsg("报工单id不能为空");
|
|
+ res.setMsg("人员编码或者订单号不正确");
|
|
return new ResponseEntity<ResHttpStatus>(res, HttpStatus.OK);
|
|
return new ResponseEntity<ResHttpStatus>(res, HttpStatus.OK);
|
|
}else{
|
|
}else{
|
|
- FbsWorkingStatistics par = fbsWorkingStatisticsService.getById(entity.getId());
|
|
+
|
|
|
|
+ FbsWorkingStatistics par = list2.get(0);
|
|
if(par != null){
|
|
if(par != null){
|
|
Date firstTime = par.getFirstTime();
|
|
Date firstTime = par.getFirstTime();
|
|
long diff = new Date().getTime() - firstTime.getTime();
|
|
long diff = new Date().getTime() - firstTime.getTime();
|
|
@@ -302,12 +312,21 @@ public class FbsWorkingStatisticsController {
|
|
res.setMsg("参数不能为空 ");
|
|
res.setMsg("参数不能为空 ");
|
|
return new ResponseEntity<ResHttpStatus>(res, HttpStatus.OK);
|
|
return new ResponseEntity<ResHttpStatus>(res, HttpStatus.OK);
|
|
}
|
|
}
|
|
- if(StringUtils.isBlank(entity.getId())){
|
|
+
|
|
|
|
+ QueryWrapper<FbsWorkingStatistics> workingStatisticsQueryWrapper = new QueryWrapper<>();
|
|
|
|
+ workingStatisticsQueryWrapper.eq("personnel_Code", entity.getPersonnelCode()).eq("del_flag", 0);
|
|
|
|
+ workingStatisticsQueryWrapper.eq("order_number", entity.getOrderNumber());
|
|
|
|
+ workingStatisticsQueryWrapper.in("final_State", 1);
|
|
|
|
+
|
|
|
|
+ List<FbsWorkingStatistics> list2 = fbsWorkingStatisticsService.list(workingStatisticsQueryWrapper);
|
|
|
|
+
|
|
|
|
+ if(list2.size() < 1){
|
|
res.setCode("1");
|
|
res.setCode("1");
|
|
res.setMsg("报工单id不能为空");
|
|
res.setMsg("报工单id不能为空");
|
|
return new ResponseEntity<ResHttpStatus>(res, HttpStatus.OK);
|
|
return new ResponseEntity<ResHttpStatus>(res, HttpStatus.OK);
|
|
}
|
|
}
|
|
- FbsWorkingStatistics par = fbsWorkingStatisticsService.getById(entity.getId());
|
|
+
|
|
|
|
+ FbsWorkingStatistics par = list2.get(0);
|
|
if(par != null){
|
|
if(par != null){
|
|
if(par.getState().equals("1")){
|
|
if(par.getState().equals("1")){
|
|
res.setCode("1");
|
|
res.setCode("1");
|