自动化立体仓库 - WMS系统
skyouc
3 天以前 fb4c2cc68e4eb686b931425c0d24ac4515b31ca9
src/main/java/com/zy/asrs/controller/WrkMastController.java
@@ -15,7 +15,6 @@
import com.zy.asrs.entity.WrkMast;
import com.zy.asrs.service.WrkDetlService;
import com.zy.asrs.service.WrkMastService;
import com.zy.asrs.service.impl.WrkDetlServiceImpl;
import com.zy.common.web.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
@@ -52,7 +51,6 @@
        EntityWrapper<WrkMast> wrapper = new EntityWrapper<>();
        convert(param, wrapper);
        allLike(WrkMast.class, param.keySet(), wrapper, condition);
        if (!Cools.isEmpty(orderNo)) {
            List<WrkDetl> detls = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("order_no", orderNo));
            if (!Cools.isEmpty(detls)) {
@@ -169,10 +167,10 @@
            return R.error("请至少选择一行数据");
        }
        for (WrkMast entity : list){
           entity.setIoPri(entity.getIoPri() + 1);
          if (!wrkMastService.update(entity,  new EntityWrapper<WrkMast>().eq("wrk_no", entity.getWrkNo()))) {
              throw new CoolException("优先级更新失败!");
          }
            entity.setIoPri(entity.getIoPri() + 1);
            if (!wrkMastService.update(entity,  new EntityWrapper<WrkMast>().eq("wrk_no", entity.getWrkNo()))) {
                throw new CoolException("优先级更新失败!");
            }
        }
//        wrkMastService.updateBatchById(list);
        return R.ok();
@@ -180,14 +178,19 @@
    @RequestMapping(value = "/wrkMast/red/pri/auth")
    @ManagerAuth(memo = "工作档降低优先级")
    @Transactional(rollbackFor = Exception.class)
    public R redPri(@RequestBody List<WrkMast> list) {
        if (list.isEmpty()) {
            return R.error("请至少选择一行数据");
        }
        for (WrkMast entity : list){
            entity.setIoPri(entity.getIoPri() - 1);
            if (!wrkMastService.update(entity,  new EntityWrapper<WrkMast>().eq("wrk_no", entity.getWrkNo()))) {
                throw new CoolException("优先级更新失败!");
            }
        }
        wrkMastService.updateBatchById(list);
//        wrkMastService.updateBatchById(list);
        return R.ok();
    }