自动化立体仓库 - WMS系统
#
lsh
2024-01-15 105168a0c03b1361aefa8facc34639ca4ed676fd
#
10个文件已修改
1个文件已添加
511 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/MobileController.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/OpenController.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/WrkDetl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/param/PalletizingCompleteParam.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/param/TrussCombParam.java 88 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/MobileService.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/OpenService.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java 94 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java 172 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/utils/PostMesDataUtils.java 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/web/WcsController.java 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/MobileController.java
@@ -206,6 +206,13 @@
        return R.ok("组托成功");
    }
    @RequestMapping("/truss/order/auth")
    @ManagerAuth(memo = "退库,1楼桁架退库,退库单退库")
    public R trussCombOrder(@RequestBody TrussCombParam combParam){
        mobileService.trussCombOrder(combParam, getUserId());
        return R.ok("组托成功");
    }
    @RequestMapping("/truss/comd/auth")
    @ManagerAuth(memo = "手动入库,2楼无需桁架手动入库")
    public R trussComb2(@RequestBody PalletizingCompleteParam combParam){
src/main/java/com/zy/asrs/controller/OpenController.java
@@ -222,7 +222,7 @@
     * 中控:码垛完成下发入库信息
     */
    @PostMapping("/palletizing/complete/auth/v1")
    @AppAuth(memo = "码垛完成下发入库信息")
    @AppAuth(memo = "中控(2楼):码垛完成下发入库信息")
    public synchronized R palletizingComplete(@RequestHeader(required = false) String appkey,
                                           @RequestBody PalletizingCompleteParam param,
                                           HttpServletRequest request) {
@@ -234,6 +234,21 @@
    }
    /**
     * 松盛(1楼):码垛完成下发入库信息
     */
    @PostMapping("/palletizing/complete/auth/v2")
    @AppAuth(memo = "松盛(1楼):码垛完成下发入库信息")
    public synchronized R palletizingCompleteS(@RequestHeader(required = false) String appkey,
                                              @RequestBody PalletizingCompleteParam param,
                                              HttpServletRequest request) {
//        appkey = "ea1f0459efc02a79f046f982767939ae";
        auth(appkey, param, request);
        openService.palletizingComplete(param);
        return R.ok(param);
    }
    /**
     * 中控:出库完成月台相关
     */
    @PostMapping("/balcony/complete/auth/v1")
src/main/java/com/zy/asrs/entity/WrkDetl.java
@@ -128,7 +128,7 @@
    /**
     * 产地
     */
    @ApiModelProperty(value= "产地")
    @ApiModelProperty(value= "产地  //江铜 木箱位置")
    private String origin;
    /**
src/main/java/com/zy/asrs/entity/param/PalletizingCompleteParam.java
@@ -11,8 +11,11 @@
public class PalletizingCompleteParam {
    private String barcode;//    是    字符串    托盘码
    private String palletizingNo;//    是    字符串    码垛位编号
    private Integer palletizingNo = 147;//    是    字符串    码垛位编号
    private Integer palletizingNo2;//    是    字符串    目标位置编号
    private String boxType;//    是    字符串    木箱类型
    private String orderNo;//    是    字符串    订单编号
    private String uuid;//    是    字符串    订单编号
    private String createTime;//    是    字符串    创建时间
    private List<MatList> matLists;//        是    列表    拆垛货物信息(2箱,尾箱可能1箱)
@@ -27,6 +30,7 @@
        private Integer anfme;//    是    数字型    木箱中铜箔数量
        private String batch;//    (是否分批)    字符串    批次号
        private String specs;//    (是否需要)    字符串    规格
        private String standby4;//        卷信息uuid
        private List<MatDetlList> matDetlList;//        是    列表    木箱中铜箔信息
    }
@@ -39,20 +43,20 @@
        private String specsDetl;//    (是否需要)    字符串    规格
    }
    public Integer getDevNo$(){
        if (!Cools.isEmpty(this.palletizingNo)){
            switch (this.palletizingNo){
                case "1":
                    return 220;
                case "2":
                    return 216;
                case "3":
                    return 118;
                default:
                    return null;
            }
        }
        return null;
    }
//    public Integer getDevNo$(){
//        if (!Cools.isEmpty(this.palletizingNo)){
//            switch (this.palletizingNo){
//                case "1":
//                    return 219;
//                case "2":
//                    return 215;
//                case "3":
//                    return 118;
//                default:
//                    return null;
//            }
//        }
//        return null;
//    }
}
src/main/java/com/zy/asrs/entity/param/TrussCombParam.java
@@ -1,6 +1,16 @@
package com.zy.asrs.entity.param;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.core.common.SpringUtils;
import com.zy.asrs.entity.LocDetlRullUpDetail;
import com.zy.asrs.entity.Order;
import com.zy.asrs.entity.OrderDetl;
import com.zy.asrs.service.LocDetlRullUpDetailService;
import com.zy.asrs.service.OrderService;
import io.swagger.models.License;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
@@ -9,35 +19,77 @@
@Data
public class TrussCombParam {
    private String barcode;//        字符串    托盘码
    private String palletizingNo;//    是    字符串    码垛位编号
    private String palletizingNo2;//    是    字符串    目标码垛位编号
    private String boxType;//    是    字符串    木箱类型
    private String uuid;//        字符串    时间戳
    private String barcode;//        字符串    托盘码    订单共用                        //上传
    private Integer palletizingNo = 147;//    是    字符串    码垛位编号
    private Integer staStart  = 147;//    是    字符串    码垛位编号                               //上传
    private Integer palletizingNo2;//    是    字符串    目标码垛位编号    订单共用
    private Integer staEnd;//    是    字符串    目标码垛位编号    订单共用                 //上传
    private String boxType;//    是    字符串    木箱类型  brand                         //上传
    private String uuid;//        字符串    时间戳                                      //上传
    private String createTime;//        字符串    创建时间
    private String orderNo;//        字符串    订单号                                  //上传
    private List<MatList> matLists;//        是    列表    拆垛货物信息(2箱,尾箱可能1箱)
    private List<MatList> matList;//        是    列表    拆垛货物信息(2箱,尾箱可能1箱)    //上传
    @Data
    public static class MatList{
        private String matnr;//    是    字符串    物料编码
        private String maktx;//        字符串    物料名称
        private String boxNo;//    是    字符串    木箱编号(唯一字段,出库依据,出库时按照木箱编号出库)
        private String position;//    是    字符串    木箱位置(拆垛时需要)
        private Double weight;//    是    小数型    重量
        private Integer anfme;//        数字型    木箱中铜箔数量
        private String batch;//        字符串    批次号
        private String matnr;//    是    字符串    物料编码                                 //上传
        private String maktx;//        字符串    物料名称                                 //上传
        private String boxNo;//    是    字符串    木箱编号(唯一字段,出库依据,出库时按照木箱编号出库) batch      //上传
        private String position;//    是    字符串    木箱位置(拆垛时需要) origin             //上传
        private Double weight;//    是    小数型    重量                                   //上传
        private Integer anfme;//        数字型    木箱中铜箔数量                          //上传
        private String batch;//        字符串    箱号
        private String specs;//        字符串    规格
        private String standby4;//        卷信息Id                                   //上传
        private List<MatDetlList> matDetlList;//        是    列表    木箱中铜箔信息
    }
    @Data
    public static class MatDetlList{
        private String boxNoDetl;//    是    字符串    铜箔编号(唯一字段)
        private String positionDetl;//    是    字符串    铜箔位置(拆垛时需要)
        private Double weightDetl;//    是    小数型    重量
        private String batchDetl;//        字符串    批次号
        private String specsDetl;//        字符串    规格
        private String boxNoDetl;//    是    字符串    铜箔编号(唯一字段)                  //上传
        private String positionDetl;//    是    字符串    铜箔位置(拆垛时需要)             //上传
        private String weightDetl;//    是    小数型    重量                              //上传
        private String batchDetl;//        字符串    批次号                             //上传
        private String specsDetl;//        字符串    规格                              //上传
    }
    public TrussCombParam(){}
    public TrussCombParam(TrussCombParam trussCombParam, Order order, List<OrderDetl> orderDetlList){
        LocDetlRullUpDetailService locDetlRullUpDetailService = SpringUtils.getBean(LocDetlRullUpDetailService.class);
        this.barcode = trussCombParam.getBarcode();
        this.staStart = 147;
        this.staEnd = trussCombParam.getStaEnd();
        this.boxType = orderDetlList.get(0).getBrand();
        this.uuid = trussCombParam.getBarcode();
        this.orderNo = trussCombParam.getOrderNo();
        List<MatList> matLists = new ArrayList<>();
        for (OrderDetl orderDetl:orderDetlList){
            MatList matList = new MatList();
            matList.setMatnr(orderDetl.getMatnr());
            matList.setMaktx(orderDetl.getMaktx());
            matList.setAnfme(orderDetl.getAnfme().intValue());
            matList.setBatch(orderDetl.getBatch());
            matList.setBoxNo(orderDetl.getBatch());
            matList.setPosition("1");
            matList.setWeight(orderDetl.getWeight());
            matList.setSpecs(orderDetl.getSpecs());
            List<MatDetlList> matDetlLists= new ArrayList<>();
            List<LocDetlRullUpDetail> locDetlRullUpDetails = locDetlRullUpDetailService.selectList(new EntityWrapper<LocDetlRullUpDetail>().eq("uuid", orderDetl.getUnit()));
            for (LocDetlRullUpDetail locDetlRullUpDetail:locDetlRullUpDetails){
                MatDetlList matDetlList = new MatDetlList();
                matDetlList.setBoxNoDetl(locDetlRullUpDetail.getRollNo());
                matDetlList.setWeightDetl(locDetlRullUpDetail.getRollWeight());
                matDetlList.setBatchDetl(locDetlRullUpDetail.getStandby1());
                matDetlList.setSpecsDetl(locDetlRullUpDetail.getStandby2());
                matDetlLists.add(matDetlList);
            }
            matList.setMatDetlList(matDetlLists);
            matLists.add(matList);
        }
        this.matList = matLists;
    }
}
src/main/java/com/zy/asrs/service/MobileService.java
@@ -15,6 +15,7 @@
     */
    void comb(CombParam param, Long userId);
    void trussComb(TrussCombParam param, Long userId);
    void trussCombOrder(TrussCombParam param, Long userId);
    void trussComb2(PalletizingCompleteParam param, Long userId);
    /**
src/main/java/com/zy/asrs/service/OpenService.java
@@ -51,6 +51,7 @@
    void balconyComplete(LabellerMatParam param);
    void palletizingComplete(PalletizingCompleteParam param);
    void palletizingCompleteS(PalletizingCompleteParam param);
    void singleUnstackingComplete(SingleUnstackingCompleteParam param);
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -10,7 +10,9 @@
import com.zy.asrs.entity.param.*;
import com.zy.asrs.mapper.ManLocDetlMapper;
import com.zy.asrs.service.*;
import com.zy.asrs.task.core.ReturnT;
import com.zy.asrs.utils.MatUtils;
import com.zy.asrs.utils.PostMesDataUtils;
import com.zy.common.CodeRes;
import com.zy.common.constant.MesConstant;
import com.zy.common.entity.Parameter;
@@ -20,6 +22,7 @@
import com.zy.common.utils.HttpHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -35,6 +38,12 @@
@Slf4j
@Service
public class MobileServiceImpl implements MobileService {
    @Value("${srHangJia.url}")
    private String srHangJiaUrl;
    @Value("${srHangJia.reportOutPath}")
    private String reportOutPath;
    @Autowired
    private MatService matService;
@@ -74,13 +83,96 @@
    private ManLocDetlService manLocDetlService;
    @Autowired
    private ManLocDetlMapper manLocDetlMapper;
    @Autowired
    private DocTypeService docTypeService;
    @Override
    @Transactional
    public void trussComb(TrussCombParam param, Long userId) {
        param.setUuid(String.valueOf(new Date().getTime()));
        param.setBarcode(String.valueOf(new Date().getTime()));
        //判断param参数
        if (Cools.isEmpty(param.getPalletizingNo())){
            throw new CoolException("参数:码垛位编号 palletizingNo为空");
        }else if (Cools.isEmpty(param.getBoxType())){
            throw new CoolException("参数:木箱类型 boxType为空");
        }else if (Cools.isEmpty(param.getMatList()) || param.getMatList().size() != 1){
            throw new CoolException("参数:物料明细 matLists为空");
        }
        param.setStaEnd(param.getPalletizingNo2());
        try{
            ReturnT<String> success = new PostMesDataUtils().postMesData("桁架上位软件", srHangJiaUrl, reportOutPath, param);
            if (success.getCode()!=200){
                throw new CoolException("组托失败");
            }
        } catch (Exception e){
            throw new CoolException("组托失败");
        }
    }
    @Override
    @Transactional
    public void trussCombOrder(TrussCombParam param, Long userId) {
        param.setBarcode(String.valueOf(new Date().getTime()));
        //判断param参数
        if (Cools.isEmpty(param.getPalletizingNo())){
            throw new CoolException("参数:码垛位编号 palletizingNo为空");
        }else if (Cools.isEmpty(param.getOrderNo())){
            throw new CoolException("参数:退货单单号 orderNo为空");
        }else if (Cools.isEmpty(param.getMatList()) || param.getMatList().size() != 1){
            throw new CoolException("参数:物料明细 matLists为空");
        }
        Order order = orderService.selectByNo(param.getOrderNo());
        if (Cools.isEmpty(order)){
            throw new CoolException("未查询到此订单,单号:"+param.getOrderNo());
        }
        DocType docType = docTypeService.selectById(order.getDocType());
        if (Cools.isEmpty(docType) || !docType.getDocName().equals("退货入库单")){
            throw new CoolException("单号:"+param.getOrderNo()+"不是退货入库单");
        }
        List<OrderDetl> orderDetls = orderDetlService.selectByOrderId(order.getId());
        if (Cools.isEmpty(orderDetls) || orderDetls.size()==0){
            throw new CoolException("未查询到此订单明细,单号:"+param.getOrderNo());
        }
        List<String> orderBoxNoList = new ArrayList<>();
        for (OrderDetl orderDetl: orderDetls){
            if (orderDetl.getWorkQty()==0){
                orderBoxNoList.add(orderDetl.getBatch());
            }
        }
        if (orderBoxNoList.size()==0 || orderBoxNoList.size()<param.getMatList().size()){
            throw new CoolException("单号:"+param.getOrderNo()+" 退货数量大于明细数量");
        }
        List<String> matListBoxNoList = new ArrayList<>();
        for (TrussCombParam.MatList matList: param.getMatList()){
            if (!orderBoxNoList.contains(matList.getBoxNo())){
                throw new CoolException("单号:"+param.getOrderNo()+" 箱号:"+matList.getBatch()+"不属于此订单或者已经入库");
            }else {
                matListBoxNoList.add(matList.getBoxNo());
            }
        }
        List<OrderDetl> orderDetlList = new ArrayList<>();
        for (OrderDetl orderDetl: orderDetls){
            if (matListBoxNoList.contains(orderDetl.getBatch())){
                orderDetlList.add(orderDetl);
            }
        }
        TrussCombParam trussCombParam = new TrussCombParam(param, order, orderDetlList);
        try{
            ReturnT<String> success = new PostMesDataUtils().postMesData("桁架上位软件", srHangJiaUrl, reportOutPath, trussCombParam);
            if (success.getCode()!=200){
                throw new CoolException("组托失败");
            }
        } catch (Exception e){
            throw new CoolException("组托失败");
        }
    }
    @Override
    @Transactional
src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
@@ -1,6 +1,7 @@
package com.zy.asrs.service.impl;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.core.common.Cools;
import com.core.common.DateUtils;
import com.core.common.R;
@@ -14,9 +15,13 @@
import com.zy.asrs.service.*;
import com.zy.asrs.utils.MatUtils;
import com.zy.common.model.DetlDto;
import com.zy.common.model.LocTypeDto;
import com.zy.common.model.StartupDto;
import com.zy.common.model.enums.WorkNoType;
import com.zy.common.service.CommonService;
import com.zy.common.utils.NodeUtils;
import com.zy.common.web.WcsController;
import com.zy.common.web.param.SearchLocParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -71,6 +76,8 @@
    private WrkMastStaLogService wrkMastStaLogService;
    @Autowired
    private StaDescService staDescService;
    @Autowired
    private LocMastService locMastService;
    @Override
    @Transactional
@@ -788,6 +795,171 @@
    }
    /*
     * 松盛(1楼):码垛完成下发入库信息
     * */
    @Override
    @Transactional
    public void palletizingCompleteS(PalletizingCompleteParam param) {
        Long userId = 7776L;//松盛
        //判断param参数
        if (Cools.isEmpty(param.getBarcode())){
            throw new CoolException("参数:托盘码 barcode为空");
        }else if (Cools.isEmpty(param.getPalletizingNo())){
            throw new CoolException("参数:码垛位编号 palletizingNo为空");
        }else if (Cools.isEmpty(param.getBoxType())){
            throw new CoolException("参数:木箱类型 boxType为空");
        }else if (Cools.isEmpty(param.getMatLists()) || param.getMatLists().size()!=1){
            throw new CoolException("参数:物料明细 matLists为空");
        }
        ArrayList<String> positions = new ArrayList<>();   //木箱位置查重      (orgin)
        ArrayList<String> boxNos = new ArrayList<>();   //木箱唯一编码查重  (batch)
        //判断matLists参数
        for (PalletizingCompleteParam.MatList matList:param.getMatLists()){
            if (Cools.isEmpty(matList.getMatnr())){
                throw new CoolException("参数:物料编码 matnr为空");
            }else if (Cools.isEmpty(matList.getPosition())){
                throw new CoolException("物料编码:"+matList.getMatnr()+"、参数:码垛位置 position为空");
            }else if (Cools.isEmpty(matList.getBoxNo())){
                throw new CoolException("物料编码:"+matList.getMatnr()+"、参数:木箱编号 boxNo为空");
            }else if (Cools.isEmpty(matList.getAnfme()) || matList.getAnfme().equals(0)){
                throw new CoolException("物料编码:"+matList.getMatnr()+"、参数:木箱中铜箔数量 anfme为空");
            }else if (Cools.isEmpty(matList.getWeight()) || matList.getWeight().equals(0D)){
                throw new CoolException("物料编码:"+matList.getMatnr()+"、参数:重量 weight为空");
            }
            if (!positions.contains(matList.getPosition())){
                positions.add(matList.getPosition());
            }else {
                throw new CoolException("参数:木箱编号 boxNo:"+matList.getBoxNo()+",木箱位置存在重复:"+matList.getPosition());
            }
            if (!boxNos.contains(matList.getBoxNo())){
                boxNos.add(matList.getBoxNo());
            }else {
                throw new CoolException("参数:木箱编号 boxNo:"+matList.getBoxNo()+",木箱编码存在重复");
            }
        }
        BasDevp basDevp = basDevpService.selectById(param.getPalletizingNo2());
        if (Cools.isEmpty(basDevp)){
            throw new CoolException("参数:码垛位编号 palletizingNo="+param.getPalletizingNo2()+"不存在");
        }
        if (Cools.isEmpty(basDevp.getAutoing()) || !basDevp.getAutoing().equals("Y")){
            throw new CoolException("码垛位编号 palletizingNo="+param.getPalletizingNo()+" 所处站点不是自动状态");
        }
        if (Cools.isEmpty(basDevp.getLoading()) || !basDevp.getLoading().equals("Y")){
            throw new CoolException("码垛位编号 palletizingNo="+param.getPalletizingNo()+" 所处站点不是有物状态");
        }
//        if (Cools.isEmpty(basDevp.getCanining()) || !basDevp.getCanining().equals("Y")){
//            throw new CoolException("码垛位编号 palletizingNo="+param.getPalletizingNo()+" 所处站点不是能入状态");
//        }
        if (locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("zpallet", param.getBarcode()))!=0
                || wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet", param.getBarcode()))!=0
                || waitPakinService.selectCount(new EntityWrapper<WaitPakin>().eq("zpallet", param.getBarcode()))!=0){
            throw new CoolException("托盘条码:"+param.getBarcode()+"已存在,请勿重复组托");
        }
        Date now = new Date();
        List<WaitPakin> waitPakins = new ArrayList<>();
        String matnr = null;
        for (PalletizingCompleteParam.MatList matList:param.getMatLists()){
            long rollUp = new Date().getTime();
            Mat mat = matService.selectByMatnr(matList.getMatnr());
            if (Cools.isEmpty(mat)) {
                throw new CoolException(matList.getMatnr() + "商品档案不存在");
            }
            matnr = mat.getMatnr();
            WaitPakin waitPakin = new WaitPakin();
            waitPakin.sync(mat);
            waitPakin.setModel(matList.getBatch());     //批次
            waitPakin.setSpecs(matList.getSpecs());     //规格
            waitPakin.setBatch(matList.getBoxNo());       //木箱编码
            waitPakin.setBrand(param.getBoxType());     //木箱类型
            waitPakin.setZpallet(param.getBarcode());   //托盘码
            waitPakin.setOrigin(matList.getPosition()); //木箱在托盘上的位置
            waitPakin.setIoStatus("Y");     // 入出状态
            waitPakin.setAnfme(matList.getAnfme().doubleValue());  // 木箱中铜箔数量
            waitPakin.setStatus("Y");    // 状态
            waitPakin.setAppeUser(userId);
            waitPakin.setAppeTime(now);
            waitPakin.setModiUser(userId);
            waitPakin.setModiTime(now);
            waitPakin.setRollUp(rollUp);
            if (!Cools.isEmpty(matList.getMatDetlList())){
                for (PalletizingCompleteParam.MatDetlList matDetlList:matList.getMatDetlList()){
                    LocDetlRullUpDetail locDetlRullUpDetail = new LocDetlRullUpDetail();
                    locDetlRullUpDetail.setUuid(rollUp);
                    locDetlRullUpDetail.setRollNo(matDetlList.getBoxNoDetl());
                    locDetlRullUpDetail.setRollWeight(matDetlList.getWeightDetl().toString());
                    locDetlRullUpDetailService.insert(locDetlRullUpDetail);
                }
            }
            if (!waitPakinService.insert(waitPakin)) {
                throw new CoolException("保存入库通知档失败");
            }
            waitPakins.add(waitPakin);
        }
        LocTypeDto locTypeDto = new LocTypeDto();
        locTypeDto.setLocType1((short)1);
        StartupDto dto = commonService.getLocNo(1, 1, param.getPalletizingNo2(), matnr,null,null, locTypeDto);
        int workNo = dto.getWorkNo();
        // 生成工作档
        WrkMast wrkMast = new WrkMast();
        wrkMast.setWrkNo(workNo);
        wrkMast.setIoTime(new Date());
        wrkMast.setWrkSts(1L); // 工作状态:生成入库ID
        wrkMast.setIoType(1); // 入出库状态:1.入库
        wrkMast.setIoPri(13D); // 优先级
        wrkMast.setCrnNo(dto.getCrnNo());
        wrkMast.setSourceStaNo(dto.getSourceStaNo());
        wrkMast.setStaNo(dto.getStaNo());
        wrkMast.setLocNo(dto.getLocNo());
        wrkMast.setBarcode(param.getBarcode()); // 托盘码
        wrkMast.setFullPlt("Y"); // 满板:Y
        wrkMast.setPicking("N"); // 拣料
        wrkMast.setExitMk("N"); // 退出
        wrkMast.setEmptyMk("N"); // 空板
        wrkMast.setLinkMis("Y");
        wrkMast.setCtnType(0); // 容器类型
        // 操作人员数据
        wrkMast.setAppeTime(now);
        wrkMast.setModiTime(now);
        boolean res = wrkMastService.insert(wrkMast);
        if (!res) {
            throw new CoolException("保存工作档失败");
        }
        // 生成工作档明细
        waitPakins.forEach(waitPakin -> {
            WrkDetl wrkDetl = new WrkDetl();
            wrkDetl.sync(waitPakin);
            wrkDetl.setWrkNo(wrkMast.getWrkNo());
            wrkDetl.setIoTime(wrkMast.getIoTime());
            wrkDetl.setAppeTime(now);
            wrkDetl.setModiTime(now);
            if (!wrkDetlService.insert(wrkDetl)) {
                throw new CoolException("保存工作明细失败");
            }
        });
        // 更新目标库位状态
        LocMast locMast = locMastService.selectById(dto.getLocNo());
        if (locMast.getLocSts().equals("O")){
            locMast.setLocSts("S"); // S.入库预约
            locMast.setModiTime(now);
            if (!locMastService.updateById(locMast)){
                throw new CoolException("改变库位状态失败");
            }
        } else {
            throw new CoolException(dto.getLocNo()+"目标库位已被占用");
        }
    }
    /*
     *中控:出库完成月台相关
src/main/java/com/zy/asrs/utils/PostMesDataUtils.java
New file
@@ -0,0 +1,69 @@
package com.zy.asrs.utils;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.core.common.SpringUtils;
import com.core.exception.CoolException;
import com.zy.asrs.service.ApiLogService;
import com.zy.asrs.service.impl.ApiLogServiceImpl;
import com.zy.asrs.task.AbstractHandler;
import com.zy.asrs.task.core.ReturnT;
import com.zy.common.utils.HttpHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@Slf4j
public class PostMesDataUtils extends AbstractHandler<String> {
    public ReturnT<String> postMesData(String name,String URL,String mesPath, Object combParam){
//        if (true){
//            System.out.println("name:"+name+",URL:"+URL+",mesPath:"+mesPath+",combParam:"+combParam);
//            return SUCCESS;
//        }
        if(combParam != null){
            String response = "";
            boolean success = false;
            try {
//                Map<String, Object> map = new HashMap<>()
//                map.put("appkey","ea1f0459efc02a79f046f982767939ae");
                response = new HttpHandler.Builder()
//                        .setHeaders(map)
                        .setUri(URL)
                        .setPath(mesPath)
                        .setJson(JSON.toJSONString(combParam))
                        .build()
                        .doPost();
                System.out.println("response:"+response);
                JSONObject jsonObject = JSON.parseObject(response);
                if (jsonObject.getInteger("code").equals(200)) {
                    success = true;
                } else {
                    log.error("请求接口失败!!!url:{};request:{};response:{}", URL+"/"+mesPath, JSON.toJSONString(combParam), response);
                    throw new CoolException("上报"+name);
                }
            } catch (Exception e) {
                log.error("请求接口失败!!!url:{};request:{};response:{}", URL+"/"+mesPath, JSON.toJSONString(combParam), response);
//                      TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
                return FAIL.setMsg(e.getMessage());
            } finally {
                try {
                    // 保存接口日志
                    ApiLogService apiLogService = SpringUtils.getBean(ApiLogService.class);
                    apiLogService.save(
                            "上报"+name,
                            URL +"/"+ mesPath,
                            null,
                            "127.0.0.1",
                            JSON.toJSONString(combParam),
                            response,
                            success
                    );
                } catch (Exception e) {
                    log.error("", e); }
            }
        }
        return SUCCESS;
    }
}
src/main/java/com/zy/common/web/WcsController.java
@@ -271,12 +271,12 @@
        if (!waitPakinService.update(setParam, wrapper)) {
            throw new CoolException("更新通知档失败");
        }
        // 更新源站点信息
        sourceStaNo.setWrkNo(workNo);
        sourceStaNo.setModiTime(now);
        if (!basDevpService.updateById(sourceStaNo)){
            throw new CoolException("更新源站失败");
        }
//        // 更新源站点信息
////        sourceStaNo.setWrkNo(workNo);
//        sourceStaNo.setModiTime(now);
//        if (!basDevpService.updateById(sourceStaNo)){
//            throw new CoolException("更新源站失败");
//        }
        // 更新目标库位状态
        LocMast locMast = locMastService.selectById(dto.getLocNo());
        if (locMast.getLocSts().equals("O")){
@@ -323,12 +323,12 @@
        if (!res) {
            throw new CoolException("保存工作档失败");
        }
        // 更新源站点信息
        sourceStaNo.setWrkNo(workNo);
        sourceStaNo.setModiTime(new Date());
        if (!basDevpService.updateById(sourceStaNo)){
            throw new CoolException("更新源站失败");
        }
//        // 更新源站点信息
//        sourceStaNo.setWrkNo(workNo);
//        sourceStaNo.setModiTime(new Date());
//        if (!basDevpService.updateById(sourceStaNo)){
//            throw new CoolException("更新源站失败");
//        }
        // 更新目标库位状态
        LocMast locMast = locMastService.selectById(dto.getLocNo());
        if (locMast.getLocSts().equals("O")){