Browse Source

长处方

trick9191 7 years ago
parent
commit
8d528aac9c

+ 8 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionInfoService.java

@ -553,7 +553,7 @@ public class PrescriptionInfoService extends BaseService {
     * @param size 分页大小
     * @return
     */
    public JSONArray getHDoctorPrescriptionExpressage(String type,String doctor, String nameKey,String startDate,String endDate,String hospital,String state,Integer page,Integer size){
    public JSONArray getHDoctorPrescriptionExpressage(String teamCode,String type,String doctor, String nameKey,String startDate,String endDate,String hospital,String state,Integer page,Integer size){
        StringBuffer pre_sql = new StringBuffer("SELECT " +
                " p.`name`, " +
@ -570,7 +570,7 @@ public class PrescriptionInfoService extends BaseService {
                " JOIN wlyy_prescription_expressage e ON pr.code = e.prescription_code " +
                " WHERE 1=1 " );
        List<Object> params = new ArrayList<>();
        setExpressageSql(pre_sql,params,type, doctor,  nameKey, startDate, endDate, hospital, state, page, size);
        setExpressageSql(pre_sql,params,teamCode,type, doctor,  nameKey, startDate, endDate, hospital, state, page, size);
        List<Map<String,Object>> rs = jdbcTemplate.queryForList(pre_sql.toString(),params.toArray());
        //通过缓存查找药品和疾病
        for(Map<String,Object> map :rs){
@ -580,7 +580,8 @@ public class PrescriptionInfoService extends BaseService {
        }
        return new JSONArray(rs);
    }
    public void setExpressageSql(StringBuffer pre_sql,List<Object> param,String type,String doctor, String nameKey,String startDate,String endDate,String hospital,String state,Integer page,Integer size){
    public void setExpressageSql(StringBuffer pre_sql,List<Object> param,String teamCode,String type,String doctor, String nameKey,String startDate,String endDate,String hospital,String state,Integer page,Integer size){
        if(StringUtils.isNotBlank(type)){
            if("1".equals(type)){
                pre_sql.append(" AND e.expressage_Code = ?");
@ -590,6 +591,10 @@ public class PrescriptionInfoService extends BaseService {
                param.add(doctor);
            }
        }
        if(StringUtils.isNotBlank(teamCode)){
            pre_sql.append(" AND p.admin_team_id = ? ");
            param.add(teamCode);
        }
        if(StringUtils.isNotBlank(nameKey)){
            pre_sql.append(" AND p.name LIKE ? ");
            param.add("%"+nameKey+"%");

+ 3 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prescription/PrescriptionInfoController.java

@ -183,7 +183,8 @@ public class PrescriptionInfoController extends BaseController{
    @RequestMapping(value = "/getHDoctorPrescriptionExpressage", method = RequestMethod.GET)
    @ApiOperation(value = "获取健康管理师续方订单列表")
    public String getHDoctorPrescriptionExpressage(@RequestParam(required = false) @ApiParam(value = "1:需跟踪;2:已接收", name = "type")  String type,
    public String getHDoctorPrescriptionExpressage(@RequestParam(required = false) @ApiParam(value = "团队Code", name = "teamCode")String teamCode,
                                                  @RequestParam(required = false) @ApiParam(value = "1:需跟踪;2:已接收", name = "type")  String type,
                                                  @RequestParam(required = false) @ApiParam(value = "患者姓名关键字", name = "nameKey")String nameKey,
                                                  @RequestParam(required = false) @ApiParam(value = "开始时间", name = "startDate")String startDate,
                                                  @RequestParam(required = false) @ApiParam(value = "结束时间", name = "endDate")String endDate,
@ -192,7 +193,7 @@ public class PrescriptionInfoController extends BaseController{
                                                  @RequestParam(required = false) @ApiParam(value = "页数", name = "page")Integer page,
                                                  @RequestParam(required = false) @ApiParam(value = "每页大小", name = "size")Integer size){
        try {
            return write(200, "操作成功!", "data",prescriptionInfoService.getHDoctorPrescriptionExpressage(type,getUID(),nameKey,startDate,endDate,hospital,state,page,size));
            return write(200, "操作成功!", "data",prescriptionInfoService.getHDoctorPrescriptionExpressage(teamCode,type,getUID(),nameKey,startDate,endDate,hospital,state,page,size));
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败!");