fix:待检区增加货位校验

This commit is contained in:
zhangzq
2025-04-01 10:46:19 +08:00
parent 628d15c0c6
commit dd764c4d77
7 changed files with 24 additions and 11 deletions

View File

@@ -422,13 +422,7 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpack
.eq("point_code1", 浅Attr.getString("struct_code"))
.lt("task_status", TaskStatusEnum.FINISHED.getCode()));
if (!CollectionUtils.isEmpty(list)){
Optional<SchBaseTask> any = list.stream().filter(a -> !a.getPoint_code2().equals("ZXQ_1_1")).findAny();
if (any.isPresent()){
SchBaseTask errorTask = any.get();
throw new BadRequestException("当前木箱所在货位"+boxAttr.getString("struct_code")+"对应浅货位存在任务"+errorTask.getTask_code());
}else {
task_group_id = outBoxManageService.createBoxMove(浅Attr);
}
throw new BadRequestException("当前木箱所在货位"+boxAttr.getString("struct_code")+"对应浅货位存在任务"+浅Attr.getString("task_code"));
}
}else {
throw new BadRequestException("当前木箱所在货位"+boxAttr.getString("struct_code")+"对应浅货位存在任务"+浅Attr.getString("task_code"));

View File

@@ -57,7 +57,7 @@ public class AutoSendGzqToDjq extends Prun{
@SneakyThrows
public void sendGzqToDjq() {
log.info(THIS_CLASS+"-管制区->待检区定时任务开始执行扫描。");
RLock lock = redissonClient.getLock(THIS_CLASS);
RLock lock = redissonClient.getLock("todjq");
boolean tryLock = lock.tryLock(0, TimeUnit.SECONDS);
try {
if (tryLock) {

View File

@@ -62,7 +62,7 @@ public class AutoSendMzToDjq {
@SneakyThrows
public void sendMzqToDjq() {
log.info(THIS_CLASS+"-满轴->待检区定时任务开始执行扫描。");
RLock lock = redissonClient.getLock(THIS_CLASS);
RLock lock = redissonClient.getLock("todjq");
boolean tryLock = lock.tryLock(0, TimeUnit.SECONDS);
try {
if (tryLock) {

View File

@@ -64,7 +64,7 @@ public class AutoSendVehicleToDjq extends Prun{
@SneakyThrows
public void sendVehicleToDjqOrGzq(String isCalling, String block) {
log.info(THIS_CLASS + "-装箱区->待检区或管制区补空任务开始执行扫描。");
RLock lock = redissonClient.getLock(THIS_CLASS);
RLock lock = redissonClient.getLock("todjq");
boolean tryLock = lock.tryLock(0, TimeUnit.SECONDS);
try {
if (tryLock) {

View File

@@ -2035,6 +2035,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
Boolean compaerResult = jsonObject.getBoolean("compaer_result");
String box_no = jsonObject.getString("box_no");
Integer box_weight = jsonObject.getIntValue("box_weight");
Integer current_weight = jsonObject.getIntValue("current_weight");
if (compaerResult && inbound) {
whereJson.put("bill_type", IOSEnum.IN_TYPE.code("生产入库"));
//"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){
iPdmBiContainerinboundService
.update(new UpdateWrapper<PdmBiContainerinbound>()
.set("remark","称重"+whereJson.getIntValue("weight")+"与木箱重量"+box_weight+"不匹配")
.set("remark","称重"+current_weight+"与木箱重量"+box_weight+"不匹配")
.eq("box",box_no));
}
//更新子卷入库备注信息

View File

@@ -77,6 +77,7 @@ public class ComPareUtil {
json.put("compaer_result", compaer_result);
json.put("box_no", sub.getPackage_box_sn());
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));
return json;
}

View File

@@ -4,6 +4,7 @@ import cn.dev33.satoken.annotation.SaIgnore;
import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor;
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.service.iostorInv.IStIvtIostorinvOutService;
import org.nl.b_lms.storage_manage.ios.service.iostorInv.IStIvtIostorinvService;
@@ -51,6 +52,8 @@ public class CheckOutBillController {
private final OutBoxManageService outBoxManageService;
private final TwoSendOutTask twoSendOutTask;
@GetMapping
@Log("查询出库单")
@@ -438,6 +441,20 @@ public class CheckOutBillController {
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")
@Log("申请入库")
public ResponseEntity<Object> testIn(@RequestBody JSONObject whereJson) {