| | |
| | | @Autowired |
| | | private ItemReviewService itemReviewService; |
| | | |
| | | @Autowired |
| | | private ProjectDocumentService projectDocumentService; |
| | | |
| | | |
| | | /** |
| | | * 质量目标列表 |
| | |
| | | |
| | | |
| | | /** |
| | | * 质量管理体系运行列表 |
| | | * 目录数据 |
| | | * @param catalogueReq |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "质量管理体系运行列表") |
| | | @ApiOperation(value = "目录数据列表") |
| | | @GetMapping("/catalogue/list") |
| | | public CommonResult listCatalogue(CatalogueReq catalogueReq){ |
| | | return CommonResult.success(catalogueService.selectCatalogueList(catalogueReq)); |
| | |
| | | * @param catalogue |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "质量管理体系运行新增") |
| | | @ApiOperation(value = "目录数据新增") |
| | | @PostMapping("/catalogue/insert") |
| | | public CommonResult insertCatalogue(@RequestBody Catalogue catalogue){ |
| | | return catalogueService.insertCatalogue(catalogue); |
| | |
| | | * @param catalogue |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "质量管理体系运行修改") |
| | | @ApiOperation(value = "目录数据修改") |
| | | @PostMapping("/catalogue/update") |
| | | public CommonResult updateCatalogue(@RequestBody Catalogue catalogue){ |
| | | return catalogueService.updateCatalogue(catalogue); |
| | |
| | | * @param catalogueId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "质量管理体系运行删除") |
| | | @ApiOperation(value = "目录数据删除") |
| | | @GetMapping("/catalogue/deleted") |
| | | public CommonResult deletedCatalogue(@RequestParam("catalogueId") Integer catalogueId){ |
| | | return catalogueService.deletedCatalogue(catalogueId); |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 项目文档新增 |
| | | * @param projectDocument |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "项目文档新增") |
| | | @PostMapping("/project/insert") |
| | | public CommonResult insertProjectDocument(@RequestBody CatalogueProjectDocumentReq projectDocument){ |
| | | return projectDocumentService.insertprojectDocument(projectDocument); |
| | | } |
| | | |
| | | /** |
| | | * 项目文档修改 |
| | | * @param projectDocument |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "项目文档修改") |
| | | @PostMapping("/project/update") |
| | | public CommonResult updateProjectDocument(@RequestBody CatalogueProjectDocumentReq projectDocument){ |
| | | return projectDocumentService.updateprojectDocument(projectDocument); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 目录文档数据 |
| | | * @param catalogueReq |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "目录文档数据列表") |
| | | @GetMapping("/document/list") |
| | | public CommonResult listProjectDocument(CatalogueReq catalogueReq){ |
| | | return CommonResult.success(catalogueService.selectCatalogueDocumentList(catalogueReq)); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | @TableField(value = "sort") |
| | | private Integer sort; |
| | | |
| | | @ApiModelProperty("模版文件名称") |
| | | @TableField(value = "file_name") |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty("模版文件路径") |
| | | @TableField(value = "file_path") |
| | | private String filePath; |
| | | |
| | | @ApiModelProperty("是否上传文件") |
| | | @TableField(value = "is_file") |
| | | private Integer isFile; |
| | | |
| | | @TableField(value = "del_flag") |
| | | private Integer delFlag; |
| | | |
| 对比新文件 |
| | |
| | | package com.gkhy.exam.system.domain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | @Getter |
| | | @Setter |
| | | @TableName("project_document") |
| | | @ApiModel(value = "projectDocument",description = "项目文档") |
| | | public class ProjectDocument { |
| | | |
| | | @ApiModelProperty("主键") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @TableField("company_id") |
| | | private Integer companyId; |
| | | |
| | | @ApiModelProperty(value = "项目id") |
| | | @TableField("catalogue_id") |
| | | private Integer catalogueId; |
| | | |
| | | @ApiModelProperty(value = "项目id") |
| | | @TableField("item_id") |
| | | private Integer itemId; |
| | | |
| | | @ApiModelProperty(value = "项目id") |
| | | @TableField("file_name") |
| | | private String fileName; |
| | | |
| | | @ApiModelProperty(value = "项目id") |
| | | @TableField("file_path") |
| | | private String filePath; |
| | | |
| | | private Integer del_flag; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | @TableField("approve_content") |
| | | private String approveContent; |
| | | |
| | | @ApiModelProperty(value = "审批意见") |
| | | @TableField("approve_mess") |
| | | private String approveMess; |
| | | |
| | | @ApiModelProperty(value = "审批时间") |
| | | @TableField("approve_time") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| 对比新文件 |
| | |
| | | package com.gkhy.exam.system.domain.req; |
| | | |
| | | import com.gkhy.exam.system.domain.ProjectDocument; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class CatalogueProjectDocumentReq { |
| | | private Integer companyId; |
| | | private Integer catalogueId; |
| | | private Integer itemId; |
| | | private List<ProjectDocument> projectDocuments; |
| | | } |
| | |
| | | private Integer catalogueId; |
| | | private Integer companyId; |
| | | private Integer number; |
| | | private Integer itemId; |
| | | } |
| | |
| | | package com.gkhy.exam.system.domain.vo; |
| | | |
| | | import com.gkhy.exam.system.domain.ProjectDocument; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | |
| | | private String mess; |
| | | private Integer type; |
| | | private Integer sort; |
| | | private String fileName; |
| | | private String filePath; |
| | | private Integer isFile; |
| | | |
| | | private Integer delFlag; |
| | | private List<ProjectDocument> projectDocuments; |
| | | |
| | | private List<CatalogueVo> children; |
| | | |
| | | |
| | | } |
| 对比新文件 |
| | |
| | | package com.gkhy.exam.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.gkhy.exam.system.domain.ProjectDocument; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.mapstruct.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | 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); |
| | | } |
| | |
| | | CommonResult selectCatalogueDataFileList(CatalogueReq catalogueReq); |
| | | |
| | | CommonResult copyCatalogue(List<CatalogueVo> catalogue); |
| | | |
| | | CommonResult selectCatalogueDocumentList(CatalogueReq catalogueReq); |
| | | } |
| 对比新文件 |
| | |
| | | package com.gkhy.exam.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.exam.common.api.CommonResult; |
| | | import com.gkhy.exam.system.domain.ProjectDocument; |
| | | import com.gkhy.exam.system.domain.req.CatalogueProjectDocumentReq; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface ProjectDocumentService extends IService<ProjectDocument> { |
| | | CommonResult insertprojectDocument(CatalogueProjectDocumentReq projectDocument); |
| | | |
| | | List<ProjectDocument> selectList(Integer companyId, Integer itemId, Integer catalogueId); |
| | | |
| | | CommonResult updateprojectDocument(CatalogueProjectDocumentReq projectDocument); |
| | | } |
| | |
| | | import com.gkhy.exam.system.mapper.ProductItemMapper; |
| | | import com.gkhy.exam.system.mapper.SysCompanyMapper; |
| | | import com.gkhy.exam.system.service.CatalogueService; |
| | | import com.gkhy.exam.system.service.ProjectDocumentService; |
| | | import com.gkhy.exam.system.service.SysCompanyService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | private CompanyIndustryTemplateMapper companyIndustryTemplateMapper; |
| | | @Autowired |
| | | private ProductItemMapper productItemMapper; |
| | | @Autowired |
| | | private ProjectDocumentService projectDocumentService; |
| | | |
| | | /** |
| | | * 目录管理 |
| | |
| | | return CommonResult.success(); |
| | | } |
| | | |
| | | @Override |
| | | 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()); |
| | | catalogueVo.setProjectDocuments(projectDocuments); |
| | | } |
| | | |
| | | List<CatalogueVo> collect = catalogueVos.stream().filter(catalogueVo -> catalogueVo.getParentId() == 0).collect(Collectors.toList()); |
| | | for (CatalogueVo catalogueVo : collect) { |
| | | List<CatalogueVo> getchildren = getchildren(catalogueVo, catalogueVos); |
| | | catalogueVo.setChildren(getchildren); |
| | | } |
| | | return CommonResult.success(collect); |
| | | } |
| | | |
| | | private void saveCatalogue(List<CatalogueVo> children,Catalogue catalogue) { |
| | | for (CatalogueVo child : children) { |
| | | Catalogue catalogue1 = new Catalogue(); |
| 对比新文件 |
| | |
| | | package com.gkhy.exam.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.exam.common.api.CommonResult; |
| | | import com.gkhy.exam.system.domain.ProductItem; |
| | | import com.gkhy.exam.system.domain.ProjectDocument; |
| | | import com.gkhy.exam.system.domain.req.CatalogueProjectDocumentReq; |
| | | import com.gkhy.exam.system.mapper.ProjectDocumentMapper; |
| | | import com.gkhy.exam.system.service.ProjectDocumentService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | |
| | | @Service |
| | | public class ProjectDocumentServiceImpl extends ServiceImpl<ProjectDocumentMapper, ProjectDocument> implements ProjectDocumentService { |
| | | |
| | | @Autowired |
| | | private ProjectDocumentMapper projectDocumentMapper; |
| | | |
| | | @Override |
| | | public CommonResult insertprojectDocument(CatalogueProjectDocumentReq projectDocument) { |
| | | List<ProjectDocument> projectDocuments = projectDocument.getProjectDocuments(); |
| | | for (ProjectDocument document : projectDocuments) { |
| | | document.setCompanyId(projectDocument.getCompanyId()); |
| | | document.setCatalogueId(projectDocument.getCatalogueId()); |
| | | document.setItemId(projectDocument.getItemId()); |
| | | } |
| | | Integer i = projectDocumentMapper.insertBaths(projectDocuments); |
| | | return CommonResult.success(); |
| | | } |
| | | |
| | | @Override |
| | | public List<ProjectDocument> selectList(Integer companyId, Integer itemId, Integer catalogueId) { |
| | | return projectDocumentMapper.selectDocumentList(companyId,itemId,catalogueId); |
| | | } |
| | | |
| | | @Override |
| | | public CommonResult updateprojectDocument(CatalogueProjectDocumentReq projectDocument) { |
| | | Map<String, Object> stringObjectsHashMap = new HashMap<>(); |
| | | stringObjectsHashMap.put("company_id",projectDocument.getCompanyId()); |
| | | stringObjectsHashMap.put("catalogue_id",projectDocument.getCatalogueId()); |
| | | stringObjectsHashMap.put("item_id",projectDocument.getItemId()); |
| | | int update = projectDocumentMapper.deleteByMap(stringObjectsHashMap); |
| | | if (update<=0){ |
| | | return CommonResult.failed("修改失败"); |
| | | } |
| | | List<ProjectDocument> projectDocuments = projectDocument.getProjectDocuments(); |
| | | for (ProjectDocument document : projectDocuments) { |
| | | document.setCompanyId(projectDocument.getCompanyId()); |
| | | document.setCatalogueId(projectDocument.getCatalogueId()); |
| | | document.setItemId(projectDocument.getItemId()); |
| | | } |
| | | Integer i = projectDocumentMapper.insertBaths(projectDocuments); |
| | | return CommonResult.success(); |
| | | } |
| | | } |
| | |
| | | import com.gkhy.exam.common.exception.ApiException; |
| | | import com.gkhy.exam.common.utils.PageUtils; |
| | | import com.gkhy.exam.common.utils.SecurityUtils; |
| | | import com.gkhy.exam.common.utils.StringUtils; |
| | | import com.gkhy.exam.system.domain.UseSealApply; |
| | | import com.gkhy.exam.system.domain.UseSealApplyFile; |
| | | import com.gkhy.exam.system.domain.UseSealApplyFlow; |
| | |
| | | List<UseSealApplyFlow> flows = useSealApply.getFlows(); |
| | | for (UseSealApplyFlow flow : flows) { |
| | | flow.setUseSealId(useSealApply.getId()); |
| | | if (flow.getApproveUserId().equals(useSealApply.getApplyUserId())){ |
| | | if (flow.getApproveUserId().equals(useSealApply.getApplyUserId()) && flow.getFlowName().equals("申请人")){ |
| | | flow.setStatus(2); |
| | | }else { |
| | | flow.setStatus(1); |
| | |
| | | if (useSealApplyFlow.getApproveStatus()==null){ |
| | | return CommonResult.failed("审批意见不可为空"); |
| | | } |
| | | if (StringUtils.isEmpty(useSealApplyFlow.getApproveMess())){ |
| | | return CommonResult.failed("审批意见不可为空"); |
| | | } |
| | | if (useSealApplyFlow.getApproveStatus()==1){ |
| | | useSealApplyFlow.setApproveContent("同意"); |
| | | }else { |
| | |
| | | `number`, |
| | | `mess`, |
| | | `type`, |
| | | `file_name`, |
| | | `file_path`, |
| | | `is_file`, |
| | | `del_flag`, |
| | | `sort`, |
| | | `create_by`, |
| 对比新文件 |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.gkhy.exam.system.mapper.ProjectDocumentMapper"> |
| | | |
| | | <insert id="insertBaths"> |
| | | INSERT INTO `project_document` |
| | | (`company_id`, `catalogue_id`, `item_id`, `file_name`, `file_path` ) |
| | | VALUES |
| | | <foreach collection="projectDocuments" separator="," item="item"> |
| | | ( #{item.companyId}, #{item.catalogueId}, #{item.itemId}, #{item.fileName}, #{item.filePath} ) |
| | | </foreach> |
| | | |
| | | </insert> |
| | | <select id="selectDocumentList" resultType="com.gkhy.exam.system.domain.ProjectDocument"> |
| | | SELECT |
| | | `id`, |
| | | `company_id`, |
| | | `catalogue_id`, |
| | | `item_id`, |
| | | `file_name`, |
| | | `file_path`, |
| | | `del_flag` |
| | | FROM |
| | | `project_document` |
| | | where del_flag = 1 |
| | | and company_id = #{companyId} |
| | | and catalogue_id = #{catalogueId} |
| | | and item_id = #{itemId} |
| | | </select> |
| | | </mapper> |
| | |
| | | UPDATE `use_seal_apply_flow` |
| | | SET |
| | | `approve_content` = #{approveContent}, |
| | | `approve_mess` = #{approveMess}, |
| | | `approve_time` = #{approveTime}, |
| | | `approve_status` = #{approveStatus}, |
| | | `status` = #{status} |
| | |
| | | usaf.`approve_dept_id`, |
| | | sd. `dept_name` as approve_dept_name, |
| | | usaf.`approve_content`, |
| | | usaf.`approve_mess`, |
| | | usaf.`approve_time`, |
| | | usaf.`approve_status`, |
| | | usaf.`status` |
| | |
| | | `approve_user_id`, |
| | | `approve_dept_id`, |
| | | `approve_content`, |
| | | `approve_mess`, |
| | | `approve_time`, |
| | | `approve_status`, |
| | | `status` |
| | |
| | | usaf.`approve_user_id`, |
| | | usaf.`approve_dept_id`, |
| | | usaf.`approve_content`, |
| | | usaf.`approve_mess`, |
| | | usaf.`approve_time`, |
| | | usaf.`approve_status`, |
| | | usaf.`status` |