Browse Source

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

LiTaohong 6 năm trước cách đây
mục cha
commit
d4909fd672
44 tập tin đã thay đổi với 1120 bổ sung546 xóa
  1. 56 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/saas/SaasBusinessCardDO.java
  2. 6 6
      common/common-entity/src/main/java/com/yihu/jw/entity/base/sms/SmsDO.java
  3. 0 101
      common/common-entity/src/main/java/com/yihu/jw/entity/base/team/BaseTeamDO.java
  4. 13 13
      common/common-entity/src/main/java/com/yihu/jw/entity/base/team/BaseTeamMemberDO.java
  5. 10 0
      common/common-entity/src/main/java/com/yihu/jw/entity/specialist/rehabilitation/GuidanceMessageLogDO.java
  6. 15 0
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/base/BaseRequestMapping.java
  7. 4 0
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/base/WechatRequestMapping.java
  8. 2 1
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/specialist/SpecialistMapping.java
  9. 50 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/saas/SaasBusinessCardVO.java
  10. 6 5
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/sms/SmsVO.java
  11. 39 11
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/web/endpoint/EnvelopRestEndpoint.java
  12. 28 23
      gateway/ag-basic/src/main/resources/application.yml
  13. 164 11
      server/svr-authentication/src/main/java/com/yihu/jw/security/core/userdetails/jdbc/WlyyUserDetailsService.java
  14. 10 4
      server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java
  15. 21 1
      server/svr-zipkin/src/main/resources/application.yml
  16. 9 3
      server/svr-zipkin/src/main/resources/bootstrap.yml
  17. 6 0
      svr/svr-base/pom.xml
  18. 1 1
      svr/svr-base/src/main/java/com/yihu/SvrBaseApplication.java
  19. 3 3
      svr/svr-base/src/main/java/com/yihu/jw/base/activemq/ConsumerRunner.java
  20. 13 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/saas/SaasBusinessCardDao.java
  21. 111 0
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/saas/SaasBusinessCardEndpoint.java
  22. 96 0
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/sms/SmsEndpoint.java
  23. 2 2
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/sms/SmsGatewayEndpoint.java
  24. 2 2
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/sms/SmsTemplateEndpoint.java
  25. 38 0
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/wx/WeChatQrcodeController.java
  26. 1 1
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/wx/WechatCoreController.java
  27. 1 1
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/wx/WxMenuController.java
  28. 1 1
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/wx/WxTemplateController.java
  29. 41 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/saas/SaasBusinessCardService.java
  30. 8 2
      svr/svr-base/src/main/java/com/yihu/jw/base/service/sms/SmsGatewayService.java
  31. 15 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/sms/SmsService.java
  32. 51 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/wx/WeChatQrcodeService.java
  33. 48 54
      svr/svr-base/src/main/resources/application.yml
  34. 4 15
      svr/svr-wlyy-specialist/pom.xml
  35. 10 6
      svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/controller/SpecialistHospitalServiceItemController.java
  36. 43 25
      svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/controller/rehabilitation/RehabilitationManageController.java
  37. 17 12
      svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/controller/rehabilitation/RehabilitationPlanController.java
  38. 1 1
      svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/dao/SpecialistPatientRelationDao.java
  39. 3 0
      svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/dao/rehabilitation/RehabilitationDetailDao.java
  40. 12 6
      svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/SpecialistHospitalServiceItemService.java
  41. 6 151
      svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/SpecialistServiceItemService.java
  42. 130 71
      svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/rehabilitation/RehabilitationManageService.java
  43. 22 5
      svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/rehabilitation/RehabilitationPlanService.java
  44. 1 8
      wlyy-parent-pom/pom.xml

+ 56 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/saas/SaasBusinessCardDO.java

@ -0,0 +1,56 @@
package com.yihu.jw.entity.base.saas;
import com.yihu.jw.entity.IntegerIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * Entity - SAAS名片
 * Created by progr1mmer on 2018/9/7.
 */
@Entity
@Table(name = "base_saas_business_card")
public class SaasBusinessCardDO extends IntegerIdentityEntity {
    public enum Type {
        doctor,
        patient
    }
    //SAAS ID
    private String saasId;
    //字段
    private String field;
    //类型
    private Type type;
    @Column(name = "saas_id", nullable = false)
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    @Column(name = "field", nullable = false)
    public String getField() {
        return field;
    }
    public void setField(String field) {
        this.field = field;
    }
    @Column(name = "type", nullable = false)
    public Type getType() {
        return type;
    }
    public void setType(Type type) {
        this.type = type;
    }
}

+ 6 - 6
common/common-entity/src/main/java/com/yihu/jw/entity/base/sms/SmsDO.java

@ -21,7 +21,7 @@ public class SmsDO extends UuidIdentityEntity {
	//请求的ip地址
	private String requestIp;
	//短信接收号码
	private String to;
	private String mobile;
	//短信内容
	private String content;
	//过期时间
@ -58,13 +58,13 @@ public class SmsDO extends UuidIdentityEntity {
		this.requestIp = requestIp;
	}
	@Column(name = "to", nullable = false)
	public String getTo() {
		return to;
	@Column(name = "mobile", nullable = false)
	public String getMobile() {
		return mobile;
	}
	public void setTo(String to) {
		this.to = to;
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	@Column(name = "content", nullable = false)

+ 0 - 101
common/common-entity/src/main/java/com/yihu/jw/entity/base/team/BaseTeamDO.java

@ -1,101 +0,0 @@
package com.yihu.jw.entity.base.team;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
* 团队信息实体
*
* @author litaohong on  2018年08月31日
*
*/
@Entity
@Table(name = "base_team")
public class BaseTeamDO extends UuidIdentityEntityWithOperator {
    /**
	 * 机构id
	 */
	private String orgId;
    /**
	 * 团队名称
	 */
	private String name;
    /**
	 * 领导医生标识
	 */
	private String leaderId;
    /**
	 * 团队人数
	 */
	private String teamNum;
    /**
	 * 团队二维码
	 */
	private String qrcode;
    /**
	 * 作废标识,1正常,0作废
	 */
	private String del;
	@Column(name = "org_id")
    public String getOrgId() {
        return orgId;
    }
    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }
	@Column(name = "name")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
	@Column(name = "leader_id")
    public String getLeaderId() {
        return leaderId;
    }
    public void setLeaderId(String leaderId) {
        this.leaderId = leaderId;
    }
	@Column(name = "team_num")
    public String getTeamNum() {
        return teamNum;
    }
    public void setTeamNum(String teamNum) {
        this.teamNum = teamNum;
    }
	@Column(name = "qrcode")
    public String getQrcode() {
        return qrcode;
    }
    public void setQrcode(String qrcode) {
        this.qrcode = qrcode;
    }
	@Column(name = "del")
    public String getDel() {
        return del;
    }
    public void setDel(String del) {
        this.del = del;
    }
}

+ 13 - 13
common/common-entity/src/main/java/com/yihu/jw/entity/base/team/BaseTeamMemberDO.java

@ -10,7 +10,7 @@ import java.util.Date;
/**
* 团队成员实体
*
* @author Administrator on  2018年09月05日
* @author litaohong on  2018年08月31日
*
*/
@Entity
@ -18,24 +18,24 @@ import java.util.Date;
public class BaseTeamMemberDO extends UuidIdentityEntityWithOperator {
    /**
	 * 团队ID
	 */
	private String teamId;
	* 团队ID
	*/
    private String teamId;
    /**
	 * 机构标识
	 */
	private String orgId;
	* 机构标识
	*/
    private String orgId;
    /**
	 * 医生标识,多个医生以逗号分开
	 */
	private String doctorId;
	* 医生标识,多个医生以逗号分开
	*/
    private String doctorId;
    /**
	 * 作废标识,1正常,0作废
	 */
	private String del;
	* 作废标识,1正常,0作废
	*/
    private String del;
	@Column(name = "team_id")

+ 10 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/specialist/rehabilitation/GuidanceMessageLogDO.java

@ -23,6 +23,7 @@ public class GuidanceMessageLogDO extends UuidIdentityEntityWithOperator impleme
    private Integer doctorType;
    private Integer adminTeamCode;
    private String adminTeamName;
    private Integer contentType;
    @Column(name = "doctor")
    public String getDoctor() {
@ -104,4 +105,13 @@ public class GuidanceMessageLogDO extends UuidIdentityEntityWithOperator impleme
    public void setMessageId(String messageId) {
        this.messageId = messageId;
    }
    @Column(name = "content_type")
    public Integer getContentType() {
        return contentType;
    }
    public void setContentType(Integer contentType) {
        this.contentType = contentType;
    }
}

+ 15 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/base/BaseRequestMapping.java

@ -35,6 +35,14 @@ public class BaseRequestMapping {
        public static final String PREFIX  = "/saas_default_module_function";
    }
    /**
     * SAAS名片
     */
    public static class SaasBusinessCard extends Basic {
        public static final String PREFIX  = "/saas_business_card";
        public static final String GENERATE = "/generate";
    }
    /**
     * 模块
     */
@ -137,6 +145,13 @@ public class BaseRequestMapping {
        public static final String PREFIX  = "/sms_template";
    }
    /**
     * 短信模板
     */
    public static class Sms extends Basic {
        public static final String PREFIX  = "/sms";
    }
    /**
     * 服务包
     */

+ 4 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/base/WechatRequestMapping.java

@ -18,6 +18,10 @@ public class WechatRequestMapping {
    }
    public static  class  WxQrcode{
        public static final String api_getQrcode="/getQrcode";
    }
    //微信按钮模块常量
    public static class WxMenu{
        public static final String api_create="/menu";

+ 2 - 1
common/common-request-mapping/src/main/java/com/yihu/jw/rm/specialist/SpecialistMapping.java

@ -73,7 +73,7 @@ public class SpecialistMapping {
        public static final String updateStatusRehabilitationOperate = "/updateStatusRehabilitationOperate";
        public static final String patientRehabilitationDetail = "/patientRehabilitationDetail";
        public static final String recentPlanDetailRecord = "/recentPlanDetailRecord";
        public static final String saveRehabilitationOperateRecodr="/saveRehabilitationOperateRecodr";
        public static final String saveRehabilitationOperateRecord="/saveRehabilitationOperateRecord";
        public static final String updateNoteAndImageRehabilitationOperate = "/updateNoteAndImageRehabilitationOperate";
        public static final String findServiceItemsByHospital = "/findServiceItemsByHospital";
@ -82,6 +82,7 @@ public class SpecialistMapping {
        public static final String appCalendarPlanDetailList = "/appCalendarPlanDetailList";
        public static final String updatePlanDetailStatusById = "/updatePlanDetailStatusById";
        public static final String updatePlanStatusById = "/updatePlanStatusById";
        public static final String planSchedule = "/planSchedule";
    }
    public static class serviceItem{

+ 50 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/saas/SaasBusinessCardVO.java

@ -0,0 +1,50 @@
package com.yihu.jw.restmodel.base.saas;
import com.yihu.jw.entity.base.saas.SaasDO;
import com.yihu.jw.restmodel.IntegerIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
 * VO - SAAS名片
 * Created by progr1mmer on 2018/9/7.
 */
@ApiModel(value = "SaasBusinessCardVO", description = "SAAS名片")
public class SaasBusinessCardVO extends IntegerIdentityVO {
    //SAAS ID
    @ApiModelProperty(value = "Saas ID", example = "402303ee65634dfs0234sf9ad2wa00d2")
    private String saasId;
    //字段
    @ApiModelProperty(value = "实体字段", example = "name")
    private String field;
    //类型
    @ApiModelProperty(value = "名片类型", example = "doctor")
    private SaasDO.Type type;
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public String getField() {
        return field;
    }
    public void setField(String field) {
        this.field = field;
    }
    public SaasDO.Type getType() {
        return type;
    }
    public void setType(SaasDO.Type type) {
        this.type = type;
    }
}

+ 6 - 5
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/sms/SmsVO.java

@ -27,7 +27,7 @@ public class SmsVO extends UuidIdentityVO {
    private String requestIp;
    //短信接收号码
    @ApiModelProperty(value = "短信接收号码", example = "18888888888")
    private String to;
    private String mobile;
    //短信内容
    @ApiModelProperty(value = "短信内容", example = "【i健康综合管理平台】您使用的是i健康综合管理平台短信模板,您的验证码是826612,请于10分钟内正确输入!")
    private String content;
@ -35,6 +35,7 @@ public class SmsVO extends UuidIdentityVO {
    @ApiModelProperty(value = "过期时间", example = "2018-09-03 15:34:34")
    private Date deadline;
    //验证码
    @ApiModelProperty(value = "验证码", example = "651187")
    private String captcha;
    @ApiModelProperty(value = "标签", example = "login")
    private SmsTemplateDO.Type type;
@ -63,12 +64,12 @@ public class SmsVO extends UuidIdentityVO {
        this.requestIp = requestIp;
    }
    public String getTo() {
        return to;
    public String getMobile() {
        return mobile;
    }
    public void setTo(String to) {
        this.to = to;
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }
    public String getContent() {

+ 39 - 11
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/web/endpoint/EnvelopRestEndpoint.java

@ -29,6 +29,10 @@ public abstract class EnvelopRestEndpoint {
    @Autowired
    protected ObjectMapper objectMapper;
    protected Envelop success() {
        return success("success");
    }
    protected Envelop success(String message) {
        return success(message, 200);
    }
@ -45,8 +49,8 @@ public abstract class EnvelopRestEndpoint {
    }
    protected <J, _J> ObjEnvelop<_J> success(J obj, Class<_J> target){
        _J _target = convertToModel(obj, target);
        return success(_target);
        _J _obj = convertToModel(obj, target);
        return success("success", _obj);
    }
    protected <J> ObjEnvelop<J> success(String message, J obj){
@ -54,8 +58,8 @@ public abstract class EnvelopRestEndpoint {
    }
    protected <J, _J> ObjEnvelop<_J> success(String message, J obj, Class<_J> target){
        _J _target = convertToModel(obj, target);
        return success(message, _target);
        _J _obj = convertToModel(obj, target);
        return success(message, 200, _obj);
    }
    protected <J> ObjEnvelop<J> success(String message, int status, J obj){
@ -67,8 +71,8 @@ public abstract class EnvelopRestEndpoint {
    }
    protected <J, _J> ObjEnvelop<_J> success(String message, int status, J obj, Class<_J> target){
        _J _target = convertToModel(obj, target);
        return success(message, status, _target);
        _J _obj = convertToModel(obj, target);
        return success(message, status, _obj);
    }
    protected <T> ListEnvelop<T> success(List<T> contents){
@ -77,7 +81,7 @@ public abstract class EnvelopRestEndpoint {
    protected <T, _T> ListEnvelop<_T> success(List<T> contents, Class<_T> target){
        List<_T> _contents = convertToModels(contents, new ArrayList<>(contents.size()), target);
        return success(_contents);
        return success("success", _contents);
    }
    protected <T> ListEnvelop<T> success(String message, List<T> contents){
@ -86,7 +90,7 @@ public abstract class EnvelopRestEndpoint {
    protected <T, _T> ListEnvelop<_T> success(String message, List<T> contents, Class<_T> target){
        List<_T> _contents = convertToModels(contents, new ArrayList<>(contents.size()), target);
        return success(message, _contents);
        return success(message, 200, _contents);
    }
    protected <T> ListEnvelop<T> success(String message, int status, List<T> contents){
@ -108,7 +112,7 @@ public abstract class EnvelopRestEndpoint {
    protected <T, _T> PageEnvelop<_T> success(List<T> contents, int totalCount, int currPage, int pageSize, Class<_T> target){
        List<_T> _contents = convertToModels(contents, new ArrayList<>(contents.size()), target);
        return success(_contents, totalCount, currPage, pageSize);
        return success("success", _contents, totalCount, currPage, pageSize);
    }
    protected <T> PageEnvelop<T> success(String message, List<T> contents, int totalCount, int currPage, int pageSize) {
@ -117,7 +121,7 @@ public abstract class EnvelopRestEndpoint {
    protected <T, _T> PageEnvelop<_T> success(String message, List<T> contents, int totalCount, int currPage, int pageSize, Class<_T> target){
        List<_T> _contents = convertToModels(contents, new ArrayList<>(contents.size()), target);
        return success(message, _contents, totalCount, currPage, pageSize);
        return success(message, 200, _contents, totalCount, currPage, pageSize);
    }
    protected <T> PageEnvelop<T> success(String message, int status,  List<T> contents, int totalCount, int currPage, int pageSize) {
@ -140,16 +144,34 @@ public abstract class EnvelopRestEndpoint {
        return success("success", contents, obj);
    }
    protected <T, J, _T, _J> MixEnvelop<_T, _J> success(List<T> contents, J obj, Class<_T> targetContents, Class<_J> targetObj) {
        List<_T> _contents = convertToModels(contents, new ArrayList<>(contents.size()), targetContents);
        _J _obj = convertToModel(obj, targetObj);
        return success("success", _contents, _obj);
    }
    protected <T, J> MixEnvelop<T, J> success(String message, List<T> contents, J obj) {
        return success(message, 200, contents, obj);
    }
    protected <T, J, _T, _J> MixEnvelop<_T, _J>  success(String message, List<T> contents, J obj, Class<_T> targetContents, Class<_J> targetObj) {
        List<_T> _contents = convertToModels(contents, new ArrayList<>(contents.size()), targetContents);
        _J _obj = convertToModel(obj, targetObj);
        return success(message, 200, _contents, _obj);
    }
    protected <T, J> MixEnvelop<T, J> success(String message, int status, List<T> contents, J obj) {
        return success(message, status, contents, obj, contents.size(), 1, contents.size());
    }
    protected <T, J, _T, _J> MixEnvelop<_T, _J> success(String message, int status, List<T> contents, J obj, Class<_T> targetContents, Class<_J> targetObj) {
        List<_T> _contents = convertToModels(contents, new ArrayList<>(contents.size()), targetContents);
        _J _obj = convertToModel(obj, targetObj);
        return success(message, status, _contents, _obj, _contents.size(), 1, _contents.size());
    }
    protected <T, J> MixEnvelop<T, J> success(String message, int status, List<T> contents, J obj, int totalCount, int currPage, int pageSize) {
        MixEnvelop<T, J> mixEnvelop = new MixEnvelop();
        MixEnvelop<T, J> mixEnvelop = new MixEnvelop<>();
        mixEnvelop.setMessage(message);
        mixEnvelop.setStatus(status);
        mixEnvelop.setCurrPage(currPage);
@ -160,6 +182,12 @@ public abstract class EnvelopRestEndpoint {
        return mixEnvelop;
    }
    protected <T, J, _T, _J> MixEnvelop<_T, _J> success(String message, int status, List<T> contents, J obj, int totalCount, int currPage, int pageSize, Class<_T> targetContents, Class<_J> targetObj) {
        List<_T> _contents = convertToModels(contents, new ArrayList<>(contents.size()), targetContents);
        _J _obj = convertToModel(obj, targetObj);
        return success(message, status, _contents, _obj, totalCount, currPage, pageSize);
    }
    protected Envelop failed (String message) {
        return failed(message, -10000);
    }

+ 28 - 23
gateway/ag-basic/src/main/resources/application.yml

@ -1,20 +1,5 @@
server:
  port: 10001
zuul:
  config-priority: false
  ignored-services: '*'
  sensitive-headers:
  routes:
    svr-iot:
      path: /iot/**
      serviceId: svr-iot
    svr-base:
      path: /base/**
      serviceId: svr-base
    demo:
      path: /baidu/**
      url: https://www.baidu.com
  port: ${server.ag-basic-port}
spring:
  datasource:
@ -34,7 +19,24 @@ spring:
    test-while-idle: true #指明连接是否被空闲连接回收器(如果有)进行检验,如果检测失败,则连接将被从池中去除
    min-evictable-idle-time-millis: 3600000 #连接池中连接,在时间段内一直空闲,被逐出连接池的时间(1000*60*60),以毫秒为单位
    time-between-eviction-runs-millis: 300000 #在空闲连接回收器线程运行期间休眠的时间值,以毫秒为单位,一般比minEvictableIdleTimeMillis小
#  sleuth:
#    sampler:
#      percentage: 1.0 #采用需要的请求的百分比 默认是0.1 即 10%
zuul:
  config-priority: false
  ignored-services: '*'
  sensitive-headers:
  routes:
    svr-iot:
      path: /iot/**
      serviceId: svr-iot
    svr-base:
      path: /base/**
      serviceId: svr-base
    demo:
      path: /baidu/**
      url: https://www.baidu.com
---
spring:
@ -45,10 +47,6 @@ spring:
    password: 123456
#  zipkin:
#    base-url: http://localhost:9411 #日志追踪的地址
#  sleuth:
#    sampler:
#      percentage: 1.0 #采用需要的请求的百分比 默认是0.1 即 10%
---
spring:
@ -59,6 +57,13 @@ spring:
    password: 123456
#  zipkin:
#    base-url: http://localhost:9411 #日志追踪的地址
#  sleuth:
#    sampler:
#      percentage: 1.0 #采用需要的请求的百分比 默认是0.1 即 10%
---
spring:
  profiles: jwprod
  datasource:
    url: jdbc:mysql://172.19.103.77/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true
    username: root
    password: 123456
#  zipkin:
#    base-url: http://localhost:9411 #日志追踪的地址

+ 164 - 11
server/svr-authentication/src/main/java/com/yihu/jw/security/core/userdetails/jdbc/WlyyUserDetailsService.java

@ -3,7 +3,8 @@ package com.yihu.jw.security.core.userdetails.jdbc;
import com.yihu.jw.security.core.userdetails.SaltUser;
import com.yihu.jw.security.model.WlyyUserDetails;
import com.yihu.jw.security.model.WlyyUserSimple;
import org.apache.commons.lang3.time.DateUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.time.DateUtils;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.support.JdbcDaoSupport;
import org.springframework.security.core.GrantedAuthority;
@ -29,38 +30,90 @@ public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetail
    private static final String DEFAULT_USER_DETAILS_STATEMENT = "select * from base_user u where u.username = ? or u.mobile = ? or u.idcard = ?";
    private static final String DEFAULT_DOCTOR_DETAILS_STATEMENT = "SELECT * FROM base_doctor d WHERE d.mobile = ? OR d.idcard = ?";
    private static final String DEFAULT_PATIENT_DETAILS_STATEMENT = "SELECT * FROM base_patient p WHERE p.mobile = ? OR p.idcard = ?";
    public WlyyUserDetailsService(DataSource dataSource) {
        this.setDataSource(dataSource);
    }
    /**
     * 用户登录判读接口
     *
     * 判断loginType查找用户信息
     * 用户类型 1或默认为user,2:医生登录,3:患者登录
     * @param username
     * @return
     * @throws UsernameNotFoundException
     */
    @Override
    public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
        List<WlyyUserDetails> users = this.getJdbcTemplate().query(DEFAULT_USER_DETAILS_STATEMENT, new BeanPropertyRowMapper(WlyyUserDetails.class), username, username, username);
        List<WlyyUserDetails> users = getWlyyUserDetails(username);
        if (users == null || users.size() == 0) {
            throw new UsernameNotFoundException(username);
        }
        if (users.get(0).isLocked()) {
            Date date = users.get(0).getLockedDate();
            if (new Date().after(DateUtils.addMinutes(date, 5))) {
                this.getJdbcTemplate().update("update base_user u set login_failure_count = 0, u.locked = 0 where u.username = ? or u.mobile = ? or u.idcard = ?", username, username, username);
                //解除锁定
                unlocked(username);
                users.get(0).setLocked(false);
            }
        }
        return new SaltUser(username, users.get(0).getPassword(), users.get(0).getSalt(), users.get(0).isEnabled(), users.get(0).isLocked(), getGrantedAuthorities(username));
    }
    public void unlocked(String username){
        String loginType = getLogintype();
        if(StringUtils.isBlank(loginType)||"1".equals(loginType)){ //1或默认查找user表,为平台管理员账号
            //解除锁定
            this.getJdbcTemplate().update("update base_user u set login_failure_count = 0, u.locked = 0 where u.username = ? or u.mobile = ? or u.idcard = ?", username, username, username);
        }else if("2".equals(loginType)){//2.为医生账号
            //解除锁定
            this.getJdbcTemplate().update("update base_doctor d set d.login_failure_count = 0, d.locked = 0 where d.mobile = ? or d.idcard = ?",username, username);
        }else if("3".equals(loginType)){ //3.患者账号
            //解除锁定
            this.getJdbcTemplate().update("update base_patient p set p.login_failure_count = 5, p.locked = 0 where p.mobile = ? or p.idcard = ?",username, username);
        } //...
    }
    /**
     * 用户登录判读接口
     * 判断loginType查找用户信息
     * 用户类型 1或默认为user,2:医生登录,3:患者登录
     * @param username
     * @return
     */
    public  List<WlyyUserDetails> getWlyyUserDetails(String username){
        String loginType = getLogintype();
        List<WlyyUserDetails> users = null;
        //1或默认查找user表,为平台管理员账号
        if(StringUtils.isBlank(loginType)||"1".equals(loginType)){
            users = this.getJdbcTemplate().query(DEFAULT_USER_DETAILS_STATEMENT, new BeanPropertyRowMapper(WlyyUserDetails.class), username, username, username);
            //2.为医生登录账号
        }else if("2".equals(loginType)){
            users = this.getJdbcTemplate().query(DEFAULT_DOCTOR_DETAILS_STATEMENT, new BeanPropertyRowMapper(WlyyUserDetails.class), username, username);
            //3.患者登录
        }else if("3".equals(loginType)){
            users = this.getJdbcTemplate().query(DEFAULT_PATIENT_DETAILS_STATEMENT, new BeanPropertyRowMapper(WlyyUserDetails.class), username, username);
        }//..
        return users;
    }
    /**
     * 设置用户登录时间,返回登录信息
     * 判断loginType,用户类型 1或默认为user,2:医生登录,3:患者登录
     * @param username
     * @return
     * @throws UsernameNotFoundException
     */
    public WlyyUserSimple authSuccess (String username) throws UsernameNotFoundException {
        //更新登陆时间
        this.getJdbcTemplate().update("update base_user u set login_failure_count = 0, u.login_date = ? where u.username = ? or u.mobile = ? or u.idcard = ?", new Date(), username, username, username);
        //加载用户简略信息
        List<WlyyUserSimple> users = this.getJdbcTemplate().query(DEFAULT_USER_DETAILS_STATEMENT, new BeanPropertyRowMapper(WlyyUserSimple.class), username, username, username);
        List<WlyyUserSimple> users = getWlyyUserSimple(username);
        if (users == null || users.size() == 0) {
            throw new UsernameNotFoundException(username);
        }
@ -71,21 +124,121 @@ public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetail
        //获取失败次数
        HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
        String username = request.getParameter("username");
        Integer loginFailureCount = this.getJdbcTemplate().queryForObject("select login_failure_count from base_user u where u.username = ? or u.mobile = ? or u.idcard = ?", Integer.class, username, username, username);
        Integer loginFailureCount = getLoginFailureCount(username);
        loginFailureCount ++;
        if (loginFailureCount == 5) {
            this.getJdbcTemplate().update("update base_user u set u.login_failure_count = 5, locked = 1, u.locked_date = ? where u.username = ? or u.mobile = ? or u.idcard = ?", new Date(), username, username, username);
        if (loginFailureCount >= 5) {
            locked(username);
            return "账号已被锁定,请5分钟后重试!";
        } else {
            this.getJdbcTemplate().update("update base_user u set u.login_failure_count = ? where u.username = ? or u.mobile = ? or u.idcard = ?", loginFailureCount, username, username, username);
            addFailureCount(username,loginFailureCount);
            return "密码错误,还可以再试" + (5 - loginFailureCount) + "次!";
        }
    }
    /**
     * 获取失败次数
     * @param username
     * @return
     */
    public Integer getLoginFailureCount(String username){
        String loginType = getLogintype();
        Integer loginFailureCount = 0;
        if(StringUtils.isBlank(loginType)||"1".equals(loginType)){ //1或默认查找user表,为平台管理员账号
            loginFailureCount = this.getJdbcTemplate().queryForObject("select u.login_failure_count from base_user u where u.username = ? or u.mobile = ? or u.idcard = ?", Integer.class, username, username, username);
        }else if("2".equals(loginType)){//2.为医生账号
            loginFailureCount = this.getJdbcTemplate().queryForObject("select d.login_failure_count from base_doctor d where d.mobile = ? or d.idcard = ?", Integer.class, username, username);
        }else if("3".equals(loginType)){ //3.患者账号
            loginFailureCount = this.getJdbcTemplate().queryForObject("select p.login_failure_count from base_patient p where p.mobile = ? or p.idcard = ?", Integer.class, username, username);
        } //...
        return loginFailureCount;
    }
    /**
     * 锁定账号
     * @param username
     */
    public void locked(String username){
        String loginType = getLogintype();
        if(StringUtils.isBlank(loginType)||"1".equals(loginType)){ //1或默认查找user表,为平台管理员账号
            //账号锁定
            this.getJdbcTemplate().update("update base_user u set u.login_failure_count = 5, u.locked = 1, u.locked_date = ? where u.username = ? or u.mobile = ? or u.idcard = ?", new Date(), username, username, username);
        }else if("2".equals(loginType)){//2.为医生账号
            //账号锁定
            this.getJdbcTemplate().update("update base_doctor d set d.login_failure_count = 5, d.locked = 1, d.locked_date = ? where d.mobile = ? or d.idcard = ?", new Date(), username, username);
        }else if("3".equals(loginType)){ //3.患者账号
            //账号锁定
            this.getJdbcTemplate().update("update base_patient p set p.login_failure_count = 5, p.locked = 1, p.locked_date = ?  where p.mobile = ? or p.idcard = ?", new Date(), username, username);
        } //...
    }
    /**
     * 更新登录失败次数
     * @param username
     * @param loginFailureCount
     */
    public void addFailureCount(String username,Integer loginFailureCount){
        String loginType = getLogintype();
        if(StringUtils.isBlank(loginType)||"1".equals(loginType)){ //1或默认查找user表,为平台管理员账号
            //更新失败次数
            this.getJdbcTemplate().update("update base_user u set u.login_failure_count = ? where u.username = ? or u.mobile = ? or u.idcard = ?", loginFailureCount, username, username, username);
        }else if("2".equals(loginType)){//2.为医生账号
            //更新失败次数
            this.getJdbcTemplate().update("update base_doctor d set d.login_failure_count = ? where d.mobile = ? or d.idcard = ?", loginFailureCount, username, username);
        }else if("3".equals(loginType)){ //3.患者账号
            //更新失败次数
            this.getJdbcTemplate().update("update base_patient p set p.login_failure_count = ? where p.mobile = ? or p.idcard = ?", loginFailureCount, username, username);
        } //...
    }
    private Collection<? extends GrantedAuthority> getGrantedAuthorities(String username) {
        Collection<GrantedAuthority> authorities = new ArrayList<>(1);
        authorities.add(new SimpleGrantedAuthority("ROLE_USER"));
        return authorities;
    }
    /**
     * 设置用户登录时间,返回登录信息
     * 判断loginType,用户类型 1或默认为user,2:医生登录,3:患者登录
     * @param username
     * @return
     */
    public List<WlyyUserSimple> getWlyyUserSimple(String username){
        String loginType = getLogintype();
        List<WlyyUserSimple> users = null;
        //1或默认查找user表,为平台管理员账号
        if(StringUtils.isBlank(loginType)||"1".equals(loginType)){
            //更新登录时间
            this.getJdbcTemplate().update("update base_user u set u.login_failure_count = 0, u.login_date = ? where u.username = ? or u.mobile = ? or u.idcard = ?", new Date(), username, username, username);
            users = this.getJdbcTemplate().query(DEFAULT_USER_DETAILS_STATEMENT, new BeanPropertyRowMapper(WlyyUserSimple.class), username, username, username);
            //2.为医生登录账号
        }else if("2".equals(loginType)){
            //更新登录时间
            this.getJdbcTemplate().update("update base_doctor d set d.login_failure_count = 0, d.login_date = ? where d.mobile = ? or d.idcard = ?", new Date(), username, username);
            users = this.getJdbcTemplate().query(DEFAULT_DOCTOR_DETAILS_STATEMENT, new BeanPropertyRowMapper(WlyyUserSimple.class), username, username);
            //3.患者登录
        }else if("3".equals(loginType)){
            //更新登录时间
            this.getJdbcTemplate().update("update base_patient p set p.login_failure_count = 0, p.login_date = ? where p.mobile = ? or p.idcard = ?", new Date(), username, username);
            users = this.getJdbcTemplate().query(DEFAULT_PATIENT_DETAILS_STATEMENT, new BeanPropertyRowMapper(WlyyUserSimple.class), username, username);
        } //...
        return users;
    }
    /**
     * 获取用户登录类型
     * @return
     */
    public String getLogintype(){
        HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
        String loginType = request.getParameter("login_type");
        return loginType;
    }
}

+ 10 - 4
server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java

@ -89,6 +89,12 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
    /**
     * 登陆
     * @param parameters
     * 不定入参:
     * client_id 应用标识
     * captcha 验证码
     * password 密码
     * username 用户名/手机/身份证号
     * login_type 用户类型 1或默认为user,2:医生登录,3:患者登录
     * @param httpSession
     * @return
     * @throws Exception
@ -105,10 +111,10 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
        }
        if (StringUtils.isEmpty(parameters.get("captcha"))) {
            parameters.put("grant_type", "password");
            if (parameters.get("password") != null) {
                RSAPrivateKey rsaPrivateKey = (RSAPrivateKey)httpSession.getAttribute("privateKey");
                parameters.put("password", RSAUtils.decryptByPrivateKey(new String(Base64.decodeBase64(parameters.get("password"))), rsaPrivateKey));
            }
//            if (parameters.get("password") != null) {
//                RSAPrivateKey rsaPrivateKey = (RSAPrivateKey)httpSession.getAttribute("privateKey");
//                parameters.put("password", RSAUtils.decryptByPrivateKey(new String(Base64.decodeBase64(parameters.get("password"))), rsaPrivateKey));
//            }
        } else {
            parameters.put("grant_type", "captcha");
        }

+ 21 - 1
server/svr-zipkin/src/main/resources/application.yml

@ -1,5 +1,5 @@
server:
  port: 9411
  port: ${server.svr-zipkin-port}
---
@ -19,7 +19,27 @@ zipkin:
---
spring:
  profiles: jwtest
#分布式日志存在es里面
zipkin:
  storage:
    type: elasticsearch
    elasticsearch:
      hosts: 172.19.103.68:9300
      cluster:  jkzl
      index: jwlog
      index-shards: 5
      index-replicas: 0
---
spring:
  profiles: jwprod
#分布式日志存在es里面
zipkin:
  storage:
    type: elasticsearch
    elasticsearch:
      hosts: 172.19.103.68:9300
      cluster:  jkzl
      index: jwlog
      index-shards: 5
      index-replicas: 0

+ 9 - 3
server/svr-zipkin/src/main/resources/bootstrap.yml

@ -1,11 +1,9 @@
##优先读取 boostarap配置 然后在读取application。yml的配置
spring:
  application:
    name: svr-zipkin
  #从发现服务里面取配置服务的信息
  cloud:
    config:
      failFast: true #启动快速失败 即链接不到配置服务就启动失败
      failFast: true
      username: jw
      password: jkzl
@ -24,3 +22,11 @@ spring:
    config:
      uri: ${wlyy.pring.config.uri:http://172.17.110.212:1221}
      label: ${wlyy.spring.config.label:jwdev}
---
spring:
  profiles: jwprod
  cloud:
    config:
      uri: ${wlyy.pring.config.uri:http://172.17.110.212:1221}
      label: ${wlyy.spring.config.label:jwprod}

+ 6 - 0
svr/svr-base/pom.xml

@ -109,6 +109,12 @@
            <artifactId>elasticsearch-starter</artifactId>
            <version>2.0.0</version>
        </dependency>
        <!-- 文件服务器 -->
        <dependency>
            <groupId>com.yihu</groupId>
            <artifactId>fastdfs-starter</artifactId>
            <version>2.0.0</version>
        </dependency>
    </dependencies>

+ 1 - 1
svr/svr-base/src/main/java/com/yihu/SvrBaseApplication.java

@ -12,7 +12,7 @@ import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
 */
@SpringBootApplication
@EnableJpaAuditing
public class SvrBaseApplication  extends SpringBootServletInitializer  {
public class SvrBaseApplication extends SpringBootServletInitializer {
    public static void main(String[] args)  {
        SpringApplication.run(SvrBaseApplication.class, args);

+ 3 - 3
svr/svr-base/src/main/java/com/yihu/jw/base/activemq/ConsumerRunner.java

@ -1,6 +1,6 @@
package com.yihu.jw.base.activemq;
import com.yihu.utils.context.SpringContext;
import com.yihu.utils.context.SpringContextUtils;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -36,7 +36,7 @@ public class ConsumerRunner implements Runnable, ExceptionListener {
    private void init() {
        try {
            ActiveMQConnectionFactory connectionFactory = SpringContext.getService(ActiveMQConnectionFactory.class);
            ActiveMQConnectionFactory connectionFactory = SpringContextUtils.getService(ActiveMQConnectionFactory.class);
            // Create a Connection
            connection = connectionFactory.createQueueConnection();
            connection.start();
@ -54,7 +54,7 @@ public class ConsumerRunner implements Runnable, ExceptionListener {
    }
    private void recover() throws JMSException {
        ActiveMQConnectionFactory connectionFactory = SpringContext.getService(ActiveMQConnectionFactory.class);
        ActiveMQConnectionFactory connectionFactory = SpringContextUtils.getService(ActiveMQConnectionFactory.class);
        // Create a Connection
        connection = connectionFactory.createQueueConnection();
        connection.start();

+ 13 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/saas/SaasBusinessCardDao.java

@ -0,0 +1,13 @@
package com.yihu.jw.base.dao.saas;
import com.yihu.jw.entity.base.saas.SaasBusinessCardDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Dao - SAAS名片
 * Created by progr1mmer on 2018/9/7.
 */
public interface SaasBusinessCardDao extends PagingAndSortingRepository<SaasBusinessCardDO, Integer>, JpaSpecificationExecutor<SaasBusinessCardDO> {
}

+ 111 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/saas/SaasBusinessCardEndpoint.java

@ -0,0 +1,111 @@
package com.yihu.jw.base.endpoint.saas;
import com.yihu.jw.base.service.saas.SaasBusinessCardService;
import com.yihu.jw.entity.base.saas.SaasBusinessCardDO;
import com.yihu.jw.restmodel.base.saas.SaasBusinessCardVO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.rm.base.BaseRequestMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
 * Endpoint - SAAS名片
 * Created by progr1mmer on 2018/8/14.
 * @author progr1mmer
 */
@RestController
@RequestMapping(value = BaseRequestMapping.SaasBusinessCard.PREFIX)
@Api(value = "SAAS名片管理", description = "SAAS名片管理服务接口", tags = {"wlyy基础服务 - SAAS名片管理服务接口"})
public class SaasBusinessCardEndpoint extends EnvelopRestEndpoint {
    @Autowired
    private SaasBusinessCardService saasBusinessCardService;
    @PostMapping(value = BaseRequestMapping.SaasBusinessCard.CREATE, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ApiOperation(value = "创建")
    public ObjEnvelop<SaasBusinessCardVO> create (
            @ApiParam(name = "json", value = "Json数据", required = true)
            @RequestBody String jsonData) throws Exception {
        SaasBusinessCardDO saasBusinessCardDO = toEntity(jsonData, SaasBusinessCardDO.class);
        saasBusinessCardDO = saasBusinessCardService.save(saasBusinessCardDO);
        return success(saasBusinessCardDO, SaasBusinessCardVO.class);
    }
    @PostMapping(value = BaseRequestMapping.SaasBusinessCard.DELETE)
    @ApiOperation(value = "删除")
    public Envelop delete(
            @ApiParam(name = "ids", value = "id串,中间用,分隔", required = true)
            @RequestParam(value = "ids") String ids) {
        saasBusinessCardService.delete(ids.split(","));
        return success("删除成功");
    }
    @PostMapping(value = BaseRequestMapping.SaasBusinessCard.UPDATE, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ApiOperation(value = "更新")
    public Envelop update (
            @ApiParam(name = "json", value = "Json数据", required = true)
            @RequestBody String jsonData) throws Exception {
        SaasBusinessCardDO saasBusinessCardDO = toEntity(jsonData, SaasBusinessCardDO.class);
        if (null == saasBusinessCardDO.getId()) {
            return failed("ID不能为空", Envelop.class);
        }
        saasBusinessCardDO = saasBusinessCardService.save(saasBusinessCardDO);
        return success(saasBusinessCardDO);
    }
    @GetMapping(value = BaseRequestMapping.SaasBusinessCard.PAGE)
    @ApiOperation(value = "获取分页")
    public PageEnvelop<SaasBusinessCardVO> page (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts,
            @ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1")
            @RequestParam(value = "page") int page,
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
            @RequestParam(value = "size") int size) throws Exception {
        List<SaasBusinessCardDO> saasBusinessCardDOS = saasBusinessCardService.search(fields, filters, sorts, page, size);
        int count = (int)saasBusinessCardService.getCount(filters);
        return success(saasBusinessCardDOS, count, page, size, SaasBusinessCardVO.class);
    }
    @GetMapping(value = BaseRequestMapping.SaasBusinessCard.LIST)
    @ApiOperation(value = "获取列表")
    public ListEnvelop<SaasBusinessCardVO> list (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts) throws Exception {
        List<SaasBusinessCardDO> saasBusinessCardDOS = saasBusinessCardService.search(fields, filters, sorts);
        return success(saasBusinessCardDOS, SaasBusinessCardVO.class);
    }
    @GetMapping(value = BaseRequestMapping.SaasBusinessCard.GENERATE)
    @ApiOperation(value = "生成名片")
    public ObjEnvelop<Map> generate (
            @ApiParam(name = "type", value = "名片类型", required = true)
            @RequestParam(value = "type") SaasBusinessCardDO.Type type,
            @ApiParam(name = "saasId", value = "SAAS ID", required = true)
            @RequestParam(value = "saasId") String saasId,
            @ApiParam(name = "sourceId", value = "实体对象ID,如医生、居民", required = true)
            @RequestParam(value = "sourceId") String sourceId) throws Exception {
        Map<String, Object> card = saasBusinessCardService.generateBusinessCard(type, saasId, sourceId);
        return success(card);
    }
}

+ 96 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/sms/SmsEndpoint.java

@ -0,0 +1,96 @@
package com.yihu.jw.base.endpoint.sms;
import com.yihu.jw.base.service.sms.SmsService;
import com.yihu.jw.entity.base.sms.SmsDO;
import com.yihu.jw.restmodel.base.sms.SmsVO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.rm.base.BaseRequestMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * Endpoint - 短信记录
 * Created by progr1mmer on 2018/9/6.
 */
@RestController
@RequestMapping(value = BaseRequestMapping.Sms.PREFIX)
@Api(value = "短信记录管理", description = "短信记录管理服务接口", tags = {"wlyy基础服务 - 短信记录管理服务接口"})
public class SmsEndpoint extends EnvelopRestEndpoint {
    @Autowired
    private SmsService smsService;
    @PostMapping(value = BaseRequestMapping.Sms.CREATE, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ApiOperation(value = "创建")
    public ObjEnvelop<SmsVO> create (
            @ApiParam(name = "json_data", value = "Json数据", required = true)
            @RequestBody String jsonData) throws Exception {
        SmsDO smsDO = toEntity(jsonData, SmsDO.class);
        smsDO = smsService.save(smsDO);
        return success(smsDO, SmsVO.class);
    }
    @PostMapping(value = BaseRequestMapping.Sms.DELETE)
    @ApiOperation(value = "删除")
    public Envelop delete(
            @ApiParam(name = "ids", value = "id串,中间用,分隔", required = true)
            @RequestParam(value = "ids") String ids) {
        smsService.delete(ids.split(","));
        return success("删除成功");
    }
    @PostMapping(value = BaseRequestMapping.Sms.UPDATE, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ApiOperation(value = "更新")
    public ObjEnvelop<SmsVO> update (
            @ApiParam(name = "json_data", value = "Json数据", required = true)
            @RequestBody String jsonData) throws Exception {
        SmsDO smsDO = toEntity(jsonData, SmsDO.class);
        if (null == smsDO.getId()) {
            return failed("ID不能为空", ObjEnvelop.class);
        }
        smsDO = smsService.save(smsDO);
        return success(smsDO, SmsVO.class);
    }
    @GetMapping(value = BaseRequestMapping.Sms.PAGE)
    @ApiOperation(value = "获取分页")
    public PageEnvelop<SmsVO> page (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts,
            @ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1")
            @RequestParam(value = "page") int page,
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
            @RequestParam(value = "size") int size) throws Exception {
        List<SmsDO> smsDOS = smsService.search(fields, filters, sorts, page, size);
        int count = (int)smsService.getCount(filters);
        return success(smsDOS, count, page, size, SmsVO.class);
    }
    @GetMapping(value = BaseRequestMapping.Sms.LIST)
    @ApiOperation(value = "获取列表")
    public ListEnvelop<SmsVO> list (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts) throws Exception {
        List<SmsDO> smsDOS = smsService.search(fields, filters, sorts);
        return success(smsDOS, SmsVO.class);
    }
}

+ 2 - 2
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/sms/SmsGatewayEndpoint.java

@ -40,7 +40,7 @@ public class SmsGatewayEndpoint extends EnvelopRestEndpoint {
            @RequestBody String jsonData) throws Exception {
        SmsGatewayDO smsGatewayDO = toEntity(jsonData, SmsGatewayDO.class);
        smsGatewayDO = smsGatewayService.save(smsGatewayDO);
        return success(convertToModel(smsGatewayDO, SmsGatewayVO.class));
        return success(smsGatewayDO, SmsGatewayVO.class);
    }
    @PostMapping(value = BaseRequestMapping.SmsGateway.DELETE)
@ -62,7 +62,7 @@ public class SmsGatewayEndpoint extends EnvelopRestEndpoint {
            return failed("ID不能为空", ObjEnvelop.class);
        }
        smsGatewayDO = smsGatewayService.save(smsGatewayDO);
        return success(convertToModel(smsGatewayDO, SmsGatewayVO.class));
        return success(smsGatewayDO, SmsGatewayVO.class);
    }
    @GetMapping(value = BaseRequestMapping.SmsGateway.PAGE)

+ 2 - 2
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/sms/SmsTemplateEndpoint.java

@ -37,7 +37,7 @@ public class SmsTemplateEndpoint extends EnvelopRestEndpoint {
            @RequestBody String jsonData) throws Exception {
        SmsTemplateDO smsTemplateDO = toEntity(jsonData, SmsTemplateDO.class);
        smsTemplateDO = smsTemplateService.save(smsTemplateDO);
        return success(convertToModel(smsTemplateDO, SmsTemplateVO.class));
        return success(smsTemplateDO, SmsTemplateVO.class);
    }
    @PostMapping(value = BaseRequestMapping.SmsTemplate.DELETE)
@ -59,7 +59,7 @@ public class SmsTemplateEndpoint extends EnvelopRestEndpoint {
            return failed("ID不能为空", ObjEnvelop.class);
        }
        smsTemplateDO = smsTemplateService.save(smsTemplateDO);
        return success(convertToModel(smsTemplateDO, SmsTemplateVO.class));
        return success(smsTemplateDO, SmsTemplateVO.class);
    }
    @GetMapping(value = BaseRequestMapping.SmsTemplate.PAGE)

+ 38 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/wx/WeChatQrcodeController.java

@ -0,0 +1,38 @@
package com.yihu.jw.base.endpoint.wx;
import com.yihu.jw.base.service.wx.WeChatQrcodeService;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.rm.base.BaseRequestMapping;
import com.yihu.jw.rm.base.WechatRequestMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
 * Created by Trick on 2018/9/7.
 */
@RestController
@RequestMapping(BaseRequestMapping.WeChat.PREFIX)
@Api(value = "微信二维码", description = "微信二维码", tags = {"微信二维码服务 - 微信二维码"})
public class WeChatQrcodeController extends EnvelopRestEndpoint {
    @Autowired
    private WeChatQrcodeService weChatQrcodeService;
    @PostMapping(value = WechatRequestMapping.WxMenu.api_create, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ApiOperation(value = "生成微信二维码", notes = "生成微信二维码")
    public Envelop getQrcode(@ApiParam(name = "wxId", value = "微信id")
                             @RequestParam(value = "wxId", required = true)String wxId,
                             @ApiParam(name = "scene", value = "场景值")
                             @RequestParam(value = "scene", required = true)String scene) throws Exception{
        return success(weChatQrcodeService.getQrcode(wxId,scene));
    }
}

+ 1 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/wx/WechatCoreController.java

@ -28,7 +28,7 @@ import java.util.List;
 */
@RestController
@RequestMapping(BaseRequestMapping.WeChat.PREFIX)
@Api(value = "微信回调及事件处理", description = "微信回调及事件处理")
@Api(value = "微信回调及事件处理", description = "微信回调及事件处理", tags = {"微信核心服务 - 微信服务器回调及事件处理"})
public class WechatCoreController extends EnvelopRestEndpoint {
    private Logger logger = LoggerFactory.getLogger(WechatCoreController.class);

+ 1 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/wx/WxMenuController.java

@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
 */
@RestController
@RequestMapping(WechatRequestMapping.api_common)
@Api(value = "微信菜单相关操作", description = "微信菜单相关操作")
@Api(value = "微信菜单相关操作", description = "微信菜单相关操作", tags = {"微信管理 - 微信菜单相关操作"})
public class WxMenuController extends EnvelopRestEndpoint {
    @Autowired

+ 1 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/wx/WxTemplateController.java

@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
 */
@RestController
@RequestMapping(WechatRequestMapping.api_common)
@Api(value = "微信模版相关操作", description = "微信模版相关操作")
@Api(value = "微信模版相关操作", description = "微信模版相关操作", tags = {"微信管理 - 微信模版相关操作"})
public class WxTemplateController extends EnvelopRestEndpoint {
    @Autowired

+ 41 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/saas/SaasBusinessCardService.java

@ -0,0 +1,41 @@
package com.yihu.jw.base.service.saas;
import com.yihu.jw.base.dao.saas.SaasBusinessCardDao;
import com.yihu.jw.base.service.doctor.BaseDoctorService;
import com.yihu.jw.entity.base.saas.SaasBusinessCardDO;
import com.yihu.mysql.query.BaseJpaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
 * Service - SAAS名片
 * Created by progr1mmer on 2018/9/7.
 */
@Service
public class SaasBusinessCardService extends BaseJpaService<SaasBusinessCardDO, SaasBusinessCardDao> {
    @Autowired
    private BaseDoctorService doctorService;
    public Map<String, Object> generateBusinessCard(SaasBusinessCardDO.Type type, String saasId, String id) throws Exception {
        List<SaasBusinessCardDO> saasBusinessCardDO = search("type=" + type  + ";saasId=" + saasId);
        Map<String, Object> card = new HashMap<>();
        if (type == SaasBusinessCardDO.Type.doctor) {
            //模拟加载医生数据
            Map<String, Object> source = new HashMap<>();
            saasBusinessCardDO.forEach(item -> card.put(item.getField(), source.get(item.getField())));
            return card;
        } else if (type == SaasBusinessCardDO.Type.patient) {
            //模拟加载居民数据
            Map<String, Object> source = new HashMap<>();
            saasBusinessCardDO.forEach(item -> card.put(item.getField(), source.get(item.getField())));
            return card;
        }
        return card;
    }
}

+ 8 - 2
svr/svr-base/src/main/java/com/yihu/jw/base/service/sms/SmsGatewayService.java

@ -91,13 +91,14 @@ public class SmsGatewayService extends BaseJpaService<SmsGatewayDO, SmsGatewayDa
        HttpResponse httpResponse = HttpUtils.doPost(smsGatewayDO.getRequestUrl(), objectMapper.readValue(rawCertificate, Map.class));
        if (httpResponse.isSuccessFlg()) {
            Map<String, Object> response = objectMapper.readValue(httpResponse.getContent(), Map.class);
            if (response.get(smsGatewayDO.getResponseCode()).equals(smsGatewayDO.getSuccessValue())) {
            String responseCode = String.valueOf(response.get(smsGatewayDO.getResponseCode()));
            if (responseCode.equals(smsGatewayDO.getSuccessValue())) {
                HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
                SmsDO smsDO = new SmsDO();
                smsDO.setClientId(clientId);
                smsDO.setSmsGatewayId(smsGatewayDO.getId());
                smsDO.setRequestIp(IPInfoUtils.getIPAddress(request));
                smsDO.setTo(to);
                smsDO.setMobile(to);
                smsDO.setContent(sendContent);
                smsDO.setDeadline(DateUtils.addMinutes(new Date(), smsGatewayDO.getExpireMin()));
                smsDO.setCaptcha(contentDatas[0]);
@ -111,4 +112,9 @@ public class SmsGatewayService extends BaseJpaService<SmsGatewayDO, SmsGatewayDa
        }
    }
    public static void main(String [] args) {
        Object obj = 1;
        System.out.println(obj.toString());
    }
}

+ 15 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/sms/SmsService.java

@ -0,0 +1,15 @@
package com.yihu.jw.base.service.sms;
import com.yihu.jw.base.dao.sms.SmsDao;
import com.yihu.jw.entity.base.sms.SmsDO;
import com.yihu.mysql.query.BaseJpaService;
import org.springframework.stereotype.Service;
/**
 * Service - 短信记录
 * Created by progr1mmer on 2018/9/6.
 */
@Service
public class SmsService extends BaseJpaService<SmsDO, SmsDao>{
}

+ 51 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/wx/WeChatQrcodeService.java

@ -0,0 +1,51 @@
package com.yihu.jw.base.service.wx;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.yihu.fastdfs.FastDFSUtil;
import com.yihu.jw.util.wechat.wxhttp.HttpUtil;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
/**
 * 微信二维码
 * Created by Trick on 2018/9/7.
 */
@Service
public class WeChatQrcodeService {
    @Autowired
    private FastDFSUtil fastDFSHelper;
    @Autowired
    private WxAccessTokenService wxAccessTokenService;
    public String getQrcode(String wechatId,String scene) throws Exception{
        String token_url = "https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=" + wxAccessTokenService.getWxAccessTokenById(wechatId);
        String params = "{\"action_name\": \"QR_LIMIT_STR_SCENE\", \"action_info\": {\"scene\": {\"scene_str\": \"" + scene + "\"}}}";
        String result = HttpUtil.sendPost(token_url, params);
        if (!StringUtils.isEmpty(result)) {
            JSONObject json = new JSONObject(result);
            if (json.has("ticket")) {
                // 请求输入流
                InputStream inputStream = null;
                // 下载二维码图片
                URL urlGet = new URL("https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket="
                        + URLEncoder.encode(json.get("ticket").toString(), "UTF-8"));
                HttpURLConnection connection = (HttpURLConnection) urlGet.openConnection();
                connection.connect();
                inputStream = connection.getInputStream();
                ObjectNode objectNode = fastDFSHelper.upload(inputStream,"png","微信二维码");
                return objectNode.get("fileId").toString().replaceAll("\"", "");
            }
        }
        return null;
    }
}

+ 48 - 54
svr/svr-base/src/main/resources/application.yml

@ -1,6 +1,6 @@
#通用的配置不用区分环境变量
server:
  #port: ${server.svr-base-port}
  port: 10020
  port: ${server.svr-base-port}
spring:
  datasource:
@ -20,28 +20,15 @@ spring:
    test-while-idle: true #指明连接是否被空闲连接回收器(如果有)进行检验,如果检测失败,则连接将被从池中去除
    min-evictable-idle-time-millis: 3600000 #连接池中连接,在时间段内一直空闲,被逐出连接池的时间(1000*60*60),以毫秒为单位
    time-between-eviction-runs-millis: 300000 #在空闲连接回收器线程运行期间休眠的时间值,以毫秒为单位,一般比minEvictableIdleTimeMillis小
  sleuth:
    sampler:
      percentage: 1.0 #采用需要的请求的百分比 默认是0.1 即 10%
  elasticsearch: #ElasticsearchProperties
    cluster-name: jkzl #默认即为elasticsearch  集群名
    cluster-nodes: 172.19.103.45:9300,172.19.103.68:9300 #配置es节点信息,逗号分隔,如果没有指定,则启动ClientNode
    cluster-nodes-jest: http://172.19.103.45:9200,http://172.19.103.68:9200  #多个逗号分割
    local: false #是否本地连接
    properties: # Additional properties used to configure the client.
      enable: true
  # JEST (Elasticsearch HTTP client) (JestProperties)
    jest:
      uris: http://172.19.103.45:9200,http://172.19.103.68:9200
#      uris: http://172.19.103.68:9200
      connection-timeout: 60000 # Connection timeout in milliseconds.
      multi-threaded: true # Enable connection requests from multiple execution threads.
hibernate:
  dialect: org.hibernate.dialect.MySQL5Dialect
  show_sql: true
#    naming_strategy: org.hibernate.cfg.ImprovedNamingStrategy #springJPA使用驼峰式(hibernate4以下使用)
  physical_naming_strategy: org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy #springJPA使用驼峰式(hibernate5以上使用)
  implicit_naming_strategy: org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyHbmImpl
es:
  index:
    servicePackLog: base_service_package_log
  type:
    servicePackLog: base_service_package_log
---
spring:
@ -50,54 +37,61 @@ spring:
    url: jdbc:mysql://172.19.103.77/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true
    username: root
    password: 123456
  zipkin:
    base-url: http://localhost:9411 #日志追踪的地址
  sleuth:
    sampler:
      percentage: 1.0 #采用需要的请求的百分比 默认是0.1 即 10%
  elasticsearch:
    cluster-name: jkzl #集群名 默认elasticsearch
    cluster-nodes: 172.19.103.45:9300,172.19.103.68:9300 #配置es节点信息,逗号分隔,如果没有指定,则启动ClientNode
    client-transport-sniff: false
    jest:
      uris: http://172.19.103.45:9200,http://172.19.103.68:9200
      connection-timeout: 60000 # Connection timeout in milliseconds.
      multi-threaded: true # Enable connection requests from multiple execution threads.
  activemq:
    broker-url: tcp://172.19.103.87:61616
    user: admin
    password: admin
es:
  index:
    servicePackLog: base_service_package_log
  type:
    servicePackLog: base_service_package_log
  zipkin:
    base-url: http://localhost:9411 #日志追踪的地址
---
spring:
  profiles: jwtest
  datasource:
    url: jdbc:mysql://172.19.103.77/jw2?useUnicode:true&characterEncoding=utf-8&autoReconnect=true
    url: jdbc:mysql://172.19.103.77/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true
    username: root
    password: 123456
  elasticsearch:
    cluster-name: jkzl #集群名 默认elasticsearch
    cluster-nodes: 172.19.103.45:9300,172.19.103.68:9300 #配置es节点信息,逗号分隔,如果没有指定,则启动ClientNode
    client-transport-sniff: false
    jest:
      uris: http://172.19.103.45:9200,http://172.19.103.68:9200
      connection-timeout: 60000 # Connection timeout in milliseconds.
      multi-threaded: true # Enable connection requests from multiple execution threads.
  activemq:
    broker-url: tcp://172.19.103.87:61616
    user: admin
    password: admin
  zipkin:
    base-url: http://192.168.131.173:${server.svr-logServer-port} #日志追踪的地址
  sleuth:
    sampler:
      percentage: 1.0 #采用需要的请求的百分比 默认是0.1 即 10%
    base-url: http://localhost:9411 #日志追踪的地址
es:
  index:
    servicePackLog: base_service_package_log
  type:
    servicePackLog: base_service_package_log
---
spring:
  profiles: jwprod
  datasource:
    url: jdbc:mysql://172.19.103.77/jw2?useUnicode:true&characterEncoding=utf-8&autoReconnect=true
    url: jdbc:mysql://172.19.103.77/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true
    username: root
    password: 123456
  elasticsearch:
    cluster-name: jkzl #集群名 默认elasticsearch
    cluster-nodes: 172.19.103.45:9300,172.19.103.68:9300 #配置es节点信息,逗号分隔,如果没有指定,则启动ClientNode
    client-transport-sniff: false
    jest:
      uris: http://172.19.103.45:9200,http://172.19.103.68:9200
      connection-timeout: 60000 # Connection timeout in milliseconds.
      multi-threaded: true # Enable connection requests from multiple execution threads.
  activemq:
    broker-url: tcp://172.19.103.87:61616
    user: admin
    password: admin
  zipkin:
    base-url: http://192.168.131.173:${server.svr-logServer-port} #日志追踪的地址
  sleuth:
    sampler:
      percentage: 1.0 #采用需要的请求的百分比 默认是0.1 即 10%
es:
  index:
    servicePackLog: base_service_package_log
  type:
    servicePackLog: base_service_package_log
    base-url: http://localhost:9411 #日志追踪的地址

+ 4 - 15
svr/svr-wlyy-specialist/pom.xml

@ -94,39 +94,28 @@
            <artifactId>common-util</artifactId>
        </dependency>
        <!-- jkzl starter -->
        <dependency>
            <groupId>com.yihu</groupId>
            <artifactId>swagger-starter</artifactId>
            <version>2.0.0</version>
        </dependency>
        <dependency>
            <groupId>com.yihu</groupId>
            <artifactId>mysql-starter</artifactId>
            <version>2.0.0</version>
        </dependency>
        <!--<dependency>-->
            <!--<groupId>com.yihu.ehr</groupId>-->
            <!--<artifactId>commons-util</artifactId>-->
            <!--<version>1.1.0</version>-->
        <!--</dependency>-->
        <!-- jkzl starter -->
        <dependency>
            <groupId>com.yihu</groupId>
            <artifactId>fastdfs-starter</artifactId>
            <version>2.0.0</version>
        </dependency>
        <dependency>
            <groupId>net.sourceforge.jexcelapi</groupId>
            <artifactId>jxl</artifactId>
            <version>2.6</version>
        </dependency>
        <!--<dependency>
            <groupId>com.yihu.ehr</groupId>
            <artifactId>commons-util</artifactId>
            <version>1.1.0</version>
            <scope>compile</scope>
        </dependency>-->
    </dependencies>
    <build>

+ 10 - 6
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/controller/SpecialistHospitalServiceItemController.java

@ -69,12 +69,14 @@ public class SpecialistHospitalServiceItemController extends EnvelopRestEndpoint
    @PostMapping(value = SpecialistMapping.serviceItem.selectByHospital)
    @ApiOperation(value = "根据医院Code查找机构服务项目")
    public MixEnvelop<HospitalServiceItemDO,HospitalServiceItemDO> selectByHospital(@ApiParam(name = "hospitals", value = "医院code集合")
                                                                          @RequestParam(value = "hospitals")String hospitals){
                                                                          @RequestParam(value = "hospitals",required = false)String hospitals){
        try {
            JSONArray array = JSONArray.parseArray(hospitals);
            List<String> hospitalList = new ArrayList<>();
            for (int i =0 ;i<array.size();i++){
                hospitalList.add(array.getString(i));
            if (array != null || array.size()!=0){
                for (int i =0 ;i<array.size();i++){
                    hospitalList.add(array.getString(i));
                }
            }
            return specialistHospitalServiceItemService.selectByHospital(hospitalList);
        }catch (Exception e){
@ -146,11 +148,13 @@ public class SpecialistHospitalServiceItemController extends EnvelopRestEndpoint
    @PostMapping(value = SpecialistMapping.serviceItem.deleteHospitalItem)
    @ApiOperation(value = "删除机构服务项目")
    public MixEnvelop<Boolean,Boolean> delete(@ApiParam(name = "hospital", value = "医院code")
                                              @RequestParam(name = "hospital")String hospital,
                                              @RequestParam(name = "hospital",required = false)String hospital,
                                              @ApiParam(name = "serviceItem", value = "服务项目code")
                                              @RequestParam(name = "serviceItem")String serviceItem){
                                              @RequestParam(name = "serviceItem",required = false)String serviceItem,
                                              @ApiParam(name = "id", value = "机构服务项目id")
                                                  @RequestParam(name = "id",required = false)String id){
        try {
            return specialistHospitalServiceItemService.delete(hospital,serviceItem);
            return specialistHospitalServiceItemService.delete(hospital,serviceItem,id);
        }catch (Exception e){
            e.printStackTrace();
            tracer.getCurrentSpan().logEvent(e.getMessage());

+ 43 - 25
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/controller/rehabilitation/RehabilitationManageController.java

@ -13,6 +13,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
 * Created by 刘文彬 on 2018/8/16.
 */
@ -106,7 +108,7 @@ public class RehabilitationManageController {
                                         @ApiParam(name = "status", value = "任务状态(0未完成,1已完成,2已预约)", required = false)
                                         @RequestParam(value = "status", required = false)Integer status,
                                         @ApiParam(name = "doctorCode", value = "医生code(专科医生、家庭医生)", required = false)
                                         @RequestParam(value = "doctorCode", required = true)String doctorCode){
                                         @RequestParam(value = "doctorCode", required = false)String doctorCode){
        try {
            return rehabilitationManageService.calendarPlanDetailList(planId,searchTask,status,doctorCode,executeStartTime,executeEndTime);
        }catch (Exception e){
@ -146,8 +148,8 @@ public class RehabilitationManageController {
    @ApiOperation(value = "康复管理-保存指导留言")
    public Envelop saveGuidanceMessage(@ApiParam(name = "messageId", value = "消息id", required = true)
                                       @RequestParam(value = "messageId", required = true)String messageId,
                                       @ApiParam(name = "patientCode", value = "居民code", required = true)
                                       @RequestParam(value = "patientCode", required = true)String patientCode,
//                                       @ApiParam(name = "patientCode", value = "居民code", required = true)
//                                       @RequestParam(value = "patientCode", required = true)String patientCode,
                                       @ApiParam(name = "doctorCode", value = "医生code", required = true)
                                       @RequestParam(value = "doctorCode", required = true)String doctorCode,
                                       @ApiParam(name = "doctorType", value = "医生类型(1、专科医生,2、家庭医生)", required = true)
@ -155,9 +157,11 @@ public class RehabilitationManageController {
                                       @ApiParam(name = "content", value = "聊天内容", required = true)
                                       @RequestParam(value = "content", required = true)String content,
                                       @ApiParam(name = "planDetailId", value = "服务项目id", required = true)
                                       @RequestParam(value = "planDetailId", required = true)String planDetailId){
                                       @RequestParam(value = "planDetailId", required = true)String planDetailId,
                                       @ApiParam(name = "contentType", value = "内容类型(1,6,8 - 文本, 2,9- 图片, 3 - 语音, 4-文章, 5,7系统消息。12-语音 18-居民名片, 19-聊天记录)", required = true)
                                       @RequestParam(value = "contentType", required = true)Integer contentType){
        try {
            return rehabilitationManageService.saveGuidanceMessage(messageId,patientCode,doctorCode,doctorType,content,planDetailId);
            return rehabilitationManageService.saveGuidanceMessage(messageId,doctorCode,doctorType,content,planDetailId,contentType);
        }catch (Exception e){
            e.printStackTrace();
            tracer.getCurrentSpan().logEvent(e.getMessage());
@ -184,14 +188,14 @@ public class RehabilitationManageController {
    @ApiOperation(value = "康复管理-居民详情页")
    public Envelop patientRehabilitationDetail(@ApiParam(name = "patientCode", value = "居民code", required = true)
                                       @RequestParam(value = "patientCode", required = true)String patientCode,
                                       @ApiParam(name = "healthDoctor", value = "健管师医生code", required = true)
                                       @RequestParam(value = "healthDoctor", required = true)String healthDoctor,
                                       @ApiParam(name = "healthDoctorName", value = "健管师医生名称", required = true)
                                       @RequestParam(value = "healthDoctorName", required = true)String healthDoctorName,
                                       @ApiParam(name = "generalDoctor", value = "全科医生code", required = true)
                                       @RequestParam(value = "generalDoctor", required = true)String generalDoctor,
                                       @ApiParam(name = "generalDoctorName", value = "全科医生名称", required = true)
                                       @RequestParam(value = "generalDoctorName", required = true)String generalDoctorName){
                                       @ApiParam(name = "healthDoctor", value = "健管师医生code", required = false)
                                       @RequestParam(value = "healthDoctor", required = false)String healthDoctor,
                                       @ApiParam(name = "healthDoctorName", value = "健管师医生名称", required = false)
                                       @RequestParam(value = "healthDoctorName", required = false)String healthDoctorName,
                                       @ApiParam(name = "generalDoctor", value = "全科医生code", required = false)
                                       @RequestParam(value = "generalDoctor", required = false)String generalDoctor,
                                       @ApiParam(name = "generalDoctorName", value = "全科医生名称", required = false)
                                       @RequestParam(value = "generalDoctorName", required = false)String generalDoctorName){
        try {
            return rehabilitationManageService.patientRehabilitationDetail(patientCode,healthDoctor, healthDoctorName,generalDoctor,generalDoctorName);
        }catch (Exception e){
@ -227,14 +231,14 @@ public class RehabilitationManageController {
    @ApiOperation(value = "康复管理-医生端居民详情服务医生列表")
    public Envelop serviceDoctorList(@ApiParam(name = "patientCode", value = "居民code", required = true)
                                               @RequestParam(value = "patientCode", required = true)String patientCode,
                                               @ApiParam(name = "healthDoctor", value = "健管师医生code", required = true)
                                               @RequestParam(value = "healthDoctor", required = true)String healthDoctor,
                                               @ApiParam(name = "healthDoctorName", value = "健管师医生名称", required = true)
                                               @RequestParam(value = "healthDoctorName", required = true)String healthDoctorName,
                                               @ApiParam(name = "generalDoctor", value = "全科医生code", required = true)
                                               @RequestParam(value = "generalDoctor", required = true)String generalDoctor,
                                               @ApiParam(name = "generalDoctorName", value = "全科医生名称", required = true)
                                               @RequestParam(value = "generalDoctorName", required = true)String generalDoctorName){
                                               @ApiParam(name = "healthDoctor", value = "健管师医生code", required = false)
                                               @RequestParam(value = "healthDoctor", required = false)String healthDoctor,
                                               @ApiParam(name = "healthDoctorName", value = "健管师医生名称", required = false)
                                               @RequestParam(value = "healthDoctorName", required = false)String healthDoctorName,
                                               @ApiParam(name = "generalDoctor", value = "全科医生code", required = false)
                                               @RequestParam(value = "generalDoctor", required = false)String generalDoctor,
                                               @ApiParam(name = "generalDoctorName", value = "全科医生名称", required = false)
                                               @RequestParam(value = "generalDoctorName", required = false)String generalDoctorName){
        try {
            return rehabilitationManageService.serviceDoctorList(patientCode,healthDoctor, healthDoctorName,generalDoctor,generalDoctorName);
        }catch (Exception e){
@ -282,14 +286,15 @@ public class RehabilitationManageController {
    @PostMapping(value = SpecialistMapping.rehabilitation.updateNoteAndImageRehabilitationOperate)
    @ApiOperation(value = "康复计划完成时更新服务完成笔记和图片接口并且确认完成")
    public Envelop updateNoteAndImageRehabilitationOperate(@ApiParam(name = "planDetailId", value = "服务项目id", required = true)@RequestParam(value = "planDetailId", required = true)String planDetailId,
    public ObjEnvelop updateNoteAndImageRehabilitationOperate(@ApiParam(name = "planDetailId", value = "服务项目id", required = true)@RequestParam(value = "planDetailId", required = true)String planDetailId,
                                                           @ApiParam(name = "node", value = "服务完成笔记", required = true)@RequestParam(value = "node", required = false)String node,
                                                           @ApiParam(name = "image", value = "相关记录图片,json格式", required = true)@RequestParam(value = "image", required = false)String image){
        try {
            if(rehabilitationManageService.updateNodeAndRelationRecordImg(node,image,planDetailId)>1){
                return Envelop.getSuccess(SpecialistMapping.api_success);
            Map<String,Object> map = rehabilitationManageService.updateNodeAndRelationRecordImg(node,image,planDetailId);
            if(Integer.parseInt(String.valueOf(map.get("count")))>1){
                return ObjEnvelop.getSuccess(SpecialistMapping.api_success,map);
            }
            return Envelop.getError("update error!");
            return ObjEnvelop.getError("update error!");
        }catch (Exception e){
            e.printStackTrace();
            tracer.getCurrentSpan().logEvent(e.getMessage());
@ -311,4 +316,17 @@ public class RehabilitationManageController {
            return Envelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = SpecialistMapping.rehabilitation.planSchedule)
    @ApiOperation(value = "康复管理-计划总进度")
    public ObjEnvelop planSchedule(@ApiParam(name = "planId", value = "计划id", required = true)
                                                       @RequestParam(value = "planId", required = true)String planId){
        try {
            return rehabilitationManageService.planSchedule(planId);
        }catch (Exception e){
            e.printStackTrace();
            tracer.getCurrentSpan().logEvent(e.getMessage());
            return ObjEnvelop.getError(e.getMessage());
        }
    }
}

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 17 - 12
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/controller/rehabilitation/RehabilitationPlanController.java


+ 1 - 1
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/dao/SpecialistPatientRelationDao.java

@ -17,6 +17,6 @@ public interface SpecialistPatientRelationDao extends PagingAndSortingRepository
    @Query("select p from SpecialistPatientRelationDO p where p.doctor=?1 and p.patient =?2 and p.status>=0")
    public SpecialistPatientRelationDO findByDoctorAndPatient(String doctor,String patient);
    @Query("select p from SpecialistPatientRelationDO p where p.doctor=?1 and p.patient=?2 and p.signStatus='1' and p.status=1 ")
    @Query("select p from SpecialistPatientRelationDO p where p.doctor=?1 and p.patient=?2 and p.signStatus='1' and p.status>=0 ")
    SpecialistPatientRelationDO findByPatientAndDoctor(String doctor,String patient);
}

+ 3 - 0
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/dao/rehabilitation/RehabilitationDetailDao.java

@ -62,4 +62,7 @@ public interface RehabilitationDetailDao extends PagingAndSortingRepository<Reha
    @Modifying
    @Query("update RehabilitationDetailDO t set t.status = ?1 where t.id=?2 ")
    int updateStatusById(Integer status,String id);
    @Query(value ="select p.patient from wlyy_rehabilitation_plan_detail d left join wlyy_patient_rehabilitation_plan p on d.plan_id=p.id where d.id=?1",nativeQuery = true)
    List<String> findPatientById(String planDetailId);
}

+ 12 - 6
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/SpecialistHospitalServiceItemService.java

@ -17,7 +17,9 @@ import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import javax.transaction.Transactional;
import java.util.*;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
 * @author wangzhinan
@ -70,6 +72,8 @@ public class SpecialistHospitalServiceItemService extends EnvelopRestEndpoint {
            }
            buffer.deleteCharAt(buffer.length()-1);
            buffer.append(")");
        }else{
            buffer.append("");
        }
        String sql = "select * from wlyy_hospital_service_item where 1=1 "+buffer;
        List<HospitalServiceItemDO> hospitalServiceItemDOS = jdbcTemplate.query(sql,new BeanPropertyRowMapper(HospitalServiceItemDO.class));
@ -93,7 +97,7 @@ public class SpecialistHospitalServiceItemService extends EnvelopRestEndpoint {
        MixEnvelop<JSONArray,JSONArray> envelop = new MixEnvelop<>();
        String sqlUtil = "";
        if (StringUtils.isNoneBlank(serviceItemName)||serviceItemName != null){
            sqlUtil="and service_item_name = '"+serviceItemName+"'";
            sqlUtil="and service_item_name LIKE '%"+serviceItemName+"%'";
        }
        List<HospitalServiceItemDO> hospitalServiceItemDOS1 = new ArrayList<>();
        if (StringUtils.isNoneBlank(hospital)&&hospital.equals(docHospital)){
@ -111,7 +115,7 @@ public class SpecialistHospitalServiceItemService extends EnvelopRestEndpoint {
                hospitalServiceItemDOS1.add(hospitalServiceItemDO);
            }
        }else{
            String sql = "select * from wlyy_hospital_service_item where 1=1 AND hospital = '"+hospital+"' "+sqlUtil;
            String sql = "select * from wlyy_hospital_service_item where 1=1 AND hospital = '"+hospital+"' ";
            List<HospitalServiceItemDO> hospitalServiceItemDOS = jdbcTemplate.query(sql,new BeanPropertyRowMapper(HospitalServiceItemDO.class));
            String sql1 = "select * from wlyy_hospital_service_item where 1=1 AND hospital = '"+docHospital+"' "+sqlUtil;
            List<HospitalServiceItemDO> hospitalServiceItemDOList = jdbcTemplate.query(sql1,new BeanPropertyRowMapper(HospitalServiceItemDO.class));
@ -275,7 +279,7 @@ public class SpecialistHospitalServiceItemService extends EnvelopRestEndpoint {
            buffer.deleteCharAt(buffer.length()-1);
            buffer.append(")");
        }
        String sql = "select * from wlyy_hospital_service_item where 1=1 AND status=1"+buffer;
        String sql = "select * from wlyy_hospital_service_item where 1=1 AND status = 1"+buffer;
        List<HospitalServiceItemDO> hospitalServiceItemDOS = jdbcTemplate.query(sql,new BeanPropertyRowMapper(HospitalServiceItemDO.class));
        for (HospitalServiceItemDO hospitalServiceItemDO:hospitalServiceItemDOS){
            SpecialistServiceItemDO specialistServiceItemDO = specialistServiceItemDao.findOne(hospitalServiceItemDO.getServiceItemId());
@ -303,7 +307,7 @@ public class SpecialistHospitalServiceItemService extends EnvelopRestEndpoint {
     * @param serviceItemId 服务项目id
     * @return
     */
    public MixEnvelop<Boolean,Boolean> delete(String hospital, String serviceItemId){
    public MixEnvelop<Boolean,Boolean> delete(String hospital, String serviceItemId,String id){
        MixEnvelop<Boolean,Boolean> envelop = new MixEnvelop<>();
        if (StringUtils.isNoneBlank(hospital)){
            String sql = "update wlyy_hospital_service_item set status = 0 where hospital = '"+hospital+"'";
@ -311,8 +315,10 @@ public class SpecialistHospitalServiceItemService extends EnvelopRestEndpoint {
        }else if (StringUtils.isNoneBlank(serviceItemId)){
            String sql = "update wlyy_hospital_service_item set status = 0 where service_item_id = '"+serviceItemId+"'";
            jdbcTemplate.update(sql);
        }else if (StringUtils.isNoneBlank(id)){
            String sql = "update wlyy_hospital_service_item set status = 0 where id = '"+id+"'";
            jdbcTemplate.update(sql);
        }
        return envelop;
    }

+ 6 - 151
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/SpecialistServiceItemService.java

@ -174,8 +174,13 @@ public class SpecialistServiceItemService {
            if (StringUtils.isNoneBlank(hospital)) {
                sqlUtil = " and hospital = '" + hospital + "'";
            }
            String sql1 = "select * from wlyy_hospital_service_item where 1=1 AND service_item_id = '"+specialistServiceItemDO.getId()+"'"+sqlUtil;
            String sql1 = "select * from wlyy_hospital_service_item where 1=1 AND status = 1 AND service_item_id = '"+specialistServiceItemDO.getId()+"'"+sqlUtil;
            List<HospitalServiceItemDO> hospitalServiceItemDOS = jdbcTemplate.query(sql1,new BeanPropertyRowMapper(HospitalServiceItemDO.class));
            if (StringUtils.isNoneBlank(hospital)){
                if (hospitalServiceItemDOS.size() != 0 && hospitalServiceItemDOS != null){
                    specialistServiceItemDOList.add(specialistServiceItemDO);
                }
            }
            if (hospitalServiceItemDOS.size() == 0 || hospitalServiceItemDOS == null){
               specialistServiceItemDOList.add(specialistServiceItemDO);
            }
@ -209,154 +214,4 @@ public class SpecialistServiceItemService {
        return envelop;
    }
    /**
     * 表格数据转为对象
     *
     * @param specialistServiceItemDO
     * @return
     *//*
    private Map<Integer, ExcelData> mapping(SpecialistServiceItemDO specialistServiceItemDO) {
        Map<Integer, ExcelData> dataMap = new HashMap<>();
        //项目名称
        dataMap.put(1, new ExcelData() {
            @Override
            public void transform(String data) {
                specialistServiceItemDO.setTitle(data);
            }
        });
        //项目内涵
        dataMap.put(2, new ExcelData() {
            @Override
            public void transform(String data) {
                specialistServiceItemDO.setContent(data);
            }
        });
        //除去内容
        dataMap.put(3, new ExcelData() {
            @Override
            public void transform(String data) {
                specialistServiceItemDO.setExcludeContent(data);
            }
        });
        //项目类型
        dataMap.put(4, new ExcelData() {
            @Override
            public void transform(String data) {
                Map<String, String> centerSite = new HashMap<>();
                centerSite.put("康复服务", "1");
                centerSite.put("健康服务", "2");
                specialistServiceItemDO.setItemType(Integer.parseInt(centerSite.get(data)));
            }
        });
        //医院等级
        dataMap.put(5, new ExcelData() {
            @Override
            public void transform(String data) {
                Map<String,Integer> grade = new HashMap<>();
                grade.put("所有",0);
                grade.put("一级及一级以下医疗机构",1);
                grade.put("二级医院",2);
                grade.put("三级医院",3);
                specialistServiceItemDO.setHospitalGrade(grade.get(data));
            }
        });
        //三级医院收费
        dataMap.put(6, new ExcelData() {
            @Override
            public void transform(String data) {
                specialistServiceItemDO.setThreeHospitals(Integer.parseInt(data));
            }
        });
        //二级医院收费
        dataMap.put(7, new ExcelData() {
            @Override
            public void transform(String data) {
                specialistServiceItemDO.setTwoHospitals(Integer.parseInt(data));
            }
        });
        //一级及下收费
        dataMap.put(8, new ExcelData() {
            @Override
            public void transform(String data) {
                specialistServiceItemDO.setOneHospitals(Integer.parseInt(data));
            }
        });
        //计价单位
        dataMap.put(9, new ExcelData() {
            @Override
            public void transform(String data) {
                    specialistServiceItemDO.setUnit(Integer.parseInt(data));
            }
        });
        //加收项目
        dataMap.put(10, new ExcelData() {
            @Override
            public void transform(String data) {
                specialistServiceItemDO.setAddItem(data);
            }
        });
        //病案项目
        dataMap.put(11, new ExcelData() {
            @Override
            public void transform(String data) {
                specialistServiceItemDO.setDiseaseItem(data);
            }
        });
        //是否预约
        dataMap.put(12, new ExcelData() {
            @Override
            public void transform(String data) {
                Map<String,Integer> reserve = new HashMap<>();
                reserve.put("是",1);
                reserve.put("否",0);
                specialistServiceItemDO.setReserve(reserve.get(data));
            }
        });
        //完成方式
        dataMap.put(13, new ExcelData() {
            @Override
            public void transform(String data) {
                Map<String,Integer> type = new HashMap<>();
                type.put("扫码",1);
                type.put("上传附件",0);
                type.put("健康教育",2);
                type.put("健康指导",3);
                type.put("随访",4);
                specialistServiceItemDO.setType(type.get(data));
            }
        });
        //是否评价
        dataMap.put(14, new ExcelData() {
            @Override
            public void transform(String data) {
                Map<String,Integer> evaluate = new HashMap<>();
                evaluate.put("是",1);
                evaluate.put("否",0);
                specialistServiceItemDO.setEvaluation(evaluate.get(data));
            }
        });
        //是否生效
        dataMap.put(15, new ExcelData() {
            @Override
            public void transform(String data) {
                Map<String,Integer> imediate = new HashMap<>();
                imediate.put("是",1);
                imediate.put("否",0);
                specialistServiceItemDO.setEvaluation(imediate.get(data));
            }
        });
        specialistServiceItemDO.setId(UUID.randomUUID().toString());
        return dataMap;
    }*/
}

+ 130 - 71
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/rehabilitation/RehabilitationManageService.java

@ -17,6 +17,7 @@ import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.rm.specialist.SpecialistMapping;
import com.yihu.jw.util.common.IdCardUtil;
import com.yihu.jw.util.date.DateUtil;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray;
import org.json.JSONObject;
@ -98,7 +99,7 @@ public class RehabilitationManageService {
            condition += " and execute_time>='"+todayStart+"' and execute_time<='"+todayEnd+"'";
        }
        finalSql =" select DISTINCT b.* from (select DISTINCT plan_id from wlyy_specialist.wlyy_rehabilitation_plan_detail where  1=1 "+condition+") a " +
                " LEFT JOIN ("+sql+") b on a.plan_id=b.id ";
                " right JOIN ("+sql+") b on a.plan_id=b.id ";
//        if(todaybacklog!=null&&todaybacklog==1){
//            finalSql = " select DISTINCT b.* from (select DISTINCT plan_id from wlyy_specialist.wlyy_rehabilitation_plan_detail where execute_time>='"+todayStart+"' and execute_time<='"+todayEnd+"') a "+
//                    "LEFT JOIN ("+sql+") b on a.plan_id=b.id";
@ -117,11 +118,11 @@ public class RehabilitationManageService {
            for(Map<String,Object> one:patientRehabilitationPlanDOList){
                Map<String,Object> resultMap = new HashMap<>();
                Integer age = IdCardUtil.getAgeForIdcard(one.get("idcard")+"");
                String sex = IdCardUtil.getSexForIdcard_new(one.get("idcard")+"");
                resultMap.put("age",age);
//                Integer age = IdCardUtil.getAgeForIdcard(one.get("idcard")+"");
//                String sex = IdCardUtil.getSexForIdcard_new(one.get("idcard")+"");
//                resultMap.put("age",age);
                resultMap.put("hospitalName",one.get("hospital_name"));
                resultMap.put("sex","1".equals(sex)?"男":("2".equals(sex)?"女":"未知"));
//                resultMap.put("sex","1".equals(sex)?"男":("2".equals(sex)?"女":"未知"));
                resultMap.put("patientName",one.get("name"));
                resultMap.put("patientCode",one.get("patient"));
                resultMap.put("id",one.get("id"));
@ -285,9 +286,9 @@ public class RehabilitationManageService {
        Map<String,Object> signFamilyMap = signFamilyList.get(0);
        resultMap.put("signFamilyAdminTeamName",signFamilyMap.get("teamName"));
        resultMap.put("familyHospitalName",signFamilyMap.get("hospital_name"));//家庭医生所在医院
        Integer familyUnfinishCount = rehabilitationDetailDao.unfinishItemByDoctor(signFamilyMap.get("doctor").toString(),signFamilyMap.get("doctor_health").toString(),patientCode,1);
        Integer familyFinishCount = rehabilitationDetailDao.findItemByDoctor(signFamilyMap.get("doctor").toString(),signFamilyMap.get("doctor_health").toString(),patientCode);
        Integer familyServiceCount = rehabilitationDetailDao.completeServiceByDoctor(signFamilyMap.get("doctor").toString(),signFamilyMap.get("doctor_health").toString(),patientCode,1);
        Integer familyUnfinishCount = rehabilitationDetailDao.unfinishItemByDoctor(signFamilyMap.get("doctor")+"",signFamilyMap.get("doctor_health")+"",patientCode,1);
        Integer familyFinishCount = rehabilitationDetailDao.findItemByDoctor(signFamilyMap.get("doctor")+"",signFamilyMap.get("doctor_health")+"",patientCode);
        Integer familyServiceCount = rehabilitationDetailDao.completeServiceByDoctor(signFamilyMap.get("doctor")+"",signFamilyMap.get("doctor_health")+"",patientCode,1);
        resultMap.put("signFamilyFinishItemCount",familyFinishCount-familyUnfinishCount);//完成项目
        resultMap.put("signFamilyServiceRecordCount",familyServiceCount);//服务次数
@ -299,7 +300,7 @@ public class RehabilitationManageService {
        resultMap.put("sex","1".equals(sex)?"男":("2".equals(sex)?"女":"未知"));
        resultMap.put("patientName",signFamilyMap.get("name"));
        //疾病类型
        String diseaseSql = " select s.* from "+basedb+".wlyy_patient_disease_server s where s.del=1 and s.patient='"+patientCode+"' ";
        String diseaseSql = " select s.* from "+basedb+".wlyy_patient_disease_server s where s.del=1 and s.patient='"+patientCode+"' and s.specialist_relation_code='"+specialistMap.get("id")+"' ";
        List<Map<String,Object>> diseaseList = jdbcTemplate.queryForList(diseaseSql);
        List<String> disease = new ArrayList<>();
        for(Map<String,Object> one2:diseaseList){
@ -441,20 +442,23 @@ public class RehabilitationManageService {
                }
            }
            //myTaskFlag,1:有自己任务,0:没有自己任务
            if(m.containsKey("myTaskFlag")){
                if((Integer)m.get("myTaskFlag")==0){
            if(StringUtils.isNotEmpty(doctorCode)){
                if(m.containsKey("myTaskFlag")){
                    if((Integer)m.get("myTaskFlag")==0){
                        if(doctorCode.equals(one.get("doctor").toString())){
                            m.put("myTaskFlag",1);
                        }else{
                            m.put("myTaskFlag",0);
                        }
                    }
                }else{
                    if(doctorCode.equals(one.get("doctor").toString())){
                        m.put("myTaskFlag",1);
                    }else{
                        m.put("myTaskFlag",0);
                    }
                }
            }else{
                if(doctorCode.equals(one.get("doctor").toString())){
                    m.put("myTaskFlag",1);
                }else{
                    m.put("myTaskFlag",0);
                }
            }
            if(m.containsKey("planDetailIds")){
                m.put("planDetailIds",m.get("planDetailIds")+","+one.get("id"));
@ -478,7 +482,7 @@ public class RehabilitationManageService {
        String sql = " select d.*,DATE_FORMAT(d.execute_time,'%Y/%m/%d %H:%i') as executeTime ,i.content,i.title from wlyy_specialist.wlyy_rehabilitation_plan_detail d " +
                " LEFT JOIN wlyy_specialist.wlyy_hospital_service_item h on d.hospital_service_item_id = h.id "+
                " LEFT JOIN wlyy_service_item i on i.id = h.service_item_id " +
                " where d.execute_time>='"+executeStartTime+"' and d.execute_time<='"+executeEndTime+"' and d.plan_id='"+planId+"' " ;
                " where d.execute_time>='"+executeStartTime+"' and d.execute_time<='"+executeEndTime+"' and d.plan_id='"+planId+"' order by d.execute_time desc" ;
        if(searchTask!=null){
            if(searchTask==1){
                sql+="and d.doctor='"+doctorCode+"' ";
@ -506,7 +510,7 @@ public class RehabilitationManageService {
            planDetailList +=",'"+one+"'";
        }
        String planDetailResult = StringUtils.isNotEmpty(planDetailList)?planDetailList.substring(1):"";
        String sql = "select i.title,i.content,i.type,i.reserve,d.id,d.execute_time,d.hospital_name,d.status,d.type,d.expense,d.doctor as specialistDoctor," +
        String sql = "select i.title,i.content,i.type as itemType,i.reserve,d.id,d.execute_time,d.hospital_name,d.status,d.type as detailType,d.expense,d.doctor as specialistDoctor," +
                " d.doctor_name as specialistDoctorName,p.patient ,p.create_user ,p.create_user_name " +
                " from wlyy_specialist.wlyy_rehabilitation_plan_detail d " +
                " LEFT JOIN wlyy_specialist.wlyy_hospital_service_item h on d.hospital_service_item_id = h.id "+
@ -524,6 +528,8 @@ public class RehabilitationManageService {
                executeDoctorList.add(one.get("create_user_name")+"");
            }
            executeDoctorList.add(one.get("specialistDoctorName")+"");
            resultMap.put("specialistDoctorCode",one.get("create_user")+"");//专科医生code
            resultMap.put("specialistDoctorName",one.get("create_user_name")+"");//专科医生名字
            resultMap.put("executeDoctorList",executeDoctorList);
            resultMap.put("title",one.get("title"));//项目标题
            resultMap.put("planDetaiId",one.get("id"));//计划服务项目id
@ -549,12 +555,14 @@ public class RehabilitationManageService {
                map.put("doctorName",one2.getDoctorName());
                map.put("adminTeamName",one2.getAdminTeamName());
                map.put("content",one2.getContent());
                map.put("contentType",one2.getContentType());
                map.put("createTime",DateUtil.dateToStr(one2.getCreateTime(),"MM-dd HH:mm"));
                messageMapList.add(map);
            }
            resultMap.put("messageList",messageMapList);//指导与汇报记录
            resultMap.put("patient",one.get("patient"));
            resultMap.put("type",one.get("type"));
            resultMap.put("itemType",one.get("itemType"));
            resultMap.put("detaiType",one.get("detaiType"));
            resultMap.put("status",status);//状态
            //是否完成任务
            List<RehabilitationOperateRecordsDO> operateList = rehabilitationOperateRecordsDao.findByRehabilitationDetailId(one.get("id").toString());
@ -575,10 +583,11 @@ public class RehabilitationManageService {
     * @param planDetailId
     * @return
     * @throws Exception
     *
     */
    public ObjEnvelop serviceItem(String planDetailId) throws Exception{
        String sql = "select i.title,i.content,i.type as itemType,i.reserve,d.id,d.execute_time,d.hospital_name,d.status,d.type,d.expense,d.doctor as specialistDoctor, " +
                " d.doctor_name as specialistDoctorName,p.patient ,p.create_user ,p.create_user_name " +
                " d.doctor_name as specialistDoctorName,p.patient ,p.name as patientName,p.create_user ,p.create_user_name " +
                " from wlyy_specialist.wlyy_rehabilitation_plan_detail d " +
                " LEFT JOIN wlyy_specialist.wlyy_hospital_service_item h on d.hospital_service_item_id = h.id "+
                " LEFT JOIN wlyy_specialist.wlyy_service_item i on i.id = h.service_item_id " +
@ -619,12 +628,14 @@ public class RehabilitationManageService {
            map.put("doctorName",one2.getDoctorName());
            map.put("adminTeamName",one2.getAdminTeamName());
            map.put("content",one2.getContent());
            map.put("contentType",one2.getContentType());
            map.put("createTime",DateUtil.dateToStr(one2.getCreateTime(),"MM-dd HH:mm"));
            messageMapList.add(map);
        }
        Integer itemType = (Integer) one.get("itemType");
        resultMap.put("messageList",messageMapList);//指导与汇报记录
        resultMap.put("patient",one.get("patient"));
        resultMap.put("patientName",one.get("patientName"));
        resultMap.put("type",itemType);//1扫码、0上传附件、2、健康教育,3、健康指导,4、随访
        //是否完成任务
@ -676,27 +687,32 @@ public class RehabilitationManageService {
        //服务医生
        //完成项目=全部的服务项目-未完成的服务项目
        List<Map<String,Object>> serviceDoctorList = new ArrayList<>();
        Map<String,Object> generalDoctorMap =  new HashMap<>();
        generalDoctorMap.put("type","全科医生");
        generalDoctorMap.put("doctorName",generalDoctorName);
        generalDoctorMap.put("doctorCode",generalDoctor);
        Integer generalUnfinishCount = rehabilitationDetailDao.unfinishItemByDoctor(generalDoctor,patientCode,1);
        Integer generalFinishCount = rehabilitationDetailDao.findItemByDoctor(generalDoctor,patientCode);
        Integer generalServiceCount = rehabilitationDetailDao.completeServiceByDoctor(generalDoctor,patientCode,1);
        generalDoctorMap.put("finishedItem",generalFinishCount-generalUnfinishCount);
        generalDoctorMap.put("serviceCount",generalServiceCount);
        serviceDoctorList.add(generalDoctorMap);
        if(StringUtils.isNotEmpty(generalDoctor)){
            Map<String,Object> generalDoctorMap =  new HashMap<>();
            generalDoctorMap.put("type","全科医生");
            generalDoctorMap.put("doctorName",generalDoctorName);
            generalDoctorMap.put("doctorCode",generalDoctor);
            Integer generalUnfinishCount = rehabilitationDetailDao.unfinishItemByDoctor(generalDoctor,patientCode,1);
            Integer generalFinishCount = rehabilitationDetailDao.findItemByDoctor(generalDoctor,patientCode);
            Integer generalServiceCount = rehabilitationDetailDao.completeServiceByDoctor(generalDoctor,patientCode,1);
            generalDoctorMap.put("finishedItem",generalFinishCount-generalUnfinishCount);
            generalDoctorMap.put("serviceCount",generalServiceCount);
            serviceDoctorList.add(generalDoctorMap);
        }
        if(StringUtils.isNotEmpty(healthDoctor)){
        Map<String,Object> healthDoctorMap =  new HashMap<>();
        healthDoctorMap.put("type","健管师");
        healthDoctorMap.put("doctorName",healthDoctorName);
        healthDoctorMap.put("doctorCode",healthDoctor);
        Integer healthUnfinishCount = rehabilitationDetailDao.unfinishItemByDoctor(healthDoctor,patientCode,1);
        Integer healthFinishCount = rehabilitationDetailDao.findItemByDoctor(healthDoctor,patientCode);
        Integer healthServiceCount = rehabilitationDetailDao.completeServiceByDoctor(healthDoctor,patientCode,1);
        healthDoctorMap.put("finishedItem",healthFinishCount-healthUnfinishCount);
        healthDoctorMap.put("serviceCount",healthServiceCount);
        serviceDoctorList.add(healthDoctorMap);
            Map<String,Object> healthDoctorMap =  new HashMap<>();
            healthDoctorMap.put("type","健管师");
            healthDoctorMap.put("doctorName",healthDoctorName);
            healthDoctorMap.put("doctorCode",healthDoctor);
            Integer healthUnfinishCount = rehabilitationDetailDao.unfinishItemByDoctor(healthDoctor,patientCode,1);
            Integer healthFinishCount = rehabilitationDetailDao.findItemByDoctor(healthDoctor,patientCode);
            Integer healthServiceCount = rehabilitationDetailDao.completeServiceByDoctor(healthDoctor,patientCode,1);
            healthDoctorMap.put("finishedItem",healthFinishCount-healthUnfinishCount);
            healthDoctorMap.put("serviceCount",healthServiceCount);
            serviceDoctorList.add(healthDoctorMap);
        }
        String specialistRelationSql = "select * from wlyy_specialist.wlyy_specialist_patient_relation where patient='"+patientCode+"' and sign_status='1' and status='1'";
        List<Map<String,Object>> specialistRelationList = jdbcTemplate.queryForList(specialistRelationSql);
@ -736,6 +752,7 @@ public class RehabilitationManageService {
                case 2:planTypeName="(转)社区医院" ;break;
                case 3:planTypeName="(转)转家庭病床" ;break;
            }
            map.put("planId",one.getId());
            map.put("planTypeName",planTypeName);
            String statusName = "";
            Integer status = one.getStatus();
@ -892,18 +909,20 @@ public class RehabilitationManageService {
    /**
     * 保存康复管理指导留言信息
     * @param messageId
     * @param patient
     * @param doctor
     * @param doctorType 1、专科医生,2、家庭医生
     */
    @Transactional
    public Envelop saveGuidanceMessage(String messageId,String patient,String doctor,Integer doctorType,String content,String planDetailId) throws Exception{
    public Envelop saveGuidanceMessage(String messageId,String doctor,Integer doctorType,String content,String planDetailId,Integer contentType) throws Exception{
        List<String> patientList = rehabilitationDetailDao.findPatientById(planDetailId);
        String patient = patientList.size()>0?patientList.get(0):"";
        GuidanceMessageLogDO guidanceMessageLogDO = new GuidanceMessageLogDO();
        guidanceMessageLogDO.setMessageId(messageId);
        guidanceMessageLogDO.setPlanDetailId(planDetailId);
        guidanceMessageLogDO.setContent(content);
        guidanceMessageLogDO.setDoctor(doctor);
        guidanceMessageLogDO.setContentType(contentType);
        guidanceMessageLogDO.setDoctorType(doctorType);
        Integer adminTeamCode = null;
        String doctorName = null;
@ -957,27 +976,33 @@ public class RehabilitationManageService {
        //服务医生
        //完成项目=全部的服务项目-未完成的服务项目
        List<Map<String,Object>> serviceDoctorList = new ArrayList<>();
        Map<String,Object> generalDoctorMap =  new HashMap<>();
        generalDoctorMap.put("type","全科医生");
        generalDoctorMap.put("doctorName",generalDoctorName);
        generalDoctorMap.put("doctorCode",generalDoctor);
        Integer generalUnfinishCount = rehabilitationDetailDao.unfinishItemByDoctor(generalDoctor,patientCode,1);
        Integer generalFinishCount = rehabilitationDetailDao.findItemByDoctor(generalDoctor,patientCode);
        Integer generalServiceCount = rehabilitationDetailDao.completeServiceByDoctor(generalDoctor,patientCode,1);
        generalDoctorMap.put("finishedItem",generalFinishCount-generalUnfinishCount);
        generalDoctorMap.put("serviceCount",generalServiceCount);
        serviceDoctorList.add(generalDoctorMap);
        if(StringUtils.isNotEmpty(generalDoctor)){
            Map<String,Object> generalDoctorMap =  new HashMap<>();
            generalDoctorMap.put("type","全科医生");
            generalDoctorMap.put("doctorName",generalDoctorName);
            generalDoctorMap.put("doctorCode",generalDoctor);
            Integer generalUnfinishCount = rehabilitationDetailDao.unfinishItemByDoctor(generalDoctor,patientCode,1);
            Integer generalFinishCount = rehabilitationDetailDao.findItemByDoctor(generalDoctor,patientCode);
            Integer generalServiceCount = rehabilitationDetailDao.completeServiceByDoctor(generalDoctor,patientCode,1);
            generalDoctorMap.put("finishedItem",generalFinishCount-generalUnfinishCount);
            generalDoctorMap.put("serviceCount",generalServiceCount);
            serviceDoctorList.add(generalDoctorMap);
        }
        if(StringUtils.isNotEmpty(healthDoctor)){
        Map<String,Object> healthDoctorMap =  new HashMap<>();
        healthDoctorMap.put("type","健管师");
        healthDoctorMap.put("doctorName",healthDoctorName);
        healthDoctorMap.put("doctorCode",healthDoctor);
        Integer healthUnfinishCount = rehabilitationDetailDao.unfinishItemByDoctor(healthDoctor,patientCode,1);
        Integer healthFinishCount = rehabilitationDetailDao.findItemByDoctor(healthDoctor,patientCode);
        Integer healthServiceCount = rehabilitationDetailDao.completeServiceByDoctor(healthDoctor,patientCode,1);
        healthDoctorMap.put("finishedItem",healthFinishCount-healthUnfinishCount);
        healthDoctorMap.put("serviceCount",healthServiceCount);
        serviceDoctorList.add(healthDoctorMap);
            Map<String,Object> healthDoctorMap =  new HashMap<>();
            healthDoctorMap.put("type","健管师");
            healthDoctorMap.put("doctorName",healthDoctorName);
            healthDoctorMap.put("doctorCode",healthDoctor);
            Integer healthUnfinishCount = rehabilitationDetailDao.unfinishItemByDoctor(healthDoctor,patientCode,1);
            Integer healthFinishCount = rehabilitationDetailDao.findItemByDoctor(healthDoctor,patientCode);
            Integer healthServiceCount = rehabilitationDetailDao.completeServiceByDoctor(healthDoctor,patientCode,1);
            healthDoctorMap.put("finishedItem",healthFinishCount-healthUnfinishCount);
            healthDoctorMap.put("serviceCount",healthServiceCount);
            serviceDoctorList.add(healthDoctorMap);
        }
        String specialistRelationSql = "select * from wlyy_specialist.wlyy_specialist_patient_relation where patient='"+patientCode+"' and sign_status='1' and status='1'";
        List<Map<String,Object>> specialistRelationList = jdbcTemplate.queryForList(specialistRelationSql);
@ -1038,13 +1063,32 @@ public class RehabilitationManageService {
     * @param planDeatilId
     * @return
     */
    public int updateNodeAndRelationRecordImg(String node,String image,String planDeatilId){
        int i = 0;
        i = rehabilitationDetailDao.updateStatusById(1,planDeatilId);
        int j = 0;
        j = rehabilitationOperateRecordsDao.updateNodeAndRelationRecordImg(node,image,planDeatilId);
        int result = i+j;
        return  result;
    public Map<String,Object> updateNodeAndRelationRecordImg(String node,String image,String planDeatilId)throws Exception{
        Map<String,Object> resultMap = new HashedMap();
        int i = rehabilitationDetailDao.updateStatusById(1,planDeatilId);
        int j = rehabilitationOperateRecordsDao.updateNodeAndRelationRecordImg(node,image,planDeatilId);
        String sql ="SELECT" +
                " i.service_item_id," +
                " r.doctor_code," +
                " r.patient_code" +
                " FROM" +
                " wlyy_rehabilitation_plan_detail pd" +
                " LEFT JOIN wlyy_hospital_service_item i ON pd.hospital_service_item_id = i.id" +
                " LEFT JOIN wlyy_rehabilitation_operate_records r ON pd.id = r.rehabilitation_detail_id" +
                " WHERE" +
                " pd.id = '"+planDeatilId+"'";
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
        if (list!=null && list.size()>0){
            resultMap = list.get(0);
        }
        String itemSql ="SELECT evaluation,title FROM `wlyy_service_item` WHERE id='"+String.valueOf(resultMap.get("service_item_id"))+"'";
        List<Map<String,Object>> itemList = jdbcTemplate.queryForList(itemSql);
        if (itemList!=null && itemList.size()>0){
            resultMap.put("evaluation",itemList.get(0).get("evaluation"));
            resultMap.put("title",itemList.get(0).get("title"));
        }
        resultMap.put("count",i+j);
        return resultMap;
    }
    /**
@ -1060,4 +1104,19 @@ public class RehabilitationManageService {
        }
        return Envelop.getError("更新失败!");
    }
    /**
     * 计划总进度
     * @param planId
     * @return
     */
    public ObjEnvelop planSchedule(String planId){
        Map<String,Object> resultMap = new HashMap<>();
        Integer allCount = rehabilitationDetailDao.findAllByPlanId(planId);//计划总服务项目数
        Integer finishedCount = rehabilitationDetailDao.findByStatusAndPlanId(1,planId);
        resultMap.put("allCount",allCount);
        resultMap.put("finishedCount",finishedCount);
        resultMap.put("healthyCondition","康复期");
        return ObjEnvelop.getSuccess(SpecialistMapping.api_success,resultMap);
    }
}

+ 22 - 5
svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/rehabilitation/RehabilitationPlanService.java

@ -32,6 +32,7 @@ import com.yihu.jw.util.common.QrcodeUtil;
import com.yihu.fastdfs.FastDFSUtil;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.mysql.query.BaseJpaService;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -62,6 +63,8 @@ public class RehabilitationPlanService extends BaseJpaService<RehabilitationPlan
    private String fastdfs_file_url;
    @Value("${base.url}")
    private String baseUrl;
    @Value("${basedb.name}")
    private String basedb;
    @Autowired
    private RehabilitationPlanTemplateDao templateDao;
@ -290,7 +293,7 @@ public class RehabilitationPlanService extends BaseJpaService<RehabilitationPlan
        patientRehabilitationPlanDao.updateServicePackageId(planId, servicePackageId);
    }
    public MixEnvelop<String,String> createServiceQrCode(String planDetailId,String sessionId){
    public MixEnvelop<String,String> createServiceQrCode(String planDetailId,String doctorCode){
        RehabilitationDetailDO rehabilitationDetailDO = rehabilitationDetailDao.findById(planDetailId);
        String fileUrl = "";
        if (rehabilitationDetailDO!=null) {
@ -298,7 +301,7 @@ public class RehabilitationPlanService extends BaseJpaService<RehabilitationPlan
                fileUrl = rehabilitationDetailDO.getServiceQrCode();
            } else {
                //String contentJsonStr="{\"planDetailId\":\""+planDetailId+"\",\"sessionId\":\""+sessionId+"\"}";
                String contentJsonStr=""+"?paramStr="+planDetailId+","+sessionId;
                String contentJsonStr="html/kfgl/html/confirm-service.html"+"?paramStr="+planDetailId+","+doctorCode;
                InputStream ipt = QrcodeUtil.createQrcode(contentJsonStr, 300, "png");
                isneiwang = false;
                if (isneiwang) {
@ -338,20 +341,27 @@ public class RehabilitationPlanService extends BaseJpaService<RehabilitationPlan
        return MixEnvelop.getSuccess("获取二维码成功!",fileUrl);
    }
    public Integer checkAfterQrCode(String planDetailId,String patietCode)throws Exception{
    public Map<String,Object> checkAfterQrCode(String planDetailId,String patietCode)throws Exception{
        Map<String,Object> map = new HashedMap();
        int result = 0;
        String sql ="SELECT rp.patient FROM `wlyy_rehabilitation_plan_detail` pd LEFT JOIN wlyy_patient_rehabilitation_plan rp ON pd.plan_id = rp.id WHERE pd.id='"+planDetailId+"'";
        String name= "";
        String sql ="SELECT rp.patient,rp.name FROM `wlyy_rehabilitation_plan_detail` pd LEFT JOIN wlyy_patient_rehabilitation_plan rp ON pd.plan_id = rp.id WHERE pd.id='"+planDetailId+"'";
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
        if (list!=null && list.size()>0){
            if (String.valueOf(list.get(0).get("patient")).equals(patietCode)){
                result =200;
            }else {
                result = -1;
                name=String.valueOf(list.get(0).get("name"));
            }
        }else {
            result = -10000;
        }
        return result;
        map.put("code",result);
        if (StringUtils.isNotBlank(name)){
            map.put("name",name);
        }
        return map;
    }
    public RehabilitationOperateRecordsDO saveRehabilitationRecord(RehabilitationOperateRecordsDO rehabilitationOperateRecordsDO){
@ -359,6 +369,13 @@ public class RehabilitationPlanService extends BaseJpaService<RehabilitationPlan
        rehabilitationOperateRecordsDO.setId(getCode());
        rehabilitationOperateRecordsDO.setReserveTime(rehabilitationDetailDO.getExecuteTime());
        rehabilitationOperateRecordsDO.setCompleteTime(new Date());
        if (StringUtils.isEmpty(rehabilitationOperateRecordsDO.getPatientName())){
            String sql ="select name from "+basedb+".wlyy_patient where code='"+rehabilitationOperateRecordsDO.getPatientCode()+"'";
            List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
            if (list!=null && list.size()>0){
                rehabilitationOperateRecordsDO.setPatientName(String.valueOf(list.get(0).get("name")));
            }
        }
        return rehabilitationOperateRecordsDao.save(rehabilitationOperateRecordsDO);
    }

+ 1 - 8
wlyy-parent-pom/pom.xml

@ -55,10 +55,8 @@
        <module>../server/svr-configuration</module> <!--配置服务-->
        <module>../server/svr-discovery</module><!--发现服务-->
        <module>../server/svr-authentication</module> <!-- 认证服务 -->
        <!-- 暂时保留 -->
        <!--<module>../server/svr-dashboard</module>--><!--监控服务-->
        <module>../server/svr-zipkin</module> <!--分布式追踪服务-->
        <!-- 暂时保留 -->
        <!-- 网关服务 -->
        <module>../gateway/ag-basic</module> <!-- web网关 -->
@ -112,7 +110,7 @@
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>Edgware.SR2</version>
                <version>Edgware.SR4</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
@ -153,11 +151,6 @@
                <artifactId>common-rest-model-es</artifactId>
                <version>${version.wlyy-common}</version>
            </dependency>
            <dependency>
                <groupId>com.yihu.jw</groupId>
                <artifactId>svr-base</artifactId>
                <version>${version.wlyy-common}</version>
            </dependency>
            <dependency>
                <groupId>com.yihu.jw</groupId>
                <artifactId>common-util</artifactId>