Jelajahi Sumber

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

huangwenjie 7 tahun lalu
induk
melakukan
f0c7b55c19
14 mengubah file dengan 123 tambahan dan 46 penghapusan
  1. 1 1
      common/common-entity/src/main/java/com/yihu/wlyy/entity/message/Message.java
  2. 8 0
      common/common-entity/src/main/java/com/yihu/wlyy/entity/patient/Patient.java
  3. 16 0
      patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/prescription/PrescriptionService.java
  4. 5 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/interceptors/DoctorInterceptor.java
  5. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/message/MessageDao.java
  6. 0 4
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/patient/PatientDao.java
  7. 0 6
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/FamilyContractService.java
  8. 2 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/common/account/TokenService.java
  9. 15 15
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/task/PushMsgTask.java
  10. 2 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/util/SystemData.java
  11. 8 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/account/PatientController.java
  12. 51 11
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/prescription/PatientPrescriptionPayController.java
  13. 4 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/sign/PatientSignFamilyServiceController.java
  14. 10 5
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/wechat/util/WeiXinTagUtil.java

File diff ditekan karena terlalu besar
+ 1 - 1
common/common-entity/src/main/java/com/yihu/wlyy/entity/message/Message.java


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

@ -96,6 +96,8 @@ public class Patient extends IdEntity implements Serializable {
	private Date sicardTime;
	//是否分配过微信标签  1分配过 0或者空没有
	private Integer isWxtag;
	//微信iagId
	private Integer wxtagid;
	public Integer getSicardStatus() {
@ -401,7 +403,13 @@ public class Patient extends IdEntity implements Serializable {
		this.isWxtag = isWxtag;
	}
	public Integer getWxtagid() {
		return wxtagid;
	}
	public void setWxtagid(Integer wxtagid) {
		this.wxtagid = wxtagid;
	}
	//---------------------------常量----------------------------
	public enum isWchatTage{

+ 16 - 0
patient-co-service/wlyy_service/src/main/java/com/yihu/wlyy/service/service/prescription/PrescriptionService.java

@ -259,6 +259,22 @@ public class PrescriptionService extends ZysoftBaseService{
                    prescription.setStatus(PrescriptionLog.PrescriptionLogStatus.wait_expressage.getValue());
                    prescriptionDao.save(prescription);
                    //新增log表
                    PrescriptionLog log = new PrescriptionLog();
                    log.setPrescriptionCode(prescription.getCode());
                    log.setCode(getCode());
                    log.setCreateTime(new Date());
                    log.setType(PrescriptionLog.PrescriptionLogType.zy.getValue());
                    log.setUserType(2);
                    log.setHospital(prescription.getHospital());
                    log.setHospitalName(prescription.getHospitalName());
                    log.setUserName(prescription.getDoctorName());
                    log.setFlag(1);
                    log.setRemark("配药成功");
                    log.setUserCode(prescription.getDoctor());
                    log.setStatus(PrescriptionLog.PrescriptionLogStatus.wait_expressage.getValue());
                    prescriptionLogDao.save(log);
                }
                //判断健管师配送要添加续方消息,提示健管师有续方代配送

+ 5 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/interceptors/DoctorInterceptor.java

@ -115,7 +115,9 @@ public class DoctorInterceptor extends BaseInterceptor {
            Map<String, Token> tempMap = null;
            if (platform == 2) {
                tempMap = SystemData.doctorTokens;
            } else {
            }else if (platform == 5) {
                tempMap = SystemData.prescriptionPCTokens;
            }else {
                tempMap = SystemData.doctorPCTokens;
            }
            token = tempMap.get(uid);
@ -126,7 +128,8 @@ public class DoctorInterceptor extends BaseInterceptor {
                    tempMap.put(uid, token);
                }
            }
            if (token == null || (token.getPlatform() != 2&&token.getPlatform() != 4)) {
            //1、患者端,2、医生端app,3、微信公众号wechat,4、医生端pc,5、PC端取药系统
            if (token == null || (token.getPlatform() != 2&&token.getPlatform() != 4&&token.getPlatform() != 5)) {
                // 未登录
                response.getOutputStream().write(error(SystemConf.NOT_LOGIN, "请登录后再操作!").getBytes());
                flag = false;

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

@ -86,6 +86,6 @@ public interface MessageDao extends PagingAndSortingRepository<Message, Long>, J
    int findTzMessage(String patient);
    //根据续方关联code查询团队长分配健管师消息
    @Query("from Message a where a.type = 3 and a.state=0 and a.del='1' and a.over='0' and relationCode = ?1  ")
    @Query("from Message a where a.type = 8 and a.state=0 and a.del='1' and a.over='0' and relationCode = ?1  ")
    Message findByRelationCode(String relationCode);
}

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

@ -64,8 +64,4 @@ public interface PatientDao extends PagingAndSortingRepository<Patient, Long> {
    //获取所有的openid并排重
    @Query("select distinct p.openid from Patient p where p.openid is not null and p.openid <> '' ")
    List<String> findOpenids();
    @Modifying
    @Query("update Patient p set p.isWxtag=?2 where p.code=?1")
    void updateIsWXTagByCode(String patient, Integer status);
}

+ 0 - 6
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/FamilyContractService.java

@ -33,7 +33,6 @@ import com.yihu.wlyy.task.SignUploadTask;
import com.yihu.wlyy.util.*;
import com.yihu.wlyy.wechat.util.WeiXinAccessTokenUtils;
import com.yihu.wlyy.wechat.util.WeiXinOpenIdUtils;
import com.yihu.wlyy.wechat.util.WeiXinTagUtil;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.sql.Select;
import org.json.JSONArray;
@ -128,8 +127,6 @@ public class FamilyContractService extends BaseService {
    private SignFamilyRenewDao signFamilyRenewDao;
    @Autowired
    private SignFamilyMappingDao signFamilyMappingDao;
    @Autowired
    private WeiXinTagUtil weiXinTagUtil;
    @Autowired
    private ImUtill ImUtill;
@ -1187,7 +1184,6 @@ public class FamilyContractService extends BaseService {
        //签约成功之后给患者新增标签
        String openId=sf.getOpenid();
       hospital=sf.getHospital();
        weiXinTagUtil.addTagWithOpenid(openId,hospital,sf.getPatient(),sf.getName());
        return temp;
    }
@ -1535,7 +1531,6 @@ public class FamilyContractService extends BaseService {
        //签约成功之后给患者新增标签
        String openId=sf.getOpenid();
        String hospital=sf.getHospital();
        weiXinTagUtil.addTagWithOpenid(openId,hospital,sf.getPatient(),sf.getName());
        return result;
    }
@ -1672,7 +1667,6 @@ public class FamilyContractService extends BaseService {
        //根据openId给患者清掉标签
        String openId=sf.getOpenid();
        String hospital=sf.getHospital();
        weiXinTagUtil.deleteTagWithOpenid(openId,hospital,sf.getPatient(),sf.getName());
        return 1;
    }

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

@ -64,6 +64,8 @@ public class TokenService extends BaseService {
			SystemData.wxPatientTokens.put(user, token);
		}else if(platform == 4){
			SystemData.doctorPCTokens.put(user,token);
		}else if(platform == 5){
			SystemData.prescriptionPCTokens.put(user,token);
		}
		return token;
	}

+ 15 - 15
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/task/PushMsgTask.java

@ -119,6 +119,7 @@ public class PushMsgTask {
            }
        }
    }
    @PostConstruct
    private void run() {
        new Thread(new ConsumerTask(httpUtil)).start();
@ -205,7 +206,6 @@ public class PushMsgTask {
     *             type==11时:{"first":"消息主题","name":"患教标题","doctorName":"医生名","date":"发送时间","remark":"消息备注"}
     *             type==19时:{"first":"消息主题","keyword1":"审核结果","keyword2":"审核医生","remark":"消息备注"}
     *             type==20时:{"first":"消息主题","keyword1":"服务项目","keyword2":"操作医生","keyword3":"服务时间","remark":"消息备注"}
     *
     * @return
     */
//    private boolean sendWeixinMessage(String access_token, int type, String openid, String name, JSONObject json) {
@ -286,9 +286,9 @@ public class PushMsgTask {
                m.put("keyword3", keyword3);
            } else if (type == 1 || type == 2) {
                if (type == 1) {
                    temp_id =template_sign_success;
                    temp_id = template_sign_success;
                } else {
                    temp_id =template_sign_failed;
                    temp_id = template_sign_failed;
                }
                String isRenew = "0";
                if (json.has("isRenew")) {
@ -374,7 +374,7 @@ public class PushMsgTask {
                m.put("keyword4", keyword4);
            } else if (type == 6) {
                temp.setUrl(url + "wdyy/html/detail-appointment.html?openid=" + openid + "&orgCode=" + json.get("orgCode") + "&id=" + json.getString("id") + "&toUser=" + json.getString("toUser") + "&toName=" + name + "&represented=" + json.getString("represented"));
                temp_id =template_appoint_success;
                temp_id = template_appoint_success;
                temp.setTemplate_id(temp_id);
                WechatTemplateData keyword1 = new WechatTemplateData();
                keyword1.setColor("#000000");
@ -394,7 +394,7 @@ public class PushMsgTask {
                m.put("planstarttime", keyword4);
            } else if (type == 7) {
                temp.setUrl(url + "wdyy/html/my-appointment.html?openid=" + openid + "&toUser=" + json.getString("toUser") + "&toName=" + name + "&represented=" + json.getString("represented"));
                temp_id =template_appoint_failed;
                temp_id = template_appoint_failed;
                temp.setTemplate_id(temp_id);
                WechatTemplateData keyword1 = new WechatTemplateData();
                keyword1.setColor("#000000");
@ -457,9 +457,10 @@ public class PushMsgTask {
                keyword5.setValue(json.getString("remark"));
                m.put("remark", keyword5);
            } else if (type == 10) {
                temp.setUrl(url + "qygl/html/signing-doctors.html?openid=" + openid + "&state=" + openid + "&toUser=" + json.getString("toUser") + "&toName=" + name + "&represented=" + json.getString("represented"));
                if (json.has("url")){
                if (json.has("url")) {
                    temp.setUrl(url + json.getString("url"));
                }else {
                    temp.setUrl(url + "qygl/html/signing-doctors.html?openid=" + openid + "&state=" + openid + "&toUser=" + json.getString("toUser") + "&toName=" + name + "&represented=" + json.getString("represented"));
                }
                temp.setTemplate_id(template_doctor_change);
                WechatTemplateData keyword1 = new WechatTemplateData();
@ -477,11 +478,12 @@ public class PushMsgTask {
                keyword3.setValue(json.getString("keyword3"));
                m.put("keyword3", keyword3);
            } else if (type == 11) {
                String xinurl = url + "survey/html/survey_info.html?openid=" + openid + "&state=" + openid + "&survey_id=" + json.getString("survey_id") + "&toUser=" + json.getString("toUser") + "&toName=" + name + "&represented=" + json.getString("represented");
//                temp.setUrl(url + "survey/html/survey_info.html?openid=" + openid + "&state=" + openid + "&survey_id=" + json.getString("survey_id") + "&toUser=" + json.getString("toUser") + "&toName=" + name);
                temp.setUrl(xinurl);
                if (json.has("url")){
                if (json.has("url")) {
                    temp.setUrl(url + json.getString("url"));
                } else {
                    String xinurl = url + "survey/html/survey_info.html?openid=" + openid + "&state=" + openid + "&survey_id=" + json.getString("survey_id") + "&toUser=" + json.getString("toUser") + "&toName=" + name + "&represented=" + json.getString("represented");
//                temp.setUrl(url + "survey/html/survey_info.html?openid=" + openid + "&state=" + openid + "&survey_id=" + json.getString("survey_id") + "&toUser=" + json.getString("toUser") + "&toName=" + name);
                    temp.setUrl(xinurl);
                }
                temp.setTemplate_id(template_doctor_survey);
                WechatTemplateData keyword1 = new WechatTemplateData();
@ -494,8 +496,6 @@ public class PushMsgTask {
                keyword2.setValue(json.getString("keyword2"));
                m.put("keyword2", keyword2);
                logger.info("type=====>openId " + openid);
                System.out.println("url=======type =11 =====================>" + xinurl);
                logger.error("url=======type =11 =====================>" + xinurl);
            } else if (type == 12) {
                temp.setUrl(url + "jtgx/html/application-msg-list.html?openid=" + openid + "&member=" + json.getString("member") + "&toUser=" + json.getString("member") + "&toName=" + name);
@ -596,7 +596,7 @@ public class PushMsgTask {
                keyword2.setColor("#000000");
                keyword2.setValue(json.getString("keyword2"));
                m.put("keyword2", keyword2);
            }else if (type == 19) {
            } else if (type == 19) {
                temp.setUrl(url + json.getString("url"));
                temp.setTemplate_id(template_doctor_audit);
                WechatTemplateData keyword1 = new WechatTemplateData();
@ -607,7 +607,7 @@ public class PushMsgTask {
                keyword2.setColor("#000000");
                keyword2.setValue(json.getString("keyword2"));
                m.put("keyword2", keyword2);
            }else if (type == 20) {
            } else if (type == 20) {
                temp.setUrl(url + json.getString("url"));
                temp.setTemplate_id(template_doctor_service);
                WechatTemplateData keyword1 = new WechatTemplateData();

+ 2 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/util/SystemData.java

@ -15,5 +15,6 @@ public class SystemData {
	public static Map<String, Token> patientTokens = new HashMap<String, Token>();
	// 患者公众号验证信息
	public static Map<String, Token> wxPatientTokens = new HashMap<String, Token>();
	// PC端取药系统验证信息
	public static Map<String, Token> prescriptionPCTokens = new HashMap<String, Token>();
}

+ 8 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/account/PatientController.java

@ -18,6 +18,7 @@ import com.yihu.wlyy.service.common.account.PatientService;
import com.yihu.wlyy.service.common.account.TokenService;
import com.yihu.wlyy.util.*;
import com.yihu.wlyy.web.WeixinBaseController;
import com.yihu.wlyy.wechat.util.WeiXinTagUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
@ -69,6 +70,8 @@ public class PatientController extends WeixinBaseController {
    private SMSService smsService;
    @Autowired
    private SignFamilyServerDao signFamilyServerDao;
    @Autowired
    private WeiXinTagUtil weiXinTagUtil;
    /**
     * 患者基本信息查询接口
@ -391,6 +394,11 @@ public class PatientController extends WeixinBaseController {
                token.setDel("0");
                tokenDao.save(token);
                SystemData.wxPatientTokens.remove(getUID());
                //清空患者的微信标签
                weiXinTagUtil.deleteTagWithOpenid(patient.getOpenid(),patient.getWxtagid());
                patient.setIsWxtag(Patient.isWchatTage.no.getValue());
                patient.setWxtagid(null);
                patientInfoService.updatePatient(patient);
                return success("已成功退出!");
            }
        } catch (Exception e) {

+ 51 - 11
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/prescription/PatientPrescriptionPayController.java

@ -1,6 +1,7 @@
package com.yihu.wlyy.web.patient.prescription;
import com.yihu.wlyy.service.app.prescription.PatientPrescriptionPayService;
import com.yihu.wlyy.service.app.prescription.PrescriptionNoticesService;
import com.yihu.wlyy.service.app.prescription.PrescriptionService;
import com.yihu.wlyy.web.WeixinBaseController;
import io.swagger.annotations.Api;
@ -30,11 +31,13 @@ public class PatientPrescriptionPayController extends WeixinBaseController {
    @Autowired
    private PrescriptionService prescriptionService;
    @Autowired
    private PrescriptionNoticesService noticesService;
    /**
     * 患者长处方支付接口 可配送方式查询
     *
     * @param orgCode 居民签约社区code
     * @param orgCode          居民签约社区code
     * @param prescriptionCode 续方code
     * @return
     * @throws Exception
@ -45,8 +48,8 @@ public class PatientPrescriptionPayController extends WeixinBaseController {
            @RequestParam(required = true) @ApiParam(value = "续方code", name = "prescriptionCode") String prescriptionCode,
            @RequestParam(required = true) @ApiParam(value = "居民签约社区code", name = "orgCode") String orgCode) throws Exception {
        try {
            com.alibaba.fastjson.JSONObject result = payService.dispatch(prescriptionCode,orgCode);
            return write(200, "获取成功!","data",result);
            com.alibaba.fastjson.JSONObject result = payService.dispatch(prescriptionCode, orgCode);
            return write(200, "获取成功!", "data", result);
        } catch (Exception e) {
            return error(-1, "获取失败!");
        }
@ -70,7 +73,7 @@ public class PatientPrescriptionPayController extends WeixinBaseController {
            @RequestParam(required = true) @ApiParam(value = "居民社区code", name = "orgCode") String orgCode,
            @RequestParam(required = true) @ApiParam(value = "续方code", name = "prescriptionCode") String prescriptionCode,
            @RequestParam(required = true) @ApiParam(value = "配送方式", name = "type") int type,
            @RequestParam(required = true) @ApiParam(value = "配送地址json", name = "addressJson",defaultValue = "{\"townName\":\"海沧区\",\"code\":\"3502050100\",\"address\":" +
            @RequestParam(required = true) @ApiParam(value = "配送地址json", name = "addressJson", defaultValue = "{\"townName\":\"海沧区\",\"code\":\"3502050100\",\"address\":" +
                    "\"冰岛\",\"cityName\":\"厦门市\",\"townCode\":\"350205\",\"provinceCode\":\"350000\",\"cityCode\":\"350200\",\"name\":\"海沧区嵩屿街道社区卫生服务中心\"," +
                    "\"provinceName\":\"福建省\",\"streeCode\":\"35020501\",\"streeName\":\"皇后大道东\",\"phone\":\"13253541190\"}") String addressJson,
            @RequestParam(required = true) @ApiParam(value = "页面回调地址", name = "returnUrl") String returnUrl,
@ -78,8 +81,12 @@ public class PatientPrescriptionPayController extends WeixinBaseController {
        try {
            String accessToken = getAccessToken();
            String patient = getUID();
            Map result = payService.charge(type,addressJson,orgCode, prescriptionCode, totalAmount, patient, accessToken,returnUrl);
            return write(200, "支付成功!","data",result);
            Map result = payService.charge(type, addressJson, orgCode, prescriptionCode, totalAmount, patient, accessToken, returnUrl);
            if ("-1".equals(result.get("status").toString())) {
                return error(-1, "续方居民信息与微信支付身份信息不一致!");
            } else {
                return write(200, "支付成功!", "data", result);
            }
        } catch (Exception e) {
            return error(-1, "支付失败!");
        }
@ -97,7 +104,7 @@ public class PatientPrescriptionPayController extends WeixinBaseController {
        try {
            String accessToken = getAccessToken();
            String result = payService.chargeQuery(outChargeNo, accessToken);
            return write(200, "获取成功!","data",result);
            return write(200, "获取成功!", "data", result);
        } catch (Exception e) {
            return error(-1, "获取失败!");
        }
@ -116,7 +123,7 @@ public class PatientPrescriptionPayController extends WeixinBaseController {
        try {
            String accessToken = getAccessToken();
            Map result = payService.recipeReturnUrl(request, response, accessToken);
            return write(200, "页面回调成功!","data",result);
            return write(200, "页面回调成功!", "data", result);
        } catch (Exception e) {
            return error(-1, "页面回调失败!");
        }
@ -143,13 +150,46 @@ public class PatientPrescriptionPayController extends WeixinBaseController {
            @ApiParam(name = "cardNo", value = "社保卡号", defaultValue = "D21085562")
            @RequestParam(value = "cardNo", required = true) String cardNo,
            @ApiParam(name = "visitNo", value = "挂号号", defaultValue = "3277865")
            @RequestParam(value = "visitNo", required = true) String visitNo){
            @RequestParam(value = "visitNo", required = true) String visitNo) {
        try {
            com.alibaba.fastjson.JSONObject jsonParams = prescriptionService.getPayInfo(cardNo,visitNo);
            return write(200, "获取成功!","data",jsonParams);
            com.alibaba.fastjson.JSONObject jsonParams = prescriptionService.getPayInfo(cardNo, visitNo);
            return write(200, "获取成功!", "data", jsonParams);
        } catch (Exception e) {
            return error(-1, "获取失败!");
        }
    }
    /**
     * 测试长处方相关模板通知消息
     *
     * @param patient   要发送对象居民code
     * @param doctName  相关医生姓名(type=1审核医生、type=2 null、type=3配送健管师、type=4审核医生)
     * @param ordenTime 订单完成时间(type=1 null、type=2 null、type=3 null、type=4 订单完成时间)
     * @param type      1:续方审核通知 2:取药代办通知 3:配送中信息变更 4:已完成服务结果
     * @param status    续方通知状态 0不通过 1通过 2调整处方  其余状态均为0
     * @param url       带参数的模板跳转链接
     */
    @RequestMapping(value = "/testSendMassages", method = RequestMethod.POST)
    @ApiOperation(value = "测试长处方相关模板通知消息")
    public String testSendMassages(
            @ApiParam(name = "patient", value = "要发送对象居民code")
            @RequestParam(value = "patient", required = true) String patient,
            @ApiParam(name = "doctName", value = "相关医生姓名(type=1审核医生、type=2 null、type=3配送健管师、type=4审核医生)")
            @RequestParam(value = "doctName", required = false) String doctName,
            @ApiParam(name = "ordenTime", value = "订单完成时间(type=1 null、type=2 null、type=3 null、type=4 订单完成时间)")
            @RequestParam(value = "ordenTime", required = false) String ordenTime,
            @ApiParam(name = "type", value = "1:续方审核通知 2:取药代办通知 3:配送中信息变更 4:已完成服务结果")
            @RequestParam(value = "type", required = true) int type,
            @ApiParam(name = "status", value = "续方通知状态 0不通过 1通过 2调整处方  其余状态均为0")
            @RequestParam(value = "status", required = true) int status,
            @ApiParam(name = "url", value = "带参数的模板跳转链接")
            @RequestParam(value = "url", required = true) String url) {
        try {
            noticesService.sendMessages(patient, doctName, ordenTime, type, status, url);
            return write(200, "发送成功!");
        } catch (Exception e) {
            return error(-1, "发送失败!");
        }
    }
}

+ 4 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/sign/PatientSignFamilyServiceController.java

@ -10,6 +10,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
@ -34,6 +35,9 @@ public class PatientSignFamilyServiceController extends BaseController {
    ) {
        try {
            JSONObject jo = new JSONObject();
            if (StringUtils.isEmpty(patientCode)) {
                patientCode = getUID();
            }
            Service service = signFamilyServiceService.getPatientService(patientCode, null);
            List<ServiceItem> serviceItems = signFamilyServiceService.getPatientServiceItem(patientCode, null);
            jo.put("service", service);

+ 10 - 5
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/wechat/util/WeiXinTagUtil.java

@ -118,9 +118,10 @@ public class WeiXinTagUtil {
                    throw new Exception("创建失败," + result);
                }
                //更新患者表
                patientDao.updateIsWXTagByCode(patient, Patient.isWchatTage.yes.getValue());
                Patient patientObj = patientDao.findByCode(patient);
                patientObj.setIsWxtag(Patient.isWchatTage.yes.getValue());
                patientObj.setWxtagid(tagId);
            }
            return result;
        } catch (Exception e) {
            logger.error(e.getMessage());
@ -156,8 +157,9 @@ public class WeiXinTagUtil {
            } else {
                saveLog(openid, patient, patientName, null, 1, "wx_tag中不存在区是" + town + "的标签");
            }
            //更新患者表
            patientDao.updateIsWXTagByCode(patient, Patient.isWchatTage.yes.getValue());
            Patient patientObj = patientDao.findByCode(patient);
            patientObj.setIsWxtag(Patient.isWchatTage.yes.getValue());
            patientObj.setWxtagid(tagId.getTagId());
            return str;
        } catch (Exception e) {
            logger.error(e.getMessage());
@ -220,7 +222,9 @@ public class WeiXinTagUtil {
            } else {
                saveLog(openid, patient, patientName, null, 2, "wx_tag中不存在区是" + town + "的标签");
            }
            patientDao.updateIsWXTagByCode(patient, Patient.isWchatTage.no.getValue());
            Patient patientObj = patientDao.findByCode(patient);
            patientObj.setIsWxtag(Patient.isWchatTage.no.getValue());
            patientObj.setWxtagid(null);
            return str;
        } catch (Exception e) {
            logger.error(e.getMessage());
@ -268,6 +272,7 @@ public class WeiXinTagUtil {
     */
    public String deleteTagWithOpenid(String openIds, Integer tagId) {
        try {
            net.sf.json.JSONObject params = new net.sf.json.JSONObject();
            net.sf.json.JSONArray ja = new JSONArray();
            ja.add(openIds);