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

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

@@ -915,8 +915,8 @@ public class StatisticServiceImpl implements StatisticService {
 
     public TrainGuardAutoPlanDto getPlanRate(String dept,String dateCondition){
         TrainGuardAutoPlanDto planDto = new TrainGuardAutoPlanDto();
-        String planSql = "select count(*) as auto from t_rypxcjb where ji_hua_wai_jian_ in(select id_ from t_ndrypxjhzb " +
-                "where di_dian_='"+getDiDian()+"') %s";
+        String planSql = "select count(*) as auto from t_rypxcjb where ji_hua_wai_jian_ in(select id_ from t_ndrypxjhzb where parent_id_ in " +
+                " (select id_ from t_lhndrypxjh where di_dian_ = '"+getDiDian()+"')) %s ";
         String sumSql = "select count(*) as total from t_rypxcjb where 1=1 %s ";
         String condition = String.format(" AND di_dian_ = '%s' and shi_fou_guo_shen_='已结束' ", getDiDian());
         if (BeanUtils.isNotEmpty(dept)){
@@ -925,8 +925,10 @@ public class StatisticServiceImpl implements StatisticService {
         condition += dateCondition;
         planSql = String.format(planSql,condition);
         sumSql = String.format(sumSql,condition);
+        //自动
         int autoNum = Integer.parseInt(commonDao.queryOne(planSql).get("auto").toString());
         int total = Integer.parseInt(commonDao.queryOne(sumSql).get("total").toString());
+        //手动
         int manual = total - autoNum;
         planDto.setTotal(total);
         planDto.setAutoNum(autoNum);