no message

main
HUOJIN\92525 2025-03-10 10:43:05 +08:00
parent 69424eea62
commit 46236c69d9
3 changed files with 37 additions and 18 deletions

View File

@ -133,10 +133,14 @@ public class MesServiceImpl implements MesService {
if (pick == null) {
return gdNo + ":" + itemCode + ":" + station + "工单WMS不存在叫料失败!";
}
if (pick.getCallPoint() == null || pick.getCallPoint().length() <= 0) {
String currentCallPoint = pick.getCallPoint();
if (currentCallPoint == null || currentCallPoint.isEmpty()) {
pick.setCallPoint(pointCode);
} else {
pick.setCallPoint(pick.getCallPoint() + "," + pointCode);
Set<String> callPointSet = new HashSet<>(Arrays.asList(currentCallPoint.split(",")));
callPointSet.add(pointCode);
String newCallPoint = String.join(",", callPointSet);
pick.setCallPoint(newCallPoint);
}
pick.setIsCall(true);
pickRepository.save(pick);
@ -150,10 +154,14 @@ public class MesServiceImpl implements MesService {
if (pick == null) {
return gdNo + ":" + completeCode + ":" + station + "工单WMS不存在叫料失败!";
}
if (pick.getCallPoint() == null || pick.getCallPoint().length() <= 0) {
String currentCallPoint = pick.getCallPoint();
if (currentCallPoint == null || currentCallPoint.isEmpty()) {
pick.setCallPoint(pointCode);
} else {
pick.setCallPoint(pick.getCallPoint() + "," + pointCode);
Set<String> callPointSet = new HashSet<>(Arrays.asList(currentCallPoint.split(",")));
callPointSet.add(pointCode);
String newCallPoint = String.join(",", callPointSet);
pick.setCallPoint(newCallPoint);
}
pick.setIsCall(true);
pickRepository.save(pick);

View File

@ -582,27 +582,30 @@ public class TaskServiceImpl implements TaskService {
public void moveInventory(Task task, Stock dstStock, double moveQty) {
//将占用数量移位,原库存回库内
Inventory inventory = inventoryService.findById(task.getInvId());
ItemKey itemKey = inventory.getItemKey();
Dept dept = inventory.getDept();
PickDetail pickDetail = task.getPickDetail();
synchronized (inventory) {
inventory.setQueuedQty(inventory.getQueuedQty() - moveQty);
inventory.setQuantity(inventory.getQuantity() - moveQty);
inventoryService.update(inventory);
Inventory newInventory = null;
if (inventory != null) {
ItemKey itemKey = inventory.getItemKey();
Dept dept = inventory.getDept();
synchronized (inventory) {
inventory.setQueuedQty(inventory.getQueuedQty() - moveQty);
inventory.setQuantity(inventory.getQuantity() - moveQty);
inventoryService.update(inventory);
if (inventory.getQuantity() == 0) {
inventoryService.deleteAll(new Long[]{inventory.getId()});
if (inventory.getQuantity() == 0) {
inventoryService.deleteAll(new Long[]{inventory.getId()});
}
}
//生成新库存
newInventory = inventoryService.createInventory(itemKey, dstStock.getPoint(), dstStock, dept, moveQty);
}
//生成新库存
Inventory newInventory = inventoryService.createInventory(itemKey, dstStock.getPoint(), dstStock, dept, moveQty);
//更新Task
double planQty = task.getPlanQty();
String status = task.getTaskStatus();
task.setInvId(inventory.getId());
task.setNewInvId(newInventory.getId());
task.setInvId(inventory==null?null:inventory.getId());
task.setNewInvId(newInventory==null?null:newInventory.getId());
task.setMoveQty(task.getMoveQty() + moveQty);
task.setDstStock(dstStock);
task.setDstStockCode(dstStock.getCode());

View File

@ -27,6 +27,16 @@ public class EladminSystemApplicationTests {
}
public static void main(String[] args) {
String pointCode = "QXJL002";
String currentCallPoint="QXJL001,QXJL002,QXJL001";
Set<String> callPointSet = new HashSet<>(Arrays.asList(currentCallPoint.split(",")));
callPointSet.add(pointCode);
String newCallPoint = String.join(",", callPointSet);
System.out.println(newCallPoint);
}
public void cc1(){
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
// 设置服务接口
factory.setServiceClass(TestService.class);
@ -34,8 +44,6 @@ public class EladminSystemApplicationTests {
factory.setAddress("http://example.com/yourService");
String result = testService.pickAndPost("123");
}
public void cc(){