|
@@ -915,8 +915,8 @@ public class StatisticServiceImpl implements StatisticService {
|
|
|
|
|
|
|
|
public TrainGuardAutoPlanDto getPlanRate(String dept,String dateCondition){
|
|
public TrainGuardAutoPlanDto getPlanRate(String dept,String dateCondition){
|
|
|
TrainGuardAutoPlanDto planDto = new TrainGuardAutoPlanDto();
|
|
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 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());
|
|
String condition = String.format(" AND di_dian_ = '%s' and shi_fou_guo_shen_='已结束' ", getDiDian());
|
|
|
if (BeanUtils.isNotEmpty(dept)){
|
|
if (BeanUtils.isNotEmpty(dept)){
|
|
@@ -925,8 +925,10 @@ public class StatisticServiceImpl implements StatisticService {
|
|
|
condition += dateCondition;
|
|
condition += dateCondition;
|
|
|
planSql = String.format(planSql,condition);
|
|
planSql = String.format(planSql,condition);
|
|
|
sumSql = String.format(sumSql,condition);
|
|
sumSql = String.format(sumSql,condition);
|
|
|
|
|
+ //自动
|
|
|
int autoNum = Integer.parseInt(commonDao.queryOne(planSql).get("auto").toString());
|
|
int autoNum = Integer.parseInt(commonDao.queryOne(planSql).get("auto").toString());
|
|
|
int total = Integer.parseInt(commonDao.queryOne(sumSql).get("total").toString());
|
|
int total = Integer.parseInt(commonDao.queryOne(sumSql).get("total").toString());
|
|
|
|
|
+ //手动
|
|
|
int manual = total - autoNum;
|
|
int manual = total - autoNum;
|
|
|
planDto.setTotal(total);
|
|
planDto.setTotal(total);
|
|
|
planDto.setAutoNum(autoNum);
|
|
planDto.setAutoNum(autoNum);
|