| | |
| | | return R.ok(manPakOutService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/ManPakOut/list/auth1") |
| | | @ManagerAuth |
| | | public R list1(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<ManPakOut> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert1(param, wrapper); |
| | | |
| | | return R.ok(manPakOutService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/ManPakOut/detailed/auth") |
| | | @ManagerAuth |
| | | public R detailed(@RequestParam(defaultValue = "1")Integer curr, |
| | |
| | | userId = null; |
| | | } |
| | | |
| | | List<PakOutDTO> pakOutDTOS = manPakOutService.selectPakOut(docnum, stime, etime, curr, limit,userId); |
| | | String custName = Cools.isEmpty(param.get("cust_name")) ? "" : param.get("cust_name").toString(); |
| | | |
| | | List<PakOutDTO> pakOutDTOS = manPakOutService.selectPakOut(docnum, stime, etime, curr, limit,userId,custName); |
| | | for (PakOutDTO pakOutDTO:pakOutDTOS){ |
| | | List<ManPakOut> manPakOuts = manPakOutService.selectList(new EntityWrapper<ManPakOut>().eq("doc_num", pakOutDTO.getDoc_num())); |
| | | for (ManPakOut manPakOut:manPakOuts){ |
| | |
| | | |
| | | } |
| | | |
| | | int count = manPakOutService.selectPakOutCount(docnum, stime, etime,curr, limit,userId); |
| | | int count = manPakOutService.selectPakOutCount(docnum, stime, etime,curr, limit,userId,custName); |
| | | Page<PakOutDTO> page = new Page<>(); |
| | | // 最后按状态未出库->已出库排序 |
| | | // page.setRecords(pakOutDTOS.stream().sorted(Comparator.comparingInt(PakOutDTO::getStatus)).collect(Collectors.toList())); |
| | |
| | | } |
| | | } |
| | | |
| | | private <T> void convert1(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else { |
| | | wrapper.eq(entry.getKey(), val); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/ManPakOut/add/auth") |
| | | @ManagerAuth(memo = "生成拣货单") |
| | | @Transactional |
| | |
| | | |
| | | |
| | | |
| | | List<PakOutDTO> selectPakOut(@Param("docnum") String docnum,@Param("stime") Date stime, @Param("etime") Date etime, @Param("curr") Integer curr, @Param("limit") Integer limit, @Param("userId") Long userId); |
| | | List<PakOutDTO> selectPakOut(@Param("docnum") String docnum,@Param("stime") Date stime, @Param("etime") Date etime, @Param("curr") Integer curr, @Param("limit") Integer limit, @Param("userId") Long userId, @Param("custName") String custName); |
| | | |
| | | int selectPakOutCount(@Param("docnum") String docnum,@Param("stime") Date stime, @Param("etime") Date etime,@Param("curr") Integer curr,@Param("limit") Integer limit, @Param("userId") Long userId); |
| | | int selectPakOutCount(@Param("docnum") String docnum,@Param("stime") Date stime, @Param("etime") Date etime,@Param("curr") Integer curr,@Param("limit") Integer limit, @Param("userId") Long userId, @Param("custName") String custName); |
| | | } |
| | |
| | | import java.util.List; |
| | | |
| | | public interface ManPakOutService extends IService<ManPakOut> { |
| | | List<PakOutDTO> selectPakOut(String docnum, Date stime, Date etime, Integer curr, Integer limit, Long userId); |
| | | List<PakOutDTO> selectPakOut(String docnum, Date stime, Date etime, Integer curr, Integer limit, Long userId,String custName); |
| | | |
| | | int selectPakOutCount(String docnum, Date stime, Date etime,Integer curr, Integer limit, Long userId); |
| | | int selectPakOutCount(String docnum, Date stime, Date etime,Integer curr, Integer limit, Long userId,String custName); |
| | | } |
| | |
| | | |
| | | |
| | | @Override |
| | | public List<PakOutDTO> selectPakOut(String docnum, Date stime, Date etime, Integer curr, Integer limit, Long userId) { |
| | | return this.baseMapper.selectPakOut(docnum,stime,etime,curr,limit,userId); |
| | | public List<PakOutDTO> selectPakOut(String docnum, Date stime, Date etime, Integer curr, Integer limit, Long userId,String custName) { |
| | | return this.baseMapper.selectPakOut(docnum,stime,etime,curr,limit,userId,custName); |
| | | } |
| | | |
| | | @Override |
| | | public int selectPakOutCount(String docnum, Date stime, Date etime,Integer curr, Integer limit, Long userId) { |
| | | return this.baseMapper.selectPakOutCount(docnum,stime, etime,curr,limit,userId); |
| | | public int selectPakOutCount(String docnum, Date stime, Date etime,Integer curr, Integer limit, Long userId,String custName) { |
| | | return this.baseMapper.selectPakOutCount(docnum,stime, etime,curr,limit,userId,custName); |
| | | } |
| | | } |
| | |
| | | <if test="docnum != null and docnum != '' "> |
| | | and doc_num like '%' + #{docnum} + '%' |
| | | </if> |
| | | <if test="custName != null and custName != ''"> |
| | | and cust_name like '%' + #{custName} + '%' |
| | | </if> |
| | | <if test="stime != null"> |
| | | and create_time >= #{stime} |
| | | </if> |
| | |
| | | id:'lookSSXMTable', |
| | | elem: '#lookSSXMTable', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/ManPakOut/list/auth', |
| | | url: baseUrl+'/ManPakOut/list/auth1', |
| | | where: { |
| | | doc_num: data.doc_num, |
| | | uuid: data.uuid |
| | |
| | | <input class="layui-input" type="text" name="doc_num" placeholder="拣货单号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">客户名称:</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="cust_name" placeholder="拣货单号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="create_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |