فهرست منبع

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

yeshijie 7 سال پیش
والد
کامیت
00b4714336
37فایلهای تغییر یافته به همراه708 افزوده شده و 412 حذف شده
  1. 1 1
      common/common-entity/src/main/java/com/yihu/wlyy/entity/concern/ConcernDO.java
  2. 3 3
      common/common-entity/src/main/java/com/yihu/wlyy/entity/followup/Followup.java
  3. 13 0
      common/common-entity/src/main/java/com/yihu/wlyy/entity/patient/Patient.java
  4. 41 0
      common/common-rest-model/src/main/java/com.yihu.wlyy/rest/other/DoctorHomePage.java
  5. 8 9
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/concern/ConcernDao.java
  6. 2 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/consult/ConsultDao.java
  7. 4 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/consult/ConsultTeamDao.java
  8. 6 6
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/followup/FollowUpDao.java
  9. 2 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/patient/PatientHealthGuidanceDao.java
  10. 44 4
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/concern/ConcernService.java
  11. 6 4
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/consult/ConsultTeamService.java
  12. 17 23
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/followup/FollowUpService.java
  13. 2 3
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/health/PatientHealthGuidanceService.java
  14. 3 3
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prenatalInspector/PrenatalInspectorPreCardService.java
  15. 7 8
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/PatientRemindService.java
  16. 40 76
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statistics/ServiceStatisticsService.java
  17. 31 30
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/common/SMSService.java
  18. 3 3
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/message/SendMessageService.java
  19. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/task/RemindExpensesTask.java
  20. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/task/RemindFocusWechatTask.java
  21. 41 36
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/account/WechatController.java
  22. 24 13
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/data/DataHandingService.java
  23. 37 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/data/DataHandlingController.java
  24. 143 133
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/account/DoctorController.java
  25. 91 5
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/concern/DoctorConcernController.java
  26. 1 5
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/consult/DoctorConsultController.java
  27. 1 4
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/followup/DoctorFollowUpController.java
  28. 1 5
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/health/DoctorHealthGuidanceController.java
  29. 2 3
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/patient/ServiceStatisticsController.java
  30. 23 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/concern/PatientConcernController.java
  31. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/gateway/controller/doctor/GcMessageController.java
  32. 71 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/jkzl/ZBSmsService.java
  33. 18 16
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/zysoft/BookingController.java
  34. 3 3
      patient-co/patient-co-wlyy/src/main/resources/application-dev.yml
  35. 3 3
      patient-co/patient-co-wlyy/src/main/resources/application-prod.yml
  36. 10 0
      patient-co/patient-co-wlyy/src/main/resources/application.yml
  37. 3 3
      pom.xml

+ 1 - 1
common/common-entity/src/main/java/com/yihu/wlyy/entity/concern/ConcernDO.java

@ -24,7 +24,7 @@ public class ConcernDO extends IdEntity {
	private String mobile;//患者手机号
	private Integer status;//状态 -1取消关注 1已关注
	private String teamCode;//关注的团队code
	private Integer concernSource;//关注方式: 1扫描二维码 2页面跳转
	private Integer concernSource;//关注方式: 1扫描二维码 2页面跳转 3.咨询关注
	private String concernDoctorCode;//关注的医生code
	private String concernDoctorName;//关注的医生名称
	private Date createTime;//创建时间

+ 3 - 3
common/common-entity/src/main/java/com/yihu/wlyy/entity/followup/Followup.java

@ -64,7 +64,7 @@ public class Followup extends IdEntity {
	// 签约类型 1三师 2家庭
	private Integer signType;
	// 行政团队
	private Long adminTeamCode;
	private String adminTeamCode;
	//签约表Code
	private String signCode;
	//关联的续方CODE
@ -242,11 +242,11 @@ public class Followup extends IdEntity {
		this.signType = signType;
	}
	public Long getAdminTeamCode() {
	public String getAdminTeamCode() {
		return adminTeamCode;
	}
	public void setAdminTeamCode(Long adminTeamCode) {
	public void setAdminTeamCode(String adminTeamCode) {
		this.adminTeamCode = adminTeamCode;
	}

+ 13 - 0
common/common-entity/src/main/java/com/yihu/wlyy/entity/patient/Patient.java

@ -105,6 +105,10 @@ public class Patient extends IdEntity implements Serializable {
    //医疗保险号
    private String medicareNumber;
    //关注是间
    private Date concernCreateTime;//创建时间
    public String getPrincipalCode() {
        return principalCode;
    }
@ -467,4 +471,13 @@ public class Patient extends IdEntity implements Serializable {
    public void setMedicareNumber(String medicareNumber) {
        this.medicareNumber = medicareNumber;
    }
    @Transient
    public Date getConcernCreateTime() {
        return concernCreateTime;
    }
    public void setConcernCreateTime(Date concernCreateTime) {
        this.concernCreateTime = concernCreateTime;
    }
}

+ 41 - 0
common/common-rest-model/src/main/java/com.yihu.wlyy/rest/other/DoctorHomePage.java

@ -0,0 +1,41 @@
package com.yihu.wlyy.rest.other;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
 * Created by Administrator on 2018/4/8 0008.
 */
@ApiModel("医生首页")
public class DoctorHomePage {
    @ApiModelProperty("医生关注数目")
    private Integer concernCount;
    @ApiModelProperty("医生评价分数")
    private Double doctorScore;
    @ApiModelProperty("医生总咨询数目")
    private Integer doctoConsult;
    public Integer getConcernCount() {
        return concernCount;
    }
    public void setConcernCount(Integer concernCount) {
        this.concernCount = concernCount;
    }
    public Double getDoctorScore() {
        return doctorScore;
    }
    public void setDoctorScore(Double doctorScore) {
        this.doctorScore = doctorScore;
    }
    public Integer getDoctoConsult() {
        return doctoConsult;
    }
    public void setDoctoConsult(Integer doctoConsult) {
        this.doctoConsult = doctoConsult;
    }
}

+ 8 - 9
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/concern/ConcernDao.java

@ -3,12 +3,13 @@ package com.yihu.wlyy.repository.concern;
import com.yihu.wlyy.entity.concern.ConcernDO;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.patient.Patient;
import io.vavr.collection.List;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * Created by Administrator on 2018/4/4 0004.
 */
@ -29,15 +30,13 @@ public interface ConcernDao extends
    @Query("select d from  ConcernDO c,Doctor d where c.concernDoctorCode=d.code and  c.status=1  and  c.patient=?1  ")
    List<Doctor> listDoctorsByPatientCode(String patientCode);
    /**
     * 目前是1个团队一个医生的 所以先这么做
     *
     * @param doctorCode
     * @return
     */
    @Query("select p from  ConcernDO c,Patient p where c.patient=p.code and  c.status=1  and  c.concernDoctorCode=?1")
    List<Patient> listPatientsByDoctorCode(String doctorCode);
    @Query(" from  ConcernDO c where  c.status=1  and  c.patient=?1  and  c.concernDoctorCode=?2")
    ConcernDO findByPatientAndDoctor(String patientCode, String doctorCode);
    @Query("select count(id) from  ConcernDO  where   status=1  and  concernDoctorCode=?1")
    Integer countPatientsByDoctorCode(String doctorCode);
    @Query("select count(id) from  ConcernDO  where   concernDoctorCode=?1 group by patient")
    Integer countAllPatientsByDoctorCode(String doctorCode);
}

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/consult/ConsultDao.java

@ -31,8 +31,8 @@ public interface ConsultDao extends PagingAndSortingRepository<Consult, Long>, J
    @Query("select count(a) from Consult a,ConsultTeamDoctor b  where a.code = b.consult and a.patient=?1 and b.to=?2 and b.from is null")
    Integer findByPatient(String patientCode, String doctorCode);
    @Query("select a.id,a.type,a.code,a.title,a.symptoms,a.czrq,b.status,b.adminTeamId,b.team from Consult a,ConsultTeam b where a.code = b.consult and a.patient = ?1 and b.adminTeamId = ?2 and a.del = '1' order by a.czrq desc")
    Page<Object> findByPatientAndTeam(String patient, Long team, Pageable pageRequest);
    @Query("select a.id,a.type,a.code,a.title,a.symptoms,a.czrq,b.status,b.adminTeamId,b.team from Consult a,ConsultTeam b where a.code = b.consult and a.patient = ?1  and a.del = '1' order by a.czrq desc")
    Page<Object> findByPatientAndTeam(String patient, Pageable pageRequest);
    //获取咨询的状态
    @Query("select a from Consult a,ConsultTeam b where a.code = b.consult and a.code = ?1 ")

+ 4 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/consult/ConsultTeamDao.java

@ -301,4 +301,8 @@ public interface ConsultTeamDao extends PagingAndSortingRepository<ConsultTeam,
	//按时间、类型、咨询时间统计居民咨询数量
	@Query("SELECT COUNT(1) FROM ConsultTeam a WHERE a.patient = ?1 AND a.type = ?2 AND a.czrq >= ?3 AND a.czrq <= ?4 AND a.status = 1 AND a.del = '1' ")
	int countRemainConsult(String patient, int type, Date begin,Date end);
	//查询医生的关注数
	@Query("SELECT COUNT(id) FROM ConsultTeam a WHERE  doctor=?1 and a.del='1' ")
	Integer countByDoctor(String doctorCode);
}

+ 6 - 6
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/followup/FollowUpDao.java

@ -45,8 +45,8 @@ public interface FollowUpDao extends PagingAndSortingRepository<Followup, Long>,
     * @param pageable
     * @return
     */
    @Query("select d.code,d.name,d.photo,a.followupType,a.followupClass,a.status,a.createTime,a.updateTime,a.followupManagerStatus,c.code,c.name,c.photo" + ",a.followupDate,a.followupPlanDate,a.followupNextDate,a.id,a.followupNo,a.prescriptionCode from Followup a, Doctor d, Doctor c where a.doctorCode = d.code and a.creater = c.code and a.patientCode = ?1 and a.adminTeamCode = ?2 and a.status > 0")
    Page<Object> findByPatientAndTeam(String patient, Long teamCode, Pageable pageable);
    @Query("select d.code,d.name,d.photo,a.followupType,a.followupClass,a.status,a.createTime,a.updateTime,a.followupManagerStatus,c.code,c.name,c.photo" + ",a.followupDate,a.followupPlanDate,a.followupNextDate,a.id,a.followupNo,a.prescriptionCode from Followup a, Doctor d, Doctor c where a.doctorCode = d.code and a.creater = c.code and a.patientCode = ?1  and a.status > 0")
    Page<Object> findByPatientAndTeam(String patient,Pageable pageable);
    
    /**
     * 查找所有的随访计划(未开始的归类为计划)
@ -55,8 +55,8 @@ public interface FollowUpDao extends PagingAndSortingRepository<Followup, Long>,
     * @param pageable
     * @return
     */
    @Query("select d.code,d.name,d.photo,a.followupType,a.followupClass,a.status,a.createTime,a.updateTime,a.followupManagerStatus,c.code,c.name,c.photo" + ",a.followupDate,a.followupPlanDate,a.followupNextDate,a.id,a.followupNo,a.prescriptionCode from Followup a, Doctor d, Doctor c where a.doctorCode = d.code and a.creater = c.code and a.patientCode = ?1 and a.adminTeamCode = ?2 and a.status = '2'")
    Page<Object> findPlanByPatientAndTeam(String patient, Long teamCode, Pageable pageable);
    @Query("select d.code,d.name,d.photo,a.followupType,a.followupClass,a.status,a.createTime,a.updateTime,a.followupManagerStatus,c.code,c.name,c.photo" + ",a.followupDate,a.followupPlanDate,a.followupNextDate,a.id,a.followupNo,a.prescriptionCode from Followup a, Doctor d, Doctor c where a.doctorCode = d.code and a.creater = c.code and a.patientCode = ?1 and a.status = '2'")
    Page<Object> findPlanByPatientAndTeam(String patient, Pageable pageable);
    /**
@ -66,8 +66,8 @@ public interface FollowUpDao extends PagingAndSortingRepository<Followup, Long>,
     * @param pageable
     * @return
     */
    @Query("select d.code,d.name,d.photo,a.followupType,a.followupClass,a.status,a.createTime,a.updateTime,a.followupManagerStatus,c.code,c.name,c.photo" + ",a.followupDate,a.followupPlanDate,a.followupNextDate,a.id,a.followupNo,a.prescriptionCode from Followup a, Doctor d, Doctor c where a.doctorCode = d.code and a.creater = c.code and a.patientCode = ?1 and a.adminTeamCode = ?2 and (a.status = '1' or a.status = '3')")
    Page<Object> findRecordByPatientAndTeam(String patient, Long teamCode, Pageable pageable);
    @Query("select d.code,d.name,d.photo,a.followupType,a.followupClass,a.status,a.createTime,a.updateTime,a.followupManagerStatus,c.code,c.name,c.photo" + ",a.followupDate,a.followupPlanDate,a.followupNextDate,a.id,a.followupNo,a.prescriptionCode from Followup a, Doctor d, Doctor c where a.doctorCode = d.code and a.creater = c.code and a.patientCode = ?1  and (a.status = '1' or a.status = '3')")
    Page<Object> findRecordByPatientAndTeam(String patient, Pageable pageable);
    
    /**
     * 根据续方CODE获取随访记录

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/patient/PatientHealthGuidanceDao.java

@ -55,6 +55,6 @@ public interface PatientHealthGuidanceDao extends PagingAndSortingRepository<Pat
    @Query("SELECT count(a) from PatientHealthGuidance a WHERE  a.patient=?2 and a.doctor=?1 ")
    Integer findbydoctorAndPatient(String doctor, String patientCode);
    @Query("select b.name, b.photo, a.id, substring(a.content, 1, 50) as content, a.createTime,b.level,b.code,a.adminTeamCode,a.readStatus from PatientHealthGuidance a, Doctor b where a.doctor = b.code and a.patient = ?1 and a.adminTeamCode = ?2 and a.del = '1'")
    Page<Object> findByPatientAndTeamCode(String patient, Long teamCode, Pageable pageable);
    @Query("select b.name, b.photo, a.id, substring(a.content, 1, 50) as content, a.createTime,b.level,b.code,a.adminTeamCode,a.readStatus from PatientHealthGuidance a, Doctor b where a.doctor = b.code and a.patient = ?1 and a.del = '1'")
    Page<Object> findByPatientAndTeamCode(String patient, Pageable pageable);
}

+ 44 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/concern/ConcernService.java

@ -11,13 +11,14 @@ import com.yihu.wlyy.repository.doctor.DoctorTeamDao;
import com.yihu.wlyy.repository.doctor.DoctorTeamMemberDao;
import com.yihu.wlyy.repository.patient.PatientDao;
import com.yihu.wlyy.service.BaseService;
import io.vavr.collection.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.List;
/**
 * Created by Administrator on 2018/4/4 0004.
@ -140,16 +141,55 @@ public class ConcernService extends BaseService {
        return doctors;
    }
    /**
     * 获取患者关注医生
     * 获取医生的患者
     *
     * @param doctorCode
     * @return
     */
    public List<Patient> listPatientsByDoctorCode(String doctorCode,Integer page,Integer pageSize) {
        String sql="select  " +
                " p.`code`,p.name,p.idcard,p.sex,p.photo,p.openid,c.create_time concern_create_time " +
                " from wlyy_patient p,wlyy_concern c " +
                " where " +
                " p.`code`=c.patient and " +
                " c.concern_doctor_code= '"+doctorCode+"'and" +
                " c.`status`=1 " +
                " order by concern_create_time desc limit "+page+","+pageSize;
        List<Patient> patients = (List<Patient>) jdbcTemplate.query(sql,new BeanPropertyRowMapper(Patient.class));
        return patients;
    }
    /**
     * 获取医生的患者数目
     *
     * @param doctorCode
     * @return
     */
    public List<Patient> listPatientsByDoctorCode(String doctorCode) {
    public Integer countPatientsByDoctorCode(String doctorCode) {
        List<Patient> patients = concernDao.listPatientsByDoctorCode(doctorCode);
        Integer patients = concernDao.countPatientsByDoctorCode(doctorCode);
        return patients;
    }
    /**
     * 获取医生的关注数 包含失效
     * @param doctorCode
     * @return
     */
    public Integer countAllPatientsByDoctorCode(String doctorCode) {
        Integer patients = concernDao.countAllPatientsByDoctorCode(doctorCode);
        return patients;
    }
    public ConcernDO getByDoctorAndPatient(String doctorCode, String patientCode) {
        return concernDao.findByPatientAndDoctor(patientCode,doctorCode);
    }
    public ConcernDO findByCode(String concernCode) {
        return concernDao.findByCode(concernCode);
    }
}

+ 6 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/consult/ConsultTeamService.java

@ -673,15 +673,14 @@ public class ConsultTeamService extends ConsultService {
     * 查询居民咨询记录
     *
     * @param patient
     * @param teamCode
     * @param page
     * @param pageSize
     * @return
     */
    public JSONArray findByPatientAndTeam(String patient, Long teamCode, int page, int pageSize) {
    public JSONArray findByPatientAndTeam(String patient, int page, int pageSize) {
        PageRequest pageRequest = new PageRequest(page, pageSize);
        Patient p = patientDao.findByCode(patient);
        Page<Object> result = consultDao.findByPatientAndTeam(patient, teamCode, pageRequest);
        Page<Object> result = consultDao.findByPatientAndTeam(patient, pageRequest);
        JSONArray array = new JSONArray();
        for (Object obj : result) {
@ -1009,7 +1008,7 @@ public class ConsultTeamService extends ConsultService {
            followup.setStatus("2");     //状态 0取消 1已完成 2未开始 3进行中
            followup.setCreateTime(new Date());
            followup.setCreater(doctorCode);
            followup.setAdminTeamCode(signFamily.getAdminTeamId());
            followup.setAdminTeamCode(signFamily.getAdminTeamId()+"");
            followup.setSignType(2);
            //保存质询code
            followup.setSignCode(patientService.getSignCodeByPatient(patient));
@ -2606,4 +2605,7 @@ public class ConsultTeamService extends ConsultService {
        return json;
    }
    public Integer countByDoctor(String doctorCode) {
        return consultTeamDao.countByDoctor(doctorCode);
    }
}

+ 17 - 23
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/followup/FollowUpService.java

@ -5,6 +5,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.es.entity.FollowupContentESDO;
import com.yihu.wlyy.config.es.ElasticFactory;
import com.yihu.wlyy.config.es.ElastricSearchSave;
import com.yihu.wlyy.entity.concern.ConcernDO;
import com.yihu.wlyy.entity.dict.SystemDict;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.followup.Followup;
@ -24,6 +25,7 @@ import com.yihu.wlyy.repository.message.MessageDao;
import com.yihu.wlyy.repository.patient.PatientDao;
import com.yihu.wlyy.repository.patient.SignFamilyDao;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.service.app.concern.ConcernService;
import com.yihu.wlyy.service.app.message.MessageService;
import com.yihu.wlyy.service.app.team.DrHealthTeamService;
import com.yihu.wlyy.service.common.account.PatientService;
@ -125,6 +127,8 @@ public class FollowUpService extends BaseService {
    private ElastricSearchSave elastricSearchSave;
    @Autowired
    private MessageService messageService;
    @Autowired
    private ConcernService concernService;
    /**
     * 转译随访信息
@ -250,13 +254,13 @@ public class FollowUpService extends BaseService {
        Page<Object> result = null;
        if (StringUtils.isBlank(type)) {
            result = followupDao.findByPatientAndTeam(patient, teamCode, pageRequest);
            result = followupDao.findByPatientAndTeam(patient, pageRequest);
        } else if ("1".equals(type)) {
            //已经开始的就是记录
            result = followupDao.findPlanByPatientAndTeam(patient, teamCode, pageRequest);
            result = followupDao.findPlanByPatientAndTeam(patient, pageRequest);
        } else if ("2".equals(type)) {
            //未开始的就是计划
            result = followupDao.findRecordByPatientAndTeam(patient, teamCode, pageRequest);
            result = followupDao.findRecordByPatientAndTeam(patient, pageRequest);
        } else {
        }
@ -371,32 +375,26 @@ public class FollowUpService extends BaseService {
    public Iterable<Followup> addFollowupPlan(String doctorCode, String patientCode, String data) throws Exception {
        //批量随访计划
        JavaType javaType = objectMapper.getTypeFactory().constructParametricType(List.class, Map.class);
        List<Map<String, String>> list = objectMapper.readValue(data, javaType);
        List<Map<String, Object>> list = objectMapper.readValue(data, javaType);
        if (list != null && list.size() > 0) {
            //获取患者信息
            Patient patient = patientDao.findByCode(patientCode);
            if (patient == null) {
                throw new Exception("not exit patient:" + patientCode + ".\r\n");
            }
            SignFamily signFamily = signFamilyDao.findByjiatingPatient(patientCode);
            if (signFamily == null) {
                signFamily = signFamilyDao.findBySanshiPatient(patientCode);
                if (signFamily == null) {
                    throw new Exception("can not find patient's family sign info");
                }
            }
            ConcernDO concern =  concernService.getByDoctorAndPatient(doctorCode,patientCode);
            List<Followup> followupPlan = new ArrayList<>();
            for (Map<String, String> map : list) {
            for (Map<String, Object> map : list) {
                //获取医生信息
                Doctor doctor = doctorDao.findByCode(map.get("doctor"));
                Doctor doctor = doctorDao.findByCode(map.get("doctor").toString());
                if (doctor == null) {
                    throw new Exception("not exit doctor:" + doctorCode + ".\r\n");
                }
                Followup followup = new Followup();
                followup.setFollowupType(map.get("type"));
                Date date = DateUtil.strToDate(map.get("date"));
                followup.setFollowupType(map.get("type").toString());
                Date date = DateUtil.strToDate(map.get("date").toString());
                followup.setFollowupDate(date);
                followup.setFollowupPlanDate(date);
                followup.setDoctorCode(doctor.getCode());
@ -410,7 +408,7 @@ public class FollowUpService extends BaseService {
                followup.setStatus("2");     //状态 0取消 1已完成 2未开始 3进行中
                followup.setCreateTime(new Date());
                followup.setCreater(doctorCode);
                followup.setAdminTeamCode(signFamily.getAdminTeamId());
                followup.setAdminTeamCode(concern.getTeamCode());
                followup.setSignType(2);
                //新增签约保存CODE
@ -509,12 +507,8 @@ public class FollowUpService extends BaseService {
        if (patient == null) {
            throw new Exception("not exit patient:" + patientCode + ".\r\n");
        }
        SignFamily signFamily = signFamilyDao.findByjiatingPatient(patientCode);
        if (signFamily == null) {
            signFamily = signFamilyDao.findBySanshiPatient(patientCode);
            if (signFamily == null)
                throw new Exception("can not find patient's family sign info");
        }
        ConcernDO concern =  concernService.getByDoctorAndPatient(doctorCode,patientCode);
        Followup followup = new Followup();
        Date followDate = DateUtil.strToDate(date);
@ -534,7 +528,7 @@ public class FollowUpService extends BaseService {
        followup.setStatus("2");     //状态 0取消 1已完成 2未开始 3进行中
        followup.setCreateTime(new Date());
        followup.setCreater(doctorCode);
        followup.setAdminTeamCode(signFamily.getAdminTeamId());
        followup.setAdminTeamCode(concern.getTeamCode());
        followup.setSignType(2);
        //保存质询code
        followup.setSignCode(patientService.getSignCodeByPatient(patientCode));

+ 2 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/health/PatientHealthGuidanceService.java

@ -245,15 +245,14 @@ public class PatientHealthGuidanceService extends BaseService {
	 * 健康指导查询
	 *
	 * @param patient
	 * @param teamCode
	 * @param page
	 * @param pageSize
	 * @return
	 */
	public JSONArray findByPatientAndGuidanceAndTeam(String patient,long teamCode,int page,int pageSize){
	public JSONArray findByPatientAndGuidanceAndTeam(String patient,int page,int pageSize){
		Sort sort = new Sort(Sort.Direction.DESC,"createTime");
		PageRequest pageRequest = new PageRequest(page, pageSize, sort);
		Page<Object> result = patientHealthGuidanceDao.findByPatientAndTeamCode(patient,teamCode,pageRequest);
		Page<Object> result = patientHealthGuidanceDao.findByPatientAndTeamCode(patient,pageRequest);
		JSONArray array = new JSONArray();
		if (result != null) {
			for (Object obj : result) {

+ 3 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prenatalInspector/PrenatalInspectorPreCardService.java

@ -990,10 +990,10 @@ public class PrenatalInspectorPreCardService extends BaseService {
                }
            }
            if (!flag && StringUtils.isNotEmpty(mobile)) {
//                发送短信消息
                org.json.JSONObject resultJson = smsService.sendMsg(mobile, name + ":,您好!您的家庭医生" + doctor.getName() + "提醒你,您和您的宝宝需要进行产检啦~" +
//
                String responseMessage = smsService.sendMsg(mobile, name + ":,您好!您的家庭医生" + doctor.getName() + "提醒你,您和您的宝宝需要进行产检啦~" +
                        " 您可微信搜索公众号:厦门i健康,关注公众号预约产检时间/查看孕检计划及历史检查记录,更可及时获取产检提醒哟~");
                if (resultJson != null && resultJson.getInt("result") == 0) {
                if (!org.springframework.util.StringUtils.isEmpty(responseMessage)&& (net.sf.json.JSONObject.fromObject(responseMessage).getInt("Code")==10000))   {
                    flag = true;
                }
            }

+ 7 - 8
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/PatientRemindService.java

@ -20,6 +20,7 @@ import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.wechat.util.WeiXinAccessTokenUtils;
import com.yihu.wlyy.wechat.util.WeiXinOpenIdUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.xpath.operations.Bool;
import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
@ -218,14 +219,12 @@ public class PatientRemindService extends BaseService {
            if (StringUtils.isNotEmpty(p.getMobile())) {
                isMobileExist = true;
                JSONObject result = smsService.sendMsg(p.getMobile(), doc.getName() + "医生提醒您:为完成家庭医生签约," +
                String responseMessage = smsService.sendMsg(p.getMobile(), doc.getName() + "医生提醒您:为完成家庭医生签约," +
                        "尽早为您提供家庭医生服务,请尽快到" + hos.getName() + "(地址:" + hos.getAddress() + ")缴费");
                if (result != null && result.getInt("result") == 0) {
                if (!org.springframework.util.StringUtils.isEmpty(responseMessage)&& (net.sf.json.JSONObject.fromObject(responseMessage).getInt("Code")==10000))   {
                    mFlag = true;
                }
                if (result != null) {
                    mDesc = result.getString("description");
                }
            }
            WechatTemplateConfig templateConfig = templateConfigDao.findByScene("template_expenses_remind","jftx");
@ -517,14 +516,14 @@ public class PatientRemindService extends BaseService {
        String msg = "尊敬的" + p.get("name").toString() + "," + doctor.getName() + "医生提醒您:" +
                "为更好地为您提供健康服务,请您关注并登录\"厦门i健康\"微信公众号,与医生进行互动。";
        JSONObject smsResult = smsService.sendMsg(p.get("mobile").toString(), msg);
        String responseMessage = smsService.sendMsg(p.get("mobile").toString(), msg);
        if (smsResult != null && smsResult.getInt("result") == 0) {
        if (!org.springframework.util.StringUtils.isEmpty(responseMessage)&& (net.sf.json.JSONObject.fromObject(responseMessage).getInt("Code")==10000))   {
            result.put("status", 200);
            result.put("msg", "提醒成功");
        } else {
            result.put("status", -1);
            result.put("msg", "对不起,短信提醒失败,失败原因:" + smsResult.getString("description"));
            result.put("msg", "对不起,短信提醒失败");
        }
        return result;

+ 40 - 76
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statistics/ServiceStatisticsService.java

@ -16,6 +16,7 @@ import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Map;
@ -42,64 +43,28 @@ public class ServiceStatisticsService extends BaseService {
    @Autowired
    private ElasticsearchUtil elasticsearchUtil;
    public JSONObject getServiceStatistics(String patient, long teamCode, String doctor) throws Exception {
    public JSONObject getServiceStatistics(String patient, String doctor) throws Exception {
        JSONObject result = new JSONObject();
        AdminTeam team = teamService.getTeam(teamCode);
        SignFamily signFamily = signFamilyDao.findByPatientAndAdminTeamId(patient, teamCode, 2);
        if (signFamily == null) {
            signFamily = signFamilyDao.findByPatientAndAdminTeamId(patient, teamCode, 1);
            if (signFamily == null) {
                throw new Exception("patient and doctor no sign relation");
            } else {
                if((!doctor.equals(team.getLeaderCode()) && !doctor.equals(signFamily.getDoctor())
                        && !doctor.equals(signFamily.getDoctorHealth()))) {
                    throw new Exception("patient and doctor no sign relation");
                }
            }
        } else {
            if((!doctor.equals(team.getLeaderCode()) && !doctor.equals(signFamily.getDoctor())
                    && !doctor.equals(signFamily.getDoctorHealth()))) {
                signFamily = signFamilyDao.findByPatientAndAdminTeamId(patient, teamCode, 1);
                if (signFamily == null) {
                    throw new Exception("patient and doctor no sign relation");
                } else {
                    if((!doctor.equals(team.getLeaderCode()) && !doctor.equals(signFamily.getDoctor())
                            && !doctor.equals(signFamily.getDoctorHealth()))) {
                        throw new Exception("patient and doctor no sign relation");
                    }
                }
            }
        }
        if (signFamily == null) {
            signFamily = signFamilyDao.findByPatientAndAdminTeamId(patient, teamCode, 1);
            if (signFamily == null) {
                throw new Exception("sign info can not find");
            }
        }
        Calendar today = Calendar.getInstance();
        today.set(Calendar.DATE, 1);
        String monthBegin = DateUtil.dateToStrShort(today.getTime()) + " 00:00:00";
        String yearBegin = DateUtil.dateToStrShort(signFamily.getBegin()) + " 00:00:00";
        String yearEnd = DateUtil.dateToStrShort(signFamily.getEnd()) + " 23:59:59";
        JSONObject consult = getConsultStatistics(patient, teamCode, yearBegin, yearEnd, monthBegin);
        String yearBegin = "2018-01-01 00:00:00";
        String yearEnd = DateUtil.dateToStrShort(new Date()) + " 23:59:59";
        JSONObject consult = getConsultStatistics(patient, doctor, yearBegin, yearEnd, monthBegin);
        result.put("consult", consult);
        JSONObject followup = getFollowupStatistics(patient, teamCode, yearBegin, yearEnd, monthBegin);
        JSONObject followup = getFollowupStatistics(patient, doctor, yearBegin, yearEnd, monthBegin);
        result.put("followup", followup);
        JSONObject reservation = getReservationStatistics(patient, teamCode, yearBegin, yearEnd, monthBegin);
        JSONObject reservation = getReservationStatistics(patient, doctor, yearBegin, yearEnd, monthBegin);
        result.put("reservation", reservation);
        JSONObject guidance = getGuidanceStatistics(patient, teamCode, yearBegin, yearEnd, monthBegin);
        JSONObject guidance = getGuidanceStatistics(patient, doctor, yearBegin, yearEnd, monthBegin);
        result.put("guidance", guidance);
        JSONObject article = getArticleStatistics(patient, teamCode, DateUtil.dateToStrShort(signFamily.getBegin()), DateUtil.dateToStrShort(signFamily.getEnd()), DateUtil.dateToStrShort(today.getTime()));
        JSONObject article = getArticleStatistics(patient, doctor, "2018-01-01", DateUtil.dateToStrShort(new Date()), DateUtil.dateToStrShort(today.getTime()));
        result.put("article", article);
        return result;
@ -115,21 +80,21 @@ public class ServiceStatisticsService extends BaseService {
     * @param monthBegin
     * @return
     */
    public JSONObject getConsultStatistics(String patient, long teamCode, String yearBegin, String yearEnd, String monthBegin) {
    public JSONObject getConsultStatistics(String patient, String doctor, String yearBegin, String yearEnd, String monthBegin) {
        JSONObject result = new JSONObject();
        result.put("history", 0);
        result.put("history", 0);
        result.put("history", 0);
        String sqlHistory = "select count(1) h from wlyy_consult_team where patient = ? and admin_team_code = ?";
        String sqlYear = "select count(1) y from wlyy_consult_team where patient = ? and admin_team_code = ? and czrq >= ? and czrq <= ?";
        String sqlMonth = "select count(1) m from wlyy_consult_team where patient = ? and admin_team_code = ? and czrq >= ?";
        String sqlHistory = "select count(1) h from wlyy_consult_team where patient = ? and doctor = ?";
        String sqlYear = "select count(1) y from wlyy_consult_team where patient = ? and doctor = ? and czrq >= ? and czrq <= ?";
        String sqlMonth = "select count(1) m from wlyy_consult_team where patient = ? and doctor = ? and czrq >= ?";
        String sql = "select * from " +
                "(" + sqlHistory + ") a" +
                ",(" + sqlYear + ") b" +
                ",(" + sqlMonth + ") c";
        List<Map<String, Object>> counts = jdbcTemplate.queryForList(sql, new Object[]{patient, teamCode,
                patient, teamCode, yearBegin, yearEnd, patient, teamCode, monthBegin
        List<Map<String, Object>> counts = jdbcTemplate.queryForList(sql, new Object[]{patient, doctor,
                patient, doctor, yearBegin, yearEnd, patient, doctor, monthBegin
        });
        if (counts != null && counts.size() > 0) {
@ -145,13 +110,13 @@ public class ServiceStatisticsService extends BaseService {
     * 健康教育统计
     *
     * @param patient
     * @param teamCode
     * @param doctor
     * @param yearBegin
     * @param yearEnd
     * @param monthBegin
     * @return
     */
    public JSONObject getArticleStatistics(String patient, long teamCode, String yearBegin, String yearEnd, String monthBegin) {
    public JSONObject getArticleStatistics(String patient, String doctor, String yearBegin, String yearEnd, String monthBegin) {
               JSONObject result = new JSONObject();
        result.put("history", 0);
        result.put("year", 0);
@ -175,9 +140,9 @@ public class ServiceStatisticsService extends BaseService {
        }*/
        //数据转移至Es
        String sqlHistory="select count(*) AS h from " + esType + " where patientCode='" + patient + "' and adminTeamCode = '"+teamCode+"'";
        String sqlYear = "select count(*) AS y from "+esType+" where patientCode='" + patient + "' and adminTeamCode = '"+teamCode+"' and createTime >= '"+changeDate(yearBegin)+"' and createTime <= '"+changeDate(yearEnd)+"'";
        String sqlMonth = "select count(*) AS m from "+esType+" where patientCode='" + patient + "' and adminTeamCode = '"+teamCode+"' and createTime >= '"+changeDate(monthBegin)+"'";
        String sqlHistory="select count(*) AS h from " + esType + " where patientCode='" + patient + "' and doctorCode = '"+doctor+"'";
        String sqlYear = "select count(*) AS y from "+esType+" where patientCode='" + patient + "' and doctorCode = '"+doctor+"' and createTime >= '"+changeDate(yearBegin)+"' and createTime <= '"+changeDate(yearEnd)+"'";
        String sqlMonth = "select count(*) AS m from "+esType+" where patientCode='" + patient + "' and doctorCode = '"+doctor+"' and createTime >= '"+changeDate(monthBegin)+"'";
        result.put("history", elasticsearchUtil.excuteForLong(sqlHistory,esType,esIndex));
        result.put("year", elasticsearchUtil.excuteForLong(sqlYear,esType,esIndex));
@ -195,27 +160,27 @@ public class ServiceStatisticsService extends BaseService {
     * 健康指导统计
     *
     * @param patient
     * @param teamCode
     * @param doctor
     * @param yearBegin
     * @param yearEnd
     * @param monthBegin
     * @return
     */
    public JSONObject getGuidanceStatistics(String patient, long teamCode, String yearBegin, String yearEnd, String monthBegin) {
    public JSONObject getGuidanceStatistics(String patient, String doctor, String yearBegin, String yearEnd, String monthBegin) {
        JSONObject result = new JSONObject();
        result.put("history", 0);
        result.put("year", 0);
        result.put("month", 0);
        String sqlHistory = "select count(1) h from wlyy_patient_health_guidance where patient = ? and admin_team_code = ?";
        String sqlYear = "select count(1) y from wlyy_patient_health_guidance where patient = ? and admin_team_code = ? and czrq >= ? and czrq <= ?";
        String sqlMonth = "select count(1) m from wlyy_patient_health_guidance where patient = ? and admin_team_code = ? and czrq >= ?";
        String sqlHistory = "select count(1) h from wlyy_patient_health_guidance where patient = ? and doctor = ?";
        String sqlYear = "select count(1) y from wlyy_patient_health_guidance where patient = ? and doctor = ? and czrq >= ? and czrq <= ?";
        String sqlMonth = "select count(1) m from wlyy_patient_health_guidance where patient = ? and doctor = ? and czrq >= ?";
        String sql = "select * from " +
                "(" + sqlHistory + ") a" +
                ",(" + sqlYear + ") b" +
                ",(" + sqlMonth + ") c";
        List<Map<String, Object>> counts = jdbcTemplate.queryForList(sql, new Object[]{patient, teamCode,
                patient, teamCode, yearBegin, yearEnd, patient, teamCode, monthBegin
        List<Map<String, Object>> counts = jdbcTemplate.queryForList(sql, new Object[]{patient, doctor,
                patient, doctor, yearBegin, yearEnd, patient, doctor, monthBegin
        });
        if (counts != null && counts.size() > 0) {
@ -231,20 +196,19 @@ public class ServiceStatisticsService extends BaseService {
     * 随访计划统计
     *
     * @param patient
     * @param teamCode
     * @param yearBegin
     * @param yearEnd
     * @param monthBegin
     * @return
     */
    public JSONObject getFollowupStatistics(String patient, long teamCode, String yearBegin, String yearEnd, String monthBegin) {
    public JSONObject getFollowupStatistics(String patient, String doctor, String yearBegin, String yearEnd, String monthBegin) {
        JSONObject result = new JSONObject();
        result.put("history", 0);
        result.put("year", 0);
        result.put("month", 0);
        String sqlHistory = "select count(1) h from wlyy_followup where patient_code = ? and admin_team_code = ?";
        String sqlYear = "select count(1) y from wlyy_followup where patient_code = ? and admin_team_code = ? and create_time >= ? and create_time <= ?";
        String sqlMonth = "select count(1) m from wlyy_followup where patient_code = ? and admin_team_code = ? and create_time >= ?";
        String sqlHistory = "select count(1) h from wlyy_followup where patient_code = ? and doctor_code = ?";
        String sqlYear = "select count(1) y from wlyy_followup where patient_code = ? and doctor_code = ? and create_time >= ? and create_time <= ?";
        String sqlMonth = "select count(1) m from wlyy_followup where patient_code = ? and doctor_code = ? and create_time >= ?";
        String sql = "select * from " +
                "(" + sqlHistory + " and status > 0" + ") a" +
                ",(" + sqlYear + " and status > 0" + ") b" +
@ -253,9 +217,9 @@ public class ServiceStatisticsService extends BaseService {
                ",(" + sqlYear.replace(" y ", " yy ") + " and status = 1" + ") e" +
                ",(" + sqlMonth.replace(" m ", " mm ") + " and status = 1" + ") f";
        List<Map<String, Object>> counts = jdbcTemplate.queryForList(sql, new Object[]{patient, teamCode,
                patient, teamCode, yearBegin, yearEnd, patient, teamCode, monthBegin, patient, teamCode,
                patient, teamCode, yearBegin, yearEnd, patient, teamCode, monthBegin
        List<Map<String, Object>> counts = jdbcTemplate.queryForList(sql, new Object[]{patient, doctor,
                patient, doctor, yearBegin, yearEnd, patient, doctor, monthBegin, patient, doctor,
                patient, doctor, yearBegin, yearEnd, patient, doctor, monthBegin
        });
        if (counts != null && counts.size() > 0) {
@ -278,21 +242,21 @@ public class ServiceStatisticsService extends BaseService {
     * @param monthBegin
     * @return
     */
    public JSONObject getReservationStatistics(String patient, long teamCode, String yearBegin, String yearEnd, String monthBegin) {
    public JSONObject getReservationStatistics(String patient, String doctor, String yearBegin, String yearEnd, String monthBegin) {
        JSONObject result = new JSONObject();
        result.put("history", 0);
        result.put("year", 0);
        result.put("month", 0);
        String sqlHistory = "select count(1) h from wlyy_patient_reservation where patient = ? and admin_team_code = ?";
        String sqlYear = "select count(1) y from wlyy_patient_reservation where patient = ? and admin_team_code = ? and czrq >= ? and czrq <= ?";
        String sqlMonth = "select count(1) m from wlyy_patient_reservation where patient = ? and admin_team_code = ? and czrq >= ?";
        String sqlHistory = "select count(1) h from wlyy_patient_reservation where patient = ? and doctor = ?";
        String sqlYear = "select count(1) y from wlyy_patient_reservation where patient = ? and doctor = ? and czrq >= ? and czrq <= ?";
        String sqlMonth = "select count(1) m from wlyy_patient_reservation where patient = ? and doctor = ? and czrq >= ?";
        String sql = "select * from " +
                "(" + sqlHistory + ") a" +
                ",(" + sqlYear + ") b" +
                ",(" + sqlMonth + ") c";
        List<Map<String, Object>> counts = jdbcTemplate.queryForList(sql, new Object[]{patient, teamCode,
                patient, teamCode, yearBegin, yearEnd, patient, teamCode, monthBegin
        List<Map<String, Object>> counts = jdbcTemplate.queryForList(sql, new Object[]{patient, doctor,
                patient, doctor, yearBegin, yearEnd, patient, doctor, monthBegin
        });
        if (counts != null && counts.size() > 0) {

+ 31 - 30
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/common/SMSService.java

@ -12,6 +12,8 @@ import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.HttpClientUtil;
import com.yihu.wlyy.util.SystemConf;
import com.yihu.wlyy.web.third.jkzl.ZBSmsService;
import net.sf.json.JSON;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONObject;
@ -48,27 +50,30 @@ public class SMSService extends BaseService {
    private StringRedisTemplate redisTemplate;
    @Value("${pushMes.redis_prescription_title}")
    private String redisQueue;
    @Autowired
    private ZBSmsService zbSmsService;
    /**
     * 内网通过redis的队列发送
     *
     * @param mobile
     * @param ip
     * @param type
     * @return
     */
    public String sendToNeiWang(String mobile, String ip, int type){
    public String sendToNeiWang(String mobile, String ip, int type) {
        com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
        json.put("mobile",mobile);
        json.put("ip",ip);
        json.put("type",type);
        json.put("time",DateUtil.getStringDate());
        json.put("mobile", mobile);
        json.put("ip", ip);
        json.put("type", type);
        json.put("time", DateUtil.getStringDate());
        com.alibaba.fastjson.JSONObject mes = new com.alibaba.fastjson.JSONObject();
        mes.put("title", "sendSms");
        mes.put("value", json.toString());
        redisTemplate.opsForList().leftPush(redisQueue, mes.toString());
        return  "ok";
        return "ok";
    }
    /**
@ -188,20 +193,18 @@ public class SMSService extends BaseService {
        sms.setIp(ip);
        sms.setType(type);
        sms.setStatus(1);
        // 调用总部发送信息的接口
        String result = HttpClientUtil.post(SystemConf.getInstance().getSmsUrl(), buildSmsParams(sms.getContent(), mobile), "GBK");
        JSONObject json = toJson(result);
        if (json == null) {
            // 发送失败
            throw new Exception("短信发送失败!");
        } else if (json.getInt("result") != 0) {
            return json.getString("description");
        } else {
            //发送成功,保存到数据库
        // 调用发送信息的接口
        String responseMessage = zbSmsService.sendMessage(mobile, sms.getContent());
        if (!StringUtils.isEmpty(responseMessage)&& (net.sf.json.JSONObject.fromObject(responseMessage).getInt("Code")==10000)) {
            // 发送成功
            smsDao.save(sms);
        } else {
            throw new Exception("短信发送失败!");
        }
        return "ok";
    }
    /**
     * 外部短信调用 发送短信验证码接口
     *
@ -233,20 +236,19 @@ public class SMSService extends BaseService {
        sms.setIp(ip);
        sms.setType(type);
        sms.setStatus(1);
        // 调用总部发送信息的接口
        String result = HttpClientUtil.post(SystemConf.getInstance().getSmsUrl(), buildSmsParams(sms.getContent(), mobile), "GBK");
        JSONObject json = toJson(result);
        if (json == null) {
            // 发送失败
            throw new Exception("短信发送失败!");
        } else if (json.getInt("result") != 0) {
            return json.getString("description");
        } else {
            //发送成功,保存到数据库
        // 调用发送信息的接口
        // 调用发送信息的接口
        // 调用发送信息的接口
        String responseMessage = zbSmsService.sendMessage(mobile, sms.getContent());
        if (!StringUtils.isEmpty(responseMessage)&& (net.sf.json.JSONObject.fromObject(responseMessage).getInt("Code")==10000)) {
            // 发送成功
            smsDao.save(sms);
        } else {
            throw new Exception("短信发送失败!");
        }
        return "ok";
    }
    /**
     * 发送短信
     *
@ -254,11 +256,10 @@ public class SMSService extends BaseService {
     * @param content
     * @return
     */
    public  JSONObject sendMsg(String mobile, String content) {
    public String sendMsg(String mobile, String content) {
        // 调用总部发送信息的接口
        String result = HttpClientUtil.post(SystemConf.getInstance().getSmsUrl(), buildSmsParams(content, mobile), "GBK");
        JSONObject json = toJson(result);
        return json;
        // 调用发送信息的接口
      return  zbSmsService.sendMessage(mobile, content);
    }
    /**

+ 3 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/message/SendMessageService.java

@ -101,9 +101,9 @@ public class SendMessageService extends BaseService {
        String response = null;
        try {
            //发送短信消息,调用总部发送信息的接口
            JSONObject resultJson = smsService.sendMsg(mobile, msg);
            if (resultJson != null && resultJson.getInt("result") != 0) {
                response = "短信提醒失败!(原因:" + resultJson.getString("description") + ")";
            String responseMessage = smsService.sendMsg(mobile, msg);
            if (org.springframework.util.StringUtils.isEmpty(responseMessage)|| !(net.sf.json.JSONObject.fromObject(responseMessage).getInt("Code")==10000))   {
                response = "短信提醒失败!(原因:" + net.sf.json.JSONObject.fromObject(responseMessage).getString("Code") + ")";
            }
            response = "短信发送成功!";
        } catch (Exception e) {

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/task/RemindExpensesTask.java

@ -116,7 +116,7 @@ public class RemindExpensesTask implements Runnable {
            }
        }
        JSONObject result = smsService.sendMsg(sb.toString(), doctor.getName() + "医生提醒您:为完成家庭医生签约," +
        String result = smsService.sendMsg(sb.toString(), doctor.getName() + "医生提醒您:为完成家庭医生签约," +
                "尽早为您提供家庭医生服务,您可登录微信账号,进入签约管理,选择待缴费的签约记录进行缴费操作,如需线下缴费,请尽快到" + hospital.getName() + "(地址:" + hospital.getAddress() + ")缴费");
    }
}

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/task/RemindFocusWechatTask.java

@ -47,7 +47,7 @@ public class RemindFocusWechatTask implements Runnable {
                }
                String msg = "尊敬的" + p.get("name").toString() + "," + doctor.getName() + "医生提醒您:" +
                        "为更好地为您提供健康服务,请您关注并登录\"厦门i健康\"微信公众号,与医生进行互动。";
                JSONObject smsResult = SMSService.sendMsg(p.get("mobile").toString(), msg);
                String smsResult = SMSService.sendMsg(p.get("mobile").toString(), msg);
            } catch (Exception e) {
                e.printStackTrace();
            }

+ 41 - 36
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/account/WechatController.java

@ -112,7 +112,12 @@ public class WechatController extends WeixinBaseController {
     */
    @RequestMapping(value = "/check_regist_info", method = RequestMethod.POST)
    @ResponseBody
    public String checkRegistInfo(String name, String idcard, String ssc, String mobile) {
    public String checkRegistInfo(
            @RequestParam(value = "name", required = true)  String name,
            @RequestParam(value = "idcard", required = true) String idcard,
            @RequestParam(value = "ssc", required = false) String ssc,
            @RequestParam(value = "mobile", required = true) String mobile
    ) {
        try {
            if (StringUtils.isEmpty(name)) {
                return error(-1, "姓名不允许为空");
@ -120,9 +125,9 @@ public class WechatController extends WeixinBaseController {
            if (StringUtils.isEmpty(idcard)) {
                return error(-1, "身份证号不允许为空");
            }
            if (StringUtils.isEmpty(ssc)) {
                return error(-1, "社保卡号不允许为空");
            }
//            if (StringUtils.isEmpty(ssc)) {
//                return error(-1, "社保卡号不允许为空");
//            }
            if (StringUtils.isEmpty(mobile)) {
                return error(-1, "手机号不允许为空");
            }
@ -149,18 +154,18 @@ public class WechatController extends WeixinBaseController {
                return error(-1, "请输入正确的身份证号");
            }
            SocialSecurityInfo socialSecurityInfo = socialSecurityInfoDao.findBySfzh18Max(idcard);
            if (socialSecurityInfo != null) {
                if (name.compareTo(socialSecurityInfo.getXming0() == null ? "" : socialSecurityInfo.getXming0()) != 0) {
                    return error(-1, "身份证号与姓名不一致,请检查后重新输入");
                }
                if (ssc.compareTo(socialSecurityInfo.getCardno() == null ? "" : socialSecurityInfo.getCardno()) != 0 && ssc.compareTo(socialSecurityInfo.getCard16() == null ? "" : socialSecurityInfo.getCard16()) != 0) {
                    return error(-1, "身份证号与医保卡号不一致,请检查后重新输入");
                }
            } else {
                return error(-1, "对不起,暂不支持16年6月份之后办理的医保卡注册");
            }
//            SocialSecurityInfo socialSecurityInfo = socialSecurityInfoDao.findBySfzh18Max(idcard);
//
//            if (socialSecurityInfo != null) {
//                if (name.compareTo(socialSecurityInfo.getXming0() == null ? "" : socialSecurityInfo.getXming0()) != 0) {
//                    return error(-1, "身份证号与姓名不一致,请检查后重新输入");
//                }
//                if (ssc.compareTo(socialSecurityInfo.getCardno() == null ? "" : socialSecurityInfo.getCardno()) != 0 && ssc.compareTo(socialSecurityInfo.getCard16() == null ? "" : socialSecurityInfo.getCard16()) != 0) {
//                    return error(-1, "身份证号与医保卡号不一致,请检查后重新输入");
//                }
//            } else {
//                return error(-1, "对不起,暂不支持16年6月份之后办理的医保卡注册");
//            }
            Patient patient = patientDao.findByIdcard(idcard);
@ -188,7 +193,7 @@ public class WechatController extends WeixinBaseController {
    @ResponseBody
    public String regist(@RequestParam(value = "name", required = true) String name,
                         @RequestParam(value = "idcard", required = true) String idcard,
                         @RequestParam(value = "ssc", required = true) String ssc,
                         @RequestParam(value = "ssc", required = false) String ssc,
                         @RequestParam(value = "mobile", required = true) String mobile,
                         @RequestParam(value = "captcha", required = true) String captcha,
                         @RequestParam(value = "openid", required = true) String openid,
@ -200,9 +205,9 @@ public class WechatController extends WeixinBaseController {
            if (StringUtils.isEmpty(idcard)) {
                return error(-1, "身份证号不允许为空!");
            }
            if (StringUtils.isEmpty(ssc)) {
                return error(-1, "社保卡号不允许为空!");
            }
//            if (StringUtils.isEmpty(ssc)) {
//                return error(-1, "社保卡号不允许为空!");
//            }
            if (StringUtils.isEmpty(mobile)) {
                return error(-1, "手机号不允许为空!");
            }
@ -241,22 +246,22 @@ public class WechatController extends WeixinBaseController {
                return error(-1, "请输入正确的身份证号!");
            }
            SocialSecurityInfo socialSecurityInfo = socialSecurityInfoDao.findBySfzh18Max(idcard);
            if (socialSecurityInfo != null) {
                if (name.compareTo(socialSecurityInfo.getXming0() == null ? "" : socialSecurityInfo.getXming0()) != 0) {
                    return error(-1, "身份证号与姓名不一致<br/>请检查后重新输入");
                }
                if (ssc.compareTo(socialSecurityInfo.getCardno() == null ? "" : socialSecurityInfo.getCardno()) != 0) {
                    if (ssc.compareTo(socialSecurityInfo.getCard16() == null ? "" : socialSecurityInfo.getCard16()) != 0) {
                        return error(-1, "身份证号与医保卡号不一致,请检查后重新输入");
                    } else {
                        ssc = socialSecurityInfo.getCardno();//统一只存英文字母开头的医保卡
                    }
                }
            } else {
                return error(-1, "对不起,暂不支持16年6月份之后办理的医保卡注册");
            }
//            SocialSecurityInfo socialSecurityInfo = socialSecurityInfoDao.findBySfzh18Max(idcard);
//
//            if (socialSecurityInfo != null) {
//                if (name.compareTo(socialSecurityInfo.getXming0() == null ? "" : socialSecurityInfo.getXming0()) != 0) {
//                    return error(-1, "身份证号与姓名不一致<br/>请检查后重新输入");
//                }
//                if (ssc.compareTo(socialSecurityInfo.getCardno() == null ? "" : socialSecurityInfo.getCardno()) != 0) {
//                    if (ssc.compareTo(socialSecurityInfo.getCard16() == null ? "" : socialSecurityInfo.getCard16()) != 0) {
//                        return error(-1, "身份证号与医保卡号不一致,请检查后重新输入");
//                    } else {
//                        ssc = socialSecurityInfo.getCardno();//统一只存英文字母开头的医保卡
//                    }
//                }
//            } else {
//                return error(-1, "对不起,暂不支持16年6月份之后办理的医保卡注册");
//            }
            Patient patient = patientDao.findByIdcard(idcard);

+ 24 - 13
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/data/DataHandingService.java

@ -11,6 +11,7 @@ import com.yihu.wlyy.repository.doctor.DoctorDao;
import com.yihu.wlyy.repository.manage.UserDao;
import com.yihu.wlyy.repository.patient.PatientDao;
import com.yihu.wlyy.repository.patient.PatientDeviceDao;
import com.yihu.wlyy.service.app.concern.ConcernService;
import com.yihu.wlyy.util.Base64Utils;
import com.yihu.wlyy.util.ElasticsearchUtil;
import com.yihu.wlyy.util.LatitudeUtils;
@ -50,6 +51,8 @@ public class DataHandingService {
    private PatientDeviceDao patientDeviceDao;
    @Autowired
    private JdbcTemplate jdbcTemplate;
    @Autowired
    private ConcernService concernService;
    @Transactional
    public String producePatientAndDoctorPassword() {
@ -183,14 +186,14 @@ public class DataHandingService {
    public JSONArray getAllDeviceData() {
        JSONArray ja = new JSONArray();
        List<Map<String, Object>> returnData = elasticsearchUtil.excuteDataModel("SELECT location,idCard FROM wlyy_patient_device");
        returnData.stream().forEach(one->{
            net.sf.json.JSONObject jo=new net.sf.json.JSONObject();
            jo.put("idcard",one.get("idCard"));
        returnData.stream().forEach(one -> {
            net.sf.json.JSONObject jo = new net.sf.json.JSONObject();
            jo.put("idcard", one.get("idCard"));
            net.sf.json.JSONObject locatio=new net.sf.json.JSONObject();
            locatio.put("lat",one.get("location.lat")); //纬度 -90 ~~ 90
            locatio.put("lon",one.get("location.lon")); //经度 -180 ~~ 180
            jo.put("location",locatio);
            net.sf.json.JSONObject locatio = new net.sf.json.JSONObject();
            locatio.put("lat", one.get("location.lat")); //纬度 -90 ~~ 90
            locatio.put("lon", one.get("location.lon")); //经度 -180 ~~ 180
            jo.put("location", locatio);
            ja.add(jo);
@ -199,7 +202,7 @@ public class DataHandingService {
    }
    //原有CA的密码没有加密,清洗成加密密码
    public boolean updateCAPassword(){
    public boolean updateCAPassword() {
        boolean flag = true;
        try {
            String sql = " select * from wlyy_doctor where check_password is not null and check_password <> ''";
@ -215,19 +218,27 @@ public class DataHandingService {
//            });
            List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);
            List<Doctor> result = new ArrayList<>();
            list.stream().forEach(one->{
                Doctor d = doctorDao.findByCode(one.get("code")!=null?one.get("code").toString():"");
                if(d!=null){
            list.stream().forEach(one -> {
                Doctor d = doctorDao.findByCode(one.get("code") != null ? one.get("code").toString() : "");
                if (d != null) {
                    d.setCheckPassword(Base64Utils.encryptBASE64(d.getCheckPassword()));
                    result.add(d);
                }
            });
            doctorDao.save(result);
        }catch (Exception e){
        } catch (Exception e) {
            e.printStackTrace();
            flag = false;
        }
        return  flag;
        return flag;
    }
    @Transactional
    public void addConcerns(String doctorCode, String[] patients) {
        Random rand = new Random();
        for (String patient : patients) {
            concernService.addConcern(patient, doctorCode, rand.nextInt(3)+1);
        }
    }
}

+ 37 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/data/DataHandlingController.java

@ -6,6 +6,7 @@ import com.yihu.wlyy.service.app.consult.ConsultTeamService;
import com.yihu.wlyy.service.app.sign.FamilyContractService;
import com.yihu.wlyy.web.BaseController;
import com.yihu.wlyy.web.third.jkedu.service.EduArticleService;
import com.yihu.wlyy.web.third.jkzl.ZBSmsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@ -41,6 +42,8 @@ public class DataHandlingController extends BaseController {
    private com.yihu.wlyy.util.HttpUtil HttpUtil;
    @Autowired
    private EduArticleService eduArticleService;
    @Autowired
    private ZBSmsService zbSmsService;
    /**
     * 生成签约表中的行政团队的code
@ -268,7 +271,8 @@ public class DataHandlingController extends BaseController {
    @RequestMapping(value = "/updateCAPassword", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation("CA密码加密")
    public String updateCAPassword() {
    public String updateCAPassword(
    ) {
        boolean flag = dataHandingService.updateCAPassword();
        if (flag) {
            return write(200, "清洗数据成功!");
@ -276,4 +280,36 @@ public class DataHandlingController extends BaseController {
            return write(0, "清洗数据失败!");
        }
    }
    @RequestMapping(value = "/addConcerns", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation("给某个医生添加关注信息")
    public String addConcerns(
            @ApiParam(name = "doctorCode", value = "医生code", required = true)
            @RequestParam(value = "doctorCode") String doctorCode,
            @ApiParam(name = "patients", value = "患者code", required = true)
            @RequestParam(value = "patients") String patients) {
        try{
            String [] patient=patients.split(",");
            dataHandingService.addConcerns(doctorCode,patient);
            return write(200, "添加数据成功!");
        }catch (Exception e){
            return write(0, "添加数据失败!");
        }
    }
    @RequestMapping(value = "/sendZBMessage", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation("测试总部短信接口")
    public String sendZBMessage(
            @ApiParam(name = "mobile", value = "电话号码", required = true)
            @RequestParam(value = "mobile") String mobile,
            @ApiParam(name = "content", value = "短信内容", required = true)
            @RequestParam(value = "content") String content) {
        try{
            return write(200,  zbSmsService.sendMessage(mobile,content));
        }catch (Exception e){
            return write(0, "添加数据失败!");
        }
    }
}

+ 143 - 133
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/account/DoctorController.java

@ -13,8 +13,11 @@ import com.yihu.wlyy.entity.patient.SocialSecurityInfo;
import com.yihu.wlyy.repository.doctor.DoctorAdminTeamDao;
import com.yihu.wlyy.repository.doctor.SignPatientLabelDao;
import com.yihu.wlyy.repository.patient.SocialSecurityInfoDao;
import com.yihu.wlyy.rest.model.common.SimpleResult;
import com.yihu.wlyy.rest.other.DoctorHomePage;
import com.yihu.wlyy.service.app.account.DoctorInfoService;
import com.yihu.wlyy.service.app.account.PatientInfoService;
import com.yihu.wlyy.service.app.concern.ConcernService;
import com.yihu.wlyy.service.app.consult.ConsultTeamService;
import com.yihu.wlyy.service.app.consult.DoctorCommentService;
import com.yihu.wlyy.service.app.hospital.HospitalDeptService;
@ -26,9 +29,7 @@ import com.yihu.wlyy.service.common.account.RoleService;
import com.yihu.wlyy.service.common.account.TokenService;
import com.yihu.wlyy.util.*;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.*;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray;
import org.json.JSONObject;
@ -94,12 +95,14 @@ public class DoctorController extends BaseController {
    private CommonUtil CommonUtil;
    @Autowired
    private RSAUtils rsaUtils;
    @Autowired
    private ConcernService concernService;
    @ApiOperation("获取当前登录医生的角色")
    @RequestMapping(value = "doctorRole",method =RequestMethod.GET)
    @RequestMapping(value = "doctorRole", method = RequestMethod.GET)
    @ResponseBody
    public String doctorRole(){
        try{
    public String doctorRole() {
        try {
            Doctor doctor = doctorInfoService.findDoctorByCode(getUID());
            Map<String, Object> map = new HashMap<>();
            map.put("id", doctor.getId());
@ -114,21 +117,21 @@ public class DoctorController extends BaseController {
            List<Map<String, String>> roleMap = roleService.getUserRoleAndArea(doctor.getCode());
            map.put("userRole", roleMap);
            //医生当前登录的角色
            List<Map<String, Object>> list = doctorInfoService.getDoctorManagerRole(doctor.getCode(),"Manage_Article_Authentication");
            if(roleMap.size()>0){
            List<Map<String, Object>> list = doctorInfoService.getDoctorManagerRole(doctor.getCode(), "Manage_Article_Authentication");
            if (roleMap.size() > 0) {
                for(Map<String, String> one:roleMap){
                    if("1".equals(one.get("isManage"))){
                for (Map<String, String> one : roleMap) {
                    if ("1".equals(one.get("isManage"))) {
                        map.put("currentUserRole", one);
                        continue;
                    }
                }
                if(list.size()>0&&!org.springframework.util.StringUtils.isEmpty(list.get(0).get("code"))){
                if (list.size() > 0 && !org.springframework.util.StringUtils.isEmpty(list.get(0).get("code"))) {
                    map.put("doctorAuthOperate", "1");
                }else{
                } else {
                    map.put("doctorAuthOperate", "0");
                }
            }else{
            } else {
//                Map<String, String> one = new HashMap<>();
//                one.put("isManage","0");
//                one.put("code", doctor.getHospital());
@ -139,26 +142,26 @@ public class DoctorController extends BaseController {
//                map.put("currentUserRole", one);
                Map<String, String> one = new HashMap<>();
                one.put("isManage","0");
                one.put("isManage", "0");
                one.put("code", doctor.getHospital());
                one.put("name", doctor.getHospitalName());
                one.put("areas", "");
                one.put("level","4");
                one.put("level", "4");
                if(list.size()>0&&!org.springframework.util.StringUtils.isEmpty(list.get(0).get("code"))){
                if (list.size() > 0 && !org.springframework.util.StringUtils.isEmpty(list.get(0).get("code"))) {
                    one.put("authOperate", "1");
                }else{
                } else {
                    one.put("authOperate", "0");
                }
                map.put("currentUserRole", one);
            }
            if ("10" .equals(doctor.getLevel()) && roleMap.size() == 0) {
            if ("10".equals(doctor.getLevel()) && roleMap.size() == 0) {
                return error(-1, "该用户没有管理员权限");
            }
            return write(200, "登录成功", "data", map);
        }catch (Exception e){
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1,"查询失败");
            return error(-1, "查询失败");
        }
    }
@ -170,7 +173,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("社区医院下医生列表查询接口 没分页")
    @RequestMapping(value = "getDoctorsByhospitalNoPage",method =RequestMethod.POST)
    @RequestMapping(value = "getDoctorsByhospitalNoPage", method = RequestMethod.POST)
    @ResponseBody
    public String getDoctorsByhospitalNoPage(
            @RequestParam(required = false) String hospital,
@ -223,7 +226,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("社区医院下医生列表查询接口 有分页")
    @RequestMapping(value = "getDoctorsByhospital",method ={RequestMethod.POST,RequestMethod.GET})
    @RequestMapping(value = "getDoctorsByhospital", method = {RequestMethod.POST, RequestMethod.GET})
    @ResponseBody
    public String getDoctorsByhospital(
            @RequestParam(required = false) String hospital, //医院code
@ -279,7 +282,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("社区医院列表查询接口")
    @RequestMapping(value = "hospitals",method ={RequestMethod.POST,RequestMethod.GET})
    @RequestMapping(value = "hospitals", method = {RequestMethod.POST, RequestMethod.GET})
    @ResponseBody
    public String hospitals(
            int type,
@ -338,7 +341,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("查询存在医生的医院列表")
    @RequestMapping(value = "hospitals_list",method =RequestMethod.POST)
    @RequestMapping(value = "hospitals_list", method = RequestMethod.POST)
    @ResponseBody
    public String hospitalL(@RequestParam(required = true) int type,
                            @RequestParam(required = false) String province,
@ -354,7 +357,7 @@ public class DoctorController extends BaseController {
            page = page >= 1 ? page - 1 : 0;
            List<Hospital> hos = hospitalService.getHospitals(type, province, city, town, key,null, page, pagesize);
            List<Hospital> hos = hospitalService.getHospitals(type, province, city, town, key, null, page, pagesize);
            return write(200, "查询成功", "data", hos);
        } catch (Exception e) {
@ -373,7 +376,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("查询某个医院存在医生科室列表")
    @RequestMapping(value = "/dept_list",method =RequestMethod.POST)
    @RequestMapping(value = "/dept_list", method = RequestMethod.POST)
    @ResponseBody
    public String deptList(@RequestParam(required = true) String hospital,
                           @RequestParam(required = false) String key,
@ -406,7 +409,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("根据科室查询当前在工作医生")
    @RequestMapping(value = "/doctors_list",method =RequestMethod.POST)
    @RequestMapping(value = "/doctors_list", method = RequestMethod.POST)
    @ResponseBody
    public String findWorkingDoctorByDept(@RequestParam(required = false) String dept,
                                          @RequestParam(required = false) String hospital,
@ -436,7 +439,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("根据机构查找科室")
    @RequestMapping(value = "findDeptByHsoptail",method =RequestMethod.POST)
    @RequestMapping(value = "findDeptByHsoptail", method = RequestMethod.POST)
    @ResponseBody
    public String findDeptByHsoptail(
            String hospital,
@ -477,7 +480,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("根据科室查找医生")
    @RequestMapping(value = "findDoctorByDept",method =RequestMethod.POST)
    @RequestMapping(value = "findDoctorByDept", method = RequestMethod.POST)
    @ResponseBody
    public String findDoctorByDept(
            @RequestParam(required = false) String dept,
@ -533,7 +536,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("名医列表")
    @RequestMapping(value = "findFamousDoctor",method =RequestMethod.POST)
    @RequestMapping(value = "findFamousDoctor", method = RequestMethod.POST)
    @ResponseBody
    public String findFamousDoctor(
            @RequestParam(required = false) String key,
@ -586,7 +589,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("退出登录")
    @RequestMapping(value = "loginout",method =RequestMethod.POST)
    @RequestMapping(value = "loginout", method = RequestMethod.POST)
    @ResponseBody
    public String loginout() {
        try {
@ -604,7 +607,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("医生基本信息查询接口")
    @RequestMapping(value = "baseinfo",method ={RequestMethod.POST,RequestMethod.GET})
    @RequestMapping(value = "baseinfo", method = {RequestMethod.POST, RequestMethod.GET})
    @ResponseBody
    public String baseinfo(
            @RequestParam(required = false) String code) {
@ -687,22 +690,26 @@ public class DoctorController extends BaseController {
     *
     * @return
     */
    @ApiOperation("医生基本信息查询接口")
    @RequestMapping(value = "baseinfoCount",method =RequestMethod.POST)
    @ApiOperation(value="医生首页 获取关注人数,医生的评分,医生咨询量1", response =  DoctorHomePage.class)
    @RequestMapping(value = "baseinfoCount", method = RequestMethod.POST)
    @ResponseBody
    public String baseinfoCount(
            String doctorType) {
           @ApiParam(required = false,name = "doctorType",value = "医生类别") @RequestParam(required = false) String doctorType) {
        try {
            Doctor temp = doctorInfoService.findDoctorByCode(getUID());
            if (temp != null) {
                JSONObject json = new JSONObject();
                int count = familyContractService.countAmountSigned(getUID());
                // 审核总数
                json.put("signed_amount", count);
                //关注人数
                int concernCount = concernService.countPatientsByDoctorCode(getUID());
                json.put("concernCount", concernCount);
                int count1 = familyContractService.countAmountUnsign(getUID());
                // 等审核总数
                json.put("unsign_amount", count1);
                //医生的评分
                json.put("doctorScore", temp.getEvaluateScore());
                // 医生咨询量
                Integer doctoConsult = consultTeamService.countByDoctor(getUID());
                json.put("doctoConsult", doctoConsult);
                return write(200, "医生信息查询成功!", "data", json);
            } else {
                return error(-1, "医生信息查询失败!");
@ -725,7 +732,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("患者基本信息保存")
    @RequestMapping(value = "save",method =RequestMethod.POST)
    @RequestMapping(value = "save", method = RequestMethod.POST)
    @ResponseBody
    @ObserverRequired
    public String save(
@ -816,7 +823,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("患者评价查询接口")
    @RequestMapping(value = "comments",method =RequestMethod.POST)
    @RequestMapping(value = "comments", method = RequestMethod.POST)
    @ResponseBody
    public String comments(Integer id, Integer pagesize) {
        try {
@ -861,7 +868,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("根据类别获取医院列表")
    @RequestMapping(value = "/hospital_list",method =RequestMethod.POST)
    @RequestMapping(value = "/hospital_list", method = RequestMethod.POST)
    @ResponseBody
    public String getHospitalList(
            @RequestParam(required = true) Integer type,
@ -921,7 +928,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("根据类别获取医院列表")
    @RequestMapping(value = "/hospital_list_type",method =RequestMethod.POST)
    @RequestMapping(value = "/hospital_list_type", method = RequestMethod.POST)
    @ResponseBody
    public String getHospitalList(
            @RequestParam(required = true) int doctorType,
@ -987,7 +994,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("根据医院标识获取医生信息")
    @RequestMapping(value = "/doctor_list",method =RequestMethod.POST)
    @RequestMapping(value = "/doctor_list", method = RequestMethod.POST)
    @ResponseBody
    public String getDoctorByHospital(
            @RequestParam(required = true) String hospital,
@ -996,7 +1003,7 @@ public class DoctorController extends BaseController {
            @RequestParam(required = true) Integer pageSize) {
        try {
            Page<Doctor> doctorList = doctorInfoService.getDoctorListByHospital(query, hospital, page, pageSize,2);
            Page<Doctor> doctorList = doctorInfoService.getDoctorListByHospital(query, hospital, page, pageSize, 2);
            JSONArray array = new JSONArray();
            if (doctorList != null) {
                for (Doctor doctor : doctorList) {
@ -1043,7 +1050,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("登录患者获取三师信息")
    @RequestMapping(value = "teachers",method =RequestMethod.POST)
    @RequestMapping(value = "teachers", method = RequestMethod.POST)
    @ResponseBody
    public String teachers(String patient) {
        try {
@ -1099,7 +1106,7 @@ public class DoctorController extends BaseController {
     * @param type 医生类别 1专科医生,2全科医生,3健康管理师
     * @return
     */
    @RequestMapping(value = "/doctor_combobox",method =RequestMethod.POST)
    @RequestMapping(value = "/doctor_combobox", method = RequestMethod.POST)
    @ResponseBody
    public String getDoctorCombobxByHospital(
            @RequestParam(required = true) String hospital,
@ -1158,7 +1165,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("专科医生列表")
    @RequestMapping(value = "/doctor_1_list",method =RequestMethod.POST)
    @RequestMapping(value = "/doctor_1_list", method = RequestMethod.POST)
    @ResponseBody
    public String doctor_1_list(
            @RequestParam(required = false) String name,
@ -1167,7 +1174,7 @@ public class DoctorController extends BaseController {
            @RequestParam(required = true) Integer pageSize) {
        try {
            Page<Doctor> doctorList = doctorInfoService.getDoctorListByHospital(name, null, page, pageSize,1);
            Page<Doctor> doctorList = doctorInfoService.getDoctorListByHospital(name, null, page, pageSize, 1);
            JSONArray array = new JSONArray();
            if (doctorList != null) {
                for (Doctor doctor : doctorList) {
@ -1214,7 +1221,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("把专科医生拉到团队里面")
    @RequestMapping(value = "/doctor_1_Toteam",method =RequestMethod.POST)
    @RequestMapping(value = "/doctor_1_Toteam", method = RequestMethod.POST)
    @ResponseBody
    @ObserverRequired
    public String doctor_1_Toteam(
@ -1242,7 +1249,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("根据病人ID查找团队里面的全科医生")
    @RequestMapping(value = "/getDoctor2ByParient",method =RequestMethod.POST)
    @RequestMapping(value = "/getDoctor2ByParient", method = RequestMethod.POST)
    @ResponseBody
    public String getDoctor2ByParient(
            @RequestParam(required = true) String parientCode,
@ -1279,7 +1286,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("根据病人ID查找所有的专科医生,如果团队有专科医生那么专科医生拍第一个")
    @RequestMapping(value = "/getDoctor1ByParient",method =RequestMethod.POST)
    @RequestMapping(value = "/getDoctor1ByParient", method = RequestMethod.POST)
    @ResponseBody
    public String getDoctor1ByParient(
            @RequestParam(required = true) String consultCode,
@ -1317,7 +1324,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("验证患者的名字,身份证和医保卡")
    @RequestMapping(value = "/validatePatient",method =RequestMethod.POST)
    @RequestMapping(value = "/validatePatient", method = RequestMethod.POST)
    @ResponseBody
    public String validatePatient(
            @RequestParam(required = true) String name,
@ -1364,6 +1371,7 @@ public class DoctorController extends BaseController {
            return error(-1, "查询失败!");
        }
    }
    /**
     * 根据身份证号
     *
@ -1371,7 +1379,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("根据身份证号")
    @RequestMapping(value = "/patient_cardno",method =RequestMethod.POST)
    @RequestMapping(value = "/patient_cardno", method = RequestMethod.POST)
    @ResponseBody
    public String getPatientCardNo(String idcard) {
        try {
@ -1401,7 +1409,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("根据level查找机构下的类别医生")
    @RequestMapping(value = "/findDoctorByLevelAndHospital",method =RequestMethod.POST)
    @RequestMapping(value = "/findDoctorByLevelAndHospital", method = RequestMethod.POST)
    @ResponseBody
    public String findDoctorByLevelAndHospital(String hospital, Integer level) {
        try {
@ -1430,7 +1438,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("更新身份证号")
    @RequestMapping(value = "/idcard_update",method =RequestMethod.POST)
    @RequestMapping(value = "/idcard_update", method = RequestMethod.POST)
    @ResponseBody
    @ObserverRequired
    public String updateIdcard(String idcard) {
@ -1457,7 +1465,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("更新医生性别")
    @RequestMapping(value = "/sex_update",method =RequestMethod.POST)
    @RequestMapping(value = "/sex_update", method = RequestMethod.POST)
    @ResponseBody
    @ObserverRequired
    public String updateSex(int sex) {
@ -1480,7 +1488,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("更新医生介绍")
    @RequestMapping(value = "/introduce_update",method =RequestMethod.POST)
    @RequestMapping(value = "/introduce_update", method = RequestMethod.POST)
    @ResponseBody
    @ObserverRequired
    public String updateIntroduce(String introduce) {
@ -1506,7 +1514,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("更新医生专长")
    @RequestMapping(value = "/expertise_update",method =RequestMethod.POST)
    @RequestMapping(value = "/expertise_update", method = RequestMethod.POST)
    @ResponseBody
    @ObserverRequired
    public String updateExpertise(String expertise) {
@ -1533,7 +1541,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("设置给医生名医")
    @RequestMapping(value = "/setFamous",method =RequestMethod.POST)
    @RequestMapping(value = "/setFamous", method = RequestMethod.POST)
    @ResponseBody
    @ObserverRequired
    public String setFamous(String doctorCode, Integer status) {
@ -1555,7 +1563,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("转换团队中的健康管理师")
    @RequestMapping(value = "/updateTeamHealthDoctors",method =RequestMethod.POST)
    @RequestMapping(value = "/updateTeamHealthDoctors", method = RequestMethod.POST)
    @ResponseBody
    @ObserverRequired
    public String updateTeamHealthDoctors(String newDoctorCode,
@ -1612,7 +1620,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("转换团队中的全科医生")
    @RequestMapping(value = "/updateTeamDoctors",method =RequestMethod.POST)
    @RequestMapping(value = "/updateTeamDoctors", method = RequestMethod.POST)
    @ResponseBody
    @ObserverRequired
    public String updateTeamDoctors(String newDoctorCode,
@ -1691,7 +1699,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("手机号是否注册")
    @RequestMapping(value="/is_mobile_register",method =RequestMethod.POST)
    @RequestMapping(value = "/is_mobile_register", method = RequestMethod.POST)
    @ResponseBody
    public String isMobileRegister(String mobile) {
        try {
@ -1750,7 +1758,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("当前医生是否与居民签约")
    @RequestMapping(value = "/is_patient_signed",method =RequestMethod.GET)
    @RequestMapping(value = "/is_patient_signed", method = RequestMethod.GET)
    @ResponseBody
    public String isPatientSign(String patient) {
        try {
@ -1773,7 +1781,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("心跳接口")
    @RequestMapping(value = "/islive",method =RequestMethod.POST)
    @RequestMapping(value = "/islive", method = RequestMethod.POST)
    @ResponseBody
    public String islive() {
        try {
@ -1796,7 +1804,7 @@ public class DoctorController extends BaseController {
     * @return
     */
    @ApiOperation("分配及转移健管师")
    @RequestMapping(value = "/allotOrMoveHealth",method =RequestMethod.POST)
    @RequestMapping(value = "/allotOrMoveHealth", method = RequestMethod.POST)
    @ResponseBody
    @ObserverRequired
    public String allotOrMoveHealth(
@ -1813,49 +1821,49 @@ public class DoctorController extends BaseController {
            if (StringUtils.isNotEmpty(patients)) {
                String result = updateTeamHealthDoctors(newDoctorCode, oldDoctorCode, patients, null);
                return result;
            } else if(StringUtils.isNotEmpty(group)){
            } else if (StringUtils.isNotEmpty(group)) {
//            按条件获取居民
                patients = "";
                if (StringUtils.isEmpty(teamId)||StringUtils.isEmpty(typeId)||sendCount==null){
                if (StringUtils.isEmpty(teamId) || StringUtils.isEmpty(typeId) || sendCount == null) {
                    return write(-1, "参数不能为空!");
                }
                JSONObject list = familyContractService.findNoHealthSignFamilyHealth(null, typeId, null, teamCode);
                List<SignPatientLabel> s = labelDao.findByLabelTypeAndStatusAndTeamCode(typeId, 1, teamCode);
                for (SignPatientLabel label :s) {
                for (SignPatientLabel label : s) {
//                    String labelName = label.getLabelCode();
                    String labelName = label.getLabelName();
                    if (labelName.equals(group)){
                    if (labelName.equals(group)) {
                        JSONArray jsonArray = list.getJSONArray(labelName);
                        for (int i=0;i<sendCount;i++){
                        for (int i = 0; i < sendCount; i++) {
                            JSONObject jsonObject = jsonArray.getJSONObject(i);
                            String  patient = jsonObject.get("code").toString();
                            String patient = jsonObject.get("code").toString();
//                转移时需要剔除处于咨询状态的居民
                            if (StringUtils.isNotEmpty(oldDoctorCode)){
                            if (StringUtils.isNotEmpty(oldDoctorCode)) {
                                ConsultTeam consultTeam = consultTeamService.getConsultByPatientAndDoctor(patient, oldDoctorCode);
                                if (consultTeam == null) {
//                                   不是咨询状态
                                    patients+=(patient+",");
                                    patients += (patient + ",");
                                }
                            }else {
                                patients+=(patient+",");
                            } else {
                                patients += (patient + ",");
                            }
                        }
                    }
                }
                patients =  patients.substring(0,patients.length()-1);
                patients = patients.substring(0, patients.length() - 1);
                String result = updateTeamHealthDoctors(newDoctorCode, oldDoctorCode, patients, null);
                return result;
            }else {
            } else {
                List<SignFamily> signFamily = familyContractService.findNoHealthSignFamilyNum(teamCode);
                patients = "";
                if (StringUtils.isEmpty(teamId)||StringUtils.isEmpty(typeId)||sendCount==null){
                if (StringUtils.isEmpty(teamId) || StringUtils.isEmpty(typeId) || sendCount == null) {
                    return write(-1, "参数不能为空!");
                }
                for (SignFamily patient:signFamily) {
                for (SignFamily patient : signFamily) {
                    String code = patient.getPatient();
                    patients+=(code+",");
                    patients += (code + ",");
                }
                patients =  patients.substring(0,patients.length()-1);
                patients = patients.substring(0, patients.length() - 1);
                String result = updateTeamHealthDoctors(newDoctorCode, oldDoctorCode, patients, null);
                return result;
            }
@ -1924,13 +1932,13 @@ public class DoctorController extends BaseController {
    @ObserverRequired
    @ResponseBody
    @RequestMapping(value = "/getAuthenticationCAOvertime", method = RequestMethod.GET)
    public String getAuthenticationCAOvertime(){
    public String getAuthenticationCAOvertime() {
        try {
//            Doctor doctor = doctorInfoService.findDoctorByCode(getRepUID());
            JSONObject data = doctorInfoService.getCAPastDue(getUID(),new JSONObject());
            JSONObject data = doctorInfoService.getCAPastDue(getUID(), new JSONObject());
            return write(200, "获取信息成功!", "data", data);
        }catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "获取信息失败!");
        }
@ -1942,12 +1950,12 @@ public class DoctorController extends BaseController {
    @ApiOperation("判断是否在线上安装证书")
    @ResponseBody
    @RequestMapping(value = "/isAuthentication", method = RequestMethod.GET)
    public String isAuthentication(){
    public String isAuthentication() {
        try {
            //0de6a26a62dd11e69faffa163e8aee56
            JSONObject data = doctorInfoService.isAuthentication(getUID());
            return write(200, "获取信息成功!", "data", data);
        }catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
        }
@ -1959,16 +1967,16 @@ public class DoctorController extends BaseController {
    @ResponseBody
    @RequestMapping(value = "/updateAuthenticationPassword", method = RequestMethod.POST)
    public String updateAuthenticationPassword(
            @RequestParam(value = "strOldCalledPasswd",required = true) String strOldCalledPasswd,
            @RequestParam(value = "strNewCalledPasswd",required = true) String strNewCalledPasswd){
            @RequestParam(value = "strOldCalledPasswd", required = true) String strOldCalledPasswd,
            @RequestParam(value = "strNewCalledPasswd", required = true) String strNewCalledPasswd) {
        try {
            Doctor doctor = doctorInfoService.findDoctorByCode(getUID());
            boolean b = doctorInfoService.updateAuthenticationPassword(doctor.getIdcard(),strOldCalledPasswd,strNewCalledPasswd,getUID());//hxmD201703150222
            if(b){
            boolean b = doctorInfoService.updateAuthenticationPassword(doctor.getIdcard(), strOldCalledPasswd, strNewCalledPasswd, getUID());//hxmD201703150222
            if (b) {
                return write(200, "修改密码成功!", "data", b);
            }
            return error(-1, "修改密码失败!");
        }catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
        }
@ -1981,17 +1989,17 @@ public class DoctorController extends BaseController {
    @ObserverRequired
    @ResponseBody
    @RequestMapping(value = "/installAuthenticationPassword", method = RequestMethod.POST)
    public String installAuthenticationPassword(@RequestParam(value = "strNewCalledPasswd",required = true) String strNewCalledPasswd){
    public String installAuthenticationPassword(@RequestParam(value = "strNewCalledPasswd", required = true) String strNewCalledPasswd) {
        try {
            Doctor doctor = doctorInfoService.findDoctorByCode(getUID());
            String strOldCalledPasswd = StringUtils.isNotEmpty(doctor.getCheckPassword())?doctor.getCheckPassword():Base64Utils.encryptBASE64("11111111");
            String strOldCalledPasswd = StringUtils.isNotEmpty(doctor.getCheckPassword()) ? doctor.getCheckPassword() : Base64Utils.encryptBASE64("11111111");
            strOldCalledPasswd = Base64Utils.decryptBASE64(strOldCalledPasswd);
            boolean b = doctorInfoService.updateAuthenticationPassword(doctor.getIdcard(),strOldCalledPasswd,strNewCalledPasswd,getUID());
            if(b){
            boolean b = doctorInfoService.updateAuthenticationPassword(doctor.getIdcard(), strOldCalledPasswd, strNewCalledPasswd, getUID());
            if (b) {
                return write(200, "设置密码成功!", "data", b);
            }
            return error(-1, "设置密码失败!");
        }catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
        }
@ -2005,15 +2013,15 @@ public class DoctorController extends BaseController {
    @ObserverRequired
    @ResponseBody
    @RequestMapping(value = "/resetAuthenticationPassword", method = RequestMethod.POST)
    public String resetAuthenticationPassword(@RequestParam(value = "strNewCalledPasswd",required = true) String strNewCalledPasswd){
    public String resetAuthenticationPassword(@RequestParam(value = "strNewCalledPasswd", required = true) String strNewCalledPasswd) {
        try {
            Doctor doctor = doctorInfoService.findDoctorByCode(getUID());
            boolean b = doctorInfoService.updateAuthenticationPassword(doctor.getIdcard(),Base64Utils.decryptBASE64(doctor.getCheckPassword()),strNewCalledPasswd,getUID());
            if(b){
            boolean b = doctorInfoService.updateAuthenticationPassword(doctor.getIdcard(), Base64Utils.decryptBASE64(doctor.getCheckPassword()), strNewCalledPasswd, getUID());
            if (b) {
                return write(200, "重置密码成功!", "data", b);
            }
            return error(-1, "重置密码失败!");
        }catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
        }
@ -2028,19 +2036,19 @@ public class DoctorController extends BaseController {
    @ResponseBody
    @RequestMapping(value = "/requestRealNameSoftCertAndSign", method = RequestMethod.POST)
    public String requestRealNameSoftCertAndSign(
            @ApiParam(required = true, name = "strRealNameSoftCertCalledPasswd", value = "证书被调用保护口令") @RequestParam(value = "strRealNameSoftCertCalledPasswd",required = true) String strRealNameSoftCertCalledPasswd,
            @ApiParam(required = true, name = "strOriginalData", value = "原文") @RequestParam(value = "strOriginalData",required = true) String strOriginalData,
            @ApiParam(required = true, name = "prescriptionCode", value = "处方code") @RequestParam(value = "prescriptionCode",required = true) String prescriptionCode){
            @ApiParam(required = true, name = "strRealNameSoftCertCalledPasswd", value = "证书被调用保护口令") @RequestParam(value = "strRealNameSoftCertCalledPasswd", required = true) String strRealNameSoftCertCalledPasswd,
            @ApiParam(required = true, name = "strOriginalData", value = "原文") @RequestParam(value = "strOriginalData", required = true) String strOriginalData,
            @ApiParam(required = true, name = "prescriptionCode", value = "处方code") @RequestParam(value = "prescriptionCode", required = true) String prescriptionCode) {
        try {
            Doctor doctor = doctorInfoService.findDoctorByCode(getUID());
//            JSONObject obj = doctorInfoService.requestRealNameSoftCertAndSign(doctor.getIdcard(),strRealNameSoftCertCalledPasswd,strOriginalData,srcBusinessStreamNO);
            JSONObject jsonObject = doctorInfoService.requestRealNameSoftCertAndSign(doctor.getIdcard(),strRealNameSoftCertCalledPasswd,strOriginalData,prescriptionCode);
            JSONObject jsonObject = doctorInfoService.requestRealNameSoftCertAndSign(doctor.getIdcard(), strRealNameSoftCertCalledPasswd, strOriginalData, prescriptionCode);
//            if(b){
            return write(200, "获取信息成功!", "data", jsonObject);
//            }
//            return error(-1, "认证失败!");
        }catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
        }
@ -2048,6 +2056,7 @@ public class DoctorController extends BaseController {
    /**
     * 校验医师输入的CA证书是否正确
     *
     * @return
     */
    @ObserverRequired
@ -2055,12 +2064,12 @@ public class DoctorController extends BaseController {
    @RequestMapping(value = "/checkCertificate", method = RequestMethod.GET)
    @ApiOperation("校验医师输入的身份证是否正确")
    public String checkCertificate(
            @ApiParam(required = true, name = "certificateNum", value = "证书编号") @RequestParam(value = "certificateNum",required = true) String certificateNum){
            @ApiParam(required = true, name = "certificateNum", value = "证书编号") @RequestParam(value = "certificateNum", required = true) String certificateNum) {
        try {
            boolean b = doctorInfoService.checkCertificate(getUID(),certificateNum);
            boolean b = doctorInfoService.checkCertificate(getUID(), certificateNum);
            return write(200, "获取信息成功!", "data", b);
        }catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
        }
@ -2074,47 +2083,48 @@ public class DoctorController extends BaseController {
    @ResponseBody
    @RequestMapping(value = "/verifySignOnMultiServer", method = RequestMethod.GET)
    public String verifySignOnMultiServer(
            @ApiParam(required = true, name = "strSignData", value = "签名值") @RequestParam(value = "strSignData",required = true) String strSignData,
            @ApiParam(required = true, name = "strCertData", value = "证书主体数据") @RequestParam(value = "strCertData",required = true) String strCertData,
            @ApiParam(required = true, name = "strOriginalData", value = "原文数据") @RequestParam(value = "strOriginalData",required = true) String strOriginalData){
            try {
                boolean bl = doctorInfoService.verifySignOnMultiServer(strSignData,strCertData,strOriginalData,getUID());
                return write(200, "获取信息成功!", "data", bl);
            }catch (Exception e) {
                error(e);
                return error(-1, e.getMessage());
            }
            @ApiParam(required = true, name = "strSignData", value = "签名值") @RequestParam(value = "strSignData", required = true) String strSignData,
            @ApiParam(required = true, name = "strCertData", value = "证书主体数据") @RequestParam(value = "strCertData", required = true) String strCertData,
            @ApiParam(required = true, name = "strOriginalData", value = "原文数据") @RequestParam(value = "strOriginalData", required = true) String strOriginalData) {
        try {
            boolean bl = doctorInfoService.verifySignOnMultiServer(strSignData, strCertData, strOriginalData, getUID());
            return write(200, "获取信息成功!", "data", bl);
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
        }
    }
    @ApiOperation("取消认证")
    @ObserverRequired
    @ResponseBody
    @RequestMapping(value = "/cancelAuthentication", method = RequestMethod.GET)
    public String cancelAuthentication(){
    public String cancelAuthentication() {
        try {
            if(doctorInfoService.cancelAuthentication(getUID())){
            if (doctorInfoService.cancelAuthentication(getUID())) {
                return write(200, "取消认证成功!");
            }else{
            } else {
                return error(-1, "取消认证失败!");
            }
        }catch (Exception e) {
        } catch (Exception e) {
            error(e);
            return error(-1, "取消认证失败!");
        }
    }
    /**
     * 每日推送需要授权角色的功能 用后台管理系统的功能
     * 获取医生在后台管理系统的角色
     * {
     *     data:[
     *          {
     *          "url":"",
     *          "code":""
     *          }
     *     ]
     * data:[
     * {
     * "url":"",
     * "code":""
     * }
     * ]
     * }
     *
     * @return
@ -2129,7 +2139,7 @@ public class DoctorController extends BaseController {
            if (org.springframework.util.StringUtils.isEmpty(code)) {
                code = super.getUID();
            }
            List<Map<String, Object>> returnData = doctorInfoService.getDoctorManagerRole(code,authenCode);
            List<Map<String, Object>> returnData = doctorInfoService.getDoctorManagerRole(code, authenCode);
            return write(200, "获取成功", "data", returnData);
        } catch (Exception e) {
            error(e);

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

@ -1,10 +1,17 @@
package com.yihu.wlyy.web.doctor.concern;
import com.yihu.wlyy.entity.concern.ConcernDO;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.service.app.concern.ConcernService;
import com.yihu.wlyy.service.common.account.PatientService;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.IdCardUtil;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
@ -12,6 +19,8 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
 * Created by Administrator on 2018/4/4 0004.
 */
@ -21,17 +30,94 @@ import org.springframework.web.bind.annotation.RestController;
public class DoctorConcernController extends BaseController {
    @Autowired
    private ConcernService concernService;
    @Autowired
    private PatientService patientService;
    @RequestMapping(value = "/getConcernPatients", method = RequestMethod.GET)
    @ApiOperation(value = "获取医生关注的患者1", notes = "")
    @ApiOperation(value = "获取医生关注的患者", notes = "", response = Patient.class)
    public String getConcernDoctors(
            @ApiParam(name = "doctor", value = "医生",required = false) @RequestParam(required = false, name = "doctor") String doctor
            @ApiParam(name = "doctor", value = "医生", required = false) @RequestParam(required = false, name = "doctor") String doctor,
            @ApiParam(name = "page", value = "当前页(从0开始)", required = true) @RequestParam(required = true, name = "page") Integer page,
            @ApiParam(name = "pageSize", value = "每页显示条数", required = true) @RequestParam(required = true, name = "pageSize") Integer pageSize
    ) {
        try {
            if (StringUtils.isEmpty(doctor)) {
                doctor = getUID();
            }
            JSONArray array = new JSONArray();
            List<Patient> patients = concernService.listPatientsByDoctorCode(doctor, page, pageSize);
            for (Patient patient : patients) {
                JSONObject jsonObject = new JSONObject();
                jsonObject.put("code", patient.getCode());
                jsonObject.put("name", patient.getName());
                jsonObject.put("photo", patient.getPhoto());
                jsonObject.put("sex", patient.getSex());
                jsonObject.put("phone", patient.getPhone());
                jsonObject.put("address", patient.getAddress());
                jsonObject.put("age", IdCardUtil.getAgeForIdcard(patient.getIdcard()));
                jsonObject.put("isWX", StringUtils.isEmpty(patient.getOpenid()) ? false : true);
                jsonObject.put("concernTime", DateUtil.dateToStr(patient.getConcernCreateTime(), "yyyy-MM-dd HH:mm:ss"));
                array.add(jsonObject);
            }
            return write(200, "查询成功", "data", array);
        } catch (Exception e) {
            e.printStackTrace();
            return error(-100, "查询失败");
        }
    }
    @RequestMapping(value = "/getConcernCounts", method = RequestMethod.GET)
    @ApiOperation(value = "获取医生有效的关注的患者数目和全部的数目", notes = "", response = Patient.class)
    public String getConcernCounts(
            @ApiParam(name = "doctor", value = "医生", required = false) @RequestParam(required = false, name = "doctor") String doctor
    ) {
        try {
            if(StringUtils.isEmpty(doctor)){
                doctor=getUID();
            if (StringUtils.isEmpty(doctor)) {
                doctor = getUID();
            }
            return write(200,"查询成功","data",concernService.listPatientsByDoctorCode(doctor));
            JSONObject  jo = new JSONObject();
            //获取有效的关注数
            Integer countPatientStatus1 = concernService.countPatientsByDoctorCode(doctor);
            //获取全部的的关注数
            Integer countPatientAll = concernService.countAllPatientsByDoctorCode(doctor);
            jo.put("countPatientAll",countPatientAll);
            jo.put("countPatientStatus1",countPatientStatus1);
            return write(200, "查询成功", "data", jo);
        } catch (Exception e) {
            e.printStackTrace();
            return error(-100, "查询失败");
        }
    }
    @RequestMapping(value = "/findByCode", method = RequestMethod.GET)
    @ApiOperation(value = "获取关注详细信息", notes = "")
    public String findByCode(
            @ApiParam(name = "concernCode", value = "关注code", required = true) @RequestParam(required = true, name = "concernCode") String concernCode
    ) {
        try {
            ConcernDO concernDO= concernService.findByCode(concernCode);
            Patient patient=patientService.findByCode(concernDO.getPatient());
            JSONObject jsonObject = new JSONObject();
            jsonObject.put("code", patient.getCode());//患者code
            jsonObject.put("name", patient.getName());//患者名称
            jsonObject.put("photo", patient.getPhoto());//患者头像
            jsonObject.put("sex", patient.getSex());//患者性别
            jsonObject.put("phone", patient.getPhone());//患者电话
            jsonObject.put("idcard", patient.getIdcard());//患者身份证
            jsonObject.put("address", patient.getAddress());//患者详细地址
            jsonObject.put("age", IdCardUtil.getAgeForIdcard(patient.getIdcard()));//患者年龄
            jsonObject.put("isWX", StringUtils.isEmpty(patient.getOpenid()) ? false : true);//是否关注微信
            jsonObject.put("concernType", concernDO.getConcernSource());//关注类型
            jsonObject.put("concernTime", DateUtil.dateToStr(concernDO.getCreateTime(), "yyyy-MM-dd HH:mm:ss"));//关注事件
            return write(200, "查询成功", "data", jsonObject);
        } catch (Exception e) {
            e.printStackTrace();
            return error(-100, "查询失败");

+ 1 - 5
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/consult/DoctorConsultController.java

@ -187,18 +187,14 @@ public class DoctorConsultController extends WeixinBaseController {
    @ResponseBody
    @ApiOperation(value = "居民咨询列表查询")
    public String listByTeam(@RequestParam @ApiParam(value = "居民Code") String patient,
                             @RequestParam @ApiParam(value = "团队Code") Long teamCode,
                             @RequestParam @ApiParam(value = "第几页") int page,
                             @RequestParam @ApiParam(value = "页大小") int pagesize) {
        try {
            if (StringUtils.isEmpty(patient)) {
                return error(-1, "请输入需查询的居民");
            }
            if (teamCode == null || teamCode < 1) {
                return error(-1, "请输入需查询的居民的团队");
            }
            page = page > 0 ? page - 1 : 0;
            JSONArray jsonArray = consultTeamService.findByPatientAndTeam(patient, teamCode, page, pagesize);
            JSONArray jsonArray = consultTeamService.findByPatientAndTeam(patient, page, pagesize);
            return write(200, "查询成功", "data", jsonArray);
        } catch (Exception e) {
            error(e);

+ 1 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/followup/DoctorFollowUpController.java

@ -69,7 +69,7 @@ public class DoctorFollowUpController extends BaseController {
    @ResponseBody
    @ApiOperation(value = "查询居民随访列表")
    public String getListByPatientAndTeam(@RequestParam @ApiParam(value = "居民Code") String patient,
                                          @RequestParam @ApiParam(value = "团队code") Long teamCode,
                                          @RequestParam(required = false) @ApiParam(value = "团队code",required = false) Long teamCode,
                                          @RequestParam @ApiParam(value = "第几页") int page,
                                          @RequestParam @ApiParam(value = "页大小") int pagesize,
                                          @RequestParam(value = "type",required = false) @ApiParam(value = "类型:放空为全部,1计划,2记录",defaultValue = "0") String type) {
@ -77,9 +77,6 @@ public class DoctorFollowUpController extends BaseController {
            if (StringUtils.isEmpty(patient)) {
                return error(-1, "请输入需查询的居民");
            }
            if (teamCode == null || teamCode < 1) {
                return error(-1, "请输入需查询的居民的团队");
            }
            page = page > 0 ? page - 1 : 0;
            JSONArray result = followUpService.getListByPatientAndTeam(patient, teamCode, page, pagesize,type);

+ 1 - 5
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/health/DoctorHealthGuidanceController.java

@ -306,18 +306,14 @@ public class DoctorHealthGuidanceController extends WeixinBaseController {
    @ResponseBody
    @ApiOperation(value = "查询居民健康指导记录")
    public String list(@RequestParam @ApiParam(value = "居民code") String patient,
                       @RequestParam @ApiParam(value = "团队Code") Long teamCode,
                       @RequestParam @ApiParam(value = "第几页") int page,
                       @RequestParam @ApiParam(value = "页大小") int pagesize) {
        try {
            if (StringUtils.isEmpty(patient)) {
                return error(-1, "请输入需查询的居民");
            }
            if (teamCode == null || teamCode < 1) {
                return error(-1, "请输入需查询的居民的团队");
            }
            page = page > 0 ? page - 1 : 0;
            JSONArray result = patientHealthGuidanceService.findByPatientAndGuidanceAndTeam(patient, teamCode, page, pagesize);
            JSONArray result = patientHealthGuidanceService.findByPatientAndGuidanceAndTeam(patient, page, pagesize);
            return write(200, "查询成功!", "data", result);
        } catch (Exception e) {
            error(e);

+ 2 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/patient/ServiceStatisticsController.java

@ -31,10 +31,9 @@ public class ServiceStatisticsController extends BaseController {
     */
    @RequestMapping(value = "/statistics", method = {RequestMethod.GET, RequestMethod.POST})
    @ApiOperation(value = "居民服务统计查询")
    public String statistics(@RequestParam @ApiParam(value = "居民code") String patient,
                             @RequestParam @ApiParam(value = "团队Code") Long teamCode) {
    public String statistics(@RequestParam @ApiParam(value = "居民code") String patient) {
        try {
            JSONObject result = serviceStatistics.getServiceStatistics(patient, teamCode, getUID());
            JSONObject result = serviceStatistics.getServiceStatistics(patient, getUID());
            return write(200, "查询成功", "data", result);
        } catch (Exception e) {
            e.printStackTrace();

+ 23 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/concern/PatientConcernController.java

@ -1,11 +1,17 @@
package com.yihu.wlyy.web.patient.concern;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.service.app.concern.ConcernService;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.IdCardUtil;
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 net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.util.StringUtils;
@ -14,6 +20,8 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
 * Created by Administrator on 2018/4/4 0004.
 */
@ -30,7 +38,7 @@ public class PatientConcernController extends BaseController {
    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页面跳转") @RequestParam(required = true, name = "concernSource") Integer concernSource
            @ApiParam(name = "concernSource", value = "关注方式: 1扫描二维码 2页面跳转 3.咨询关注") @RequestParam(required = true, name = "concernSource") Integer concernSource
    ) {
        try {
            if (StringUtils.isEmpty(patient)) {
@ -72,7 +80,20 @@ public class PatientConcernController extends BaseController {
            if (StringUtils.isEmpty(patient)) {
                patient = getUID();
            }
            return write(200, "查询成功", "data", concernService.listDoctorsByPatientCode(patient));
            JSONArray array = new JSONArray();
            List<Doctor> doctors=concernService.listDoctorsByPatientCode(patient);
            for (Doctor doctor : doctors) {
                JSONObject jsonObject = new JSONObject();
                jsonObject.put("code", doctor.getCode());
                jsonObject.put("name", doctor.getName());
                jsonObject.put("photo", doctor.getPhoto());
                jsonObject.put("sex", doctor.getSex());
                jsonObject.put("age", IdCardUtil.getAgeForIdcard(doctor.getIdcard()));
                array.add(jsonObject);
            }
            return write(200, "查询成功", "data", array);
        } catch (Exception e) {
            e.printStackTrace();
            return error(-100, "查询失败");

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/gateway/controller/doctor/GcMessageController.java

@ -184,7 +184,7 @@ public class GcMessageController {
            String[] codeArr = mobiles.split(",");
            for (String mobile : codeArr) {
                try {
                    JSONObject result = smsService.sendMsg(mobile, content);
                    String result = smsService.sendMsg(mobile, content);
                    logger.info("send mobile message param : " + mobile + " ====> " + content);
                    logger.info("send mobile message return : " + result);
                    success++;

+ 71 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/jkzl/ZBSmsService.java

@ -0,0 +1,71 @@
package com.yihu.wlyy.web.third.jkzl;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.HttpClientUtil;
import net.sf.json.JSONObject;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
 * 福州总部的短信接口
 */
@Service
public class ZBSmsService {
    private Logger logger= LoggerFactory.getLogger(ZBSmsService.class);
    @Value("${message.zongbu.clientid}")
    private String clientId;
    @Value("${message.zongbu.resturl}")
    private String resturl;
    @Value("${message.zongbu.api.sms.api}")
    private String smsAPI;
    @Value("${message.zongbu.api.sms.handlerId}")
    private String smsHandlerId;
    @Autowired
    private HttpClientUtil httpClientUtil;
    /**
     * 发送短信
     * @return
     */
    public String sendMessage(String mobile,String content) {
        try{
            List<NameValuePair> params = new ArrayList<>();
            //拼凑参数
            JSONObject authInfo=new JSONObject();
            authInfo.put("ClientId",clientId);
            params.add(new BasicNameValuePair("AuthInfo",authInfo.toString()));
            params.add(new BasicNameValuePair("SequenceNo", DateUtil.dateToStr(new Date(),DateUtil.YYYYMMddHHmmssSSS)));
            params.add(new BasicNameValuePair("Api", smsAPI));
            JSONObject param=new JSONObject();
            param.put("mobile",mobile);
            param.put("content",content);
            param.put("handlerId",smsHandlerId);
            params.add(new BasicNameValuePair("Param", param.toString()));
            params.add(new BasicNameValuePair("ParamType", "0"));
            params.add(new BasicNameValuePair("OutType", "0"));
            String response = httpClientUtil.post(resturl, params, "UTF-8");
            Integer code= JSONObject.fromObject(response).getInt("Code");
            if(code!=10000){
                logger.error(response);
            }
            return response;
        }catch (Exception e){
            logger.error(e.getMessage());
        }
        return null;
    }
}

+ 18 - 16
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/zysoft/BookingController.java

@ -525,19 +525,19 @@ public class BookingController extends WeixinBaseController {
    public String testSMS(@ApiParam(name = "msg") @RequestParam(value = "msg", required = true) String msg)
    {
        String re = "";
        try {
            //发送短信消息,调用总部发送信息的接口
            JSONObject resultJson = smsService.sendMsg("13559207522", msg);
            if (resultJson != null && resultJson.getInt("result") != 0) {
                re = "短信提醒失败!(原因:" + resultJson.getString("description") + ")";
            }
            re = "短信发送成功!";
        }
        catch (Exception ex)
        {
            ex.printStackTrace();
            re = ex.getMessage();
        }
//        try {
//            //发送短信消息,调用总部发送信息的接口
//            JSONObject resultJson = smsService.sendMsg("13559207522", msg);
//            if (resultJson != null && resultJson.getInt("result") != 0) {
//                re = "短信提醒失败!(原因:" + resultJson.getString("description") + ")";
//            }
//            re = "短信发送成功!";
//        }
//        catch (Exception ex)
//        {
//            ex.printStackTrace();
//            re = ex.getMessage();
//        }
        return re;
    }
@ -592,9 +592,11 @@ public class BookingController extends WeixinBaseController {
                            .replace("br","\n");
                    //发送短信消息,调用总部发送信息的接口
                    JSONObject resultJson = smsService.sendMsg(patientPhone,remark);
                    if (resultJson != null && resultJson.getInt("result") != 0) {
                        des = "短信提醒失败!(原因:"+resultJson.getString("description")+")";
                    String resultJson = smsService.sendMsg(patientPhone,remark);
                    if (org.springframework.util.StringUtils.isEmpty(resultJson)||(net.sf.json.JSONObject.fromObject(resultJson).getInt("Code")==10000))   {
                        des = "短信提醒失败!)";
                    }
                    //保存短信记录
                    SMS sms = new SMS();

+ 3 - 3
patient-co/patient-co-wlyy/src/main/resources/application-dev.yml

@ -129,8 +129,8 @@ es:
#集美宣教居民端健康文章
jkEdu:
  web:
    #articleBaseUrl: http://172.19.103.87:9088/
    articleBaseUrl: http://192.168.131.131:8088/
    articleBaseUrl: http://172.19.103.87:9088/
    #articleBaseUrl: http://192.168.131.131:8088/
#消息队列
activemq:
  username: admin
@ -141,7 +141,7 @@ activemq:
##如果是外网项目就是flase 内网是true
neiwang:
  enable: false
  enable: true
  #wlyy: http://59.61.92.90:8072/wlyy
  wlyy: http://192.168.131.131:8080/

+ 3 - 3
patient-co/patient-co-wlyy/src/main/resources/application-prod.yml

@ -37,11 +37,11 @@ iot:
  url: http://192.168.131.24:8088/svr-iot/
wechat:
  appId: wxad04e9c4c5255acf
  appSecret: ae77c48ccf1af5d07069f5153d1ac8d3
  appId: wxe627ffaee2d05a40
  appSecret: 7c29f6b28be7e54b742883a47ff39767
  wechat_token: 27eb3bb24f149a7760cf1bb154b08040
  wechat_base_url: http%3a%2f%2fwww.xmtyw.cn%2fwlyy
  accId: gh_ffd64560fb21
  accId: gh_733f975e0bed
  message:
   ##医生追加建议提醒 --签约邀请
   doctor_invitel_template: MQn79bx1ofb6hekhmRIuqLU7KjySJQzaBzrimgqVrzA

+ 10 - 0
patient-co/patient-co-wlyy/src/main/resources/application.yml

@ -94,3 +94,13 @@ interceptor:
putMesType:
  #推送到redis消息类型
  wechat: wechat
##福州健康之路总部的接口
message:
  zongbu:
    clientid: 123
    resturl: http://service.yihu.com:8080/WSGW/rest
    api:
      sms: ##短信接口
        api: MsgGW.Sms.send
        handlerId: 50778

+ 3 - 3
pom.xml

@ -18,9 +18,9 @@
    <!--deploy 的时候发布到这个服务器-->
    <distributionManagement>
        <repository>
            <id>test</id>
            <name>testRespository</name>
            <url>http://172.19.103.43:8081/nexus/content/repositories/test/</url>
            <id>jkzlRepositories</id>
            <name>jkzlRepositories</name>
            <url>http://172.19.103.43:8081/nexus/content/repositories/jkzlRepositories/</url>
        </repository>
    </distributionManagement>