| | |
| | | @Autowired |
| | | private LocDetlService locDetlService; |
| | | @Autowired |
| | | private BasWhsService basWhsService; |
| | | |
| | | private BasWhsTypeService basWhsTypeService; |
| | | @Resource |
| | | private WrkMastService wrkMastService; |
| | | |
| | | @Resource |
| | | private AdjDetlService adjDetlService; |
| | | |
| | | @Resource |
| | | private LocDetlMapper locDetlMapper; |
| | | |
| | | @Resource |
| | | private CommonService commonService; |
| | | |
| | | @Resource |
| | | private WrkMastLogService wrkMastLogService; |
| | | |
| | | @Resource |
| | | private WrkDetlLogService wrkDetlLogService; |
| | | |
| | |
| | | excludeTrash(param); |
| | | EntityWrapper<LocMast> wrapper = new EntityWrapper<>(); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | | } |
| | | return R.ok(locMastService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | |
| | | public R init(LocMastInitParam param) { |
| | | try{ |
| | | List<LocMast> list = new ArrayList<>(); |
| | | BasWhs basWhs = basWhsService.selectByIdentifying(param.getIdentifying()); |
| | | if (Cools.isEmpty(basWhs)){ |
| | | BasWhsType basWhsType = basWhsTypeService.selectByIdentifying(param.getIdentifying()); |
| | | if (Cools.isEmpty(basWhsType)) { |
| | | return R.error("库型不存在!!!"); |
| | | } |
| | | for (int r=param.getStartRow(); r<=param.getEndRow(); r++){ |
| | |
| | | try{ |
| | | Shelves shelves = new Shelves(param.getEndRow() - param.getStartRow() + 1, param.getCrnAmount(),param.getStartRow()); |
| | | for (List<Integer> node : shelves.nodes){ |
| | | |
| | | if (node.contains(r)) { |
| | | if (!Cools.isEmpty(param.getStaCrn()) && param.getStaCrn() > 0){ |
| | | crnNo = shelves.nodes.indexOf(node) + param.getStaCrn(); |
| | | }else { |
| | | crnNo = shelves.nodes.indexOf(node) + 1; |
| | | } |
| | | |
| | | break; |
| | | } |
| | | } |
| | |
| | | locMast.setAppeTime(now); |
| | | locMast.setModiUser(getUserId()); |
| | | locMast.setModiTime(now); |
| | | locMast.setWhsType(basWhs.getId()); |
| | | locMast.setWhsType(basWhsType.getId()); |
| | | list.add(locMast); |
| | | } |
| | | } |