fix:木箱出库时存在移库任务将出库锁释放
This commit is contained in:
@@ -32,7 +32,7 @@ import java.util.stream.Collectors;
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class AutoSendVehicleToKzj {
|
||||
public class AutoSendVehicleToKzj extends Prun{
|
||||
|
||||
private final String THIS_CLASS = AutoSendVehicleToKzj.class.getName();
|
||||
@Resource
|
||||
|
||||
@@ -4,6 +4,8 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelation;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.service.IpdmBiSubpackagerelationService;
|
||||
import org.nl.b_lms.sch.task.dao.SchBaseTask;
|
||||
import org.nl.b_lms.sch.task.service.IschBaseTaskService;
|
||||
import org.nl.b_lms.sch.tasks.TwoExcepionalMoveTask;
|
||||
@@ -56,7 +58,7 @@ public class OutBoxManageServiceImpl implements OutBoxManageService {
|
||||
* 木箱信息服务
|
||||
*/
|
||||
@Autowired
|
||||
private IBstIvtBoxinfoService iBstIvtBoxinfoService;
|
||||
private IpdmBiSubpackagerelationService ipdmBiSubpackagerelationService;
|
||||
|
||||
/**
|
||||
* 任务服务
|
||||
@@ -161,47 +163,14 @@ public class OutBoxManageServiceImpl implements OutBoxManageService {
|
||||
}
|
||||
|
||||
}
|
||||
JSONObject jsonBox;
|
||||
if (structArray.size() < 4){
|
||||
jsonBox = structArray.getJSONObject(0);
|
||||
}else
|
||||
{
|
||||
//大于一个的话则走查找逻辑
|
||||
// 确定巷道:找相同规格木箱的最多的巷道
|
||||
if (ObjectUtil.isEmpty(block_num)) {
|
||||
block_num = getMaxBlock(whereJson);
|
||||
}
|
||||
// 确定排:找某一巷道规格木箱的最多排
|
||||
whereJson.put("block_num", block_num);
|
||||
String row_num = getMaxRow(whereJson);
|
||||
// 确定仓位
|
||||
whereJson.put("row_num", row_num);
|
||||
whereJson.put("notMove",true);
|
||||
jsonBox = getBox(whereJson);
|
||||
// 为空则新找巷道
|
||||
if (ObjectUtil.isEmpty(jsonBox)) {
|
||||
whereJson.put("flag", "1");
|
||||
notOutBlockList.add(whereJson.getString("block_num"));
|
||||
String join = "('" + String.join("','", notOutBlockList) + "')";
|
||||
whereJson.put("not_block_id", join);
|
||||
List<JSONObject> blockList = WQL.getWO("BST_OUTBOX").addParamMap(whereJson)
|
||||
.process().getResultJSONArray(0).toJavaList(JSONObject.class);
|
||||
for (int i = 0; i < blockList.size(); i++) {
|
||||
JSONObject json = blockList.get(i);
|
||||
json.put("stor_id", whereJson.getString("stor_id"));
|
||||
json.put("sect_id", whereJson.getString("sect_id"));
|
||||
json.put("box_length", whereJson.getString("box_length"));
|
||||
json.put("box_width", whereJson.getString("box_width"));
|
||||
json.put("box_high", whereJson.getString("box_high"));
|
||||
json.put("num", whereJson.getString("num"));
|
||||
String row_num_2 = getMaxRow(json);
|
||||
json.put("row_num", row_num_2);
|
||||
JSONObject jsonAttr_2 = getBox(json);
|
||||
if (ObjectUtil.isNotEmpty(jsonAttr_2)) {
|
||||
jsonBox = jsonAttr_2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
JSONObject jsonBox = null;
|
||||
for (int i = 0; i < structArray.size(); i++) {
|
||||
JSONObject jsonObject = structArray.getJSONObject(i);
|
||||
int count = ipdmBiSubpackagerelationService.count(new QueryWrapper<PdmBiSubpackagerelation>()
|
||||
.eq("package_box_sn", jsonObject.getString("storagevehicle_code")));
|
||||
if (count == 0){
|
||||
jsonBox = jsonObject;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ spring:
|
||||
url-pattern: /druid/*
|
||||
reset-enable: false
|
||||
filters:
|
||||
DruidFilter,stat
|
||||
`DruidFilter`,stat
|
||||
url: jdbc:mysql://10.1.3.87:3306/lms?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
username: root
|
||||
password: NLABC&hl123
|
||||
|
||||
Reference in New Issue
Block a user