自动化立体仓库 - WMS系统
zyx
2024-02-23 d16c9ca6307adde5d4b9734c540e276477940686
分析页 牌号统计 功能完善
15个文件已修改
2个文件已添加
280 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/ConsoleController.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/MapController.java 119 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/MobileController.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/OrderController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/PlaController.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/Pla.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/ViewStayTimeBean.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/result/PlalAll.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/mapper/PlaMapper.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/PlaService.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/PlaServiceImpl.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ViewStayTimeMapper.xml 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/image/hneLogo.png 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/locDetlStatis/locDetlStatis.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/home/console.html 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/locDetlStatis/locDetlStatis.html 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/pla/plaDetl.html 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/ConsoleController.java
@@ -41,15 +41,15 @@
            oqty.setY(locUseRate.getOqty());
            list.add(oqty);
            ChartBean uqty = new ChartBean();
            uqty.setName("使用库位");
            uqty.setY(locUseRate.getUqty());
            list.add(uqty);
            ChartBean xqty = new ChartBean();
            xqty.setName("禁用库位");
            xqty.setY(locUseRate.getXqty());
            list.add(xqty);
//            ChartBean uqty = new ChartBean();
//            uqty.setName("使用库位");
//            uqty.setY(locUseRate.getUqty());
//            list.add(uqty);
//
//            ChartBean xqty = new ChartBean();
//            xqty.setName("禁用库位");
//            xqty.setY(locUseRate.getXqty());
//            list.add(xqty);
        }
        map.put("rows",list);
        return R.ok(map);
src/main/java/com/zy/asrs/controller/MapController.java
@@ -78,99 +78,6 @@
                    Integer row = locMast.getRow1();
                    Integer bay = locMast.getBay1();
//                    switch (area){
//                        case 1:
//                            if (row % 4 == 0 || (row+1) % 4 == 0) {
//                                row=row+locMast.getCrnNo();
//                            }else{
//                                row=row+locMast.getCrnNo()-1;
//                            }
//                            bay=32-bay;
//                            break;
//                        case 2:
//                        case 3:
////                            if (row<=3 || row>=5){
////                                if (row%1==0){
////                                    row=row+(row/1)-1;
////                                }else {
////                                    row=row+((row+1)/1)-1;
////                                }
////                            }else {
////                                if (row%2==0){
////                                    row=row+(row/2);
////                                }else {
////                                    row=row+((row-1)/2);
////                                }
////                            }
////                            if (row == 9){
////                                row= row -1;
////                            }
//
//                            if (row ==7) {
//                                row=row+2;
//                            }else{
//                                if (row>7){
//                                    row=row+locMast.getCrnNo()+1;
//                                }else {
//                                    row=row+locMast.getCrnNo()-1;
//                                }
//                            }
//                            break;
////                        case 4:
//////                            if (row<=11){
////////                                if (row%2==0){
////////                                    row=row+(row/2)-1;
////////                                }else {
////////                                    row=row+((row+1)/2)-1;
////////                                }
////////                            }else {
////////                                if (row%2==0){
////////                                    row=row+(row/2);
////////                                }else {
////////                                    row=row+((row-1)/2);
////////                                }
////////                            }
////
////                            if (row % 10 == 0) {
////                                row=row+2;
////                            }else{
////                                if (row>10){
////                                    row=row+locMast.getCrnNo()+1;
////                                }else {
////                                    row=row+locMast.getCrnNo()-1;
////                                }
////                            }
////                            break;
//                        case 5:
////                            if (row<=11){
////                                if (row%2==0){
////                                    row=row+(row/2)-1;
////                                }else {
////                                    row=row+((row+1)/2)-1;
////                                }
////                            }else {
////                                if (row%2==0){
////                                    row=row+(row/2);
////                                }else {
////                                    row=row+((row-1)/2);
////                                }
////                            }
//
//                            if (row % 7 == 0) {
//                                row=row+2;
//                            }else{
//                                if (row>7){
//                                    row=row+locMast.getCrnNo()+1;
//                                }else {
//                                    row=row+locMast.getCrnNo()-1;
//                                }
//                            }
//                            break;
//
//
//
//                    }
                    ArrayList rowData = arrayLists.get(row);
                    Object o = rowData.get(bay);
                    JSONObject jsonObject = JSON.parseObject(o.toString());
@@ -180,32 +87,6 @@
                    //更新list
                    rowData.set(bay, jsonObject);
                    arrayLists.set(row, rowData);
//                    if (area == 1 || area == 6){
//                        ArrayList rowData = arrayLists.get(row);
//                        Object o = rowData.get(bay);
//                        JSONObject jsonObject = JSON.parseObject(o.toString());
//                        jsonObject.put("locNo", locMast.getLocNo());//设置库位号
//                        jsonObject.put("locSts", locMast.getLocSts());//库位状态
//                        //jsonObject.put("locSts$", locMast.getLocSts$());//库位状态
//                        //更新list
//                        rowData.set(bay, jsonObject);
//                        arrayLists.set(row, rowData);
//                    }else {
//                        ArrayList rowData = arrayLists.get(bay);
//                        Object o = rowData.get(row);
//                        JSONObject jsonObject = JSON.parseObject(o.toString());
//                        jsonObject.put("locNo", locMast.getLocNo());//设置库位号
//                        jsonObject.put("locSts", locMast.getLocSts());//库位状态
//                        //jsonObject.put("locSts$", locMast.getLocSts$());//库位状态
//                        //更新list
//                        rowData.set(row, jsonObject);
//                        arrayLists.set(bay, rowData);
//                    }
                }
src/main/java/com/zy/asrs/controller/MobileController.java
@@ -430,7 +430,7 @@
        for (Object o : jsonArray){
            JSONObject jsonObject = (JSONObject)o;
            String batch = jsonObject.get("batch").toString();
            Integer packageNo = (Integer) jsonObject.get("packageNo");
            Integer packageNo = Integer.parseInt(json.get("packageNo").toString());
            if(Cools.isEmpty(locNo) || Cools.isEmpty(batch) || Cools.isEmpty(packageNo)){
                return R.error("有参数为空,无法入库");
            }
@@ -449,7 +449,7 @@
    public R plaPackOut1(@RequestBody JSONObject json){
        String locNo = json.get("locNo").toString();
        String batch = json.get("batch").toString();
        Integer packageNo = (Integer) json.get("packageNo");
        Integer packageNo = Integer.parseInt(json.get("packageNo").toString());
        String orderNo = json.get("orderNo").toString();
        String orderDetlId = json.get("orderDetlId").toString();
        String wrkNo = json.get("wrkNo").toString();
@@ -468,7 +468,7 @@
    public R plaPackOut(@RequestBody JSONObject json){
        String locNo = json.get("locNo").toString();
        String batch = json.get("batch").toString();
        Integer packageNo = (Integer) json.get("packageNo");
        Integer packageNo = Integer.parseInt(json.get("packageNo").toString());
        String orderNo = json.get("orderNo").toString();
        String orderDetlId = json.get("orderDetlId").toString();
        String wrkNo = json.get("wrkNo").toString();
@@ -486,8 +486,7 @@
    @RequestMapping("/plaDetl/check/v1")
    public R plaDetlCheck(@RequestBody JSONObject json){
        String batch = json.get("batch").toString();
        Integer packageNo = (Integer) json.get("packageNo");
        Integer packageNo = Integer.parseInt(json.get("packageNo").toString());
        if(Cools.isEmpty(batch) || Cools.isEmpty(packageNo)){
            return R.error("有参数为空,无法入库");
        }
@@ -509,7 +508,7 @@
    public R plaDetlMove(@RequestBody JSONObject json){
        String batch = json.get("batch").toString();
        Integer packageNo = (Integer) json.get("packageNo");
        Integer packageNo = Integer.parseInt(json.get("packageNo").toString());
        String locNo = json.get("locNo").toString();
        if(Cools.isEmpty(batch) || Cools.isEmpty(packageNo)){
@@ -553,8 +552,12 @@
    @RequestMapping("/manpakout/pakout/v1")
    public R pakout(@RequestBody JSONObject json){
        String batch = json.get("batch").toString();
        Integer packageNo = Integer.parseInt(json.get("packageNo").toString());
        String orderNo = json.get("orderNo").toString();
        return R.ok();
    }
src/main/java/com/zy/asrs/controller/OrderController.java
@@ -344,7 +344,7 @@
    }
    @RequestMapping(value = "/orderQuery/auth")
    @ManagerAuth
//    @ManagerAuth
    public R query(String condition) {
        EntityWrapper<Order> wrapper = new EntityWrapper<>();
        wrapper.like("order_no", condition);
src/main/java/com/zy/asrs/controller/PlaController.java
@@ -269,6 +269,17 @@
        return R.ok(result);
    }
    @RequestMapping(value = "/pla/statis/auth")
    @ManagerAuth
    public R statis(@RequestParam(defaultValue = "1")Integer curr,
                    @RequestParam(defaultValue = "10")Integer limit,
                    @RequestParam Map<String, Object> param) {
        Page<Pla> stockStatis = plaService.getStockStatisAll(toPage(curr, limit, param, Pla.class));
        return R.ok().add(stockStatis);
    }
    /**
     * excel导入模板下载
     */
src/main/java/com/zy/asrs/entity/Pla.java
@@ -278,6 +278,9 @@
    }
    public String getPackageNo$(){
        if(Cools.isEmpty(packageNo)){
            return null;
        }
        if(packageNo < 10){
            return "00" + packageNo;
        }else if(packageNo < 100){
src/main/java/com/zy/asrs/entity/ViewStayTimeBean.java
@@ -47,6 +47,12 @@
    @ApiModelProperty(value= "批号")
    private String batch;
    @ApiModelProperty(value= "包号")
    private int package_no;
    @ApiModelProperty(value= "剩余重量")
    private Double weight_anfme;
    @ApiModelProperty(value= "单据编号")
    @TableField("order_no")
    private String orderNo;
src/main/java/com/zy/asrs/entity/result/PlalAll.java
New file
@@ -0,0 +1,12 @@
package com.zy.asrs.entity.result;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import lombok.Data;
@Data
@ExcelIgnoreUnannotated
public class PlalAll {
    private String brand;
    private String matnr;
    private Double weightAnfme;
}
src/main/java/com/zy/asrs/mapper/PlaMapper.java
@@ -3,10 +3,24 @@
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.zy.asrs.entity.Pla;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
@Mapper
@Repository
public interface PlaMapper extends BaseMapper<Pla> {
    @Select("select brand, matnr, sum(weight_anfme) as weight from asr_pla_detl where brand = #{brand} GROUP BY brand,matnr ORDER BY weight")
    List<Pla> getStockStatisAllByBrand(@Param("brand") String brand);
    @Select("select brand, matnr, sum(weight_anfme) as weight from asr_pla_detl GROUP BY brand,matnr ORDER BY weight")
    List<Pla> getStockStatisAll();
    Integer getStockStatisCountAll(Map<String, Object> map);
}
src/main/java/com/zy/asrs/service/PlaService.java
@@ -1,5 +1,6 @@
package com.zy.asrs.service;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.zy.asrs.entity.OrderDetl;
import com.zy.asrs.entity.Pla;
@@ -19,4 +20,6 @@
    void viladate(List<Pla> plas, User user);
    List<Pla> selectToHistory();
    public Page<Pla> getStockStatisAll(Page<Pla> page);
}
src/main/java/com/zy/asrs/service/impl/PlaServiceImpl.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.core.common.Cools;
import com.core.exception.CoolException;
@@ -147,4 +148,17 @@
    public List<Pla> selectToHistory() {
        return this.selectList(new EntityWrapper<Pla>().eq("status",GlobleParameter.PLA_STATUS_4));
    }
    @Override
    public Page<Pla> getStockStatisAll(Page<Pla> page) {
        if(Cools.isEmpty(page.getCondition().get("brand"))){
            page.setRecords(baseMapper.getStockStatisAll());
        }else {
            page.setRecords(baseMapper.getStockStatisAllByBrand(page.getCondition().get("brand").toString()));
        }
        page.setTotal(0);
        return page;
    }
}
src/main/resources/mapper/ViewStayTimeMapper.xml
@@ -51,10 +51,10 @@
    (
    SELECT
    GETDATE() AS today
    , CONVERT(decimal, DATEDIFF(second,man_loc_detl.create_time, GETDATE()) / 86400.0, 9) AS stay_time
    , man_loc_detl.*
    FROM man_loc_detl
    INNER JOIN man_node ON man_loc_detl.loc_no = man_node.name
    , CONVERT(decimal, DATEDIFF(second,asr_pla_detl.pakin_time, GETDATE()) / 86400.0, 9) AS stay_time
    , asr_pla_detl.*
    FROM asr_pla_detl
    INNER JOIN man_node ON asr_pla_detl.loc_no = man_node.name
    where 1=1
    <include refid="viewStayTimeConditionSql"></include>
    ) ts
@@ -72,10 +72,10 @@
    (
    SELECT
    GETDATE() AS today
    , CONVERT(decimal, DATEDIFF(second,man_loc_detl.create_time, GETDATE()) / 86400.0, 9) AS stay_time
    , man_loc_detl.*
    FROM man_loc_detl
    INNER JOIN man_node ON man_loc_detl.loc_no = man_node.name
    , CONVERT(decimal, DATEDIFF(second,asr_pla_detl.create_time, GETDATE()) / 86400.0, 9) AS stay_time
    , asr_pla_detl.*
    FROM asr_pla_detl
    INNER JOIN man_node ON asr_pla_detl.loc_no = man_node.name
    where 1=1
    <include refid="viewStayTimeConditionSql"></include>
    ) t
src/main/webapp/static/image/hneLogo.png
src/main/webapp/static/js/locDetlStatis/locDetlStatis.js
@@ -1,11 +1,13 @@
var pageCurr;
function getCol() {
    var cols = [
        {field: 'anfme', align: 'center',title: '库存数量', style: 'font-weight: bold'}
        {field: 'brand', align: 'center',title: '牌号', style: 'font-weight: bold'},
        {field: 'matnr', align: 'center',title: '商品编号', style: 'font-weight: bold'},
        {field: 'weight', align: 'center',title: '库存数量', style: 'font-weight: bold'}
    ];
    arrRemove(detlCols, "field", "anfme")
    arrRemove(detlCols, "field", "zpallet")
    cols.push.apply(cols, detlCols);
    // arrRemove(detlCols, "field", "anfme")
    // arrRemove(detlCols, "field", "zpallet")
    // cols.push.apply(cols, detlCols);
    // cols.push({field: 'anfme', align: 'center',title: '数量', style: 'font-weight: bold'}
    // )
    return cols;
@@ -22,7 +24,7 @@
    tableIns = table.render({
        elem: '#locDetlStatis',
        headers: {token: localStorage.getItem('token')},
        url: baseUrl+'/locDetl/statis/auth',
        url: baseUrl+'/pla/statis/auth',
        page: true,
        limit: 20,
        limits: [20, 30, 50, 100, 200, 500],
src/main/webapp/views/home/console.html
@@ -238,8 +238,12 @@
            {field: 'createTime$', title: '入库时间', align: 'center', width: 200}
            ,{field: 'stay_time', align: 'center',title: '库龄(天)'}
            ,{field: 'loc_no', align: 'center',title: '库位号'}
            ,{field: 'matnr', align: 'center',title: '商品编号'}
            ,{field: 'brand', align: 'center',title: '牌号'}
            ,{field: 'batch', align: 'center',title: '批号'}
            ,{field: 'package_no', align: 'center',title: '包号'}
            ,{field: 'weight_anfme', align: 'center',title: '剩余重量'}
        ];
        cols.push.apply(cols, detlCols);
        return cols;
    }
    layui.use(['table','laydate', 'form'], function() {
src/main/webapp/views/locDetlStatis/locDetlStatis.html
@@ -16,10 +16,7 @@
<div id="search-box" class="layui-form layui-card-header">
    <div class="layui-inline">
        <div class="layui-input-inline">
            <input class="layui-input" type="text" name="matnr" placeholder="商品编号" autocomplete="off">
        </div>
        <div class="layui-input-inline">
            <input class="layui-input" type="text" name="owner" placeholder="货主编号" autocomplete="off">
            <input class="layui-input" type="text" name="brand" placeholder="牌号" autocomplete="off">
        </div>
    </div>
    <!-- 待添加 -->
src/main/webapp/views/pla/plaDetl.html
@@ -372,20 +372,20 @@
<script type="text/template" id="templatePreview1" class="template-qrcode">
    <div class="template-preview">
    {{#each data}}
        <div class="layui-row" style="height: 230px;width: 650px; color:#000; margin-top: 40px">
            <div class="layui-col-xs5" style="height: auto; margin-top: 20px">
                <img src="../../static/image/hneLogo.jpg" style="display: inline-block; width: 40%;height: 30%; margin-left: 30px">
        <div class="layui-row" style="height: 230px;width: 750px; color:#000; margin-top: 40px">
            <div class="layui-col-xs6" style="height: auto; margin-top: 25px; margin-left: -20px">
                <img src="../../static/image/hneLogo.png" style="display: inline-block; width: 40%;height: 30%; margin-left: 30px; color:#000;">
            </div>
            <div class="layui-col-xs7" style="margin-left: -105px;margin-right: 30px; margin-top: 70px; text-align: left; font-size: 20px">
            <div class="layui-col-xs6" style="margin-left: -185px;margin-right: 30px; margin-top: 80px; text-align: left; font-size: 20px; font-weight:bold">
                浙江省台州市台州湾新区台州湾大道188号</br>
                Address:No. 188, Taizhou Bay Avenue, Taizhou Bay New Area, Taizhou City, Zhejiang Province
                No.188 Taizhou Bay Avenue, Taizhou Bay New Area, Taizhou City, Zhejiang Province. P.R.China
            </div>
        </div>
<!--        <div class="layui-row" style="font-size: xx-large; text-align: left; margin-left: 40px;">-->
<!--            聚乳酸 Polylactic Acid-->
<!--        </div>-->
        <div class="layui-row" style="alignment: center; margin-left: 35px; margin-top: -20px; margin-bottom: 3.7px;">
            <table class="contain" width="500" style="overflow: hidden;table-layout: fixed; color:#000; font-size: 30px;text-align: left">
            <table class="contain" width="500" style="overflow: hidden;table-layout: fixed; color:#000; font-size: 35px;text-align: left">
                <tr style="height: 100px;" >
                    <td align="center" scope="col" colspan="4" style="font-weight: bold; text-align: left; padding-left: 20px"><strong style="font-weight: bold;color: black;">聚乳酸 Polylactic Acid</strong></td>
                </tr>
@@ -394,21 +394,21 @@
<!--                    <td align="center" colspan="1" style="font-weight: bold;color: black;overflow:hidden; white-space:normal; "><strong style="font-weight: bold;color: black;">REVODE {{this.brand}}</strong></td>-->
                </tr>
                <tr style="height: 100px;text-align: left">
                    <td align="center" colspan="2" style="font-weight: bold;color: black; text-align: left; padding-left: 20px"><strong>批号:PN {{this.batch}}  {{this.packageNo}}</strong></td>
                    <td align="center" colspan="2" style="font-weight: bold;color: black; text-align: left; padding-left: 20px"><strong>批号:{{this.batch}}</strong></td>
                    <!--                    <td align="center" colspan="1" style="font-weight: bold;color: black;overflow:hidden; white-space:nowrap; text-overflow:ellipsis;"><strong style="font-weight: bold;color: black;">{{this.weightAnfme}} KG</strong></td>-->
                </tr>
                <tr style="height: 100px;text-align: left">
                    <td align="center" colspan="2" style="font-weight: bold;color: black; text-align: left; padding-left: 20px"><strong>重量:{{this.weightAnfme}} KG</strong></td>
                    <!--                    <td align="center" colspan="1" style="font-weight: bold;color: black;overflow:hidden; white-space:nowrap; text-overflow:ellipsis;"><strong style="font-weight: bold;color: black;">{{this.weightAnfme}} KG</strong></td>-->
                </tr>
                <tr style="height: 100px;text-align: left">
                    <td align="center" colspan="2" rowspan="1" style="font-weight: bold;color: black; text-align: left; padding-left: 20px"><strong>追踪码:{{this.line}} {{this.packageNo$}}</strong></td>
                    <td align="center" colspan="2" style="font-weight: bold;color: black; text-align: left; padding-left: 20px"><strong>重量:{{this.weight}} KG</strong></td>
                    <!--                    <td align="center" colspan="1" style="font-weight: bold;color: black;overflow:hidden; white-space:nowrap; text-overflow:ellipsis;"><strong style="font-weight: bold;color: black;">{{this.weightAnfme}} KG</strong></td>-->
                    <td align="center" scope="col" colspan="2" rowspan="2">
                        <img class="template-code template-qrcode" src="{{this.barcodeUrl}}" width="80%">
                    </td>
                </tr>
                <tr style="height: 100px;text-align: left">
                    <td align="center" colspan="2" rowspan="1" style="font-weight: bold;color: black; text-align: left; padding-left: 20px"><strong>追踪码:{{this.line}} {{this.packageNo$}}</strong></td>
                    <!--                    <td align="center" colspan="1" style="font-weight: bold;color: black;overflow:hidden; white-space:nowrap; text-overflow:ellipsis;"><strong style="font-weight: bold;color: black;">{{this.weightAnfme}} KG</strong></td>-->
                </tr>
                <tr style="height: 100px;text-align: left">
                </tr>
            </table>
        </div>