heheng
4 天以前 7cddd48bab10c8fc2480957b9bb42cd7061ac966
功能改造
已修改3个文件
60 ■■■■■ 文件已修改
multi-admin/src/main/java/com/gkhy/exam/admin/controller/web/TemplateController.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
multi-system/src/main/java/com/gkhy/exam/system/service/StandardizedTemplateService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
multi-system/src/main/java/com/gkhy/exam/system/service/impl/StandardizedTemplateServiceImpl.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
multi-admin/src/main/java/com/gkhy/exam/admin/controller/web/TemplateController.java
@@ -119,5 +119,14 @@
        return standardizedTemplateService.deletedStandardizedQuality(standardizedQualityId);
    }
    /**
     * 获取质量手册数据
     * @param companyId
     * @return
     */
    @ApiOperation(value = "获取质量手册数据")
    @GetMapping("/standardizedQuality/dataInfo")
    public CommonResult standardizedQualityDataInfo(@RequestParam("companyId") Integer companyId){
        return standardizedTemplateService.getStandardizedQualityByCompanyId(companyId);
    }
}
multi-system/src/main/java/com/gkhy/exam/system/service/StandardizedTemplateService.java
@@ -25,5 +25,5 @@
    CommonResult deletedStandardizedQuality(Integer id);
    CommonResult getStandardizedQualityByCompanyId(Integer id);
}
multi-system/src/main/java/com/gkhy/exam/system/service/impl/StandardizedTemplateServiceImpl.java
@@ -6,22 +6,25 @@
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gkhy.exam.common.api.CommonPage;
import com.gkhy.exam.common.api.CommonResult;
import com.gkhy.exam.common.domain.TreeSelect;
import com.gkhy.exam.common.domain.entity.SysDept;
import com.gkhy.exam.common.domain.model.LoginUserDetails;
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.system.domain.*;
import com.gkhy.exam.system.mapper.CompanyIndustryTemplateMapper;
import com.gkhy.exam.system.mapper.StandardizedQualityMapper;
import com.gkhy.exam.system.mapper.StandardizedTemplateMapper;
import com.gkhy.exam.system.mapper.*;
import com.gkhy.exam.system.service.CompanyIndustryTemplateService;
import com.gkhy.exam.system.service.ISysDeptService;
import com.gkhy.exam.system.service.StandardizedTemplateService;
import com.gkhy.exam.system.service.SysCompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
public class StandardizedTemplateServiceImpl extends ServiceImpl<StandardizedTemplateMapper, StandardizedTemplate> implements StandardizedTemplateService {
@@ -34,8 +37,16 @@
    @Autowired
    private StandardizedQualityMapper standardizedQualityMapper;
    @Autowired
    private SysFunctionalDistributionMapper sysFunctionalDistributionMapper;
    @Autowired
    private ISysDeptService iSysDeptService;
    @Autowired
    private CompanySummaryMapper companySummaryMapper;
    @Autowired
    private CompanyQualityPolicyMapper companyQualityPolicyMapper;
    @Override
    public CommonPage selectStandardizedTemplateList(Integer companyId, Integer templateType) {
        boolean admin = SecurityUtils.adminUser();
@@ -149,4 +160,34 @@
        standardizedQualityMapper.update(standardizedQuality, lambdaQueryWrapper);
        return CommonResult.success();
    }
    @Override
    public CommonResult getStandardizedQualityByCompanyId(Integer companyId) {
        Map<String, Object> map = new HashMap<>();
        //程序文件
        List<StandardizedTemplate> companyIndustryTemplates = standardizedTemplateMapper.selectStandardizedTemplateList(companyId, 4);
        //职能分配
        List<SysFunctionalDistribution> sysFunctionalDistributions = sysFunctionalDistributionMapper.selectListVo(companyId.longValue());
        //部门
        SysDept sysDept = new SysDept();
        sysDept.setCompanyId(companyId.longValue());
        List<TreeSelect> treeSelects = iSysDeptService.selectDeptTreeList(sysDept);
        //公司概况
        List<CompanySummary> companySummaries = companySummaryMapper.selectCompanySummaryList(companyId);
        //质量方针
        List<CompanyQualityPolicy> companyQualityPolicies = companyQualityPolicyMapper.selectCompanyQualityPolicyList(companyId);
        //质量方针
        map.put("companyQualityPolicies", companyQualityPolicies);
        //公司概况
        map.put("companySummaries", companySummaries);
        //部门
        map.put("treeSelects", treeSelects);
        //职能分配
        map.put("sysFunctionalDistributions", sysFunctionalDistributions);
        //程序文件
        map.put("companyIndustryTemplates", companyIndustryTemplates);
        return CommonResult.success(map);
    }
}