| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", name = "companyId", dataType = "int", required = false, value = "公司iD"), |
| | | @ApiImplicitParam(paramType = "query", name = "type", dataType = "int", required = true, value = "类型1过程检验2最终检验"), |
| | | @ApiImplicitParam(paramType = "query", name = "itemId", dataType = "int", required = false, value = "项目iD"), |
| | | @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = true, value = "页码"), |
| | | @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = true, value = "每页数量") |
| | | }) |
| | | @GetMapping("/inspection/list") |
| | | public CommonResult selectProcessInspectionList(Integer companyId, @RequestParam("type") Integer templateType){ |
| | | return CommonResult.success(processInspectionService.selectProcessInspectionList(companyId, templateType)); |
| | | public CommonResult selectProcessInspectionList(Integer companyId, @RequestParam("type") Integer templateType,Integer itemId){ |
| | | return CommonResult.success(processInspectionService.selectProcessInspectionList(companyId, templateType, itemId)); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | /** |
| | | * 行业模版 |
| | | * @param companyId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "标准化模版(分页)") |
| | |
| | | @ApiImplicitParam(paramType = "query", name = "companyId", dataType = "int", required = false, value = "公司iD"), |
| | | @ApiImplicitParam(paramType = "query", name = "templateType", dataType = "int", required = true, value = "类型1体系标准2技术标准3应用标准4程序文件5作业指导书6记录及表单7技术类8生产类9其他知识产权"), |
| | | @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = true, value = "页码"), |
| | | @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = true, value = "每页数量") |
| | | @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = true, value = "每页数量"), |
| | | @ApiImplicitParam(paramType = "query", name = "sort", dataType = "int", required = true, value = "排序类型1正序2倒序"), |
| | | @ApiImplicitParam(paramType = "query", name = "templateName", dataType = "string", required = false, value = "模板名称") |
| | | }) |
| | | @GetMapping("/standardizedTemplate/list") |
| | | public CommonResult selectStandardizedTemplateList(Integer companyId, @RequestParam("templateType") Integer templateType){ |
| | | return CommonResult.success(standardizedTemplateService.selectStandardizedTemplateList(companyId, templateType)); |
| | | public CommonResult selectStandardizedTemplateList(StandardizedTemplate standardizedTemplate){ |
| | | return CommonResult.success(standardizedTemplateService.selectStandardizedTemplateList(standardizedTemplate)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @TableField(value = "mess") |
| | | private String mess; |
| | | |
| | | @ApiModelProperty("目录名称 (1范围目录 2技术类 3项目类 4组织环境目录 5领导作业目录 6策划目录 7支持目录 8运行目录 9绩效评价目录 10改进目录)") |
| | | @ApiModelProperty("目录名称 (1范围目录 2技术类 3项目类 4组织环境目录 5领导作业目录 6策划目录 7支持目录 8运行目录 9绩效评价目录 10改进目录 11项目策划目录12生产过程目录13不合格品目录)") |
| | | @TableField(value = "type") |
| | | private Integer type; |
| | | |
| | |
| | | @TableField("item_id") |
| | | private Integer itemId; |
| | | |
| | | @ApiModelProperty(value = "项目id") |
| | | @ApiModelProperty(value = "附件名称") |
| | | @TableField("file_name") |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty(value = "项目id") |
| | | @ApiModelProperty(value = "附件地址") |
| | | @TableField("file_path") |
| | | private String filePath; |
| | | |
| | | @ApiModelProperty(value = "文档类型 3涉及开发过程11项目策划目录12生产过程目录13不合格品目录") |
| | | @TableField("document_type") |
| | | private Integer documentType; |
| | | |
| | | private Integer del_flag; |
| | | |
| | | |
| | |
| | | @TableField("update_time") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("排序1正序2倒序") |
| | | @TableField(exist = false) |
| | | private Integer sort; |
| | | |
| | | } |
| | |
| | | package com.gkhy.exam.system.domain.req; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.gkhy.exam.system.domain.ProjectDocument; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "CatalogueProjectDocumentReq",description = "项目文档") |
| | | public class CatalogueProjectDocumentReq { |
| | | private Integer companyId; |
| | | private Integer catalogueId; |
| | | private Integer itemId; |
| | | @ApiModelProperty(value = "文档类型3涉及开发过程11项目策划目录12生产过程目录13不合格品目录") |
| | | private Integer type; |
| | | private List<ProjectDocument> projectDocuments; |
| | | } |
| | |
| | | |
| | | @Mapper |
| | | public interface ProcessInspectionMapper extends BaseMapper<ProcessInspection> { |
| | | List<ProcessInspection> selectByCompanyidAndTypeList(@Param("companyId") Integer companyId, @Param("templateType") Integer templateType); |
| | | List<ProcessInspection> selectByCompanyidAndTypeList(@Param("companyId") Integer companyId, @Param("templateType") Integer templateType |
| | | , @Param("itemId") Integer itemId); |
| | | } |
| | |
| | | public interface ProjectDocumentMapper extends BaseMapper<ProjectDocument> { |
| | | Integer insertBaths(@Param("projectDocuments") List<ProjectDocument> projectDocuments); |
| | | |
| | | List<ProjectDocument> selectDocumentList(@Param("companyId") Integer companyId, @Param("itemId") Integer itemId, @Param("catalogueId") Integer catalogueId); |
| | | List<ProjectDocument> selectDocumentList(@Param("companyId") Integer companyId, @Param("itemId") Integer itemId, |
| | | @Param("catalogueId") Integer catalogueId,@Param("documentType") Integer documentType); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.gkhy.exam.system.domain.CompanyIndustryTemplate; |
| | | import com.gkhy.exam.system.domain.StandardizedTemplate; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.mapstruct.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface StandardizedTemplateMapper extends BaseMapper<StandardizedTemplate> { |
| | | List<StandardizedTemplate> selectStandardizedTemplateList(Integer companyId, Integer templateType); |
| | | // List<StandardizedTemplate> selectStandardizedTemplateList(@Param("companyId") Integer companyId, @Param("templateType") Integer templateType ,@Param("sort") Integer sort); |
| | | // |
| | | // List<StandardizedTemplate> selectStandardizedTemplateListV2(@Param("companyId")Integer companyId, @Param("templateType")Integer templateType, |
| | | // @Param("industryTypeId")Integer industryTypeId,@Param("sort") Integer sort); |
| | | |
| | | List<StandardizedTemplate> selectStandardizedTemplateListV2(Integer companyId, Integer templateType, Integer industryTypeId); |
| | | |
| | | List<StandardizedTemplate> selectStandardizedTemplateList(StandardizedTemplate template); |
| | | |
| | | List<StandardizedTemplate> selectStandardizedTemplateListV2(StandardizedTemplate template); |
| | | |
| | | int updateStandardizedTemplateById(StandardizedTemplate template); |
| | | } |
| | |
| | | import com.gkhy.exam.system.domain.ProcessInspection; |
| | | |
| | | public interface ProcessInspectionService extends IService<ProcessInspection> { |
| | | CommonPage selectProcessInspectionList(Integer companyId, Integer templateType); |
| | | CommonPage selectProcessInspectionList(Integer companyId, Integer templateType,Integer itemId); |
| | | |
| | | CommonResult insertProcessInspection(ProcessInspection processInspection); |
| | | |
| | |
| | | public interface ProjectDocumentService extends IService<ProjectDocument> { |
| | | CommonResult insertprojectDocument(CatalogueProjectDocumentReq projectDocument); |
| | | |
| | | List<ProjectDocument> selectList(Integer companyId, Integer itemId, Integer catalogueId); |
| | | List<ProjectDocument> selectList(Integer companyId, Integer itemId, Integer catalogueId,Integer documentType); |
| | | |
| | | CommonResult updateprojectDocument(CatalogueProjectDocumentReq projectDocument); |
| | | } |
| | |
| | | import com.gkhy.exam.system.domain.StandardizedTemplate; |
| | | |
| | | public interface StandardizedTemplateService extends IService<StandardizedTemplate> { |
| | | CommonPage selectStandardizedTemplateList(Integer companyId,Integer templateType); |
| | | CommonPage selectStandardizedTemplateList(StandardizedTemplate standardizedTemplate); |
| | | |
| | | CommonResult insertStandardizedTemplate(StandardizedTemplate standardizedTemplate); |
| | | |
| | |
| | | public CommonResult selectCatalogueDocumentList(CatalogueReq catalogueReq) { |
| | | List<CatalogueVo> catalogueVos = catalogueMapper.selectCatalogueList(catalogueReq); |
| | | for (CatalogueVo catalogueVo : catalogueVos) { |
| | | List<ProjectDocument> projectDocuments = projectDocumentService.selectList(catalogueVo.getCompanyId(), catalogueReq.getItemId(), catalogueVo.getId()); |
| | | List<ProjectDocument> projectDocuments = projectDocumentService.selectList(catalogueVo.getCompanyId(), catalogueReq.getItemId(), catalogueVo.getId(),catalogueReq.getType()); |
| | | catalogueVo.setProjectDocuments(projectDocuments); |
| | | } |
| | | |
| | |
| | | private ProcessInspectionMapper processInspectionMapper; |
| | | |
| | | @Override |
| | | public CommonPage selectProcessInspectionList(Integer companyId, Integer templateType) { |
| | | public CommonPage selectProcessInspectionList(Integer companyId, Integer templateType,Integer itemId) { |
| | | boolean admin = SecurityUtils.adminUser(); |
| | | if (!admin){ |
| | | if (companyId==null){ |
| | | companyId = SecurityUtils.getCompanyId().intValue(); |
| | | } |
| | | } |
| | | List<ProcessInspection> processInspections = processInspectionMapper.selectByCompanyidAndTypeList(companyId, templateType); |
| | | List<ProcessInspection> processInspections = processInspectionMapper.selectByCompanyidAndTypeList(companyId, templateType, itemId); |
| | | return CommonPage.restPage(processInspections); |
| | | } |
| | | |
| | |
| | | public CommonResult insertprojectDocument(CatalogueProjectDocumentReq projectDocument) { |
| | | List<ProjectDocument> projectDocuments = projectDocument.getProjectDocuments(); |
| | | for (ProjectDocument document : projectDocuments) { |
| | | document.setDocumentType(projectDocument.getType()); |
| | | document.setCompanyId(projectDocument.getCompanyId()); |
| | | document.setCatalogueId(projectDocument.getCatalogueId()); |
| | | document.setItemId(projectDocument.getItemId()); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<ProjectDocument> selectList(Integer companyId, Integer itemId, Integer catalogueId) { |
| | | return projectDocumentMapper.selectDocumentList(companyId,itemId,catalogueId); |
| | | public List<ProjectDocument> selectList(Integer companyId, Integer itemId, Integer catalogueId,Integer documentType) { |
| | | return projectDocumentMapper.selectDocumentList(companyId,itemId,catalogueId,documentType); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | List<ProjectDocument> projectDocuments = projectDocument.getProjectDocuments(); |
| | | for (ProjectDocument document : projectDocuments) { |
| | | document.setDocumentType(projectDocument.getType()); |
| | | document.setCompanyId(projectDocument.getCompanyId()); |
| | | document.setCatalogueId(projectDocument.getCatalogueId()); |
| | | document.setItemId(projectDocument.getItemId()); |
| | |
| | | @Autowired |
| | | private CustomerService customerService; |
| | | @Override |
| | | public CommonPage selectStandardizedTemplateList(Integer companyId, Integer templateType) { |
| | | public CommonPage selectStandardizedTemplateList(StandardizedTemplate standardizedTemplate) { |
| | | boolean admin = SecurityUtils.adminUser(); |
| | | Integer companyId = standardizedTemplate.getCompanyId(); |
| | | Integer templateType = standardizedTemplate.getTemplateType(); |
| | | if (!admin){ |
| | | if (companyId==null){ |
| | | companyId = SecurityUtils.getCompanyId().intValue(); |
| | |
| | | } |
| | | PageUtils.startPage(); |
| | | List<StandardizedTemplate> standardizedTemplates =new ArrayList<>(); |
| | | if (templateType==2 || templateType==10 || templateType == 3){ |
| | | standardizedTemplates = standardizedTemplateMapper.selectStandardizedTemplateListV2(companyId, templateType, null); |
| | | //templateType==2 || templateType==10 || |
| | | if ( templateType == 3){ |
| | | standardizedTemplates = standardizedTemplateMapper.selectStandardizedTemplateListV2(standardizedTemplate); |
| | | }else { |
| | | standardizedTemplates = standardizedTemplateMapper.selectStandardizedTemplateList(companyId, templateType); |
| | | standardizedTemplates = standardizedTemplateMapper.selectStandardizedTemplateList(standardizedTemplate); |
| | | } |
| | | |
| | | return CommonPage.restPage(standardizedTemplates); |
| | |
| | | public CommonResult getStandardizedQualityByCompanyId(Integer companyId) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | //程序文件 |
| | | List<StandardizedTemplate> companyIndustryTemplates = standardizedTemplateMapper.selectStandardizedTemplateList(companyId, 4); |
| | | StandardizedTemplate programFile = new StandardizedTemplate(); |
| | | programFile.setTemplateType(4); |
| | | programFile.setCompanyId(companyId); |
| | | programFile.setSort(1); |
| | | List<StandardizedTemplate> companyIndustryTemplates = standardizedTemplateMapper.selectStandardizedTemplateList(programFile); |
| | | //职能分配 |
| | | List<SysFunctionalDistribution> sysFunctionalDistributions = sysFunctionalDistributionMapper.selectListVo(companyId.longValue()); |
| | | //部门 |
| | |
| | | |
| | | <insert id="insertBaths"> |
| | | INSERT INTO `project_document` |
| | | (`company_id`, `catalogue_id`, `item_id`, `file_name`, `file_path` ) |
| | | (`company_id`, `catalogue_id`, `item_id`, `file_name`, `file_path`,document_type ) |
| | | VALUES |
| | | <foreach collection="projectDocuments" separator="," item="item"> |
| | | ( #{item.companyId}, #{item.catalogueId}, #{item.itemId}, #{item.fileName}, #{item.filePath} ) |
| | | ( #{item.companyId}, #{item.catalogueId}, #{item.itemId}, #{item.fileName}, #{item.filePath}, #{item.documentType} ) |
| | | </foreach> |
| | | |
| | | </insert> |
| | |
| | | `item_id`, |
| | | `file_name`, |
| | | `file_path`, |
| | | `del_flag` |
| | | `del_flag`, |
| | | `document_type` |
| | | FROM |
| | | `project_document` |
| | | where del_flag = 1 |
| | | and company_id = #{companyId} |
| | | and catalogue_id = #{catalogueId} |
| | | and item_id = #{itemId} |
| | | and document_type = #{documentType} |
| | | </select> |
| | | </mapper> |
| | |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <select id="selectStandardizedTemplateList" resultType="com.gkhy.exam.system.domain.StandardizedTemplate"> |
| | | <select id="selectStandardizedTemplateList" resultType="com.gkhy.exam.system.domain.StandardizedTemplate" parameterType="com.gkhy.exam.system.domain.StandardizedTemplate"> |
| | | SELECT |
| | | st.`id`, |
| | | st.`company_id`, |
| | |
| | | <if test="companyId!=null and companyId!=''"> |
| | | and st.company_id = #{companyId} |
| | | </if> |
| | | ORDER BY |
| | | st.create_time DESC |
| | | <if test="templateName!=null and templateName!=''"> |
| | | and st.template_name like concat('%',#{templateName},'%') |
| | | </if> |
| | | <if test="sort!=null and sort==1"> |
| | | ORDER BY |
| | | st.template_name asc |
| | | </if> |
| | | <if test="sort!=null and sort==2"> |
| | | ORDER BY |
| | | st.template_name desc |
| | | </if> |
| | | <if test="sort ==null or sort== '' or sort == 0"> |
| | | ORDER BY |
| | | st.create_time desc |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | |
| | | <select id="selectStandardizedTemplateListV2" resultType="com.gkhy.exam.system.domain.StandardizedTemplate"> |
| | | <select id="selectStandardizedTemplateListV2" resultType="com.gkhy.exam.system.domain.StandardizedTemplate" parameterType="com.gkhy.exam.system.domain.StandardizedTemplate"> |
| | | SELECT |
| | | st.`id`, |
| | | st.`company_id`, |
| | |
| | | <if test="industryTypeId!=null "> |
| | | and st.industry_type_id = #{industryTypeId} |
| | | </if> |
| | | ORDER BY |
| | | st.create_time DESC |
| | | <if test="templateName!=null and templateName!=''"> |
| | | and st.template_name like concat('%',#{templateName},'%') |
| | | </if> |
| | | <if test="sort!=null and sort==1"> |
| | | ORDER BY |
| | | st.template_name asc |
| | | </if> |
| | | <if test="sort!=null and sort==2"> |
| | | ORDER BY |
| | | st.template_name desc |
| | | </if> |
| | | <if test="sort ==null or sort== '' or sort == 0"> |
| | | ORDER BY |
| | | st.create_time desc |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |