| | |
| | | import com.zt.life.modules.configItemWarehouse.model.WarehouseCmAudit; |
| | | import com.zt.life.modules.configItemWarehouse.model.WarehouseConfigItem; |
| | | import com.zt.life.modules.configItemWarehouse.model.WarehouseQaAudit; |
| | | import com.zt.life.modules.itemCirculatOrder.dto.ItemCirculatOrderDto; |
| | | 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.mainPart.utils.GetFilesPath; |
| | | import com.zt.life.modules.mainPart.utils.GetShowDictList; |
| | | 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.modules.testCheckOrder.model.TestCheckOrder; |
| | | import com.zt.life.modules.testCheckOrder.service.TestCheckOrderService; |
| | | import com.zt.life.sys.service.SysOssConfigService; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import com.zt.common.db.query.QueryFilter; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.FileNotFoundException; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | |
| | | /** |
| | |
| | | @Autowired |
| | | private GetFilesPath getFilesPath; |
| | | |
| | | @Autowired |
| | | private ItemCirculatOrderTechnicalService technicalService; |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * |
| | |
| | | |
| | | for (WarehouseConfigItem configItem : configItemDto.getConfigItemList()) { |
| | | configItem.setWarehouseId(warehouseId); |
| | | if (configItem.getItemName() != null) { |
| | | if (configItem.getId() != null) { |
| | | WarehouseConfigItem configItem2 = configItemService.get(configItem.getId()); |
| | | if (CommonUtils.isActureChangeData(configItem,configItem2)) { |
| | |
| | | } |
| | | } |
| | | sysOssConfigService.updateOss(configItem.getId(), configItem.getFiles());// 保存附件 |
| | | } |
| | | } |
| | | |
| | | for (WarehouseCmAudit cmAudit : configItemDto.getCmAuditList()) { |
| | |
| | | return true; |
| | | } |
| | | |
| | | public ConfigItemWarehouseDto getDto(Long projectId, Long warehouseId) { |
| | | public ConfigItemWarehouseDto getDto(Long projectId, Long warehouseId, String libraryType) { |
| | | ConfigItemWarehouseDto data = new ConfigItemWarehouseDto(); |
| | | if (warehouseId != null) { |
| | | data.setId(warehouseId); |
| | | ConfigItemWarehouse configItemWarehouse = this.get(warehouseId); |
| | | data.setConfigItemWarehouse(configItemWarehouse); |
| | | |
| | | if (projectId == null) { |
| | | if (configItemWarehouse != null && projectId == null) { |
| | | projectId = configItemWarehouse.getProjectId(); |
| | | } |
| | | List<WarehouseCmAudit> CmAuditList = cmAuditService.getList(warehouseId); |
| | |
| | | |
| | | } else { |
| | | ConfigItemWarehouse configItemWarehouse = new ConfigItemWarehouse(); |
| | | configItemWarehouse.setLibraryType(libraryType); |
| | | data.setConfigItemWarehouse(configItemWarehouse); |
| | | List<?> cmList = baseDao.itemList("warehouse_cm_audit"); |
| | | List<?> CmAuditList = cmList; |
| | |
| | | List<?> qaList = baseDao.itemList("warehouse_qa_audit"); |
| | | List<?> QaAuditList = qaList; |
| | | data.setQaAuditList((List<WarehouseQaAudit>) QaAuditList); |
| | | List<?> resultList = configItemService.ConfigItemList(projectId); |
| | | List<?> resultList = new ArrayList<>(); |
| | | if ("1".equals(libraryType)) { |
| | | List<String> srcId = technicalService.getsrcId(projectId); |
| | | /* String ids = String.join(", ", srcId.stream() |
| | | .map(id -> "\"" + id + "\"") |
| | | .collect(Collectors.toList()));*/ |
| | | String ids = String.join(", ", srcId); |
| | | resultList = configItemService.ConfigItemList(projectId, ids); |
| | | } |
| | | List<?> ConfigItemList = resultList; |
| | | data.setConfigItemList((List<WarehouseConfigItem>) ConfigItemList); |
| | | } |
| | |
| | | return data; |
| | | } |
| | | |
| | | public void exportWarehouseOrder(Long id, HttpServletRequest request, HttpServletResponse response) { |
| | | public void exportWarehouseOrder(Long id, HttpServletRequest request, HttpServletResponse response, String libraryType) { |
| | | try { |
| | | ConfigItemWarehouseDto dataObj = this.getDto(null, id); |
| | | ConfigItemWarehouseDto dataObj = this.getDto(null, id, libraryType); |
| | | |
| | | String qaAuditorPath = "文件图片:"+ getFilesPath.getSignPath(Convert.toLong(dataObj.getConfigItemWarehouse().getQaAuditorId())); |
| | | dataObj.getConfigItemWarehouse().setQaAuditor(qaAuditorPath); |