fix:待检区增加货位校验
This commit is contained in:
@@ -422,13 +422,7 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpack
|
|||||||
.eq("point_code1", 浅Attr.getString("struct_code"))
|
.eq("point_code1", 浅Attr.getString("struct_code"))
|
||||||
.lt("task_status", TaskStatusEnum.FINISHED.getCode()));
|
.lt("task_status", TaskStatusEnum.FINISHED.getCode()));
|
||||||
if (!CollectionUtils.isEmpty(list)){
|
if (!CollectionUtils.isEmpty(list)){
|
||||||
Optional<SchBaseTask> any = list.stream().filter(a -> !a.getPoint_code2().equals("ZXQ_1_1")).findAny();
|
throw new BadRequestException("当前木箱所在货位"+boxAttr.getString("struct_code")+"对应浅货位存在任务"+浅Attr.getString("task_code"));
|
||||||
if (any.isPresent()){
|
|
||||||
SchBaseTask errorTask = any.get();
|
|
||||||
throw new BadRequestException("当前木箱所在货位"+boxAttr.getString("struct_code")+"对应浅货位存在任务"+errorTask.getTask_code());
|
|
||||||
}else {
|
|
||||||
task_group_id = outBoxManageService.createBoxMove(浅Attr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
throw new BadRequestException("当前木箱所在货位"+boxAttr.getString("struct_code")+"对应浅货位存在任务"+浅Attr.getString("task_code"));
|
throw new BadRequestException("当前木箱所在货位"+boxAttr.getString("struct_code")+"对应浅货位存在任务"+浅Attr.getString("task_code"));
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public class AutoSendGzqToDjq extends Prun{
|
|||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
public void sendGzqToDjq() {
|
public void sendGzqToDjq() {
|
||||||
log.info(THIS_CLASS+"-管制区->待检区定时任务开始执行扫描。");
|
log.info(THIS_CLASS+"-管制区->待检区定时任务开始执行扫描。");
|
||||||
RLock lock = redissonClient.getLock(THIS_CLASS);
|
RLock lock = redissonClient.getLock("todjq");
|
||||||
boolean tryLock = lock.tryLock(0, TimeUnit.SECONDS);
|
boolean tryLock = lock.tryLock(0, TimeUnit.SECONDS);
|
||||||
try {
|
try {
|
||||||
if (tryLock) {
|
if (tryLock) {
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public class AutoSendMzToDjq {
|
|||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
public void sendMzqToDjq() {
|
public void sendMzqToDjq() {
|
||||||
log.info(THIS_CLASS+"-满轴->待检区定时任务开始执行扫描。");
|
log.info(THIS_CLASS+"-满轴->待检区定时任务开始执行扫描。");
|
||||||
RLock lock = redissonClient.getLock(THIS_CLASS);
|
RLock lock = redissonClient.getLock("todjq");
|
||||||
boolean tryLock = lock.tryLock(0, TimeUnit.SECONDS);
|
boolean tryLock = lock.tryLock(0, TimeUnit.SECONDS);
|
||||||
try {
|
try {
|
||||||
if (tryLock) {
|
if (tryLock) {
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ public class AutoSendVehicleToDjq extends Prun{
|
|||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
public void sendVehicleToDjqOrGzq(String isCalling, String block) {
|
public void sendVehicleToDjqOrGzq(String isCalling, String block) {
|
||||||
log.info(THIS_CLASS + "-装箱区->待检区或管制区补空任务开始执行扫描。");
|
log.info(THIS_CLASS + "-装箱区->待检区或管制区补空任务开始执行扫描。");
|
||||||
RLock lock = redissonClient.getLock(THIS_CLASS);
|
RLock lock = redissonClient.getLock("todjq");
|
||||||
boolean tryLock = lock.tryLock(0, TimeUnit.SECONDS);
|
boolean tryLock = lock.tryLock(0, TimeUnit.SECONDS);
|
||||||
try {
|
try {
|
||||||
if (tryLock) {
|
if (tryLock) {
|
||||||
|
|||||||
@@ -2035,6 +2035,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
Boolean compaerResult = jsonObject.getBoolean("compaer_result");
|
Boolean compaerResult = jsonObject.getBoolean("compaer_result");
|
||||||
String box_no = jsonObject.getString("box_no");
|
String box_no = jsonObject.getString("box_no");
|
||||||
Integer box_weight = jsonObject.getIntValue("box_weight");
|
Integer box_weight = jsonObject.getIntValue("box_weight");
|
||||||
|
Integer current_weight = jsonObject.getIntValue("current_weight");
|
||||||
if (compaerResult && inbound) {
|
if (compaerResult && inbound) {
|
||||||
whereJson.put("bill_type", IOSEnum.IN_TYPE.code("生产入库"));
|
whereJson.put("bill_type", IOSEnum.IN_TYPE.code("生产入库"));
|
||||||
//"material_barcode":"C1101,","device_code":"RK1018","weight":500.95,"vehicle_code":"B01401","type":"1"
|
//"material_barcode":"C1101,","device_code":"RK1018","weight":500.95,"vehicle_code":"B01401","type":"1"
|
||||||
@@ -2055,7 +2056,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
if (!compaerResult){
|
if (!compaerResult){
|
||||||
iPdmBiContainerinboundService
|
iPdmBiContainerinboundService
|
||||||
.update(new UpdateWrapper<PdmBiContainerinbound>()
|
.update(new UpdateWrapper<PdmBiContainerinbound>()
|
||||||
.set("remark","称重"+whereJson.getIntValue("weight")+"与木箱重量"+box_weight+"不匹配")
|
.set("remark","称重"+current_weight+"与木箱重量"+box_weight+"不匹配")
|
||||||
.eq("box",box_no));
|
.eq("box",box_no));
|
||||||
}
|
}
|
||||||
//更新子卷入库备注信息
|
//更新子卷入库备注信息
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ public class ComPareUtil {
|
|||||||
json.put("compaer_result", compaer_result);
|
json.put("compaer_result", compaer_result);
|
||||||
json.put("box_no", sub.getPackage_box_sn());
|
json.put("box_no", sub.getPackage_box_sn());
|
||||||
json.put("box_weight", sub.getBox_weight().intValue());
|
json.put("box_weight", sub.getBox_weight().intValue());
|
||||||
|
json.put("current_weight", new BigDecimal(current_weight).intValue());
|
||||||
json.put("inbound", (pdmBiContainerinbound != null ? pdmBiContainerinbound.getInbound():false));
|
json.put("inbound", (pdmBiContainerinbound != null ? pdmBiContainerinbound.getInbound():false));
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import cn.dev33.satoken.annotation.SaIgnore;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.b_lms.sch.tasks.TwoSendOutTask;
|
||||||
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
||||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.IStIvtIostorinvOutService;
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.IStIvtIostorinvOutService;
|
||||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.IStIvtIostorinvService;
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.IStIvtIostorinvService;
|
||||||
@@ -51,6 +52,8 @@ public class CheckOutBillController {
|
|||||||
|
|
||||||
private final OutBoxManageService outBoxManageService;
|
private final OutBoxManageService outBoxManageService;
|
||||||
|
|
||||||
|
private final TwoSendOutTask twoSendOutTask;
|
||||||
|
|
||||||
|
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@Log("查询出库单")
|
@Log("查询出库单")
|
||||||
@@ -438,6 +441,20 @@ public class CheckOutBillController {
|
|||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/testSendOut2")
|
||||||
|
@Log("发货区测试2")
|
||||||
|
@SaIgnore
|
||||||
|
public ResponseEntity<Object> testSendOut2(@RequestBody JSONObject whereJson) {
|
||||||
|
//创建任务
|
||||||
|
JSONObject task_jo = new JSONObject();
|
||||||
|
task_jo.put("point_code1", whereJson.getString("point1"));
|
||||||
|
task_jo.put("point_code2", whereJson.getString("point2"));
|
||||||
|
task_jo.put("vehicle_code", whereJson.getString("vehicle_code"));
|
||||||
|
task_jo.put("task_type", "010708");
|
||||||
|
twoSendOutTask.createTask(task_jo);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("/testIn")
|
@PostMapping("/testIn")
|
||||||
@Log("申请入库")
|
@Log("申请入库")
|
||||||
public ResponseEntity<Object> testIn(@RequestBody JSONObject whereJson) {
|
public ResponseEntity<Object> testIn(@RequestBody JSONObject whereJson) {
|
||||||
|
|||||||
Reference in New Issue
Block a user