| | |
| | | @Override |
| | | public VolumeProductionRkgInfoVO getVolumeProductionRkgInfo(Long id) { |
| | | SlVolumeProductionRkgl byId = this.getById(id); |
| | | // 根据仓库id 查询仓库管理员 |
| | | VolumeProductionRkgInfoVO v=BeanUtils.copyBean(byId, VolumeProductionRkgInfoVO.class); |
| | | SlStoreManagement slStoreManagement = slStoreManagementMapper.selectById(byId.getManagementId()); |
| | | v.setZhuren(slStoreManagement.getDirectorId()); |
| | | v.setZhuguan(slStoreManagement.getCompetentId()); |
| | | v.setGuanliyuan(slStoreManagement.getAdministratorId()); |
| | | v.setStoreManagementName(slStoreManagement.getStoreManagementName()); |
| | | SysUser data = sysUserClient.getSysUser(Long.valueOf(byId.getSupplierId())).getData(); |
| | | if (byId.getSupplierId()!=null){ |
| | | SysUser data = sysUserClient.getSysUser(Long.valueOf(byId.getSupplierId())).getData(); |
| | | if (data!=null){ |
| | | v.setSupplierName(data.getNickName()); |
| | | v.setSupplierPhone(data.getPhonenumber()); |
| | | } |
| | | } |
| | | v.setSupplierId(byId.getSupplierId()); |
| | | v.setSupplierName(data.getNickName()); |
| | | v.setSupplierPhone(data.getPhonenumber()); |
| | | SysUser data1 = sysUserClient.getSysUser(Long.valueOf(byId.getSysId())).getData(); |
| | | v.setSysName(data1.getNickName()); |
| | | v.setSysPhone(data1.getPhonenumber()); |
| | | if (byId.getSysId()!=null){ |
| | | SysUser data1 = sysUserClient.getSysUser(Long.valueOf(byId.getSysId())).getData(); |
| | | if (data1!=null){ |
| | | v.setSysName(data1.getNickName()); |
| | | v.setSysPhone(data1.getPhonenumber()); |
| | | } |
| | | } |
| | | v.setAuthorization(byId.getAuthorizationUrl()); |
| | | v.setReason(byId.getReasonsRefusal()); |
| | | return v; |
| | | } |
| | | |
| | |
| | | wrapper1.in(SlVolumeProductionRkgl::getSysId,goodsSkuIdList); |
| | | } |
| | | wrapper1.eq( SlVolumeProductionRkgl::getDelFlag,0); |
| | | wrapper1.orderByDesc(SlVolumeProductionRkgl::getCreateTime); |
| | | wrapper1.orderByDesc(SlVolumeProductionRkgl::getStartiTime); |
| | | Page<SlVolumeProductionRkgl> page2 = this.page(page, wrapper1); |
| | | |
| | | PageDTO<SupplierVolumeProductionRkglVO> SlGoodsShelfDTO = PageDTO.of(page2, SupplierVolumeProductionRkglVO.class); |
| | | List<SupplierVolumeProductionRkglVO> list2 = SlGoodsShelfDTO.getList(); |
| | | for(SupplierVolumeProductionRkglVO list:list2){ |
| | |
| | | |
| | | @Override |
| | | public Long addVolumeProductionRkgl(VolumeProductionRkglDTO volumeProductionRkglDTO) { |
| | | SlStoreManagement slStoreManagement = slStoreManagementMapper.selectById(volumeProductionRkglDTO.getManagementId()); |
| | | String directorId = slStoreManagement.getDirectorId(); |
| | | String competentId = slStoreManagement.getCompetentId(); |
| | | String administratorId = slStoreManagement.getAdministratorId(); |
| | | Long userid = SecurityUtils.getUserId(); |
| | | List<String> list1 = Arrays.asList(administratorId.split(",")); |
| | | List<String> list2 = Arrays.asList(competentId.split(",")); |
| | | List<String> list3 = Arrays.asList(directorId.split(",")); |
| | | SlVolumeProductionRkgl slVolumeProductionRkgl=null; |
| | | if (volumeProductionRkglDTO.getId()==null){ |
| | | new SlVolumeProductionRkgl(); |
| | | slVolumeProductionRkgl = new SlVolumeProductionRkgl(); |
| | | slVolumeProductionRkgl.setAttachmentUrl(volumeProductionRkglDTO.getAttachmentUrl()); |
| | | slVolumeProductionRkgl.setAuthorizationUrl(volumeProductionRkglDTO.getAuthorization()); |
| | | slVolumeProductionRkgl.setAuditStatus(1); |
| | | slVolumeProductionRkgl.setManagementId(volumeProductionRkglDTO.getManagementId()); |
| | | slVolumeProductionRkgl.setAuditStatus(1); |
| | | slVolumeProductionRkgl.setPresentState(1); |
| | | slVolumeProductionRkgl.setSupplierId(volumeProductionRkglDTO.getSupplierId()); |
| | | slVolumeProductionRkgl.setSource(volumeProductionRkglDTO.getSource()); |
| | | slVolumeProductionRkgl.setStartiTime(new Date()); |
| | | slVolumeProductionRkgl.setSysId(userid); |
| | | slVolumeProductionRkgl.setRemark(volumeProductionRkglDTO.getRemark()); |
| | | // 如果发起人是主任 主管 或 管理员 |
| | | if (list1.contains(userid.toString())){ |
| | | slVolumeProductionRkgl.setAuditStatus(1); |
| | | slVolumeProductionRkgl.setPresentState(2); |
| | | } |
| | | if (list2.contains(userid.toString())){ |
| | | slVolumeProductionRkgl.setAuditStatus(1); |
| | | slVolumeProductionRkgl.setPresentState(3); |
| | | } |
| | | if (list3.contains(userid.toString())){ |
| | | slVolumeProductionRkgl.setAuditStatus(1); |
| | | slVolumeProductionRkgl.setPresentState(4); |
| | | } |
| | | |
| | | this.save(slVolumeProductionRkgl); |
| | | }else{ |
| | | slVolumeProductionRkgl = this.getById(volumeProductionRkglDTO.getId()); |
| | |
| | | } |
| | | if (volumeProductionRkglDTO.getAuthorization()!=null){ |
| | | slVolumeProductionRkgl.setAuthorizationUrl(volumeProductionRkglDTO.getAuthorization()); |
| | | } |
| | | // 如果发起人是主任 主管 或 管理员 |
| | | if (list1.contains(userid.toString())){ |
| | | slVolumeProductionRkgl.setAuditStatus(1); |
| | | slVolumeProductionRkgl.setPresentState(2); |
| | | } |
| | | if (list2.contains(userid.toString())){ |
| | | slVolumeProductionRkgl.setAuditStatus(1); |
| | | slVolumeProductionRkgl.setPresentState(3); |
| | | } |
| | | if (list3.contains(userid.toString())){ |
| | | slVolumeProductionRkgl.setAuditStatus(1); |
| | | slVolumeProductionRkgl.setPresentState(4); |
| | | } |
| | | this.updateById(slVolumeProductionRkgl); |
| | | |
| | |
| | | wrapper1.orderByDesc(SlVolumeProductionRk::getCreateTime); |
| | | List<SlVolumeProductionRk> page2 = slVolumeProductionRkMapper.selectList(wrapper1); |
| | | for (SlVolumeProductionRk list : page2) { |
| | | list.setNewAddTime("1"); |
| | | list.setSmerwmNum(list.getErwmNum()); |
| | | LambdaQueryWrapper<ManagementGoodsMaterials> wrapper2 = Wrappers.lambdaQuery(); |
| | | wrapper2.eq(ManagementGoodsMaterials::getGoodsMaterialsId,list.getMaterialsId()); |
| | | wrapper2.eq(ManagementGoodsMaterials::getManagementId,list.getManagementId()); |
| | |
| | | managementGoodsMaterials1.setRepertory(slGoodsMaterials.getRepertory()); |
| | | managementGoodsMaterialsMapper.insert(managementGoodsMaterials1); |
| | | } |
| | | slVolumeProductionRkMapper.updateById(list); |
| | | } |
| | | SlVolumeProductionRkgl byId = this.getById(id); |
| | | byId.setPresentState(4); |