Explorar o código

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

 Conflicts:
	svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/device/DeviceManageService.java
liubing %!s(int64=3) %!d(string=hai) anos
pai
achega
08cc0daccb

+ 2 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/device/DeviceManageService.java

@ -51,7 +51,8 @@ public class DeviceManageService extends BaseJpaService<BaseDeviceRepairEntity,B
        }
        if (StringUtils.isNotBlank(doctor)) {//
            BaseDoctorDO doctorByid = baseDoctorDao.findById(doctor);
            if (doctorByid.getLevel() == 2) {
            // 2是社工 4是助老员
            if (doctorByid.getLevel() == 4) {
                sql += " and EXISTS (SELECT ph.patient from base_patient_helper ph WHERE pd.user = ph.patient AND ph.doctor = '"+doctor+"' and ph.del = '1')";
            } else {
                sql += " and EXISTS (SELECT sr.patient from base_service_package_sign_record sr,base_service_package_record r,base_team_member m " +

+ 2 - 14
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/statistics/StatisticsService.java

@ -15,13 +15,10 @@ import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.login.BaseLoginLogDO;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.care.device.DevicePatientDevice;
import com.yihu.jw.entity.hospital.message.SystemMessageDO;
import com.yihu.jw.es.es.ElasticSearchHelperUtil;
import com.yihu.jw.es.util.ElasticsearchUtil;
import com.yihu.jw.es.util.SaveModel;
import com.yihu.jw.hospital.message.dao.SystemMessageDao;
import com.yihu.jw.im.util.ImUtil;
import com.yihu.jw.message.dao.MessageDao;
import com.yihu.jw.org.dao.BaseOrgDao;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.restmodel.web.PageEnvelop;
@ -29,25 +26,16 @@ import com.yihu.jw.util.common.IdCardUtil;
import com.yihu.jw.util.date.DateUtil;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang.StringUtils;
import org.nlpcn.es4sql.jdbc.ObjectResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.persistence.Transient;
import javax.persistence.criteria.CriteriaBuilder;
import java.awt.print.Pageable;
import java.sql.Timestamp;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
@ -194,7 +182,7 @@ public class StatisticsService {
        // 3 幼儿活动
        if ("3".equals(type)) {
            sqlbuff.append("SELECT count(id) amount,DATE_FORMAT(create_time,'%Y-%m-%d') as `range` FROM base_child_activity_registration WHERE DATE_SUB(CURDATE(), INTERVAL " + day + " DAY) <= date(create_time) " +
                    " and org.code not in (SELECT dict_code from wlyy_hospital_sys_dict WHERE dict_name = 'jkzl_org') GROUP BY DATE_FORMAT(create_time,'%Y-%m-%d') ORDER BY create_time");
                    " and org_code not in (SELECT dict_code from wlyy_hospital_sys_dict WHERE dict_name = 'jkzl_org') GROUP BY DATE_FORMAT(create_time,'%Y-%m-%d') ORDER BY create_time");
            listMaps = jdbcTemplate.queryForList(String.valueOf(sqlbuff));
            res.put("count", listMaps);
        }
@ -315,7 +303,7 @@ public class StatisticsService {
            }
            /*幼儿活动报名 总数*/
            String sqlActivity = " select count(id) as total from base_child_activity_registration where org.code not in (SELECT dict_code from wlyy_hospital_sys_dict WHERE dict_name = 'jkzl_org') ";
            String sqlActivity = " select count(id) as total from base_child_activity_registration where org_code not in (SELECT dict_code from wlyy_hospital_sys_dict WHERE dict_name = 'jkzl_org') ";
            Integer count = jdbcTemplate.queryForObject(sqlActivity, Integer.class);
            res.put("activity_3", count);
        }