| | |
| | | * @return |
| | | */ |
| | | public List<ItemCirculatOrder> page(QueryFilter queryFilter) { |
| | | List<ItemCirculatOrder> list= baseDao.getList(queryFilter.getQueryParams()); |
| | | List<ItemCirculatOrder> list = baseDao.getList(queryFilter.getQueryParams()); |
| | | if (list.size() > 0) { |
| | | workflowService.getRunFlow(list, "wplz"); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | /**yi |
| | | /** |
| | | * yi |
| | | * 删除 |
| | | * |
| | | * @param ids |
| | |
| | | } |
| | | |
| | | public Boolean save(ItemCirculatOrderDto itemCirculatOrderDto) { |
| | | Long circulatOrderid = itemCirculatOrderDto.getCirculatOrder().getId(); |
| | | if (circulatOrderid != null) |
| | | Long circulatOrderId = itemCirculatOrderDto.getCirculatOrder().getId(); |
| | | if (circulatOrderId != null) |
| | | baseDao.updateById(itemCirculatOrderDto.getCirculatOrder()); |
| | | else { |
| | | Map<String, String> map = new HashMap<>(); |
| | |
| | | itemCirculatOrderDto.getCirculatOrder().setProjectId(itemCirculatOrderDto.getProjectId()); |
| | | itemCirculatOrderDto.getCirculatOrder().setCode(sysCodeRuleService.getNewCode(map)); |
| | | baseDao.insert(itemCirculatOrderDto.getCirculatOrder()); |
| | | circulatOrderid = itemCirculatOrderDto.getCirculatOrder().getId(); |
| | | circulatOrderId = itemCirculatOrderDto.getCirculatOrder().getId(); |
| | | } |
| | | |
| | | for (ItemCirculatOrderTechnical circulatOrderTechnical : itemCirculatOrderDto.getTechnicalList()) { |
| | | circulatOrderTechnical.setCirculatOrderId(circulatOrderid); |
| | | if (circulatOrderTechnical.getId() != null) { |
| | | technicalService.update(circulatOrderTechnical); |
| | | } else { |
| | | circulatOrderTechnical.setCirculatOrderId(circulatOrderid); |
| | | technicalService.insert(circulatOrderTechnical); |
| | | if (circulatOrderTechnical.getName() != null) { |
| | | circulatOrderTechnical.setCirculatOrderId(circulatOrderId); |
| | | if (circulatOrderTechnical.getId() != null) { |
| | | technicalService.update(circulatOrderTechnical); |
| | | } else { |
| | | circulatOrderTechnical.setCirculatOrderId(circulatOrderId); |
| | | technicalService.insert(circulatOrderTechnical); |
| | | } |
| | | sysOssConfigService.updateOss(circulatOrderTechnical.getId(), circulatOrderTechnical.getFiles());// 保存附件 |
| | | } |
| | | sysOssConfigService.updateOss(circulatOrderTechnical.getId(), circulatOrderTechnical.getFiles());// 保存附件 |
| | | } |
| | | |
| | | if (itemCirculatOrderDto.getTestAgencyInfo().getId() == 10000) { |
| | | itemCirculatOrderDto.getTestAgencyInfo().setId(circulatOrderid); |
| | | itemCirculatOrderDto.getTestAgencyInfo().setId(circulatOrderId); |
| | | testAgencyInfoService.insert(itemCirculatOrderDto.getTestAgencyInfo()); |
| | | } else { |
| | | testAgencyInfoService.update(itemCirculatOrderDto.getTestAgencyInfo()); |
| | |
| | | return true; |
| | | } |
| | | |
| | | public ItemCirculatOrderDto getDto(Long projectId, Long circulatOrderid) { |
| | | public ItemCirculatOrderDto getDto(Long projectId, Long circulatOrderId) { |
| | | ItemCirculatOrderDto data = new ItemCirculatOrderDto(); |
| | | if (circulatOrderid != null) { |
| | | data.setId(circulatOrderid); |
| | | ItemCirculatOrder itemCirculatOrder = this.get(circulatOrderid); |
| | | if (circulatOrderId != null) { |
| | | data.setId(circulatOrderId); |
| | | ItemCirculatOrder itemCirculatOrder = this.get(circulatOrderId); |
| | | data.setCirculatOrder(itemCirculatOrder); |
| | | if (projectId == null) { |
| | | projectId = itemCirculatOrder.getProjectId(); |
| | | } |
| | | |
| | | data.setTestAgencyInfo(testAgencyInfoService.get(circulatOrderid)); |
| | | data.setTestAgencyInfo(testAgencyInfoService.get(circulatOrderId)); |
| | | |
| | | List<ItemCirculatOrderTechnical> technicalList = technicalService.getList(circulatOrderid); |
| | | List<ItemCirculatOrderTechnical> technicalList = technicalService.getList(circulatOrderId); |
| | | data.setTechnicalList(technicalList); |
| | | |
| | | } else { |
| | |
| | | } |
| | | if (data.getTestAgencyInfo() == null) |
| | | data.setTestAgencyInfo(testAgencyInfoService.get(10000L)); |
| | | if (circulatOrderid != null) { |
| | | if (circulatOrderId != null) { |
| | | for (ItemCirculatOrderTechnical technical : data.getTechnicalList()) { |
| | | Long technicalId = technical.getId(); |
| | | OssDto ossDto = sysOssConfigService.getOssByBusiType(technicalId, "circulat_order"); |
| | |
| | | try { |
| | | ItemCirculatOrderDto dataObj = this.getDto(null, id); |
| | | |
| | | String acceptorPath = "文件图片:"+ getFilesPath.getSignPath(Convert.toLong(dataObj.getCirculatOrder().getItemAcceptorId())); |
| | | String acceptorPath = "文件图片:" + getFilesPath.getSignPath(Convert.toLong(dataObj.getCirculatOrder().getItemAcceptorId())); |
| | | dataObj.getCirculatOrder().setItemAcceptor(acceptorPath); |
| | | String detectorPath = "文件图片:"+getFilesPath.getSignPath(Convert.toLong(dataObj.getCirculatOrder().getCalibratDetectorId())); |
| | | String detectorPath = "文件图片:" + getFilesPath.getSignPath(Convert.toLong(dataObj.getCirculatOrder().getCalibratDetectorId())); |
| | | dataObj.getCirculatOrder().setCalibratDetector(detectorPath); |
| | | String issuerPath = "文件图片:"+getFilesPath.getSignPath(Convert.toLong(dataObj.getCirculatOrder().getItemIssuerId())); |
| | | String issuerPath = "文件图片:" + getFilesPath.getSignPath(Convert.toLong(dataObj.getCirculatOrder().getItemIssuerId())); |
| | | dataObj.getCirculatOrder().setItemIssuer(issuerPath); |
| | | //通用字典列表字符串生成 |
| | | String itemRequireStr = getShowDictList.getShowDictList(dataObj.getCirculatOrder().getItemRequire(), "is_or_not", false); |