chenweida 7 роки тому
батько
коміт
4fc6deefdd

+ 0 - 191
common/common-entity/src/main/java/com/yihu/wlyy/entity/concern/ConcernDo.java

@ -1,191 +0,0 @@
package com.yihu.wlyy.entity.concern;// default package
import com.yihu.wlyy.entity.IdEntity;
import java.sql.Timestamp;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;
/**
 * WlyyConcern entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "wlyy_concern")
public class ConcernDO extends IdEntity {
	private String code; //code
	private String patient;//患者code
	private String name;//患者名称
	private String openid;//openID
	private String idcard;//患者身份是在
	private String ssc;//患者社保卡
	private String mobile;//患者手机号
	private Integer status;//状态 -1取消关注 1已关注
	private String teamCode;//关注的团队code
	private Integer concernSource;//关注方式: 1扫描二维码 2页面跳转 3.咨询关注
	private String concernDoctorCode;//关注的医生code
	private String concernDoctorName;//关注的医生名称
	private Date createTime;//创建时间
	private Date updateTime;//修改时间
	// Constructors
	/** default constructor */
	public ConcernDO() {
	}
	/** full constructor */
	public ConcernDO(String code, String patient, String name, String openid,
					 String idcard, String ssc, String mobile, Integer status,
					 String teamCode, Integer concernSource, String concernDoctorCode,
					 String concernDoctorName, Integer adminTeamCode,
					 Timestamp createTime, Timestamp updateTime) {
		this.code = code;
		this.patient = patient;
		this.name = name;
		this.openid = openid;
		this.idcard = idcard;
		this.ssc = ssc;
		this.mobile = mobile;
		this.status = status;
		this.teamCode = teamCode;
		this.concernSource = concernSource;
		this.concernDoctorCode = concernDoctorCode;
		this.concernDoctorName = concernDoctorName;
		this.createTime = createTime;
		this.updateTime = updateTime;
	}
	@Column(name = "code", nullable = false, length = 200)
	public String getCode() {
		return this.code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	@Column(name = "patient", length = 50)
	public String getPatient() {
		return this.patient;
	}
	public void setPatient(String patient) {
		this.patient = patient;
	}
	@Column(name = "name", nullable = false, length = 50)
	public String getName() {
		return this.name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@Column(name = "openid", length = 50)
	public String getOpenid() {
		return this.openid;
	}
	public void setOpenid(String openid) {
		this.openid = openid;
	}
	@Column(name = "idcard", nullable = false, length = 50)
	public String getIdcard() {
		return this.idcard;
	}
	public void setIdcard(String idcard) {
		this.idcard = idcard;
	}
	@Column(name = "ssc", nullable = false, length = 20)
	public String getSsc() {
		return this.ssc;
	}
	public void setSsc(String ssc) {
		this.ssc = ssc;
	}
	@Column(name = "mobile", length = 100)
	public String getMobile() {
		return this.mobile;
	}
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	@Column(name = "status", nullable = false)
	public Integer getStatus() {
		return this.status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	@Column(name = "team_code", length = 100)
	public String getTeamCode() {
		return this.teamCode;
	}
	public void setTeamCode(String teamCode) {
		this.teamCode = teamCode;
	}
	@Column(name = "concern_source")
	public Integer getConcernSource() {
		return this.concernSource;
	}
	public void setConcernSource(Integer concernSource) {
		this.concernSource = concernSource;
	}
	@Column(name = "concern_doctor_code", length = 50)
	public String getConcernDoctorCode() {
		return this.concernDoctorCode;
	}
	public void setConcernDoctorCode(String concernDoctorCode) {
		this.concernDoctorCode = concernDoctorCode;
	}
	@Column(name = "concern_doctor_name", length = 200)
	public String getConcernDoctorName() {
		return this.concernDoctorName;
	}
	public void setConcernDoctorName(String concernDoctorName) {
		this.concernDoctorName = concernDoctorName;
	}
	@Column(name = "create_time", length = 0)
	public Date getCreateTime() {
		return this.createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	@Column(name = "update_time", nullable = false, length = 0)
	public Date getUpdateTime() {
		return this.updateTime;
	}
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
}

+ 0 - 155
common/common-rest-model/src/main/java/com.yihu.wlyy/rest/concern/concernVO.java

@ -1,155 +0,0 @@
package com.yihu.wlyy.rest.concern;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
 * Created by Administrator on 2018/4/4 0004.
 */
@ApiModel("关注类型")
public class ConcernVO {
    @ApiModelProperty(value = "code", example = "业务主键" )
    private String code; //code
    @ApiModelProperty(value = "patient", example = "患者code" )
    private String patient;//患者code
    @ApiModelProperty(value = "name", example = "患者名称" )
    private String name;//患者名称
    @ApiModelProperty(value = "openid", example = "openID" )
    private String openid;//openID
    @ApiModelProperty(value = "idcard", example = "患者身份" )
    private String idcard;//患者身份是在
    @ApiModelProperty(value = "ssc", example = "患者社保卡" )
    private String ssc;//患者社保卡
    @ApiModelProperty(value = "mobile", example = "患者手机号" )
    private String mobile;//患者手机号
    @ApiModelProperty(value = "status", example = "状态 -1取消关注 1已关注" )
    private Integer status;//状态 -1取消关注 1已关注
    @ApiModelProperty(value = "teamCode", example = "关注的团队code" )
    private String teamCode;//关注的团队code
    @ApiModelProperty(value = "concernSource", example = "关注方式: 1扫描二维码 2页面跳转" )
    private Integer concernSource;//关注方式: 1扫描二维码 2页面跳转
    @ApiModelProperty(value = "concernDoctorCode", example = "关注的医生code" )
    private String concernDoctorCode;//关注的医生code
    @ApiModelProperty(value = "concernDoctorName", example = "关注的医生名称" )
    private String concernDoctorName;//关注的医生名称
    @ApiModelProperty(value = "createTime", example = "创建时间" )
    private Date createTime;//创建时间
    @ApiModelProperty(value = "updateTime", example = "修改时间" )
    private Date updateTime;//修改时间
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getPatient() {
        return patient;
    }
    public void setPatient(String patient) {
        this.patient = patient;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getOpenid() {
        return openid;
    }
    public void setOpenid(String openid) {
        this.openid = openid;
    }
    public String getIdcard() {
        return idcard;
    }
    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }
    public String getSsc() {
        return ssc;
    }
    public void setSsc(String ssc) {
        this.ssc = ssc;
    }
    public String getMobile() {
        return mobile;
    }
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }
    public Integer getStatus() {
        return status;
    }
    public void setStatus(Integer status) {
        this.status = status;
    }
    public String getTeamCode() {
        return teamCode;
    }
    public void setTeamCode(String teamCode) {
        this.teamCode = teamCode;
    }
    public Integer getConcernSource() {
        return concernSource;
    }
    public void setConcernSource(Integer concernSource) {
        this.concernSource = concernSource;
    }
    public String getConcernDoctorCode() {
        return concernDoctorCode;
    }
    public void setConcernDoctorCode(String concernDoctorCode) {
        this.concernDoctorCode = concernDoctorCode;
    }
    public String getConcernDoctorName() {
        return concernDoctorName;
    }
    public void setConcernDoctorName(String concernDoctorName) {
        this.concernDoctorName = concernDoctorName;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Date getUpdateTime() {
        return updateTime;
    }
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}

+ 0 - 40
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/concern/DoctorConcernController.java

@ -1,40 +0,0 @@
package com.yihu.wlyy.web.doctor.concern;
import com.yihu.wlyy.service.app.concern.ConcernService;
import com.yihu.wlyy.web.BaseController;
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.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
 * Created by Administrator on 2018/4/4 0004.
 */
@RestController
@RequestMapping(value = "/doctor/concern")
@Api(description = "医生患者关注")
public class DoctorConcernController extends BaseController {
    @Autowired
    private ConcernService concernService;
    @RequestMapping(value = "/getConcernPatients", method = RequestMethod.GET)
    @ApiOperation(value = "获取医生关注的患者1", notes = "")
    public String getConcernDoctors(
            @ApiParam(name = "doctor", value = "医生",required = false) @RequestParam(required = false, name = "doctor") String doctor
    ) {
        try {
            if(StringUtils.isEmpty(doctor)){
                doctor=getUID();
            }
            return write(200,"查询成功","data",concernService.listPatientsByDoctorCode(doctor));
        } catch (Exception e) {
            e.printStackTrace();
            return error(-100, "查询失败");
        }
    }
}

+ 0 - 81
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/concern/PatientConcernController.java

@ -1,81 +0,0 @@
package com.yihu.wlyy.web.patient.concern;
import com.yihu.wlyy.service.app.concern.ConcernService;
import com.yihu.wlyy.web.BaseController;
import com.yihu.wlyy.web.WeixinBaseController;
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.stereotype.Controller;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
 * Created by Administrator on 2018/4/4 0004.
 */
@RestController
@RequestMapping(value = "/patient/concern")
@Api(description = "患者关注")
public class PatientConcernController extends BaseController {
    @Autowired
    private ConcernService concernService;
    @RequestMapping(value = "/addConcern", method = RequestMethod.POST)
    @ApiOperation(value = "新增关注", notes = "")
    public String addConcern(
            @ApiParam(name = "patient", value = "患者", required = false) @RequestParam(required = false, name = "patient") String patient,
            @ApiParam(name = "doctor", value = "医生Code") @RequestParam(required = true, name = "doctor") String doctor,
            @ApiParam(name = "concernSource", value = "关注方式: 1扫描二维码 2页面跳转 3.咨询关注") @RequestParam(required = true, name = "concernSource") Integer concernSource
    ) {
        try {
            if (StringUtils.isEmpty(patient)) {
                patient = getUID();
            }
            concernService.addConcern(patient, doctor, concernSource);
            return success("关注成功");
        } catch (Exception e) {
            e.printStackTrace();
            return error(-100, "关注失败");
        }
    }
    @RequestMapping(value = "/deleteConcern", method = RequestMethod.POST)
    @ApiOperation(value = "取消关注", notes = "")
    public String deleteConcern(
            @ApiParam(name = "patient", value = "患者", required = false) @RequestParam(required = false, name = "patient") String patient,
            @ApiParam(name = "doctor", value = "医生Code") @RequestParam(required = true, name = "doctor") String doctorCode
    ) {
        try {
            if (StringUtils.isEmpty(patient)) {
                patient = getUID();
            }
            concernService.deleteConcern(patient, doctorCode);
            return success("关注成功");
        } catch (Exception e) {
            e.printStackTrace();
            return error(-100, "关注失败");
        }
    }
    @RequestMapping(value = "/getConcernDoctors", method = RequestMethod.GET)
    @ApiOperation(value = "获取患者关注的医生", notes = "")
    public String getConcernDoctors(
            @ApiParam(name = "patient", value = "患者", required = false) @RequestParam(required = false, name = "patient") String patient
    ) {
        try {
            if (StringUtils.isEmpty(patient)) {
                patient = getUID();
            }
            return write(200, "查询成功", "data", concernService.listDoctorsByPatientCode(patient));
        } catch (Exception e) {
            e.printStackTrace();
            return error(-100, "查询失败");
        }
    }
}