自动化立体仓库 - WMS系统
#
Junjie
8 天以前 0ad46baf0dc8247c4dc88b13e7126c532bc14951
src/main/java/com/zy/asrs/controller/MobileController.java
@@ -19,7 +19,9 @@
import com.zy.common.utils.Synchro;
import com.zy.common.web.BaseController;
import com.zy.nc.entity.NccJcQilibcBarcodeflowWms;
import com.zy.nc.entity.NccXsckmxTkWms;
import com.zy.nc.service.NccJcQilibcBarcodeflowWmsService;
import com.zy.nc.service.NccXsckmxTkWmsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
@@ -72,6 +74,9 @@
    @Autowired
    private OrderDetlPakinService orderDetlPakinService;
    @Autowired
    private NccXsckmxTkWmsService nccXsckmxTkWmsService;
    @RequestMapping("/pda/WarehouseOut/v1")
    @ManagerAuth(memo = "并板途中拣料-参考念初")
@@ -285,23 +290,19 @@
    @RequestMapping(value = "/mat/back")
    @ManagerAuth
    public R pdaSearchBack(@RequestParam String matnr) {
        EntityWrapper<NccJcQilibcBarcodeflowWms> wrapper = new EntityWrapper<>();
        wrapper.eq("VBARCODE", matnr).orderBy("ts", false);
        NccJcQilibcBarcodeflowWms nccJcQilibcBarcodeflowWms = nccJcQilibcBarcodeflowWmsService.selectOne(wrapper);
        if (null == nccJcQilibcBarcodeflowWms) {
        EntityWrapper<NccXsckmxTkWms> wrapper = new EntityWrapper<>();
        wrapper.like("VBATCHCODE", matnr);
        NccXsckmxTkWms nccXsckmxTkWms = nccXsckmxTkWmsService.selectOne(wrapper);
        if (null == nccXsckmxTkWms) {
            return R.error("未找到此条码");
        } else {
            if (!nccJcQilibcBarcodeflowWms.getInfla().equals("出库")) {
                return R.error("该条码最后一次不是出库");
            }
        }
        Mat mat = matService.selectByMatnr(nccJcQilibcBarcodeflowWms.getWlbm());
        Mat mat = matService.selectByMatnr(nccXsckmxTkWms.getWlbm());
        MatParam matParam = new MatParam();
        Synchro.Copy(mat, matParam);
        matParam.setBatch(nccJcQilibcBarcodeflowWms.getVbatchcode());
        matParam.setAnfme(nccJcQilibcBarcodeflowWms.getAsnnum() == null ? 0.0D : nccJcQilibcBarcodeflowWms.getAsnnum().doubleValue());
        matParam.setAnfme2(nccJcQilibcBarcodeflowWms.getNastnum() == null ? 0.0D : nccJcQilibcBarcodeflowWms.getNastnum().doubleValue());
        matParam.setTiaoma(nccJcQilibcBarcodeflowWms.getVbarcode());
        matParam.setBatch(nccXsckmxTkWms.getVbatchcode());
        matParam.setAnfme(0.0D);
        matParam.setAnfme2(0.0D);
//        matParam.setTiaoma(nccJcQilibcBarcodeflowWms.getVbarcode());
        return R.ok().add(matParam);
    }