Bläddra i källkod

签约表修改

trick9191 8 år sedan
förälder
incheckning
968a428b6c

+ 20 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/SignFamily.java

@ -73,6 +73,26 @@ public class SignFamily extends IdEntity {
    private String specialPopulation;
    //基卫特殊人群类别名称
    private String specialPopulationName;
    //续签标志 1 医生续签 2 医生改签续签
    private String renewFlag;
    //转签原因
    private String renewChangeReason;
    public String getRenewFlag() {
        return renewFlag;
    }
    public void setRenewFlag(String renewFlag) {
        this.renewFlag = renewFlag;
    }
    public String getRenewChangeReason() {
        return renewChangeReason;
    }
    public void setRenewChangeReason(String renewChangeReason) {
        this.renewChangeReason = renewChangeReason;
    }
    public String getServerType() {
        return serverType;

+ 11 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/SignFamilyRenew.java

@ -75,6 +75,17 @@ public class SignFamilyRenew extends IdEntity {
    //基卫特殊人群类别名称
    private String specialPopulationName;
    //转签原因
    private String renewChangeReason;
    public String getRenewChangeReason() {
        return renewChangeReason;
    }
    public void setRenewChangeReason(String renewChangeReason) {
        this.renewChangeReason = renewChangeReason;
    }
    public String getRenewFlag() {
        return renewFlag;
    }

+ 6 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/SignWebService.java

@ -2,6 +2,7 @@ package com.yihu.wlyy.service.app.sign;
import java.util.*;
import com.yihu.wlyy.entity.dict.SystemDict;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.doctor.team.admin.AdminTeam;
import com.yihu.wlyy.entity.doctor.team.sign.DoctorTeam;
@ -1786,4 +1787,9 @@ public class SignWebService extends BaseService {
        renew.setDoctorHealthName(hd.getName());
        renew.setDoctorHealth(hd.getCode());
    }
    public JSONArray getRenewChangeReason(){
       List<SystemDict> systemDict = systemDictService.getDictByDictName("RENEW_CHANGE_REASON");
        return new JSONArray(systemDict);
    }
}

+ 20 - 11
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statistics/StatisticsService.java

@ -1,6 +1,7 @@
package com.yihu.wlyy.service.app.statistics;
import com.yihu.wlyy.entity.address.Town;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.doctor.team.admin.AdminTeam;
import com.yihu.wlyy.entity.organization.Hospital;
import com.yihu.wlyy.entity.statistics.PopulationBase;
@ -2933,19 +2934,17 @@ public class StatisticsService extends BaseService {
                    " GROUP BY dateNo";
            planSQL ="SELECT " +
                    " ( " +
                    "  DATE_FORMAT(w.create_time, '%v') - DATE_FORMAT('"+DateUtil.getFristDayOfMonth()+"', '%v') + 1 " +
                    " ) AS weekOfMonth,COUNT(1) AS planCount " +
                    "FROM " +
                    " left(w.create_time,10) AS dateNo,COUNT(1) AS planCount " +
                    " FROM " +
                    " wlyy_followup w " +
                    "WHERE " +
                    " WHERE " +
                    " w.admin_team_code =" +teamCode+
                    " AND w.doctor_code ='"+doctor+"'"+
                    " AND w.create_time >= '"+startDate+"' " +
                    " AND w.create_time <= '"+endDate+"' " +
                    " AND w.status ='2'"+
                    " AND w.followup_class IS NOT NULL " +
                    " GROUP BY weekOfMonth";
                    " GROUP BY dateNo";
        }else{
            //按月
            totalSQL ="SELECT " +
@ -2964,7 +2963,7 @@ public class StatisticsService extends BaseService {
            planSQL = "SELECT " +
                    " ( " +
                    "  DATE_FORMAT(w.create_time, '%v') - DATE_FORMAT('"+DateUtil.getFristDayOfMonth()+"', '%v') + 1 " +
                    " ) AS weekOfMonth,COUNT(1) AS followupCount " +
                    " ) AS weekOfMonth,COUNT(1) AS planCount " +
                    " FROM " +
                    " wlyy_followup w " +
                    " WHERE " +
@ -2998,7 +2997,7 @@ public class StatisticsService extends BaseService {
                    " WHERE " +
                    " w.admin_team_code =" +teamCode+
                    " AND w.create_time >= '"+startDate+"' " +
                    " AND w.create_time <= '"+endDate+"' " +
            " AND w.create_time <= '"+endDate+"' " +
                    " AND w.followup_class IS NOT NULL " +
                    " GROUP BY dateNo";
@ -3210,7 +3209,7 @@ public class StatisticsService extends BaseService {
            //按增量排序
            if(addList!=null&&addList.size()>0){
                //以增量为基准,合并结果集
                for(Map<String ,Object> map : totalList){
                for(Map<String ,Object> map : addList){
                    String code = (String)map.get("doctorCode");
@ -3222,7 +3221,7 @@ public class StatisticsService extends BaseService {
                        map.put("planCount",0L);
                    }
                    Map<String,Object> m2 =(Map<String,Object>)planMap.get(code);
                    Map<String,Object> m2 =(Map<String,Object>)totalMap.get(code);
                    if(m2!=null){
                        Long followupCount = (Long)m2.get("followupCount");
                        map.put("followupCount",followupCount);
@ -3240,7 +3239,7 @@ public class StatisticsService extends BaseService {
                    String code = (String)map.get("doctorCode");
                    Map<String,Object> m =(Map<String,Object>)planMap.get(code);
                    Map<String,Object> m =(Map<String,Object>)totalMap.get(code);
                    if(m!=null){
                        Long followupCount = (Long)m.get("followupCount");
                        map.put("followupCount",followupCount);
@ -3998,4 +3997,14 @@ public class StatisticsService extends BaseService {
        rs.put("addList",addList);
        return rs;
    }
    public JSONObject getDoctorInfo(String code){
       Doctor doctor =  doctorDao.findByCode(code);
        JSONObject rs = new JSONObject();
        rs.put("doctorName",doctor.getName());
        rs.put("doctor",doctor.getCode());
        rs.put("photo",doctor.getPhoto());
        return rs;
    }
}

+ 14 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/sign/DoctorSignController.java

@ -649,6 +649,18 @@ public class DoctorSignController extends WeixinBaseController {
        }
    }
    /**
     * 获取转签原因字段
     * @return
     */
    @RequestMapping(value = "/getRenewChangeReason", method = {RequestMethod.GET})
    @ResponseBody
    public String getRenewChangeReason(){
        try {
            JSONArray rs = signWebService.getRenewChangeReason();
            return write(200, "查询成功", "data", rs);
        } catch (Exception e) {
            return error(-1, "查询失败");
        }
    }
}

+ 2 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/sign/PatientSignController.java

@ -282,4 +282,6 @@ public class PatientSignController extends BaseController {
			return error(-1, "系统错误,请联系管理员!");
		}
	}
}

+ 10 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/statistic/StatisticsController.java

@ -1281,5 +1281,14 @@ public class StatisticsController extends BaseController {
        }
    }
    @RequestMapping("/getDotorInfo")
    @ResponseBody
    public String getDotorInfo(String code){
        try {
            return write(200, "查询成功", "data", statisticsService.getDoctorInfo(code));
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败");
        }
    }
}