rev:储料仓重量上线修改
This commit is contained in:
@@ -31,6 +31,8 @@ import org.nl.wms.scheduler_manage.service.extendtask.wash.WashSendMaterialQZTas
|
|||||||
import org.nl.wms.scheduler_manage.service.extendtask.wash.WashSendMaterialTask;
|
import org.nl.wms.scheduler_manage.service.extendtask.wash.WashSendMaterialTask;
|
||||||
import org.nl.wms.scheduler_manage.service.task.ISchBaseTaskService;
|
import org.nl.wms.scheduler_manage.service.task.ISchBaseTaskService;
|
||||||
import org.nl.wms.scheduler_manage.service.task.dao.SchBaseTask;
|
import org.nl.wms.scheduler_manage.service.task.dao.SchBaseTask;
|
||||||
|
import org.nl.wms.system_manage.service.param.ISysParamService;
|
||||||
|
import org.nl.wms.system_manage.service.param.dao.Param;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
@@ -68,6 +70,8 @@ public class PdaWashController {
|
|||||||
private WashSendMaterialTask washSendMaterialTask;
|
private WashSendMaterialTask washSendMaterialTask;
|
||||||
@Autowired
|
@Autowired
|
||||||
private WashSendMaterialQZTask washSendMaterialQZTask;
|
private WashSendMaterialQZTask washSendMaterialQZTask;
|
||||||
|
@Autowired
|
||||||
|
private ISysParamService paramService;
|
||||||
|
|
||||||
@PostMapping("/specList")
|
@PostMapping("/specList")
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
@@ -172,8 +176,12 @@ public class PdaWashController {
|
|||||||
throw new BadRequestException("选择的储料仓必须是相同物料");
|
throw new BadRequestException("选择的储料仓必须是相同物料");
|
||||||
}
|
}
|
||||||
double sum = list.stream().mapToDouble(a->a.getDeviceinstor_weight().doubleValue()).sum();
|
double sum = list.stream().mapToDouble(a->a.getDeviceinstor_weight().doubleValue()).sum();
|
||||||
|
Param one = paramService.getOne(new QueryWrapper<Param>().eq("code", "LIMIT_WEIGHT"));
|
||||||
|
if (one!=null && StringUtils.isNotEmpty(one.getValue())){
|
||||||
|
LIMIT_WEIGHT = Double.valueOf(one.getValue());
|
||||||
|
}
|
||||||
if (sum>LIMIT_WEIGHT){
|
if (sum>LIMIT_WEIGHT){
|
||||||
throw new BadRequestException("选择的储料仓必物料总重量大于150公斤");
|
throw new BadRequestException("选择的储料仓必物料总重量大于"+LIMIT_WEIGHT+"公斤");
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user