Преглед изворни кода

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

# Conflicts:
#	patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/synergy/SynergyManagerController.java
wangzhinan пре 6 година
родитељ
комит
586e60a579

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

@ -279,6 +279,7 @@ public class MessageService extends BaseService {
            specialistMesJson.put("amount", 0);
        }
        //系统服务
        List<Message> synergyList = new ArrayList<>();
        synergyList = messageDao.getSynergyService(doctor);
        JSONObject synergyMesJson = new JSONObject();
@ -287,7 +288,7 @@ public class MessageService extends BaseService {
            JSONObject  synergyJson = new JSONObject();
            synergyJson.put("title", synergyList.get(0).getTitle());
            synergyJson.put("type", synergyList.get(0).getType());
            synergyJson.put("msg", "您有"+synergyList.size()+"个专科服务消息,请查看!");
            synergyJson.put("msg", "您有"+synergyList.size()+"个协同服务消息,请查看!");
            synergyJson.put("msgTime", DateUtil.dateToStrLong(synergyList.get(0).getCreateTime()));
            synergyMesJson.put("lastMessage", synergyJson);
        }else{

+ 41 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/synergy/SynergyManagerController.java

@ -6,9 +6,11 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.yihu.es.entity.FollowupContentESDO;
import com.yihu.wlyy.aop.ObserverRequired;
import com.yihu.wlyy.entity.message.Message;
import com.yihu.wlyy.service.app.followup.FollowUpService;
import com.yihu.wlyy.service.app.followup.FollowupDrugsService;
import com.yihu.wlyy.service.app.survey.SurveyScreenResultService;
import com.yihu.wlyy.service.specialist.SpecialistEvaluateSevice;
import com.yihu.wlyy.service.survey.ManagerQuestionnaireService;
import com.yihu.wlyy.service.third.jw.ZyDictService;
import com.yihu.wlyy.web.BaseController;
@ -43,6 +45,8 @@ public class SynergyManagerController extends BaseController{
    private ZyDictService zyDictService;
    @Autowired
    private FollowupDrugsService followupDrugsService;
    @Autowired
    private SpecialistEvaluateSevice specialistEvaluateSevice;
    @ApiOperation("新增临时随访记录(返回ID)")
    @RequestMapping(value = "/addFollowup", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
@ -279,4 +283,41 @@ public class SynergyManagerController extends BaseController{
        }
    }
    /**
     * 发送消息 type:19 受理提醒,20 待办工作提醒 21 服务进展提醒-已完成 22 服务进展提醒-未完成
     *  message{sender:"",receiver:"",relationCode:""}
     * @param message
     * @param hospital
     * @param patient
     * @param time
     * @return
     */
    @RequestMapping(value = "sendMessage", method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation("发送消息")
    public String sendMessage(@ApiParam(name = "message",value = "消息对象(如:{'sender':'','receiver':'','relationCode':'','type':19})",required = true)
                              @RequestParam(value = "message",required = true)String message,
                              @ApiParam(name = "hospital",value = "医院code",required = false)
                              @RequestParam(value = "hospital",required = false)String hospital,
                              @ApiParam(name = "patient",value = "居民code",required = true)
                              @RequestParam(value = "patient",required = true)String patient,
                              @ApiParam(name = "time",value = "时间",required = false)
                              @RequestParam(value = "time",required = false)Integer time,
                              @ApiParam(name = "jsonObject",value = "参数",required = false)
                              @RequestParam(value = "jsonObject",required = false) String jsonObject){
        try {
            com.alibaba.fastjson.JSONObject object = com.alibaba.fastjson.JSONObject.parseObject(message);
            Message message1 = new Message();
            message1.setSender(object.getString("sender"));
            message1.setType(object.getInteger("type"));
            message1.setReceiver(object.getString("receiver"));
            message1.setRelationCode(object.getString("relationCode"));
            com.alibaba.fastjson.JSONObject jsonObject1 = com.alibaba.fastjson.JSONObject.parseObject(jsonObject);
            return write(200, "获取消息成功!","data",specialistEvaluateSevice.sendMessage(message1,hospital,patient,time,jsonObject1));
        } catch (Exception e) {
            error(e);
            return error(-1, "获取消息失败!");
        }
    }
}