Browse Source

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

Conflicts:
	patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/jkedu/service/EduArticleService.java
zd_123 7 years ago
parent
commit
cc66d48834

+ 5 - 5
edu-article/JkEdu/src/com/yihu/jk/api/ArticleApiTest.java

@ -68,11 +68,11 @@ public class ArticleApiTest {
//		obj.put("articlelevel","1");
//		obj.put("articleTitle","1");
//		obj.put("userCode","0de7295862dd11e69faffa163e8aee56");
		//obj.put("roleType",1);
		obj.put("currentUserRole","3502110400");
		//obj.put("userCode","0de7295862dd11e69faffa163e8aee56");//ylp201703150222
		obj.put("currentUserRole","3502110400");
		obj.put("userCode","37959ddf86f211e6b394fa163e424525");//ylp201703150222
		obj.put("roleType",1);
		obj.put("isMyArticle",true);
		obj.put("page","0");
		obj.put("pageSize","9");
@ -83,8 +83,8 @@ public class ArticleApiTest {
		initDB();
		try{
//			api.authenticationArticle(im);
//			System.out.println(api.authenArticlePCList(im));//initArticleStatistic
			api.initArticleStatistic();
			System.out.println(api.queryArticlePcList(im));//initArticleStatistic
//W			api.initArticleStatistic();
		}catch(Exception e){
			e.printStackTrace();
		}

+ 1 - 2
edu-article/JkEdu/src/com/yihu/jk/dao/ArticleDao.java

@ -586,9 +586,8 @@ public class ArticleDao {
		}else if("4".equals(vo.getOperatorRoleLevel())){//社区、机构
			param.append(" and OperatorRoleCode = '"+vo.getOperatorRoleCode()+"' ");
		}
		param.append(" and UserScope <= ? ");
		if(StringUtil.isNotEmpty(vo.getOperatorRoleLevel())){
			param.append(" and UserScope <= ? ");
            sql.addParamValue(Integer.valueOf(vo.getOperatorRoleLevel())-1);
        }else{
            sql.addParamValue(3);

+ 8 - 10
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/jimeiJkEdu/JMJkEduArticleService.java

@ -2,11 +2,7 @@ package com.yihu.wlyy.service.jimeiJkEdu;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.JSONPObject;
import com.yihu.edu.entity.RoleWithAuthorityCheck;
import com.yihu.es.entity.FollowupContentESDO;
import com.yihu.es.entity.HealthEduArticleES;
import com.yihu.es.entity.HealthEduArticlePatient;
import com.yihu.es.entity.RoleVo;
import com.yihu.wlyy.config.es.ElasticFactory;
import com.yihu.wlyy.config.es.ElastricSearchSave;
@ -44,8 +40,6 @@ import org.springframework.util.StringUtils;
import java.util.*;
import static org.bouncycastle.asn1.x509.X509ObjectIdentifiers.id;
/**
 * Created by liuwenbin on 2017/8/12.
 * 集美健教
@ -127,7 +121,7 @@ public class JMJkEduArticleService extends BaseService {
        sql2.append(" and currentUserRoleCode ="+currentUserRole);
        sql2.append(" and currentUserRoleLevel="+currentUserRoleLevel);
        if(!StringUtils.isEmpty(articleTitle)){
            sql2.append(" and attachedTitle like'%"+articleTitle+"%'");
            sql2.append(" and articleTitle like'%"+articleTitle+"%'");
        }
        if(!StringUtils.isEmpty(sendTimeStart)){
            sendTimeStart = elasticsearchUtil.changeTime(sendTimeStart);
@ -236,7 +230,7 @@ public class JMJkEduArticleService extends BaseService {
        sql2.append(" and currentUserRoleCode ="+currentUserRole);
        sql2.append(" and currentUserRoleLevel="+currentUserRoleLevel);
        if(!StringUtils.isEmpty(articleTitle)){
            sql2.append(" and attachedTitle like'%"+articleTitle+"%'");
            sql2.append(" and articleTitle like'%"+articleTitle+"%'");
        }
        if(!StringUtils.isEmpty(sendTimeStart)){
            sendTimeStart = elasticsearchUtil.changeTime(sendTimeStart);
@ -563,9 +557,13 @@ public class JMJkEduArticleService extends BaseService {
            roleVoLists.add(roleVo);
        }
        JSONObject article = thirdJkEduArticleService.getArticalById(articleId,"");
        Date createTime = new Date();
        for (String patient : patientSet) {
            one = patientDao.findByCode(patient);
            if(one==null){
                continue;
            }
            HealthEduArticleES healthEduArticleES = new HealthEduArticleES();
            healthEduArticleES.setDoctorCode(doctor.getCode());
            healthEduArticleES.setDoctorName(doctor.getName());
@ -593,7 +591,7 @@ public class JMJkEduArticleService extends BaseService {
            healthEduArticleES.setHospitalName(doctor.getHospitalName());
            healthEduArticleES.setTown(doctor.getTown());
            healthEduArticleES.setTownName(doctor.getTownName());
            healthEduArticleES.setCreateTime(new Date());
            healthEduArticleES.setCreateTime(createTime);
            healthEduArticleES.setSendType(sendType);
            healthEduArticleES.setArticleId(article.get("articleId") + "");
@ -731,7 +729,7 @@ public class JMJkEduArticleService extends BaseService {
            if (!whereSql.endsWith(" and ( ")) {
                whereSql += " or (l.label_type = 3 AND l.label in (" + labelDisease + ")) ";
            } else {
                whereSql += " l.label_type = 1 AND l.label in (" + labelDisease + ")) ";
                whereSql += " l.label_type = 1 AND l.label in (" + labelDisease + ") ";
            }
        }
        if (!StringUtils.isEmpty(labelHealth) || !StringUtils.isEmpty(labelDisease)) {

+ 2 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/FileUploadController.java

@ -580,7 +580,8 @@ public class FileUploadController extends BaseController {
                    InputStream inputStream  = mf.getInputStream();
                    String fileName = mf.getOriginalFilename().substring(0,mf.getOriginalFilename().lastIndexOf("."));
                    ObjectNode imgNode = FastDFSUtil.upload(inputStream,"png",fileName);
                    tempPaths.add(imgNode.get("fid").toString());
                    com.alibaba.fastjson.JSONObject json = com.alibaba.fastjson.JSONObject.parseObject(imgNode.toString());
                    tempPaths.add(json.getString("fid"));
                }
                String urls = "";
                for (String image : tempPaths) {

+ 4 - 9
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/jimeiJkEdu/DoctorJMJkEduArticleController.java

@ -2,16 +2,9 @@ package com.yihu.wlyy.web.doctor.jimeiJkEdu;
import com.alibaba.fastjson.JSONObject;
import com.yihu.es.entity.HealthEduArticleES;
import com.yihu.es.entity.HealthEduArticlePatient;
import com.yihu.wlyy.aop.ObserverRequired;
import com.yihu.wlyy.entity.education.HealthEduArticle;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.service.app.label.SignPatientLabelInfoService;
import com.yihu.wlyy.service.call.CustomerService;
import com.yihu.wlyy.service.jimeiJkEdu.JMJkEduArticleService;
import com.yihu.wlyy.service.third.jkEduArticle.ThirdJkEduArticleService;
import com.yihu.wlyy.web.BaseController;
import com.yihu.wlyy.web.third.gateway.service.GcEduArticleService;
import com.yihu.wlyy.web.third.gateway.vo.HealthEduArticlePatientModel;
import com.yihu.wlyy.web.third.gateway.vo.base.BaseResultModel;
import com.yihu.wlyy.web.third.gateway.vo.base.ResultPageListModel;
@ -19,7 +12,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.MediaType;
@ -31,7 +23,9 @@ import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.Session;
import javax.jms.TextMessage;
import java.util.*;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
 * Created by Trick on 2017/11/14.
@ -158,6 +152,7 @@ public class DoctorJMJkEduArticleController extends BaseController {
            }).start();
            return new BaseResultModel();
        }catch (Exception e) {
            e.printStackTrace();
            return new BaseResultModel(BaseResultModel.statusEm.opera_error.getCode(), BaseResultModel.statusEm.opera_error.getMessage() + ":" + e.getMessage());
        }

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

@ -822,6 +822,44 @@ public class PatientController extends WeixinBaseController {
        }
    }
    /**
     * 居民手机号变更
     *
     * @param mobile  新手机号
     * @param captcha 验证码
     * @param type    1:变更手机号  2:绑定手机号
     * @return
     */
    @RequestMapping(value = "/mobileUpdate", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation("居民手机号变更")
    public String changePatientMobile2(String mobile, String captcha, int type) {
        try {
            if (StringUtils.isEmpty(mobile)) {
                return error(-1, "请填写新手机号码");
            }
            if (StringUtils.isEmpty(captcha)) {
                return error(-1, "请输入验证码");
            }
            int smsCheck = smsService.check(mobile, type, captcha);
            if (smsCheck != 1) {
                return error(-1, "验证码错误");
            }
//            int result = patientInfoService.changeMobile(getUID(), mobile, captcha, type);
            int result = patientInfoService.changeMobile(getRepUID(), mobile, captcha, type);
            if (result == -1) {
                return error(-1, "居民信息查找失败");
            } else if (result == 1) {
                return write(200, "手机号更新成功");
            } else {
                return write(-1, "手机号更新失败");
            }
        } catch (Exception e) {
            return error(-1, "手机号更新失败");
        }
    }
    /**
     * 手机号是否注册
     *