| | |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.*; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.Mat; |
| | | import com.zy.asrs.entity.MatPrint; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.BatchMatsUpdateParam; |
| | | import com.zy.asrs.entity.param.EmptyPlateOutParam; |
| | | import com.zy.asrs.entity.result.KeyValueVo; |
| | | import com.zy.asrs.service.LocDetlService; |
| | | import com.zy.asrs.service.MatService; |
| | | import com.zy.asrs.service.WrkDetlService; |
| | | import com.zy.asrs.utils.MatExcelListener; |
| | | import com.zy.common.CodeRes; |
| | | import com.zy.common.config.AdminInterceptor; |
| | |
| | | private MatService matService; |
| | | @Autowired |
| | | private SnowflakeIdWorker snowflakeIdWorker; |
| | | @Autowired |
| | | private LocDetlService locDetlService; |
| | | @Autowired |
| | | private WrkDetlService wrkDetlService; |
| | | |
| | | |
| | | @RequestMapping(value = "/mat/auto/matnr/auth") |
| | | public R autoMatnr() { |
| | |
| | | return R.error(); |
| | | } |
| | | for (Mat entity : list) { |
| | | List<WrkDetl> matnr = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("matnr", entity.getMatnr())); |
| | | if (Cools.isEmpty(matnr)) { |
| | | throw new CoolException("删除失败,当前物料还有执行中的任务档明细,请联系管理员!!"); |
| | | } |
| | | List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("matnr", entity.getMatnr())); |
| | | if (Cools.isEmpty(locDetls)) { |
| | | throw new CoolException("删除失败,当前物料还有库存明细存在立库中,请联系管理员!!"); |
| | | } |
| | | if (!matService.delete(new EntityWrapper<>(entity))) { |
| | | throw new CoolException("删除失败,请联系管理员"); |
| | | } |