| | |
| | | private WrkMastLogService wrkMastLogService; |
| | | @Resource |
| | | private WrkDetlLogService wrkDetlLogService; |
| | | @Autowired |
| | | private BasAreasService basAreasService; |
| | | @Autowired |
| | | private LocAroundBindService locAroundBindService; |
| | | @Autowired |
| | | private BasDeviceService basDeviceService; |
| | | |
| | | @RequestMapping(value = "/locMast/init/pwd") |
| | | public R locMastInitPwd(@RequestParam(required = false) String pwd) { |
| | |
| | | @RequestParam Map<String, Object> param) { |
| | | excludeTrash(param); |
| | | EntityWrapper<LocMast> wrapper = new EntityWrapper<>(); |
| | | wrapper.eq("deleted", 0); |
| | | convert(param, wrapper); |
| | | if (!Cools.isEmpty(orderByField)) { |
| | | wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType)); |
| | |
| | | if (Cools.isEmpty(basWhsType)) { |
| | | return R.error("库型不存在!!!"); |
| | | } |
| | | |
| | | if (Objects.isNull(param.getAreaId())) { |
| | | throw new CoolException("库区ID不能为空!!!"); |
| | | } |
| | | BasAreas basAreas = basAreasService.selectById(param.getAreaId()); |
| | | if (Cools.isEmpty(basAreas)) { |
| | | return R.error("库区不存在!!!"); |
| | | } |
| | | |
| | | for (int r = param.getStartRow(); r <= param.getEndRow(); r++) { |
| | | for (int b = param.getStartBay(); b <= param.getEndBay(); b++) { |
| | | for (int l = param.getStartLev(); l <= param.getEndLev(); l++) { |
| | |
| | | locMast.setAppeUser(getUserId()); |
| | | locMast.setAppeTime(now); |
| | | locMast.setModiUser(getUserId()); |
| | | locMast.setAreaId(basAreas.getId()); |
| | | locMast.setAreaName(basAreas.getName()); |
| | | locMast.setModiTime(now); |
| | | locMast.setWhsType(basWhsType.getId()); |
| | | list.add(locMast); |
| | |
| | | return R.error("初始化失败===>" + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | @GetMapping(value = "/locMast/jt") |
| | | @ManagerAuth |
| | | public R jt() { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("whs_type", 2) |
| | | .eq("loc_sts", "O") |
| | | .orderBy("loc_no")); |
| | | //机台号 |
| | | long i = 1; |
| | | //机台排序 |
| | | int j = 0; |
| | | int[] arr = {3,4,1,5,2,6}; |
| | | for (LocMast locMast : locMasts) { |
| | | LocAroundBind locAroundBind = new LocAroundBind( |
| | | i, |
| | | i+"", |
| | | locMast.getLocNo(), |
| | | "O", |
| | | arr[j++] |
| | | ); |
| | | locAroundBindService.insert(locAroundBind); |
| | | if(j==6){ |
| | | j = 0; |
| | | i++; |
| | | } |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @GetMapping(value = "/locMast/addjt") |
| | | @ManagerAuth |
| | | public R addjt() { |
| | | Date date = new Date(); |
| | | for (int i =1 ;i<52;i++){ |
| | | BasDevice basDevice =new BasDevice( |
| | | i+"", |
| | | i+"", |
| | | date, |
| | | "9995", |
| | | date, |
| | | "9995", |
| | | 1 |
| | | ); |
| | | basDeviceService.insert(basDevice); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | } |