no message
parent
69424eea62
commit
46236c69d9
|
|
@ -133,10 +133,14 @@ public class MesServiceImpl implements MesService {
|
||||||
if (pick == null) {
|
if (pick == null) {
|
||||||
return gdNo + ":" + itemCode + ":" + station + "工单WMS不存在,叫料失败!";
|
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);
|
pick.setCallPoint(pointCode);
|
||||||
} else {
|
} 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);
|
pick.setIsCall(true);
|
||||||
pickRepository.save(pick);
|
pickRepository.save(pick);
|
||||||
|
|
@ -150,10 +154,14 @@ public class MesServiceImpl implements MesService {
|
||||||
if (pick == null) {
|
if (pick == null) {
|
||||||
return gdNo + ":" + completeCode + ":" + station + "工单WMS不存在,叫料失败!";
|
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);
|
pick.setCallPoint(pointCode);
|
||||||
} else {
|
} 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);
|
pick.setIsCall(true);
|
||||||
pickRepository.save(pick);
|
pickRepository.save(pick);
|
||||||
|
|
|
||||||
|
|
@ -582,9 +582,11 @@ public class TaskServiceImpl implements TaskService {
|
||||||
public void moveInventory(Task task, Stock dstStock, double moveQty) {
|
public void moveInventory(Task task, Stock dstStock, double moveQty) {
|
||||||
//将占用数量移位,原库存回库内
|
//将占用数量移位,原库存回库内
|
||||||
Inventory inventory = inventoryService.findById(task.getInvId());
|
Inventory inventory = inventoryService.findById(task.getInvId());
|
||||||
|
PickDetail pickDetail = task.getPickDetail();
|
||||||
|
Inventory newInventory = null;
|
||||||
|
if (inventory != null) {
|
||||||
ItemKey itemKey = inventory.getItemKey();
|
ItemKey itemKey = inventory.getItemKey();
|
||||||
Dept dept = inventory.getDept();
|
Dept dept = inventory.getDept();
|
||||||
PickDetail pickDetail = task.getPickDetail();
|
|
||||||
synchronized (inventory) {
|
synchronized (inventory) {
|
||||||
inventory.setQueuedQty(inventory.getQueuedQty() - moveQty);
|
inventory.setQueuedQty(inventory.getQueuedQty() - moveQty);
|
||||||
inventory.setQuantity(inventory.getQuantity() - moveQty);
|
inventory.setQuantity(inventory.getQuantity() - moveQty);
|
||||||
|
|
@ -594,15 +596,16 @@ public class TaskServiceImpl implements TaskService {
|
||||||
inventoryService.deleteAll(new Long[]{inventory.getId()});
|
inventoryService.deleteAll(new Long[]{inventory.getId()});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//生成新库存
|
//生成新库存
|
||||||
Inventory newInventory = inventoryService.createInventory(itemKey, dstStock.getPoint(), dstStock, dept, moveQty);
|
newInventory = inventoryService.createInventory(itemKey, dstStock.getPoint(), dstStock, dept, moveQty);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//更新Task
|
//更新Task
|
||||||
double planQty = task.getPlanQty();
|
double planQty = task.getPlanQty();
|
||||||
String status = task.getTaskStatus();
|
String status = task.getTaskStatus();
|
||||||
task.setInvId(inventory.getId());
|
task.setInvId(inventory==null?null:inventory.getId());
|
||||||
task.setNewInvId(newInventory.getId());
|
task.setNewInvId(newInventory==null?null:newInventory.getId());
|
||||||
task.setMoveQty(task.getMoveQty() + moveQty);
|
task.setMoveQty(task.getMoveQty() + moveQty);
|
||||||
task.setDstStock(dstStock);
|
task.setDstStock(dstStock);
|
||||||
task.setDstStockCode(dstStock.getCode());
|
task.setDstStockCode(dstStock.getCode());
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,16 @@ public class EladminSystemApplicationTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
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();
|
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
|
||||||
// 设置服务接口
|
// 设置服务接口
|
||||||
factory.setServiceClass(TestService.class);
|
factory.setServiceClass(TestService.class);
|
||||||
|
|
@ -34,8 +44,6 @@ public class EladminSystemApplicationTests {
|
||||||
factory.setAddress("http://example.com/yourService");
|
factory.setAddress("http://example.com/yourService");
|
||||||
|
|
||||||
String result = testService.pickAndPost("123");
|
String result = testService.pickAndPost("123");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void cc(){
|
public void cc(){
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue