| | |
| | | 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 { |
| | |
| | | @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(); |
| | |
| | | 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); |
| | | } |
| | | } |