فهرست منبع

集美宣教代码提交

liuwenbin 7 سال پیش
والد
کامیت
b33b6f66e0
64فایلهای تغییر یافته به همراه2167 افزوده شده و 288 حذف شده
  1. 9 0
      common/common-entity/src/main/java/com/yihu/wlyy/entity/login/LoginLog.java
  2. 7 1
      edu-article/JkEdu/WebRoot/WEB-INF/classes/articlePc.sql.xml
  3. BIN
      edu-article/JkEdu/WebRoot/WEB-INF/classes/com/yihu/jk/api/ArticleApi.class
  4. BIN
      edu-article/JkEdu/WebRoot/WEB-INF/classes/com/yihu/jk/api/ArticleApiTest.class
  5. BIN
      edu-article/JkEdu/WebRoot/WEB-INF/classes/com/yihu/jk/api/CategoryApi.class
  6. BIN
      edu-article/JkEdu/WebRoot/WEB-INF/classes/com/yihu/jk/dao/ArticleDao.class
  7. BIN
      edu-article/JkEdu/WebRoot/WEB-INF/classes/com/yihu/jk/dao/ArticlePcDao.class
  8. BIN
      edu-article/JkEdu/WebRoot/WEB-INF/classes/com/yihu/jk/dao/CategoryDao.class
  9. BIN
      edu-article/JkEdu/WebRoot/WEB-INF/classes/com/yihu/jk/enums/ArticleSqlNameEnum.class
  10. BIN
      edu-article/JkEdu/WebRoot/WEB-INF/classes/com/yihu/jk/enums/MyTableEnum.class
  11. BIN
      edu-article/JkEdu/WebRoot/WEB-INF/classes/com/yihu/jk/vo/Article.class
  12. BIN
      edu-article/JkEdu/WebRoot/WEB-INF/classes/com/yihu/jk/vo/ArticleStatistic.class
  13. 1 1
      edu-article/JkEdu/WebRoot/ssoLogin.html
  14. 6 1
      edu-article/JkEdu/classes/artifacts/JkEdu_war_exploded/WEB-INF/classes/articlePc.sql.xml
  15. BIN
      edu-article/JkEdu/classes/artifacts/JkEdu_war_exploded/WEB-INF/classes/com/yihu/jk/api/ArticleApi.class
  16. BIN
      edu-article/JkEdu/classes/artifacts/JkEdu_war_exploded/WEB-INF/classes/com/yihu/jk/api/ArticleApiTest.class
  17. BIN
      edu-article/JkEdu/classes/artifacts/JkEdu_war_exploded/WEB-INF/classes/com/yihu/jk/api/CategoryApi.class
  18. BIN
      edu-article/JkEdu/classes/artifacts/JkEdu_war_exploded/WEB-INF/classes/com/yihu/jk/dao/ArticleDao.class
  19. BIN
      edu-article/JkEdu/classes/artifacts/JkEdu_war_exploded/WEB-INF/classes/com/yihu/jk/dao/ArticlePcDao.class
  20. BIN
      edu-article/JkEdu/classes/artifacts/JkEdu_war_exploded/WEB-INF/classes/com/yihu/jk/dao/CategoryDao.class
  21. BIN
      edu-article/JkEdu/classes/artifacts/JkEdu_war_exploded/WEB-INF/classes/com/yihu/jk/enums/ArticleSqlNameEnum.class
  22. BIN
      edu-article/JkEdu/classes/artifacts/JkEdu_war_exploded/WEB-INF/classes/com/yihu/jk/enums/MyTableEnum.class
  23. BIN
      edu-article/JkEdu/classes/artifacts/JkEdu_war_exploded/WEB-INF/classes/com/yihu/jk/vo/Article.class
  24. BIN
      edu-article/JkEdu/classes/artifacts/JkEdu_war_exploded/WEB-INF/classes/com/yihu/jk/vo/ArticleStatistic.class
  25. 7 1
      edu-article/JkEdu/src/articlePc.sql.xml
  26. 150 115
      edu-article/JkEdu/src/com/yihu/jk/api/ArticleApi.java
  27. 11 6
      edu-article/JkEdu/src/com/yihu/jk/api/ArticleApiTest.java
  28. 4 2
      edu-article/JkEdu/src/com/yihu/jk/api/CategoryApi.java
  29. 95 4
      edu-article/JkEdu/src/com/yihu/jk/dao/ArticleDao.java
  30. 1 0
      edu-article/JkEdu/src/com/yihu/jk/dao/ArticlePcDao.java
  31. 6 1
      edu-article/JkEdu/src/com/yihu/jk/dao/CategoryDao.java
  32. 1 1
      edu-article/JkEdu/src/com/yihu/jk/enums/ArticleSqlNameEnum.java
  33. 1 0
      edu-article/JkEdu/src/com/yihu/jk/enums/MyTableEnum.java
  34. 37 0
      edu-article/JkEdu/src/com/yihu/jk/vo/Article.java
  35. 27 0
      edu-article/JkEdu/src/com/yihu/jk/vo/ArticleStatistic.java
  36. 41 0
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/common/account/BookingController.java
  37. 11 4
      patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/datastatic/PrescriptionStaticController.java
  38. 5 4
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/device/device_list_js.jsp
  39. 246 0
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_info.jsp
  40. 163 0
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_info_js.jsp
  41. 27 8
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_list_js.jsp
  42. 221 0
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_order.jsp
  43. 163 0
      patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_order_js.jsp
  44. 18 10
      patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/service/app/charge/OnePayService.java
  45. 105 1
      patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/service/app/prenatalInspector/PrenatalInspectorPreCardService.java
  46. 308 0
      patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/service/third/jw/JwMaternalChildService.java
  47. 17 0
      patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/util/DateUtil.java
  48. 1 1
      patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/web/quota/JobController.java
  49. 2 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/label/SignPatientLabelInfoService.java
  50. 108 2
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prenatalInspector/PrenatalInspectorPreCardService.java
  51. 64 8
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statistics/StatisticsService.java
  52. 100 57
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statisticsES/StatisticsESService.java
  53. 24 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/team/AdminTeamService.java
  54. 16 10
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/common/QrcodeService.java
  55. 1 4
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/weixin/wxpay/service/OnePayService.java
  56. 1 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/account/LoginController.java
  57. 105 7
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/jimeiJkEdu/DoctorJMJkEduArticleController.java
  58. 0 4
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/jimeiJkEduPC/DoctorJMJkEduArticlePCController.java
  59. 2 3
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/patient/SignPatientLabelInfoController.java
  60. 1 1
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prenatalInspector/PrenatalController.java
  61. 11 0
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/team/AdminTeamController.java
  62. 37 22
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/jkEduArticle/ThirdJkEduArticleController.java
  63. 1 3
      patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/ylzpay/ThirdQrcodeController.java
  64. 5 4
      patient-co/patient-co-wlyy/src/main/resources/application-dev.yml

+ 9 - 0
common/common-entity/src/main/java/com/yihu/wlyy/entity/login/LoginLog.java

@ -18,6 +18,7 @@ public class LoginLog  extends IdEntity {
    private String userType;//1 患者 2医生
    private Long tokenId;//登录的tokenid
    private String type;//登录成功1 成功 2失败
    private Integer platform;//1患者端,2医生端app,3微信公众号wechat,4 IM医生端pc, PC端取药系统,5医生助手公众号
    private Date createTime;//创建时间
    private String errorMessage;//错误信息
    private String phone;//电话号码
@ -94,4 +95,12 @@ public class LoginLog  extends IdEntity {
    public void setAppVersion(String appVersion) {
        this.appVersion = appVersion;
    }
    public Integer getPlatform() {
        return platform;
    }
    public void setPlatform(Integer platform) {
        this.platform = platform;
    }
}

+ 7 - 1
edu-article/JkEdu/WebRoot/WEB-INF/classes/articlePc.sql.xml

@ -3,7 +3,8 @@
	<Sqls> 
		 <Sql name='getArticlePcList'>
		 <![CDATA[
				select * from Org_Article where 1=1  and  ArticleState =1  @Condition    order by ArticleOrder desc  ,UpdateTime desc   @PageParam
				select m.*,n.BrowseNumber,n.PointNumber,n.CollectionNumber,n.CommentNumber from Org_Article m
				LEFT JOIN User_ArticleStatistics n on m.ArticleId=n.ArticleId where 1=1   and  ArticleState =1  @Condition    order by ArticleOrder desc  ,UpdateTime desc   @PageParam
			]]>
		</Sql>
		<Sql name='getArticlePcListCount'>
@ -34,5 +35,10 @@
				select * from Org_Article where 1=1  and  ArticleState =1  @Condition     
			]]>
		</Sql>
		<Sql name='updateArticle'>
			<![CDATA[
				update  Org_Article  set @behaviorParam where 1=1 @Condition
			]]>
		</Sql>
	</Sqls>
</das-client>

BIN
edu-article/JkEdu/WebRoot/WEB-INF/classes/com/yihu/jk/api/ArticleApi.class


BIN
edu-article/JkEdu/WebRoot/WEB-INF/classes/com/yihu/jk/api/ArticleApiTest.class


BIN
edu-article/JkEdu/WebRoot/WEB-INF/classes/com/yihu/jk/api/CategoryApi.class


BIN
edu-article/JkEdu/WebRoot/WEB-INF/classes/com/yihu/jk/dao/ArticleDao.class


BIN
edu-article/JkEdu/WebRoot/WEB-INF/classes/com/yihu/jk/dao/ArticlePcDao.class


BIN
edu-article/JkEdu/WebRoot/WEB-INF/classes/com/yihu/jk/dao/CategoryDao.class


BIN
edu-article/JkEdu/WebRoot/WEB-INF/classes/com/yihu/jk/enums/ArticleSqlNameEnum.class


BIN
edu-article/JkEdu/WebRoot/WEB-INF/classes/com/yihu/jk/enums/MyTableEnum.class


BIN
edu-article/JkEdu/WebRoot/WEB-INF/classes/com/yihu/jk/vo/Article.class


BIN
edu-article/JkEdu/WebRoot/WEB-INF/classes/com/yihu/jk/vo/ArticleStatistic.class


+ 1 - 1
edu-article/JkEdu/WebRoot/ssoLogin.html

@ -16,7 +16,7 @@
		"id" :4798,
		"hospital":"3502110400",
		"userRole":[{"code":"350200","name":"厦门市卫生与计划生育委员会","areas":"350203"}],
		"currentUserRole":{"code":"350200","name":"厦门市卫生与计划生育委员会","areas":"350203","level":""}
		"currentUserRole":{"code":"350200","name":"厦门市卫生与计划生育委员会","areas":"350203","level":"","isManage":""}
		
	}));
	

+ 6 - 1
edu-article/JkEdu/classes/artifacts/JkEdu_war_exploded/WEB-INF/classes/articlePc.sql.xml

@ -3,7 +3,7 @@
	<Sqls> 
		 <Sql name='getArticlePcList'>
		 <![CDATA[
				select * from Org_Article where 1=1  and  ArticleState =1  @Condition    order by ArticleOrder desc  ,UpdateTime desc   @PageParam
				select * from Org_Article  where 1=1  and  ArticleState =1  @Condition    order by ArticleOrder desc  ,UpdateTime desc   @PageParam
			]]>
		</Sql>
		<Sql name='getArticlePcListCount'>
@ -34,5 +34,10 @@
				select * from Org_Article where 1=1  and  ArticleState =1  @Condition     
			]]>
		</Sql>
		<Sql name='updateArticle'>
			<![CDATA[
				update  Org_Article  set @behaviorParam where 1=1 @Condition
			]]>
		</Sql>
	</Sqls>
</das-client>

BIN
edu-article/JkEdu/classes/artifacts/JkEdu_war_exploded/WEB-INF/classes/com/yihu/jk/api/ArticleApi.class


BIN
edu-article/JkEdu/classes/artifacts/JkEdu_war_exploded/WEB-INF/classes/com/yihu/jk/api/ArticleApiTest.class


BIN
edu-article/JkEdu/classes/artifacts/JkEdu_war_exploded/WEB-INF/classes/com/yihu/jk/api/CategoryApi.class


BIN
edu-article/JkEdu/classes/artifacts/JkEdu_war_exploded/WEB-INF/classes/com/yihu/jk/dao/ArticleDao.class


BIN
edu-article/JkEdu/classes/artifacts/JkEdu_war_exploded/WEB-INF/classes/com/yihu/jk/dao/ArticlePcDao.class


BIN
edu-article/JkEdu/classes/artifacts/JkEdu_war_exploded/WEB-INF/classes/com/yihu/jk/dao/CategoryDao.class


BIN
edu-article/JkEdu/classes/artifacts/JkEdu_war_exploded/WEB-INF/classes/com/yihu/jk/enums/ArticleSqlNameEnum.class


BIN
edu-article/JkEdu/classes/artifacts/JkEdu_war_exploded/WEB-INF/classes/com/yihu/jk/enums/MyTableEnum.class


BIN
edu-article/JkEdu/classes/artifacts/JkEdu_war_exploded/WEB-INF/classes/com/yihu/jk/vo/Article.class


BIN
edu-article/JkEdu/classes/artifacts/JkEdu_war_exploded/WEB-INF/classes/com/yihu/jk/vo/ArticleStatistic.class


+ 7 - 1
edu-article/JkEdu/src/articlePc.sql.xml

@ -3,7 +3,8 @@
	<Sqls> 
		 <Sql name='getArticlePcList'>
		 <![CDATA[
				select * from Org_Article where 1=1  and  ArticleState =1  @Condition    order by ArticleOrder desc  ,UpdateTime desc   @PageParam
				select m.*,n.BrowseNumber,n.PointNumber,n.CollectionNumber,n.CommentNumber from Org_Article m
				LEFT JOIN User_ArticleStatistics n on m.ArticleId=n.ArticleId where 1=1   and  ArticleState =1  @Condition    order by ArticleOrder desc  ,UpdateTime desc   @PageParam
			]]>
		</Sql>
		<Sql name='getArticlePcListCount'>
@ -34,5 +35,10 @@
				select * from Org_Article where 1=1  and  ArticleState =1  @Condition     
			]]>
		</Sql>
		<Sql name='updateArticle'>
			<![CDATA[
				update  Org_Article  set @behaviorParam where 1=1 @Condition
			]]>
		</Sql>
	</Sqls>
</das-client>

+ 150 - 115
edu-article/JkEdu/src/com/yihu/jk/api/ArticleApi.java

@ -11,6 +11,7 @@ import com.yihu.jk.vo.OrgArticleVo;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger;
import com.common.json.JSONException;
@ -232,7 +233,7 @@ public class ArticleApi {
					jsonObj.put("deptName", StringUtil.getJSONValue(vbo.getDeptName()));
					jsonObj.put("titleLevel", StringUtil.getJSONValue(vbo.getTitleLevel()));
					jsonObj.put("operatorImg", StringUtil.getJSONValue(vbo.getOperatorImg()));
					jsonObj.put("userScope", StringUtil.getJSONValue(vbo.getUserScope()));
					if (StringUtil.isNotEmpty(userId)) {
						vo.setUserId(userId);
						int pointNumberCount = dao.pointNumberCount(vo);
@ -481,7 +482,7 @@ public class ArticleApi {
	/************************************************* new ************************************************************/
	/**
	 * 添加文章
	 * 添加、编辑文章
	 * @param im
	 * @return
	 * @throws JSONException
@ -490,76 +491,73 @@ public class ArticleApi {
		JSONObject json = JSONObject.fromObject(im.getParam());
		String articleId = StringUtil.isEmpty(json.get("articleId")) ? null : json.getString("articleId");
		String userCode = StringUtil.isEmpty(json.get("userCode")) ? null : json.getString("userCode");
		if (StringUtil.isEmpty(userCode)) {
			return ApiUtil.getRespJSON(-10000, "userCode 必传").toString();
		String firstLevelCategoryId = StringUtil.isEmpty(json.get("firstLevelCategoryId")) ? null : json.getString("firstLevelCategoryId");//一级分类id
		String firstLevelCategoryName = StringUtil.isEmpty(json.get("firstLevelCategoryName")) ? null : json.getString("firstLevelCategoryName");// 一级分类名称
		String secondLevelCategoryId = StringUtil.isEmpty(json.get("secondLevelCategoryId")) ? null : json.getString("secondLevelCategoryId");//二级分类id
		String secondLevelCategoryName = StringUtil.isEmpty(json.get("secondLevelCategoryName")) ? null : json.getString("secondLevelCategoryName");// 二级分类名称
		String content = StringUtil.isEmpty(json.get("content")) ? null : json.getString("content");//内容
		String articleTitle = StringUtil.isEmpty(json.get("articleTitle")) ? null : json.getString("articleTitle");//标题
		Integer articlelevel = StringUtil.isEmpty(json.get("articlelevel")) ? null : json.getInt("articlelevel");//文章级别
		Integer userScope = StringUtil.isEmpty(json.get("userScope")) ? null : json.getInt("userScope");//使用范围(1、全市使用,2、全区使用,3、全社区使用)
		String newUrl = StringUtil.isEmpty(json.get("newUrl")) ? null : json.getString("newUrl");//封面图片地址
		}
		String	orgName = StringUtil.isEmpty(json.get("orgName")) ? null : json.getString("orgName");//组织名称
		String	deptName = StringUtil.isEmpty(json.get("deptName")) ? null : json.getString("deptName");//科室名称
		String	levelName = StringUtil.isEmpty(json.get("levelName")) ? null : json.getString("levelName");//职称
		String	photo = StringUtil.isEmpty(json.get("photo")) ? null : json.getString("photo");//头像
		String	orgId = StringUtil.isEmpty(json.get("orgId")) ? null : json.getString("orgId");//组织
		String	userName = StringUtil.isEmpty(json.get("userName")) ? null : json.getString("userName");//登录名称
		String	articleTitle = StringUtil.isEmpty(json.get("articleTitle")) ? null : json.getString("articleTitle");//标题
		String	articleType = StringUtil.isEmpty(json.get("articleType")) ? null : json.getString("articleType");//类型
		Integer	articlelevel = StringUtil.isEmpty(json.get("articlelevel")) ? null : json.getInt("articlelevel");//文章级别
		String	secondLevelCategoryId = StringUtil.isEmpty(json.get("secondLevelCategoryId")) ? null : json.getString("secondLevelCategoryId");//二级分类id
		String	secondLevelCategoryName = StringUtil.isEmpty(json.get("secondLevelCategoryName")) ? null : json.getString("secondLevelCategoryName");// 二级分类名称
		String	firstLevelCategoryId = StringUtil.isEmpty(json.get("firstLevelCategoryId")) ? null : json.getString("firstLevelCategoryId");//一级分类id
		String	firstLevelCategoryName = StringUtil.isEmpty(json.get("firstLevelCategoryName")) ? null : json.getString("firstLevelCategoryName");// 一级分类名称
		String	content = StringUtil.isEmpty(json.get("content")) ? null : json.getString("content");//内容
		String	newUrl = StringUtil.isEmpty(json.get("newUrl")) ? null : json.getString("newUrl");//封面图片地址
		String	operatorRoleCode = StringUtil.isEmpty(json.get("operatorRoleCode")) ? null : json.getString("operatorRoleCode");//操作人角色code
		String	opertorRoleLevel = StringUtil.isEmpty(json.get("opertorRoleLevel")) ? null : json.getString("opertorRoleLevel");//操作人角色级别
		Integer	userScope = StringUtil.isEmpty(json.get("userScope")) ? null : json.getInt("userScope");//使用范围(1、全市使用,2、全区使用,3、全社区使用)
		Integer	isAuthentication = StringUtil.isEmpty(json.get("isAuthentication")) ? null : json.getInt("isAuthentication");//是否认证
		String	authentication = StringUtil.isEmpty(json.get("authentication")) ? null : json.getString("authentication");//认证单位
		String	authenticationId = StringUtil.isEmpty(json.get("authenticationId")) ? null : json.getString("authenticationId");//认证单位ID
		Timestamp nowTime = DateOper.getNowDateTime();//插入和更新时间一样
		OrgArticleVo orgArticleVo = new OrgArticleVo();
		orgArticleVo.setArticleId(articleId);
		com.common.json.JSONObject jsonObject = articlePcDao.queryArticlePcId(orgArticleVo);
//		json = JSONObject.parseObject(str);
//		if(){
//
//		}
		articleId=StringUtil.createUUID();
		orgArticleVo.setArticleId(articleId);
		orgArticleVo.setArticleOrder(99);
		orgArticleVo.setArticleType(articleType);
		orgArticleVo.setArticleTitle(articleTitle);
		orgArticleVo.setArticleContent(content);
		orgArticleVo.setInsertTime(nowTime);
		orgArticleVo.setUpdateTime(nowTime);
		orgArticleVo.setArticleState(1);
		orgArticleVo.setArticlelevel(articlelevel);
		orgArticleVo.setSecondLevelCategoryId(secondLevelCategoryId);
		orgArticleVo.setUserScope(userScope);
		orgArticleVo.setFirstLevelCategoryId(firstLevelCategoryId);
		orgArticleVo.setFirstLevelCategoryName(firstLevelCategoryName);
		orgArticleVo.setSecondLevelCategoryId(secondLevelCategoryId);
		orgArticleVo.setSecondLevelCategoryName(secondLevelCategoryName);
		orgArticleVo.setArticleCover(newUrl);
		orgArticleVo.setDeptName(deptName);
		orgArticleVo.setTitleLevel(levelName);
		orgArticleVo.setOperatorImg(photo);
		orgArticleVo.setOrgId(orgId);
		orgArticleVo.setOperatorName(userName);
		orgArticleVo.setOperatorId(userCode);
		orgArticleVo.setLastOperatorId(userCode);
		orgArticleVo.setLastOperatorName(userName);
		orgArticleVo.setOperatorRoleCode(operatorRoleCode);
		orgArticleVo.setOperatorRoleLevel(opertorRoleLevel);
		orgArticleVo.setUserScope(userScope);
		orgArticleVo.setIsAuthentication(isAuthentication);
		orgArticleVo.setAuthentication(authentication);
		orgArticleVo.setAuthenticationId(authenticationId);
		if ("".equals(orgName)&&orgName==null){
			orgName = "无";
		Timestamp nowTime = DateOper.getNowDateTime();//插入和更新时间一样
		orgArticleVo.setUpdateTime(nowTime);
		if(StringUtil.isEmpty(articleId)) {
			String userCode = StringUtil.isEmpty(json.get("userCode")) ? null : json.getString("userCode");
			String orgName = StringUtil.isEmpty(json.get("orgName")) ? null : json.getString("orgName");//组织名称
			String deptName = StringUtil.isEmpty(json.get("deptName")) ? null : json.getString("deptName");//科室名称
			String levelName = StringUtil.isEmpty(json.get("levelName")) ? null : json.getString("levelName");//职称
			String photo = StringUtil.isEmpty(json.get("photo")) ? null : json.getString("photo");//头像
			String orgId = StringUtil.isEmpty(json.get("orgId")) ? null : json.getString("orgId");//组织
			String userName = StringUtil.isEmpty(json.get("userName")) ? null : json.getString("userName");//登录名称
			String articleType = StringUtil.isEmpty(json.get("articleType")) ? null : json.getString("articleType");//类型
			String operatorRoleCode = StringUtil.isEmpty(json.get("operatorRoleCode")) ? null : json.getString("operatorRoleCode");//操作人角色code
			String opertorRoleLevel = StringUtil.isEmpty(json.get("opertorRoleLevel")) ? null : json.getString("opertorRoleLevel");//操作人角色级别
			Integer isAuthentication = StringUtil.isEmpty(json.get("isAuthentication")) ? null : json.getInt("isAuthentication");//是否认证
			String authentication = StringUtil.isEmpty(json.get("authentication")) ? null : json.getString("authentication");//认证单位
			String authenticationId = StringUtil.isEmpty(json.get("authenticationId")) ? null : json.getString("authenticationId");//认证单位ID
			orgArticleVo.setArticleId(articleId);
			articleId = StringUtil.createUUID();
			orgArticleVo.setArticleId(articleId);
			orgArticleVo.setArticleOrder(99);
			orgArticleVo.setArticleType(articleType);
			orgArticleVo.setInsertTime(nowTime);
			orgArticleVo.setArticleState(1);
			orgArticleVo.setDeptName(deptName);
			orgArticleVo.setTitleLevel(levelName);
			orgArticleVo.setOperatorImg(photo);
			orgArticleVo.setOrgId(orgId);
			orgArticleVo.setOperatorName(userName);
			orgArticleVo.setOperatorId(userCode);
			orgArticleVo.setLastOperatorId(userCode);
			orgArticleVo.setLastOperatorName(userName);
			orgArticleVo.setOperatorRoleCode(operatorRoleCode);
			orgArticleVo.setOperatorRoleLevel(opertorRoleLevel);
			orgArticleVo.setIsAuthentication(isAuthentication);
			orgArticleVo.setAuthentication(authentication);
			orgArticleVo.setAuthenticationId(authenticationId);
			if ("".equals(orgName) && orgName == null) {
				orgName = "无";
			}
			orgArticleVo.setOrgName(orgName);
			orgArticleVo.setArticleSource(orgName);
			return dao.saveArticle(orgArticleVo).toString();
		}else{
			orgArticleVo.setArticleId(articleId);
			return dao.updateArticle(orgArticleVo).toString();
		}
		orgArticleVo.setOrgName(orgName);
		orgArticleVo.setArticleSource(orgName);
		orgArticleVo.setFirstLevelCategoryName(firstLevelCategoryName);
		orgArticleVo.setSecondLevelCategoryName(secondLevelCategoryName);
		return dao.saveArticle(orgArticleVo).toString();
	}
	/************************************************ PC *************************************************************/
@ -576,16 +574,14 @@ public class ArticleApi {
		Integer  isAuthentication = StringUtil.isEmpty(json.get("isAuthentication")) ? null : json.getInt("isAuthentication");//是否有权限
		String  currentUserRole = StringUtil.isEmpty(json.get("currentUserRole")) ? null : json.getString("currentUserRole");//当前登录的角色
		String  currentUserRoleLevel = StringUtil.isEmpty(json.get("currentUserRoleLevel")) ? null : json.getString("currentUserRoleLevel");//当前登录的角色级别
		Integer	page = 0;
		Integer	pageSize = 0;
		if(!StringUtil.isEmpty(json.get("page"))){
			page = json.getInt("page");
		}else{
		Integer	page = StringUtil.isEmpty(json.get("page")) ? null : json.getInt("page");
		Integer	pageSize = StringUtil.isEmpty(json.get("pageSize")) ? null : json.getInt("pageSize");
		Integer	sEcho = StringUtil.isEmpty(json.get("sEcho")) ? 0 : json.getInt("sEcho");
		if(page==null){
			return ApiUtil.getRespJSON(-10000, "page 必传").toString();
		}
		if(!StringUtil.isEmpty(json.get("pageSize"))){
			pageSize = json.getInt("pageSize");
		}else{
		if(pageSize==null){
			return ApiUtil.getRespJSON(-10000, "pageSize 必传").toString();
		}
@ -603,17 +599,22 @@ public class ArticleApi {
		JSONArray array = new JSONArray();
		try {
			JSONObject rv = ApiUtil.getRespJSON(10000, "成功");
			List<Article> list = dao.queryArticlePcList(vo, page, pageSize);
			array.addAll(list);
			Integer count = dao.queryArticlePcListCount(vo);
			rv.put("Result", array);
			rv.put("Count", count);
			com.common.json.JSONObject result = dao.queryArticlePcList(vo, page, pageSize);
//			array.addAll(list);
//			int count = dao.queryArticlePcListCount(vo);
//			rv.put("Result", array);
//			rv.put("Count", count);
			rv.put("aaData",  result.get("result").toString());
			rv.put("iTotalDisplayRecords", result.get("totalProperty"));
			rv.put("iTotalRecords", result.get("totalProperty"));
			rv.put("sEcho", sEcho);
//			System.out.printf("article:"+rv.toString());
			return rv.toString();
		}catch (SQLException e) {
			e.printStackTrace();
			return ApiUtil.getRespJSON(-14444, "获取数据异常:" + e.getMessage()).toString();
		}
		return array.toString();
	}
	/**
@ -622,44 +623,44 @@ public class ArticleApi {
	 * @return
	 * @throws Exception
	 */
	public String editArticle(InterfaceMessage im) throws Exception {
		JSONObject json = JSONObject.fromObject(im.getParam());
		String	articleid = StringUtil.isEmpty(json.get("articleid")) ? null : json.getString("articleid");//文章id
		String	articleTitle = StringUtil.isEmpty(json.get("articleTitle")) ? null : json.getString("articleTitle");//文章id
		String	articleType = StringUtil.isEmpty(json.get("articleType")) ? null : json.getString("articleType");//文章id
		String	remark = StringUtil.isEmpty(json.get("remark")) ? null : json.getString("remark");//文章id
		Integer	articleState = StringUtil.isEmpty(json.get("articleState")) ? null : json.getInt("articleState");//文章id
		Integer	articlelevel = StringUtil.isEmpty(json.get("articlelevel")) ? null : json.getInt("articlelevel");//文章id
		String	firstLevelCategoryId = StringUtil.isEmpty(json.get("firstLevelCategoryId")) ? null : json.getString("firstLevelCategoryId");//文章id
		String	secondLevelCategoryId = StringUtil.isEmpty(json.get("secondLevelCategoryId")) ? null : json.getString("secondLevelCategoryId");//文章id
		String	newUrl = StringUtil.isEmpty(json.get("newUrl")) ? null : json.getString("newUrl");//文章id
		String	userName = StringUtil.isEmpty(json.get("userName")) ? null : json.getString("userName");//文章id
		String	userid = StringUtil.isEmpty(json.get("userid")) ? null : json.getString("userid");//文章id
		String	firstLevelCategoryName = StringUtil.isEmpty(json.get("firstLevelCategoryName")) ? null : json.getString("firstLevelCategoryName");//文章id
		String	secondLevelCategoryName = StringUtil.isEmpty(json.get("secondLevelCategoryName")) ? null : json.getString("secondLevelCategoryName");//文章id
		Timestamp nowTime = DateOper.getNowDateTime();
		OrgArticleVo orgArticleVo = new OrgArticleVo();
		orgArticleVo.setArticleId(articleid);
		orgArticleVo.setArticleType(articleType);
		orgArticleVo.setArticleTitle(articleTitle);
		orgArticleVo.setArticleContent(remark);
		orgArticleVo.setUpdateTime(nowTime);
		orgArticleVo.setArticleState(articleState);
		orgArticleVo.setArticlelevel(articlelevel);
		orgArticleVo.setSecondLevelCategoryId(secondLevelCategoryId);
		orgArticleVo.setFirstLevelCategoryId(firstLevelCategoryId);
		orgArticleVo.setArticleCover(newUrl);
		orgArticleVo.setOperatorName(userName);
		orgArticleVo.setOperatorId(userid);
		orgArticleVo.setFirstLevelCategoryName(firstLevelCategoryName);
		orgArticleVo.setSecondLevelCategoryName(secondLevelCategoryName);
		orgArticleVo.setLastOperatorId(userid);
		orgArticleVo.setLastOperatorName(userName);
		return null;
	}
//	public String editArticle(InterfaceMessage im) throws Exception {
//
//		JSONObject json = JSONObject.fromObject(im.getParam());
//		String	articleid = StringUtil.isEmpty(json.get("articleid")) ? null : json.getString("articleid");//文章id
//		String	articleTitle = StringUtil.isEmpty(json.get("articleTitle")) ? null : json.getString("articleTitle");//文章id
//
//		String	articleType = StringUtil.isEmpty(json.get("articleType")) ? null : json.getString("articleType");//文章id
//		String	remark = StringUtil.isEmpty(json.get("remark")) ? null : json.getString("remark");//文章id
//		Integer	articleState = StringUtil.isEmpty(json.get("articleState")) ? null : json.getInt("articleState");//文章id
//		Integer	articlelevel = StringUtil.isEmpty(json.get("articlelevel")) ? null : json.getInt("articlelevel");//文章id
//		String	firstLevelCategoryId = StringUtil.isEmpty(json.get("firstLevelCategoryId")) ? null : json.getString("firstLevelCategoryId");//文章id
//		String	secondLevelCategoryId = StringUtil.isEmpty(json.get("secondLevelCategoryId")) ? null : json.getString("secondLevelCategoryId");//文章id
//		String	newUrl = StringUtil.isEmpty(json.get("newUrl")) ? null : json.getString("newUrl");//文章id
//		String	userName = StringUtil.isEmpty(json.get("userName")) ? null : json.getString("userName");//文章id
//		String	userid = StringUtil.isEmpty(json.get("userid")) ? null : json.getString("userid");//文章id
//		String	firstLevelCategoryName = StringUtil.isEmpty(json.get("firstLevelCategoryName")) ? null : json.getString("firstLevelCategoryName");//文章id
//		String	secondLevelCategoryName = StringUtil.isEmpty(json.get("secondLevelCategoryName")) ? null : json.getString("secondLevelCategoryName");//文章id
//
//		Timestamp nowTime = DateOper.getNowDateTime();
//		OrgArticleVo orgArticleVo = new OrgArticleVo();
//		orgArticleVo.setArticleId(articleid);
//		orgArticleVo.setArticleType(articleType);
//		orgArticleVo.setArticleTitle(articleTitle);
//		orgArticleVo.setArticleContent(remark);
//		orgArticleVo.setUpdateTime(nowTime);
//		orgArticleVo.setArticleState(articleState);
//		orgArticleVo.setArticlelevel(articlelevel);
//		orgArticleVo.setSecondLevelCategoryId(secondLevelCategoryId);
//		orgArticleVo.setFirstLevelCategoryId(firstLevelCategoryId);
//		orgArticleVo.setArticleCover(newUrl);
//		orgArticleVo.setOperatorName(userName);
//		orgArticleVo.setOperatorId(userid);
//		orgArticleVo.setFirstLevelCategoryName(firstLevelCategoryName);
//		orgArticleVo.setSecondLevelCategoryName(secondLevelCategoryName);
//		orgArticleVo.setLastOperatorId(userid);
//		orgArticleVo.setLastOperatorName(userName);
//		return null;
//	}
	/**
@ -694,4 +695,38 @@ public class ArticleApi {
		net.sf.json.JSONObject jsonObject = articlePcDao.editArticle(orgArticleVo);
		return jsonObject.toString();
	}
	/**
	 * 删除文章
	 * @param im
	 * @return
	 * @throws Exception
	 */
	public String removeArticle(InterfaceMessage im) throws Exception {
		JSONObject json = JSONObject.fromObject(im.getParam());
		String	ids = StringUtil.isEmpty(json.get("ids")) ? null : json.getString("ids");//文章id
		if(!StringUtils.isNotEmpty(ids)){
			return ApiUtil.getRespJSON(-14444, "ids必传").toString();
		}
		Timestamp nowTime = DateOper.getNowDateTime();
		String[] idsArr = ids.split(",");
		Integer code = null;
		for (int i = 0; i < idsArr.length; i++) {
			try {
				// 参数赋值
				OrgArticleVo orgArticleVo = new OrgArticleVo();
				orgArticleVo.setArticleId(idsArr[i]);
				orgArticleVo.setArticleState(0);
				orgArticleVo.setUpdateTime(nowTime);
				// 修改
				articlePcDao.removeArticle(orgArticleVo);
			} catch (Exception e) {
				e.printStackTrace();
				return ApiUtil.getRespJSON(-14444, "获取数据异常:" + e.getMessage()).toString();
			}
		}
		return ApiUtil.getRespJSON(10000, "删除成功").toString();
	}
}

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

@ -34,6 +34,7 @@ public class ArticleApiTest {
		// System.out.println(api.getArticalById(im));
		queryArticlePcList();
//		System.out.printf("350200".substring(0,3));
	}
	public static void initDB() {
@ -56,23 +57,27 @@ public class ArticleApiTest {
		JSONObject obj = new JSONObject();
//		obj.put("page","1");
//		obj.put("pageSize","2");
//		obj.put("firstLevelCategoryId","37");
		obj.put("firstLevelCategoryId","43");
//		obj.put("secondLevelCategoryId","32");
//		obj.put("insertTimeStart","1");
//		obj.put("insertTimeEnd","1");
//		obj.put("articlelevel","1");
//		obj.put("articleTitle","1");
//		obj.put("userCode","wjw00000001000e6badcfa163e424525");
		obj.put("userCode","0de7295862dd11e69faffa163e8aee56");
//		obj.put("isManage",true);
//		obj.put("currentUserRole","350200");
//		obj.put("currentUserRoleLevel","1");
		obj.put("articleid","1");
		obj.put("isAuthentication","0");
		obj.put("currentUserRole","350200");
		obj.put("currentUserRoleLevel","1");
		obj.put("page","0");
		obj.put("pageSize","9");
//		obj.put("articleId","1");
//		obj.put("articleTitle","我口试");
		im.setParam(obj.toString());
		initDB();
		try{
			api.authenticationArticle(im);
//			System.out.println(api.queryArticlePcList(im));
//			api.authenticationArticle(im);
			System.out.println(api.queryArticlePcList(im));
		}catch(Exception e){
			e.printStackTrace();
		}

+ 4 - 2
edu-article/JkEdu/src/com/yihu/jk/api/CategoryApi.java

@ -26,10 +26,12 @@ public class CategoryApi {
		JSONObject json = JSONObject.fromObject(im.getParam());
		Integer categoryLevel = StringUtil.isEmpty(json.get("categoryLevel")) ? null : json.getInt("categoryLevel");
//		String userId = StringUtil.isEmpty(json.get("userId")) ? null : json.getString("userId");
		String firstlevelId = StringUtil.isEmpty(json.get("firstlevelId")) ? null : json.getString("firstlevelId");
		String secondLevelId = StringUtil.isEmpty(json.get("secondLevelId")) ? null : json.getString("secondLevelId");
		Category vo = new Category();
		vo.setCategoryLevel(categoryLevel);
		vo.setFirstlevelId(firstlevelId);
		vo.setSecondLevelId(secondLevelId);
		try {
			com.common.json.JSONObject result = dao.getCategoryList( vo, 0, 1000);
			JSONObject rv = ApiUtil.getRespJSON(10000, "成功");

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

@ -3,22 +3,27 @@ package com.yihu.jk.dao;
import java.sql.SQLException;
import java.util.List;
import com.common.json.JSONException;
import com.common.json.JSONObject;
import com.coreframework.db.DB;
import com.coreframework.db.Sql;
import com.coreframework.util.AppConfig;
import com.yihu.jk.enums.ArticleSqlNameEnum;
import com.yihu.jk.enums.CategorySqlNameEnum;
import com.yihu.jk.enums.MyDatabaseEnum;
import com.yihu.jk.enums.MyTableEnum;
import com.yihu.jk.utils.StringUtil;
import com.yihu.jk.utils.Utils;
import com.yihu.jk.vo.Article;
import com.yihu.jk.vo.ArticleStatistic;
import com.yihu.jk.vo.Category;
import com.yihu.jk.vo.OrgArticleVo;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
@Component
public class ArticleDao {
	private CategoryDao dao = new CategoryDao();
	public List<ArticleStatistic> getArticleList(ArticleStatistic vo, int start, int pageSize) throws SQLException {
		Sql sql = DB.me().createSql(ArticleSqlNameEnum.getArticleList);
		StringBuffer param = new StringBuffer();
@ -455,6 +460,60 @@ public class ArticleDao {
		}
	}
	/**
	 * 添加文章
	 * @param vo
	 * @return
	 */
	public JSONObject updateArticle(OrgArticleVo vo) {
		Sql sql = DB.me().createSql(ArticleSqlNameEnum.updateArticle);
		StringBuffer param = new StringBuffer();
		param.append(" and ArticleId  ='").append(vo.getArticleId()).append("'");
		sql.addVar("@Condition", param.toString());
//		if (vo.getCategoryState() == 2) {
//			sql.addVar("@behaviorParam",
//					"CategoryState=" + vo.getCategoryState() + ",UpdateTime='" + vo.getUpdateTime() + "'");
//		}
//		if (!StringUtil.isEmpty(vo.getCategoryName())) {
//			sql.addVar("@behaviorParam",
//					"CategoryName='" + vo.getCategoryName() + "',UpdateTime='" + vo.getUpdateTime() + "'");
//		}
		if(!StringUtils.isEmpty(vo.getFirstLevelCategoryId())){
			sql.addVar("@behaviorParam"," FirstLevelCategoryId='"+vo.getFirstLevelCategoryId()+"',FirstLevelCategoryName='"+vo.getFirstLevelCategoryName()+"'");
		}
		if(!StringUtils.isEmpty(vo.getSecondLevelCategoryId())){
			sql.addVar("@behaviorParam"," SecondLevelCategoryId='"+vo.getSecondLevelCategoryId()+"',SecondLevelCategoryName='"+vo.getSecondLevelCategoryName()+"'");
		}//
		if(!StringUtils.isEmpty(vo.getArticlelevel())){
			sql.addVar("@behaviorParam"," Articlelevel='"+vo.getArticlelevel()+"'");
		}
		if(!StringUtils.isEmpty(vo.getArticleTitle())){
			sql.addVar("@behaviorParam"," ArticleTitle='"+vo.getArticleTitle()+"'");
		}
		if(!StringUtils.isEmpty(vo.getArticleCover())){
			sql.addVar("@behaviorParam"," ArticleCover='"+vo.getArticleCover()+"'");
		}
		if(!StringUtils.isEmpty(vo.getUserScope())){
			sql.addVar("@behaviorParam"," ArticleCover="+vo.getUserScope()+"");
		}
		if(!StringUtils.isEmpty(vo.getArticleContent())){
			sql.addVar("@behaviorParam"," ArticleCover='"+vo.getArticleContent()+"'");
		}
		try {
			// System.out.println(sql);
			DB.me().insert(MyDatabaseEnum.JkEduDB, sql);
			JSONObject json = new JSONObject();
			json.put("Code", 10000);
			json.put("Message", "更新成功");
			return json;
		} catch (JSONException | SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return new JSONObject(StringUtil.jsonResult(-1, Utils.getException(e)));
		}
	}
	/**
	 * PC端获取文章列表
	 * @param vo
@ -463,7 +522,7 @@ public class ArticleDao {
	 * @return
	 * @throws Exception
	 */
	public List<Article> queryArticlePcList(OrgArticleVo vo, int start, int pageSize) throws Exception {
	public JSONObject queryArticlePcList(OrgArticleVo vo, int start, int pageSize) throws Exception {
		Sql sql = DB.me().createSql(ArticleSqlNameEnum.getArticlePcList);
		StringBuffer param = new StringBuffer();
@ -499,11 +558,42 @@ public class ArticleDao {
		if (StringUtil.isNotEmpty(vo.getArticleTitle())) {
			param.append(" and ArticleTitle like '%"+vo.getArticleTitle()+"%' ");
		}
		pageParam.append(" limit ").append(start * pageSize + "," + pageSize);
		if (StringUtil.isNotEmpty(vo.getOperatorId())) {
			param.append(" and OperatorId ='"+vo.getOperatorId()+"' ");
		}
		if("1".equals(vo.getOperatorRoleLevel())){//省
			param.append(" and OperatorRoleCode like '"+vo.getOperatorRoleCode().substring(0,3)+"%' ");
		}else if("2".equals(vo.getOperatorRoleLevel())){//市
			param.append(" and OperatorRoleCode like '"+vo.getOperatorRoleCode().substring(0,4)+"%' ");
		}else if("3".equals(vo.getOperatorRoleLevel())){//区
			param.append(" and OperatorRoleCode like '"+vo.getOperatorRoleCode().substring(0,6)+"%' ");
		}else if("4".equals(vo.getOperatorRoleLevel())){//社区、机构
			param.append(" and OperatorRoleCode = '"+vo.getOperatorRoleCode()+"' ");
		}
		param.append(" and UserScope >= ? ");
		sql.addParamValue(vo.getOperatorRoleLevel());
//		pageParam.append(" limit ").append(start * pageSize + "," + pageSize);
		sql.addVar("@Condition", param.toString());
		sql.addVar("@PageParam", pageParam.toString());
		List<Article> list = DB.me().queryForBeanList(MyDatabaseEnum.JkEduDB, sql,Article.class);
		return list;
//		List<Article> list = DB.me().queryForBeanList(MyDatabaseEnum.JkEduDB, sql,Article.class);
//		Category temp = null;
//		for(Article one:list){
//
//			temp = new Category();
//			temp.setCategoryLevel(1);
//			temp.setFirstlevelId(one.getFirstLevelCategoryId());
//			temp.setSecondLevelId(null);
//			com.common.json.JSONObject result = dao.getCategoryList( temp, 0, 1000);
//			one.setFirstLevelCategoryName(result.get("CategoryName")+"");
//			temp = new Category();
//			temp.setCategoryLevel(2);
//			temp.setFirstlevelId(null);
//			temp.setSecondLevelId(one.getSecondLevelCategoryId());
//			result = dao.getCategoryList( temp, 0, 1000);
//			one.setSecondLevelCategoryName(result.get("CategoryName")+"");
//		}
		return DB.me().queryForJson(MyDatabaseEnum.JkEduDB, sql, start, pageSize);
	}
	/**
@ -552,4 +642,5 @@ public class ArticleDao {
		Integer size = DB.me().queryForInteger(MyDatabaseEnum.JkEduDB, sql);
		return size;
	}
}

+ 1 - 0
edu-article/JkEdu/src/com/yihu/jk/dao/ArticlePcDao.java

@ -91,6 +91,7 @@ public class ArticlePcDao {
			sql.addParamValue(vo.getArticlelevel());
		}
		sql.addVar("@Condition", sb.toString());
		sql.addVar("@PageParam", "");
		return DB.me().queryForJson(MyDatabaseEnum.JkEduDB, sql, start, pageSize);

+ 6 - 1
edu-article/JkEdu/src/com/yihu/jk/dao/CategoryDao.java

@ -34,7 +34,12 @@ public class CategoryDao {
		if (StringUtil.isNotEmpty(vo.getCategoryLevel())) {
			param.append(" and CategoryLevel =").append(vo.getCategoryLevel());
		}
		if (StringUtil.isNotEmpty(vo.getFirstlevelId())) {
			param.append(" and FirstLevelId =").append(vo.getFirstlevelId());
		}
		if (StringUtil.isNotEmpty(vo.getSecondLevelId())) {
			param.append(" and SecondLevelId =").append(vo.getSecondLevelId());
		}
//		if (StringUtil.isNotEmpty(userId)) {
//			paramUserId.append(" and userId ='").append(userId).append("'");
//		}

+ 1 - 1
edu-article/JkEdu/src/com/yihu/jk/enums/ArticleSqlNameEnum.java

@ -7,5 +7,5 @@ public enum ArticleSqlNameEnum implements SqlNameEnum {
	getArticleList, getArticlePcList, queryCategory, getCollectionArticleList, loadAllConfigDictionary, getArticlePc, querySwitchState, pointNumberCount, collectionNumberCount, updateArticleStatistic, updateCollectionStatistic, updateCommentStatistic, insertArticleStatistic, deleteArticleStatistic, queryArticleStatistic, insertArticleInitStatistic
	, getArticlePcId, getDoctorArticleList, getDoctorArticleListCount, getDoctorArticalByUserIdCount, getDoctorArticalByUserId,getArticlePcListCount
	, getArticleQRDetail
	, getArticleQRDetail,updateArticle
}

+ 1 - 0
edu-article/JkEdu/src/com/yihu/jk/enums/MyTableEnum.java

@ -8,4 +8,5 @@ public enum MyTableEnum implements TableEnum {
	Config_ArticleQRCode,
	Config_MenuRole,
	Operation_Log,
	updateArticle
}

+ 37 - 0
edu-article/JkEdu/src/com/yihu/jk/vo/Article.java

@ -28,6 +28,11 @@ public class Article {
	private String EndTime;
	private String ArticleType;// 文章类型
	private Integer IsAuthentication;// 是否认证
	private String FirstLevelCategoryName;// 文章一类别名称
	private String FirstLevelCategoryId;// 文章一级类别id
	private String SecondLevelCategoryName;// 文章二级类别   名称
	private String SecondLevelCategoryId;// 文章二类别  ID
	private String DeptName;// 操作人所在科室
	private String TitleLevel;// 等级职称
@ -259,4 +264,36 @@ public class Article {
	public void setUserScope(Integer userScope) {
		UserScope = userScope;
	}
	public String getFirstLevelCategoryName() {
		return FirstLevelCategoryName;
	}
	public void setFirstLevelCategoryName(String firstLevelCategoryName) {
		FirstLevelCategoryName = firstLevelCategoryName;
	}
	public String getFirstLevelCategoryId() {
		return FirstLevelCategoryId;
	}
	public void setFirstLevelCategoryId(String firstLevelCategoryId) {
		FirstLevelCategoryId = firstLevelCategoryId;
	}
	public String getSecondLevelCategoryName() {
		return SecondLevelCategoryName;
	}
	public void setSecondLevelCategoryName(String secondLevelCategoryName) {
		SecondLevelCategoryName = secondLevelCategoryName;
	}
	public String getSecondLevelCategoryId() {
		return SecondLevelCategoryId;
	}
	public void setSecondLevelCategoryId(String secondLevelCategoryId) {
		SecondLevelCategoryId = secondLevelCategoryId;
	}
}

+ 27 - 0
edu-article/JkEdu/src/com/yihu/jk/vo/ArticleStatistic.java

@ -41,6 +41,10 @@ public class ArticleStatistic {
	private String TitleLevel;// 等级职称
	private String OperatorImg;// 操作人头像
	private String OperatorRoleCode;//操作人角色code
	private String OperatorRoleLevel;//操作人角色级别
	private Integer UserScope;//使用范围(1、全市使用,2、全区使用,3、全社区使用)
	public String getDeptName() {
		return DeptName;
	}
@ -313,4 +317,27 @@ public class ArticleStatistic {
		this.shareNumber = shareNumber;
	}
	public String getOperatorRoleCode() {
		return OperatorRoleCode;
	}
	public void setOperatorRoleCode(String operatorRoleCode) {
		OperatorRoleCode = operatorRoleCode;
	}
	public String getOperatorRoleLevel() {
		return OperatorRoleLevel;
	}
	public void setOperatorRoleLevel(String operatorRoleLevel) {
		OperatorRoleLevel = operatorRoleLevel;
	}
	public Integer getUserScope() {
		return UserScope;
	}
	public void setUserScope(Integer userScope) {
		UserScope = userScope;
	}
}

+ 41 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/common/account/BookingController.java

@ -484,4 +484,45 @@ public class BookingController extends WeixinBaseController {
        }
    }
    @RequestMapping(value = "GetDoctorArrange", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation("获取医生排班接口(包含排班详细)")
    public String GetDoctorArrange(@ApiParam(name = "hospitalId", value = "医院ID", defaultValue = "350211G1102")
                                   @RequestParam(value = "hospitalId", required = true) String hospitalId,
                                   @ApiParam(name = "hosDeptId", value = "科室ID", defaultValue = "3020001")
                                   @RequestParam(value = "hosDeptId", required = true) String hosDeptId,
                                   @ApiParam(name = "doctorId", value = "医生ID", defaultValue = "AA2")
                                   @RequestParam(value = "doctorId", required = true) String doctorId) {
        try {
            String list = jwSmjkService.GetDoctorArrange(hospitalId,hosDeptId,doctorId);
            return list;
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
        }
    }
    /**
     * 获取转诊预约医生列表
     * @param hospitalId
     * @param hosDeptId
     * @return
     */
    @RequestMapping(value = "RegDeptSpeDoctorList",method = RequestMethod.POST)
    @ApiOperation("获取转诊预约医生列表")
    @ResponseBody
    public String getRegDeptSpeDoctorList(
            @ApiParam(name="hospitalId",value="医院编码",defaultValue = "350211A1001") @RequestParam(name="hospitalId",required = true) String hospitalId,
            @ApiParam(name="hosDeptId",value="科室编码",defaultValue = "1040610") @RequestParam(name="hosDeptId",required = true) String hosDeptId){
        try {
            //7天排班的医生列表
            String list = jwSmjkService.GetDoctorList(hospitalId,hosDeptId);
            return list;
        } catch (Exception ex) {
            ex.printStackTrace();
            return error(-1,"获取转诊预约医生列表列表失败");
        }
    }
}

+ 11 - 4
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/controller/manager/datastatic/PrescriptionStaticController.java

@ -7,10 +7,7 @@ import jxl.Workbook;
import jxl.write.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
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.ResponseBody;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@ -35,6 +32,16 @@ public class PrescriptionStaticController extends BaseController {
		return "prescription/prescription_list";
	}
	
	@RequestMapping(value = "infoInit/{code}",method = RequestMethod.GET)
	public String infoInit(@PathVariable(value = "code") String code){
		return "prescription/prescription_info";
	}
	
	@RequestMapping(value = "orderInit/{code}",method = RequestMethod.GET)
	public String orderInit(@PathVariable(value = "code") String code){
		return "prescription/prescription_order";
	}
	
	@RequestMapping(value = "list")
	@ResponseBody
	public String searchPatientList(

+ 5 - 4
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/device/device_list_js.jsp

@ -68,19 +68,20 @@
                        //设备编号
                        var deviceCode = $("<input type='hidden' name='deviceCode' />")
                        deviceName.attr('value',$("#inp_device_code").val());
                        deviceCode.attr('value',$("#inp_device_code").val());
                        //社区名称
                        var orgName = $("<input type='hidden' name='orgName' />")
                        deviceName.attr('value',$("#inp_org_name").val());
                        orgName.attr('value',$("#inp_org_name").val());
                        //联系人
                        var orgName = $("<input type='hidden' name='linkman' />")
                        deviceName.attr('value',$("#inp_linkman").val());
                        var linkman = $("<input type='hidden' name='linkman' />")
                        linkman.attr('value',$("#inp_linkman").val());
                        myform.append(deviceName);
                        myform.append(deviceCode);
                        myform.append(orgName);
                        myform.append(linkman);
                        myform.appendTo('body').submit(); //must add this line for higher html spec
                    })
				}

+ 246 - 0
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_info.jsp

@ -0,0 +1,246 @@
<%@ page contentType="text/html; charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <%@ include file="../head/page_head.jsp"%>
    <title>续方详情</title>
</head>
<style>
    .m-form-group label.label_title {
        width: 100px
    }
    .fd-label{
        font-size: 12px;
        font-weight: bold!important;
    }
    .fd-input{
        width: 150px;
        border: none;
        font-size: 12px;
        height: 30px;
        margin-bottom: 5px;
    }
    .fd-padl{
        margin-left: 24px;
    }
    .fd-autoh{
        height: auto;
    }
    .fd-pd{
        padding: 35px 35px 10px 35px;
    }
    .fd-group{
        display: -webkit-box;
        display: -moz-box;
        display: -ms-flexbox;
        display: flex;
    }
    .fd-img img{
        width: 100px;
        height: 100px;
        margin-right: 20px;
    }
    .fd-img img:last-child{
        margin-right: 0px;
    }
    .fd-file{
        font-size: 12px;
        font-weight: bold;
        padding-left: 35px;
        padding-right: 10px;
        display: -webkit-box;
        -webkit-box-align: center;
        display: -moz-box;
        -moz-box-align: center;
        display: -ms-flexbox;
        -ms-flex-align: center;
        display: flex;
        align-items: center;
    }
    .no-img{
        display: -webkit-box;
        -webkit-box-align: center;
        display: -moz-box;
        -moz-box-align: center;
        display: -ms-flexbox;
        -ms-flex-align: center;
        display: flex;
        align-items: center;
    }
    .fd-bttn{
        width: 100px;
        height: 35px;
        display: block;
        margin:40px auto 0px;
        background-color: #b9c8d2;
        color: #fff;
        line-height: 35px;
        text-align: center;
    }
    .ad-padd{
        height: 280px;
        width: 100%;
        padding: 10px;
        border: solid 1px #dcdcdc;
        border-radius: 2px;
        font-size: 12px;
    }
    .ad-padd::-webkit-input-placeholder{
        color:#ccc;
    }
    .ad-padd::-moz-placeholder{
        color:#ccc;
    }
    .ad-padd:-moz-placeholder{
        color:#ccc;
    }
    .ad-padd:-ms-input-placeholder{
        color:#ccc;
    }
    .ad-result{
        margin: 20px 35px 0px 35px;
        border-top: solid 1px #ccc;
        padding-top:10px ;
    }
    .ad-label{
        text-align: left!important;
        padding-left: 0px!important;
        font-weight: bold!important;
    }
    .ad-pd{
        padding-top: 35px;
    }
</style>
<body>
<div id="div_roles_info_form" class="m-form-inline f-mt20" data-role-form>
    <div id="detail">
        <div style="margin-left:10px;">
            <label class="label_title fd-label">原处方记录</label>
        </div>
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">开方时间:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
            <label class="label_title fd-label">开方医生:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="min-length-6 validate-special-char" />
            </div>
        </div>
        <div class="m-form-group" style="">
            <label class="label_title fd-label">科室/医生</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="ajax min-length-2 validate-special-char"  />
            </div>
        </div>
        <div style="margin-left:10px;">
            <label class="label_title fd-label">居民信息</label>
        </div>
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">续方居民:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
            <label class="label_title fd-label">医保卡号:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="min-length-6 validate-special-char" />
            </div>
        </div>
        <div class="m-form-group" style="">
            <label class="label_title fd-label">身份证号</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="ajax min-length-2 validate-special-char"  />
            </div>
        </div>
        <div style="margin-left:10px;">
            <label class="label_title fd-label">临床诊断</label>
        </div>
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">续方居民:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
        </div>
        <div style="margin-left:10px;">
            <label class="label_title fd-label">RP.</label>
        </div>
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">药品名称1 </label>
            <label class="label_title fd-label"> 用法:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
            <label class="label_title fd-label">总量:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
            <label class="label_title fd-label">规格:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
        </div>
        <div style="margin-left:10px;">
            <label class="label_title fd-label">续方信息</label>
        </div>
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">续方状态:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
            <label class="label_title fd-label">续方说明:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
        </div>
        <div style="margin-left:10px;">
            <label class="label_title fd-label">审核记录</label>
        </div>
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">申请时间:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
            <label class="label_title fd-label">审核医生:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="min-length-6 validate-special-char" />
            </div>
        </div>
        <div style="margin-left:10px;">
            <label class="label_title fd-label">审核机构:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="ajax min-length-2 validate-special-char"  />
            </div>
            <label class="label_title fd-label">审核医生:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="ajax min-length-2 validate-special-char"  />
            </div>
        </div>
        <div style="margin-left:10px;">
            <label class="label_title fd-label">结果:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="ajax min-length-2 validate-special-char"  />
            </div>
        </div>
    </div>
</div>
</body>
<%@ include file="../head/page_foot.jsp" %>
<%@ include file="prescription_info_js.jsp" %>
</html>

+ 163 - 0
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_info_js.jsp

@ -0,0 +1,163 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<script>
    (function ($, win) {
        $(function () {
            /* ************************** 变量定义 ******************************** */
            var Util = $.Util;
            var rolesInfo = null;
            // 表单校验工具类
            var jValidation = $.jValidation;
            var dialog = frameElement.dialog;
            /* *************************** 函数定义 ******************************* */
            function pageInit() {
                rolesInfo.init();
                $('#image').on('click','img',function(){
                    var imgSrc = $(this).attr('src');
                    var html = '<img src="'+imgSrc+'" alt="."/>';
                    var imgView =  $('#fd-img-view', parent.document);
                    imgView.find('.fd-img-show').html(html);
                    imgView.show();
                })
            }
            /* *************************** 模块初始化 ***************************** */
            rolesInfo = {
                dealDialog:null,
                $type: $("#type"),//申诉类型
                $name: $("#name"),//姓名
                $identity:$("#identity"),//身份
                $phone:$("#phone"),//联系方式
                $createTime:$("#createTime"),//时间
                $idcard:$("#idcard"),//身份证
                $description:$("#description"),//申诉详情
                $result:$("#result1"),//处理结果
                $btndeal: $("#deal"),//处理按钮
                $btnclose: $("#close"),//关闭按钮
                $image:$("#image"),
                init: function () {
                    _this = this;
                    var id = $("#id").val();
                    //id不为空,初始化数据
                    if (isNoEmpty(id)) {
                        $.ajax({
                            url: ctx + "/admin/appeal/getAppealById",
                            method: "post",
                            dataType: "json",
                            data: {id: id},
                            success: function (result) {
                                if (result.status == '200') {
                                    var data = result.data;
                                    if(data.type==1){
                                        _this.$type.val("手机号变更");
                                    }else if(data.type==2){
                                        _this.$type.val("重置密码");
                                    }else{
                                        _this.$type.val("其他");
                                    }
                                    _this.$name.val(data.name);
                                    if(data.identity==1){
                                        _this.$identity.val("患者")
                                    }else{
                                        _this.$identity.val("医生")
                                    }
                                    _this.$phone.val(data.phone);
                                    _this.$idcard.val(data.idcard);
                                    _this.$createTime.val(data.createTime);
                                    _this.$description.val(data.description);
                                    if (isNoEmpty(data.result)) {
                                        _this.$result.val(data.result);
                                        $("#dealResult").show();
                                        $("#deal").hide();
                                    }
                                    if(data.images){
                                        var arr = data.images.split(',');
                                        var html="";
                                        for(var i=0;i<arr.length;i++){
                                            html += '<img src="'+data.imgUrlDomain+arr[i]+'" alt="."/>';
                                        }
                                        _this.$image.html(html);
                                    }else{
                                        var html='<span class="no-img">没有上传图片</span>';
                                        _this.$image.html(html);
                                    }
                                }else{
                                    $.Notice.error(result.msg);
                                }
                            },
                        })
                    }
                    this.bindEvents();
                },
                bindEvents: function () {
                    $("#deal").click(function () {
                        $("#dealDiv").show();
                        dialog.set('title', '处理结果');
                        $("#detail").hide();
                    });
                    $("#close").click(function () {
                        parent.window.closeParentInfoDialog();
                    });
                    $("#sure").click(function () {
                        $("#sure").css("pointer-events", "none");
                        var result = $("#result").val();
                        var id = $("#id").val();
                        if (isNoEmpty(result)) {
                            if(result.length>400){
                                $.Notice.error("最多只能填写400个字");
                                $("#sure").css("pointer-events", "");
                            }else {
                                $.ajax({
                                    url: ctx + "/admin/appeal/dealAppeal",
                                    method: "post",
                                    dataType: "json",
                                    data: {id: id,
                                        result:result
                                    },
                                    success: function (result) {
                                        if (result.status == '200') {
                                            //todo  操作成功后的处理
                                            alert("操作成功");
                                            parent.window.closeParentInfoDialog();
                                        }else{
                                            $.Notice.error(result.msg);
                                            $("#sure").css("pointer-events", "");
                                        }
                                    },
                                })
                            }
                        }else{
                            //todo
                            $.Notice.error("请输入处理结果");
                            $("#sure").css("pointer-events", "");
                        }
                    });
                    $("#cancle").click(function () {
                        $("#dealDiv").hide();
                        dialog.set('title', '查看');
                        $("#detail").show();
                    });
                }
            };
            /* ************************* Dialog页面回调接口 ************************** */
            win.reloadRolesInfoGrid = function (msg) {
                if (isNoEmpty(msg)) {
                    $.Notice.success(msg);
                }
                rolesInfo.reloadGrid(msg);
            };
            win.closeInfoDialog = function () {
                rolesInfo.dealDialog.close();
            };
            win.closeParentDealDialog = function () {
                rolesInfo.dealDialog.close();
                rolesInfo.reloadGrid();
            };
            /* *************************** 页面初始化 **************************** */
            pageInit();
        })
    })(jQuery, window);
</script>

+ 27 - 8
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_list_js.jsp

@ -26,11 +26,8 @@
            retrieve = {
                $element: $('.m-retrieve-area'),
                patientInfoDialog: null,
                remindInfoDialog:null,
                $noReply: $('#noReply'),
                $count: $('#count'),
                $rate: $('#rate'),
                prescriptionInfoDialog: null,
                prescriptionOrderDialog: null,
                grid: null,
                url: {
                    //接口链接
@ -128,7 +125,7 @@
                            {text: '支付成功/待配药', statusId: '50'},
                            {text: '配药成功/待配送', statusId: '60'},
                            {text: '配送中', statusId: '65'},
                            {text: '药品已配送', statusId: '69'},
                            {text: '药品到服务站', statusId: '69'},
                            {text: '配送到患者手中/已完成', statusId: '100'},
                            {text: '线下退费', statusId: '-4'},
                            {text: '支付超时', statusId: '-3'},
@ -223,10 +220,11 @@
                            {display: '配送方式', name: 'pay', align: "center"},
                            {display: '时间', name: 'create_time', width: '12%', align: "center"},
                            {
                                display: '操作', name: 'operator', width: '15%', align: "center", isSort: false,
                                display: '操作', name: 'operator', width: '20%', align: "center", isSort: false,
                                render: function (row) {
                                    var html = '';
                                    html += '<a  href="javascript:void(0)" onclick="javascript:' + Util.format("$.publish('{0}',['{1}'])", "patient:info:view", row.id) + '">查看</a>';
                                    html += '<a  href="javascript:void(0)" onclick="javascript:' + Util.format("$.publish('{0}',['{1}'])", "prescription:info:view", row.prescription_code) + '">续方详情</a>';
                                    html += '<a  style="margin-left:10px;" href="javascript:void(0)" onclick="javascript:' + Util.format("$.publish('{0}',['{1}'])", "prescription:order:view", row.prescription_code) + '">订单跟踪</a>';
                                    return html;
                                }
                            }
@ -303,6 +301,27 @@
                },
                bindEvents: function () {
                    var me = this;
                    $.subscribe('prescription:info:view', function (event, code) {
                        var title = '续方详情';
                        me.prescriptionInfoDialog = $.ligerDialog.open({
                            height: 600,
                            width: 900,
                            title: title,
                            url: ctx + '/admin/static/prescription/infoInit/' + code
                        })
                    });
                    $.subscribe('prescription:order:view', function (event, code) {
                        var title = '订单跟踪';
                        me.prescriptionOrderDialog = $.ligerDialog.open({
                            height: 600,
                            width: 900,
                            title: title,
                            url: ctx + '/admin/static/prescription/orderInit/' + code
                        })
                    });
                    //城市下拉
                    me.$inpDeviceName.on( 'change', function () {
                        me.setCityFun(me);

+ 221 - 0
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_order.jsp

@ -0,0 +1,221 @@
<%@ page contentType="text/html; charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <%@ include file="../head/page_head.jsp"%>
    <title>订单跟踪</title>
</head>
<style>
    .m-form-group label.label_title {
        width: 100px
    }
    .fd-label{
        font-size: 12px;
        font-weight: bold!important;
    }
    .fd-input{
        width: 150px;
        border: none;
        font-size: 12px;
        height: 30px;
        margin-bottom: 5px;
    }
    .fd-padl{
        margin-left: 24px;
    }
    .fd-autoh{
        height: auto;
    }
    .fd-pd{
        padding: 35px 35px 10px 35px;
    }
    .fd-group{
        display: -webkit-box;
        display: -moz-box;
        display: -ms-flexbox;
        display: flex;
    }
    .fd-img img{
        width: 100px;
        height: 100px;
        margin-right: 20px;
    }
    .fd-img img:last-child{
        margin-right: 0px;
    }
    .fd-file{
        font-size: 12px;
        font-weight: bold;
        padding-left: 35px;
        padding-right: 10px;
        display: -webkit-box;
        -webkit-box-align: center;
        display: -moz-box;
        -moz-box-align: center;
        display: -ms-flexbox;
        -ms-flex-align: center;
        display: flex;
        align-items: center;
    }
    .no-img{
        display: -webkit-box;
        -webkit-box-align: center;
        display: -moz-box;
        -moz-box-align: center;
        display: -ms-flexbox;
        -ms-flex-align: center;
        display: flex;
        align-items: center;
    }
    .fd-bttn{
        width: 100px;
        height: 35px;
        display: block;
        margin:40px auto 0px;
        background-color: #b9c8d2;
        color: #fff;
        line-height: 35px;
        text-align: center;
    }
    .ad-padd{
        height: 280px;
        width: 100%;
        padding: 10px;
        border: solid 1px #dcdcdc;
        border-radius: 2px;
        font-size: 12px;
    }
    .ad-padd::-webkit-input-placeholder{
        color:#ccc;
    }
    .ad-padd::-moz-placeholder{
        color:#ccc;
    }
    .ad-padd:-moz-placeholder{
        color:#ccc;
    }
    .ad-padd:-ms-input-placeholder{
        color:#ccc;
    }
    .ad-result{
        margin: 20px 35px 0px 35px;
        border-top: solid 1px #ccc;
        padding-top:10px ;
    }
    .ad-label{
        text-align: left!important;
        padding-left: 0px!important;
        font-weight: bold!important;
    }
    .ad-pd{
        padding-top: 35px;
    }
</style>
<body>
<div class="m-form-inline f-mt20" data-role-form>
    <div id="detail">
        <div style="margin-left:10px;">
            <label class="label_title fd-label">续方记录</label>
        </div>
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">申请时间:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
            <label class="label_title fd-label">审核医生:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="min-length-6 validate-special-char" />
            </div>
        </div>
        <div style="margin-left:10px;">
            <label class="label_title fd-label">收药信息</label>
        </div>
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">配送方式:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
            <label class="label_title fd-label">配送地点:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="min-length-6 validate-special-char" />
            </div>
        </div>
        <div class="m-form-group" style="">
            <label class="label_title fd-label">居民姓名</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="ajax min-length-2 validate-special-char"  />
            </div>
            <label class="label_title fd-label">居民电话</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="ajax min-length-2 validate-special-char"  />
            </div>
        </div>
        <div class="m-form-group" style="">
            <label class="label_title fd-label">配送员</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="ajax min-length-2 validate-special-char"  />
            </div>
            <label class="label_title fd-label">服务站地址</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text"  class="ajax min-length-2 validate-special-char"  />
            </div>
        </div>
        <div style="margin-left:10px;">
            <label class="label_title fd-label">订单记录</label>
        </div>
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">订单状态:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
            <label class="label_title fd-label">订单号:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
        </div>
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">订单跟踪:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
            <label class="label_title fd-label">出药机构:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
        </div>
        <div style="margin-left:10px;">
            <label class="label_title fd-label">药品信息.</label>
        </div>
        <div class="m-form-group" style="border-top: solid 1px #ccc;">
            <label class="label_title fd-label">药品名称1 </label>
            <label class="label_title fd-label"> 用法:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
            <label class="label_title fd-label">总量:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
            <label class="label_title fd-label">规格:</label>
            <div class="l-text-wrapper m-form-control">
                <input class="fd-input" type="text" class="useTitle min-length-6 validate-special-char"  />
            </div>
        </div>
    </div>
</div>
</body>
<%@ include file="../head/page_foot.jsp" %>
<%@ include file="prescription_order_js.jsp" %>
</html>

+ 163 - 0
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/prescription/prescription_order_js.jsp

@ -0,0 +1,163 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<script>
    (function ($, win) {
        $(function () {
            /* ************************** 变量定义 ******************************** */
            var Util = $.Util;
            var rolesInfo = null;
            // 表单校验工具类
            var jValidation = $.jValidation;
            var dialog = frameElement.dialog;
            /* *************************** 函数定义 ******************************* */
            function pageInit() {
                rolesInfo.init();
                $('#image').on('click','img',function(){
                    var imgSrc = $(this).attr('src');
                    var html = '<img src="'+imgSrc+'" alt="."/>';
                    var imgView =  $('#fd-img-view', parent.document);
                    imgView.find('.fd-img-show').html(html);
                    imgView.show();
                })
            }
            /* *************************** 模块初始化 ***************************** */
            rolesInfo = {
                dealDialog:null,
                $type: $("#type"),//申诉类型
                $name: $("#name"),//姓名
                $identity:$("#identity"),//身份
                $phone:$("#phone"),//联系方式
                $createTime:$("#createTime"),//时间
                $idcard:$("#idcard"),//身份证
                $description:$("#description"),//申诉详情
                $result:$("#result1"),//处理结果
                $btndeal: $("#deal"),//处理按钮
                $btnclose: $("#close"),//关闭按钮
                $image:$("#image"),
                init: function () {
                    _this = this;
                    var id = $("#id").val();
                    //id不为空,初始化数据
                    if (isNoEmpty(id)) {
                        $.ajax({
                            url: ctx + "/admin/appeal/getAppealById",
                            method: "post",
                            dataType: "json",
                            data: {id: id},
                            success: function (result) {
                                if (result.status == '200') {
                                    var data = result.data;
                                    if(data.type==1){
                                        _this.$type.val("手机号变更");
                                    }else if(data.type==2){
                                        _this.$type.val("重置密码");
                                    }else{
                                        _this.$type.val("其他");
                                    }
                                    _this.$name.val(data.name);
                                    if(data.identity==1){
                                        _this.$identity.val("患者")
                                    }else{
                                        _this.$identity.val("医生")
                                    }
                                    _this.$phone.val(data.phone);
                                    _this.$idcard.val(data.idcard);
                                    _this.$createTime.val(data.createTime);
                                    _this.$description.val(data.description);
                                    if (isNoEmpty(data.result)) {
                                        _this.$result.val(data.result);
                                        $("#dealResult").show();
                                        $("#deal").hide();
                                    }
                                    if(data.images){
                                        var arr = data.images.split(',');
                                        var html="";
                                        for(var i=0;i<arr.length;i++){
                                            html += '<img src="'+data.imgUrlDomain+arr[i]+'" alt="."/>';
                                        }
                                        _this.$image.html(html);
                                    }else{
                                        var html='<span class="no-img">没有上传图片</span>';
                                        _this.$image.html(html);
                                    }
                                }else{
                                    $.Notice.error(result.msg);
                                }
                            },
                        })
                    }
                    this.bindEvents();
                },
                bindEvents: function () {
                    $("#deal").click(function () {
                        $("#dealDiv").show();
                        dialog.set('title', '处理结果');
                        $("#detail").hide();
                    });
                    $("#close").click(function () {
                        parent.window.closeParentInfoDialog();
                    });
                    $("#sure").click(function () {
                        $("#sure").css("pointer-events", "none");
                        var result = $("#result").val();
                        var id = $("#id").val();
                        if (isNoEmpty(result)) {
                            if(result.length>400){
                                $.Notice.error("最多只能填写400个字");
                                $("#sure").css("pointer-events", "");
                            }else {
                                $.ajax({
                                    url: ctx + "/admin/appeal/dealAppeal",
                                    method: "post",
                                    dataType: "json",
                                    data: {id: id,
                                        result:result
                                    },
                                    success: function (result) {
                                        if (result.status == '200') {
                                            //todo  操作成功后的处理
                                            alert("操作成功");
                                            parent.window.closeParentInfoDialog();
                                        }else{
                                            $.Notice.error(result.msg);
                                            $("#sure").css("pointer-events", "");
                                        }
                                    },
                                })
                            }
                        }else{
                            //todo
                            $.Notice.error("请输入处理结果");
                            $("#sure").css("pointer-events", "");
                        }
                    });
                    $("#cancle").click(function () {
                        $("#dealDiv").hide();
                        dialog.set('title', '查看');
                        $("#detail").show();
                    });
                }
            };
            /* ************************* Dialog页面回调接口 ************************** */
            win.reloadRolesInfoGrid = function (msg) {
                if (isNoEmpty(msg)) {
                    $.Notice.success(msg);
                }
                rolesInfo.reloadGrid(msg);
            };
            win.closeInfoDialog = function () {
                rolesInfo.dealDialog.close();
            };
            win.closeParentDealDialog = function () {
                rolesInfo.dealDialog.close();
                rolesInfo.reloadGrid();
            };
            /* *************************** 页面初始化 **************************** */
            pageInit();
        })
    })(jQuery, window);
</script>

+ 18 - 10
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/service/app/charge/OnePayService.java

@ -486,25 +486,33 @@ public class OnePayService {
                    for (BindCard card : result) {
                        if ("98".equals(card.getAttachRelation())) {
                            String idcard = card.getAttachIdNo();
                            String bindCardNo= card.getAttachCardNo();
                            Patient patient = patientDao.findByIdcard(idcard);
                            userCode = patient.getCode();
                            patient.setSicardStatus(1);
                            patient.setSicardTime(new Date());
                            patient.setPrincipalCode(userCode);
                            patientDao.save(patient);
                            LOGGER.info("myself ==========>  userCode " + userCode);
                            String ssc = patient.getSsc();
                            if (bindCardNo.equals(ssc)){
                                patient.setSicardStatus(1);
                                patient.setSicardTime(new Date());
                                patient.setPrincipalCode(userCode);
                                patientDao.save(patient);
                                LOGGER.info("myself ==========>  userCode " + userCode);
                            }
                        }
                    }
                    //获取家人绑卡情况
                    for (BindCard familyCard : result) {
                        if (!"98".equals(familyCard.getAttachRelation())) {
                            String idcard = familyCard.getAttachIdNo();
                            String bindCardNo = familyCard.getAttachCardNo();
                            Patient patient = patientDao.findByIdcard(idcard);
                            patient.setSicardStatus(1);
                            patient.setSicardTime(new Date());
                            patient.setPrincipalCode(userCode);
                            patientDao.save(patient);
                            LOGGER.info("family ==========>  userCode "+userCode +" ========== >> "+patient.getOpenid());
                            String ssc = patient.getSsc();
                            if (bindCardNo.equals(ssc)){
                                patient.setSicardStatus(1);
                                patient.setSicardTime(new Date());
                                patient.setPrincipalCode(userCode);
                                patientDao.save(patient);
                                LOGGER.info("family ==========>  userCode "+userCode +" ========== >> "+patient.getOpenid());
                            }
                        }
                    }
                }

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

@ -1,5 +1,7 @@
package com.yihu.wlyy.service.app.prenatalInspector;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.message.Message;
import com.yihu.wlyy.entity.patient.Patient;
@ -14,6 +16,7 @@ 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;
import com.yihu.wlyy.wechat.util.WeiXinAccessTokenUtils;
@ -50,6 +53,8 @@ public class PrenatalInspectorPreCardService extends BaseService {
    private SignFamilyDao signFamilyDao;
    @Autowired
    private DoctorDao doctorDao;
    @Autowired
    private JwMaternalChildService jwMaternalChildService;
    /**
@ -120,7 +125,7 @@ public class PrenatalInspectorPreCardService extends BaseService {
    /**
     * 向医生发出产检系统消息
     */
    public void sendMessagePrenatal() throws Exception {
    public void sendMessagePrenatalBak() throws Exception {
        try {
            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
            List<PrenatalInspectorPlan> planList = prenatalInspectorPlanDao.findByTime();
@ -148,6 +153,46 @@ public class PrenatalInspectorPreCardService extends BaseService {
    }
    /**
     * 向医生发出产检系统消息
     */
    public void sendMessagePrenatal() throws Exception {
        try {
            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
            List<PrenatalInspectorPlan> planList = prenatalInspectorPlanDao.findByTime();
            for (PrenatalInspectorPlan plan : planList) {
                String code = plan.getPatient();
                String pregnancyNo = plan.getInspectionCode();
                Date planTime = plan.getInspectionTime();
                Patient patient = patientDao.findByCode(code);
                Date begin = DateUtil.getPreDays(planTime,-14);
                Date end = DateUtil.getPreDays(planTime,14);
                Long days = DateUtil.getDays(new Date(), planTime);
                String content = "您的签约居民" + patient.getName() + "超期未进行孕检,原计划孕检时间" + format.format(plan.getInspectionTime());
                if (StringUtils.isNotEmpty(pregnancyNo) && (pregnancyNo != null)) {
                    Boolean examStatus = getExamStatus(code, pregnancyNo, begin, end);
                    if (!examStatus) {
                        if (days > 7) {
                            SignFamily signFamily = signFamilyDao.findByPatient(code);
                            String doctor = signFamily.getDoctor();
                            String doctorHealth = signFamily.getDoctorHealth();
                            if (StringUtils.isNotEmpty(doctor)) {
                                saveMessageRecord(plan.getId().toString(), doctor, code, content);
                            }
                            if (StringUtils.isNotEmpty(doctorHealth)) {
                                saveMessageRecord(plan.getId().toString(), doctorHealth, code, content);
                            }
                        }
                    }
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    /**
     * 保存系统消息及发送记录
     *
@ -209,4 +254,63 @@ public class PrenatalInspectorPreCardService extends BaseService {
        }
    }
    /**
     * 查询待产检计划产检时间在该时间段内是否有过真实产检
     * @param patient 居民code
     * @param pregnancyNo 产检号
     * @param begin  起始时间
     * @param end  截止时间
     * @return
     * @throws Exception
     */
    public Boolean getExamStatus(String patient,String pregnancyNo,Date begin,Date end) throws Exception {
        Boolean flag = false;
        try {
            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            JSONArray natals = reExamRecode(patient,pregnancyNo);
            for (Object natal : natals) {
                com.alibaba.fastjson.JSONObject examRecord = JSON.parseObject(natal.toString());
                String exam_time = examRecord.getString("EXAM_TIME");
                Date examTime = format.parse(exam_time);
                if ((examTime.getTime()<= end.getTime()) && (examTime.getTime() >= begin.getTime())){
                    return true;
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return flag;
    }
    /**
     * 复检记录
     *
     * @param patientCode
     * @return
     */
    public JSONArray reExamRecode(String patientCode, String pregnancyNo) {
        JSONArray re = new JSONArray();
        try {
            SignFamily signFamily = signFamilyDao.findByPatient(patientCode);
            String hospital = null;
            if (signFamily != null) {
                hospital = signFamily.getHospital();
            }
            Patient patient = patientDao.findByCode(patientCode);
            String response = jwMaternalChildService.getEhrMaternalReExamRecord(patient.getIdcard(), hospital, pregnancyNo);
            com.alibaba.fastjson.JSONObject json = com.alibaba.fastjson.JSONObject.parseObject(response);
            JSONArray data = null;
            if (json.getInteger("status") == 200) {
                data = json.getJSONObject("data").getJSONArray("DATA");
            }
            if (data != null && data.size() > 0) {
                return data;
            }
            return re;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return re;
    }
}

+ 308 - 0
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/service/third/jw/JwMaternalChildService.java

@ -0,0 +1,308 @@
package com.yihu.wlyy.service.third.jw;
import com.yihu.wlyy.util.HttpClientUtil;
import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
 * Created by yeshijie on 2017/9/25.
 */
@Service
public class JwMaternalChildService {
    private static final Logger logger = LoggerFactory.getLogger(JwMaternalChildService.class);
    //基卫服务地址
    @Value("${sign.check_upload}")
    private String jwUrl;
    @Autowired
    private HttpClientUtil httpClientUtil;
    @Autowired
    private JdbcTemplate jdbcTemplate;
    /**
     * 获取孕妇建卡信息
     * @param idcard 身份证
     * @param hospital 医院code
     * @return
     * @throws Exception
     */
    public String getEhrMaternalFirstExamRecord(String idcard,String hospital) throws Exception{
        String url = jwUrl + "/third/prenatalInspector/getEhrMaternalFirstExamRecord";
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("idcard", idcard));
        params.add(new BasicNameValuePair("hospital", hospital));
        String response = httpClientUtil.post(url, params, "UTF-8");
        return response;
    }
    /**
     * 获取非第一次产检记录
     * @param idcard 身份证
     * @param hospital 医院code
     * @param pregnancyNo 产检号
     * @return
     * @throws Exception
     */
    public String getEhrMaternalReExamRecord(String idcard,String hospital,String pregnancyNo) throws Exception{
        String url = jwUrl + "/third/prenatalInspector/getEhrMaternalReExamRecord";
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("idcard", idcard));
        params.add(new BasicNameValuePair("hospital", hospital));
        params.add(new BasicNameValuePair("pregnancyNo", pregnancyNo));
        String response = httpClientUtil.post(url, params, "UTF-8");
        return response;
    }
    /**
     * 获取产床预约信息
     * @param idcard 身份证
     * @param hospital 医院code
     * @return
     * @throws Exception
     */
    public String getEhrMaternalBedPrecontractRecord(String idcard,String hospital) throws Exception{
        String url = jwUrl + "/third/prenatalInspector/getEhrMaternalBedPrecontractRecord";
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("idcard", idcard));
        params.add(new BasicNameValuePair("hospital", hospital));
        String response = httpClientUtil.post(url, params, "UTF-8");
        return response;
    }
    /**
     * 获取高危产妇信息
     * @param idcard 身份证
     * @param hospital 医院code
     * @return
     * @throws Exception
     */
    public String getEhrMaternalPregnancyHighRecord( String idcard, String hospital) throws Exception{
        String url = jwUrl + "/third/prenatalInspector/getEhrMaternalPregnancyHighRecord";
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("idcard", idcard));
        params.add(new BasicNameValuePair("hospital", hospital));
        String response = httpClientUtil.post(url, params, "UTF-8");
        return response;
    }
    /**
     * 获取孕妇分娩信息
     * @param idcard 身份证
     * @param hospital 医院code
     * @return
     * @throws Exception
     */
    public String getEhrMaternalDeliveryRecord(String idcard, String hospital) throws Exception{
        String url = jwUrl + "/third/prenatalInspector/getEhrMaternalDeliveryRecord";
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("idcard", idcard));
        params.add(new BasicNameValuePair("hospital", hospital));
        String response = httpClientUtil.post(url, params, "UTF-8");
        return response;
    }
    /**
     * 获取新生儿基本信息
     * @param idcard 身份证
     * @param hospital 医院code
     * @return
     * @throws Exception
     */
    public String getEhrMaternalDeliveryChildRecord(String idcard,String hospital) throws Exception{
        String url = jwUrl + "/third/prenatalInspector/getEhrMaternalDeliveryChildRecord";
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("idcard", idcard));
        params.add(new BasicNameValuePair("hospital", hospital));
        String response = httpClientUtil.post(url, params, "UTF-8");
        return response;
    }
    /**
     * 获取儿童健康体检0-6岁记录
     * @param idcard 身份证
     * @param hospital 医院code
     * @return
     * @throws Exception
     */
    public String getEhrMaternalChildMedicalRecord(String idcard,String hospital) throws Exception{
        String url = jwUrl + "/third/prenatalInspector/getEhrMaternalChildMedicalRecord";
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("idcard", idcard));
        params.add(new BasicNameValuePair("hospital", hospital));
        String response = httpClientUtil.post(url, params, "UTF-8");
        return response;
    }
    /**
     * 获取新生儿访视信息
     * @param idcard 身份证
     * @param hospital 医院code
     * @return
     * @throws Exception
     */
    public String getEhrMaternalHomeVisitRecord(String idcard,String hospital) throws Exception{
        String url = jwUrl + "/third/prenatalInspector/getEhrMaternalHomeVisitRecord";
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("idcard", idcard));
        params.add(new BasicNameValuePair("hospital", hospital));
        String response = httpClientUtil.post(url, params, "UTF-8");
        return response;
    }
    /**
     * 获取新生儿免疫记录
     * @param idcard 身份证
     * @param hospital 医院code
     * @return
     * @throws Exception
     */
    public String getEhrMaternalChildImmuneRecord(String idcard,String hospital) throws Exception{
        String url = jwUrl + "/third/prenatalInspector/getEhrMaternalChildImmuneRecord";
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("idcard", idcard));
        params.add(new BasicNameValuePair("hospital", hospital));
        String response = httpClientUtil.post(url, params, "UTF-8");
        return response;
    }
    /**
     * 获取孕妇预建卡信息
     * @param idcard 身份证
     * @param hospital 医院code
     * @return
     * @throws Exception
     */
    public String getEhrMaternalPreFirstExamRecord(String idcard,String hospital) throws Exception{
        String url = jwUrl + "/third/prenatalInspector/getEhrMaternalPreFirstExamRecord";
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("idcard", idcard));
        params.add(new BasicNameValuePair("hospital", hospital));
        String response = httpClientUtil.post(url, params, "UTF-8");
        return response;
    }
    /**
     * 上传孕妇预建卡信息
     * @param code 预建卡code
     * @return
     * @throws Exception
     */
    public String SaveEhrMaternalPreFirstExamRecord(String code) throws Exception{
        String url = jwUrl + "/third/prenatalInspector/SaveEhrMaternalPreFirstExamRecord";
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("code", code));
        String response = httpClientUtil.post(url, params, "UTF-8");
        return response;
    }
    /**
     * 上传新生儿访视信息
     * @param idcard 身份证
     * @param hospital 医院code
     * @return
     * @throws Exception
     */
    public String SaveEhrMaternalHomeVisitRecord(String idcard,String hospital) throws Exception{
        String url = jwUrl + "/third/prenatalInspector/SaveEhrMaternalHomeVisitRecord";
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("idcard", idcard));
        params.add(new BasicNameValuePair("hospital", hospital));
        String response = httpClientUtil.post(url, params, "UTF-8");
        return response;
    }
    /**
     * 获取待产记录
     * @param idcard 身份证
     * @param hospital 医院code
     * @param searchTime 查询时间
     * @return
     * @throws Exception
     */
    public String getEhrMaternalZSPreDeliveryRecord(String idcard,String hospital,String searchTime) throws Exception{
        String url = jwUrl + "/third/prenatalInspector/getEhrMaternalZSPreDeliveryRecord";
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("idcard", idcard));
        params.add(new BasicNameValuePair("hospital", hospital));
        params.add(new BasicNameValuePair("searchTime", searchTime));
        String response = httpClientUtil.post(url, params, "UTF-8");
        return response;
    }
    /**
     * 获取阴道分娩记录
     * @param idcard 身份证
     * @param hospital 医院code
     * @param searchTime 查询时间
     * @return
     * @throws Exception
     */
    public String getEhrMaternalZSDeliveryRecord(String idcard, String hospital, String searchTime) throws Exception{
        String url = jwUrl + "/third/prenatalInspector/getEhrMaternalZSDeliveryRecord";
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("idcard", idcard));
        params.add(new BasicNameValuePair("hospital", hospital));
        params.add(new BasicNameValuePair("searchTime", searchTime));
        String response = httpClientUtil.post(url, params, "UTF-8");
        return response;
    }
    /**
     * 获取剖宫产记录
     * @param idcard 身份证
     * @param hospital 医院code
     * @param searchTime 查询时间
     * @return
     * @throws Exception
     */
    public String getEhrMaternalZSCaesareanBirthRecord(String idcard, String hospital, String searchTime) throws Exception{
        String url = jwUrl + "/third/prenatalInspector/getEhrMaternalZSCaesareanBirthRecord";
        List<NameValuePair> params = new ArrayList<>();
        params.add(new BasicNameValuePair("idcard", idcard));
        params.add(new BasicNameValuePair("hospital", hospital));
        params.add(new BasicNameValuePair("searchTime", searchTime));
        String response = httpClientUtil.post(url, params, "UTF-8");
        return response;
    }
}

+ 17 - 0
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/util/DateUtil.java

@ -368,6 +368,23 @@ public class DateUtil {
		return mydate1;
	}
	/**
	 * 时间前推或后推天数(负数前推正数后推)
	 * date 基准时间
	 */
	public static Date getPreDays(Date date, int days) {
		Date day = null;
		try {
			Calendar c = Calendar.getInstance();
			c.setTime(date);
			c.add(Calendar.DATE, days);
			day = c.getTime();
		} catch (Exception e) {
		}
		return day;
	}
	/**
	 * 得到一个时间延后或前移几分钟的时间,nowdate为时间,delay为前移或后延的分钟数
	 */

+ 1 - 1
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/web/quota/JobController.java

@ -722,7 +722,7 @@ public class JobController extends BaseController {
    @ApiOperation("医生端产检系统提醒")
    public String startDoctorPrenatalInspectorJob() {
        try {
            quartzHelper.startNow(DoctorPrenatalInspectorJob.class, "DOCTOR_PRENATAL_INSPECTOR_JOB", null);
            quartzHelper.startNow(DoctorPrenatalInspectorJob.class, "DoctorPrenatalInspectorJob", null);
            return success("启动成功!");
        } catch (Exception e) {
            error(e);

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

@ -322,7 +322,7 @@ public class SignPatientLabelInfoService extends BaseService {
                    "   wlyy_sign_family t1 " +
                    "   LEFT JOIN wlyy_patient p on p. CODE = t1.patient " +
                    "   LEFT JOIN wlyy_sign_patient_label_info t2 on t2.patient = t1.patient and t2.label_type = 3 and t2.status=1 "+
                    "   LEFT JOIN wlyy_sign_family_server s on s.sign_code = t1.code and s.server_type = '"+labelCode+"' "+
                    "   RIGHT JOIN wlyy_sign_family_server s on s.sign_code = t1.code and s.server_type = '"+labelCode+"' "+
                    "  WHERE ( " +
                    "   t1.doctor = ? " +
                    "   OR t1.doctor_health = ? " +
@ -331,7 +331,7 @@ public class SignPatientLabelInfoService extends BaseService {
            if(StringUtils.isNotBlank(diseaseCondition)){
                sql = sql + " AND p.disease_condition ="+diseaseCondition;
            }
    
            if(isFollowWeChat){
                sql += "  AND p.openid IS NOT NULL AND p.openid <>'' ";
            }

+ 108 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prenatalInspector/PrenatalInspectorPreCardService.java

@ -1,5 +1,6 @@
package com.yihu.wlyy.service.app.prenatalInspector;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yihu.device.entity.DevicePatientHealthIndex;
@ -723,10 +724,10 @@ public class PrenatalInspectorPreCardService extends BaseService {
     *
     * @param prenatalId
     */
    public JSONObject getPrenatalStatus(Long prenatalId) throws Exception {
    public JSONObject getPrenatalStatusBak(Long prenatalId) throws Exception {
        JSONObject json = new JSONObject();
        try {
            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
            PrenatalInspectorPlan plan = prenatalInspectorPlanDao.findOne(prenatalId);
            Date planTime = plan.getInspectionTime();
            Boolean flag = getSendStatus(prenatalId);
@ -793,6 +794,83 @@ public class PrenatalInspectorPreCardService extends BaseService {
        return json;
    }
    /**
     * 根据待产检ID查询最近一条待产检计划状态
     *
     * @param prenatalId
     */
    public JSONObject getPrenatalStatus(Long prenatalId) throws Exception {
        JSONObject json = new JSONObject();
        try {
            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
            PrenatalInspectorPlan plan = prenatalInspectorPlanDao.findOne(prenatalId);
            Date planTime = plan.getInspectionTime();
            String pregnancyNo = plan.getInspectionCode();
            String patient = plan.getPatient();
            Boolean flag = getSendStatus(prenatalId);
            Long days = DateUtil.getDays(new Date(), planTime);
            Date begin = DateUtil.getPreDays(planTime,-14);
            Date end = DateUtil.getPreDays(planTime,14);
            //有产检code
            if (StringUtils.isNotEmpty(pregnancyNo) && (pregnancyNo != null)){
                Boolean examStatus = getExamStatus(patient,pregnancyNo,begin,end);
                if (examStatus){
                    json.put("renatalStatus", "4");
                }else {
                    if (days > 7) {
                        json.put("renatalStatus", "3");
                        json.put("sendStatus", flag == true ? "1" : "0");
                    }else{
                        PrenatalInspectorRecord record = recordDao.findByRelationAndType(prenatalId.toString(), 0);
                        if (record == null) {
                            json.put("renatalStatus", "1");
                            if (days < -7) {
                                json.put("reason", "未到提醒时间(" + format.format(DateUtil.getPreDays(plan.getInspectionTime(), -7)) + " 08:00)");
                            }else {
                                json.put("reason", "提醒时间(" + format.format(DateUtil.getPreDays(plan.getInspectionTime(), -7)) + " 08:00)");
                            }
                        } else {
                            PrenatalInspectorRecord docRecord = recordDao.findByRelationAndType(prenatalId.toString(), 1);
                            json.put("renatalStatus", "2");
                            json.put("sendStatus", flag == true ? "1" : "0");
                            if (docRecord == null) {
                                json.put("sendTime", format.format(record.getSendTime()));
                            } else {
                                json.put("sendTime", format.format(docRecord.getSendTime()));
                            }
                        }
                    }
                }
            }else {
                PrenatalInspectorRecord record = recordDao.findByRelationAndType(prenatalId.toString(), 0);
                if (record == null) {
                    json.put("renatalStatus", "1");
                    if (days < -7) {
                        json.put("reason", "未到提醒时间(" + format.format(DateUtil.getPreDays(plan.getInspectionTime(), -7)) + " 08:00)");
                    }else {
                        json.put("reason", "提醒时间(" + format.format(DateUtil.getPreDays(plan.getInspectionTime(), -7)) + " 08:00)");
                    }
                } else {
                    PrenatalInspectorRecord docRecord = recordDao.findByRelationAndType(prenatalId.toString(), 1);
                    json.put("renatalStatus", "2");
                    json.put("sendStatus", flag == true ? "1" : "0");
                    if (docRecord == null) {
                        json.put("sendTime", format.format(record.getSendTime()));
                    } else {
                        json.put("sendTime", format.format(docRecord.getSendTime()));
                    }
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        json.put("prenatalId", prenatalId);
        return json;
    }
    /**
     * 提醒居民(每24小时可提醒一次)
     *
@ -902,4 +980,32 @@ public class PrenatalInspectorPreCardService extends BaseService {
        return flag;
    }
    /**
     * 查询待产检计划产检时间在该时间段内是否有过真实产检
     * @param patient 居民code
     * @param pregnancyNo 产检号
     * @param begin  起始时间
     * @param end  截止时间
     * @return
     * @throws Exception
     */
    public Boolean getExamStatus(String patient,String pregnancyNo,Date begin,Date end) throws Exception {
        Boolean flag = false;
        try {
                SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                JSONArray natals = reExamRecode(patient,pregnancyNo);
                for (Object natal : natals) {
                    JSONObject examRecord = JSON.parseObject(natal.toString());
                    String exam_time = examRecord.getString("EXAM_TIME");
                    Date examTime = format.parse(exam_time);
                    if ((examTime.getTime()<= end.getTime()) && (examTime.getTime() >= begin.getTime())){
                        return true;
                    }
                }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return flag;
    }
}

+ 64 - 8
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statistics/StatisticsService.java

@ -3170,8 +3170,22 @@ public class StatisticsService extends BaseService {
    }
    public JSONArray getDoctorTeamFolList(String startDate, String endDate, String teamCode, String sort, String sortType) {
        startDate = startDate + " 00:00:00";
        endDate = endDate + " 00:00:00";
        //如果是本月第一天则开始时间为上个月最后一天的下午五点
        Calendar cal = Calendar.getInstance();
        cal.setTime(DateUtil.strToDate(startDate,"yyyy-MM-dd"));
        boolean flag = DateUtil.checkFristDayOfDateMonth(cal);
        if (flag){
            startDate = DateUtil.getNextDay(startDate,-1)+" 17:00:00";
        }else{
            startDate = startDate + " 00:00:00";
        }
        //如果开始时间是当月的最后一天,则到当天的下午五点
        String endStr = DateUtil.getLastDayOfMonthThisDate(DateUtil.strToDate(startDate,"yyyy-MM-dd"));
        if (endStr.equals(endDate)){
            endDate = endDate + " 17:00:00";
        }else{
            endDate = endDate + " 00:00:00";
        }
        String totalSQL = "SELECT " +
                " IFNULL(c.followupCount,0) AS followupCount, " +
                " d.`code` AS doctorCode, " +
@ -3500,8 +3514,22 @@ public class StatisticsService extends BaseService {
    }
    public JSONArray getTeamDoctorResList(String teamCode, String startDate, String endDate, String sort, String sortType) {
        startDate = startDate + " 00:00:00";
        endDate = endDate + " 00:00:00";
        //如果是本月第一天则开始时间为上个月最后一天的下午五点
        Calendar cal = Calendar.getInstance();
        cal.setTime(DateUtil.strToDate(startDate,"yyyy-MM-dd"));
        boolean flag = DateUtil.checkFristDayOfDateMonth(cal);
        if (flag){
            startDate = DateUtil.getNextDay(startDate,-1)+" 17:00:00";
        }else{
            startDate = startDate + " 00:00:00";
        }
        //如果开始时间是当月的最后一天,则到当天的下午五点
        String endStr = DateUtil.getLastDayOfMonthThisDate(DateUtil.strToDate(startDate,"yyyy-MM-dd"));
        if (endStr.equals(endDate)){
            endDate = endDate + " 17:00:00";
        }else{
            endDate = endDate + " 00:00:00";
        }
        String totalSql = "SELECT " +
                " IFNULL(c.reservationCount,0) AS reservationCount, " +
                " d.`code` AS doctorCode, " +
@ -3725,8 +3753,22 @@ public class StatisticsService extends BaseService {
    }
    public JSONArray getTeamGuidList(String teamCode, String startDate, String endDate, String sort, String sortType) {
        startDate = startDate + " 00:00:00";
        endDate = endDate + " 00:00:00";
        //如果是本月第一天则开始时间为上个月最后一天的下午五点
        Calendar cal = Calendar.getInstance();
        cal.setTime(DateUtil.strToDate(startDate,"yyyy-MM-dd"));
        boolean flag = DateUtil.checkFristDayOfDateMonth(cal);
        if (flag){
            startDate = DateUtil.getNextDay(startDate,-1)+" 17:00:00";
        }else{
            startDate = startDate + " 00:00:00";
        }
        //如果开始时间是当月的最后一天,则到当天的下午五点
        String endStr = DateUtil.getLastDayOfMonthThisDate(DateUtil.strToDate(startDate,"yyyy-MM-dd"));
        if (endStr.equals(endDate)){
            endDate = endDate + " 17:00:00";
        }else{
            endDate = endDate + " 00:00:00";
        }
        String totalSql = "SELECT " +
                " IFNULL(c.guidanceCount,0) AS guidanceCount, " +
                " d.`code` AS doctorCode, " +
@ -3944,8 +3986,22 @@ public class StatisticsService extends BaseService {
    }
    public JSONArray getTeamEduList(String teamCode, String startDate, String endDate, String sort, String sortType) {
        startDate = startDate + " 00:00:00";
        endDate = endDate + " 00:00:00";
        //如果是本月第一天则开始时间为上个月最后一天的下午五点
        Calendar cal = Calendar.getInstance();
        cal.setTime(DateUtil.strToDate(startDate,"yyyy-MM-dd"));
        boolean flag = DateUtil.checkFristDayOfDateMonth(cal);
        if (flag){
           startDate = DateUtil.getNextDay(startDate,-1)+" 17:00:00";
        }else{
            startDate = startDate + " 00:00:00";
        }
        //如果开始时间是当月的最后一天,则到当天的下午五点
        String endStr = DateUtil.getLastDayOfMonthThisDate(DateUtil.strToDate(startDate,"yyyy-MM-dd"));
        if (endStr.equals(endDate)){
            endDate = endDate + " 17:00:00";
        }else{
            endDate = endDate + " 00:00:00";
        }
        String totalSql = "SELECT " +
                " IFNULL(c.articleCount,0) AS articleCount, " +
                " IFNULL(c.batchno,0) AS batchno, " +

+ 100 - 57
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/statisticsES/StatisticsESService.java

@ -2377,48 +2377,65 @@ public class StatisticsESService {
        Integer interval = Integer.parseInt(type) + 1;
        List<SaveModel> articleCountList = elasticsearchUtil.findLineChartDateQuotaLevel0(startDate,endDate,teamCode,Integer.valueOf(SaveModel.teamLevel),"59",SaveModel.timeLevel_ZL,String.valueOf(interval));
        List<SaveModel> batchNoCountList = elasticsearchUtil.findLineChartDateQuotaLevel0(startDate,endDate,teamCode,Integer.valueOf(SaveModel.teamLevel),"71",SaveModel.timeLevel_ZL,String.valueOf(interval));
        List<Map<String, Object>> list = new ArrayList<>();
        if(articleCountList!=null){
            //循环人数集合
            for (SaveModel one1:articleCountList){
                String date = "";
                if(one1.getQuotaDate()!=null){
                    date=dateFormat.format(one1.getQuotaDate());
                }
                if (one1.getResult2().intValue()!=0){
                    Map<String,Object> map = new HashedMap();
                    map.put("articleCount",one1.getResult2().intValue());
                    //查看批次集合里是否有同时间的数据
                    for (SaveModel one2:batchNoCountList) {
                        if (one2.getQuotaDate()!=null && dateFormat.format(one2.getQuotaDate()).equals(date)){
                            map.put("batchCount",one2.getResult2().intValue());
                        }
                    }
                    if ("0".equals(type)) {
                        map.put("dateNo",date);
                    } else {
                        map.put("weekOfMonth", DateUtil.getWeekOfMonth(date));
        //List<Map<String, Object>> list = new ArrayList<>();
        Map<String,Object> articleMap = new HashedMap();
        Map<String,Object> batchMap = new HashedMap();
        //把list转换成 map
        if (articleCountList!=null && articleCountList.size()>0){
            articleCountList.stream().forEach(one1->{
                articleMap.put(dateFormat.format(one1.getQuotaDate()),one1);
            });
        }
        if (batchNoCountList!=null && batchNoCountList.size()>0){
            batchNoCountList.stream().forEach(one2->{
                batchMap.put(dateFormat.format(one2.getQuotaDate()),one2);
            });
        }
        //获取结果集
        List<Map<String, Object>> resultList = DateUtil.findDateASWeeks(dateFormat.parse(startDate),dateFormat.parse(endDate));
        String MondayWeekDateStr = DateUtil.getMondayOfThisDate(dateFormat.parse(startDate));
        Date MondayWeekDate = DateUtil.strToDate(MondayWeekDateStr,"yyyy-MM-dd");
        if (dateFormat.parse(startDate).after(MondayWeekDate)){
            //开始时间不是当周的周一,则加入本周周一的时间
            Map<String,Object> dateMap = new HashedMap();
            dateMap.put("date",MondayWeekDateStr);
            dateMap.put("count", 0.0D);
            resultList.add(0,dateMap);
        }
        if (resultList!=null && resultList.size()>0){
            for (Map<String, Object> reMap : resultList) {
                //设置时间
                if ("0".equals(type)) {
                    reMap.put("dateNo",dateFormat.format(reMap.get("date")));
                } else {
                    if (dateFormat.parse(String.valueOf(reMap.get("date"))).before(dateFormat.parse(startDate))){
                        reMap.put("weekOfMonth", 1);
                    }else{
                        reMap.put("weekOfMonth", DateUtil.getWeekOfMonth(String.valueOf(reMap.get("date"))));
                    }
                    list.add(map);
                }
                //放置新增发送人数和批次
                SaveModel one1 = (SaveModel) articleMap.get(reMap.get("date"));
                SaveModel one2 = (SaveModel) batchMap.get(reMap.get("date"));
                if (one1!=null){
                    reMap.put("articleCount",one1.getResult2().intValue());
                }else{
                    //循环批次
                    for (SaveModel one2:batchNoCountList) {
                        if (one2.getResult2().intValue()!=0 && one2.getQuotaDate()!=null && dateFormat.format(one2.getQuotaDate()).equals(date)){
                            Map<String,Object> map = new HashedMap();
                            map.put("articleCount",0);
                            map.put("batchCount",one2.getResult2().intValue());
                            if ("0".equals(type)) {
                                map.put("dateNo",dateFormat.format(date));
                            } else {
                                map.put("weekOfMonth", DateUtil.getWeekOfMonth(date));
                            }
                            list.add(map);
                        }
                    }
                    reMap.put("articleCount",0);
                }
                if (one2!=null){
                    reMap.put("batchCount",one2.getResult2().intValue());
                }else{
                    reMap.put("batchCount",0);
                }
                //去除多余的key
                reMap.remove("count");
                reMap.remove("avg");
                reMap.remove("date");
            }
        }
        return new JSONArray(list);
        return new JSONArray(resultList);
    }
    public JSONObject getRenewPercentAndChangePercent(String index, Integer level, String area, String year, String lowCode) {
@ -2982,7 +2999,7 @@ public class StatisticsESService {
                if ("0".equals(type)) {
                    map.put("applyDate", dateFormat.format(saveModel.getQuotaDate()));
                } else {
                    map.put("applyDate", dateFormat.format(saveModel.getQuotaDate()));
                    map.put("weekOfMonth", DateUtil.getWeekOfMonth(saveModel.getQuotaDate()));
                }
                map.put("signCount", saveModel.getResult2().longValue());
                rs.add(map);
@ -3060,7 +3077,7 @@ public class StatisticsESService {
                if ("0".equals(type)) {
                    map.put("dateNo", dateFormat.format(one.getQuotaDate()));
                } else {
                    map.put("weekNo", dateFormat.format(one.getQuotaDate()));
                    map.put("weekOfMonth", DateUtil.getWeekOfMonth(dateFormat.format(one.getQuotaDate())));
                }
                map.put("avgCount", avgCountStr);
                rs.add(map);
@ -3144,7 +3161,11 @@ public class StatisticsESService {
                if ("0".equals(type)) {
                    map.put("dateNo", dateFormat.format(one.getQuotaDate()));
                } else {
                    map.put("weekOfMonth", DateUtil.getWeekOfMonth(dateFormat.format(one.getQuotaDate())));
                    if (one.getQuotaDate().before(dateFormat.parse(startDate))){
                        map.put("weekOfMonth", 1);
                    }else{
                        map.put("weekOfMonth", DateUtil.getWeekOfMonth(dateFormat.format(one.getQuotaDate())));
                    }
                }
                map.put("followupCount", one.getResult2().intValue());
                totalList.add(map);
@ -3158,7 +3179,11 @@ public class StatisticsESService {
                if ("0".equals(type)) {
                    map.put("dateNo", dateFormat.format(one.getQuotaDate()));
                } else {
                    map.put("weekOfMonth", DateUtil.getWeekOfMonth(dateFormat.format(one.getQuotaDate())));
                    if (one.getQuotaDate().before(dateFormat.parse(startDate))){
                        map.put("weekOfMonth", 1);
                    }else{
                        map.put("weekOfMonth", DateUtil.getWeekOfMonth(dateFormat.format(one.getQuotaDate())));
                    }
                }
                map.put("planCount", one.getResult2().intValue());
                planList.add(map);
@ -3189,16 +3214,21 @@ public class StatisticsESService {
        Map<String, Object> map = null;
        List<Map<String, Object>> totalList = new ArrayList<>();
        for (SaveModel one : list) {
            if (one.getResult2().intValue()!=0){
                map = new HashMap<>();
                if ("0".equals(type)) {
                    map.put("dateNo", dateFormat.format(one.getQuotaDate()));
                } else {
            /*if (one.getResult2().intValue()!=0){
            }*/
            map = new HashMap<>();
            if ("0".equals(type)) {
                map.put("dateNo", dateFormat.format(one.getQuotaDate()));
            } else {
                if (one.getQuotaDate().before(dateFormat.parse(startDate))){
                    map.put("weekOfMonth","1");
                }else{
                    map.put("weekOfMonth", DateUtil.getWeekOfMonth(dateFormat.format(one.getQuotaDate())));
                }
                map.put("reservationCount", one.getResult2().longValue());
                totalList.add(map);
            }
            map.put("reservationCount", one.getResult2().longValue());
            totalList.add(map);
        }
        return new JSONArray(totalList);
    }
@ -3368,16 +3398,21 @@ public class StatisticsESService {
        Map<String, Object> map = null;
        List<Map<String, Object>> totalList = new ArrayList<>();
        for (SaveModel one : list) {
            if (one.getResult2().intValue()!=0){
                map = new HashMap<>();
                if ("0".equals(type)) {
                    map.put("dateNo", dateFormat.format(one.getQuotaDate()));
                } else {
           /* if (one.getResult2().intValue()!=0){
            }*/
            map = new HashMap<>();
            if ("0".equals(type)) {
                map.put("dateNo", dateFormat.format(one.getQuotaDate()));
            } else {
                if (one.getQuotaDate().before(dateFormat.parse(startDate))){
                    map.put("weekOfMonth", 1);
                }else{
                    map.put("weekOfMonth", DateUtil.getWeekOfMonth(dateFormat.format(one.getQuotaDate())));
                }
                map.put("guidanceCount", one.getResult2().longValue());
                totalList.add(map);
            }
            map.put("guidanceCount", one.getResult2().longValue());
            totalList.add(map);
        }
        return new JSONArray(totalList);
    }
@ -3406,7 +3441,11 @@ public class StatisticsESService {
            if ("0".equals(type)) {
                map.put("dateNo", dateFormat.format(one.getQuotaDate()));
            } else {
                map.put("weekOfMonth", DateUtil.getWeekOfMonth(dateFormat.format(one.getQuotaDate())));
                if (one.getQuotaDate().before(dateFormat.parse(startDate))){
                    map.put("weekOfMonth", 1);
                }else{
                    map.put("weekOfMonth", DateUtil.getWeekOfMonth(dateFormat.format(one.getQuotaDate())));
                }
            }
            map.put("inCount", one.getResult2().longValue());
            inList.add(map);
@ -3420,7 +3459,11 @@ public class StatisticsESService {
            if ("0".equals(type)) {
                map.put("dateNo", dateFormat.format(one.getQuotaDate()));
            } else {
                map.put("weekOfMonth", DateUtil.getWeekOfMonth(dateFormat.format(one.getQuotaDate())));
                if (one.getQuotaDate().before(dateFormat.parse(startDate))){
                    map.put("weekOfMonth", 1);
                }else{
                    map.put("weekOfMonth", DateUtil.getWeekOfMonth(dateFormat.format(one.getQuotaDate())));
                }
            }
            map.put("outCount", one.getResult2().longValue());
            outList.add(map);

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

@ -237,6 +237,30 @@ public class AdminTeamService extends BaseService {
        return memberDao.findDoctorTeams(doctorCode);
    }
    /**
     * 获取行政团队,包括团队签约人数
     * @param doctorCode
     * @return
     */
    public com.alibaba.fastjson.JSONArray getAdminTeamSignCount(String doctorCode){
        List<AdminTeam> adminTeams = memberDao.findDoctorTeams(doctorCode);
        com.alibaba.fastjson.JSONArray re = new com.alibaba.fastjson.JSONArray();
        for(AdminTeam one:adminTeams){
            //获取团队签约数
            Integer signCount = signFamilyDao.findByAdminTeamIdAndStatus(one.getId(),0);
            com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
            json.put("id",one.getId());
            json.put("name",one.getName());
            json.put("createTime",one.getCreateTime());
            json.put("leaderCode",one.getLeaderCode());
            json.put("available",one.isAvailable());
            json.put("orgCode",one.getOrgCode());
            json.put("signCount",signCount);
            re.add(json);
        }
        return re;
    }
    /**
     * 获取行政团队
     * @param doctorCode

+ 16 - 10
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/common/QrcodeService.java

@ -11,6 +11,7 @@ import com.yihu.wlyy.util.HttpUtil;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -37,6 +38,8 @@ public class QrcodeService extends BaseService {
    private TownDao townDao;
    @Autowired
    private HttpUtil HttpUtil;
    @Value("${server.server_url}")
    private String server_url;
    /**
     * 所有医生二维码生成
@ -263,8 +266,7 @@ public class QrcodeService extends BaseService {
                    doctorLevel = "全科医生";
                } else if (doctor.getLevel() == 3) {
                    doctorLevel = "健康管理师";
                }
                else{
                } else {
                    doctorLevel = "未知";
                }
@ -433,9 +435,9 @@ public class QrcodeService extends BaseService {
    /**
     * 从微信生成二维码并下载到本地
     *
     * @param content 场景值
     * @param content  场景值
     * @param fileName 二维码文件名
     * @param path 生成二维码路径
     * @param path     生成二维码路径
     * @param token
     * @throws IOException
     */
@ -502,10 +504,14 @@ public class QrcodeService extends BaseService {
    /**
     * 从微信生成永久二维码(供第三方调用)
     *  文件不存在才会新建
     * 文件不存在才会新建
     *
     * @param content
     * @param fileName
     * @param path
     * @param token
     * @throws IOException
     * @return 返回服务器地址
     * @throws Exception
     */
    public String getQrcodeFromWeiXin(String content, String fileName, String path, String token) throws Exception {
        try {
@ -514,10 +520,11 @@ public class QrcodeService extends BaseService {
            String result = HttpUtil.sendPost(token_url, params);
            if (!StringUtils.isEmpty(result)) {
                String absPath = "qrcode" + File.separator + fileName + ".png";
                JSONObject json = new JSONObject(result);
                if (json.has("ticket")) {
                    String file = path + File.separator + fileName + ".png";
                    String file = path + File.separator + absPath;
                    // 保存路径
                    File pathFile = new File(path);
                    // 保存文件
@ -528,8 +535,7 @@ public class QrcodeService extends BaseService {
                    }
                    // 文件已存在则返回已存在的路径
                    if (outputFile.exists()) {
//                        outputFile.delete();
                        return file;
                        return server_url + absPath;
                    }
                    // 请求输入流
                    InputStream inputStream = null;
@ -556,7 +562,7 @@ public class QrcodeService extends BaseService {
                        outputStream.close();
                    }
                    return file;
                    return server_url + absPath;
                } else {
                    throw new Exception("请求微信生成二维码失败!");
                }

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

@ -718,11 +718,8 @@ public class OnePayService {
                //保存到患者表
                Patient p = patientDao.findByCode(patient);
//                if(!"undefined".equals(openid)&&StringUtils.isNotBlank(openid)){
//                    p.setOpenid(openid);
//                }
//            增加绑定电子社保卡信息
                if (p.getSicardStatus()!=null && p.getSicardStatus()!=1){
                if (p.getSicardTime() == null){
                    p.setSicardTime(new Date());
                }
                patientDao.save(p);

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

@ -124,6 +124,7 @@ public class LoginController extends BaseController {
        loginLog.setPhone(mobile);
        loginLog.setType("2");
        loginLog.setUserType("2");
        loginLog.setPlatform(platform);
        loginLog.setAppVersion(super.getAppVersion());
        try {
            if (StringUtils.isEmpty(getIMEI())) {

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

@ -1,5 +1,6 @@
package com.yihu.wlyy.web.doctor.jimeiJkEdu;
import com.alibaba.fastjson.JSONObject;
import com.yihu.es.entity.HealthEduArticlePatient;
import com.yihu.wlyy.aop.ObserverRequired;
import com.yihu.wlyy.entity.education.HealthEduArticle;
@ -7,7 +8,7 @@ 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.jw.JwSmjkService;
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;
@ -18,7 +19,6 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.MediaType;
@ -43,7 +43,8 @@ public class DoctorJMJkEduArticleController extends BaseController {
    @Autowired
    private JMJkEduArticleService jmJkEduArticleService;
    @Autowired
    private GcEduArticleService gcEduArticleService;
    private ThirdJkEduArticleService thirdJkEduArticleService;
    @Autowired
    private JmsTemplate jmsTemplate;
    @Value("${activemq.queue.healtHarticleQueue}")
@ -277,10 +278,6 @@ public class DoctorJMJkEduArticleController extends BaseController {
        }
    }
    @RequestMapping(value = "doctorSendArticleToSingle", method = RequestMethod.POST)
    @ApiOperation("医生文章单个患者推送")
    public BaseResultModel doctorSendArticleToSingle(
@ -303,6 +300,107 @@ public class DoctorJMJkEduArticleController extends BaseController {
        }
    }
    @RequestMapping(value = "getArticalById",method = RequestMethod.GET)
    @ApiOperation("获取文章详情")
    public String getArticalById(@ApiParam(name = "articleId", value = "文章id",defaultValue = "1")
                                 @RequestParam(value = "articleId", required = true) String articleId){
        try {
            com.alibaba.fastjson.JSONObject response = thirdJkEduArticleService.getArticalById(articleId,getUID());
            return write(200,"查询成功!","data",response);
        }catch (Exception e){
            e.printStackTrace();
            return error(-1,"查询失败!");
        }
    }
    /**
     * 医生端端文章列表
     * @param firstLevelCategoryId
     * @param secondLevelCategoryId
     * @param insertTimeStart
     * @param articlelevel
     * @param articleTitle
     * @return
     */
    @RequestMapping(value = "queryArticlePcList", method = RequestMethod.GET)
    @ApiOperation("医生端文章列表")
    public  String queryArticlePcList(@ApiParam(name = "firstLevelCategoryId", value = "文章一级分类")
                                      @RequestParam(value = "firstLevelCategoryId", required = false) String firstLevelCategoryId,
                                      @ApiParam(name = "secondLevelCategoryId", value = "文章二级分类")
                                      @RequestParam(value = "secondLevelCategoryId", required = false) String secondLevelCategoryId,
                                      @ApiParam(name = "insertTimeStart", value = "新增文章开始时间")
                                      @RequestParam(value = "insertTimeStart", required = false) String insertTimeStart,
                                      @ApiParam(name = "insertTimeEnd", value = "新增文章结束时间")
                                      @RequestParam(value = "insertTimeEnd", required = false) String insertTimeEnd,
                                      @ApiParam(name = "articlelevel", value = "文章级别")
                                      @RequestParam(value = "articlelevel", required = false) String articlelevel,
                                      @ApiParam(name = "articleTitle", value = "文章标题关键字")
                                      @RequestParam(value = "articleTitle", required = false) String articleTitle,
                                      @ApiParam(name = "currentUserRole", value = "当前登录的角色")
                                      @RequestParam(value = "currentUserRole", required = true) String currentUserRole,
                                      @ApiParam(name = "currentUserRoleLevel", value = "当前登录的角色级别",defaultValue = "4")
                                      @RequestParam(value = "currentUserRoleLevel", required = false ,defaultValue = "4")String currentUserRoleLevel,
                                      @ApiParam(name = "isAuthentication", value = "是否认证")
                                      @RequestParam(value = "isAuthentication", required = false) String isAuthentication,
                                      @ApiParam(name = "isMyArticle", value = "是否过滤我的文章")
                                      @RequestParam(value = "isMyArticle", required = false) Boolean isMyArticle,
                                      @ApiParam(name = "page", value = "当前页")
                                      @RequestParam(value = "page", required = true) Integer page,
                                      @ApiParam(name = "pageSize", value = "分页数")
                                      @RequestParam(value = "pageSize", required = true) Integer pageSize){
        try {
            com.alibaba.fastjson.JSONObject response = jmJkEduArticleService.queryArticlePcList(firstLevelCategoryId,secondLevelCategoryId,insertTimeStart,insertTimeEnd,articlelevel,articleTitle,
                    getUID(),currentUserRole,currentUserRoleLevel,isAuthentication,isMyArticle,page,pageSize);
            return write(200,"查询成功!","data",response);
        } catch (Exception e){
            e.printStackTrace();
            return error(-1,"查询失败!");
        }
    }
    @RequestMapping(value = "saveArticle", method = RequestMethod.POST)
    @ApiOperation("添加文章")
    public  String saveArticle(@ApiParam(name = "articleId", value = "文章Id")
                               @RequestParam(value = "articleId", required = false) String articleId,
                               @ApiParam(name = "articleTitle", value = "文章标题")
                               @RequestParam(value = "articleTitle", required = true) String articleTitle,
                               @ApiParam(name = "articleType", value = "文章类型")
                               @RequestParam(value = "articleType", required = true) String articleType,
                               @ApiParam(name = "articlelevel", value = "文章级别")
                               @RequestParam(value = "articlelevel", required = true) Integer articlelevel,
                               @ApiParam(name = "secondLevelCategoryId", value = "文章二级分类id")
                               @RequestParam(value = "secondLevelCategoryId", required = true) String secondLevelCategoryId,
                               @ApiParam(name = "secondLevelCategoryName", value = "文章二级分类名称")
                               @RequestParam(value = "secondLevelCategoryName", required = true) String secondLevelCategoryName,
                               @ApiParam(name = "firstLevelCategoryId", value = "文章一级分类id")
                               @RequestParam(value = "firstLevelCategoryId", required = true) String firstLevelCategoryId,
                               @ApiParam(name = "firstLevelCategoryName", value = "文章一级分类名称")
                               @RequestParam(value = "firstLevelCategoryName", required = true) String firstLevelCategoryName,
                               @ApiParam(name = "content", value = "文章内容")
                               @RequestParam(value = "content", required = true) String content,
                               @ApiParam(name = "imageUrl", value = "文章封面图片地址")
                               @RequestParam(value = "imageUrl", required = true) String imageUrl,
                               @ApiParam(name = "currentUserRole", value = "当前登录的角色")
                               @RequestParam(value = "currentUserRole", required = true) String currentUserRole,
                               @ApiParam(name = "currentUserRoleLevel", value = "当前登录的角色级别",defaultValue = "4")
                               @RequestParam(value = "currentUserRoleLevel", required = false ,defaultValue = "4")String currentUserRoleLevel,
                               @ApiParam(name = "userScope", value = "使用范围(1、全市使用,2、全区使用,3、全社区使用)")
                               @RequestParam(value = "userScope", required = true) Integer userScope){
        try {
            jmJkEduArticleService.saveArticle(getUID(),articleTitle,articleType,articlelevel,secondLevelCategoryId,imageUrl,
                    secondLevelCategoryName,firstLevelCategoryId,firstLevelCategoryName,content,currentUserRole,currentUserRoleLevel,userScope,articleId);
            return success("添加成功!");
        }catch (Exception e){
            e.printStackTrace();
            return error(-1,"添加失败!");
        }
    }
    /*************************************************************************医生角色end***************************************************************************************************/

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

@ -1,8 +1,6 @@
package com.yihu.wlyy.web.doctor.jimeiJkEduPC;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yihu.wlyy.aop.ObserverRequired;
import com.yihu.wlyy.service.jimeiJkEdu.JMJkEduArticleService;
import com.yihu.wlyy.service.third.jkEduArticle.ThirdJkEduArticleService;
import com.yihu.wlyy.web.BaseController;
@ -13,8 +11,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import java.util.Iterator;
/**
 * Created by Trick on 2017/11/14.
 */

+ 2 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/patient/SignPatientLabelInfoController.java

@ -156,7 +156,7 @@ public class SignPatientLabelInfoController extends BaseController {
                                        @RequestParam(required = false) int pagesize,
                                        @RequestParam(required = false) String diseaseCondition,
                                        @RequestParam(required = false) boolean isSlowDisease,
                                        @RequestParam(required = false, defaultValue = "false") boolean isFollowWeChat) {
                                        @RequestParam(required = false) boolean isFollowWeChat) {
        try {
            if (StringUtils.isEmpty(labelCode)) {
                return error(-1, "标签cdoe不能为空");
@ -294,8 +294,7 @@ public class SignPatientLabelInfoController extends BaseController {
            @RequestParam(required = false) String labelType,
            @RequestParam(required = false) Long teamCode,
            @RequestParam(required = false) boolean isSlowDisease,
            @RequestParam(required = false) String diseaseCondition,
            @RequestParam(required = false) boolean isBindWechat) {
            @RequestParam(required = false) String diseaseCondition) {
        try {
            if (StringUtils.isEmpty(labelType)) {
                return error(-1, "标签类型不能为空");

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/prenatalInspector/PrenatalController.java

@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
 */
@RestController
@RequestMapping(value = "/doctor/prenatalnspector", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(description = "居民端-产检")
@Api(description = "医生端-产检")
public class PrenatalController extends BaseController{
    @Autowired

+ 11 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/team/AdminTeamController.java

@ -273,6 +273,17 @@ public class AdminTeamController extends BaseController {
        }
    }
    @RequestMapping(value = "/team/{doctor_code}/adminteams", method = RequestMethod.GET)
    @ApiOperation(value = "获取医生团队列表(包括团队签约人数)")
    public String getAdminTeamSignCount(@PathVariable("doctor_code") String doctorCode) {
        try {
            return write(200, "OK", "data", teamService.getAdminTeamSignCount(doctorCode));
        } catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
        }
    }
    @RequestMapping(value = "/team/{doctor_code}/teamsLimit", method = RequestMethod.GET)
    @ApiOperation(value = "获取医生团队列表(获取基位签约上线)")
    public String getDoctorTeamLimit(@PathVariable("doctor_code") String doctorCode){

+ 37 - 22
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/jkEduArticle/ThirdJkEduArticleController.java

@ -1,34 +1,19 @@
package com.yihu.wlyy.web.third.jkEduArticle;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yihu.wlyy.aop.ObserverRequired;
import com.yihu.wlyy.entity.patient.Patient;
import com.yihu.wlyy.service.third.jkEduArticle.ThirdJkEduArticleService;
import com.yihu.wlyy.task.PushMsgTask;
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;
import com.yihu.wlyy.wechat.util.WeiXinTempMsgSendUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.elasticsearch.common.collect.HppcMaps;
import org.json.JSONObject;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.jms.core.MessageCreator;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.Session;
import javax.jms.TextMessage;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
 * 调用福州健教接口
@ -46,10 +31,6 @@ public class ThirdJkEduArticleController extends BaseController {
    private String articleBaseUrl;
    @Autowired
    private ThirdJkEduArticleService thirdJkEduArticleService;
    @Autowired
    private GcEduArticleService gcEduArticleService;
    @Autowired
    private JmsTemplate jmsTemplate;
    /**********************************福州健康文章接口********************************************/
@ -268,6 +249,40 @@ public class ThirdJkEduArticleController extends BaseController {
            return error(-1,"查询失败!");
        }
    }
    
    @RequestMapping(value = "getCategoryByName",method = RequestMethod.GET)
    @ApiOperation("根据一级类别名称获取二级分类下得所有分类")
    public String getCategoryList(@ApiParam(name = "name", value = "类别名称")
                                  @RequestParam(value = "name", required = true) String name){
        try {
            com.alibaba.fastjson.JSONArray response = thirdJkEduArticleService.getCategoryList(1,"","");
            if(response.size() > 0){
                String cid = "";
                for (int i = 0; i < response.size(); i++) {
                    String cname = response.getJSONObject(i).getString("categoryname");
                    if(StringUtils.isNotBlank(cname) && name.equals(cname)){
                        cid = response.getJSONObject(i).getString("categoryid");
                        break;
                    }
                }
                if(StringUtils.isNotBlank(cid)){
                    response = thirdJkEduArticleService.getCategoryList(2,cid,"");
                    com.alibaba.fastjson.JSONObject  result =  new JSONObject();
                    result.put("cid",cid);
                    result.put("list",response);
                    return write(200,"查询成功!","data",result);
                }else{
                    response = new JSONArray();
                }
            }else{
                response = new JSONArray();
            }
            return write(200,"查询成功!","data",response);
        }catch (Exception e){
            e.printStackTrace();
            return error(-1,"查询失败!");
        }
    }
    /*************************************************** ConfigDicSho *************************************************/

+ 1 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/ylzpay/ThirdQrcodeController.java

@ -28,8 +28,6 @@ import java.io.File;
@Api(description = "供第三方微信类相关业务调用")
public class ThirdQrcodeController extends WeixinBaseController {
    @Value("${server.server_url}")
    private String server_url;
    @Autowired
    private QrcodeService qrcodeService;
@ -46,7 +44,7 @@ public class ThirdQrcodeController extends WeixinBaseController {
    public String getQrcode(@ApiParam(name = "scene", defaultValue = "") @RequestParam(value = "scene", required = true) String scene) throws Exception {
        try {
            String content = "wechat_" + scene;
            String path = server_url + File.separator + "qrcode";
            String path = ThirdQrcodeController.class.getResource("/").getPath().replace("/WEB-INF/classes/", "");
            // 通过微信接口生成医生二维码
            String result = qrcodeService.getQrcodeFromWeiXin(content, content.replaceAll("\r\n", ""), path, getAccessToken());
            return write(200, "生成二维码成功!", "data", result);

+ 5 - 4
patient-co/patient-co-wlyy/src/main/resources/application-dev.yml

@ -115,8 +115,8 @@ es:
#集美宣教居民端健康文章
jkEdu:
  web:
    articleBaseUrl: http://172.19.103.87:9088/
    #articleBaseUrl: http://172.19.103.87:9088/
    articleBaseUrl: http://192.168.131.131:8088/
#消息队列
activemq:
  username: admin
@ -127,5 +127,6 @@ activemq:
##如果是外网项目就是flase 内网是true
neiwang:
  enable: true
  wlyy: http://59.61.92.90:8072/wlyy
  enable: false
  #wlyy: http://59.61.92.90:8072/wlyy
  wlyy: http://192.168.131.131:8080/