| | |
| | | import com.zt.life.modules.itemCirculatOrder.model.ItemCirculatOrder; |
| | | import com.zt.life.modules.itemCirculatOrder.model.ItemCirculatOrderTechnical; |
| | | import com.zt.life.modules.itemCirculatOrder.service.ItemCirculatOrderTechnicalService; |
| | | import com.zt.life.modules.project.model.SoftwareTestOrderDeliverable; |
| | | import com.zt.life.modules.project.model.SoftwareTestOrderMeasured; |
| | | import com.zt.life.modules.project.service.ProjectService; |
| | | import com.zt.life.modules.sysBaseInfo.service.TestAgencyInfoService; |
| | | import com.zt.life.sys.service.SysOssConfigService; |
| | |
| | | super.deleteLogic(ids); |
| | | } |
| | | |
| | | /* public Boolean save(ItemCirculatOrderDto itemCirculatOrderDto) { |
| | | Long circulatOrderid = itemCirculatOrderDto.getCirculatOrder().getId(); |
| | | if (circulatOrderid != null) |
| | | baseDao.updateById(itemCirculatOrderDto.getCirculatOrder()); |
| | | public Boolean save(ConfigItemWarehouseDto configItemDto) { |
| | | Long warehouseId = configItemDto.getConfigItemWarehouse().getId(); |
| | | if (warehouseId != null) |
| | | baseDao.updateById(configItemDto.getConfigItemWarehouse()); |
| | | else { |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("funCode", "item_circulat_order"); |
| | | map.put("projectId",itemCirculatOrderDto.getProjectId().toString()); |
| | | itemCirculatOrderDto.getCirculatOrder().setProjectId(itemCirculatOrderDto.getProjectId()); |
| | | itemCirculatOrderDto.getCirculatOrder().setCode(sysCodeRuleService.getNewCode(map)); |
| | | baseDao.insert(itemCirculatOrderDto.getCirculatOrder()); |
| | | circulatOrderid = itemCirculatOrderDto.getCirculatOrder().getId(); |
| | | map.put("funCode", "config_item_warehouse"); |
| | | map.put("projectId",configItemDto.getProjectId().toString()); |
| | | configItemDto.getConfigItemWarehouse().setProjectId(configItemDto.getProjectId()); |
| | | configItemDto.getConfigItemWarehouse().setCode(sysCodeRuleService.getNewCode(map)); |
| | | baseDao.insert(configItemDto.getConfigItemWarehouse()); |
| | | warehouseId = configItemDto.getConfigItemWarehouse().getId(); |
| | | } |
| | | |
| | | for (ItemCirculatOrderTechnical circulatOrderTechnical : itemCirculatOrderDto.getTechnicalList()) { |
| | | circulatOrderTechnical.setCirculatOrderId(circulatOrderid); |
| | | if (circulatOrderTechnical.getId() != null) { |
| | | technicalService.update(circulatOrderTechnical); |
| | | for (WarehouseConfigItem configItem : configItemDto.getConfigItemList()) { |
| | | configItem.setWarehouseId(warehouseId); |
| | | if (configItem.getId() != null) { |
| | | configItemService.update(configItem); |
| | | } else { |
| | | circulatOrderTechnical.setCirculatOrderId(circulatOrderid); |
| | | technicalService.insert(circulatOrderTechnical); |
| | | configItem.setWarehouseId(warehouseId); |
| | | configItemService.insert(configItem); |
| | | } |
| | | sysOssConfigService.updateOss(circulatOrderTechnical.getId(), circulatOrderTechnical.getFiles());// 保存附件 |
| | | } |
| | | |
| | | if (itemCirculatOrderDto.getTestAgencyInfo().getId() == 10000) { |
| | | itemCirculatOrderDto.getTestAgencyInfo().setId(circulatOrderid); |
| | | testAgencyInfoService.insert(itemCirculatOrderDto.getTestAgencyInfo()); |
| | | for (WarehouseCmAudit cmAudit : configItemDto.getCmAuditList()) { |
| | | cmAudit.setWarehouseId(warehouseId); |
| | | if (cmAudit.getId() != null) { |
| | | cmAuditService.update(cmAudit); |
| | | } else { |
| | | testAgencyInfoService.update(itemCirculatOrderDto.getTestAgencyInfo()); |
| | | cmAudit.setWarehouseId(warehouseId); |
| | | cmAuditService.insert(cmAudit); |
| | | } |
| | | } |
| | | |
| | | for (WarehouseQaAudit qaAudit : configItemDto.getQaAuditList()) { |
| | | qaAudit.setWarehouseId(warehouseId); |
| | | if (qaAudit.getId() != null) { |
| | | qaAuditService.update(qaAudit); |
| | | } else { |
| | | qaAudit.setWarehouseId(warehouseId); |
| | | qaAuditService.insert(qaAudit); |
| | | } |
| | | } |
| | | sysOssConfigService.updateOss(configItemDto.getId(), configItemDto.getFiles());// 保存附件 |
| | | |
| | | return true; |
| | | }*/ |
| | | } |
| | | |
| | | public ConfigItemWarehouseDto getDto(Long projectId, Long warehouseId) { |
| | | ConfigItemWarehouseDto data = new ConfigItemWarehouseDto(); |
| | |
| | | data.setConfigItemWarehouse(configItemWarehouse); |
| | | |
| | | projectId = configItemWarehouse.getProjectId(); |
| | | |
| | | data.setTestAgencyInfo(testAgencyInfoService.get(warehouseId)); |
| | | |
| | | List<WarehouseCmAudit> CmAuditList = cmAuditService.getList(warehouseId); |
| | | data.setCmAuditList(CmAuditList); |
| | |
| | | } else { |
| | | ConfigItemWarehouse configItemWarehouse =new ConfigItemWarehouse(); |
| | | data.setConfigItemWarehouse(configItemWarehouse); |
| | | List<?> cmList = cmAuditService.itemList(projectId); |
| | | List<?> cmList = baseDao.itemList("warehouse_cm_audit"); |
| | | List<?> CmAuditList = cmList; |
| | | data.setCmAuditList((List<WarehouseCmAudit>) CmAuditList); |
| | | List<?> resultList = qaAuditService.itemList(projectId); |
| | | List<?> qaList = baseDao.itemList("warehouse_qa_audit"); |
| | | List<?> QaAuditList = qaList; |
| | | data.setQaAuditList((List<WarehouseQaAudit>) QaAuditList); |
| | | List<?> resultList = configItemService.ConfigItemList(projectId); |
| | | List<?> ConfigItemList = resultList; |
| | | data.setConfigItemList((List<WarehouseConfigItem>) ConfigItemList); |
| | | } |
| | | |
| | | if (projectId != null) { |
| | | data.setProjectId(projectId); |
| | | data.setProject(projectService.get(projectId)); |
| | | } |
| | | |
| | | if (data.getTestAgencyInfo() == null) |
| | | data.setTestAgencyInfo(testAgencyInfoService.get(10000L)); |
| | | |
| | | return data; |
| | | } |