trick9191 7 年之前
父節點
當前提交
2c2951c04e

+ 69 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/address/Country.java

@ -0,0 +1,69 @@
package com.yihu.wlyy.entity.address;
import com.yihu.wlyy.entity.IdEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * Created by Trick on 2017/7/20.
 */
@Entity
@Table(name = "dm_country")
public class Country extends IdEntity {
    private String  id;
    private String  province;
    private String  city;
    private String  town;
    private String  street ;
    private String  code;
    private String  name;
    public String getProvince() {
        return province;
    }
    public void setProvince(String province) {
        this.province = province;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getCity() {
        return city;
    }
    public void setCity(String city) {
        this.city = city;
    }
    public String getTown() {
        return town;
    }
    public void setTown(String town) {
        this.town = town;
    }
    public String getStreet() {
        return street;
    }
    public void setStreet(String street) {
        this.street = street;
    }
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
}

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

@ -130,7 +130,7 @@ public class SignWebService extends BaseService {
                " ( select renew_flag,code,patient,doctor,status,id,apply_date,patient_apply_date,expenses_time,reason,begin from wlyy_sign_family where doctor = ?  and status = ? and type = 2" +
                (status == 3 ? " and expenses_status = '1'" : "") + " order by begin desc ) a " +
                " ,wlyy_patient b " +
                " where a.patient = b.code  order by a.patient_apply_date desc limit " + page * pageSize + "," + pageSize;
                " where a.patient = b.code  order by applyDate desc limit " + page * pageSize + "," + pageSize;
        // 未缴费查询语句
        String sqlExpenses = "select " +
@ -153,9 +153,9 @@ public class SignWebService extends BaseService {
                "    ,b.openid" +
                "    ,a.renew_flag as renewFlag" +
                " from " +
                " ( select renew_flag,code,patient,doctor,status,id,apply_date,reason,begin,expenses_status,LENGTH(trim(ifnull(expenses_status,''))) len from wlyy_sign_family where doctor = ?  and status > ? and type = 2 order by begin desc ) a " +
                " ( select patient_apply_date,renew_flag,code,patient,doctor,status,id,apply_date,reason,begin,expenses_status,LENGTH(trim(ifnull(expenses_status,''))) len from wlyy_sign_family where doctor = ?  and status > ? and type = 2 order by begin desc ) a " +
                " ,wlyy_patient b " +
                " where a.patient = b.code and (a.expenses_status = '0' or a.len < 1) order by a.patient_apply_date desc limit " + page * pageSize + "," + pageSize;
                " where a.patient = b.code and (a.expenses_status = '0' or a.len < 1) order by applyDate desc limit " + page * pageSize + "," + pageSize;
        // 已解约查询语句
        String surrSql = "select " +
@ -178,9 +178,9 @@ public class SignWebService extends BaseService {
                "    ,b.openid" +
                "    ,a.renew_flag as renewFlag" +
                " from " +
                " ( select renew_flag,code,patient,doctor,status,id,apply_date,apply_unsign_date,reason,begin from wlyy_sign_family where doctor = ?  and ( status = ? or status = ? ) and type = 2 order by begin desc ) a " +
                " ( select patient_apply_date,renew_flag,code,patient,doctor,status,id,apply_date,apply_unsign_date,reason,begin from wlyy_sign_family where doctor = ?  and ( status = ? or status = ? ) and type = 2 order by begin desc ) a " +
                " ,wlyy_patient b " +
                " where a.patient = b.code  order by a.patient_apply_date desc limit " + page * pageSize + "," + pageSize;
                " where a.patient = b.code  order by applyDate desc limit " + page * pageSize + "," + pageSize;
        // 分页信息
        //PageRequest pageRequest = new PageRequest(page - 1, pageSize);

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

@ -1,7 +1,10 @@
package com.yihu.wlyy.web.doctor.sign;
import com.yihu.wlyy.aop.ObserverRequired;
import com.yihu.wlyy.entity.address.Street;
import com.yihu.wlyy.entity.address.Town;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.repository.address.StreetDao;
import com.yihu.wlyy.repository.address.TownDao;
import com.yihu.wlyy.service.app.account.DoctorInfoService;
import com.yihu.wlyy.service.app.account.PatientInfoService;
@ -50,6 +53,12 @@ public class DoctorSignController extends WeixinBaseController {
    private PatientService patientService;
    @Autowired
    private TownDao townDao;
    @Autowired
    private StreetDao streetDao;
    /**
     * 厦门市
     */
    public static String city ="350200";
    /**
     * 三师签约列表查询
     *
@ -694,7 +703,12 @@ public class DoctorSignController extends WeixinBaseController {
    }
    public JSONArray getTownList(){
        return null;
        List<Town> towns = townDao.findByCityCode(city);
        return new JSONArray(towns);
    }
    public JSONArray getStreetList(String town){
        Iterable<Street> streets = streetDao.findByTown(town);
        return new JSONArray(streets);
    }
//    public JSONArray get
}