| | |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.LocDetl; |
| | | import com.zy.asrs.entity.LocMast; |
| | | import com.zy.asrs.entity.param.LocMastInitParam; |
| | | import com.zy.asrs.service.LocDetlService; |
| | | import com.zy.asrs.service.LocMastService; |
| | | import com.zy.common.entity.Parameter; |
| | | import com.zy.common.model.Shelves; |
| | |
| | | |
| | | @Autowired |
| | | private LocMastService locMastService; |
| | | @Autowired |
| | | private LocDetlService locDetlService; |
| | | |
| | | @RequestMapping(value = "/locMast/init/pwd") |
| | | public R locMastInitPwd(@RequestParam(required = false) String pwd) { |
| | |
| | | public R update(LocMast locMast){ |
| | | if (Cools.isEmpty(locMast) || null==locMast.getLocNo()){ |
| | | return R.error(); |
| | | } |
| | | LocMast oldLocMast = locMastService.selectById(locMast.getLocNo()); |
| | | // 有物料时修改为空库位或者空板库位,则删除库存明细 |
| | | if (oldLocMast.getLocType().equals("R") || oldLocMast.getLocType().equals("F")) { |
| | | if (locMast.getLocType().equals("O") || locMast.getLocType().equals("D")) { |
| | | locDetlService.delete(new EntityWrapper<LocDetl>().eq("loc_no", locMast.getLocNo())); |
| | | } |
| | | } |
| | | locMast.setModiUser(getUserId()); |
| | | locMast.setModiTime(new Date()); |
| | |
| | | } |
| | | } |
| | | locMastService.delete(new EntityWrapper<>()); |
| | | locDetlService.delete(new EntityWrapper<>()); |
| | | locMastService.insertBatch(list); |
| | | return R.ok("初始化成功"); |
| | | } |