ソースを参照

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

zd_123 7 年 前
コミット
9f58aee047
15 ファイル変更158 行追加57 行削除
  1. 51 5
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/user/UserController.java
  2. 12 0
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/user/user_modify.jsp
  3. 4 0
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/user/user_modify_js.jsp
  4. 1 1
      patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/repository/patient/SignFamilyDao.java
  5. 19 7
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/label/SignPatientLabelInfoService.java
  6. 11 5
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionExpressageService.java
  7. 34 24
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/scheme/DoctorSchemeService.java
  8. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/jimeiJkEdu/JMJkEduArticleService.java
  9. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/util/DateUtil.java
  10. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/health/DoctorHealthEduArticleController.java
  11. 12 7
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/patient/SignPatientLabelInfoController.java
  12. 8 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/scheme/DoctroSchemeController.java
  13. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/gateway/controller/doctor/GcLableController.java
  14. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/jkedu/controller/doctor/EduLableController.java
  15. 1 1
      patient-co/patient-co-wlyy/src/main/resources/system.properties

+ 51 - 5
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/user/UserController.java

@ -1,10 +1,10 @@
package com.yihu.wlyy.controller.manager.user;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.wlyy.controller.BaseController;
import com.yihu.wlyy.entity.User;
import com.yihu.wlyy.service.manager.user.UserService;
import com.yihu.wlyy.util.Envelop;
import com.yihu.wlyy.util.MD5;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
@ -16,8 +16,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
 * Created by yww on 2016/12/6.
@ -142,6 +143,11 @@ public class UserController extends BaseController {
    @ResponseBody
    public String updateUser(String jsonData){
        try{
    
            JSONObject data = JSONObject.parseObject(jsonData);
            
            String oldpsw = data.getString("oldpsw");
            
            User user = objectMapper.readValue(jsonData, User.class);
            String mobile = user.getMobile();
            if(mobile == null){
@ -154,14 +160,54 @@ public class UserController extends BaseController {
            userNew.setMobile(user.getMobile());
            userNew.setOrganizationId(user.getOrganizationId());
            userNew.setRoles(user.getRoles());
            //修改手机号对应初始化密码(因暂未提供修改密码操作)-手机号后六位
            if(userNew.getMobile() != user.getMobile()){
                String password=mobile.substring(5);
    
            String password=user.getPassword();
            
            //如果新密码不为空,则进入修改密码的分支
            if(StringUtils.isNotBlank(password)){
                
                if(StringUtils.isBlank(oldpsw)){
                    return error(-1,"旧密码不能为空");
                }
    
                oldpsw =  MD5.GetMD5Code(oldpsw+userNew.getSalt());
    
                if(!oldpsw.equals(userNew.getPassword())){
                    return error(-1,"旧密码错误,无法修改");
                }
    
                //
//            复杂(同时包含数字,字母,特殊符号)
//            "^^(?![a-zA-z]+$)(?!\\d+$)(?![!@#$%^&*_-]+$)(?![a-zA-z\\d]+$)(?![a-zA-z!@#$%^&*_-]+$)(?![\\d!@#$%^&*_-]+$)[a-zA-Z\\d!@#$%^&*_-]+$"
//            中级(包含字母和数字)
                String regStr = "^(?![a-zA-z]+$)(?!\\d+$)(?![!@#$%^&*]+$)[a-zA-Z\\d!@#$%^&*]+$";
                Pattern pattern = Pattern.compile(regStr);
                Matcher matcher = pattern.matcher(password);
                boolean rs = matcher.find();
                if(!rs){
                    return error(-1,"新密码必须包含字母和数字!");
                }
    
                String salt= UUID.randomUUID().toString().replace("-", "");
                password = MD5.GetMD5Code(password+salt);
                userNew.setPassword(password);
                userNew.setSalt(salt);
            }
    
            
    
            
//            //修改手机号对应初始化密码(因暂未提供修改密码操作)-手机号后六位
//            if(userNew.getMobile() != user.getMobile()){
//                String password=mobile.substring(5);
//                String salt= UUID.randomUUID().toString().replace("-", "");
//                password = MD5.GetMD5Code(password+salt);
//                userNew.setPassword(password);
//                userNew.setSalt(salt);
//            }
            userNew = userService.save(userNew);
            return write(200,"操作成功!");
        }catch (Exception ex){

+ 12 - 0
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/user/user_modify.jsp

@ -40,6 +40,18 @@
			<input type="text"  id="inp_type" class="required useTitle f-w240 validate-special-char" required-title="用户类型不能为空"  data-attr-scan="type"/>
		</div>
	</div>
	<div class="m-form-group" id="new_psw_div" style="display: none">
		<label class="label_title" style="width:120px">登陆密码</label>
		<div class="l-text-wrapper m-form-control essential">
			<input type="password"  id="inp_psw" class="required useTitle f-w240 validate-special-char" required-title="登陆密码不能为空"  data-attr-scan="password"/>
		</div>
	</div>
	<div class="m-form-group" id="old_psw_div" style="display: none">
		<label class="label_title" style="width:120px">旧密码</label>
		<div class="l-text-wrapper m-form-control essential">
			<input type="password"  id="inp_old_psw" class="required useTitle f-w240 validate-special-char" required-title="旧密码不能为空"  data-attr-scan="oldpsw"/>
		</div>
	</div>
	<div id="customer" style="display: none">
		<div class="m-form-group">
			<label class="label_title" style="width:120px">工号</label>

+ 4 - 0
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/user/user_modify_js.jsp

@ -99,6 +99,10 @@
						this.$form.removeClass("m-form-readonly");
						$(".XXXtest").addClass("essential");
						$("#btn_save_close").css("display", "block");
                        if(type == "edit"){
                            $("#new_psw_div").css("display", "block");
                            $("#old_psw_div").css("display", "block");
                        }
					}
					this.$form.show();
				},

+ 1 - 1
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/repository/patient/SignFamilyDao.java

@ -424,7 +424,7 @@ public interface SignFamilyDao extends PagingAndSortingRepository<SignFamily, Lo
    //查询wlyy_sign_family有续签却未同步到wlyy_sign_family_renew_log数据
    @Query(value = "SELECT f.* FROM wlyy_sign_family f LEFT JOIN wlyy_sign_family_renew_log r ON f.`code` = r.sign_code WHERE r.sign_code IS NULL  " +
            " AND f.renew_flag IN (1, 2) and f.`status`!=-4  ",nativeQuery = true)
            " AND f.renew_flag IN (1, 2) AND f.`status` IN (1, 2)  ",nativeQuery = true)
    List<SignFamily> findRenew();
    //根据身份证号查询最近的已到期签约数据

+ 19 - 7
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/label/SignPatientLabelInfoService.java

@ -314,7 +314,7 @@ public class SignPatientLabelInfoService extends BaseService {
     */
    public JSONArray getPatientByLabel(String doctor, String labelCode, String labelType,
                                       Long teamCode, int page, int pagesize, boolean isSlowDisease,
                                       String diseaseCondition,boolean isFollowWeChat,String trackFlag) throws Exception {
                                       String diseaseCondition,boolean isFollowWeChat,String trackFlag,String sDate,String eDate) throws Exception {
        Doctor doc = doctorDao.findByCode(doctor);
        if (doc == null) {
@ -416,6 +416,9 @@ public class SignPatientLabelInfoService extends BaseService {
            }
            if(StringUtils.isNotBlank(trackFlag)&&"1".equals(trackFlag)){
                sql = sql + " AND tp.del='1'  AND tp.doctor_code ='"+doctor+"' AND tp.team_code ="+teamCode;
                if(StringUtils.isNotBlank(sDate)&&StringUtils.isNotBlank(eDate)){
                    sql += " AND tp.create_time >='"+sDate+" 00:00:00' AND tp.create_time <='"+eDate+" 23:59:59' ";
                }
            }
    
            sql = sql + " order by p.standard_status DESC ,p.disease_condition DESC,t2.label DESC,t1.openid DESC ,convert(t1.name using gbk) ";
@ -1116,7 +1119,7 @@ public class SignPatientLabelInfoService extends BaseService {
     * @param teamCode  标签类型为4时,不能为空
     * @return
     */
    public JSONArray getPatientAmountByLabelType(String doctor, String labelType, Long teamCode, boolean isSlowDisease, String diseaseCondition,String trackFlag) throws Exception {
    public JSONArray getPatientAmountByLabelType(String doctor, String labelType, Long teamCode, boolean isSlowDisease, String diseaseCondition,String trackFlag,String sDate,String eDate) throws Exception {
        Doctor doc = doctorDao.findByCode(doctor);
        if (doc == null) {
@ -1212,6 +1215,9 @@ public class SignPatientLabelInfoService extends BaseService {
                                //1.4.2新增重点居民跟踪过滤
                                if(StringUtils.isNotBlank(trackFlag)&&"1".equals(trackFlag)){
                                    sql = sql + " AND tp.del='1' AND tp.doctor_code='"+doctor+"' AND tp.team_code ="+teamCode;
                                    if(StringUtils.isNotBlank(sDate)&&StringUtils.isNotBlank(eDate)){
                                        sql +=" AND tp.create_time <='"+eDate+" 23:59:59' AND tp.create_time >='"+sDate+" 00:00:00'";
                                    }
                                }
                        if (teamCode > 0) {
@ -4408,7 +4414,7 @@ public class SignPatientLabelInfoService extends BaseService {
                                                           String labelCode, String labelType, long teamCode,
                                                           String exLabelCode,
                                                           String exLabelType,
                                                           int page, int pagesize) throws Exception {
                                                           int page, int pagesize,String trackFlag) throws Exception {
        Doctor doc = doctorDao.findByCode(doctor);
        if (doc == null) {
@ -4430,13 +4436,19 @@ public class SignPatientLabelInfoService extends BaseService {
        sql = "select " +
                "    DISTINCT t1.* " +
                " FROM " +
                "    wlyy_sign_family t1 " +
                " JOIN wlyy_sign_patient_label_info t2 ON t1.patient = t2.patient and t2.status=1 " +
                "    wlyy_sign_family t1 ";
        if(StringUtils.isNotBlank(trackFlag)&&"1".equals(trackFlag)){
            sql +=" JOIN wlyy_track_patient tp ON tp.patient_code = t1.patient ";
        }
        sql +=" JOIN wlyy_sign_patient_label_info t2 ON t1.patient = t2.patient and t2.status=1 " +
                " JOIN wlyy_patient t3 ON t1.patient = t3.code " +
                (teamCode > 0 ? " join (select * from wlyy_sign_patient_label where label_type != '4' or team_code = " + teamCode + " or (label_type = '4' and (label_code in (1,2)))) lb on t2.label = lb.label_code and t2.label_type = lb.label_type " : "") +
                " WHERE " +
                "    (t1.doctor = ? or t1.doctor_health = ?) " +
                "    AND t1.status > 0 " +
                "    (t1.doctor = ? or t1.doctor_health = ?) " ;
        if(StringUtils.isNotBlank(trackFlag)&&"1".equals(trackFlag)){
            sql = sql + " AND tp.del='1' AND tp.doctor_code='"+doctor+"' AND tp.team_code ="+teamCode;
        }
        sql +=  "    AND t1.status > 0 " +
                "    AND t2.status = 1 " +
//                (StringUtils.isNotEmpty(labelCode) ? " AND t2.label = ? " : "") +
//                (StringUtils.isNotEmpty(labelType) ? " AND t2.label_type = ? " : "") +

+ 11 - 5
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionExpressageService.java

@ -494,6 +494,7 @@ public class PrescriptionExpressageService extends BaseService {
                        " JOIN wlyy_prescription_pay py ON py.prescription_code = p.`code` " +
                        " WHERE " +
                        " p.patient = '" + p.getCode() + "' " +
                        " AND py.trade_status ='1' " +
                        " AND p.`status`>=50 " +
                        " ORDER BY p.`status` ASC ";
                List<Map<String, Object>> totallist = jdbcTemplate.queryForList(sqlTotal);
@ -519,7 +520,8 @@ public class PrescriptionExpressageService extends BaseService {
                        " wlyy_prescription p " +
                        " JOIN wlyy_prescription_pay py ON py.prescription_code = p.`code` " +
                        " WHERE " +
                        " p.patient = '" + p.getCode() + "' " +
                        " p.patient = '" + p.getCode() + "'" +
                        " AND py.trade_status ='1' " +
                        " AND p.`status`>=50 " +
                        " ORDER BY p.`status` ASC " +
                        " LIMIT " + start + "," + pageSize;
@ -631,7 +633,8 @@ public class PrescriptionExpressageService extends BaseService {
                " JOIN wlyy_prescription_pay py ON py.prescription_code = p.`code` " +
                " LEFT JOIN wlyy_prescription_expressage e ON p.code = e.prescription_code" +
                " WHERE" +
                " p.hospital = '"+d.getHospital()+"' ";
                " p.hospital = '"+d.getHospital()+"' " +
                " AND py.trade_status = '1' ";
        totalSql = setSQL( totalSql,keyWord,state,type,startDate,endDate,operator,flag);
        totalSql +=  " AND p.`status`>=50 ";
        List<Map<String, Object>> totallist = jdbcTemplate.queryForList(totalSql);
@ -662,7 +665,8 @@ public class PrescriptionExpressageService extends BaseService {
                " JOIN wlyy_prescription_pay py ON py.prescription_code = p.`code` " +
                " LEFT JOIN wlyy_prescription_expressage e ON p.code = e.prescription_code" +
                " WHERE" +
                " p.hospital = '"+d.getHospital()+"' ";
                " p.hospital = '"+d.getHospital()+"' " +
                " AND py.trade_status = '1' ";
        sql = setSQL( sql,keyWord,state,type,startDate,endDate,operator,flag);
        sql +=  " AND p.`status`>=50 " +
                " ORDER BY py.charge_time DESC " +
@ -744,7 +748,8 @@ public class PrescriptionExpressageService extends BaseService {
                " JOIN wlyy_prescription_pay py ON py.prescription_code = p.`code` " +
                " LEFT JOIN wlyy_prescription_expressage e ON p.code = e.prescription_code" +
                " WHERE" +
                " p.hospital = '"+d.getHospital()+"' ";
                " p.hospital = '"+d.getHospital()+"' " +
                " AND py.trade_status = '1' ";
        totalSql = setDrugSQL( totalSql,keyWord,state,type,startDate,endDate,operator,flag);
        totalSql +=  " AND p.`status`>=50 ";
        List<Map<String, Object>> totallist = jdbcTemplate.queryForList(totalSql);
@ -775,7 +780,8 @@ public class PrescriptionExpressageService extends BaseService {
                " JOIN wlyy_prescription_pay py ON py.prescription_code = p.`code` " +
                " LEFT JOIN wlyy_prescription_expressage e ON p.code = e.prescription_code" +
                " WHERE" +
                " p.hospital = '"+d.getHospital()+"' ";
                " p.hospital = '"+d.getHospital()+"' " +
                " AND py.trade_status = '1' ";
        sql = setDrugSQL( sql,keyWord,state,type,startDate,endDate,operator,flag);
        sql +=  " AND p.`status`>=50 " +
                " ORDER BY e.fetching_medicine_time DESC " +

+ 34 - 24
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/scheme/DoctorSchemeService.java

@ -1086,8 +1086,8 @@ public class DoctorSchemeService extends BaseService{
                " t.del='1' " +
                " AND t.doctor_code = '"+doctor+"' " +
                " AND t.team_code = "+teamCode +
                " AND t.create_time >= '"+startDate+"' " +
                " AND t.create_time <= '"+endDate+"'";
                " AND t.create_time >= '"+startDate+" 00:00:00' " +
                " AND t.create_time <= '"+endDate+" 23:59:59'";
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
        if(list!=null&&list.size()>0){
            Long total = (Long)list.get(0).get("total");
@ -1503,7 +1503,8 @@ public class DoctorSchemeService extends BaseService{
    }
    public List<Map<String,Object>> getPatientScheme(String patient,String type){
    public Map<String,Object> getPatientScheme(String patient,String type){
        Map<String,Object> rs = new HashedMap();
        String sql =null;
        if("1".equals(type)){
            sql =  "SELECT " +
@ -1528,7 +1529,14 @@ public class DoctorSchemeService extends BaseService{
        }
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
        return list;
        if(list!=null&&list.size()>0){
            rs.put("code",list.get(0).get("code"));
            rs.put("name",list.get(0).get("name"));
            rs.put("content",list.get(0).get("content"));
            rs.put("list",list);
        }
        return rs;
    }
    public List<Map<String,Object>> getTrackPatientIndexCountList(String doctor,Integer teamCode,String type,String startDate,String endDate,String keyword,Integer page,Integer size){
@ -1554,7 +1562,8 @@ public class DoctorSchemeService extends BaseService{
                " p.`name`, " +
                " IFNULL(year( from_days( datediff( now(), p.birthday))),'未知') age, " +
                " p.photo, " +
                " p.idcard " +
                " p.idcard," +
                " p.sex " +
                " FROM " +
                " " +
                "( " +
@ -1589,8 +1598,8 @@ public class DoctorSchemeService extends BaseService{
                "   AND i.type = 1 " +
                "   AND i.value2 IN (2, 4, 6) " +
                "   AND i.value1 > 7.8 " +
                "   AND i.i.record_date >='"+startDate+"'" +
                "   AND i.i.record_date <='"+endDate+"'" +
                "   AND i.record_date >='"+startDate+"'" +
                "   AND i.record_date <='"+endDate+"'" +
                "   GROUP BY " +
                "    i. USER " +
                "  ) pid ON pid. USER = t.patient_code " +
@ -1624,8 +1633,8 @@ public class DoctorSchemeService extends BaseService{
                "  AND i.type = 1 " +
                "  AND i.value2 IN (1, 3, 5, 7) " +
                "  AND i.value1 > 6.1 " +
                "  AND i.i.record_date >='"+startDate+"'" +
                "  AND i.i.record_date <='"+endDate+"'" +
                "  AND i.record_date >='"+startDate+"'" +
                "  AND i.record_date <='"+endDate+"'" +
                "  GROUP BY " +
                "   i. USER " +
                " ) pid ON pid. USER = t.patient_code " +
@ -1666,8 +1675,8 @@ public class DoctorSchemeService extends BaseService{
                "   AND i.type = 1 " +
                "   AND i.value2 IN (2, 4, 6) " +
                "   AND i.value1 < 4.4 " +
                "  AND i.i.record_date >='"+startDate+"'" +
                "  AND i.i.record_date <='"+endDate+"'" +
                "  AND i.record_date >='"+startDate+"'" +
                "  AND i.record_date <='"+endDate+"'" +
                "   GROUP BY " +
                "    i. USER " +
                "  ) pid ON pid. USER = t.patient_code " +
@ -1701,8 +1710,8 @@ public class DoctorSchemeService extends BaseService{
                "  AND i.type = 1 " +
                "  AND i.value2 IN (1, 3, 5, 7) " +
                "  AND i.value1 < 3.9 " +
                "  AND i.i.record_date >='"+startDate+"'" +
                "  AND i.i.record_date <='"+endDate+"'" +
                "  AND i.record_date >='"+startDate+"'" +
                "  AND i.record_date <='"+endDate+"'" +
                "  GROUP BY " +
                "   i. USER " +
                " ) pid ON pid. USER = t.patient_code " +
@ -1745,8 +1754,8 @@ public class DoctorSchemeService extends BaseService{
                "   AND i.value2 IN (2, 4, 6) " +
                "   AND i.value1 >= 4.4 " +
                "   AND i.value1 <= 7.8 " +
                "  AND i.i.record_date >='"+startDate+"'" +
                "  AND i.i.record_date <='"+endDate+"'" +
                "  AND i.record_date >='"+startDate+"'" +
                "  AND i.record_date <='"+endDate+"'" +
                "   GROUP BY " +
                "    i. USER " +
                "  ) pid ON pid. USER = t.patient_code " +
@ -1781,8 +1790,8 @@ public class DoctorSchemeService extends BaseService{
                "  AND i.value2 IN (1, 3, 5, 7) " +
                "  AND i.value1 >= 3.9 " +
                "  AND i.value1 <= 6.1 " +
                "  AND i.i.record_date >='"+startDate+"'" +
                "  AND i.i.record_date <='"+endDate+"'" +
                "  AND i.record_date >='"+startDate+"'" +
                "  AND i.record_date <='"+endDate+"'" +
                "  GROUP BY " +
                "   i. USER " +
                " ) pid ON pid. USER = t.patient_code " +
@ -1811,7 +1820,8 @@ public class DoctorSchemeService extends BaseService{
                " t3.total AS highCount, " +
                " p.`name`, " +
                " IFNULL(year( from_days( datediff( now(), p.birthday))),'未知') age, " +
                " p.photo " +
                " p.photo, " +
                " p.sex" +
                " FROM " +
                " " +
                " ( " +
@ -1839,8 +1849,8 @@ public class DoctorSchemeService extends BaseService{
                "    i.del = '1' " +
                "   AND i.type = 2 " +
                "   AND i.value1 < 90 " +
                "  AND i.i.record_date >='"+startDate+"'" +
                "  AND i.i.record_date <='"+endDate+"'" +
                "  AND i.record_date >='"+startDate+"'" +
                "  AND i.record_date <='"+endDate+"'" +
                "   GROUP BY " +
                "    i. USER " +
                "  ) pid ON pid. USER = t.patient_code " +
@ -1872,8 +1882,8 @@ public class DoctorSchemeService extends BaseService{
                "   AND i.type = 2 " +
                "   AND i.value1 >= 90 " +
                "   AND i.value1 <=139 " +
                "  AND i.i.record_date >='"+startDate+"'" +
                "  AND i.i.record_date <='"+endDate+"'" +
                "  AND i.record_date >='"+startDate+"'" +
                "  AND i.record_date <='"+endDate+"'" +
                "   GROUP BY " +
                "    i. USER " +
                "  ) pid ON pid. USER = t.patient_code " +
@ -1905,8 +1915,8 @@ public class DoctorSchemeService extends BaseService{
                "    i.del = '1' " +
                "   AND i.type = 2 " +
                "   AND i.value1 >139 " +
                "  AND i.i.record_date >='"+startDate+"'" +
                "  AND i.i.record_date <='"+endDate+"'" +
                "  AND i.record_date >='"+startDate+"'" +
                "  AND i.record_date <='"+endDate+"'" +
                "   GROUP BY " +
                "    i. USER " +
                "  ) pid ON pid. USER = t.patient_code " +

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/jimeiJkEdu/JMJkEduArticleService.java

@ -938,7 +938,7 @@ public class JMJkEduArticleService extends BaseService {
    }
    private void getPatientByGroup(String userCode,String labelCode, String labelType, Long teamCode, Set<String> patientSet, int page, int pagesize) throws Exception {
        org.json.JSONArray result = signPatientLabelInfoService.getPatientByLabel(userCode, labelCode, labelType, teamCode, page, pagesize, false, "",true,null);
        org.json.JSONArray result = signPatientLabelInfoService.getPatientByLabel(userCode, labelCode, labelType, teamCode, page, pagesize, false, "",true,null,null,null);
        for (Object o : result) {
            org.json.JSONObject json = (org.json.JSONObject) o;
            String patient = (String) json.get("code");

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/util/DateUtil.java

@ -901,7 +901,7 @@ public class DateUtil {
	 */
	public static Time hhmmStrToTime(String hhmm){
		Time time = null;
		DateFormat sdf = new SimpleDateFormat("hh:mm");
		DateFormat sdf = new SimpleDateFormat("HH:mm");
		try {
			Date date = sdf.parse(hhmm);
			time = new Time(date.getTime());

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/health/DoctorHealthEduArticleController.java

@ -512,7 +512,7 @@ public class DoctorHealthEduArticleController extends WeixinBaseController {
    }
    private void getPatientByGroup(String labelCode, String labelType, Long teamCode, Set<String> patientSet, int page, int pagesize) throws Exception {
        JSONArray result = signPatientLabelInfoService.getPatientByLabel(getUID(), labelCode, labelType, teamCode, page, pagesize, false, "",false,null);
        JSONArray result = signPatientLabelInfoService.getPatientByLabel(getUID(), labelCode, labelType, teamCode, page, pagesize, false, "",false,null,null,null);
        for (Object o : result) {
            JSONObject json = (JSONObject) o;
            String patient = (String) json.get("code");

+ 12 - 7
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/patient/SignPatientLabelInfoController.java

@ -187,7 +187,9 @@ public class SignPatientLabelInfoController extends BaseController {
                                        @RequestParam(required = false) String diseaseCondition,
                                        @RequestParam(required = false) boolean isSlowDisease,
                                        @RequestParam(required = false) boolean isFollowWeChat,
                                        @RequestParam(required = false) String trackFlag) {
                                        @RequestParam(required = false) String trackFlag,
                                        @RequestParam(required = false) String startDate,
                                        @RequestParam(required = false) String enddate) {
        try {
            if (StringUtils.isEmpty(labelCode)) {
                return error(-1, "标签cdoe不能为空");
@ -208,7 +210,7 @@ public class SignPatientLabelInfoController extends BaseController {
                return write(200, "查询成功", "data", jsonObject);
            }
            JSONArray result = labelInfoService.getPatientByLabel(getUID(), labelCode, labelType, teamCode, page, pagesize,isSlowDisease,diseaseCondition,isFollowWeChat,trackFlag);
            JSONArray result = labelInfoService.getPatientByLabel(getUID(), labelCode, labelType, teamCode, page, pagesize,isSlowDisease,diseaseCondition,isFollowWeChat,trackFlag,startDate,enddate);
//            JSONArray result = labelInfoService.getPatientByLabel("xy201703150222", labelCode, labelType, teamCode, page, pagesize,isSlowDisease,diseaseCondition,isFollowWeChat);
            return write(200, "查询成功", "data", result);
@ -326,7 +328,9 @@ public class SignPatientLabelInfoController extends BaseController {
            @RequestParam(required = false) Long teamCode,
            @RequestParam(required = false) boolean isSlowDisease,
            @RequestParam(required = false) String diseaseCondition,
            @RequestParam(required = false)String trackFlag) {
            @RequestParam(required = false)String trackFlag,
            @RequestParam(required = false)String startDate,
            @RequestParam(required = false)String endDate) {
        try {
            if (StringUtils.isEmpty(labelType)) {
                return error(-1, "标签类型不能为空");
@ -348,7 +352,7 @@ public class SignPatientLabelInfoController extends BaseController {
                return write(200, "查询成功", "data", r);
            }
            JSONArray result = labelInfoService.getPatientAmountByLabelType(getUID(), labelType, teamCode,isSlowDisease,diseaseCondition,trackFlag);
            JSONArray result = labelInfoService.getPatientAmountByLabelType(getUID(), labelType, teamCode,isSlowDisease,diseaseCondition,trackFlag,startDate,endDate);
            return write(200, "查询成功", "data", result);
        } catch (Exception e) {
@ -817,8 +821,9 @@ public class SignPatientLabelInfoController extends BaseController {
                                             @RequestParam(required = false) Long teamCode,
                                             @RequestParam(required = false) String exLabelCode,
                                             @RequestParam(required = false) String exLabelType,
                                             @RequestParam(required = true) int page,
                                             @RequestParam(required = true) int pagesize) {
                                             @RequestParam(required = true) Integer page,
                                             @RequestParam(required = true) Integer pagesize,
                                             @RequestParam(required = false) String trackFlag) {
        try {
            if (StringUtils.isEmpty(filter)) {
                return error(-1, "搜索字段不能为空");
@ -838,7 +843,7 @@ public class SignPatientLabelInfoController extends BaseController {
            page = page - 1;
            JSONArray result = labelInfoService.searchSlowDiseasePatientByNameOrLabel(getUID(), filter, labelCode, labelType, teamCode, exLabelCode, exLabelType, page, pagesize);
            JSONArray result = labelInfoService.searchSlowDiseasePatientByNameOrLabel(getUID(), filter, labelCode, labelType, teamCode, exLabelCode, exLabelType, page, pagesize,trackFlag);
//            JSONArray result = labelInfoService.searchSlowDiseasePatientByNameOrLabel("xy201703150222", filter, labelCode, labelType, teamCode, exLabelCode, exLabelType, page, pagesize);
            return write(200, "查询成功", "data", result);

+ 8 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/scheme/DoctroSchemeController.java

@ -241,7 +241,7 @@ public class DoctroSchemeController extends BaseController {
                                            @ApiParam(name="startDate", value="开始时间") @RequestParam(value = "startDate",required = true)String startDate,
                                            @ApiParam(name="endDate", value="结束时间") @RequestParam(value = "endDate",required = true)String endDate){
        try {
            return write(200, "查询成功", "data",doctorSchemeService.getTrackPatientCountTitle(teamCode,getUID(),startDate,endDate));
            return write(200, "查询成功", "data",doctorSchemeService.getTrackPatientCountTitle(teamCode,"xh1D2017031503333",startDate,endDate));
        }catch (Exception e){
            error(e);
            //返回接口异常信息处理结果
@ -337,7 +337,13 @@ public class DoctroSchemeController extends BaseController {
    @RequestMapping(value="getTrackPatientIndexCountList",method = RequestMethod.GET)
    @ApiOperation("获取关注居民测量数据列表")
    public String getTrackPatientIndexCountList(Integer teamCode,String type,String startDate,String endDate,String keyword,Integer page,Integer size){
    public String getTrackPatientIndexCountList(@ApiParam(name="teamCode", value="团队ID") @RequestParam(value = "teamCode",required = true)Integer teamCode,
                                                @ApiParam(name="type", value="1.糖尿病,其他为高血压") @RequestParam(value = "type",required = true)String type,
                                                @ApiParam(name="startDate", value="开始时间,YYYY-MM-dd") @RequestParam(value = "startDate",required = true)String startDate,
                                                @ApiParam(name="endDate", value="结束时间,YYYY-MM-dd") @RequestParam(value = "endDate",required = true)String endDate,
                                                @ApiParam(name="keyword", value="姓名模糊匹配,身份证号") @RequestParam(value = "keyword",required = false)String keyword,
                                                @ApiParam(name="page", value="起始页,1开始") @RequestParam(value = "page",required = true)Integer page,
                                                @ApiParam(name="size", value="每页大小") @RequestParam(value = "size",required = true)Integer size){
        try {
            return write(200, "查询成功", "data",doctorSchemeService.getTrackPatientIndexCountList(getUID(), teamCode, type, startDate, endDate, keyword, page, size));
        }catch (Exception e){

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/gateway/controller/doctor/GcLableController.java

@ -101,7 +101,7 @@ public class GcLableController extends BaseController {
            @ApiParam(name = "isFollowWeChat", value = "是否过滤微信关注居民", required = false) @RequestParam(value="isFollowWeChat",required = false,defaultValue = "false") boolean isFollowWeChat
    ) {
        try {
            JSONArray result = signPatientLabelInfoService.getPatientByLabel(getUID(), labelCode, labelType, teamCode, page-1, pageSize, isSlowDisease, "",isFollowWeChat,null);
            JSONArray result = signPatientLabelInfoService.getPatientByLabel(getUID(), labelCode, labelType, teamCode, page-1, pageSize, isSlowDisease, "",isFollowWeChat,null,null,null);
            List<PatientModel> patientLabelModels = new ArrayList<>();
            for (int i = 0; i < result.length(); i++) {
                JSONObject jo = result.getJSONObject(i);

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/jkedu/controller/doctor/EduLableController.java

@ -100,7 +100,7 @@ public class EduLableController extends BaseController {
            @ApiParam(name = "isFollowWeChat", value = "是否过滤微信关注居民", required = true) @RequestParam(value="isFollowWeChat",required = false,defaultValue = "false") boolean isFollowWeChat
    ) {
        try {
            JSONArray result = signPatientLabelInfoService.getPatientByLabel(getUID(), labelCode, labelType, teamCode, page-1, pageSize, isSlowDisease, "",isFollowWeChat,null);
            JSONArray result = signPatientLabelInfoService.getPatientByLabel(getUID(), labelCode, labelType, teamCode, page-1, pageSize, isSlowDisease, "",isFollowWeChat,null,null,null);
            List<PatientModel> patientLabelModels = new ArrayList<>();
            for (int i = 0; i < result.length(); i++) {
                JSONObject jo = result.getJSONObject(i);

+ 1 - 1
patient-co/patient-co-wlyy/src/main/resources/system.properties

@ -31,7 +31,7 @@ patient_QRCode_url=https://open.weixin.qq.com/connect/oauth2/authorize?appid={ap
#居民wifi图片地址
patient_wifi_pic_url = {server}/images/wifi.png
#居民wifi链接
patient_wifi_url = https://open.weixin.qq.com/connect/oauth2/authorize?appid={appId}&amp;redirect_uri=http://www.baidu.com
patient_wifi_url =http://freewifi.mobcb.com/Portal/Wx/login
#就诊记录
patient_visit_pic ={server}/images/visit.png
#检查检验