Просмотр исходного кода

新版培训兼容各个分支,培训配置放入数据,解决删除接口异常返回6060400

wy 7 месяцев назад
Родитель
Сommit
b2eb04effd

+ 5 - 5
ibps-bpmn-root/modules/bpmn-biz/src/main/java/com/lc/ibps/bpmn/service/impl/BpmProcInstServiceImpl.java

@@ -791,11 +791,11 @@ public class BpmProcInstServiceImpl implements BpmProcInstService {
 					logger.info(String.format("deleted process instance history with id %s",hisPo.getId()));
 				}
 			}
-				List<String> taskList = new ArrayList<>();
-				taskList.add(bizKey);
-				//执行删除task的数据
-				List<BpmTaskPo> taskPoList = bpmTaskRepository.findByInst(taskList);
-				bpmTaskRepository.removeById(taskPoList.stream().map(BpmTaskPo::getId).collect(Collectors.joining(",")));
+//				List<String> taskList = new ArrayList<>();
+//				taskList.add(bizKey);
+//				//执行删除task的数据
+//				List<BpmTaskPo> taskPoList = bpmTaskRepository.findByInst(taskList);
+//				bpmTaskRepository.removeById(taskPoList.stream().map(BpmTaskPo::getId).collect(Collectors.joining(",")));
 		}
 
 	}

+ 9 - 3
ibps-provider-root/modules/provider-business/src/main/java/com/lc/ibps/business/controller/AuditController.java

@@ -1,13 +1,14 @@
 package com.lc.ibps.business.controller;
 
 import com.lc.ibps.api.base.constants.StateEnum;
+import com.lc.ibps.base.core.util.BeanUtils;
 import com.lc.ibps.base.core.util.I18nUtil;
 import com.lc.ibps.business.service.AuditService;
 import com.lc.ibps.cloud.entity.APIResult;
 import com.lc.ibps.cloud.provider.GenericProvider;
+import com.lc.ibps.untils.settingUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-import org.hibernate.validator.constraints.NotEmpty;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
@@ -30,8 +31,13 @@ public class AuditController extends GenericProvider {
 
         APIResult result = new APIResult<>();
         try {
-           auditService.personnelTrain(ids);
-            //auditService.newPersonnelTrain(ids);
+            String version = settingUtil.getPx();
+            if(BeanUtils.isNotEmpty(version) && "1".equals(version)){
+                //新版培训
+                auditService.newPersonnelTrain(ids);
+                return result;
+            }
+            auditService.personnelTrain(ids);
         } catch (Exception e) {
             setExceptionResult(result, StateEnum.ILLEGAL_REQUEST.getCode(), I18nUtil.getMessage(StateEnum.ILLEGAL_REQUEST.getCode() + ""), e);
         }

+ 3 - 1
ibps-provider-root/modules/provider-business/src/main/java/com/lc/ibps/business/controller/StatisticController.java

@@ -1,6 +1,7 @@
 package com.lc.ibps.business.controller;
 
 import com.lc.ibps.api.base.constants.StateEnum;
+import com.lc.ibps.base.core.util.BeanUtils;
 import com.lc.ibps.base.core.util.I18nUtil;
 import com.lc.ibps.business.dto.EquipmentDashBoardDTO;
 import com.lc.ibps.business.dto.LabsDashBoardDTO;
@@ -10,6 +11,7 @@ import com.lc.ibps.business.service.StaffTrainService;
 import com.lc.ibps.business.service.StatisticService;
 import com.lc.ibps.cloud.entity.APIResult;
 import com.lc.ibps.cloud.provider.GenericProvider;
+import com.lc.ibps.untils.settingUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.hibernate.validator.constraints.NotBlank;
@@ -74,8 +76,8 @@ public class StatisticController extends GenericProvider {
                                                                @RequestParam(name = "version", required = false) String version) {
         APIResult<List<TrainingDashBoardDTO>> result = new APIResult<>();
         try {
+            List<TrainingDashBoardDTO> labsDashBoard = statisticService.getTrainingDashBoard(dept,type,date,typeProportion,version);
             //List<TrainingDashBoardDTO> labsDashBoard = statisticService.getTrainingDashBoard(dept,type,date,typeProportion,version);
-            List<TrainingDashBoardDTO> labsDashBoard = statisticService.getTrainingDashBoard(dept,type,date,typeProportion);
             result.setData(labsDashBoard);
         } catch (Exception e) {
             setExceptionResult(result, StateEnum.ILLEGAL_REQUEST.getCode(), I18nUtil.getMessage(StateEnum.ILLEGAL_REQUEST.getCode() + ""), e);

+ 6 - 2
ibps-provider-root/modules/provider-business/src/main/java/com/lc/ibps/business/service/StatisticService.java

@@ -9,11 +9,15 @@ import java.util.List;
 import java.util.Map;
 
 public interface StatisticService {
+
     List<Map<String, Object>> getRiskReport(String riskId, String type);
+
     List<LabsDashBoardDTO> getLabsDashBoard(String year, String filter);
 
-    //List<TrainingDashBoardDTO> getTrainingDashBoard(String dept, String type, String date,String typeProportion,String version);
-    List<TrainingDashBoardDTO> getTrainingDashBoard(String dept, String type, String date,String typeProportion);
+    List<TrainingDashBoardDTO> getTrainingDashBoard(String dept, String type, String date,String typeProportion,String ve) throws Exception;
+
+    //List<TrainingDashBoardDTO> getTrainingDashBoard(String dept, String type, String date,String typeProportion);
+
     List<EquipmentDashBoardDTO> getEquipmentDashBoard();
 
     Map<String,Object> getTrainingDashBoardByDfx(String dept, String type, String date);

+ 113 - 70
ibps-provider-root/modules/provider-business/src/main/java/com/lc/ibps/business/service/impl/StatisticServiceImpl.java

@@ -17,6 +17,7 @@ import com.lc.ibps.common.api.IDictionaryService;
 import com.lc.ibps.common.cat.persistence.entity.DictionaryPo;
 import com.lc.ibps.org.api.IPartyPositionService;
 import com.lc.ibps.org.party.persistence.entity.PartyPositionPo;
+import com.lc.ibps.untils.settingUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Service;
@@ -68,14 +69,14 @@ public class StatisticServiceImpl implements StatisticService {
     }
 
     @Override
-    //public List<TrainingDashBoardDTO> getTrainingDashBoard(String dept, String types11, String dates,String typeProportion,String version) {
-      public List<TrainingDashBoardDTO> getTrainingDashBoard(String dept, String types11, String dates,String typeProportion) {
+    public List<TrainingDashBoardDTO> getTrainingDashBoard(String dept, String types11, String dates,String typeProportion,String version) throws Exception{
+     // public List<TrainingDashBoardDTO> getTrainingDashBoard(String dept, String types11, String dates,String typeProportion) {
         List<TrainingDashBoardDTO> list = new ArrayList<>();
         TrainingDashBoardDTO dashBoardDTO = new TrainingDashBoardDTO();
 
         // 近一周发布计划
-        //dashBoardDTO.setWeekDtoList(getLastSeven(dept,version));
-        dashBoardDTO.setWeekDtoList(getLastSeven(dept));
+        dashBoardDTO.setWeekDtoList(getLastSeven(dept,version));
+        //dashBoardDTO.setWeekDtoList(getLastSeven(dept));
         //    type       value
         // 周 week  本周 nowWeek  上周 lastWeek  下周 nextWeek
 //        if ("week".equals(type)){
@@ -134,24 +135,24 @@ public class StatisticServiceImpl implements StatisticService {
         }
 
         // 在岗培训计划  自动创建  or 手动创建
-        //dashBoardDTO.setPlanDto(getPlanRate(dept,dateCondition,version));
-        dashBoardDTO.setPlanDto(getPlanRate(dept,dateCondition));
+        dashBoardDTO.setPlanDto(getPlanRate(dept,dateCondition,version));
+        //dashBoardDTO.setPlanDto(getPlanRate(dept,dateCondition));
         // 在岗个人培训次数排名
-        dashBoardDTO.setUserRankList(getUserTrainRank(dept,dateCondition));
-        //dashBoardDTO.setUserRankList(getUserTrainRank(dept,dateCondition,version));
+        //dashBoardDTO.setUserRankList(getUserTrainRank(dept,dateCondition));
+        dashBoardDTO.setUserRankList(getUserTrainRank(dept,dateCondition,version));
 
         // 在岗培训类别占比
-        //dashBoardDTO.setTypeDto(getTypeRate(dept,dateCondition,typeProportion,version));
-        dashBoardDTO.setTypeDto(getTypeRate(dept,dateCondition,typeProportion));
+        dashBoardDTO.setTypeDto(getTypeRate(dept,dateCondition,typeProportion,version));
+        //dashBoardDTO.setTypeDto(getTypeRate(dept,dateCondition,typeProportion));
         // 在岗培训对象占比
-        //dashBoardDTO.setObjectDto(getObjectRate(dept,dateCondition,version));
-        dashBoardDTO.setObjectDto(getObjectRate(dept,dateCondition));
+        dashBoardDTO.setObjectDto(getObjectRate(dept,dateCondition,version));
+        //dashBoardDTO.setObjectDto(getObjectRate(dept,dateCondition));
         //  本年度岗前培训计划
-        //dashBoardDTO.setNdgqpxList(getCurrentYearData(getYearMonth(),dept,year,version));
-        dashBoardDTO.setNdgqpxList(getCurrentYearData(getYearMonth(),dept,year));
+        dashBoardDTO.setNdgqpxList(getCurrentYearData(getYearMonth(),dept,year,version));
+        //dashBoardDTO.setNdgqpxList(getCurrentYearData(getYearMonth(),dept,year));
         //  本年度岗前培训类别占比
-        //dashBoardDTO.setYearPreWorkDto(getYearPre(dept,year,version));
-        dashBoardDTO.setYearPreWorkDto(getYearPre(dept,year));
+        dashBoardDTO.setYearPreWorkDto(getYearPre(dept,year,version));
+        //dashBoardDTO.setYearPreWorkDto(getYearPre(dept,year));
         list.add(dashBoardDTO);
         return list;
     }
@@ -897,23 +898,29 @@ public class StatisticServiceImpl implements StatisticService {
         }
     }
 
-    //public TrainGuardAutoPlanDto getPlanRate(String dept,String dateCondition,String version){
-    public TrainGuardAutoPlanDto getPlanRate(String dept,String dateCondition){
+    public TrainGuardAutoPlanDto getPlanRate(String dept,String dateCondition,String version) throws Exception{
+    //public TrainGuardAutoPlanDto getPlanRate(String dept,String dateCondition){
         TrainGuardAutoPlanDto planDto = new TrainGuardAutoPlanDto();
         String planSql = "";
         String sumSql = "";
         String condition ="";
-//        if(BeanUtils.isNotEmpty(version) && "1".equals(version)){
-//            planSql = "select count(*) as auto from t_lhrypxjlb where ji_hua_wai_jian_ in(select id_ from t_ndrypxjhzb " +
-//                    "where di_dian_='"+getDiDian()+"') %s";
-//            sumSql = "select count(*) as total from t_lhrypxjlb where 1=1 %s ";
-//            condition = String.format(" AND di_dian_ = '%s' and pei_xun_zhuang_ta='已结束' ", getDiDian());
-//        }else{
+        String ve = "";
+        try {
+             ve = settingUtil.getPx();
+        }catch (Exception e){
+            throw new Exception("json转换异常");
+        }
+        if(BeanUtils.isNotEmpty(ve) && "1".equals(ve)){
+            planSql = "select count(*) as auto from t_lhrypxjlb where ji_hua_wai_jian_ in(select id_ from t_ndrypxjhzb " +
+                   "where di_dian_='"+getDiDian()+"') %s";
+            sumSql = "select count(*) as total from t_lhrypxjlb where 1=1 %s ";
+           condition = String.format(" AND di_dian_ = '%s' and pei_xun_zhuang_ta='已结束' ", getDiDian());
+        }else{
           planSql = "select count(*) as auto from t_rypxcjb where ji_hua_wai_jian_ in(select id_ from t_ndrypxjhzb " +
                     "where di_dian_='"+getDiDian()+"') %s";
           sumSql = "select count(*) as total from t_rypxcjb where 1=1 %s ";
           condition = String.format(" AND di_dian_ = '%s' and shi_fou_guo_shen_='已结束' ", getDiDian());
-//        }
+        }
         if (BeanUtils.isNotEmpty(dept)){
             condition += String.format(" AND bian_zhi_bu_men_ = '%s' ", dept);
         }
@@ -931,8 +938,8 @@ public class StatisticServiceImpl implements StatisticService {
         return planDto;
     }
 
-    //public List<TrainWeekDto> getLastSeven(String dept,String version){
-        public List<TrainWeekDto> getLastSeven(String dept){
+    public List<TrainWeekDto> getLastSeven(String dept,String version)throws Exception{
+        //public List<TrainWeekDto> getLastSeven(String dept){
         List<TrainWeekDto> weekDtoList = new ArrayList<>();
         List<String> lastWeek = getLastSevenDaysDates();
         for (String dateStr : lastWeek) {
@@ -940,13 +947,19 @@ public class StatisticServiceImpl implements StatisticService {
             weekDto.setDate(dateStr);
             weekDto.setDayName(getDayName(dateStr));
             String sql = "";
-//            if(BeanUtils.isNotEmpty(version) && "1".equals(version)){
-//              sql = "select count(*) value from t_lhrypxjlb where  pei_xun_zhuang_ta='未发布' " +
-//                        " and di_dian_='%s' and date_format(pei_xun_shi_jian_,'%%Y-%%m-%%d')='%s' ";
-//            }else{
+            String ve = "";
+            try {
+                ve = settingUtil.getPx();
+            }catch (Exception e){
+                throw new Exception("json转换异常");
+            }
+            if(BeanUtils.isNotEmpty(ve) && "1".equals(ve)){
+              sql = "select count(*) value from t_lhrypxjlb where  pei_xun_zhuang_ta='未发布' " +
+                        " and di_dian_='%s' and date_format(pei_xun_shi_jian_,'%%Y-%%m-%%d')='%s' ";
+            }else{
               sql = "select count(*) value from t_rypxcjb where  shi_fou_guo_shen_='未发布' " +
                         " and di_dian_='%s' and date_format(pei_xun_shi_jian_,'%%Y-%%m-%%d')='%s' ";
-//            }
+            }
 
             if (BeanUtils.isNotEmpty(dept)){
                 sql = sql+" and bian_zhi_bu_men_ = '%s'";
@@ -973,22 +986,28 @@ public class StatisticServiceImpl implements StatisticService {
         return datesStrings;
     }
 
-    public TrainObjectDto getObjectRate(String dept,String dateCondition){
-    //public TrainObjectDto getObjectRate(String dept,String dateCondition,String version){
+    //public TrainObjectDto getObjectRate(String dept,String dateCondition){
+    public TrainObjectDto getObjectRate(String dept,String dateCondition,String version)throws Exception{
         TrainObjectDto objectDto = new TrainObjectDto();
         objectDto.setRemark("在岗培训对象占比");
         List<TrainRateDto> rateDtoList = new ArrayList<>();
         String sql ="";
         String talSql ="";
-//        if(BeanUtils.isNotEmpty(version) && "1".equals(version)){
-//           sql = "select pei_xun_lei_xing_,count(pei_xun_lei_xing_)as nums from t_lhrypxjlb where " +
-//                    " pei_xun_zhuang_ta='已结束' %s group by pei_xun_lei_xing_";
-//           talSql = "SELECT COUNT(*) as total_num from t_lhrypxjlb where  pei_xun_zhuang_ta='已结束' %s ";
-//        }else{
+        String ve = "";
+        try {
+            ve = settingUtil.getPx();
+        }catch (Exception e){
+            throw new Exception("json转换异常");
+        }
+        if(BeanUtils.isNotEmpty(ve) && "1".equals(ve)){
+           sql = "select pei_xun_lei_xing_,count(pei_xun_lei_xing_)as nums from t_lhrypxjlb where " +
+                    " pei_xun_zhuang_ta='已结束' %s group by pei_xun_lei_xing_";
+           talSql = "SELECT COUNT(*) as total_num from t_lhrypxjlb where  pei_xun_zhuang_ta='已结束' %s ";
+        }else{
            sql = "select pei_xun_lei_xing_,count(pei_xun_lei_xing_)as nums from t_rypxcjb where " +
                     " shi_fou_guo_shen_='已结束' %s group by pei_xun_lei_xing_";
            talSql = "SELECT COUNT(*) as total_num from t_rypxcjb where  shi_fou_guo_shen_='已结束' %s ";
-//        }
+        }
         dateCondition += String.format(" AND di_dian_ = '%s' ", getDiDian());
         if (BeanUtils.isNotEmpty(dept)){
             dateCondition += String.format(" AND bian_zhi_bu_men_ = '%s' ", dept);
@@ -1010,8 +1029,8 @@ public class StatisticServiceImpl implements StatisticService {
         return objectDto;
     }
 
-    public TrainTypeDto getTypeRate(String dept,String dateCondition,String typeProportion){
-    //public TrainTypeDto getTypeRate(String dept,String dateCondition,String typeProportion,String version){
+    //public TrainTypeDto getTypeRate(String dept,String dateCondition,String typeProportion){
+    public TrainTypeDto getTypeRate(String dept,String dateCondition,String typeProportion,String version)throws Exception{
         TrainTypeDto typeDto = new TrainTypeDto();
         typeDto.setRemark("在岗培训类别占比");
         List<TrainRateDto> rateDtoList = new ArrayList<>();
@@ -1028,15 +1047,21 @@ public class StatisticServiceImpl implements StatisticService {
         }
         String sql = "";
         String talSql = "";
-//        if(BeanUtils.isNotEmpty(version) && "1".equals(version)){
-//           sql = "select pei_xun_lei_bie_,count(pei_xun_lei_bie_)as nums from t_lhrypxjlb where " +
-//                    " pei_xun_zhuang_ta='已结束' %s group by pei_xun_lei_bie_";
-//            talSql = "select COUNT(*) AS total_num from t_lhrypxjlb where  pei_xun_zhuang_ta='已结束' %s ";
-//        }else{
+        String ve = "";
+        try {
+            ve = settingUtil.getPx();
+        }catch (Exception e){
+            throw new Exception("json转换异常");
+        }
+        if(BeanUtils.isNotEmpty(ve) && "1".equals(ve)){
+           sql = "select pei_xun_lei_bie_,count(pei_xun_lei_bie_)as nums from t_lhrypxjlb where " +
+                    " pei_xun_zhuang_ta='已结束' %s group by pei_xun_lei_bie_";
+            talSql = "select COUNT(*) AS total_num from t_lhrypxjlb where  pei_xun_zhuang_ta='已结束' %s ";
+        }else{
            sql = "select pei_xun_lei_bie_,count(pei_xun_lei_bie_)as nums from t_rypxcjb where " +
                     " shi_fou_guo_shen_='已结束' %s group by pei_xun_lei_bie_";
             talSql = "select COUNT(*) AS total_num from t_rypxcjb where  shi_fou_guo_shen_='已结束' %s ";
-//        }
+        }
         dateCondition += String.format(" AND di_dian_ = '%s' ", getDiDian());
         if (BeanUtils.isNotEmpty(dept)){
             dateCondition += String.format(" AND bian_zhi_bu_men_ = '%s' ", dept);
@@ -1058,22 +1083,28 @@ public class StatisticServiceImpl implements StatisticService {
         return typeDto;
     }
 
-    public TrainYearPreWorkDto getYearPre(String dept,String year){
-       // public TrainYearPreWorkDto getYearPre(String dept,String year,String version){
+    //public TrainYearPreWorkDto getYearPre(String dept,String year){
+        public TrainYearPreWorkDto getYearPre(String dept,String year,String version)throws Exception{
         TrainYearPreWorkDto preWorkDto = new TrainYearPreWorkDto();
         preWorkDto.setRemark("本年度岗前培训类别占比");
         List<TrainRateDto> rateDtoList = new ArrayList<>();
         String sql = "";
         String talSql ="";
-//        if(BeanUtils.isNotEmpty(version) && "1".equals(version)){
-//           sql = "select pei_xun_lei_bie_,count(pei_xun_lei_bie_)as nums from t_lhrypxjlb where " +
-//                    " pei_xun_zhuang_ta='已结束' %s group by pei_xun_lei_bie_";
-//           talSql = "SELECT count(*) AS total FROM t_lhrypxjlb WHERE pei_xun_zhuang_ta = '已结束' %s ";
-//        }else{
+            String ve = "";
+            try {
+                ve = settingUtil.getPx();
+            }catch (Exception e){
+                throw new Exception("json转换异常");
+            }
+        if(BeanUtils.isNotEmpty(ve) && "1".equals(ve)){
+           sql = "select pei_xun_lei_bie_,count(pei_xun_lei_bie_)as nums from t_lhrypxjlb where " +
+                    " pei_xun_zhuang_ta='已结束' %s group by pei_xun_lei_bie_";
+           talSql = "SELECT count(*) AS total FROM t_lhrypxjlb WHERE pei_xun_zhuang_ta = '已结束' %s ";
+        }else{
            sql = "select pei_xun_lei_bie_,count(pei_xun_lei_bie_)as nums from t_rypxcjb where " +
                     " shi_fou_guo_shen_='已结束' %s group by pei_xun_lei_bie_";
            talSql = "SELECT count(*) AS total FROM t_rypxcjb WHERE shi_fou_guo_shen_ = '已结束' %s ";
-//        }
+        }
         String dateCondition = String.format(" AND di_dian_ = '%s' ", getDiDian());
         if (BeanUtils.isNotEmpty(dept)){
             dateCondition += String.format(" AND bian_zhi_bu_men_ = '%s' ", dept);
@@ -1097,14 +1128,20 @@ public class StatisticServiceImpl implements StatisticService {
         return preWorkDto;
     }
 
-    public List<Map<String, Object>> getCurrentYearData(List<String> dateStr, String dept,String year) {
-       // public List<Map<String, Object>> getCurrentYearData(List<String> dateStr, String dept,String year,String version) {
+    //public List<Map<String, Object>> getCurrentYearData(List<String> dateStr, String dept,String year) {
+     public List<Map<String, Object>> getCurrentYearData(List<String> dateStr, String dept,String year,String version)throws Exception {
         String baseSql ="";
-//        if(BeanUtils.isNotEmpty(version) && "1".equals(version)){
-//            baseSql = "SELECT count(*) AS total FROM t_lhrypxjlb WHERE pei_xun_zhuang_ta = '已结束' and di_dian_='%s'";
-//        }else{
+         String ve = "";
+         try {
+             ve = settingUtil.getPx();
+         }catch (Exception e){
+             throw new Exception("json转换异常");
+         }
+        if(BeanUtils.isNotEmpty(ve) && "1".equals(ve)){
+            baseSql = "SELECT count(*) AS total FROM t_lhrypxjlb WHERE pei_xun_zhuang_ta = '已结束' and di_dian_='%s'";
+        }else{
             baseSql = "SELECT count(*) AS total FROM t_rypxcjb WHERE shi_fou_guo_shen_ = '已结束' and di_dian_='%s'";
-//        }
+        }
         baseSql = String.format(baseSql,getDiDian());
         List<Map<String, Object>> list = new ArrayList<>();
         for (String date : dateStr) {
@@ -1124,18 +1161,24 @@ public class StatisticServiceImpl implements StatisticService {
         return list;
     }
 
-    public List<TrainRankDto> getUserTrainRank(String dept,String dateCondition){
-       // public List<TrainRankDto> getUserTrainRank(String dept,String dateCondition,String version){
+    //public List<TrainRankDto> getUserTrainRank(String dept,String dateCondition){
+    public List<TrainRankDto> getUserTrainRank(String dept,String dateCondition,String version) throws Exception{
         String sql = "";
-//        if(BeanUtils.isNotEmpty(version) && "1".equals(version)){
-//            sql = "SELECT a.ren_yuan_id_ userId,e.NAME_ userName,a.rank as count from (select ren_yuan_id_,COUNT(ren_yuan_id_)as rank  from t_qdxxb " +
-//                    "where guan_lian_id_ in(select id_ from t_lhrypxjlb where  pei_xun_zhuang_ta='已结束' %s) " +
-//                    "GROUP BY ren_yuan_id_) a ,ibps_party_employee e WHERE e.id_=a.ren_yuan_id_ ";
-//        }else{
+        String ve = "";
+        try {
+            ve = settingUtil.getPx();
+        }catch (Exception e){
+            throw new Exception("json转换异常");
+        }
+        if(BeanUtils.isNotEmpty(ve) && "1".equals(ve)){
+            sql = "SELECT a.ren_yuan_id_ userId,e.NAME_ userName,a.rank as count from (select ren_yuan_id_,COUNT(ren_yuan_id_)as rank  from t_qdxxb " +
+                    "where guan_lian_id_ in(select id_ from t_lhrypxjlb where  pei_xun_zhuang_ta='已结束' %s) " +
+                    "GROUP BY ren_yuan_id_) a ,ibps_party_employee e WHERE e.id_=a.ren_yuan_id_ ";
+        }else{
             sql = "SELECT a.ren_yuan_id_ userId,e.NAME_ userName,a.rank as count from (select ren_yuan_id_,COUNT(ren_yuan_id_)as rank  from t_qdxxb " +
                     "where guan_lian_id_ in(select id_ from t_rypxcjb where  shi_fou_guo_shen_='已结束' %s) " +
                     "GROUP BY ren_yuan_id_) a ,ibps_party_employee e WHERE e.id_=a.ren_yuan_id_ ";
-//        }
+        }
         dateCondition += String.format(" AND di_dian_ = '%s' ", getDiDian());
         if (BeanUtils.isNotEmpty(dept)){
             dateCondition += String.format(" AND bian_zhi_bu_men_ = '%s'", dept);

+ 50 - 0
ibps-provider-root/modules/provider-business/src/main/java/com/lc/ibps/untils/settingUtil.java

@@ -0,0 +1,50 @@
+package com.lc.ibps.untils;
+
+import com.lc.ibps.base.web.context.ContextUtil;
+import org.codehaus.jackson.map.ObjectMapper;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 转换setting的工具类,业务模块直接取这边的方法即可拿到最终值
+ * 依据setting配置的层级自行判断转换逻辑
+ */
+public class settingUtil {
+
+    //获取setting
+    public static HashMap<String, Object> getSetting() throws Exception{
+        HashMap<String, Object> map = new HashMap<>();
+        try {
+            String setting = ContextUtil.getSetting();
+             map =(HashMap) jsonStringToMap(setting);
+        }catch (Exception e){
+            throw new Exception("setting获取异常");
+        }
+        return map;
+    }
+    //获取培训方法
+    public static String getPx() throws Exception{
+        String version;
+        try {
+            HashMap<String, Object> setting = getSetting();
+            HashMap<String, Object> option = (HashMap)setting.get("pxSpectacularsOption");
+            version = option.get("version").toString();
+        }catch (Exception e){
+            throw new Exception("setting转换异常");
+        }
+        return version;
+    }
+    //获取XXX
+    //...
+
+    //转换map方法
+    public static Map<String, Object> jsonStringToMap(String jsonString) {
+        try {
+            ObjectMapper objectMapper = new ObjectMapper();
+            return objectMapper.readValue(jsonString, Map.class);
+        } catch (Exception e) {
+            throw new RuntimeException("JSON转换失败", e);
+        }
+    }
+}