Procházet zdrojové kódy

Merge branch 'dev' of trick9191/patient-co-management into dev

trick9191 před 7 roky
rodič
revize
81bbb5dfbc

+ 2 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/consult/Evaluate.java

@ -16,10 +16,10 @@ public class Evaluate extends IdEntity {
    private String doctor;//被评价的医生
    private String patient;//评价人
    private String consult;//咨询
    private String patient;//评价人
    private Integer score;//分数
    private Integer type;//1、实名,2、匿名

+ 4 - 3
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/consult/EvaluateService.java

@ -140,9 +140,10 @@ public class EvaluateService extends BaseService {
     * @param type
     * @return
     */
    public List<Evaluate> getEvaluateByConsultAndType(String consult, int type) {
        List<Evaluate> evaluates = evaluateDao.findByConsultAndType(consult, type);
        return evaluates;
    public List<Map<String,Object>> getEvaluateByConsultAndType(String consult, int type) {
        String sql = "SELECT e.*,d.`name`,d.`level`,d.photo FROM wlyy_evaluate e ,wlyy_doctor d WHERE e.doctor = d.code AND e.consult =? AND e.type = ?";
        List<Map<String,Object>> rs = jdbcTemplate.queryForList(sql,new Object[]{consult,type});
        return rs;
    }
    /**

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

@ -831,7 +831,17 @@ public class SignPatientLabelInfoService extends BaseService {
     * @throws Exception
     */
    public int getPatientFocusAmountByTeam(Long teamCode) throws Exception {
        String sql = "select count(distinct patient) count from wlyy_sign_family where admin_team_code = ? and status > 0 and length(trim(ifnull(openid,''))) > 1";
        String sql = "SELECT " +
                " COUNT(1) AS count" +
                " FROM " +
                " wlyy_sign_family f, " +
                " wlyy_patient p " +
                " WHERE " +
                " f.patient = p.`code` " +
                " AND f.admin_team_code =? " +
                " AND p.openid IS NOT NULL  " +
                " AND p.openid <>''  " +
                " AND f.`status` >0";
        List<Map<String, Object>> count = jdbcTemplate.queryForList(sql, new Object[]{teamCode});
        if (count != null && count.size() > 0 && count.get(0).containsKey("count")) {
            return Integer.valueOf(String.valueOf(count.get(0).get("count")));

+ 2 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/BaseController.java

@ -2,6 +2,7 @@ package com.yihu.wlyy.web;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.wlyy.entity.IdEntity;
import com.yihu.wlyy.util.DateUtil;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray;
import org.json.JSONObject;
@ -169,7 +170,7 @@ public class BaseController {
    }
    public void error(Exception e) {
        logger.error(getClass().getName() + ":", e.getMessage());
        logger.error(DateUtil.dateToStr(new Date(),"yyyy-MM-dd HH:mm:ss")+":"+getClass().getName() + ":", e.getMessage());
        e.printStackTrace();
    }

+ 2 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/consult/DoctorEvaluateController.java

@ -59,8 +59,8 @@ public class DoctorEvaluateController extends BaseController {
                jsonObject.put("evaluateScore",evaluateScoresJson);
                return  write(200,"查询成功!","data",jsonObject);
            }else{
                evaluates = evaluateService.getEvaluateByConsultAndType(consult,type);
                return  write(200,"查询成功!","list",evaluates);
                List<Map<String,Object>> rs = evaluateService.getEvaluateByConsultAndType(consult,type);
                return  write(200,"查询成功!","list",rs);
            }
        }catch (Exception e){
            error(e);

+ 2 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/consult/EvaluateController.java

@ -95,8 +95,8 @@ public class EvaluateController  extends BaseController {
                return  write(200,"查询成功!","data",jsonObject);
            }else{
                evaluates = evaluateService.getEvaluateByConsultAndType(consult,type);
                return  write(200,"查询成功!","list",evaluates);
                List<Map<String,Object>> rs = evaluateService.getEvaluateByConsultAndType(consult,type);
                return  write(200,"查询成功!","list",rs);
            }
        }catch (Exception e){
            error(e);

+ 40 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/prescription/PatientPrescriptionInfoController.java

@ -1,10 +1,17 @@
package com.yihu.wlyy.web.patient.prescription;
import com.yihu.wlyy.service.app.prescription.PrescriptionInfoService;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
/**
 * Created by Trick on 2017/7/25.
@ -14,5 +21,38 @@ import org.springframework.web.bind.annotation.RequestMapping;
@Api(description = "患者端-长处方接口")
public class PatientPrescriptionInfoController extends BaseController {
    @Autowired
    private PrescriptionInfoService prescriptionInfoService;
    /**
     * 获取处方列表
     * @param type
     * @return
     */
    @RequestMapping(value = "/getPrescriptionInfos")
    @ResponseBody
    @ApiOperation(value = "获取长处方信息列表")
    public String getPrescriptionInfos(@RequestParam(required = true)@ApiParam(name="type",value="1:查询处方;2我的续方;3:续方记录")String type){
        try {
            return write(200, "查询成功!", "data", "");
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败!");
        }
    }
    @RequestMapping(value = "/getPrescription")
    @ResponseBody
    @ApiOperation(value = "获取长处方详细信息")
    public String getPrescription(@RequestParam(required = true)@ApiParam(name="code",value="处方CODE")String code){
        try {
            return write(200, "查询成功!", "data", "");
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败!");
        }
    }
}