#检查导出功能:
1.商品档案无异常
2.库存明细管理(异常)已修复
3.库存明细统计无异常
4.工作档查询维护无异常
5.工作档明细查询无异常
6.工作历史档查询无异常
7.工作明细历史档查询无异常
8.入库通知历史档无异常
9.库存移动流水记录(异常)已修复
10.机台工位绑定无异常
11.库存调整记录无异常
12.工作档维护日志(异常)已修复
13.操作日志无异常
| | |
| | | convert(map, wrapper); |
| | | if (!row.equals("")) { |
| | | wrapper.and() |
| | | .where("loc_no like '" + row + "%'"); |
| | | .where("loc_no like {0}", row + "%"); |
| | | } |
| | | List<LocDetl> list = locDetlService.selectList(wrapper); |
| | | List<AbnormalLocDetlParam> result = new ArrayList<>(); |
| | | |
| | | Page<LocDetl> groupLocDetl = locDetlService.getStockStatis2(toPage(1, 10000, param, LocDetl.class)); |
| | | for (LocDetl locDetl : groupLocDetl.getRecords()) { |
| | | AbnormalLocDetlParam abnormalLocDetlParam = new AbnormalLocDetlParam(); |
| | | Mat mat = matService.selectOne(new EntityWrapper<Mat>() |
| | | .eq("matnr", locDetl.getMatnr())); |
| | | if (Cools.isEmpty(mat)) { |
| | | continue; |
| | | } |
| | | if (!Cools.isEmpty(mat .getStoreMax()) || !Cools.isEmpty(mat.getStoreMin())) { |
| | | abnormalLocDetlParam.setStoreMax(mat.getStoreMax()); |
| | | abnormalLocDetlParam.setStoreMaxDate(mat.getStoreMaxDate()); |
| | | abnormalLocDetlParam.setStoreMin(mat.getStoreMin()); |
| | | abnormalLocDetlParam.setAnfme(locDetl.getAnfme()); |
| | | abnormalLocDetlParam.setMaktx(mat.getMaktx()); |
| | | abnormalLocDetlParam.setMatnr(mat.getMatnr()); |
| | | abnormalLocDetlParam.setSpecs(mat.getSpecs()); |
| | | abnormalLocDetlParam.setBatch(locDetl.getBatch()); |
| | | |
| | | // SimpleDateFormat simple = new SimpleDateFormat("yyyyMMdd"); |
| | | // Date maxDate = simple.parse(locDetl.getBatch()); |
| | | // long time = maxDate.getTime(); |
| | | // Date now = new Date(); |
| | | // long time1 = now.getTime(); |
| | | // abnormalLocDetlParam.setNowTime((int) ((time1 - time) / (1000 * 60 * 60 * 24))); |
| | | |
| | | if (!Cools.isEmpty(mat.getStoreMax()) && locDetl.getAnfme() > mat.getStoreMax()) { |
| | | result.add(abnormalLocDetlParam); |
| | | } else if (!Cools.isEmpty(mat.getStoreMin()) && locDetl.getAnfme() < mat.getStoreMin()) { |
| | | result.add(abnormalLocDetlParam); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(exportSupport(result, fields)); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/locDetl/selectOwner/list/auth") |
| | |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.InventoryFlowDto; |
| | | import com.zy.asrs.entity.WrkMastLog; |
| | | import com.zy.asrs.service.WrkMastLogService; |
| | | import com.zy.common.web.BaseController; |
| | |
| | | return wrkMastLogService.inventoryFlowList(curr,limit,param); |
| | | } |
| | | |
| | | @RequestMapping(value = "/inventoryFlow/export/auth") |
| | | @ManagerAuth(memo = "库存移动流水记录导出") |
| | | public R inventoryFlowExport(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("inventoryFlow")); |
| | | if (Cools.isEmpty(map.get("io_time"))) { |
| | | map.put("startTime",""); |
| | | map.put("endTime",""); |
| | | } else { |
| | | String ioTime = (String) map.get("io_time"); |
| | | if (ioTime.contains(RANGE_TIME_LINK)){ |
| | | String[] dates = ioTime.split(RANGE_TIME_LINK); |
| | | map.put("startTime",dates[0]); |
| | | map.put("endTime",dates[1]); |
| | | } |
| | | } |
| | | List<InventoryFlowDto> list = wrkMastLogService.inventoryFlowAll(map); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | |
| | | * 统计库存移动流水记录数 |
| | | */ |
| | | int inventoryFlowListCount(@Param("param") Map<String, Object> param); |
| | | |
| | | /** |
| | | * 导出库存移动流水记录 |
| | | */ |
| | | List<InventoryFlowDto> inventoryFlowAll(@Param("param") Map<String, Object> param); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.InventoryFlowDto; |
| | | import com.zy.asrs.entity.WrkMastLog; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public interface WrkMastLogService extends IService<WrkMastLog> { |
| | |
| | | * 查询库存移动流水记录 |
| | | */ |
| | | R inventoryFlowList(Integer curr, Integer limit, Map<String, Object> param); |
| | | |
| | | /** |
| | | * 导出库存移动流水记录 |
| | | */ |
| | | List<InventoryFlowDto> inventoryFlowAll(Map<String, Object> param); |
| | | } |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | |
| | |
| | | return R.ok(page); |
| | | } |
| | | |
| | | @Override |
| | | public List<InventoryFlowDto> inventoryFlowAll(Map<String, Object> param) { |
| | | return this.baseMapper.inventoryFlowAll(param); |
| | | } |
| | | |
| | | } |
| | |
| | | <include refid="queryWhere"></include> |
| | | </select> |
| | | |
| | | <select id="inventoryFlowAll" resultType="com.zy.asrs.entity.InventoryFlowDto"> |
| | | select |
| | | a.wrk_no wrkNo, |
| | | a.io_type ioType, |
| | | a.io_time ioTime, |
| | | a.wrk_sts wrkSts, |
| | | a.source_loc_no sourceLocNo, |
| | | a.loc_no locNo, |
| | | a.barcode zpallet, |
| | | b.matnr, |
| | | b.maktx, |
| | | b.order_no orderNo, |
| | | b.batch, |
| | | b.anfme, |
| | | b.modi_time modiTime, |
| | | b.modi_user modiUser |
| | | from |
| | | asr_wrk_mast_log a |
| | | inner join asr_wrk_detl_log b on |
| | | a.wrk_no = b.wrk_no |
| | | and a.io_time = b.io_time |
| | | and a.wrk_sts in(5, 15) |
| | | <include refid="queryWhere"></include> |
| | | order by |
| | | a.modi_time desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | limits: [50, 100, 200, 500], |
| | | even: true, |
| | | toolbar: '#toolbar', |
| | | defaultToolbar: ['filter', 'exports', 'print'], |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | // {type: 'checkbox'} |
| | |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | var $view = $('#wrkMast').next('.layui-table-view'); |
| | | var $toolSelf = $view.find('.layui-table-tool-self'); |
| | | var $btn = $view.find('#btn-export'); |
| | | if ($btn.length) { |
| | | var $wrap = $btn.closest('.layui-inline'); |
| | | ($wrap.length ? $wrap : $btn).prependTo($toolSelf); |
| | | } |
| | | limit(); |
| | | } |
| | | }); |
| | |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'wrkMast': exportData, |
| | | 'wrkMastLog': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/wrkMast/export/auth", |
| | | url: baseUrl+"/wrkMastLog/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | |
| | | limits: [16, 30, 50, 100, 200, 500], |
| | | even: true, |
| | | toolbar: '#toolbar', |
| | | defaultToolbar: ['filter', 'exports', 'print'], |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | {field: 'wrkNo', align: 'center',title: '工作号', style: 'font-weight: bold',event: 'wrkNo'} |
| | |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | var $view = $('#wrkMastLog').next('.layui-table-view'); |
| | | var $toolSelf = $view.find('.layui-table-tool-self'); |
| | | var $btn = $view.find('#btn-export'); |
| | | if ($btn.length) { |
| | | $btn.closest('.layui-inline').prependTo($toolSelf); |
| | | } |
| | | form.on('checkbox(tableCheckbox)', function (data) { |
| | | var _index = $(data.elem).attr('table-index')||0; |
| | | if(data.elem.checked){ |
| | |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(wrkMastLog)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id); |
| | | switch(obj.event) { |
| | | case 'exportData': |
| | | layer.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'wrkMastLog': exportData, |
| | | 'inventoryFlow': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/wrkMastLog/export/auth", |
| | | url: baseUrl+"/inventoryFlow/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-normal" id="btn-pri-add" lay-event="priAdd"><i class="layui-icon"></i>增加优先级</button> |
| | | <button class="layui-btn layui-btn-normal" id="btn-pri-red" lay-event="priRed"><i class="layui-icon"></i>降低优先级</button> |
| | | <div class="layui-inline"> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData">导出</button> |
| | | </div> |
| | | </div> |
| | | </script> |
| | | |
| | | <!--明细表--> |
| | |
| | | <table class="layui-hide" id="wrkMastLog" lay-filter="wrkMastLog"></table> |
| | | </div> |
| | | |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <div class="layui-inline"> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData">导出</button> |
| | | </div> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></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> |