Explorar o código

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

huangwenjie %!s(int64=7) %!d(string=hai) anos
pai
achega
d8b3939ead
Modificáronse 28 ficheiros con 532 adicións e 199 borrados
  1. 140 0
      common/common-entity/src/main/java/com/yihu/wlyy/entity/ylz/PayLog.java
  2. 6 1
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/account/CustomerService.java
  3. 2 2
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/ZysoftService.java
  4. 1 1
      patient-co/patient-co-doctor-assistant/src/main/java/com/yihu/wlyy/service/app/sign/SignWebService.java
  5. 10 161
      patient-co/patient-co-doctor-assistant/src/main/java/com/yihu/wlyy/service/template/DoctorFeldsherTemplateService.java
  6. 13 3
      patient-co/patient-co-doctor-assistant/src/main/java/com/yihu/wlyy/web/common/account/LoginController.java
  7. 60 0
      patient-co/patient-co-doctor-assistant/src/main/java/com/yihu/wlyy/web/doctor/template/DoctorFeldsherTemplateController.java
  8. 45 5
      patient-co/patient-co-doctor-assistant/src/main/java/com/yihu/wlyy/web/third/gateway/controller/doctor/GcMessageController.java
  9. 1 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/interceptors/EncodingFilter.java
  10. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/charge/ChargeDao.java
  11. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/patient/PatientHealthRecordSportsDao.java
  12. 13 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/ylz/PayLogDao.java
  13. 107 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/label/SignPatientLabelInfoService.java
  14. 2 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PatientPrescriptionPayService.java
  15. 2 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/scheme/DoctorSchemeService.java
  16. 1 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/SignFamilyServiceService.java
  17. 2 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/SignWebService.java
  18. 2 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/team/AdminTeamService.java
  19. 9 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/common/account/PatientService.java
  20. 60 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/ylz/PayLogService.java
  21. 3 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/weixin/wxpay/service/OnePayService.java
  22. 4 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/util/RSAUtils.java
  23. 10 4
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/account/LoginController.java
  24. 4 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/account/WechatController.java
  25. 19 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/patient/SignPatientLabelInfoController.java
  26. 0 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/sign/DoctorSignController.java
  27. 8 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/sign/PatientSignFamilyServiceNoFilterController.java
  28. 6 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/wx/OnePayController.java

+ 140 - 0
common/common-entity/src/main/java/com/yihu/wlyy/entity/ylz/PayLog.java

@ -0,0 +1,140 @@
package com.yihu.wlyy.entity.ylz;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.wlyy.entity.IdEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * 易联众相关支付log表
 * Created by Reece on 2017/9/20.
 */
@Entity
@Table(name = "ylz_pay_log")
public class PayLog extends IdEntity {
    // 接口类型 0家庭签约支付 1续方支付
    private String type;
    // 业务内容
    private String content;
    // 调用接口
    private String api;
    // 调用方式
    private String method;
    // 调用参数
    private String params;
    // 调用头部信息
    private String header;
    // 返回结果
    private String response;
    // 状态 0失败 1成功 2已重试
    private String status;
    // 重试次数
    private Integer retryTimes;
    // 创建时间
    private Date createTime;
    //异常信息
    private String error;
    @Column(name = "type")
    public String getType() {
        return type;
    }
    public void setType(String type) {
        this.type = type;
    }
    @Column(name = "content")
    public String getContent() {
        return content;
    }
    public void setContent(String content) {
        this.content = content;
    }
    @Column(name = "api")
    public String getApi() {
        return api;
    }
    public void setApi(String api) {
        this.api = api;
    }
    @Column(name = "method")
    public String getMethod() {
        return method;
    }
    public void setMethod(String method) {
        this.method = method;
    }
    @Column(name = "params")
    public String getParams() {
        return params;
    }
    public void setParams(String params) {
        this.params = params;
    }
    @Column(name = "header")
    public String getHeader() {
        return header;
    }
    public void setHeader(String header) {
        this.header = header;
    }
    @Column(name = "response")
    public String getResponse() {
        return response;
    }
    public void setResponse(String response) {
        this.response = response;
    }
    @Column(name = "status")
    public String getStatus() {
        return status;
    }
    public void setStatus(String status) {
        this.status = status;
    }
    @Column(name = "retry_times")
    public Integer getRetryTimes() {
        return retryTimes;
    }
    public void setRetryTimes(Integer retryTimes) {
        this.retryTimes = retryTimes;
    }
    @Column(name = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    @Column(name = "error")
    public String getError() {
        return error;
    }
    public void setError(String error) {
        this.error = error;
    }
}

+ 6 - 1
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/account/CustomerService.java

@ -124,8 +124,10 @@ public class CustomerService{
			par.add(new BasicNameValuePair("openIds", openId));
			par.add(new BasicNameValuePair("content", msg));
			try {
				logger.info("====================================================================");
				String result = HttpClientUtil.post(messageApi+"/sendWechatMessage", par,"UTF-8");
				logger.info("微信发送消息返回结果:"+result);
				logger.info("====================================================================");
				JSONObject resultJson = new JSONObject(result);
				if(1!=resultJson.getInt("successNum")){
					resp.put("wechat","-1");//-1代表发送失败
@ -143,8 +145,11 @@ public class CustomerService{
			par.add(new BasicNameValuePair("mobiles", mobile));
			par.add(new BasicNameValuePair("content", msg));
			try {
				String result = HttpClientUtil.post(messageApi+"/sendMobileMessage",par,"UTF-8");
				logger.info("====================================================================");
				String result = HttpClientUtil.post(messageApi+"/sendMessage",par,"UTF-8");
				logger.info("发送短信消息返回结果:"+result);
				logger.info("======================================================================");
				JSONObject resultJson = new JSONObject(result);
				if(1!=resultJson.getInt("successNum")){
					resp.put("mobile","-1");//-1代表发送失败

+ 2 - 2
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/ZysoftService.java

@ -120,8 +120,8 @@ public class ZysoftService {
        paramsList.put("msgHeader",msgHeader);
        paramsList.put("msgBody",msgBody);
        System.out.print("msgHeader:"+msgHeader+"\r\n");
        System.out.print("msgBody:"+msgBody+"\r\n");
//        System.out.print("msgHeader:"+msgHeader+"\r\n");
//        System.out.print("msgBody:"+msgBody+"\r\n");
        //新增日志
        String method = "POST";

+ 1 - 1
patient-co/patient-co-doctor-assistant/src/main/java/com/yihu/wlyy/service/app/sign/SignWebService.java

@ -1717,7 +1717,7 @@ public class SignWebService extends BaseService {
                        setSevId(renew, sevId);
                        //1.3.3.2新增需求
                        //设置居民标签
                        signPatientLabelInfoService.setPatientLabels(renew.getPatient(), renew.getIdcard(), "", health, disease, custom, renew.getDoctor(), renew.getDoctor());
                        signPatientLabelInfoService.setRenewPatientLabels(renew.getPatient(), health, disease, custom, renew.getDoctor(), renew.getDoctor());
                        //1.3.3.2设置可修改健康管理师
                        if (StringUtils.isNotBlank(healthDoctor)) {
                            updateHealthDoctor(renew, healthDoctor);

+ 10 - 161
patient-co/patient-co-doctor-assistant/src/main/java/com/yihu/wlyy/service/template/DoctorFeldsherTemplateService.java

@ -9,6 +9,7 @@ import com.yihu.wlyy.task.PushMsgTask;
import com.yihu.wlyy.util.ImUtill;
import com.yihu.wlyy.wechat.util.WeiXinAccessTokenUtils;
import com.yihu.wlyy.wechat.util.WeiXinOpenIdUtils;
import com.yihu.wlyy.wechat.util.WeiXinTempMsgSendUtils;
import org.json.JSONArray;
import org.json.JSONObject;
import org.slf4j.Logger;
@ -42,6 +43,11 @@ public class DoctorFeldsherTemplateService extends BaseService {
    private WeiXinOpenIdUtils weiXinOpenIdUtils;
    @Autowired
    private ImUtill imUtill;
    @Autowired
    private WeiXinTempMsgSendUtils weiXinTempMsgSendUtils;
    @Value("${wechat.message.template_consult_notice}")
    private String templateId;
    @Value("${server.server_url}")
    private String server_url;
@ -91,159 +97,6 @@ public class DoctorFeldsherTemplateService extends BaseService {
        logger.info("sendJson: " + sendJson);
    }
    /**
     * 发送给医生的模板消息提醒
     *
     * @param patientCode 居民code
     * @param doctorCode  医生code
     * @throws Exception
     */
    public void sendDoctorTemplate(String patientCode, String doctorCode, int type) throws Exception {
        int num = 0;
        int num1 = 0;
        int num2 = 0;
        int num3 = 0;
        int num4 = 0;
        int num5 = 0;
        int num6 = 0;
        Date date = new Date();
        Date date1 = new Date();
        String content1 = "";
        String contetn2 = "";
        Patient people = patientDao.findByCode(patientCode);
        String patientOpenId = people.getOpenid();
        String patientName = people.getName();
        int patientSex = people.getSex();
        Doctor doctor = doctorDao.findByCode(doctorCode);
        String doctorName = doctor.getName();
        String doctorOpenId = doctor.getOpenid();
        //使用微信应用宝跳转APP的功能。点击后跳转APP消息页。
        String url = "";
        String first = "";
        String remark = "请进入手机APP查看,如尚未安装APP请点击详情下载安装";
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy年MM月dd日 HH:mm");
        JSONObject sendJson = new JSONObject();
        switch (type) {
            case 1:
                first = doctorName + "医生您好,你有一条新的签约申请待处理";
                sendJson.put("keyword1", patientName);
                sendJson.put("keyword2", dateFormat.format(new Date()));
                sendJson.put("first", first);
                sendJson.put("remark", remark);
                sendJson.put("url", url);//带参数的模板跳转链接
                pushMsgTask.putWxMsg(weiXinAccessTokenUtils.getAccessToken(), 0, doctorOpenId, doctorName, sendJson);
                logger.info("sendJson: " + sendJson);
                break;
            case 2:
                first = doctorName + "医生,您的签约居民" + patientName + "有" + num + "条未读的体征异常消息";
                sendJson.put("keyword1", patientName);
                sendJson.put("keyword2", dateFormat.format(new Date()));
                sendJson.put("first", first);
                sendJson.put("remark", remark);
                sendJson.put("url", url);//带参数的模板跳转链接
                pushMsgTask.putWxMsg(weiXinAccessTokenUtils.getAccessToken(), 0, doctorOpenId, doctorName, sendJson);
                logger.info("sendJson: " + sendJson);
                break;
            case 3:
                first = doctorName + "医生您好。" + date + "新增1个签约居民待分配健管师,截至目前共有 " + num1 + " 人待处理";
                sendJson.put("keyword1", "分配健管师");
                sendJson.put("keyword2", dateFormat.format(new Date()));
                sendJson.put("first", first);
                sendJson.put("remark", remark);
                sendJson.put("url", url);//带参数的模板跳转链接
                pushMsgTask.putWxMsg(weiXinAccessTokenUtils.getAccessToken(), 0, doctorOpenId, doctorName, sendJson);
                logger.info("sendJson: " + sendJson);
                break;
            case 4:
                first = "您今日有" + num3 + "个随访计划待处理";
                sendJson.put("keyword1", patientName);
                sendJson.put("keyword2", dateFormat.format(new Date()));
                sendJson.put("first", first);
                sendJson.put("remark", remark);
                sendJson.put("url", url);//带参数的模板跳转链接
                pushMsgTask.putWxMsg(weiXinAccessTokenUtils.getAccessToken(), 0, doctorOpenId, doctorName, sendJson);
                logger.info("sendJson: " + sendJson);
                break;
            case 5:
                first = doctorName + "医生您好,有患者向您发起咨询";
                sendJson.put("keyword1", patientName);
                sendJson.put("keyword2", patientSex == 1 ? "男" : "女");
                sendJson.put("first", first);
                sendJson.put("remark", remark);
                sendJson.put("url", url);//带参数的模板跳转链接
                pushMsgTask.putWxMsg(weiXinAccessTokenUtils.getAccessToken(), 0, doctorOpenId, doctorName, sendJson);
                logger.info("sendJson: " + sendJson);
                break;
            case 6:
                first = "居民" + patientName + "的健康咨询有新的回复";
                sendJson.put("keyword1", content1);
                sendJson.put("keyword2", contetn2);
                sendJson.put("keyword3", doctorName);
                sendJson.put("first", first);
                sendJson.put("remark", remark);
                sendJson.put("url", url);//带参数的模板跳转链接
                pushMsgTask.putWxMsg(weiXinAccessTokenUtils.getAccessToken(), 0, doctorOpenId, doctorName, sendJson);
                logger.info("sendJson: " + sendJson);
                break;
            case 7:
                first = doctorName + "医生您好。您的签约居民" + patientName + "申请线上续方,请尽快审核";
                sendJson.put("keyword1", "续方审核");
                sendJson.put("keyword2", dateFormat.format(new Date()));
                sendJson.put("first", first);
                sendJson.put("remark", remark);
                sendJson.put("url", url);//带参数的模板跳转链接
                pushMsgTask.putWxMsg(weiXinAccessTokenUtils.getAccessToken(), 0, doctorOpenId, doctorName, sendJson);
                logger.info("sendJson: " + sendJson);
                break;
            case 8:
                first = doctorName + "医生您好。" + date1 +
                        "新增1个续方订单待分配配送员,目前共" + num4 +
                        "人待分配,一个尽快分配";
                sendJson.put("keyword1", "分配配送员");
                sendJson.put("keyword2", dateFormat.format(new Date()));
                sendJson.put("first", first);
                sendJson.put("remark", remark);
                sendJson.put("url", url);//带参数的模板跳转链接
                pushMsgTask.putWxMsg(weiXinAccessTokenUtils.getAccessToken(), 0, doctorOpenId, doctorName, sendJson);
                logger.info("sendJson: " + sendJson);
                break;
            case 9:
                first = doctorName + "医生您好。您有一个您有1个续方申请处方开立失败";
                sendJson.put("keyword1", doctorName);
                sendJson.put("keyword2", patientName);
                sendJson.put("first", first);
                sendJson.put("remark", remark);
                sendJson.put("url", url);//带参数的模板跳转链接
                pushMsgTask.putWxMsg(weiXinAccessTokenUtils.getAccessToken(), 0, doctorOpenId, doctorName, sendJson);
                logger.info("sendJson: " + sendJson);
                break;
            case 10:
                first = doctorName + "医生您好。您有1个续方申请已在线下调整完成,请尽快进行CA认证";
                sendJson.put("keyword1", "续方审核CA认证");
                sendJson.put("keyword2", dateFormat.format(new Date()));
                sendJson.put("first", first);
                sendJson.put("remark", remark);
                sendJson.put("url", url);//带参数的模板跳转链接
                pushMsgTask.putWxMsg(weiXinAccessTokenUtils.getAccessToken(), 0, doctorOpenId, doctorName, sendJson);
                logger.info("sendJson: " + sendJson);
                break;
            case 11:
                first = doctorName + "医生您好,你有一条新的续签申请待处理";
                sendJson.put("keyword1", patientName);
                sendJson.put("keyword2", dateFormat.format(new Date()));
                sendJson.put("first", first);
                sendJson.put("remark", remark);
                sendJson.put("url", url);//带参数的模板跳转链接
                pushMsgTask.putWxMsg(weiXinAccessTokenUtils.getAccessToken(), 0, doctorOpenId, doctorName, sendJson);
                logger.info("sendJson: " + sendJson);
                break;
        }
    }
    /**
     * 拼装医生助手 医生类模板消息并发送
     *
@ -260,19 +113,15 @@ public class DoctorFeldsherTemplateService extends BaseService {
            String remark = "请进入手机APP查看,如尚未安装APP请点击详情下载安装";
            String url = server_url + "wx_doctor/html/home/html/jumpApp.html";
            SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy年MM月dd日 HH:mm");
            JSONObject sendJson = new JSONObject();
            Doctor doctor = doctorDao.findByCode(doctorCode);
            String doctorName = doctor.getName();
            String doctorOpenId = doctor.getOpenid();
            String first = businessType;
            sendJson.put("keyword1", content);
            sendJson.put("keyword2", dateFormat.format(new Date()));
            sendJson.put("first", first);
            sendJson.put("remark", remark);
            sendJson.put("url", url);//带参数的模板跳转链接
            pushMsgTask.putWxMsg(weiXinAccessTokenUtils.getAccessToken(), 11, doctorOpenId, doctorName, sendJson);
            JSONObject sendJson = weiXinTempMsgSendUtils.packageTemplate(businessType, remark, content, dateFormat.format(new Date()));
            Boolean flag = weiXinTempMsgSendUtils.sendTemplateMessage(templateId, doctorOpenId, url, sendJson);
            logger.info("send wechat message param : " + doctorOpenId+" =======> "+content);
            logger.info("send wechat message retuen : " + flag+" =======> "+flag);
            logger.info("sendJson: " + sendJson);
            return true;
        } catch (Exception e) {

+ 13 - 3
patient-co/patient-co-doctor-assistant/src/main/java/com/yihu/wlyy/web/common/account/LoginController.java

@ -69,6 +69,8 @@ public class LoginController extends BaseController {
    private RoleService roleService;
    @Autowired
    private LoginLogService loginLogService;
    @Autowired
    private RSAUtils rsaUtils;
    /**
     * 公钥生成并返回接口
@ -79,8 +81,9 @@ public class LoginController extends BaseController {
    @ResponseBody
    public String publicKey() {
        try {
            String modulus = RSAUtils.getInstance(smsService).getModulus();
            String exponent = RSAUtils.getInstance(smsService).getExponent();
            rsaUtils.setBaseService(smsService);
            String modulus = rsaUtils.getModulus();
            String exponent = rsaUtils.getExponent();
            if (StringUtils.isEmpty(modulus) || StringUtils.isEmpty(exponent)) {
                return error(-1, "公钥获取失败!");
            } else {
@ -130,7 +133,8 @@ public class LoginController extends BaseController {
            }
            //身份证登录
            if (StringUtils.isNoneEmpty(mobile) && StringUtils.isNoneEmpty(password)) {
                password = RSAUtils.getInstance(doctorService).decryptString(password);
                rsaUtils.setBaseService(doctorService);
                password = rsaUtils.decryptString(password);
                password = StringUtils.reverse(password);
                Doctor doctor = doctorService.findDoctorByMobile(mobile);
                loginLog.setLoginType("2");
@ -248,6 +252,12 @@ public class LoginController extends BaseController {
                        return error(-1, errorMessage);
                    }
                    loginLogService.saveLog(loginLog);
                    if(StringUtils.isNotBlank(openid)){
                        doctor.setOpenid(openid);
                        doctorService.save(doctor);
                    }
                    return write(200, "登录成功", "data", map);
                }
            }

+ 60 - 0
patient-co/patient-co-doctor-assistant/src/main/java/com/yihu/wlyy/web/doctor/template/DoctorFeldsherTemplateController.java

@ -0,0 +1,60 @@
package com.yihu.wlyy.web.doctor.template;
import com.yihu.wlyy.repository.template.DoctorGuidanceTempDao;
import com.yihu.wlyy.service.template.DoctorFeldsherTemplateService;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
 * 医生健康指导模板
 * <p>
 * Created by Reece on 2017/9/14.
 */
@RestController
@RequestMapping(value = "/doctor/feldsher")
@Api(description = "医生健康指导模板")
public class DoctorFeldsherTemplateController extends BaseController {
    @Autowired
    private DoctorFeldsherTemplateService feldsherTemplateService;
    @Autowired
    DoctorGuidanceTempDao guidanceTempDao;
    /**
     * @param doctorCode   医生code
     * @param sessionId    会话Id
     * @param sessionType  会话类型
     * @param businessType 消息类型
     * @param from         发送者
     * @param content      消息内容
     * @return
     */
    @RequestMapping(value = "/sendDoctorTemplate", method = RequestMethod.GET)
    @ApiOperation(value = "医生助手给医生发送模板消息")
    public String sendDoctorTemplate(@RequestParam @ApiParam(value = "医生code") String doctorCode,
                                     @RequestParam @ApiParam(value = "会话Id", required = false) String sessionId,
                                     @RequestParam @ApiParam(value = "会话类型", required = false) String sessionType,
                                     @RequestParam @ApiParam(value = "消息类型") String businessType,
                                     @RequestParam @ApiParam(value = "发送者", required = false) String from,
                                     @RequestParam @ApiParam(value = "消息内容") String content) {
        try {
            Boolean flag = feldsherTemplateService.sendDoctorTemplate(doctorCode, sessionId, sessionType, businessType, from, content);
            if (flag){
                return write(200, "发送成功!");
            }else {
                return write( -1, "发送失败!");
            }
        } catch (Exception e) {
            e.printStackTrace();
            return invalidUserException(e, -1, "发送失败!");
        }
    }
}

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

@ -48,7 +48,7 @@ public class GcMessageController {
    private SMSService smsService;
    @Autowired
    private DoctorDao doctorDao;
    @Value("${wechat.message.template_doctor_survey}")
    @Value("${wechat.message.template_consult_notice}")
    private String templateId;
    @Value("${server.server_url}")
    private String server_url;
@ -117,13 +117,13 @@ public class GcMessageController {
    /**
     * 客服系统发送消息接口
     *
     * @param openIds      微信openid
     * @param content     消息内容限制字数70
     * @param openIds 微信openid
     * @param content 消息内容限制字数70
     * @return
     */
    @RequestMapping(value = "/sendWechatMessage", method = RequestMethod.POST)
    @ApiOperation("客服系统发送微信模板消息接口")
    public ResultBatchModel sendMessage(
    public ResultBatchModel sendWechatMessage(
            @ApiParam(name = "openIds", value = "微信openid", required = true) @RequestParam(value = "openIds", required = true) String openIds,
            @ApiParam(name = "content", value = "消息内容", required = true) @RequestParam(value = "content", required = true) String content) {
        Integer success = 0;
@ -135,9 +135,12 @@ public class GcMessageController {
            for (String openId : codeArr) {
                try {
                    JSONObject sendJson = weiXinTempMsgSendUtils.packageTemplate("消息头", "备注", content, "2017年9月16日 18:00");
                    weiXinTempMsgSendUtils.sendTemplateMessage(templateId, openId, url, sendJson);
                    Boolean flag = weiXinTempMsgSendUtils.sendTemplateMessage(templateId, openId, url, sendJson);
                    logger.info("send wechat message param : " + openId+" =======> "+content);
                    logger.info("send wechat message retuen : " + openId+" =======> "+flag);
                    success++;
                } catch (Exception e) {
                    e.printStackTrace();
                    logger.error("openids " + openIds + " send Template error:" + e.getMessage());
                    error++;
                    errorLiust.add(openIds);
@ -150,4 +153,41 @@ public class GcMessageController {
        }
    }
    /**
     * 客服系统发送消息接口 居民没有有openID只发手机短信 有openID发微信模板消息、手机短信 没有IP次数限制
     *
     * @param mobiles 手机号.多个用逗号分隔
     * @param content
     * @return
     */
    @RequestMapping(value = "/sendMessage", method = RequestMethod.POST)
    @ApiOperation("客服系统发送短信接口")
    public ResultBatchModel sendMessage(
            @ApiParam(name = "mobiles", value = "手机号(批量逗号分割)", required = true) @RequestParam(value = "mobiles", required = true) String mobiles,
            @ApiParam(name = "content", value = "消息内容", required = true) @RequestParam(value = "content", required = true) String content) {
        Integer success = 0;
        Integer error = 0;
        List<String> errorLiust = new ArrayList<>();
        try {
            String[] codeArr = mobiles.split(",");
            for (String mobile : codeArr) {
                try {
                    JSONObject result = smsService.sendMsg(mobile, content);
                    logger.info("send mobile message param : "+mobile+" ====> "+content);
                    logger.info("send mobile message return : "+result);
                    success++;
                } catch (Exception e) {
                    e.printStackTrace();
                    logger.error("mobile " + mobile + " send message error:" + e.getMessage());
                    error++;
                    errorLiust.add(mobile);
                }
            }
            return new ResultBatchModel(success, error, errorLiust);
        } catch (Exception e) {
            e.printStackTrace();
            return new ResultBatchModel(-1, "发送失败!", success, error, errorLiust);
        }
    }
}

+ 1 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/interceptors/EncodingFilter.java

@ -38,6 +38,7 @@ public class EncodingFilter implements Filter {
            for (int i = 0; i < values.length; i++) {
                String value = values[i];
                newRequest.removeAttribute(key);
                System.out.println("key:"+key+"value:"+value+" reqURL:"+request.getRequestURI());
//                解决%、+后中文以英文编码传入URLDecoder异常
                value = CodeFomat.dateToChinese(value);
                newRequest.addParameter(key, URLDecoder.decode((value),"utf-8"));

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/charge/ChargeDao.java

@ -55,7 +55,7 @@ public interface ChargeDao extends PagingAndSortingRepository<WlyyCharge, Long>,
     */
    @Modifying
    @Query("update WlyyCharge a set a.tradeStatus = ?9,a.chargeTime = ?2, a.updateTime = ?3, a.totalAmount = ?4, " +
            " a.insuranceAmount = ?5, a.selfpayAmount =?6 ,a.billNo = ?7, a.miRegisterNo = ?8 where a.code = ?1 ")
            " a.insuranceAmount = ?5, a.selfpayAmount =?6 ,a.billNo = ?7, a.miRegisterNo = ?8, a.needUpload = '1' where a.code = ?1 ")
    int updateByChargeCode(String chargeCode, String chargeTime, Date updateTime, Integer totalAmount, Integer insuranceAmount, Integer selfPayAmount, String billNo, String miRegisterNo,String tradeStatus);
    List<WlyyCharge> findByPatient(String patient, Pageable pageRequest);

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/patient/PatientHealthRecordSportsDao.java

@ -18,7 +18,7 @@ public interface PatientHealthRecordSportsDao extends PagingAndSortingRepository
    Iterable<PatientHealthRecordSports> findByPatient(String patient);
    // 查询最近的健康记录
    @Query("SELECT a FROM PatientHealthRecordSports a WHERE a.patient = ?1 and a.del = '1' ORDER BY a.czrq DESC")
    @Query("SELECT a FROM PatientHealthRecordSports a WHERE a.patient = ?1 and a.del = '1' ORDER BY a.recordDate DESC")
    Page<PatientHealthRecordSports> findRecentByPatient(String patient, Pageable pageRequest);
    @Query("select a from PatientHealthRecordSports a where a.patient = ?1 and a.recordDate >= ?2 and a.recordDate <= ?3 and a.del = '1' order by a.recordDate desc")

+ 13 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/ylz/PayLogDao.java

@ -0,0 +1,13 @@
package com.yihu.wlyy.repository.ylz;
import com.yihu.wlyy.entity.httpLog.HttpLog;
import com.yihu.wlyy.entity.ylz.PayLog;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by Reece on 2017/9/20.
 */
public interface PayLogDao extends PagingAndSortingRepository<PayLog, Long>,JpaSpecificationExecutor<PayLog> {
}

+ 107 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/label/SignPatientLabelInfoService.java

@ -8,7 +8,6 @@ import com.yihu.wlyy.entity.doctor.team.sign.SignPatientLabelInfo;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.entity.patient.PatientDisease;
import com.yihu.wlyy.entity.patient.SignFamily;
import com.yihu.wlyy.entity.patient.vo.PatientCodeDeviceType;
import com.yihu.wlyy.logs.BusinessLogs;
import com.yihu.wlyy.repository.doctor.DoctorDao;
import com.yihu.wlyy.repository.doctor.DoctorPatientGroupInfoDao;
@ -22,6 +21,7 @@ import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.service.app.team.AdminTeamService;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.IdCardUtil;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray;
import org.json.JSONObject;
@ -71,6 +71,8 @@ public class SignPatientLabelInfoService extends BaseService {
    SignPatientLabelDao labelDao;
    @Autowired
    SignFamilyRenewDao signFamilyRenewDao;
    @Autowired
    SignPatientLabelInfoDao signPatientLabelInfoDao;
    private final Logger logger = LoggerFactory.getLogger(this.getClass());
@ -4486,4 +4488,108 @@ public class SignPatientLabelInfoService extends BaseService {
        return result.size() > 0 ? new JSONArray(result.values()) : new JSONArray();
    }
    /**
     * 设置患者标签
     *
     * @param patient     患者名称
     * @param health      健康情况标签
     * @param disease     疾病类型标签
     * @param custom      自定义标签
     * @return
     */
    public int resetPatientLabels(String patient,String health, String disease, String custom) {
        Patient p = patientDao.findByCode(patient);
        //1.清空居民标签
        String delSql = " DELETE FROM wlyy_sign_patient_label_info WHERE patient ='"+patient+"'";
        jdbcTemplate.execute(delSql);
        //2.新增健康情况标签
        String healths[] = health.split(",");
        //获取所有健康情况标签
        List<Map<String,Object>> healthList = getLabelsByType("2");
        //减低循环层级
        Map<String,Map<String,Object>> healthMap = new HashedMap();
        for(Map<String,Object> map : healthList){
            String code = (String)map.get("code");
            healthMap.put(code,map);
        }
        if(healths!=null&&healths.length>0){
            for(int i=0;i<healths.length;i++){
                SignPatientLabelInfo info = new SignPatientLabelInfo();
                info.setCzrq(new Date());
                info.setLabelType("2");
                info.setPatient(patient);
                info.setPname(p.getName());
                info.setLabel(healths[i]);
                info.setStatus(1);
                String name = (String)healthMap.get(healths[i]).get("name");
                info.setLabelName(name);
                signPatientLabelInfoDao.save(info);
            }
        }
        //2.新增疾病标签
        String diseases[] = disease.split(",");
        //获取所有健康情况标签
        List<Map<String,Object>> diseaseList = getLabelsByType("3");
        //减低循环层级
        Map<String,Map<String,Object>> diseaseMap = new HashedMap();
        for(Map<String,Object> map : diseaseList){
            String code = (String)map.get("code");
            diseaseMap.put(code,map);
        }
        if(diseases!=null&&diseases.length>0){
            for(int i=0;i<diseases.length;i++){
                SignPatientLabelInfo info = new SignPatientLabelInfo();
                info.setCzrq(new Date());
                info.setLabelType("3");
                info.setPatient(patient);
                info.setPname(p.getName());
                info.setLabel(diseases[i]);
                String name = (String)diseaseMap.get(diseases[i]).get("name");
                info.setLabelName(name);
                info.setStatus(1);
                signPatientLabelInfoDao.save(info);
            }
        }
        //3.新增自定义标签
        String customs[] = custom.split(",");
        //获取所有健康情况标签
        List<Map<String,Object>> customList = getLabelsByType("4");
        //减低循环层级
        Map<String,Map<String,Object>> customMap = new HashedMap();
        for(Map<String,Object> map : customList){
            String code = (String)map.get("code");
            customMap.put(code,map);
        }
        if(customs!=null&&customs.length>0){
            for(int i=0;i<customs.length;i++){
                SignPatientLabelInfo info = new SignPatientLabelInfo();
                info.setCzrq(new Date());
                info.setLabelType("4");
                info.setPatient(patient);
                info.setPname(p.getName());
                info.setLabel(customs[i]);
                String name = (String)customMap.get(customs[i]).get("name");
                info.setLabelName(name);
                info.setStatus(1);
                signPatientLabelInfoDao.save(info);
            }
        }
        return 1;
    }
    public List<Map<String,Object>> getLabelsByType(String labelType){
        String sql = " SELECT b.label_code AS code ,b.label_name AS name FROM wlyy_sign_patient_label b WHERE b.label_type= ?";
        return jdbcTemplate.queryForList(sql,new Object[]{labelType});
    }
}

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

@ -25,6 +25,7 @@ import com.yihu.wlyy.repository.zydict.ZyPushLogDao;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.service.third.httplog.LogService;
import com.yihu.wlyy.service.third.jw.JwPrescriptionService;
import com.yihu.wlyy.service.third.ylz.PayLogService;
import com.yihu.wlyy.service.weixin.wxpay.common.Configure;
import com.yihu.wlyy.service.weixin.wxpay.model.BindCard;
import com.yihu.wlyy.service.weixin.wxpay.service.OnePayService;
@ -80,7 +81,7 @@ public class PatientPrescriptionPayService extends BaseService {
    @Autowired
    private ObjectMapper objectMapper;
    @Autowired
    private LogService logService;
    private PayLogService logService;
    @Autowired
    private PatientDao patientDao;
    @Autowired

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/scheme/DoctorSchemeService.java

@ -79,7 +79,7 @@ public class DoctorSchemeService {
            sql = sql + " LEFT JOIN wlyy_patient_device dev on dev.user = p.code ";
        }
        sql = sql+ " JOIN wlyy_sign_family sf on sf.patient = p.code where sf.admin_team_code = "+teamCode;
        sql = sql+ " LEFT JOIN wlyy_sign_family sf on sf.patient = p.code where sf.admin_team_code = "+teamCode;
        if(-1 != disease){
            sql = sql + " and (p.disease ="+disease+" or p.disease = 3) ";
@ -103,7 +103,7 @@ public class DoctorSchemeService {
        sql = sql + " and (sf.doctor = '"+doctorcode+"' or sf.doctor_health ='"+doctorcode+"')";
        sql = sql + " and p.status > 0 and p.disease > 0 ";
        sql = sql + " and p.status > 0 and p.disease > 0 and sf.status > 0 ";
        List<String> result = jdbcTemplate.queryForList(sql,new Object[]{},String.class);

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

@ -11,7 +11,6 @@ import com.yihu.wlyy.repository.service.ServiceDao;
import com.yihu.wlyy.repository.service.ServiceItemDao;
import com.yihu.wlyy.repository.service.SignFamilyServiceDao;
import com.yihu.wlyy.repository.service.SignFamilyServiceItemDao;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
@ -307,7 +306,7 @@ public class SignFamilyServiceService {
     * @throws Exception
     */
    public JSONObject patientAddServiceByHospital(String hospital, String serviceCode) throws Exception {
        String sql = "select patient from wlyy_sign_family s where s.`status`>0 and s.expenses_status=1  and  s.hospita='" + hospital + "'";
        String sql = "select patient from wlyy_sign_family s where s.`status`>0 and s.expenses_status=1  and  s.hospital='" + hospital + "'";
        List<String> patients = jdbcTemplate.queryForList(sql, String.class);
        return patientsAddService(patients, serviceCode);
    }

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/SignWebService.java

@ -1559,7 +1559,7 @@ public class SignWebService extends BaseService {
                        }
                        //1.3.3.2新增需求
                        //设置居民标签
                        signPatientLabelInfoService.setRenewPatientLabels(renew.getPatient(), health, disease, custom, renew.getDoctor(), renew.getDoctor());
                        signPatientLabelInfoService.resetPatientLabels(renew.getPatient(), health, disease, custom);
                        //1.3.3.2设置可修改健康管理师
                        if (StringUtils.isNotBlank(healthDoctor)) {
                            updateHealthDoctor(renew, healthDoctor);
@ -1725,7 +1725,7 @@ public class SignWebService extends BaseService {
                        setSevId(renew, sevId);
                        //1.3.3.2新增需求
                        //设置居民标签
                        signPatientLabelInfoService.setPatientLabels(renew.getPatient(), renew.getIdcard(), "", health, disease, custom, renew.getDoctor(), renew.getDoctor());
                        signPatientLabelInfoService.resetPatientLabels(renew.getPatient(), health, disease, custom);
                        //1.3.3.2设置可修改健康管理师
                        if (StringUtils.isNotBlank(healthDoctor)) {
                            updateHealthDoctor(renew, healthDoctor);

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/team/AdminTeamService.java

@ -465,11 +465,11 @@ public class AdminTeamService extends BaseService {
        SignFamily jtSign = signFamilyDao.findSignByPatient(patient, 2);
        //判断团队关系
        if(jtSign!=null&&doctorTeam!=null&&jtSign.getAdminTeamId().compareTo(doctorTeam.getId())==0){
        if(jtSign!=null&&doctorTeam!=null&&(jtSign.getAdminTeamId() !=null && jtSign.getAdminTeamId().compareTo(doctorTeam.getId())==0)){
            return result.put(new JSONObject(doctorTeam));
        }
        //判断签约关系
        if (jtSign.getAdminTeamId()!=null&&jtSign != null && (doctor.equals(jtSign.getDoctor()) || doctor.equals(jtSign.getDoctorHealth()))) {
        if (jtSign != null&&jtSign.getAdminTeamId()!=null&& (doctor.equals(jtSign.getDoctor()) || doctor.equals(jtSign.getDoctorHealth()))) {
            AdminTeam team = getTeam(jtSign.getAdminTeamId());
            result.put(new JSONObject(team));
        }

+ 9 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/common/account/PatientService.java

@ -858,8 +858,7 @@ public class PatientService extends TokenService {
                "    wlyy_sign_family f ,wlyy_patient p " +
                "   WHERE " +
                "   f.patient = p.code ";
        //获取微信关注量分组数量
        fousGSql = fousGSql +"   AND p.openid IS NOT NULL AND p.openid <>'' " ;
        //判断是否是慢病管理
        if(isSlowDisease){
@ -869,6 +868,14 @@ public class PatientService extends TokenService {
        if(StringUtils.isNotBlank(diseaseCondition)){
            fousGSql = fousGSql +"   AND p.disease_condition = "+diseaseCondition;
        }
        if(isSlowDisease){
            //慢病管理预警居民分数数量
            fousGSql = fousGSql +"   AND p.standard_status = 1 ";
        }else{
            //获取微信关注量分组数量
            fousGSql = fousGSql +"   AND p.openid IS NOT NULL AND p.openid <>'' " ;
        }
        fousGSql = fousGSql +
                "   AND ( " +
                "     f.doctor = '" + doctor + "' " +

+ 60 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/ylz/PayLogService.java

@ -0,0 +1,60 @@
package com.yihu.wlyy.service.third.ylz;
import com.yihu.wlyy.entity.httpLog.HttpLog;
import com.yihu.wlyy.entity.ylz.PayLog;
import com.yihu.wlyy.repository.httplog.HttpLogDao;
import com.yihu.wlyy.repository.ylz.PayLogDao;
import com.yihu.wlyy.service.system.SystemDictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
/**
 * Created by Reece on 2017/9/20.
 * 日志服务
 */
@Service
public class PayLogService {
    @Autowired
    private PayLogDao payLogDao;
    @Autowired
    private SystemDictService systemDictService;
    public String onepayType = "0"; //0家庭签约支付
    public String onepayRecipeType = "1";     //1续方支付
    /**
     * 保存http调用日志  type 0家庭签约支付 1续方支付
     */
    public void saveHttpLog(Boolean isSuccess,String url,String content,String method,String header,String params,String response,String error,String type)
    {
        try {
            //成功日志是否保存
            Boolean saveSuccessLog = systemDictService.getSaveSuccessLog();
            if(!isSuccess || saveSuccessLog) {
                //新增日志
                PayLog log = new PayLog();
                log.setType(type);
                log.setApi(url);
                log.setContent(content);
                log.setMethod(method);
                log.setHeader(header);
                log.setParams(params);
                log.setCreateTime(new Date());
                log.setResponse(response);
                log.setError(error);
                log.setStatus(isSuccess?"1":"0");
                payLogDao.save(log);
            }
        }
        catch (Exception ex)
        {
            ex.printStackTrace();
        }
    }
}

+ 3 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/weixin/wxpay/service/OnePayService.java

@ -15,6 +15,7 @@ import com.yihu.wlyy.repository.organization.HospitalMappingDao;
import com.yihu.wlyy.repository.patient.PatientDao;
import com.yihu.wlyy.repository.patient.SignFamilyDao;
import com.yihu.wlyy.service.third.httplog.LogService;
import com.yihu.wlyy.service.third.ylz.PayLogService;
import com.yihu.wlyy.service.weixin.wxpay.common.Configure;
import com.yihu.wlyy.service.weixin.wxpay.model.BindCard;
import com.yihu.wlyy.service.weixin.wxpay.model.Charge;
@ -50,7 +51,7 @@ public class OnePayService {
    private Configure config;
    @Autowired
    private LogService logService;
    private PayLogService logService;
    private String signType = "MD5";
    private String encryptType = "AES";
@ -355,6 +356,7 @@ public class OnePayService {
        chargeDao.save(charge);
        //保存http日志
//        logService.saveHttpLog(isSuccess, config.getChargeType(), "家庭医生签约支付", "POST", null, msgBody, response, error, logService.onepayType);
        logService.saveHttpLog(isSuccess, config.getChargeType(), "家庭医生签约支付", "POST", null, msgBody, response, error, logService.onepayType);
        if (!isSuccess) {

+ 4 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/util/RSAUtils.java

@ -376,4 +376,8 @@ public class RSAUtils {
            e.printStackTrace();
        }
    }
    public void setBaseService(BaseService baseService) {
        this.baseService = baseService;
    }
}

+ 10 - 4
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/account/LoginController.java

@ -69,6 +69,8 @@ public class LoginController extends BaseController {
    private RoleService roleService;
    @Autowired
    private LoginLogService loginLogService;
    @Autowired
    private RSAUtils rsaUtils;
    /**
     * 公钥生成并返回接口
@ -79,8 +81,10 @@ public class LoginController extends BaseController {
    @ResponseBody
    public String publicKey() {
        try {
            String modulus = RSAUtils.getInstance(smsService).getModulus();
            String exponent = RSAUtils.getInstance(smsService).getExponent();
            //String modulus = RSAUtils.getInstance(smsService).getModulus();
            rsaUtils.setBaseService(smsService);
            String modulus = rsaUtils.getModulus();
            String exponent = rsaUtils.getExponent();
            if (StringUtils.isEmpty(modulus) || StringUtils.isEmpty(exponent)) {
                return error(-1, "公钥获取失败!");
            } else {
@ -110,7 +114,7 @@ public class LoginController extends BaseController {
                         @ApiParam(required = false, name = "captcha", value = "短信验证码") @RequestParam(required = false) String captcha,
                         @ApiParam(required = false, name = "platform", value = "医生端pc,取药系统 或者对外系统") @RequestParam(required = false) Integer platform,
                         @ApiParam(required = false, name = "password", value = "密码") @RequestParam(required = false) String password,
                         @ApiParam(required = false, name = "password", value = "openid") @RequestParam(required = false) String openid) {
                         @ApiParam(required = false, name = "openid", value = "openid") @RequestParam(required = false) String openid) {
        String errorMessage;
        LoginLog loginLog = new LoginLog();
        loginLog.setCreateTime(new Date());
@ -130,7 +134,9 @@ public class LoginController extends BaseController {
            }
            //身份证登录
            if (StringUtils.isNoneEmpty(mobile) && StringUtils.isNoneEmpty(password)) {
                password = RSAUtils.getInstance(doctorService).decryptString(password);
                rsaUtils.setBaseService(doctorService);
                password = rsaUtils.decryptString(password);
                password = StringUtils.reverse(password);
                Doctor doctor = doctorService.findDoctorByMobile(mobile);
                loginLog.setLoginType("2");

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

@ -70,6 +70,8 @@ public class WechatController extends WeixinBaseController {
    private PushMsgTask pushMsgTask;
    @Autowired
    private WeiXinTagUtil weiXinTagUtil;
    @Autowired
    private RSAUtils rsaUtils;
    /**
@ -360,7 +362,8 @@ public class WechatController extends WeixinBaseController {
                }
                loginLog.setUserCode(p.getCode());
                //解密
                password = RSAUtils.getInstance(patientService).decryptString(password);
                rsaUtils.setBaseService(patientService);
                password = rsaUtils.decryptString(password);
                password = StringUtils.reverse(password);
                //生成MD5
                String loginPassword = MD5.GetMD5Code(password + p.getSalt());

+ 19 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/patient/SignPatientLabelInfoController.java

@ -36,7 +36,8 @@ public class SignPatientLabelInfoController extends BaseController {
    PatientService patientService;
    @Autowired
    private DoctorSchemeService doctorSchemeService;
    @Autowired
    private SignPatientLabelInfoService signPatientLabelService;
    /**
     * 根据姓名,地址,身份证号搜索团队内居民
@ -855,4 +856,21 @@ public class SignPatientLabelInfoController extends BaseController {
        }
    }
    @RequestMapping(value = "/resetPatientLabels", method = {RequestMethod.GET, RequestMethod.POST})
    @ResponseBody
    public String resetPatientLabels(@RequestParam(required = true)String patient,
                                     @RequestParam(required = true)String health,
                                     @RequestParam(required = true)String disease,
                                     @RequestParam(required = true)String custom,
                                     @RequestParam(required = true)String doctor){
        try {
            return write(200, "保存成功", "data", signPatientLabelService.resetPatientLabels(patient,health,disease,custom));
        } catch (Exception e) {
            error(e);
            return error(-1, "查询失败");
        }
    }
}

+ 0 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/sign/DoctorSignController.java

@ -784,6 +784,4 @@ public class DoctorSignController extends WeixinBaseController {
            return error(-1, "查询失败");
        }
    }
}

+ 8 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/sign/PatientSignFamilyServiceNoFilterController.java

@ -13,9 +13,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
/**
@ -37,6 +35,7 @@ public class PatientSignFamilyServiceNoFilterController extends BaseController {
            List<ServiceItem> serviceItems = signFamilyServiceService.getPatientServiceItem(patientCode, null);
            return write(200, "请求成功", "data", serviceItems);
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, e.getMessage());
        }
    }
@ -52,6 +51,7 @@ public class PatientSignFamilyServiceNoFilterController extends BaseController {
            JSONObject jsonObject = signFamilyServiceService.patientsAddService(Arrays.asList(patientCode), serviceCode);
            return write(200, "请求成功", "data", jsonObject);
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, e.getMessage());
        }
    }
@ -67,6 +67,7 @@ public class PatientSignFamilyServiceNoFilterController extends BaseController {
            JSONObject jsonObject = signFamilyServiceService.patientsDeleteService(Arrays.asList(patientCode), serviceCode);
            return write(200, "请求成功", "data", jsonObject);
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, e.getMessage());
        }
    }
@ -81,6 +82,7 @@ public class PatientSignFamilyServiceNoFilterController extends BaseController {
            JSONObject jsonObject = signFamilyServiceService.patientAddServiceByTown(townCode, serviceCode);
            return write(200, "请求成功", "data", jsonObject);
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, e.getMessage());
        }
    }
@ -95,6 +97,7 @@ public class PatientSignFamilyServiceNoFilterController extends BaseController {
            JSONObject jsonObject = signFamilyServiceService.patientDeleteServiceByTown(townCode, serviceCode);
            return write(200, "请求成功", "data", jsonObject);
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, e.getMessage());
        }
    }
@ -109,6 +112,7 @@ public class PatientSignFamilyServiceNoFilterController extends BaseController {
            JSONObject jsonObject = signFamilyServiceService.patientAddServiceByHospital(hospital, serviceCode);
            return write(200, "请求成功", "data", jsonObject);
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, e.getMessage());
        }
    }
@ -137,6 +141,7 @@ public class PatientSignFamilyServiceNoFilterController extends BaseController {
            JSONObject jsonObject = signFamilyServiceService.patientAddServiceByAdminTeam(adminTemId, serviceCode);
            return write(200, "请求成功", "data", jsonObject);
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, e.getMessage());
        }
    }
@ -151,6 +156,7 @@ public class PatientSignFamilyServiceNoFilterController extends BaseController {
            JSONObject jsonObject = signFamilyServiceService.patientDeleteServiceByAdminTeam(adminTemId, serviceCode);
            return write(200, "请求成功", "data", jsonObject);
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, e.getMessage());
        }
    }

+ 6 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/wx/OnePayController.java

@ -9,6 +9,7 @@ import com.yihu.wlyy.repository.organization.HospitalMappingDao;
import com.yihu.wlyy.repository.patient.PatientDao;
import com.yihu.wlyy.repository.patient.SignFamilyDao;
import com.yihu.wlyy.service.third.httplog.LogService;
import com.yihu.wlyy.service.third.ylz.PayLogService;
import com.yihu.wlyy.service.weixin.wxpay.common.Configure;
import com.yihu.wlyy.service.weixin.wxpay.model.BindCard;
import com.yihu.wlyy.service.weixin.wxpay.model.Charge;
@ -67,7 +68,7 @@ public class OnePayController extends WeixinBaseController {
    @Autowired
    private ChargeDao chargeDao;
    @Autowired
    LogService logService;
    PayLogService logService;
    @Autowired
    private Configure config;
    @Autowired
@ -325,8 +326,10 @@ public class OnePayController extends WeixinBaseController {
//                判断是否需要更新数据 needUpload为0不需要更新
            WlyyCharge charge = chargeDao.getUploadStatus(outChargeNo);
            LOGGER.info("before  goto "+charge.getNeedUpload()+" == "+ outChargeNo);
            if (charge != null && !("0".equals(charge.getNeedUpload()))) {
                pay.updateData(outChargeNo, chargeNo, chargeTime, totalAmount, insuranceAmount, selfPayAmount, billNo, miRegisterNo);
                LOGGER.info("after  goto "+charge.getNeedUpload()+" == "+ outChargeNo);
            }
        } catch (Exception e) {
@ -426,8 +429,10 @@ public class OnePayController extends WeixinBaseController {
//                判断是否需要更新数据 needUpload为0不需要更新
                    WlyyCharge charge = chargeDao.getUploadStatus(outChargeNo);
                    LOGGER.info("before  goto "+charge.getNeedUpload()+" == "+ outChargeNo);
                    if (charge != null && !("0".equals(charge.getNeedUpload()))) {
                        pay.updateData(outChargeNo, chargeNo, chargeTime, totalAmount, insuranceAmount, selfPayAmount, billNo, miRegisterNo);
                        LOGGER.info("after  goto "+charge.getNeedUpload()+" == "+ outChargeNo);
                    }
                    response.getWriter().write("SUCCESS");