|
@@ -169,15 +169,16 @@ public class FbsWorkingStatisticsController {
|
|
|
res.setMsg("该订单还没有派工"+entity.getOrderNumber());
|
|
|
return new ResponseEntity<ResHttpStatus>(res, HttpStatus.OK);
|
|
|
}
|
|
|
- if(list.get(0).getNumberOfTasks().doubleValue()==Double.valueOf(list.get(0).getLatestCompletedQuantity())){
|
|
|
- res.setCode("1");
|
|
|
- res.setMsg("该订单计划数量已经全部入库"+entity.getOrderNumber());
|
|
|
- return new ResponseEntity<ResHttpStatus>(res, HttpStatus.OK);
|
|
|
- }
|
|
|
+// if(list.get(0).getPlannedQuantity().doubleValue()==Double.valueOf(list.get(0).getLatestCompletedQuantity())){
|
|
|
+// res.setCode("1");
|
|
|
+// res.setMsg("该订单计划数量已经全部入库"+entity.getOrderNumber());
|
|
|
+// return new ResponseEntity<ResHttpStatus>(res, HttpStatus.OK);
|
|
|
+// }
|
|
|
FbsWorkshopDispatchList workshopDispatchList = list.get(0);
|
|
|
//0初始,1接单,2暂停,3完成
|
|
|
if(StringUtils.isNotBlank(workshopDispatchList.getState()) && !workshopDispatchList.getState().equals("0") &&
|
|
|
- !workshopDispatchList.getState().equals("2")){
|
|
|
+ !workshopDispatchList.getState().equals("2")&&
|
|
|
+ !workshopDispatchList.getState().equals("3")){
|
|
|
res.setCode("1");
|
|
|
res.setMsg("该订单已开工,请勿再次操作"+entity.getOrderNumber());
|
|
|
return new ResponseEntity<ResHttpStatus>(res, HttpStatus.OK);
|
|
@@ -405,6 +406,9 @@ public class FbsWorkingStatisticsController {
|
|
|
// 计算差多少分钟
|
|
|
long min = diff / nm;
|
|
|
BigDecimal aa = new BigDecimal(min).divide(new BigDecimal("60"), 2, BigDecimal.ROUND_HALF_UP);
|
|
|
+ if(aa.doubleValue()>8.0){//超过八小时按照8小时计算
|
|
|
+ aa=new BigDecimal("8.0");
|
|
|
+ }
|
|
|
entity.setWorkingHours(aa);
|
|
|
entity.setFinalTime(new Date());//获取当前时间
|
|
|
|
|
@@ -467,9 +471,9 @@ public class FbsWorkingStatisticsController {
|
|
|
allNum = allNum.add(new BigDecimal(o.getQualifiedNumber()));
|
|
|
}
|
|
|
}
|
|
|
- if(allHors.doubleValue()>8.0){//超过八小时按照8小时计算
|
|
|
- allHors=new BigDecimal("8.0");
|
|
|
- }
|
|
|
+// if(allHors.doubleValue()>8.0){//超过八小时按照8小时计算
|
|
|
+// allHors=new BigDecimal("8.0");
|
|
|
+// }
|
|
|
|
|
|
if(entity.getState().equals("1")){
|
|
|
//把数据传入u8数据库
|