考核管理调整

This commit is contained in:
pengjie 2023-08-23 18:24:09 +08:00
parent 6cd8b74f87
commit adfc3fc21b
10 changed files with 34 additions and 6 deletions

View File

@ -114,9 +114,9 @@ public class GovEnterpriseScoreDetailController {
Map<String, Object> resultMap = new HashMap<>(); Map<String, Object> resultMap = new HashMap<>();
for (String im : item) { for (String im : item) {
Map<String, Object> categoryMap = new HashMap<>(); Map<String, Object> categoryMap = new HashMap<>();
List<String> category = list.stream().filter(l -> l.getSubItem().equals(im)).map(EnterpriseScoreDetail::getCategory).collect(Collectors.toList()); List<String> category = list.stream().filter(l -> l.getDeductPointsStandard().equals(im)).map(EnterpriseScoreDetail::getCategory).collect(Collectors.toList());
for (String s : category) { for (String s : category) {
categoryMap.put(s, list.stream().filter(l -> l.getSubItem().equals(im) && l.getCategory().equals(s)).collect(Collectors.toList())); categoryMap.put(s, list.stream().filter(l -> l.getDeductPointsStandard().equals(im) && l.getCategory().equals(s)).collect(Collectors.toList()));
} }
resultMap.put(im, categoryMap); resultMap.put(im, categoryMap);
} }

View File

@ -100,15 +100,15 @@ public class GovEnterpriseScoreStandardController {
// wrapper.eq(EnterpriseScoreStandard::getSubItem, enterpriseScoreStandard.getSubItem()); // wrapper.eq(EnterpriseScoreStandard::getSubItem, enterpriseScoreStandard.getSubItem());
// } // }
// return Result.success(enterpriseScoreStandardService.list(wrapper)); // return Result.success(enterpriseScoreStandardService.list(wrapper));
List<String> item = enterpriseScoreStandardService.getItem(enterpriseScoreStandard.getEnterpriseType()); List<String> type = enterpriseScoreStandardService.getType(enterpriseScoreStandard.getEnterpriseType());
QueryWrapper<EnterpriseScoreStandard> queryWrapper = QueryGenerator.initQueryWrapper(enterpriseScoreStandard); QueryWrapper<EnterpriseScoreStandard> queryWrapper = QueryGenerator.initQueryWrapper(enterpriseScoreStandard);
List<EnterpriseScoreStandard> list = enterpriseScoreStandardService.list(queryWrapper); List<EnterpriseScoreStandard> list = enterpriseScoreStandardService.list(queryWrapper);
Map<String, Object> resultMap = new HashMap<>(); Map<String, Object> resultMap = new HashMap<>();
for (String im : item) { for (String im : type) {
Map<String, Object> categoryMap = new HashMap<>(); Map<String, Object> categoryMap = new HashMap<>();
List<String> category = list.stream().filter(l -> l.getSubItem().equals(im)).map(EnterpriseScoreStandard::getCategory).collect(Collectors.toList()); List<String> category = list.stream().filter(l -> l.getDeductPointsStandard().equals(im)).map(EnterpriseScoreStandard::getCategory).collect(Collectors.toList());
for (String s : category) { for (String s : category) {
categoryMap.put(s, list.stream().filter(l -> l.getSubItem().equals(im) && l.getCategory().equals(s)).collect(Collectors.toList())); categoryMap.put(s, list.stream().filter(l -> l.getDeductPointsStandard().equals(im) && l.getCategory().equals(s)).collect(Collectors.toList()));
} }
resultMap.put(im, categoryMap); resultMap.put(im, categoryMap);
} }

View File

@ -24,4 +24,6 @@ public interface EnterpriseScoreDetailMapper extends BaseMapper<EnterpriseScoreD
List<EnterpriseScoreDetail> pageList(@Param(Constants.WRAPPER) Wrapper<EnterpriseScoreDetail> wrapper); List<EnterpriseScoreDetail> pageList(@Param(Constants.WRAPPER) Wrapper<EnterpriseScoreDetail> wrapper);
List<String> getItem(Long scoreId); List<String> getItem(Long scoreId);
List<String> getType(Long scoreId);
} }

View File

@ -21,4 +21,6 @@ public interface EnterpriseScoreStandardMapper extends BaseMapper<EnterpriseScor
Integer score(@Param(Constants.WRAPPER) Wrapper<EnterpriseScoreStandard> wrapper); Integer score(@Param(Constants.WRAPPER) Wrapper<EnterpriseScoreStandard> wrapper);
List<String> getItem(Integer enterpriseType); List<String> getItem(Integer enterpriseType);
List<String> getType(Integer enterpriseType);
} }

View File

@ -10,4 +10,8 @@
<select id="getItem" resultType="java.lang.String"> <select id="getItem" resultType="java.lang.String">
SELECT sub_item FROM enterprise_score_detail WHERE score_id = #{scoreId} GROUP BY sub_item SELECT sub_item FROM enterprise_score_detail WHERE score_id = #{scoreId} GROUP BY sub_item
</select> </select>
<select id="getType" resultType="java.lang.String">
SELECT deduct_points_standard FROM enterprise_score_detail WHERE score_id = #{scoreId} GROUP BY deduct_points_standard
</select>
</mapper> </mapper>

View File

@ -10,4 +10,8 @@
<select id="getItem" resultType="java.lang.String"> <select id="getItem" resultType="java.lang.String">
SELECT sub_item FROM enterprise_score_standard WHERE enterprise_type = #{enterpriseType} GROUP BY sub_item SELECT sub_item FROM enterprise_score_standard WHERE enterprise_type = #{enterpriseType} GROUP BY sub_item
</select> </select>
<select id="getType" resultType="java.lang.String">
SELECT deduct_points_standard FROM enterprise_score_standard WHERE enterprise_type = #{enterpriseType} GROUP BY deduct_points_standard
</select>
</mapper> </mapper>

View File

@ -26,4 +26,6 @@ public interface IEnterpriseScoreDetailService extends IService<EnterpriseScoreD
boolean updateInfo(EnterpriseScoreDetailVo enterpriseScoreDetailVo); boolean updateInfo(EnterpriseScoreDetailVo enterpriseScoreDetailVo);
List<String> getItem(Long scoreId); List<String> getItem(Long scoreId);
List<String> getType(Long scoreId);
} }

View File

@ -17,4 +17,6 @@ public interface IEnterpriseScoreStandardService extends IService<EnterpriseScor
Integer score(Wrapper<EnterpriseScoreStandard> wrapper); Integer score(Wrapper<EnterpriseScoreStandard> wrapper);
List<String> getItem(Integer enterpriseType); List<String> getItem(Integer enterpriseType);
List<String> getType(Integer enterpriseType);
} }

View File

@ -92,4 +92,9 @@ public class EnterpriseScoreDetailServiceImpl extends ServiceImpl<EnterpriseScor
public List<String> getItem(Long scoreId) { public List<String> getItem(Long scoreId) {
return baseMapper.getItem(scoreId); return baseMapper.getItem(scoreId);
} }
@Override
public List<String> getType(Long scoreId) {
return baseMapper.getType(scoreId);
}
} }

View File

@ -26,4 +26,11 @@ public class EnterpriseScoreStandardServiceImpl extends ServiceImpl<EnterpriseSc
public List<String> getItem(Integer enterpriseType) { public List<String> getItem(Integer enterpriseType) {
return baseMapper.getItem(enterpriseType); return baseMapper.getItem(enterpriseType);
} }
@Override
public List<String> getType(Integer enterpriseType) {
return baseMapper.getType(enterpriseType);
}
} }