Bläddra i källkod

居委会查询接口

trick9191 7 år sedan
förälder
incheckning
5fcbdea30a

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

@ -1,6 +1,9 @@
package com.yihu.wlyy.service.app.sign;
import com.sun.corba.se.spi.activation.Server;
import com.yihu.wlyy.entity.address.Country;
import com.yihu.wlyy.entity.address.Street;
import com.yihu.wlyy.entity.address.Town;
import com.yihu.wlyy.entity.charge.WlyyCharge;
import com.yihu.wlyy.entity.consult.Consult;
import com.yihu.wlyy.entity.dict.SystemDict;
@ -10,6 +13,9 @@ import com.yihu.wlyy.entity.doctor.team.sign.DoctorTeam;
import com.yihu.wlyy.entity.doctor.team.sign.DoctorTeamMember;
import com.yihu.wlyy.entity.message.Message;
import com.yihu.wlyy.entity.patient.*;
import com.yihu.wlyy.repository.address.CountryDao;
import com.yihu.wlyy.repository.address.StreetDao;
import com.yihu.wlyy.repository.address.TownDao;
import com.yihu.wlyy.repository.charge.ChargeDao;
import com.yihu.wlyy.repository.consult.ConsultDao;
import com.yihu.wlyy.repository.consult.ConsultTeamDao;
@ -96,6 +102,17 @@ public class SignWebService extends BaseService {
    @Autowired
    private ChargeDao chargeDao;
    @Autowired
    private TownDao townDao;
    @Autowired
    private StreetDao streetDao;
    @Autowired
    private CountryDao countryDao;
    /**
     * 厦门市
     */
    public static String city ="350200";
    /**
     * 根据医生代码及签约状态编码 获取该医生签约患者的信息列表
     *
@ -2339,4 +2356,16 @@ public class SignWebService extends BaseService {
        return -1;
    }
    public JSONArray getTownList(){
        List<Town> towns = townDao.findByCityCode(city);
        return new JSONArray(towns);
    }
    public JSONArray getStreetListByTown(String town){
        Iterable<Street> streets = streetDao.findByTown(town);
        return new JSONArray(streets);
    }
    public JSONArray getCountryListByStreet(String street){
        List<Country> countrys = countryDao.findByStreet(street);
        return new JSONArray(countrys);
    }
}

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

@ -1,6 +1,7 @@
package com.yihu.wlyy.web.doctor.sign;
import com.yihu.wlyy.aop.ObserverRequired;
import com.yihu.wlyy.entity.address.Country;
import com.yihu.wlyy.entity.address.Street;
import com.yihu.wlyy.entity.address.Town;
import com.yihu.wlyy.entity.patient.Patient;
@ -51,14 +52,7 @@ public class DoctorSignController extends WeixinBaseController {
    StringRedisTemplate redisTemplate;
    @Autowired
    private PatientService patientService;
    @Autowired
    private TownDao townDao;
    @Autowired
    private StreetDao streetDao;
    /**
     * 厦门市
     */
    public static String city ="350200";
    /**
     * 三师签约列表查询
     *
@ -702,13 +696,35 @@ public class DoctorSignController extends WeixinBaseController {
        }
    }
    public JSONArray getTownList(){
        List<Town> towns = townDao.findByCityCode(city);
        return new JSONArray(towns);
    @RequestMapping(value = "/getTownList", method = {RequestMethod.GET, RequestMethod.POST})
    @ResponseBody
    public String getTownList(){
        try {
            return write(200, "查询成功", "data", signWebService.getTownList());
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败");
        }
    }
    public JSONArray getStreetList(String town){
        Iterable<Street> streets = streetDao.findByTown(town);
        return new JSONArray(streets);
    @RequestMapping(value = "/getStreetListByTown", method = {RequestMethod.GET, RequestMethod.POST})
    @ResponseBody
    public String getStreetListByTown(String town){
        try {
            return write(200, "查询成功", "data", signWebService.getStreetListByTown(town));
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败");
        }
    }
    @RequestMapping(value = "/getCountryListByStreet", method = {RequestMethod.GET, RequestMethod.POST})
    @ResponseBody
    public String getCountryListByStreet(String street){
        try {
            return write(200, "查询成功", "data", signWebService.getCountryListByStreet(street));
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败");
        }
    }
//    public JSONArray get
}