| | |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.CombParam; |
| | | import com.zy.asrs.entity.param.MobileAdjustParam; |
| | |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.Date; |
| | | import java.util.HashSet; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | | /** |
| | | * 移动端接口控制器 |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping("/pakout/confirm/auth") |
| | | @ManagerAuth |
| | | @Transactional |
| | | public R pakoutConfirm(@RequestBody List<WrkDetl> list) { |
| | | if (Cools.isEmpty(list)) { |
| | | return R.ok(); |
| | | } |
| | | Set<Integer> wrkNos = new HashSet<>(); |
| | | for (WrkDetl wrkDetl : list) { |
| | | wrkNos.add(wrkDetl.getWrkNo()); |
| | | wrkDetlService.updateInspect(wrkDetl.getWrkNo(), wrkDetl.getMatnr(), wrkDetl.getBatch()); |
| | | } |
| | | for (Integer wrkNo : wrkNos) { |
| | | WrkMast wrkMast = wrkMastService.selectById(wrkNo); |
| | | if (wrkMast.getWrkSts() == 14 && (Cools.isEmpty(wrkMast.getInvWh()) || wrkMast.getInvWh().equals("N"))) { |
| | | List<WrkDetl> wrkDetls = wrkDetlService.selectByWrkNo(wrkNo); |
| | | boolean complete = true; |
| | | for (WrkDetl wrkDetl : wrkDetls) { |
| | | if (wrkDetl.getInspect() == null || wrkDetl.getInspect() == 0) { |
| | | complete = false; |
| | | break; |
| | | } |
| | | } |
| | | if (complete) { |
| | | wrkMast.setInvWh("Y"); |
| | | wrkMast.setModiTime(new Date()); |
| | | if (!wrkMastService.updateById(wrkMast)) { |
| | | throw new CoolException("修改工作档" + wrkNo + "失败"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | // 盘点 ---------------------------------------------------------------------------------------------------- |
| | | |