自动化立体仓库 - WMS系统
zjj
2023-06-16 80ce0de01bd20da10383704e5abd469cdd492089
Merge remote-tracking branch 'origin/stasrs_test' into stasrs_test
13个文件已修改
69 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/ManLocDetlController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/MobileController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/NodeController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/ManLocDetlService.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/MobileService.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/NodeService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/ManLocDetlServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/NodeServiceImpl.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/utils/SaasUtils.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/system/entity/SaasLog.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/SaasLogMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/saasLog/saasLog.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/ManLocDetlController.java
@@ -76,7 +76,7 @@
    @RequestMapping("/manLocDetl/adjust/start")
    @ManagerAuth(memo = "库存调整")
    public R locDetlAdjustStart(@RequestBody LocDetlAdjustParam param) {
        manLocDetlService.adjustLocDetl(param, getUserId(),getUser());
        manLocDetlService.adjustLocDetl(param, getUserId());
        return R.ok("库存调整成功");
    }
src/main/java/com/zy/asrs/controller/MobileController.java
@@ -347,7 +347,7 @@
        if (json == null){
            return R.error("传入数据为空");
        }
        return mobileService.manDetlIn(json , getUser());
        return mobileService.manDetlIn(json);
    }
    //平库pda下架
@@ -357,7 +357,7 @@
        if (json == null){
            return R.error("传入数据为空");
        }
        return mobileService.manDetlOut(json,getUser());
        return mobileService.manDetlOut(json);
    }
}
src/main/java/com/zy/asrs/controller/NodeController.java
@@ -314,13 +314,13 @@
        if (node.getType() != 3) {
          return R.error("仅可选择货位");
        }
        return nodeService.stockPakin(number, getUserId(), getHostId(),getUser());
        return nodeService.stockPakin(number, getUserId(), getHostId());
    }
    @RequestMapping("/work/stock/pakout")
    @ManagerAuth(memo = "出库")
    public R initPakout(@RequestBody List<InitPakoutParam> params) {
        return nodeService.initPakout(params, getUserId(), getHostId(),getUser());
        return nodeService.initPakout(params, getUserId(), getHostId());
    }
    @PostMapping(value = "/work/empty/stock")
@@ -333,7 +333,7 @@
    @ManagerAuth(memo = "库位移转")
    public R locMoveStart(@RequestParam String sourceLocNo,
                          @RequestParam String targetLocNo) {
        nodeService.locMove(sourceLocNo, targetLocNo, getUserId(),getUser());
        nodeService.locMove(sourceLocNo, targetLocNo, getUserId());
        return R.ok("移库启动成功");
    }
    @RequestMapping(value = "/node/select/{id}/auth")
src/main/java/com/zy/asrs/service/ManLocDetlService.java
@@ -5,7 +5,6 @@
import com.zy.asrs.entity.ManLocDetl;
import com.zy.asrs.entity.param.LocDetlAdjustParam;
import com.zy.asrs.entity.result.StockVo;
import com.zy.system.entity.User;
import java.util.List;
import java.util.Set;
@@ -59,7 +58,7 @@
    Page<ManLocDetl> getOutPage(Page<ManLocDetl> manLocDetlPage);
    void adjustLocDetl(LocDetlAdjustParam param, Long userId, User user);
    void adjustLocDetl(LocDetlAdjustParam param, Long userId);
    Page<ManLocDetl> selectAllPage(Page<ManLocDetl> param);
src/main/java/com/zy/asrs/service/MobileService.java
@@ -8,7 +8,6 @@
import com.zy.asrs.entity.param.CombParam;
import com.zy.asrs.entity.param.MobileAdjustParam;
import com.zy.asrs.entity.param.OffSaleParam;
import com.zy.system.entity.User;
import java.util.Date;
@@ -41,7 +40,7 @@
    void stockOut(OrderDetl orderDetl, BasDevp staNo, LocDetl locDetl,
                  Double curOutQty, Integer ioType, Long userId, Date now);
    R manDetlIn(JSONObject json, User user);
    R manDetlIn(JSONObject json);
    R manDetlOut(JSONObject json,User user);
    R manDetlOut(JSONObject json);
}
src/main/java/com/zy/asrs/service/NodeService.java
@@ -7,7 +7,6 @@
import com.zy.asrs.entity.Node;
import com.zy.asrs.entity.param.InitPakoutParam;
import com.zy.asrs.entity.param.PakinParam;
import com.zy.system.entity.User;
import java.util.List;
@@ -23,11 +22,11 @@
        Node selectByUuid(String uuid, Long hostId, Integer type, Long parentId);
    R stockPakin(PakinParam number, Long userId, Long hostId, User user);
    R stockPakin(PakinParam number, Long userId, Long hostId);
        R initPakout(List<InitPakoutParam> params, Long userId, Long hostId, User user);
        R initPakout(List<InitPakoutParam> params, Long userId, Long hostId);
    void locMove(String sourceLocNo, String targetLocNo, Long userId , User user);
    void locMove(String sourceLocNo, String targetLocNo, Long userId);
    Page<Node> getPage(Page<Node> page);
}
src/main/java/com/zy/asrs/service/impl/ManLocDetlServiceImpl.java
@@ -12,7 +12,6 @@
import com.zy.asrs.service.MatService;
import com.zy.asrs.service.NodeService;
import com.zy.asrs.utils.SaasUtils;
import com.zy.system.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -143,7 +142,7 @@
    @Transactional
    @Override
    public void adjustLocDetl(LocDetlAdjustParam param, Long userId , User user) {
    public void adjustLocDetl(LocDetlAdjustParam param, Long userId) {
        Date now = new Date();
        this.baseMapper.delete(new EntityWrapper<ManLocDetl>()
                .eq("loc_no", param.getLocNo()));
@@ -173,7 +172,7 @@
            manLocDetl.setUnit(mat.getUnit());
            manLocDetl.setBarcode(mat.getBarcode());
            manLocDetl.setPrice(mat.getPrice());
            SaasUtils.insertLog(3,manLocDetl.getLocNo(), manLocDetl.getMatnr(),manLocDetl.getAnfme(),user.getUsername());
            SaasUtils.insertLog(3,manLocDetl.getLocNo(), manLocDetl.getMatnr(),manLocDetl.getAnfme());
            this.baseMapper.insert(manLocDetl);
        }
    }
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -24,8 +24,6 @@
import com.zy.common.service.CommonService;
import com.zy.common.utils.HttpHandler;
import com.zy.common.utils.Synchro;
import com.zy.common.web.BaseController;
import com.zy.system.entity.User;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -82,8 +80,6 @@
    private ManLocDetlService manLocDetlService;
    @Autowired
    private ManLocDetlMapper manLocDetlMapper;
    private BaseController baseController;
    @Override
@@ -523,7 +519,7 @@
    @Transactional
    @Override
    public R manDetlIn(JSONObject json, User user) {
    public R manDetlIn(JSONObject json) {
        Date date = new Date();
        String jsonLocNo = (String) json.get("locNo");
        Node node = nodeService.selectOne(new EntityWrapper<Node>()
@@ -608,7 +604,7 @@
            }
            orderService.checkComplete(order.getOrderNo());
            SaasUtils.insertLog(0,jsonLocNo,jsonOrderDetl.getMatnr(), jsonOrderDetl.getAnfme(),user.getUsername());
            SaasUtils.insertLog(0,jsonLocNo,jsonOrderDetl.getMatnr(), jsonOrderDetl.getAnfme());
        }
@@ -617,7 +613,7 @@
    @Transactional
    @Override
    public R manDetlOut(JSONObject json,User user) {
    public R manDetlOut(JSONObject json) {
        Date date = new Date();
        String jsonLocNo = (String) json.get("locNo");
        Node node = nodeService.selectOne(new EntityWrapper<Node>()
@@ -727,7 +723,7 @@
                    return R.error("更新平库库存状态失败");
                }
            }
            SaasUtils.insertLog(1,jsonLocNo,jsonOrderDetl.getMatnr(), jsonOrderDetl.getAnfme(),user.getUsername());
            SaasUtils.insertLog(1,jsonLocNo,jsonOrderDetl.getMatnr(), jsonOrderDetl.getAnfme());
        }
        return R.ok("下架完成");
src/main/java/com/zy/asrs/service/impl/NodeServiceImpl.java
@@ -19,7 +19,6 @@
import com.zy.asrs.service.*;
import com.zy.asrs.utils.SaasUtils;
import com.zy.asrs.utils.VersionUtils;
import com.zy.system.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -85,7 +84,7 @@
    }
    @Override
    public R stockPakin(PakinParam param, Long userId, Long hostId , User user) {
    public R stockPakin(PakinParam param, Long userId, Long hostId) {
        Node node = nodeService.selectByUuid(param.getNodeId(), hostId);
        if (node == null) {
            node = nodeService.selectById(param.getNodeId());
@@ -123,7 +122,7 @@
                manLocDetl.setCreateBy(userId);
                manLocDetl.setStatus(1);
                manLocDetl.setPayment(1);
                SaasUtils.insertLog(0,manLocDetl.getLocNo(),manLocDetl.getMatnr(), manLocDetl.getAnfme(),user.getUsername());
                SaasUtils.insertLog(0,manLocDetl.getLocNo(),manLocDetl.getMatnr(), manLocDetl.getAnfme());
                manLocDetlService.insert(manLocDetl);
            }else {
                check.setAnfme(dto.getCount() + check.getAnfme());
@@ -145,7 +144,7 @@
    @Transactional
    @Override
    public R initPakout(List<InitPakoutParam> params, Long userId, Long hostId, User user) {
    public R initPakout(List<InitPakoutParam> params, Long userId, Long hostId) {
        if (!Cools.isEmpty(params)) {
            Date now = new Date();
            for (InitPakoutParam param : params) {
@@ -163,7 +162,7 @@
                if (manLocDetl.getAnfme() - param.getCount() < 0) {
                    return R.error("物料:"+ param.getMatnr() + " 在库位中数量不足");
                } else if (manLocDetl.getAnfme() - param.getCount() == 0) {
                    SaasUtils.insertLog(1,manLocDetl.getLocNo(), manLocDetl.getMatnr(),param.getCount(),user.getUsername());
                    SaasUtils.insertLog(1,manLocDetl.getLocNo(), manLocDetl.getMatnr(),param.getCount());
                    manLocDetlService.delete(new EntityWrapper<ManLocDetl>()
                            .eq("loc_no",node.getUuid())
                            .eq("matnr",param.getMatnr()));
@@ -173,7 +172,7 @@
                    manLocDetlService.update(manLocDetl,new EntityWrapper<ManLocDetl>()
                            .eq("loc_no",node.getUuid())
                            .eq("matnr",param.getMatnr()));
                    SaasUtils.insertLog(1,manLocDetl.getLocNo(), manLocDetl.getMatnr(),param.getCount(),user.getUsername());
                    SaasUtils.insertLog(1,manLocDetl.getLocNo(), manLocDetl.getMatnr(),param.getCount());
                }
            }
        }
@@ -182,7 +181,7 @@
    @Transactional
    @Override
    public void locMove(String sourceLocNo, String targetLocNo, Long userId, User user) {
    public void locMove(String sourceLocNo, String targetLocNo, Long userId) {
        List<ManLocDetl> sourceManDetl = manLocDetlService.selectList(new EntityWrapper<ManLocDetl>()
                .like("loc_no", sourceLocNo));
        for (ManLocDetl source : sourceManDetl) {
@@ -201,7 +200,7 @@
                source.setLocNo(targetNode.getUuid());
                source.setNodeId(targetNode.getId());
                SaasUtils.insertLog(2,source.getLocNo(), source.getMatnr(), source.getAnfme(),user.getUsername());
                SaasUtils.insertLog(2,source.getLocNo(), source.getMatnr(), source.getAnfme());
                manLocDetlService.insert(source);
            }else {
                check.setAnfme(check.getAnfme() + source.getAnfme());
src/main/java/com/zy/asrs/utils/SaasUtils.java
@@ -1,13 +1,14 @@
package com.zy.asrs.utils;
import com.core.common.SpringUtils;
import com.fasterxml.jackson.databind.util.BeanUtil;
import com.zy.system.entity.SaasLog;
import com.zy.system.service.SaasLogService;
import java.util.Date;
public class SaasUtils {
    public static void insertLog(Integer type, String locNo, String matnr,Double anfme,String user){
    public static void insertLog(Integer type, String locNo, String matnr,Double anfme){
        SaasLogService bean = SpringUtils.getBean(SaasLogService.class);
        SaasLog saasLog = new SaasLog();
        saasLog.setType(type);
@@ -16,7 +17,6 @@
        saasLog.setIoTime(new Date());
        saasLog.setAnfme(anfme);
        saasLog.setCreateBy(1L);
        saasLog.setCreateByName(user);
        bean.insert(saasLog);
    }
}
src/main/java/com/zy/system/entity/SaasLog.java
@@ -47,10 +47,6 @@
    @TableField("create_by")
    private Long createBy;
    @ApiModelProperty(value= "")
    @TableField("create_by_name")
    private String createByName;
    @TableField("anfme")
    private Double anfme;
src/main/resources/mapper/SaasLogMapper.xml
@@ -10,7 +10,6 @@
        <result column="matnr" property="matnr" />
        <result column="io_time" property="ioTime" />
        <result column="create_by" property="createBy" />
        <result column="create_by_name" property="createByName" />
    </resultMap>
src/main/webapp/static/js/saasLog/saasLog.js
@@ -27,7 +27,6 @@
            ,{field: 'type$', align: 'center',title: '操作类型'}
            ,{field: 'matnr', align: 'center',title: '物料号'}
            ,{field: 'anfme', align: 'center',title: '数量'}
            ,{field: 'createByName', align: 'center',title: '操作人'}
            ,{field: 'ioTime$', align: 'center',title: '操作时间'}
            ,{field: 'createBy', align: 'center',title: '', hide:true}