| | |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.dto.WrkDetlWithCheck; |
| | | import com.zy.asrs.service.*; |
| | |
| | | @ManagerAuth(memo = "工作档修改") |
| | | public R update(WrkMast wrkMast){ |
| | | if (Cools.isEmpty(wrkMast) || null==wrkMast.getWrkNo()){ |
| | | return R.error(); |
| | | return R.error("工作号异常"); |
| | | }else if (wrkMast.getWrkSts()==null){ |
| | | return R.error("修改状态异常"); |
| | | } |
| | | wrkMast.setModiUser(getUserId()); |
| | | wrkMast.setModiTime(new Date()); |
| | | wrkMastService.updateById(wrkMast); |
| | | WrkMast wrkMast1=null; |
| | | try{ |
| | | wrkMast1 = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no", wrkMast.getWrkNo())); |
| | | if (Cools.isEmpty(wrkMast1) || null==wrkMast1.getWrkNo()){ |
| | | return R.error("工作号异常"); |
| | | }else if (wrkMast1.getWrkSts()==null){ |
| | | return R.error("修改状态异常"); |
| | | } |
| | | }catch (Exception e){ |
| | | return R.error("查询工作档失败,请尝试刷新页面。"); |
| | | } |
| | | if (wrkMast1.getWrkSts()==wrkMast.getWrkSts()){ |
| | | return R.error("所选状态与此工作档状态一致,无需修改"); |
| | | } |
| | | wrkMast1.setModiUser(getUserId()); |
| | | wrkMast1.setModiTime(new Date()); |
| | | wrkMast1.setWrkSts(wrkMast.getWrkSts()); |
| | | wrkMastService.updateById(wrkMast1); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | /********************************边锋新增**************************/ |
| | | |
| | | @GetMapping(value = "/wrkMast/checkDetl") |
| | | public R pickDetl(String barcode) { |
| | | WrkMast wrkMast = wrkMastService.selectByBarcode(barcode); |