| | |
| | | import com.zt.core.sys.dto.DictLeafDto; |
| | | import com.zt.life.export.dto.WordFile; |
| | | import com.zt.life.modules.itemCirculatOrder.dao.ItemCirculatOrderDao; |
| | | import com.zt.life.modules.itemCirculatOrder.dao.ItemCirculatOrderTechnicalDao; |
| | | 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.project.service.ProjectService; |
| | | import com.zt.life.modules.project.service.SoftwareTestOrderService; |
| | | import com.zt.life.modules.sysBaseInfo.service.TestAgencyInfoService; |
| | | import com.zt.life.sys.dto.OssDto; |
| | | import com.zt.life.sys.service.SysOssConfigService; |
| | | import com.zt.modules.coderule.service.SysCodeRuleService; |
| | | import com.zt.modules.oss.service.SysOssService; |
| | | import com.zt.modules.workflow.dto.FlowInfoDto; |
| | | import com.zt.modules.workflow.service.WorkflowService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | 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; |
| | |
| | | /** |
| | | * item_circulat_order |
| | | * |
| | | * @author zt generator |
| | | * @author zt generator |
| | | * @since 1.0.0 2023-11-22 |
| | | */ |
| | | @Service |
| | | public class ItemCirculatOrderService extends BaseService<ItemCirculatOrderDao, ItemCirculatOrder> { |
| | | public class ItemCirculatOrderService extends BaseService<ItemCirculatOrderDao, ItemCirculatOrder> { |
| | | @Autowired |
| | | private SysOssConfigService sysOssConfigService; |
| | | |
| | |
| | | private ItemCirculatOrderTechnicalService technicalService; |
| | | |
| | | @Autowired |
| | | private SoftwareTestOrderService softwareTestOrderService; |
| | | private WorkflowService workflowService; |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * |
| | |
| | | else { |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("funCode", "item_circulat_order"); |
| | | map.put("projectId",itemCirculatOrderDto.getProjectId().toString()); |
| | | map.put("projectId", itemCirculatOrderDto.getProjectId().toString()); |
| | | itemCirculatOrderDto.getCirculatOrder().setProjectId(itemCirculatOrderDto.getProjectId()); |
| | | itemCirculatOrderDto.getCirculatOrder().setCode(sysCodeRuleService.getNewCode(map)); |
| | | baseDao.insert(itemCirculatOrderDto.getCirculatOrder()); |
| | |
| | | circulatOrderTechnical.setCirculatOrderId(circulatOrderid); |
| | | technicalService.insert(circulatOrderTechnical); |
| | | } |
| | | sysOssConfigService.updateOss(circulatOrderTechnical.getId(), circulatOrderTechnical.getFiles());// 保存附件 |
| | | } |
| | | |
| | | if (itemCirculatOrderDto.getTestAgencyInfo().getId() == 10000) { |
| | |
| | | } else { |
| | | testAgencyInfoService.update(itemCirculatOrderDto.getTestAgencyInfo()); |
| | | } |
| | | sysOssConfigService.updateOss(itemCirculatOrderDto.getId(), itemCirculatOrderDto.getFiles());// 保存附件 |
| | | |
| | | Long bizId = itemCirculatOrderDto.getCirculatOrder().getId(); |
| | | FlowInfoDto flowInfoDto = itemCirculatOrderDto.getFlowInfoDto(); |
| | | |
| | | if (flowInfoDto != null && "tj,bl".contains(flowInfoDto.getSubmitType())) { |
| | | if ("tj".equals(flowInfoDto.getSubmitType())) { |
| | | workflowService.startFlow(flowInfoDto.getFlowCode(), bizId); |
| | | } |
| | | workflowService.approvePass(flowInfoDto.getFlowCode(), bizId, flowInfoDto.getStepIdMark()); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | |
| | | data.setId(circulatOrderid); |
| | | ItemCirculatOrder itemCirculatOrder = this.get(circulatOrderid); |
| | | data.setCirculatOrder(itemCirculatOrder); |
| | | |
| | | projectId = itemCirculatOrder.getProjectId(); |
| | | if (projectId==null){ |
| | | projectId = itemCirculatOrder.getProjectId(); |
| | | } |
| | | |
| | | data.setTestAgencyInfo(testAgencyInfoService.get(circulatOrderid)); |
| | | |
| | |
| | | data.setTechnicalList(technicalList); |
| | | |
| | | } else { |
| | | ItemCirculatOrder itemCirculatOrder =new ItemCirculatOrder(); |
| | | ItemCirculatOrder itemCirculatOrder = new ItemCirculatOrder(); |
| | | data.setCirculatOrder(itemCirculatOrder); |
| | | List<?> resultList = baseDao.itemList(projectId); |
| | | List<?> resultList = technicalService.itemList(projectId); |
| | | List<?> technicalList = resultList; |
| | | data.setTechnicalList((List<ItemCirculatOrderTechnical>) technicalList); |
| | | |
| | | } |
| | | |
| | | if (projectId != null) { |