Procházet zdrojové kódy

Merge branch 'dev-1.4.1' of wujunjie/patient-co-management into dev_1.4.1

huangwenjie před 7 roky
rodič
revize
af7c701a8a

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

@ -760,7 +760,7 @@ public class ArticleDao {
			param.append(" and Articlelevel = ? ");
			sql.addParamValue(vo.getArticlelevel());
		}
		if (StringUtil.isNotEmpty(vo.getIsAuthentication())) {
		if (vo.getIsAuthentication() != null ) {
			param.append(" and IsAuthentication = ? ");
			sql.addParamValue(vo.getIsAuthentication());
		}
@ -800,7 +800,7 @@ public class ArticleDao {
            param.append(" and InsertTime <= ? ");
            sql.addParamValue(vo.getEndTime());
        }
        if (StringUtil.isNotEmpty(vo.getIsAuthentication())) {
        if (vo.getIsAuthentication() != null ) {
            param.append(" and IsAuthentication = ? ");
            sql.addParamValue(vo.getEndTime());
        }

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

@ -15,7 +15,6 @@ import com.yihu.wlyy.repository.patient.PrenatalInspectorPlanDao;
import com.yihu.wlyy.repository.patient.PrenatalInspectorRecordDao;
import com.yihu.wlyy.repository.patient.SignFamilyDao;
import com.yihu.wlyy.service.BaseService;
import com.yihu.wlyy.service.app.sign.FamilyContractService;
import com.yihu.wlyy.service.third.jw.JwMaternalChildService;
import com.yihu.wlyy.task.PushMsgTask;
import com.yihu.wlyy.util.DateUtil;
@ -79,6 +78,35 @@ public class PrenatalInspectorPreCardService extends BaseService {
                String name = patient.getName();
                String patientCode = patient.getCode();
                plan.getId();
                boolean flag = false;
                if(StringUtils.isNotBlank(plan.getInspectionCode())){
                    SignFamily signFamily = signFamilyDao.findByPatient(patientCode);
                    String hospital = null;
                    if (signFamily != null) {
                        hospital = signFamily.getHospital();
                    }
                    String response = jwMaternalChildService.getEhrMaternalFirstExamRecord(patient.getIdcard(),hospital);
                    com.alibaba.fastjson.JSONObject json = com.alibaba.fastjson.JSONObject.parseObject(response);
                    com.alibaba.fastjson.JSONArray data = null;
                    if (json.getInteger("status") == 200) {
                        data = json.getJSONObject("data").getJSONArray("DATA");
                    }
                    if (data != null && data.size() > 0) {//有建卡信息
                        for (int i = 0; i < data.size(); i++) {
                            com.alibaba.fastjson.JSONObject pregnancy = data.getJSONObject(i);
                            String PREGNANCY_NO = pregnancy.getString("PREGNANCY_NO");//智业产检号
                            String PREGNANCY_STATUS = pregnancy.getString("PREGNANCY_STATUS");//PREGNANCY_STATUS /*妊娠是否结束,0未结束,1结束*/
                            if (plan.getInspectionCode().equals(PREGNANCY_NO)&&"1".equals(PREGNANCY_STATUS)) {
                                flag = true;
                            }
                        }
                    }
                }
                if(flag){
                    //已经结束妊娠的不提醒
                    continue;
                }
                if (StringUtils.isNotBlank(openId)) {
                    Long day = DateUtil.getDays(plan.getInspectionTime(), DateUtil.getNowDateShort());
                    JSONObject json = new JSONObject();

+ 24 - 21
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/jimeiJkEdu/JMJkEduArticleService.java

@ -106,10 +106,10 @@ public class JMJkEduArticleService extends BaseService {
        StringBuffer sql2 = new StringBuffer("select * from   " + esType +
                " where  doctorCode='" + sendCode + "' and userType = 2");
        if(sendType==1){
            sql2.append(" and sendType='"+sendType+"' ");
        }
//        if(sendType==1){
//
//            sql2.append(" and sendType='"+sendType+"' ");
//        }
        if(!StringUtils.isEmpty(firstLevelCategoryId)){
            sql2.append("and firstLevelCategoryId="+firstLevelCategoryId);
        }
@ -119,8 +119,8 @@ public class JMJkEduArticleService extends BaseService {
        if(myArticle==1){
            sql2.append(" and operatorId="+sendCode);
        }
        sql2.append(" and currentUserRoleCode ="+currentUserRole);
        sql2.append(" and currentUserRoleLevel="+currentUserRoleLevel);
//        sql2.append(" and currentUserRoleCode ="+currentUserRole);
//        sql2.append(" and currentUserRoleLevel="+currentUserRoleLevel);
        if(!StringUtils.isEmpty(articleTitle)){
            sql2.append(" and articleTitle like'%"+articleTitle+"%'");
        }
@ -132,11 +132,11 @@ public class JMJkEduArticleService extends BaseService {
            sendTimeEnd = elasticsearchUtil.changeTime(sendTimeEnd);
            sql2.append(" and createTime <='"+sendTimeEnd+"'");
        }
        sql2.append(" order by createTime limit " + page + "," + pagesize);
        sql2.append(" order by createTime desc limit " + page + "," + pagesize);
        List<HealthEduArticleES> esList = elasticsearchUtil.excute(sql2.toString(), HealthEduArticleES.class, esIndex, esType);
        Map<String, HealthEduArticlePatientModel> result = new HashMap<>();
        HealthEduArticlePatientModel heapm = null;
        com.alibaba.fastjson.JSONObject article = null;
        JSONObject article = null;
        Doctor doctor = null;
    
        List<HealthEduArticlePatientModel> resultList = new ArrayList<>();
@ -215,11 +215,11 @@ public class JMJkEduArticleService extends BaseService {
                                                              String currentUserRoleLevel,String articleTitle,String sendTimeStart,String sendTimeEnd) throws Exception {
        StringBuffer sql2 = new StringBuffer("select * from   " + esType +
                " where  sendCode='" + sendCode + "' and userType = 2" );
        if(sendType==1){
            sql2.append(" and sendType='"+sendType+"' ");
        }
                " where  doctorCode='" + sendCode + "' and userType = 2" );
//        if(sendType==1){
//
//            sql2.append(" and sendType='"+sendType+"' ");
//        }
        if(!StringUtils.isEmpty(firstLevelCategoryId)){
            sql2.append("and firstLevelCategoryId="+firstLevelCategoryId);
        }
@ -229,8 +229,8 @@ public class JMJkEduArticleService extends BaseService {
        if(myArticle==1){
            sql2.append(" and operatorId="+sendCode);
        }
        sql2.append(" and currentUserRoleCode ="+currentUserRole);
        sql2.append(" and currentUserRoleLevel="+currentUserRoleLevel);
//        sql2.append(" and currentUserRoleCode ="+currentUserRole);
//        sql2.append(" and currentUserRoleLevel="+currentUserRoleLevel);
        if(!StringUtils.isEmpty(articleTitle)){
            sql2.append(" and articleTitle like'%"+articleTitle+"%'");
        }
@ -550,13 +550,16 @@ public class JMJkEduArticleService extends BaseService {
            sendName = returnList.get(0).get("name")+"";
        }
        Map<String,Object> resultMap = labelService.fetchUserHighestAuthority(sendCode);
        List<String> roleList = (List<String>)resultMap.get("roleList");
        List<RoleVo> roleVoLists= new ArrayList<>();
        for(String temp:roleList){
            RoleVo roleVo = new RoleVo();
            roleVo.setCode(temp);
            roleVoLists.add(roleVo);
        if(resultMap.containsKey("roleList") && resultMap.get("roleList") != null){
            List<String> roleList = (List<String>)resultMap.get("roleList");
            for(String temp:roleList){
                RoleVo roleVo = new RoleVo();
                roleVo.setCode(temp);
                roleVoLists.add(roleVo);
            }
        }
        JSONObject article = thirdJkEduArticleService.getArticalById(articleId,"");
        Date createTime = new Date();
        for (String patient : patientSet) {
@ -1182,7 +1185,7 @@ public class JMJkEduArticleService extends BaseService {
        
        List<HealthEduArticleES> esList = elasticsearchUtil.excute(sql, HealthEduArticleES.class, esIndex, esType);
        HealthEduArticlePatientModel heapm = null;
        com.alibaba.fastjson.JSONObject article = null;
        JSONObject article = null;
        List<HealthEduArticlePatientModel> result = new ArrayList<>();
        Doctor doctor = null;
        for (HealthEduArticleES one : esList) {

+ 55 - 55
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/jkedu/controller/EduArticleController.java

@ -66,59 +66,59 @@ public class EduArticleController extends BaseController{
            return  new ResultOneModel(code,ErrorStateMessage.getMessge(code)+","+e.getMessage());
        }
    }
    @RequestMapping(value = "/getArticleListToNewDataBase",method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation("文章列表转移")
    public String getArticleListToNewDataBase(){
        boolean flag = eduArticleService.getArticleListToNewDataBase();
        if (flag){
            return write(200,"数据转移成功!");
        }else{
            return write(0,"数据转移失败!");
        }
    }
    @RequestMapping(value = "/getArticleCollectToNewDataBase",method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation("文章收藏转移")
    public String getArticleCollectToNewDataBase(){
        boolean flag = eduArticleService.getArticleCollectToNewDataBase();
        if (flag){
            return write(200,"数据转移成功!");
        }else{
            return write(0,"数据转移失败!");
        }
    }
    @RequestMapping(value = "/getArticleBehaviorToNewDataBase",method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation("文章行为转移")
    public String getArticleBehaviorToNewDataBase(){
        boolean flag = eduArticleService.getArticleBehaviorToNewDataBase();
        if (flag){
            return write(200,"数据转移成功!");
        }else{
            return write(0,"数据转移失败!");
        }
    }
    @RequestMapping(value = "/getArticleSendToEs",method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation("已发送文章列表转移Es")
    public String getArticleSendToEs(){
        boolean flag = eduArticleService.getArticleSendedListToEs();
        if (flag){
            return write(200,"数据转移成功!");
        }else{
            return write(0,"数据转移失败!");
        }
    }
    @RequestMapping(value = "/save",method = RequestMethod.POST)
    @ResponseBody
    public String save(){
        eduArticleService.save();
        return "";
    }
//
//    @RequestMapping(value = "/getArticleListToNewDataBase",method = RequestMethod.POST)
//    @ResponseBody
//    @ApiOperation("文章列表转移")
//    public String getArticleListToNewDataBase(){
//        boolean flag = eduArticleService.getArticleListToNewDataBase();
//        if (flag){
//            return write(200,"数据转移成功!");
//        }else{
//            return write(0,"数据转移失败!");
//        }
//    }
//
//    @RequestMapping(value = "/getArticleCollectToNewDataBase",method = RequestMethod.POST)
//    @ResponseBody
//    @ApiOperation("文章收藏转移")
//    public String getArticleCollectToNewDataBase(){
//        boolean flag = eduArticleService.getArticleCollectToNewDataBase();
//        if (flag){
//            return write(200,"数据转移成功!");
//        }else{
//            return write(0,"数据转移失败!");
//        }
//    }
//
//    @RequestMapping(value = "/getArticleBehaviorToNewDataBase",method = RequestMethod.POST)
//    @ResponseBody
//    @ApiOperation("文章行为转移")
//    public String getArticleBehaviorToNewDataBase(){
//        boolean flag = eduArticleService.getArticleBehaviorToNewDataBase();
//        if (flag){
//            return write(200,"数据转移成功!");
//        }else{
//            return write(0,"数据转移失败!");
//        }
//    }
//
//    @RequestMapping(value = "/getArticleSendToEs",method = RequestMethod.POST)
//    @ResponseBody
//    @ApiOperation("已发送文章列表转移Es")
//    public String getArticleSendToEs(){
//        boolean flag = eduArticleService.getArticleSendedListToEs();
//        if (flag){
//            return write(200,"数据转移成功!");
//        }else{
//            return write(0,"数据转移失败!");
//        }
//    }
//
//    @RequestMapping(value = "/save",method = RequestMethod.POST)
//    @ResponseBody
//    public String save(){
//        eduArticleService.save();
//        return "";
//    }
}

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

@ -119,7 +119,7 @@ es:
#集美宣教居民端健康文章
jkEdu:
  web:
    articleBaseUrl:
    articleBaseUrl: http://www.xmtyw.cn/
#消息队列
activemq: