| | |
| | | |
| | | @Transactional |
| | | @Override |
| | | public void adjustLocDetl(LocDetlAdjustParam param, Long userId, User user) { |
| | | public void adjustLocDetl(LocDetlAdjustParam param, Long userId, String username) { |
| | | Date now = new Date(); |
| | | List<ManLocDetl> manLocDetls = this.selectList(new EntityWrapper<ManLocDetl>().eq("loc_no", param.getLocNo())); |
| | | for (ManLocDetl manLocDetl : manLocDetls){ |
| | |
| | | manLocDetl.setAnfme(locDetlAdjust.getCount()); |
| | | manLocDetl.setModiTime(now); |
| | | this.update(manLocDetl,wrapper); |
| | | SaasUtils.insertLog(3,manLocDetl.getLocNo(), manLocDetl.getMatnr(),manLocDetl.getAnfme(),user.getUsername()); |
| | | SaasUtils.insertLog(3, manLocDetl.getLocNo(), manLocDetl.getMatnr(), manLocDetl.getAnfme(), username); |
| | | } |
| | | existFlag = true; |
| | | } |
| | | } |
| | | if(!existFlag){ |
| | | this.delete(wrapper); |
| | | SaasUtils.insertLog(3,manLocDetl.getLocNo(), manLocDetl.getMatnr(),0.0,user.getUsername()); |
| | | SaasUtils.insertLog(3, manLocDetl.getLocNo(), manLocDetl.getMatnr(), 0.0, username); |
| | | |
| | | } |
| | | } |
| | |
| | | manLocDetl.setAnfme(locDetlAdjust.getCount()); |
| | | manLocDetl.setModiTime(now); |
| | | this.update(manLocDetl,wrapper); |
| | | SaasUtils.insertLog(3,manLocDetl.getLocNo(), manLocDetl.getMatnr(),manLocDetl.getAnfme(),user.getUsername()); |
| | | SaasUtils.insertLog(3, manLocDetl.getLocNo(), manLocDetl.getMatnr(), manLocDetl.getAnfme(), username); |
| | | } |
| | | existFlag = true; |
| | | } |
| | | } |
| | | if(!existFlag){ |
| | | ManLocDetl manLocDetl = addManlocDetl(locDetlAdjust, param.getLocNo()); |
| | | SaasUtils.insertLog(3,manLocDetl.getLocNo(), manLocDetl.getMatnr(),0.0,user.getUsername()); |
| | | SaasUtils.insertLog(3, manLocDetl.getLocNo(), manLocDetl.getMatnr(), 0.0, username); |
| | | |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | public double queryStockAndSetLocDto(String matnr, String batch, String orderNo, List<LocDto> locDtoList, double issued, String csocode, String isoseq) { |
| | | Wrapper<ManLocDetl> wrapper = new EntityWrapper<ManLocDetl>().eq("matnr", matnr).orderBy("modi_time"); |
| | | Wrapper<ManLocDetl> wrapper = new EntityWrapper<ManLocDetl>().eq("matnr", matnr).orderBy("appe_time"); |
| | | wrapper.eq("status",1); |
| | | wapperSetCondition(wrapper,"batch",batch); |
| | | wapperSetCondition(wrapper,"csocode",csocode); |