| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.asrs.entity.WrkMastDetlLog; |
| | | import com.zy.asrs.service.WrkMastDetlLogService; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.WrkMastDetlLog; |
| | | import com.zy.asrs.service.WrkMastDetlLogService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | public class WrkMastDetlLogController extends BaseController { |
| | |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(WrkMastDetlLog.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } |
| | | wrapper.orderBy("io_time", false); |
| | | return R.ok(wrkMastDetlLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | Page<WrkMastDetlLog> wrkMastDetlLogPage = wrkMastDetlLogService.selectPage(new Page<>(curr, limit), wrapper); |
| | | List<WrkMastDetlLog> records = wrkMastDetlLogPage.getRecords(); |
| | | HashMap<String, Double> count = new HashMap<>(); |
| | | for (WrkMastDetlLog record : records) { |
| | | String ioType = record.getIoType$(); |
| | | if (!Cools.isEmpty(ioType) && !"null".equalsIgnoreCase(ioType)) { |
| | | if (!"53.拣料再入库".equalsIgnoreCase(ioType)) { |
| | | if ("103.拣料出库".equalsIgnoreCase(ioType)) { |
| | | ioType = "101.出库"; |
| | | } |
| | | String[] split = ioType.split("\\."); |
| | | Double l = count.get(ioType); |
| | | if (l == null) { |
| | | count.put(split[1], record.getAnfme()); |
| | | } else { |
| | | count.put(split[1], l + record.getAnfme()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | R ok = R.ok(wrkMastDetlLogPage); |
| | | ok.put("count", count); |
| | | return ok; |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | |
| | | @TableField("Upstreamcode") |
| | | private String Upstreamcode; |
| | | |
| | | public Order() {} |
| | | public Order() { |
| | | } |
| | | |
| | | public Order(String uuid,String orderNo,String orderTime,Long docType,Long itemId,String itemName,Long allotItemId,String defNumber,String number,Long cstmr,String cstmrName,String tel,String operMemb,Double totalFee,Double discount,Double discountFee,Double otherFee,Double actFee,Integer payType,String salesman,Integer accountDay,Integer postFeeType,Double postFee,Date payTime,Date sendTime,String shipName,String shipCode,Long settle,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | this.uuid = uuid; |
| | |
| | | } |
| | | |
| | | public String getPayType$(){ |
| | | if (null == this.payType){ return null; } |
| | | if (null == this.payType) { |
| | | return null; |
| | | } |
| | | switch (this.payType){ |
| | | case 1: |
| | | return "现金"; |
| | |
| | | } |
| | | |
| | | public String getPostFeeType$(){ |
| | | if (null == this.postFeeType){ return null; } |
| | | if (null == this.postFeeType) { |
| | | return null; |
| | | } |
| | | switch (this.postFeeType){ |
| | | case 1: |
| | | return "在线支付"; |
| | |
| | | } |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | if (null == this.status) { |
| | | return null; |
| | | } |
| | | switch (this.status){ |
| | | case 1: |
| | | return "正常"; |
| | |
| | | } |
| | | |
| | | public String getCreateBy$(){ |
| | | if (!Cools.isEmpty(this.createBy) && this.createBy == 9999L) { |
| | | return "系统同步"; |
| | | } |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.createBy); |
| | | if (!Cools.isEmpty(user)){ |
| | |
| | | |
| | | order.setDefNumber(param.get操作系统号()); |
| | | |
| | | order.setCreateBy(9999L); |
| | | order.setCreateTime(now); |
| | | order.setUpdateBy(9999L); |
| | | order.setUpdateTime(now); |
| | | order.setUpstreamcode(param.getUpstreamcode()); |
| | | //订单状态 |
| | |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | 'data': res.data.records, |
| | | 'countData': res.data.count |
| | | } |
| | | }, |
| | | response: { |
| | |
| | | res.data[_index][data.value] = 'N'; |
| | | } |
| | | }); |
| | | |
| | | } |
| | | }); |
| | | |
| | |
| | | cellMinWidth: 100, |
| | | cols: [[ |
| | | {type: 'numbers'}, |
| | | {field: 'defNumber', align: 'center', title: '操作系统号', hide: false, width: 120}, |
| | | {field: 'defNumber', align: 'center', title: '操作系统号', hide: false, width: 100}, |
| | | {field: '操作单据', align: 'center', title: '操作单据', hide: true}, |
| | | {field: '操作类型', align: 'center', title: '操作类型', hide: true}, |
| | | {field: 'orderNo', title: '单据编号', templet: '#orderNoTpl'}, |
| | |
| | | //{field: 'defNumber', align: 'center', title: '业务类型'}, |
| | | //{field: 'postFee', align: 'center', title: '总数量', minWidth: 130, width: 130}, |
| | | {align: 'center', title: '明细', toolbar: '#tbLook', minWidth: 160, width: 160}, |
| | | {field: 'createTime$', title: '创建时间', hide: true}, |
| | | {field: 'orderTime', align: 'center',title: '单据日期'}, |
| | | {field: 'shipCode', align: 'center',title: '制单人', hide: false}, |
| | | {field: 'settle$', align: 'center', title: '状态', templet: '#settleTpl', minWidth: 160, width: 160}, |
| | | //{field: 'shipCode', align: 'center',title: '制单人'}, |
| | | {field: 'createBy$', title: '创建人'}, |
| | | {field: 'createTime$', title: '创建时间'}, |
| | | {field: 'settle$', align: 'center', title: '状态', templet: '#settleTpl', minWidth: 140, width: 140}, |
| | | {field: 'memo', align: 'center',title: '备注', hide: true}, |
| | | {field: 'cstmrName', align: 'center',title: '供应商/客户编码', hide: true}, |
| | | {field: 'tel', align: 'center',title: '仓库', hide: true}, |
| | | {field: 'operMemb', align: 'center',title: '出入库类别', hide: true}, |
| | | {field: 'salesman', align: 'center',title: '部门', hide: true}, |
| | | {align: 'center', title: '操作', toolbar: '#operate', width: 180} |
| | | {align: 'center', title: '操作', toolbar: '#operate', width: 160} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | var pageCurr; |
| | | var pageLimit; |
| | | |
| | | function getCol() { |
| | | var cols = [ |
| | | {field: 'wrkNo', align: 'center',title: '工作号'} |
| | |
| | | 'count': res.data.total, |
| | | 'data': res.data.records, |
| | | 'limit': res.data.size, |
| | | 'countData': res.count |
| | | } |
| | | }, |
| | | response: { |
| | |
| | | pageCurr=curr; |
| | | pageLimit=res.limit; |
| | | limit(); |
| | | var d ="当页总数量:"; |
| | | Object.keys(res.countData).forEach(key => { |
| | | d = d + key + "--" + res.countData[key]+"; "; |
| | | }); |
| | | $("#countData").text(d); |
| | | } |
| | | }); |
| | | |
| | |
| | | |
| | | }, 300); |
| | | } |
| | | |
| | | layDateRender(); |
| | | |
| | | }); |
| | |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/agvWrkDetlLog/wrkDetlLog.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/agvWrkDetlLog/wrkDetlLog.js?v=1" charset="utf-8"></script> |
| | | |
| | | <iframe id="detail-iframe" scrolling="auto" style="display:none;"></iframe> |
| | | |
| | |
| | | <script type="text/javascript" src="../../static/js/echarts/echarts.min.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/order/order.js?v=4" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/order/order.js?v=7" charset="utf-8"></script> |
| | | |
| | | <script type="text/template" id="docTypeTpl"> |
| | | <option value="">选择类型</option> |
| | |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="wrk_no" placeholder="工作号" autocomplete="off"> |
| | | <input class="layui-input" type="text" name="wrk_no" placeholder="工作号" |
| | | autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="wrkSts" class="layui-input" name="wrk_sts" type="text" placeholder="请输入" autocomplete="off" style="display: none"> |
| | | <input id="wrkSts$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="工作状态" onfocus=this.blur()> |
| | | <input id="wrkSts" class="layui-input" name="wrk_sts" type="text" placeholder="请输入" |
| | | autocomplete="off" style="display: none"> |
| | | <input id="wrkSts$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" |
| | | type="text" placeholder="工作状态" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="basWrkStatusQueryBywrkSts" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basWrkStatusQueryBywrkStsSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | <input class="cool-auto-complete-window-input" data-key="basWrkStatusQueryBywrkSts" |
| | | onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" |
| | | data-key="basWrkStatusQueryBywrkStsSelect" |
| | | onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline cool-auto-complete"> |
| | | <input id="ioType" class="layui-input" name="io_type" type="text" placeholder="请输入" autocomplete="off" style="display: none"> |
| | | <input id="ioType$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="入出库类型" onfocus=this.blur()> |
| | | <input id="ioType" class="layui-input" name="io_type" type="text" placeholder="请输入" |
| | | autocomplete="off" style="display: none"> |
| | | <input id="ioType$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" |
| | | type="text" placeholder="入出库类型" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="basWrkIotypeQueryByioType" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="basWrkIotypeQueryByioTypeSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | <input class="cool-auto-complete-window-input" data-key="basWrkIotypeQueryByioType" |
| | | onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" |
| | | data-key="basWrkIotypeQueryByioTypeSelect" |
| | | onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="modi_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | <input class="layui-input layui-laydate-range" name="modi_time" type="text" |
| | | placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="supp_code" placeholder="货架码" autocomplete="off"> |
| | | <input class="layui-input" type="text" name="supp_code" placeholder="货架码" |
| | | autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="order_no" placeholder="单据编号" autocomplete="off"> |
| | | <input class="layui-input" type="text" name="order_no" placeholder="单据编号" |
| | | autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="condition" placeholder="请输入" autocomplete="off"> |
| | | <input class="layui-input" type="text" name="condition" placeholder="请输入" |
| | | autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline">  |
| | |
| | | <button class="layui-btn icon-btn" lay-filter="reset" lay-submit> |
| | | <i class="layui-icon"></i>重置 |
| | | </button> |
| | | <div style="float:right;margin-left: 10px;margin-top:4px;" id="countData">数量</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | |
| | | <!-- <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button>--> |
| | | <button style="visibility: hidden;" class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="deleteData">删除</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="float: right">导出</button> |
| | | <button style="visibility: hidden;" class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" |
| | | lay-event="deleteData">删除 |
| | | </button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" |
| | | style="float: right">导出 |
| | | </button> |
| | | </div> |
| | | </script> |
| | | |
| | |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/wrkMastDetlLog/wrkMastDetlLog.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/wrkMastDetlLog/wrkMastDetlLog.js?v=8" charset="utf-8"></script> |
| | | </body> |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">工作号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="wrkNo" placeholder="请输入工作号" lay-vertype="tips" lay-verify="required"> |
| | | <input class="layui-input" name="wrkNo" placeholder="请输入工作号" lay-vertype="tips" |
| | | lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">商品编号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="matnr" placeholder="请输入商品编号" lay-vertype="tips" lay-verify="required"> |
| | | <input class="layui-input" name="matnr" placeholder="请输入商品编号" lay-vertype="tips" |
| | | lay-verify="required"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | |
| | | <label class="layui-form-label">修改人员: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="modiUser" placeholder="请输入修改人员" style="display: none"> |
| | | <input id="modiUser$" name="modiUser$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入修改人员" onfocus=this.blur()> |
| | | <input id="modiUser$" name="modiUser$" class="layui-input cool-auto-complete-div" |
| | | onclick="autoShow(this.id)" type="text" placeholder="请输入修改人员" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryBymodiUser" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryBymodiUserSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryBymodiUser" |
| | | onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryBymodiUserSelect" |
| | | onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | <label class="layui-form-label">添加人员: </label> |
| | | <div class="layui-input-block cool-auto-complete"> |
| | | <input class="layui-input" name="appeUser" placeholder="请输入添加人员" style="display: none"> |
| | | <input id="appeUser$" name="appeUser$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="请输入添加人员" onfocus=this.blur()> |
| | | <input id="appeUser$" name="appeUser$" class="layui-input cool-auto-complete-div" |
| | | onclick="autoShow(this.id)" type="text" placeholder="请输入添加人员" onfocus=this.blur()> |
| | | <div class="cool-auto-complete-window"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryByappeUser" onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryByappeUserSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | <input class="cool-auto-complete-window-input" data-key="userQueryByappeUser" |
| | | onkeyup="autoLoad(this.getAttribute('data-key'))"> |
| | | <select class="cool-auto-complete-window-select" data-key="userQueryByappeUserSelect" |
| | | onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple"> |
| | | </select> |
| | | </div> |
| | | </div> |