自动化立体仓库 - WMS系统
#
pang.jiabao
4 天以前 2dc12d419733c094bb0bbc7ef4f7a32d5067cfb9
src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java
@@ -8,10 +8,7 @@
import com.zy.asrs.entity.DocType;
import com.zy.asrs.entity.Order;
import com.zy.asrs.entity.OrderDetl;
import com.zy.asrs.service.ApiLogService;
import com.zy.asrs.service.DocTypeService;
import com.zy.asrs.service.OrderDetlService;
import com.zy.asrs.service.OrderService;
import com.zy.asrs.service.*;
import com.zy.asrs.task.AbstractHandler;
import com.zy.asrs.task.core.ReturnT;
import com.zy.asrs.utils.OrderInAndOutUtil;
@@ -26,6 +23,7 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
@@ -46,6 +44,14 @@
    private ApiLogService apiLogService;
    @Autowired
    private DocTypeService docTypeService;
    @Resource
    private MesService mesService;
    //TODO:完成订单时推送MES recvFeedback(orderNo);
    // mesService.inFeedback(memo.getString("OrderNo"));
    //                        // 出库完成
    //                        mesService.outFeedback(memo.getString("OrderNo"));
    @Transactional
    public ReturnT<String> startOrderIssuedOnceMore(Order order) {
@@ -112,6 +118,7 @@
            }
        }
        for (OrderDetl orderDetl : orderDetlList){
            orderDetl.setWorkQty(0D);
            OrderInAndOutUtil.insertOrderDetl(order.getPakinPakoutStatus$(),order,orderDetl);
        }
        // 修改订单状态 1.未作业 ===>> 2.作业中
@@ -189,14 +196,15 @@
            String response = "";
            boolean success = false;
            try {
                response = new HttpHandler.Builder()
                        .setUri(MesConstant.URL)
                        .setPath(MesConstant.PAKIN_URL)
                        .setJson(JSON.toJSONString(pakinParam))
                        .build()
                        .doPost();
                JSONObject jsonObject = JSON.parseObject(response);
                if (jsonObject.getInteger("code").equals(200)) {
//                response = new HttpHandler.Builder()
//                        .setUri(MesConstant.URL)
//                        .setPath(MesConstant.PAKIN_URL)
//                        .setJson(JSON.toJSONString(pakinParam))
//                        .build()
//                        .doPost();
//                JSONObject jsonObject = JSON.parseObject(response);
//                if (jsonObject.getInteger("code").equals(200)) {
                if (true) {
                    success = true;
                    // 修改订单状态 4.完成 ===>> 6.已上报
                    if (!orderService.updateSettle(order.getId(), settle, null)) {
@@ -246,14 +254,15 @@
            String response = "";
            boolean success = false;
            try {
                response = new HttpHandler.Builder()
                        .setUri(MesConstant.URL)
                        .setPath(MesConstant.PAKOUT_URL)
                        .setJson(JSON.toJSONString(pakoutParam))
                        .build()
                        .doPost();
                JSONObject jsonObject = JSON.parseObject(response);
                if (jsonObject.getInteger("code").equals(200)) {
//                response = new HttpHandler.Builder()
//                        .setUri(MesConstant.URL)
//                        .setPath(MesConstant.PAKOUT_URL)
//                        .setJson(JSON.toJSONString(pakoutParam))
//                        .build()
//                        .doPost();
//                JSONObject jsonObject = JSON.parseObject(response);
//                if (jsonObject.getInteger("code").equals(200)) {
                if (true) {
                    success = true;
                    // 修改订单状态 4.完成 ===>> 6.已上报
                    if (!orderService.updateSettle(order.getId(), settle, null)) {