Bladeren bron

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

wangzhinan 3 jaren geleden
bovenliggende
commit
56b439d78b
24 gewijzigde bestanden met toevoegingen van 156 en 35 verwijderingen
  1. 2 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/apply/PatientBedApplyEndPoint.java
  2. 2 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/assistance/EmergencyAssistanceEndpoint.java
  3. 7 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/consult/PatientConsultEndpoint.java
  4. 2 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/consult/WxPushEndpoint.java
  5. 4 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/course/DoctorCourseEndpoint.java
  6. 4 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/course/NurseryLogEndpoint.java
  7. 4 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/course/PatientCourseEndpoint.java
  8. 3 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/course/RecruitStudentsEndpoint.java
  9. 7 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/family/FamilyMemberEndpoint.java
  10. 6 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/file_upload/FileUploadEndpoint.java
  11. 3 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/lifeCare/PadLifeCareEndpoint.java
  12. 3 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/lifeCare/PatientLifeCareEndpoint.java
  13. 2 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/message/DoctorMessageEndpoint.java
  14. 4 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/message/PatientMessageEndpoint.java
  15. 3 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/patient/PatientContactsEndpoint.java
  16. 6 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/patient/PatientEndpoint.java
  17. 7 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/patient/PayEndpoint.java
  18. 1 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/security/SecurityMonitoringOrderEndpoint.java
  19. 3 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/third/PrivateDictEndpoint.java
  20. 2 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/third/assistance/EmeAsEndpoint.java
  21. 5 3
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/version/VersionEndpoint.java
  22. 12 3
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/statistics/DetectionPlatformService.java
  23. 39 6
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/statistics/StatisticsService.java
  24. 25 23
      svr/svr-cloud-device/src/main/java/com/yihu/jw/care/service/OnenetService.java

+ 2 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/apply/PatientBedApplyEndPoint.java

@ -1,6 +1,7 @@
package com.yihu.jw.care.endpoint.apply;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.care.aop.ObserverRequired;
import com.yihu.jw.care.service.apply.PatientBedApplyService;
import com.yihu.jw.restmodel.ResponseContant;
import com.yihu.jw.restmodel.web.ListEnvelop;
@ -25,6 +26,7 @@ public class PatientBedApplyEndPoint extends EnvelopRestEndpoint {
    @PostMapping("/apply")
    @ApiOperation("居民申请机构床位")
    @ObserverRequired
    public ObjEnvelop apply(@ApiParam(name = "idcard", value = "居民idcard", required = true)
                            @RequestParam(value = "idcard") String idcard,
                            @ApiParam(name = "orgCode", value = "机构code", required = true)

+ 2 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/assistance/EmergencyAssistanceEndpoint.java

@ -29,6 +29,7 @@ public class EmergencyAssistanceEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = "newOrder")
    @ApiOperation(value = "居民发起新的紧急救助")
    @ServicesAuth(item = "emergencyAssistance")
    @ObserverRequired
    public ObjEnvelop newOrder(@ApiParam(name="patientId",value = "居民id")
                               @RequestParam(value = "patientId") String patientId,
                               @ApiParam(name="jsonData",value = "创建工单json")
@ -173,6 +174,7 @@ public class EmergencyAssistanceEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = "cancelOrder")
    @ApiOperation(value = "居民取消救助工单")
    @ObserverRequired
    public ObjEnvelop cancelOrder(@ApiParam(name="patient",value = "患者")
                                       @RequestParam(value = "patient") String patient,
                                       @ApiParam(name="orderId",value = "工单id")

+ 7 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/consult/PatientConsultEndpoint.java

@ -2,6 +2,7 @@ package com.yihu.jw.care.endpoint.consult;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.care.aop.ObserverRequired;
import com.yihu.jw.care.service.consult.ConsultService;
import com.yihu.jw.care.service.message.BaseServiceNewsService;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
@ -147,6 +148,7 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
	@PostMapping(value = "addOnlineConsult")
	@ApiOperation(value = "新增在线咨询")
	@ObserverRequired
	public Envelop addOnlineConsult(
			@ApiParam(name = "patient", value = "居民CODE")
			@RequestParam(value = "patient",required = true) String patient,
@ -274,6 +276,7 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
	@PostMapping(value = "finish")
	@ApiOperation(value = "居民结束咨询", notes = "居民结束咨询")
	@ObserverRequired
	public Envelop finish(
			@ApiParam(name = "consult", value = "咨询CODE")
			@RequestParam(value = "consult",required = false) String consult,
@ -310,6 +313,7 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
	@PostMapping(value = "append")
	@ApiOperation(value = "居民咨询发消息(追问接口)")
	@ObserverRequired
	public ListEnvelop append(
			@ApiParam(name = "consult", value = "咨询CODE")
			@RequestParam(value = "consult",required = true) String consult,
@ -389,6 +393,7 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
	
	@PostMapping(value = BaseHospitalRequestMapping.PatientIM.getSign)
	@ApiOperation(value = "获取微信签名", notes = "获取微信签名")
	@ObserverRequired
	public Envelop getSign(@ApiParam(name = "pageUrl", value = "授权页面")
	                       @RequestParam(value = "pageUrl", required = true)String pageUrl,
	                       @ApiParam(name = "wxId", value = "微信id")
@ -448,6 +453,7 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
	@PostMapping(value = BaseHospitalRequestMapping.PatientIM.updateConsultParticipant)
	@ApiOperation(value = "更新会话成员(新增或删除)", notes = "更新会话成员(新增或删除)")
	@ObserverRequired
	public Envelop updateConsultParticipant(@ApiParam(name = "sessionid", value = "会话ID", defaultValue = "1")
	                                       @RequestParam(value = "sessionid", required = true) String sessionid,
	                                       @ApiParam(name = "userid", value = "新增成员ID,多个以英文逗号隔开", defaultValue = "1")
@ -464,6 +470,7 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
	
	@PostMapping(value = "messageAppend")
	@ApiOperation(value = "居民单聊会话发送消息", notes = "居民单聊会话发送消息")
	@ObserverRequired
	public Envelop messageAppend(
			@ApiParam(name = "sender_id", value = "发送者id", defaultValue = "")
			@RequestParam(value = "sender_id", required = true) String sender_id,

+ 2 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/consult/WxPushEndpoint.java

@ -1,5 +1,6 @@
package com.yihu.jw.care.endpoint.consult;
import com.yihu.jw.care.aop.ObserverRequired;
import com.yihu.jw.care.service.consult.WxPushService;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
@ -29,6 +30,7 @@ public class WxPushEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = "sendWXTemplate")
    @ApiOperation(value = "发送微信模板消息")
    @ObserverRequired
    public Envelop sendWXTemplate(
            @ApiParam(name = "userName", value = "推送人姓名")
            @RequestParam(value = "userName", required = true) String userName,

+ 4 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/course/DoctorCourseEndpoint.java

@ -1,6 +1,7 @@
package com.yihu.jw.care.endpoint.course;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.care.aop.ObserverRequired;
import com.yihu.jw.care.service.course.CourseService;
import com.yihu.jw.entity.care.course.CourseDO;
import com.yihu.jw.restmodel.ResponseContant;
@ -70,6 +71,7 @@ public class DoctorCourseEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = "addCourse")
    @ApiOperation(value = "新增课程")
    @ObserverRequired
    public ObjEnvelop addCourse(
            @ApiParam(name = "doctorId", value = "doctorId") @RequestParam(value = "doctorId", required = true) String doctorId,
            @ApiParam(name = "jsonData", value = "jsonData") @RequestParam(value = "jsonData", required = true) String jsonData) {
@ -86,6 +88,7 @@ public class DoctorCourseEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = "startLiveCourse")
    @ApiOperation(value = "开启直播课程")
    @ObserverRequired
    public Envelop startLiveCourse(
            @ApiParam(name = "id", value = "id")
            @RequestParam(value = "id", required = true) String id) {
@ -99,6 +102,7 @@ public class DoctorCourseEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = "endLiveCourse")
    @ApiOperation(value = "结束直播课程")
    @ObserverRequired
    public Envelop endLiveCourse(
            @ApiParam(name = "id", value = "id")
            @RequestParam(value = "id", required = true) String id) {

+ 4 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/course/NurseryLogEndpoint.java

@ -1,5 +1,6 @@
package com.yihu.jw.care.endpoint.course;
import com.yihu.jw.care.aop.ObserverRequired;
import com.yihu.jw.care.service.course.NurseryLogService;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
@ -72,6 +73,7 @@ public class NurseryLogEndpoint extends EnvelopRestEndpoint {
    @PostMapping("addNurseryLog")
    @ApiOperation(value = "新增托育日志")
    @ObserverRequired
    public Envelop addNurseryLog(
            @ApiParam(name = "patient", value = "居民id") @RequestParam(value = "patient", required = true) String patient,
            @ApiParam(name = "patientName", value = "居民姓名") @RequestParam(value = "patientName", required = true) String patientName,
@ -89,6 +91,7 @@ public class NurseryLogEndpoint extends EnvelopRestEndpoint {
    @PostMapping("addCourseRecord")
    @ApiOperation(value = "新增课程记录")
    @ObserverRequired
    public Envelop addCourseRecord(
            @ApiParam(name = "id", value = "托育日志id") @RequestParam(value = "id", required = true) String id,
            @ApiParam(name = "content", value = "课程记录内容") @RequestParam(value = "content", required = true) String content,
@ -102,6 +105,7 @@ public class NurseryLogEndpoint extends EnvelopRestEndpoint {
    @PostMapping("addDietRecord")
    @ApiOperation(value = "新增饮食记录")
    @ObserverRequired
    public Envelop addDietRecord(
            @ApiParam(name = "id", value = "托育日志id") @RequestParam(value = "id", required = true) String id,
            @ApiParam(name = "eatFood", value = "食用食物") @RequestParam(value = "eatFood", required = true) String eatFood,

+ 4 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/course/PatientCourseEndpoint.java

@ -1,6 +1,7 @@
package com.yihu.jw.care.endpoint.course;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.care.aop.ObserverRequired;
import com.yihu.jw.care.service.course.CourseService;
import com.yihu.jw.restmodel.ResponseContant;
import com.yihu.jw.restmodel.web.Envelop;
@ -80,6 +81,7 @@ public class PatientCourseEndpoint extends EnvelopRestEndpoint {
    @PostMapping("cancalOrder")
    @ApiOperation(value = "取消订单")
    @ObserverRequired
    public Envelop cancalOrder(
            @ApiParam(name = "type", value = "订单类型") @RequestParam(value = "type", required = true) String type,
            @ApiParam(name = "id", value = "订单id") @RequestParam(value = "id", required = true) String id) {
@ -249,6 +251,7 @@ public class PatientCourseEndpoint extends EnvelopRestEndpoint {
    @PostMapping("enrollment")
    @ApiOperation(value = "招生报名")
    @ObserverRequired
    public Envelop enrollment(@ApiParam(name = "patient", value = "居民id", defaultValue = "3ae2673512154d5280d1dcf5ffa5626d")
                              @RequestParam(value = "patient", required = true) String patient,
                              @ApiParam(name = "recruitStudentsId", value = "招生id", defaultValue = "1")
@ -267,6 +270,7 @@ public class PatientCourseEndpoint extends EnvelopRestEndpoint {
    //购买课程
    @PostMapping("buyCourseOrder")
    @ApiOperation(value = "在线报名-购买课程")
    @ObserverRequired
    public Envelop buyCourseOrder(
            @ApiParam(name = "patient", value = "居民id", defaultValue = "3ae2673512154d5280d1dcf5ffa5626d") @RequestParam(value = "patient", required = true) String patient,
            @ApiParam(name = "patientName", value = "居民name", defaultValue = "白海灵") @RequestParam(value = "patientName", required = true) String patientName,

+ 3 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/course/RecruitStudentsEndpoint.java

@ -1,6 +1,7 @@
package com.yihu.jw.care.endpoint.course;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.care.aop.ObserverRequired;
import com.yihu.jw.care.service.course.RecruitStudentService;
import com.yihu.jw.restmodel.ResponseContant;
import com.yihu.jw.restmodel.web.Envelop;
@ -78,6 +79,7 @@ public class RecruitStudentsEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = "admission")
    @ApiOperation(value = "录取")
    @ObserverRequired
    public Envelop admission(
            @ApiParam(name = "id", value = "id", required = true)
            @RequestParam(value = "id") String id) {
@ -96,6 +98,7 @@ public class RecruitStudentsEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = "refuse")
    @ApiOperation(value = "拒绝")
    @ObserverRequired
    public Envelop refuse(
            @ApiParam(name = "id", value = "id", required = true)
            @RequestParam(value = "id") String id) {

+ 7 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/family/FamilyMemberEndpoint.java

@ -2,6 +2,7 @@ package com.yihu.jw.care.endpoint.family;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.care.aop.ObserverRequired;
import com.yihu.jw.care.dao.family.PatientFamilyMemberDao;
import com.yihu.jw.care.service.family.PatientFamilyMemberService;
import com.yihu.jw.entity.base.patient.BasePatientDO;
@ -44,6 +45,7 @@ public class FamilyMemberEndpoint extends EnvelopRestEndpoint {
     */
    @RequestMapping(value = "/member_add", method = RequestMethod.POST)
    @ApiOperation(value = "添加成员")
    @ObserverRequired
    public Envelop addFamilyMember(@RequestParam("member") String member,
                                   @RequestParam(value = "captcha", required = false) String captcha,
                                   @RequestParam(value = "password", required = false) String password,
@ -95,6 +97,7 @@ public class FamilyMemberEndpoint extends EnvelopRestEndpoint {
     */
    @RequestMapping(value = "/relation_update", method = RequestMethod.POST)
    @ApiOperation(value = "家庭成员关系修改")
    @ObserverRequired
    public Envelop modifyFamilyRelation(@RequestParam("member") String member, @RequestParam("relation") int relation) {
        try {
            if (StringUtils.isEmpty(member)) {
@ -133,6 +136,7 @@ public class FamilyMemberEndpoint extends EnvelopRestEndpoint {
     */
    @RequestMapping(value = "/member_delete", method = RequestMethod.POST)
    @ApiOperation(value = "家庭成员删除")
    @ObserverRequired
    public Envelop deleteMember(@RequestParam("member") String member) {
        try {
            if (StringUtils.isEmpty(member)) {
@ -153,6 +157,7 @@ public class FamilyMemberEndpoint extends EnvelopRestEndpoint {
    @RequestMapping(value = "/member_authorize", method = RequestMethod.POST)
    @ApiOperation(value = "家庭成员授权--已废弃不需要做授权操作")
    @ObserverRequired
    public Envelop authorizeMember(@ApiParam(name = "familyMember", value = "家人code", defaultValue ="1555c32c626343e7aaa62e9cf76c97f2")
                                  @RequestParam(value = "familyMember", required = true) String familyMember,
                                  @ApiParam(name = "isAuthorize", value = "是否授权(0:未授权,1:已授权)", defaultValue ="1")
@ -304,6 +309,7 @@ public class FamilyMemberEndpoint extends EnvelopRestEndpoint {
    @RequestMapping(value = "/addMemberByPw", method = RequestMethod.POST)
    @ApiOperation(value = "通过登录验证新增家庭成员")
    @ObserverRequired
    public Envelop addMemberByPw(@RequestParam("member") String member,
                                @RequestParam("password")String password,
                                @RequestParam("relation")int relation){
@ -341,6 +347,7 @@ public class FamilyMemberEndpoint extends EnvelopRestEndpoint {
    @RequestMapping(value = "/addMemberByCaptcha", method = RequestMethod.POST)
    @ApiOperation(value = "通过手机验证码新增家庭成员")
    @ObserverRequired
    public Envelop addMemberByCaptcha(@RequestParam("idcard") String idcard,
                                      @RequestParam("name") String name,
                                      @RequestParam("mobile") String mobile,

+ 6 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/file_upload/FileUploadEndpoint.java

@ -3,6 +3,7 @@ package com.yihu.jw.care.endpoint.file_upload;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.jw.care.aop.ObserverRequired;
import com.yihu.jw.file_upload.FileManageService;
import com.yihu.jw.file_upload.FileUploadService;
import com.yihu.jw.restmodel.MutilFileInfo;
@ -57,6 +58,7 @@ public class FileUploadEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = BaseRequestMapping.FileUpload.UPLOAD_STREAM_IMG)
    @ApiOperation(value = "文件流上传图片", notes = "文件流上传图片")
    @ObserverRequired
    public ObjEnvelop<UploadVO> uploadImg(@ApiParam(value = "文件", required = true)
                                       @RequestParam(value = "file", required = true) MultipartFile file) throws Exception{
        UploadVO uploadVO = new UploadVO();
@ -82,6 +84,7 @@ public class FileUploadEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = BaseRequestMapping.FileUpload.UPLOAD_STREAM_ATTACHMENT)
    @ApiOperation(value = "文件流上传附件", notes = "文件流上传附件")
    @ObserverRequired
    public ObjEnvelop<UploadVO> uploadAttachment(@ApiParam(value = "文件", required = true)
                                       @RequestParam(value = "file", required = true) MultipartFile file) throws Exception{
        UploadVO uploadVO = new UploadVO();
@ -105,6 +108,7 @@ public class FileUploadEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = BaseRequestMapping.FileUpload.UPLOAD_STREAM)
    @ApiOperation(value = "文件流上传文件", notes = "文件流上传文件")
    @ObserverRequired
    public ObjEnvelop<UploadVO> uploadStream(@ApiParam(value = "文件", required = true)
                                                 @RequestParam(value = "file", required = true) MultipartFile file,
                                             @ApiParam(value = "文件", required = true)
@ -136,6 +140,7 @@ public class FileUploadEndpoint extends EnvelopRestEndpoint {
    }
    @PostMapping(value = BaseRequestMapping.FileUpload.UPLOAD_STREAM_video)
    @ApiOperation(value = "文件流上传文件", notes = "文件流上传文件")
    @ObserverRequired
    public ObjEnvelop<UploadVO> uploadStreamVideo(@ApiParam(value = "文件", required = true)
                                             @RequestParam(value = "file", required = true) MultipartFile file,
                                                  @ApiParam(value = "文件", required = false)
@ -197,6 +202,7 @@ public class FileUploadEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = BaseRequestMapping.FileUpload.UPLOAD_STRING)
    @ApiOperation(value = "base64上传图片",notes = "base64上传图片")
    @ObserverRequired
    public ObjEnvelop<UploadVO> uploadImages(@ApiParam(name = "jsonData", value = "头像转化后的输入流")
                                             @RequestParam(value = "jsonData", required = true) String jsonData) throws Exception {

+ 3 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/lifeCare/PadLifeCareEndpoint.java

@ -1,6 +1,7 @@
package com.yihu.jw.care.endpoint.lifeCare;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.care.aop.ObserverRequired;
import com.yihu.jw.care.service.lifeCare.LifeCareOrderService;
import com.yihu.jw.entity.care.lifeCare.LifeCareOrderDO;
import com.yihu.jw.restmodel.ResponseContant;
@ -33,6 +34,7 @@ public class PadLifeCareEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = "create")
    @ApiOperation(value = "申请生活照料")
    @ObserverRequired
    public Envelop create(@ApiParam(name = "jsonData", value = "Json数据", required = true) @RequestParam String jsonData) {
        JSONObject result = new JSONObject();
        try{
@ -48,6 +50,7 @@ public class PadLifeCareEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = "cancelOrder")
    @ApiOperation(value = "取消工单")
    @ObserverRequired
    public Envelop cancelOrder(
            @ApiParam(name = "orderId", value = "工单id") @RequestParam(value = "orderId", required = true) String orderId,
            @ApiParam(name = "reason", value = "取消理由") @RequestParam(value = "reason", required = true) String reason) {

+ 3 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/lifeCare/PatientLifeCareEndpoint.java

@ -1,6 +1,7 @@
package com.yihu.jw.care.endpoint.lifeCare;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.care.aop.ObserverRequired;
import com.yihu.jw.care.service.lifeCare.LifeCareOrderService;
import com.yihu.jw.entity.care.lifeCare.LifeCareOrderDO;
import com.yihu.jw.restmodel.ResponseContant;
@ -30,6 +31,7 @@ public class PatientLifeCareEndpoint  extends EnvelopRestEndpoint {
    @PostMapping(value = "create")
    @ApiOperation(value = "申请生活照料")
    @ObserverRequired
    public Envelop create(@ApiParam(name = "jsonData", value = "Json数据", required = true) @RequestParam String jsonData) {
        JSONObject result = new JSONObject();
        try{
@ -45,6 +47,7 @@ public class PatientLifeCareEndpoint  extends EnvelopRestEndpoint {
    @PostMapping(value = "cancelOrder")
    @ApiOperation(value = "取消工单")
    @ObserverRequired
    public Envelop cancelOrder(
            @ApiParam(name = "orderId", value = "工单id") @RequestParam(value = "orderId", required = true) String orderId,
            @ApiParam(name = "reason", value = "取消理由") @RequestParam(value = "reason", required = true) String reason) {

+ 2 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/message/DoctorMessageEndpoint.java

@ -60,6 +60,7 @@ public class DoctorMessageEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = "getOrgNoticeList")
    @ApiOperation("获取机构通知消息")
    @ObserverRequired
    public PageEnvelop getOrgNoticeList(@ApiParam(name = "orgCode", value = "机构code")
                                       @RequestParam(value = "orgCode", required = true) String orgCode,
                                        @ApiParam(name = "createUser", value = "通知创建者")
@ -81,6 +82,7 @@ public class DoctorMessageEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = "orgNoticeDetail")
    @ApiOperation("获取机构通知消息详情")
    @ObserverRequired
    public ObjEnvelop orgNoticeDetail(@ApiParam(name = "noticeId", value = "通知id")
                                   @RequestParam(value = "noticeId", required = false) String noticeId){
        try {

+ 4 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/message/PatientMessageEndpoint.java

@ -1,5 +1,6 @@
package com.yihu.jw.care.endpoint.message;
import com.yihu.jw.care.aop.ObserverRequired;
import com.yihu.jw.care.service.message.PatientMessageService;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
@ -27,6 +28,7 @@ public class PatientMessageEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = "getNoticeList")
    @ApiOperation("获取患者机构通知消息")
    @ObserverRequired
    public PageEnvelop getNoticeList(@ApiParam(name = "patient", value = "患者id")
                                        @RequestParam(value = "patient", required = true) String patient,
                                        @ApiParam(name = "beginTime", value = "提醒开始时间")
@ -46,6 +48,7 @@ public class PatientMessageEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = "orgNoticeDetail")
    @ApiOperation("获取机构通知消息详情")
    @ObserverRequired
    public ObjEnvelop orgNoticeDetail(@ApiParam(name = "noticeId", value = "通知id")
                                      @RequestParam(value = "noticeId", required = false) String noticeId,
                                      @ApiParam(name = "patient", value = "patient")
@ -102,6 +105,7 @@ public class PatientMessageEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = "/updateMessageRead")
    @ApiOperation("已读消息")
    @ObserverRequired
    public Envelop updateMessageRead(@ApiParam(name = "messageId",required = true)
                                         @RequestParam(value = "messageId")String messageId){
        try {

+ 3 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/patient/PatientContactsEndpoint.java

@ -1,6 +1,7 @@
package com.yihu.jw.care.endpoint.patient;
import com.alibaba.fastjson.JSONArray;
import com.yihu.jw.care.aop.ObserverRequired;
import com.yihu.jw.care.service.contacts.ContactsService;
import com.yihu.jw.entity.base.org.BaseOrgDO;
import com.yihu.jw.restmodel.web.Envelop;
@ -58,6 +59,7 @@ public class PatientContactsEndpoint extends EnvelopRestEndpoint {
     */
    @RequestMapping(value = "setPatientContacts", method = RequestMethod.POST)
    @ApiOperation(value = "设置一键联系人--未使用")
    @ObserverRequired
    public Envelop setPatientContacts(@RequestParam(required = true) String patient,
                                      @RequestParam(required = true) String fid) {
        try {
@ -93,6 +95,7 @@ public class PatientContactsEndpoint extends EnvelopRestEndpoint {
     */
    @RequestMapping(value = "setContactsOrg", method = RequestMethod.POST)
    @ApiOperation(value = "设置居民联系服务站")
    @ObserverRequired
    public Envelop setContactsOrg(@RequestParam(required = true) String patient,
                                      @RequestParam(required = true) String orgCode) {
        try {

+ 6 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/patient/PatientEndpoint.java

@ -172,6 +172,7 @@ public class PatientEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = "updLatLon")
    @ApiOperation(value = "修改居民经纬度信息")
    @ObserverRequired
    public Envelop updLatLon(@ApiParam(name = "latLon", value = "经纬度24.48923061,118.10388605")
                              @RequestParam(value = "latLon", required = true)String latLon,
                              @ApiParam(name = "patientId", value = "居民id")
@ -186,6 +187,7 @@ public class PatientEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = "updPatient")
    @ApiOperation(value = "修改居民信息")
    @ObserverRequired
    public Envelop updPatient(@ApiParam(name = "jsonData", value = "json格式")
                                  @RequestParam(value = "jsonData", required = true)String jsonData,
                                  @ApiParam(name = "doctorId", value = "医生id")
@ -230,6 +232,7 @@ public class PatientEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = "updOnline")
    @ApiOperation(value = "更新在线状态")
    @ObserverRequired
    public Envelop updOnline(@ApiParam(name = "patientId", value = "居民id")
                                 @RequestParam(value = "patientId", required = true)String patientId,
                             @ApiParam(name = "online", value = "在线状态 1在线 0离线")
@ -261,6 +264,7 @@ public class PatientEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = BaseRequestMapping.BasePatient.updatePatientPw)
    @ApiOperation(value = "修改居民账号密码")
    @ObserverRequired
    public Envelop updateDoctorPw(@ApiParam(name = "id", value = "居民ID")
                                  @RequestParam(value = "id", required = true)String id,
                                  @ApiParam(name = "pw", value = "密码")
@ -323,6 +327,7 @@ public class PatientEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = "deleteUser")
    @ApiOperation("注销账号")
    @ObserverRequired
    public Envelop deleteUser(@ApiParam(name="patient",required = true)
                                 @RequestParam(value = "patient")String patient){
        try {
@ -338,6 +343,7 @@ public class PatientEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = "registerForFamily")
    @ApiOperation("注册账号--绑定家人不存在时注册")
    @ObserverRequired
    public ObjEnvelop registerForFamily(
            @ApiParam(name="archiveType")@RequestParam(value = "archiveType")Integer archiveType,
            @ApiParam(name="idcard")@RequestParam(value = "idcard")String idcard,

+ 7 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/patient/PayEndpoint.java

@ -2,6 +2,7 @@ package com.yihu.jw.care.endpoint.patient;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.care.aop.ObserverRequired;
import com.yihu.jw.care.exception.BusinessException;
import com.yihu.jw.care.service.doorCoach.PatientDoorCoachOrderService;
import com.yihu.jw.care.service.pay.PayService;
@ -106,6 +107,7 @@ public class PayEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = "cancleOrder")
    @ApiOperation(value = "取消订单")
    @ObserverRequired
    public Envelop cancleOrder(
            @ApiParam(name = "id", value = "订单id")
            @RequestParam(value = "id", required = true) Integer id) {
@ -156,6 +158,7 @@ public class PayEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = "wxWapPay")
    @ApiOperation(value = "微信wap支付")
    @ObserverRequired
    public ObjEnvelop wxWapPay(
            @ApiParam(name = "relationId", value = "业务id,如生活照料id 上面辅导id")
            @RequestParam(value = "relationId", required = false) String relationId,
@ -170,6 +173,7 @@ public class PayEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = "applyRefund")
    @ApiOperation(value = "申请退款")
    @ObserverRequired
    public Envelop applyRefund(
            @ApiParam(name = "description", value = "退款说明")
            @RequestParam(value = "description", required = true) String description,
@ -190,6 +194,7 @@ public class PayEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = "wxNativePay")
    @ApiOperation(value = "微信native支付")
    @ObserverRequired
    public ObjEnvelop wxNativePay(
            @ApiParam(name = "relationId", value = "业务id,如生活照料id 上门辅导id")
            @RequestParam(value = "relationId", required = false) String relationId,
@ -211,6 +216,7 @@ public class PayEndpoint extends EnvelopRestEndpoint {
    @ResponseBody
    @PostMapping("open/wxPayNotify")
    @ApiOperation(value = "微信wap支付回调")
    @ObserverRequired
    public String payNotify(HttpServletRequest request) {
        log.info("【微信支付】回调通知");
        try {
@ -271,6 +277,7 @@ public class PayEndpoint extends EnvelopRestEndpoint {
    @ResponseBody
    @PostMapping("open/wxRefundNotify")
    @ApiOperation(value = "微信支付退款回调")
    @ObserverRequired
    public String wxRefundNotify(HttpServletRequest request) {
        log.info("【微信支付退款】回调通知");
        try {

+ 1 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/security/SecurityMonitoringOrderEndpoint.java

@ -136,6 +136,7 @@ public class SecurityMonitoringOrderEndpoint extends EnvelopRestEndpoint {
    @PostMapping("errorWarning")
    @ApiOperation(value = "误报警")
    @ObserverRequired
    public ObjEnvelop errorWarning(@ApiParam(value = "工单id", name = "orderId", required = true)
                                   @RequestParam(value = "orderId") String orderId,
                                   @ApiParam(value = "误报警类型 字典emergency_cancel的code", name = "emergencyCancel", required = true)

+ 3 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/third/PrivateDictEndpoint.java

@ -1,5 +1,6 @@
package com.yihu.jw.care.endpoint.third;
import com.yihu.jw.care.aop.ObserverRequired;
import com.yihu.jw.dict.service.PrivateDictService;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
@ -25,6 +26,7 @@ public class PrivateDictEndpoint extends EnvelopRestEndpoint {
    @ApiOperation("查询隐私策略")
    @PostMapping(value= "/findPrivateDictEy")
    @ObserverRequired
    public Envelop findPrivateDict(@ApiParam(name = "dictCode", value = "隐私code")
                                   @RequestParam(value = "dictCode", required = false) String dictCode,
                                   @ApiParam(name = "hospitalCode", value = "")
@ -38,6 +40,7 @@ public class PrivateDictEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value= "/savePrivateDictEy")
    @ApiOperation("更新/新增隐私策略")
    @ObserverRequired
    public MixEnvelop savePrivateDict(
            @ApiParam(name = "id", value = "id", required = true)
            @RequestParam(value = "id", required = true)String id,

+ 2 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/third/assistance/EmeAsEndpoint.java

@ -1,6 +1,7 @@
package com.yihu.jw.care.endpoint.third.assistance;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.care.aop.ObserverRequired;
import com.yihu.jw.care.aop.ServicesAuth;
import com.yihu.jw.care.service.assistance.EmergencyAssistanceService;
import com.yihu.jw.restmodel.ResponseContant;
@ -26,6 +27,7 @@ public class EmeAsEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = "newOrder")
    @ApiOperation(value = "居民发起新的紧急救助")
    @ServicesAuth(item = "emergencyAssistance")
    @ObserverRequired
    public ObjEnvelop newOrder(@ApiParam(name="patientId",value = "居民id")
                               @RequestParam(value = "patientId") String patientId,
                               @ApiParam(name="jsonData",value = "创建工单json")

+ 5 - 3
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/version/VersionEndpoint.java

@ -31,14 +31,16 @@ public class VersionEndpoint extends EnvelopRestEndpoint {
     */
    @GetMapping(value = BaseHospitalRequestMapping.Version.app)
    @ApiOperation(value = "app升级")
    public Envelop appVersion(String code, double version) {
    public Envelop appVersion(String code, String version) {
            AppVersionDO temp = versionsService.findVersionByCode(code);
            if (temp == null) {
                return Envelop.getError( "无效的APP类型失败!");
            }
            if (version > 0) {
                if (temp.getVersionInt() > version) {
            Integer versions = Integer.parseInt(version.replace(".","0"));
            if (versions > 0) {
                Integer versionsNew = Integer.parseInt(temp.getVersionStr().replace(".","0"));
                if (versionsNew > versions) {
                    // 有新的版本号
                    return success("发现新版本!", temp.getUrl());
                } else {

+ 12 - 3
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/statistics/DetectionPlatformService.java

@ -90,6 +90,15 @@ public class DetectionPlatformService  {
    }
    public JSONObject getDeviceComapny(){
        String filter = "";
        String sqltmp = "SELECT GROUP_CONCAT(dict_code) orgCodes from wlyy_hospital_sys_dict WHERE dict_name = 'jkzl_child' or dict_name = 'jkzl_older' ";
        List<Map<String,Object>> listtmp =  jdbcTemplate.queryForList(sqltmp);
        if(listtmp.size()>0){
            String orgCodes = String.valueOf(listtmp.get(0).get("orgCodes"));
            orgCodes = orgCodes.replaceAll(",","','");
            filter = " not in ('"+orgCodes+"')";
        }
        JSONObject object = new JSONObject();
        String deviceTypeSum = "SELECT * FROM wlyy_devices WHERE device_name IS NOT NULL AND device_name != '' GROUP BY device_name";
        List<Map<String , Object>> deviceList = jdbcTemplate.queryForList(deviceTypeSum);
@ -107,7 +116,7 @@ public class DetectionPlatformService  {
        }
        String securitySql = "SELECT allCount,isUse,(allCount - isUse) inventory FROM \n" +
                "(SELECT COUNT(1) allCount FROM wlyy_devices WHERE device_type = 1) allCount,\n" +
                "(SELECT COUNT(pd.id) isUse FROM wlyy_devices d,wlyy_patient_device pd WHERE d.device_type = 1 AND d.device_code = pd.device_sn AND pd.del = 0) isUse";
                "(SELECT COUNT(DISTINCT pd.device_sn) isUse FROM wlyy_devices d,wlyy_patient_device pd WHERE d.device_type = 1 AND d.device_code = pd.device_sn and pd.user "+filter+" AND pd.del = 0) isUse";
        List<Map<String , Object>> securityList = jdbcTemplate.queryForList(securitySql);
        if (securityList.size() > 0) {
            object.put("securityAllCount",securityList.get(0).get("allCount")); //安防设备总量
@ -120,7 +129,7 @@ public class DetectionPlatformService  {
        }
        String healthSql = "SELECT allCount,isUse,(allCount - isUse) inventory FROM \n" +
                "(SELECT COUNT(1) allCount FROM wlyy_devices WHERE device_type = 0) allCount,\n" +
                "(SELECT COUNT(pd.id) isUse FROM wlyy_devices d,wlyy_patient_device pd WHERE d.device_type = 0 AND d.device_code = pd.device_sn AND pd.del = 0) isUse";
                "(SELECT COUNT(DISTINCT pd.device_sn) isUse FROM wlyy_devices d,wlyy_patient_device pd WHERE d.device_type = 0 AND d.device_code = pd.device_sn and pd.user "+filter+" AND pd.del = 0) isUse";
        List<Map<String , Object>> healthList = jdbcTemplate.queryForList(healthSql);
        if (healthList.size() > 0) {
            object.put("healthAllCount",healthList.get(0).get("allCount"));//健康设备总量
@ -138,7 +147,7 @@ public class DetectionPlatformService  {
        object.put("lawOfIOT",getRange( (securityIsUser.intValue() + healthIsUser.intValue() ),( securityAllCount.intValue() + healthAllCount.intValue()  ) ));//物联率 发放了就算物联
        object.put("isUseAllIot",(securityIsUser.intValue() + healthIsUser.intValue()));//已发放设备
        object.put("allIot",securityAllCount.intValue() + healthAllCount.intValue());//总设备
        String unUseSql = "SELECT DISTINCT wd.device_code FROM wlyy_devices wd INNER JOIN wlyy_patient_device pd on wd.device_code =pd.device_sn  WHERE contact_status = 0";//contact_status = 0   失联
        String unUseSql = "SELECT DISTINCT wd.device_code FROM wlyy_devices wd INNER JOIN wlyy_patient_device pd on wd.device_code =pd.device_sn and pd.user "+filter+"  WHERE contact_status = 0";//contact_status = 0   失联
        List<Map<String , Object>> unUseList = jdbcTemplate.queryForList(unUseSql);
        int unUseCount = unUseList.size();
        object.put("unUseCount",unUseCount);//设备失联数量

+ 39 - 6
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/statistics/StatisticsService.java

@ -559,6 +559,9 @@ public class StatisticsService {
            if (ind.equals("45")){
                areaLevel="2";
            }
            if (ind.equals("52")){
                areaLevel="2";
            }
            SaveModel saveModel = elasticsearchUtil.findOneDateQuotaLevel0(endDate, endDate, area, level, ind, SaveModel.timeLevel_DDL,areaLevel);
            res.put("index_"+ind+"_total",saveModel.getResult2().longValue());
            if(StringUtils.isNotBlank(type)){
@ -853,8 +856,8 @@ public class StatisticsService {
        }
        JSONArray jsonArray = new JSONArray();
        String sql = " select dict.dict_code,dict_value,count(DISTINCT lab.patient) total from wlyy_hospital_sys_dict dict \n" +
                "LEFT JOIN wlyy_patient_label lab  on  dict.dict_code = lab.label_code AND  lab.label_type='1' " +
                "where  dict.dict_name='service_type' and lab.patient "+filter+" and  dict.dict_code is not null and dict_code<>5  \n" +
                "LEFT JOIN wlyy_patient_label lab  on  dict.dict_code = lab.label_code AND  lab.label_type='1' and lab.patient "+filter+" " +
                "where  dict.dict_name='service_type'  and  dict.dict_code is not null and dict_code<>5  \n" +
                " GROUP BY dict.dict_code; ";
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
@ -1041,10 +1044,10 @@ public class StatisticsService {
            orgCodes = orgCodes.replaceAll(",","','");
            filter = " not in ('"+orgCodes+"')";
        }
        String sql =" select count(id) from base_patient where del=1 and id "+filter;
        String sql =" select count(id) from base_patient  where del=1 and archive_type=1 and id "+filter;
        Integer olderCount  = jdbcTemplate.queryForObject(sql,Integer.class);
        sql = " select count(DISTINCT pd.id) from base_patient p INNER JOIN wlyy_patient_device pd on p.id = pd.user and pd.del=0 where p.del=1 and p.id "+filter;
        sql = " select count(DISTINCT p.id) from base_patient p INNER JOIN wlyy_patient_device pd on p.id = pd.user and p.archive_type=1 and pd.del=0 where p.del=1 and p.id "+filter;
        Integer bindingCount  = jdbcTemplate.queryForObject(sql,Integer.class);
        result.put("olderCount",olderCount);
        result.put("bindingCount",bindingCount);
@ -1142,8 +1145,17 @@ public class StatisticsService {
    }
    public JSONObject deviceUsingInfo(String area){
        String filter = "";
        String sqltmp = "SELECT GROUP_CONCAT(dict_code) orgCodes from wlyy_hospital_sys_dict WHERE dict_name = 'jkzl_child' or dict_name = 'jkzl_older' ";
        List<Map<String,Object>> listtmp =  jdbcTemplate.queryForList(sqltmp);
        if(listtmp.size()>0){
            String orgCodes = String.valueOf(listtmp.get(0).get("orgCodes"));
            orgCodes = orgCodes.replaceAll(",","','");
            filter = " not in ('"+orgCodes+"')";
        }
        JSONObject result = new JSONObject();
        String sql = "SELECT COUNT(DISTINCT device_sn) FROM wlyy_patient_device WHERE del = 0";
        String sql = "SELECT COUNT(DISTINCT device_sn) FROM wlyy_patient_device WHERE del = 0 and user "+filter;
        Integer use = jdbcTemplate.queryForObject(sql,Integer.class);
        sql = "SELECT COUNT(DISTINCT device_code) FROM wlyy_devices ";
        Integer total = jdbcTemplate.queryForObject(sql,Integer.class);
@ -1152,7 +1164,7 @@ public class StatisticsService {
        result.put("stock",total-use);//库存
        sql = "SELECT DISTINCT count(wd.device_code) FROM wlyy_devices wd INNER JOIN wlyy_patient_device pd on " +
                "wd.device_code =pd.device_sn  WHERE contact_status = 0";//contact_status = 0   失联
                "wd.device_code =pd.device_sn  WHERE contact_status = 0 and pd.user "+filter;//contact_status = 0   失联
        Integer lost = jdbcTemplate.queryForObject(sql,Integer.class);
        //物联率 失联率
        result.put("deviceAll",total);//物联率分母总数 设备总数(包括库存)
@ -1165,6 +1177,15 @@ public class StatisticsService {
    }
    public PageEnvelop getSecurityOrderList(String area,String status, String svrDesc,String topicItem, Integer page, Integer pageSize){
        String testPatients = "";
        String sqltmp = "SELECT GROUP_CONCAT(dict_code) orgCodes from wlyy_hospital_sys_dict WHERE dict_name = 'jkzl_child' or dict_name = 'jkzl_older' ";
        List<Map<String,Object>> listtmp =  jdbcTemplate.queryForList(sqltmp);
        if(listtmp.size()>0){
            String orgCodes = String.valueOf(listtmp.get(0).get("orgCodes"));
            orgCodes = orgCodes.replaceAll(",","','");
            testPatients = " not in ('"+orgCodes+"') ";
        }
        page = page>1?page-1:0;
        JSONArray result = new JSONArray();
@ -1183,6 +1204,7 @@ public class StatisticsService {
        if (org.apache.commons.lang3.StringUtils.isNotBlank(topicItem)){
            fliter+=" and ord.topic_item='"+topicItem+"' ";
        }
        fliter +=" and ord.patient "+testPatients;
        Long count = jdbcTemplate.queryForObject(sqlCount+fliter,Long.class);
        fliter+=" order by ord.create_time desc limit " + (page*pageSize) + "," + pageSize;
        List<Map<String,Object>> sqlResult = jdbcTemplate.queryForList(sql+fliter);
@ -1241,6 +1263,15 @@ public class StatisticsService {
    public JSONObject getSecurityTab(String area,String status,String svrDesc,String topicItem){
        String testPatients = "";
        String sqltmp = "SELECT GROUP_CONCAT(dict_code) orgCodes from wlyy_hospital_sys_dict WHERE dict_name = 'jkzl_child' or dict_name = 'jkzl_older' ";
        List<Map<String,Object>> listtmp =  jdbcTemplate.queryForList(sqltmp);
        if(listtmp.size()>0){
            String orgCodes = String.valueOf(listtmp.get(0).get("orgCodes"));
            orgCodes = orgCodes.replaceAll(",","','");
            testPatients = " not in ('"+orgCodes+"') ";
        }
        if (StringUtils.isNotBlank(area)){
        }
@ -1274,6 +1305,8 @@ public class StatisticsService {
        if (org.apache.commons.lang3.StringUtils.isNotBlank(topicItem)){
            fliter+=" and ord.topic_item='"+topicItem+"' ";
        }
        fliter +=" and ord.patient "+testPatients;
        fliter+=" group by ord.status,ord.serve_desc ";
        List<Map<String,Object>> sqlResult = jdbcTemplate.queryForList(sql+fliter);
        String pyCode = "";

+ 25 - 23
svr/svr-cloud-device/src/main/java/com/yihu/jw/care/service/OnenetService.java

@ -175,20 +175,24 @@ public class OnenetService {
            String valueTmp = value.substring(236);
            //0060 0001 0061 0001 0062 0000 0000 0001 0000 79
            String wChanRscType = valueTmp.substring(0,4);
            String num = valueTmp.substring(4,8);
            String wEventType = valueTmp.substring(16,20);
            String wParamType = valueTmp.substring(28,32);
            String wParamValue = valueTmp.substring(32,36);
            if("0062".equals(wEventType)&&"0017".equals(wParamType)){
                String byTime = value.substring(18,26);//时间 秒
                String time = DateUtil.dateToStrLong(DateUtil.secondTransfor(Integer.valueOf(byTime,16)));
                //烟雾浓度
                String monitorValue = Integer.valueOf(wParamValue,16)+"";
                String resourceSerial = onenetDevice.getSn();
                addDeviceIndex(resourceSerial,monitorValue,time,"2","%");
                dataPushLogUtil.savePushLog(resourceSerial,jsonObject.toJSONString(jsonObject,SerializerFeature.WriteMapNullValue),"可燃气体探测器监测信息接收");
            Integer num = Integer.valueOf(valueTmp.substring(4,8),16);
            for (int i=0;i<num;i++){
                String sign = valueTmp.substring(8+(i*28),36+(i*28));
                String wEventType = sign.substring(8,12);
                String wParamType = sign.substring(20,24);
                String wParamValue = sign.substring(24,28);
                if("0062".equals(wEventType)&&"0017".equals(wParamType)){
                    String byTime = value.substring(18,26);//时间 秒
                    String time = DateUtil.dateToStrLong(DateUtil.secondTransfor(Integer.valueOf(byTime,16)));
                    //烟雾浓度
                    String monitorValue = Integer.valueOf(wParamValue,16)+"";
                    String resourceSerial = onenetDevice.getSn();
                    addDeviceIndex(resourceSerial,monitorValue,time,"2","%");
                    dataPushLogUtil.savePushLog(resourceSerial,jsonObject.toJSONString(jsonObject,SerializerFeature.WriteMapNullValue),"可燃气体探测器监测信息接收");
                }
                return;
            }
            return;
        }
        if("02".equals(byMessageId)){
            //报警
@ -196,15 +200,13 @@ public class OnenetService {
            String time = DateUtil.dateToStrLong(DateUtil.secondTransfor(Integer.parseInt(byTime)));
            String valueTmp = value.substring(236);
            //0060 0001 0061 0001 0064 0000 0002 0001 0087 00
            String wChanRscType = valueTmp.substring(0,4);
            String num = valueTmp.substring(4,8);
            String wEventType = valueTmp.substring(16,20);
            String wEventValue = valueTmp.substring(24,28);
            String wParamType = valueTmp.substring(28,32);
            String wParamValue = valueTmp.substring(32,36);
            if("0064".equals(wEventType)&&"0002".equals(wEventValue)){
                //报警
                if("0017".equals(wParamType)){
            Integer num = Integer.valueOf(valueTmp.substring(4,8),16);
            for (int i=0; i<num; i++){
                String sign = valueTmp.substring(8+(i*28),36+(i*28));
                String wEventType = sign.substring(8,12);
                String wParamType = sign.substring(20,24);
                String wParamValue = sign.substring(24,28);
                if("0062".equals(wEventType)&&"0017".equals(wParamType)){
                    //烟雾浓度
                    String monitorValue = Integer.valueOf(wParamValue,16)+"";
                    String resourceSerial = onenetDevice.getSn();
@ -221,8 +223,8 @@ public class OnenetService {
                    }
                    addDeviceIndex(resourceSerial,monitorValue,time,"2","%");
                }
                return;
            }
        }
        //其他信息暂时不处理
        // 03消音 04自检 05故障 06信号查询 07注册 08注销 ...