Bläddra i källkod

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

yeshijie 7 år sedan
förälder
incheckning
63e322632d

+ 2 - 0
edu-article/JkEdu/src/com/yihu/jk/api/ArticleApi.java

@ -188,6 +188,7 @@ public class ArticleApi {
		JSONObject json = JSONObject.fromObject(im.getParam());
		String articleId = StringUtil.isEmpty(json.get("articleId")) ? null : json.getString("articleId");
		String userId = StringUtil.isEmpty(json.get("userId")) ? null : json.getString("userId");
		Integer userType = StringUtil.isEmpty(json.get("userType")) ? 0 : json.getInt("userType");
		if (StringUtil.isEmpty(articleId)) {
			return ApiUtil.getRespJSON(-10000, "articleId 必传").toString();
@ -237,6 +238,7 @@ public class ArticleApi {
					jsonObj.put("articleCategoryName", StringUtil.getJSONValue(vbo.getArticleCategoryName()));
					if (StringUtil.isNotEmpty(userId)) {
						vo.setUserId(userId);
						vo.setUserType(userType);
						int pointNumberCount = dao.pointNumberCount(vo);
						int collectionNumberCount = dao.collectionNumberCount(vo);
						jsonObj.put("pointNumberCount", pointNumberCount);

+ 2 - 3
edu-article/JkEdu/src/com/yihu/jk/api/BehaviorApi.java

@ -106,7 +106,6 @@ public class BehaviorApi {
//			ArticleStatistic arvo = new ArticleStatistic();
			arvo.setArticleId(articleId);
			subDao.saveBehavior(behavior);
			ArticleApi.updateArticleStatistic(articleId, behaviorAction, number);
			return ApiUtil.getRespJSON(10000, "成功").toString();
		} catch (SQLException e) {
@ -144,11 +143,11 @@ public class BehaviorApi {
		try {
			int count = subDao.deleteArticleCollection(vo);
			if (userType == 2) {
//			if (userType == 2) {
				int behaviorAction = 6;
				int number = -1;
				ArticleApi.updateArticleStatistic(articleId, behaviorAction, number);
			}
//			}
			if (count == 0) {
				return ApiUtil.getRespJSON(-10001, "收藏失败").toString();
			}

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

@ -251,7 +251,10 @@ public class ArticleDao {
		if (StringUtil.isNotEmpty(vo.getUserId())) {
			param.append(" and UserId = '").append(vo.getUserId()).append("'");
		}
		param.append(" and usertype = 2");
		if(vo.getUserType()!=0){
			param.append(" and usertype = ").append(vo.getUserType());
		}
		sql.addVar("@Condition", param.toString());
		List<ArticleStatistic> list = DB.me().queryForBeanList(MyDatabaseEnum.JkEduDB, sql, ArticleStatistic.class);
@ -265,7 +268,7 @@ public class ArticleDao {
		StringBuffer param = new StringBuffer();
		param.append(" and ArticleId = '").append(articleId).append("'");
		sql.addVar("@Condition", param.toString());
		sql.addVar("@behaviorParam", behaviorParam.toString() + "=" + behaviorParam + "+" + number);
		sql.addVar("@behaviorParam", behaviorParam.toString() + "=" + behaviorParam + "+ " + number);
		sql.addVar("@ArticleId", "ArticleId ='" + articleId + "'");
		DB.me().update(MyDatabaseEnum.JkEduDB, sql);
	}
@ -498,6 +501,8 @@ public class ArticleDao {
		if(!StringUtils.isEmpty(vo.getArticleCover())){
			behaviorParam += ",ArticleCover='"+vo.getArticleCover()+"' ";
//			sql.addVar("@behaviorParam"," ArticleCover='"+vo.getArticleCover()+"'");
		}else{
			behaviorParam += ",ArticleCover='' ";
		}
		if(!StringUtils.isEmpty(vo.getUserScope())){
			behaviorParam += ",UserScope="+vo.getUserScope();
@ -599,7 +604,7 @@ public class ArticleDao {
        if(StringUtil.isNotEmpty(userCode)){
			param2.append(" and  a.UserId='"+userCode+"'");
			param.append(" or  ( OperatorId='"+userCode+"' and UserScope=4 and RoleType = '"+vo.getRoleType()+"')");
			param.append(" or  ( OperatorId='"+userCode+"' and UserScope=4 and RoleType = "+vo.getRoleType()+")");
		}
//		pageParam.append(" limit ").append(start * pageSize + "," + pageSize);
		sql.addVar("@Condition", param.toString());
@ -697,7 +702,7 @@ public class ArticleDao {
		if(StringUtil.isNotEmpty(userCode)){
			param2.append(" and  a.UserId='"+userCode+"'");
			param.append(" or  ( OperatorId='"+userCode+"' and UserScope=4 and RoleType = '"+vo.getRoleType()+"')");
			param.append(" or  ( OperatorId='"+userCode+"' and UserScope=4 and RoleType = "+vo.getRoleType()+")");
		}
		pageParam.append(" limit ").append(start * pageSize + "," + pageSize);
		sql.addVar("@Condition", param.toString());

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

@ -143,12 +143,12 @@ public class JMJkEduArticleService extends BaseService {
        
        for (HealthEduArticleES one : esList) {
            article = thirdJkEduArticleService.getArticalById(one.getArticleId(),"");
            if (result.get(one.getArticleId()) != null) {
                heapm = result.get(one.getArticleId());
            } else {
//            if (result.get(one.getArticleId()) != null) {
//                heapm = result.get(one.getArticleId());
//
//            } else {
                heapm = new HealthEduArticlePatientModel();
            }
//            }
            heapm.setSendName(one.getSendName());
            heapm.setSendCode(one.getDoctorCode());
//            SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@ -196,7 +196,7 @@ public class JMJkEduArticleService extends BaseService {
            heapm.setArticleSource(one.getArticleSource());
            // heapm.setTime();//时间  xx小时前  2017-10-11
            resultList.add(heapm);
            result.put(one.getArticleId(), heapm);
//            result.put(one.getArticleId(), heapm);
        }
        return resultList;
    }

+ 2 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/third/jkEduArticle/ThirdJkEduArticleService.java

@ -440,7 +440,7 @@ public class ThirdJkEduArticleService extends BaseService {
            param.put("userScope", userScope);
            param.put("roleType", roleType);
            param.put("isAuthentication", isAuthentication);
            if(isAuthentication==1){
//            if(isAuthentication==1){
                String operatorRoleCodeName = "";//认证机构的名称
                List<DoctorRole> roleList = doctorRoleDao.findUserRole(userCode);
                if(roleList.isEmpty()){
@ -458,7 +458,7 @@ public class ThirdJkEduArticleService extends BaseService {
                }
                param.put("authentication", operatorRoleCodeName);
                param.put("authenticationId", userCode);
            }
//            }
            response = httpClientUtil.httpPost(articleBaseUrl+"/WsPlatform/rest", getParamsMap(saveArticle, param.toString(), "1"));
            json = JSON.parseObject(response);
        } catch (Exception e) {

+ 55 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/data/DataHandlingController.java

@ -3,7 +3,9 @@ package com.yihu.wlyy.web.data;
import com.yihu.wlyy.entity.organization.HospitalDept;
import com.yihu.wlyy.service.app.consult.ConsultTeamService;
import com.yihu.wlyy.service.app.sign.FamilyContractService;
import com.yihu.wlyy.util.HttpUtil;
import com.yihu.wlyy.web.BaseController;
import com.yihu.wlyy.web.third.jkedu.service.EduArticleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.json.JSONArray;
@ -32,6 +34,11 @@ public class DataHandlingController extends BaseController {
    private ConsultTeamService consultTeamService;
    @Autowired
    private DataHandingService dataHandingService;
    @Autowired
    private com.yihu.wlyy.util.HttpUtil HttpUtil;
    @Autowired
    private EduArticleService eduArticleService;
    /**
     * 生成签约表中的行政团队的code
     */
@ -91,4 +98,52 @@ public class DataHandlingController extends BaseController {
            return error(-1, 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,"数据转移失败!");
        }
    }
}

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/jimeiJkEduPC/DoctorJMJkEduArticlePCController.java

@ -117,7 +117,7 @@ public class DoctorJMJkEduArticlePCController extends BaseController {
                                      @ApiParam(name = "sEcho", value = "插件自带")
                                      @RequestParam(value = "sEcho", required = false) Integer sEcho,
                                      @ApiParam(name = "roleType", value = "1、普通医生,2、管理员")
                                      @RequestParam(value = "archive", required = false) Integer roleType,
                                      @RequestParam(value = "roleType", required = false) Integer roleType,
                                      @ApiParam(name = "patient", value = "居民CODE")
                                      @RequestParam(value = "patient", required = false) String patient){
        try {