Przeglądaj źródła

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

zhanghaoyu 7 lat temu
rodzic
commit
4d1339990a
13 zmienionych plików z 110 dodań i 35 usunięć
  1. 10 10
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/healthbank/activity_list.jsp
  2. 1 1
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/healthbank/activity_list_js.jsp
  3. 1 1
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/healthbank/activity_modify.jsp
  4. 1 1
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/healthbank/activity_modify_js.jsp
  5. 2 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/config/SwaggerConfig.java
  6. 3 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/message/MessageDao.java
  7. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/disease/PatientDiseaseService.java
  8. 22 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/message/MessageService.java
  9. 6 4
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/specialist/SpecialistEvaluateSevice.java
  10. 13 9
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/specialist/rehabilitation/RehabilitationManageService.java
  11. 34 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/message/DoctorMessageController.java
  12. 14 4
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/specialist/rehabilitation/DoctorRehabilitationManageController.java
  13. 2 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/specialist/rehabilitation/PatientRehabilitationManageController.java

+ 10 - 10
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/healthbank/activity_list.jsp

@ -15,33 +15,33 @@
<body>
<div id="div_wrapper">
    <!-- 检索条件 -->
    <div class="m-activity-area f-h50 f-dn f-pr m-form-inline" data-role-form style='display: block;'>
        <div class="m-form-group f-mt10">
            <div class="m-form-control f-ml15">
    <div class="m-activity-area f-dn f-pr m-form-inline" data-role-form style='display: block;'>
        <div class="m-form-group">
            <div class="m-form-control f-ml15 f-mt10">
                <input type="text" id="inp_title" placeholder="请输入活动标题" class="f-ml10" data-attr-scan="title"/>
            </div>
            <div class="m-form-control f-ml15">
            <div class="m-form-control f-ml15 f-mt10">
                <input type="text" id="inp_location" placeholder="请输入活动地点" class="f-ml10" data-attr-scan="location"/>
            </div>
            <div class="m-form-control f-ml15">
            <div class="m-form-control f-ml15 f-mt10">
                <input type="text" id="inp_type" placeholder="请输入活动类型" class="f-ml10" data-attr-scan="type"/>
            </div>
            <div class="m-form-control f-ml15">
            <div class="m-form-control f-ml15 f-mt10">
                <input type="text" id="inp_status" placeholder="请输入状态" class="f-ml10" data-attr-scan="status"/>
            </div>
            <div class="m-form-control f-ml15">
            <div class="m-form-control f-ml15 f-mt10">
                <input type="text" id="inp_start_time" placeholder="请输入活动开始时间" class="f-ml10" data-attr-scan="startTime"/>
            </div>
            <div class="m-form-control f-ml15">
            <div class="m-form-control f-ml15 f-mt10">
                <input type="text" id="inp_end_time" placeholder="请输入活动结束时间" class="f-ml10" data-attr-scan="endTime"/>
            </div>
            <sec:authorize url="/admin/activity/list">
                <div id="btn_search" class="l-button u-btn u-btn-primary u-btn-small f-ib f-vam  f-ml10" >
                <div id="btn_search" class="m-form-control l-button u-btn u-btn-primary u-btn-small f-ib f-vam  f-ml10 f-mt10" >
                    <span>查询</span>
                </div>
            </sec:authorize>
            <sec:authorize url="/admin/activity/create">
                <div id="btn_add" class="l-button u-btn u-btn-primary u-btn-small f-ib f-vam  f-ml10" >
                <div id="btn_add" class="m-form-control l-button u-btn u-btn-primary u-btn-small f-ib f-vam  f-ml10 f-mt10" >
                    <span>新增</span>
                </div>
            </sec:authorize>

+ 1 - 1
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/healthbank/activity_list_js.jsp

@ -173,7 +173,7 @@
                    $.subscribe('activity:info:edit', function (event, id) {
                        var title = '编辑信息';
                        self.activityInfoDialog = $.ligerDialog.open({
                            height: 700,
                            height: 900,
                            width: 560,
                            urlParms: {"id": id, "type": "edit"},
                            title: title,

+ 1 - 1
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/healthbank/activity_modify.jsp

@ -33,7 +33,7 @@
    <div class="m-form-group">
        <label class="label_title" style="width:120px">活动说明</label>
        <div class="l-text-wrapper m-form-control essential">
            <input type="text"  id="inp_description" class="required useTitle ajax f-w240 validate-special-char"  required-title="活动说明不能为空"  data-attr-scan="description"/>
            <textarea type="text"  id="inp_description" class="required useTitle ajax f-w240 validate-special-char"  required-title="活动说明不能为空"  data-attr-scan="description"></textarea>
        </div>
    </div>
    <div class="m-form-group">

+ 1 - 1
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/healthbank/activity_modify_js.jsp

@ -27,7 +27,7 @@
                    $("#inp_organizer").ligerTextBox({width: 240}) //主办方&发布机构
                    $("#inp_title").ligerTextBox({width: 240})//活动标题
                    $("#inp_description").ligerTextBox({width: 240})//活动说明
                    $("#inp_description").ligerTextBox({width: 260, height: 240})//活动说明
                    $("#inp_location").ligerTextBox({width: 240})//活动地点
                    $("#inp_type").ligerTextBox({width: 240})//活动类型
                    $("#inp_startTime").ligerDateEditor({

+ 2 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/config/SwaggerConfig.java

@ -194,7 +194,8 @@ public class SwaggerConfig {
                        regex("/esstatistics/.*"),
                        regex("/old/statistics/.*"),
                        regex("/questionnaire/.*"),
                        regex("/rehabilitation/.*")
                        regex("/rehabilitation/.*"),
                        regex("/specialist/.*")
                ))
                .build()
                .apiInfo(otherApiInfo());

+ 3 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/message/MessageDao.java

@ -144,6 +144,9 @@ public interface MessageDao extends PagingAndSortingRepository<Message, Long>, J
    @Query("select a from Message a where a.read= ?2 and a.receiver = ?1 and a.state = 1 and a.over = ?3 and a.type in (16,19,20,21,22) order by a.czrq desc")
    List<Message> getSpecialistUntreated(String receiver,Integer read,String over,Pageable pageable);
    @Query("select a from Message a where a.read= ?2 and a.receiver = ?1 and a.state = 1 and a.over = ?3 and a.type in (17) order by a.czrq desc")
    List<Message> getTransferMessage(String receiver,Integer read,String over,Pageable pageable);
    @Query("select a from Message a where a.code = ?1")
    Message findByCode(String code);

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/disease/PatientDiseaseService.java

@ -510,7 +510,7 @@ public class PatientDiseaseService extends BaseService {
                "b.disease_name AS labelName," +
                "b.disease AS label " +
                "FROM wlyy_specialist.wlyy_specialist_patient_relation a " +
                "JOIN wlyy.wlyy_patient_disease_server b ON a.patient=b.patient and b.del=1 " +
                "JOIN wlyy.wlyy_patient_disease_server b ON a.id=b.specialist_relation_code and b.del=1 " +
                "WHERE a.sign_status> 0 AND a.`status`>=0 AND b.del =1 " +
                "AND a.doctor='"+doctor+"' " +
                "GROUP BY b.disease";

+ 22 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/message/MessageService.java

@ -202,7 +202,8 @@ public class MessageService extends BaseService {
            JSONObject articleJson = new JSONObject();
            articleJson.put("title", "文章审核消息");
            articleJson.put("type", articleMes.get(0).getType());
            articleJson.put("msg", "你有"+articleMes.size()+"个文章审核消息");
//            articleJson.put("msg", "你有"+articleMes.size()+"个文章审核消息");
            articleJson.put("msg", "你有"+articleMes.size()+"个新消息");
            articleJson.put("msgTime", DateUtil.dateToStrLong(articleMes.get(0).getCreateTime()));
            articleMesJson.put("lastMessage", articleJson);
        }else{
@ -940,6 +941,26 @@ public class MessageService extends BaseService {
    }
    /**
     * 获取转诊通知
     *
     * @param message
     * @param page
     * @param size
     * @return
     * @throws Exception
     */
    public List<Message> getTransferMessage(Message message, Integer page, Integer size) throws Exception{
        // 排序
        Sort sort = new Sort(Sort.Direction.DESC, "read","over","createTime");
        // 分页信息
        Pageable pageRequest = new PageRequest(page - 1, size, sort);
        return messageDao.getTransferMessage(message.getReceiver(),message.getRead(),message.getOver(),pageRequest);
    }
}

+ 6 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/specialist/SpecialistEvaluateSevice.java

@ -113,6 +113,7 @@ public class SpecialistEvaluateSevice extends BaseService {
    /**
     * 发送消息 type:19 受理提醒,20 待办工作提醒 21 服务进展提醒-已完成 22 服务进展提醒-未完成
     */
    public JSONObject sendMessage(Message message,String hospitalCode,String patientCode,Integer num){
        JSONObject object = new JSONObject();
        try {
@ -121,7 +122,7 @@ public class SpecialistEvaluateSevice extends BaseService {
                hospital = hospitalDao.findByCode(hospitalCode);
            }
            Patient patient = patientDao.findByCode(patientCode);
            Doctor sendDoctor = doctorDao.findByCode(message.getSender());
//            Doctor sendDoctor = doctorDao.findByCode(message.getSender());
            Doctor receiverDoctor = doctorDao.findByCode(message.getReceiver());
            if (message.getType() == 19 ){
                message.setType(19);
@ -144,17 +145,18 @@ public class SpecialistEvaluateSevice extends BaseService {
                message.setTitle("康复计划-服务进展提醒");
                message.setContent("您的"+patient.getName()+"签约居民今日有"+num+"个康复计划项目待完成,请尽快处理");
            }
            message.setSenderName(sendDoctor.getName());
            message.setCode(getCode());
            message.setSenderPhoto(sendDoctor.getPhoto());
//            message.setSenderName(sendDoctor.getName());
//            message.setSenderPhoto(sendDoctor.getPhoto());
//            message.setSex(sendDoctor.getSex());
            message.setReadonly(1);//是否只读消息
            message.setSex(sendDoctor.getSex());
            message.setOver("1");//未处理
            message.setDel("1");
            message.setState(1);
            message.setCzrq(new Date());
            message.setReceiverName(receiverDoctor.getName());
            message.setData(patientCode);
            message.setCreateTime(new Date());
            messageDao.save(message);
        }catch (Exception e){
            e.printStackTrace();

+ 13 - 9
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/specialist/rehabilitation/RehabilitationManageService.java

@ -214,9 +214,10 @@ public class RehabilitationManageService extends BaseService {
     * @return
     * @throws Exception
     */
    public JSONArray serviceItemList(String planDetailIds) throws Exception{
    public JSONArray serviceItemList(String planDetailIds,String doctorCode) throws Exception{
        Map<String, Object> param = new HashedMap();
        param.put("planDetailIds", planDetailIds);
        param.put("doctorCode", doctorCode);
        HttpResponse response = HttpUtils.doGet(specialistUrl + serviceItemList, param);
        JSONObject result = new JSONObject(response.getContent());
        JSONArray jsonArray = null;
@ -244,9 +245,10 @@ public class RehabilitationManageService extends BaseService {
     * @return
     * @throws Exception
     */
    public JSONObject serviceItem(String planDetailId) throws Exception{
    public JSONObject serviceItem(String planDetailId,String doctorCode) throws Exception{
        Map<String, Object> param = new HashedMap();
        param.put("planDetailId", planDetailId);
        param.put("doctorCode", doctorCode);
        HttpResponse response = HttpUtils.doGet(specialistUrl + serviceItem, param);
        JSONObject result = new JSONObject(response.getContent());
        if(result.getInt("status")==200){
@ -510,14 +512,13 @@ public class RehabilitationManageService extends BaseService {
        //specialistUrl= "http://localhost:10051";
        HttpResponse response = HttpUtils.doPost(specialistUrl + updateNoteAndImageRehabilitationOperate, param);
        JSONObject result = new JSONObject(response.getContent());
        if(result.getString("status").equals("200")){
            JSONArray array = result.getJSONArray("detailModelList");
            JSONObject object = array.getJSONObject(0);
        if(result.getInt("status") == 200){
            JSONObject object = result.getJSONObject("obj");
            int evaluation = object.getInt("evaluation");
            if (evaluation == 1){
                String serviceItemId = object.getString("serviceItemId");
                String doctor = object.getString("doctorCode");
                String patient = object.getString("patientCode");
                String serviceItemId = object.getString("service_item_id");
                String doctor = object.getString("doctor_code");
                String patient = object.getString("patient_code");
                String title = object.getString("title");
                Patient p = patientDao.findByCode(patient);
                String patientName = p.getName();
@ -573,15 +574,18 @@ public class RehabilitationManageService extends BaseService {
        String doctor = "";
        String patient ="";
        Integer num = null;
        JSONArray planDetailIds = null;
        for(int i=0;i<jsonArray.length();i++){
            jsonObject = jsonArray.getJSONObject(i);
            doctor = jsonObject.get("doctor")+"";//执行的医生(接收的医生)
            patient = jsonObject.get("patient")+"";//执行的居民
            num = (Integer)jsonObject.get("num");//需要今日需要执行的项目数
            planDetailIds = (JSONArray)jsonObject.get("planDetailIds");
            Message message1 = new Message();
            message1.setSender(null);
//            message1.setSender(patient);
            message1.setType(type);
            message1.setReceiver(doctor);
            message1.setRelationCode(planDetailIds.toString());
            specialistEvaluateSevice.sendMessage(message1,null,patient,num);
        }
    }

+ 34 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/message/DoctorMessageController.java

@ -589,6 +589,40 @@ public class DoctorMessageController extends BaseController {
    }
    /**
     * 转诊消息
     *
     * @param message
     * @param page
     * @param pageSize
     * @return
     */
    @RequestMapping(value = "getTransferMessage",method = RequestMethod.GET)
    @ApiOperation("转诊消息")
    @ResponseBody
    public String getTransferMessage(@ApiParam(name = "message",value = "消息对象")@RequestParam(value = "message")String message,
                                @ApiParam(name="page",value="第几页",defaultValue = "1") @RequestParam(value="page",required = true) String page,
                                @ApiParam(name="pageSize",value="",defaultValue = "10") @RequestParam(value="pageSize",required = true) String pageSize){
        if (StringUtils.isBlank(pageSize)) {
            pageSize = "10";
        }
        if (page.equals("0")) {
            page = "1";
        }
        Message message1 = new Message();
        com.alibaba.fastjson.JSONObject object = JSON.parseObject(message);
        message1.setOver(object.getString("over"));
        message1.setRead(object.getInteger("read"));
        message1.setReceiver(getUID());
        try {
            return write(200,"查询成功!","data",messageService.getTransferMessage(message1,Integer.valueOf(page),Integer.valueOf(pageSize)));
        }catch (Exception e){
            error(e);
            return error( -1, "查询失败!");
        }
    }
    /**
     * 发送消息 type:19 受理提醒,20 待办工作提醒 21 服务进展提醒-已完成 22 服务进展提醒-未完成
     *  message{sender:"",receiver:"",relationCode:""}

+ 14 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/specialist/rehabilitation/DoctorRehabilitationManageController.java

@ -142,10 +142,15 @@ public class DoctorRehabilitationManageController extends BaseController {
    @ApiOperation("康复管理-多个康复计划服务项目内容列表")
    @ObserverRequired
    public String serviceItemList(@ApiParam(name = "planDetailIds", value = "康复计划多个服务项目id(多个‘,’分隔)", required = true)
                                                   @RequestParam(value = "planDetailIds", required = true)String planDetailIds){
                                                   @RequestParam(value = "planDetailIds", required = true)String planDetailIds,
                                  @ApiParam(name = "doctorCode", value = "医生code", required = false)
                                  @RequestParam(value = "doctorCode", required = false)String doctorCode){
        try {
            JSONArray result = rehabilitationManageService.serviceItemList(planDetailIds);
            if(!StringUtils.isNotEmpty(doctorCode)){
                doctorCode = getRepUID();
            }
            JSONArray result = rehabilitationManageService.serviceItemList(planDetailIds,doctorCode);
            return write(200, "获取成功", "data", result);
        } catch (Exception e) {
            error(e);
@ -157,10 +162,15 @@ public class DoctorRehabilitationManageController extends BaseController {
    @ApiOperation("康复管理-康复计划服务项目确认详情页")
    @ObserverRequired
    public String serviceItem(@ApiParam(name = "planDetailId", value = "康复计划服务项目id", required = true)
                                  @RequestParam(value = "planDetailId", required = true)String planDetailId){
                              @RequestParam(value = "planDetailId", required = true)String planDetailId,
                              @ApiParam(name = "doctorCode", value = "医生code", required = false)
                              @RequestParam(value = "doctorCode", required = false)String doctorCode){
        try {
            JSONObject result = rehabilitationManageService.serviceItem(planDetailId);
            if(!StringUtils.isNotEmpty(doctorCode)){
                doctorCode = getRepUID();
            }
            JSONObject result = rehabilitationManageService.serviceItem(planDetailId,doctorCode);
            return write(200, "获取成功", "data", result);
        } catch (Exception e) {
            error(e);

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/specialist/rehabilitation/PatientRehabilitationManageController.java

@ -188,7 +188,7 @@ public class PatientRehabilitationManageController extends BaseController {
                                  @RequestParam(value = "planDetailIds", required = true)String planDetailIds){
        try {
            JSONArray result = rehabilitationManageService.serviceItemList(planDetailIds);
            JSONArray result = rehabilitationManageService.serviceItemList(planDetailIds,null);
            return write(200, "获取成功", "data", result);
        } catch (Exception e) {
            error(e);
@ -203,7 +203,7 @@ public class PatientRehabilitationManageController extends BaseController {
                              @RequestParam(value = "planDetailId", required = true)String planDetailId){
        try {
            JSONObject result = rehabilitationManageService.serviceItem(planDetailId);
            JSONObject result = rehabilitationManageService.serviceItem(planDetailId,null);
            return write(200, "获取成功", "data", result);
        } catch (Exception e) {
            error(e);