Quellcode durchsuchen

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

yeshijie vor 7 Jahren
Ursprung
Commit
50b22c857c

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

@ -361,7 +361,7 @@ public class BookingController extends WeixinBaseController {
                        json.put("date", obj.getStartTime());
                        json.put("orgName", obj.getOrgName());
                        json.put("orgCode", obj.getOrgCode());
                        json.put("doctorName", obj.getDeptName());
                        json.put("doctorName", obj.getDoctorName());
                        json.put("deptName", obj.getDeptName());
                        json.put("remark", patientName + ",您好!\n" + msg);

+ 27 - 0
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/entity/specialist/HospitalServiceItemDO.java

@ -41,6 +41,12 @@ public class HospitalServiceItemDO extends IdEntityWithOperation implements Seri
    @Column(name = "expense")
    private Integer expense;//价格
    @Transient
    private String title;//标题
    @Transient
    private String content;//内容
    @Transient
    private Integer flag;//标识(1:社区,2、医院,3、社区、医院)
@ -50,6 +56,9 @@ public class HospitalServiceItemDO extends IdEntityWithOperation implements Seri
    @Transient
    private SpecialistServiceItemDO specialistServiceItemDO;
    public HospitalServiceItemDO() {
    }
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
@ -139,4 +148,22 @@ public class HospitalServiceItemDO extends IdEntityWithOperation implements Seri
    public void setImediate(Integer imediate) {
        this.imediate = imediate;
    }
    @Transient
    public String getTitle() {
        return title;
    }
    public void setTitle(String title) {
        this.title = title;
    }
    @Transient
    public String getContent() {
        return content;
    }
    public void setContent(String content) {
        this.content = content;
    }
}

+ 2 - 3
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/specialist/ServiceItemService.java

@ -192,11 +192,10 @@ public class ServiceItemService extends BaseService {
                String value = sheet.getCell(index-1, finalRow).getContents().trim();
                excelData.transform(value);
            });
            JSONObject object = JSONObject.parseObject(itemDO.toString());
            array.add(object);
            array.add(itemDO);
        }
        String response = null;
        String url =getBaseUrl() + "importData1";
        String url =/*"http://localhost:10051/svr-specialist/"*/getBaseUrl() + "importData1";
        Map<String,String> params = new HashMap<>();
        params.put("serviceItems",array.toJSONString());
        try {

+ 13 - 12
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/specialist/SpecialistHospitalItemService.java

@ -190,14 +190,15 @@ public class SpecialistHospitalItemService extends BaseService {
        JSONArray array = new  JSONArray();
        for (int row = 1; row < rows; row++) {  //索引从0开始,第一行为标题
            HospitalServiceItemDO hospitalServiceItemDO = new HospitalServiceItemDO();
            Map<Integer, ExcelData> mapping = mapping(hospitalServiceItemDO);
            Map<Integer, ExcelData> mapping = mapping1(hospitalServiceItemDO);
            int finalRow = row;
            mapping.forEach((index, excelData) -> {
                String value = sheet.getCell(index, finalRow).getContents().trim();
                String value = sheet.getCell(index-1, finalRow).getContents().trim();
                excelData.transform(value);
            });
            JSONObject object = JSONObject.parseObject(hospitalServiceItemDO.toString());
            array.add(object);
            Hospital hospital = hospitalDao.findByName(hospitalServiceItemDO.getHospitalName());
            hospitalServiceItemDO.setHospital(hospital.getCode());
            array.add(hospitalServiceItemDO);
        }
        String response = null;
        String url =getBaseUrl() + "importData2";
@ -219,33 +220,33 @@ public class SpecialistHospitalItemService extends BaseService {
     * @param hospitalServiceItemDO
     * @return
     */
    private Map<Integer, ExcelData> mapping(HospitalServiceItemDO hospitalServiceItemDO) {
    private Map<Integer, ExcelData> mapping1(HospitalServiceItemDO hospitalServiceItemDO) {
        Map<Integer, ExcelData> dataMap = new HashMap<>();
        //医院名称
        dataMap.put(1, new ExcelData() {
            @Override
            public void transform(String data) {
                hospitalServiceItemDO.setHospital(hospitalServiceItemDO.getHospital());
                hospitalServiceItemDO.setHospitalName(data);
            }
        });
        //医院名称
        //服务项目标题
        dataMap.put(2, new ExcelData() {
            @Override
            public void transform(String data) {
                hospitalServiceItemDO.setHospitalName(hospitalServiceItemDO.getHospitalName());
                hospitalServiceItemDO.setTitle(data);
            }
        });
        //服务项目id
        //服务项目内容
        dataMap.put(3, new ExcelData() {
            @Override
            public void transform(String data) {
                hospitalServiceItemDO.setServiceItemId(hospitalServiceItemDO.getServiceItemId());
                hospitalServiceItemDO.setContent(data);
            }
        });
        //服务项目名称
        dataMap.put(4, new ExcelData() {
            @Override
            public void transform(String data) {
                hospitalServiceItemDO.setServiceItemName(hospitalServiceItemDO.getServiceItemName());
                hospitalServiceItemDO.setExpense(Integer.parseInt(data));
            }
        });
        hospitalServiceItemDO.setSaasId("dev");

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

@ -318,7 +318,7 @@ reservation:
  zyurl: http://59.61.92.90:8072/wlyy_service
#健康活动url
healthbank:
  url: http://192.168.120.167:8661/svr-wlyy-health-bank/svr-health-bank/
  url: http://www.xmtyw.cn/svr-wlyy-health-bank/svr-health-bank/
wechat:
  appId: wxad04e9c4c5255acf
  appSecret: ae77c48ccf1af5d07069f5153d1ac8d3

+ 6 - 6
patient-co-manage/wlyy-manage/src/main/webapp/WEB-INF/views/specialty/index.jsp

@ -117,8 +117,8 @@
                            <div class="layui-form-item">
                                <label class="layui-form-label required-1">需要预约:</label>
                                <div class="layui-input-block">
                                    <input type="radio" name="reserve" value="0" title="是">
                                    <input type="radio" name="reserve" value="1" title="否">
                                    <input type="radio" name="reserve" value="0" title="否">
                                    <input type="radio" name="reserve" value="1" title="是">
                                </div>
                            </div>
                        </div>
@ -126,8 +126,8 @@
                            <div class="layui-form-item" style="position: relative;width: max-content;">
                                <label class="layui-form-label required-1">完成方式:</label>
                                <div class="layui-input-block flex">
                                    <input type="radio" name="type" value="0" title="扫码">
                                    <input type="radio" name="type" value="1" title="上传附件">
                                    <input type="radio" name="type" value="0" title="上传附件">
                                    <input type="radio" name="type" value="1" title="扫码">
                                    <input type="radio" name="type" value="2" title="健康教育">
                                    <input type="radio" name="type" value="3" title="健康指导">
                                    <input type="radio" name="type" value="4" title="随访">
@ -138,8 +138,8 @@
                            <div class="layui-form-item">
                                <label class="layui-form-label required-1">项目评价:</label>
                                <div class="layui-input-block">
                                    <input type="radio" name="evaluation" value="0" title="是">
                                    <input type="radio" name="evaluation" value="1" title="否">
                                    <input type="radio" name="evaluation" value="0" title="否">
                                    <input type="radio" name="evaluation" value="1" title="是">
                                </div>
                            </div>
                        </div>

+ 1 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/message/MessageService.java

@ -253,6 +253,7 @@ public class MessageService extends BaseService {
        }
        //专科1、全科2
        //专科消息
        List<Message> specialistList = new ArrayList<>();
        if (flag!=null){

+ 68 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/specialist/rehabilitation/RehabilitationManageService.java

@ -1,5 +1,6 @@
package com.yihu.wlyy.service.specialist.rehabilitation;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.yihu.wlyy.entity.doctor.profile.Doctor;
import com.yihu.wlyy.entity.message.Message;
import com.yihu.wlyy.entity.patient.Patient;
@ -14,6 +15,8 @@ import com.yihu.wlyy.service.specialist.SpecialistEvaluateSevice;
import com.yihu.wlyy.task.PushMsgTask;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.IdCardUtil;
import com.yihu.wlyy.util.QrcodeUtil;
import com.yihu.wlyy.util.fastdfs.FastDFSUtil;
import com.yihu.wlyy.util.http.HttpResponse;
import com.yihu.wlyy.util.http.HttpUtils;
import com.yihu.wlyy.wechat.util.WeiXinAccessTokenUtils;
@ -28,7 +31,10 @@ import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletRequest;
import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
@ -41,6 +47,14 @@ import java.util.Map;
public class RehabilitationManageService extends BaseService {
    @Value("${specialist.url}")
    private String specialistUrl;
    @Value("${wechat.wechat_base_url}")
    private String wechat_base_url;
    @Value("${wechat.appId}")
    private String appId;
    @Value("${neiwang.enable}")
    private Boolean isneiwang;  //如果不是内网项目要转到到内网wlyy在上传
    @Value("${fastDFS.fastdfs_file_url}")
    private String fastdfs_file_url;
    @Autowired
    private JdbcTemplate jdbcTemplate;
    @Autowired
@ -59,6 +73,10 @@ public class RehabilitationManageService extends BaseService {
    private WeiXinOpenIdUtils weiXinOpenIdUtils;
    @Autowired
    private WeiXinAccessTokenUtils accessTokenUtils;
    @Autowired
    protected HttpServletRequest request;
    @Autowired
    private com.yihu.wlyy.util.CommonUtil CommonUtil;
    /************************************************************* start ************************************************************************/
    private String findRehabilitationPlanList = "/svr-specialist/findRehabilitationPlanList";//康复管理-康复计划列表
@ -419,8 +437,47 @@ public class RehabilitationManageService extends BaseService {
    public String createServiceQrCode(String planDetailId,String doctorCode) throws Exception{
        Map<String, Object> param = new HashedMap();
        String fileUrl = "";
        String sql ="SELECT service_qr_code FROM wlyy_specialist.wlyy_rehabilitation_plan_detail where id='"+planDetailId+"'";
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
        if(list!=null && list.size()>0){
            fileUrl = String.valueOf(list.get(0).get("service_qr_code"));
        }
        if (StringUtils.isEmpty(fileUrl) || "null".equals(fileUrl)){
            //生成二维码图片
            String contentJsonStr="https://open.weixin.qq.com/connect/oauth2/authorize?appid="+appId+"&redirect_uri="+wechat_base_url+"/wx/html/kfgl/html/confirm-service.html"+"?paramStr="+planDetailId+","+doctorCode+"&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";
            InputStream ipt = QrcodeUtil.createQrcode(contentJsonStr, 300, "png");
            if (isneiwang) {
                // 圖片列表
                List<String> tempPaths = new ArrayList<String>();
                try {
                    ObjectNode imgNode = FastDFSUtil.upload(ipt, "png", "plan_service_qrcode" + System.currentTimeMillis());
                    com.alibaba.fastjson.JSONObject json = com.alibaba.fastjson.JSONObject.parseObject(imgNode.toString());
                    tempPaths.add(json.getString("fid"));
                    String urls = "";
                    for (String image : tempPaths) {
                        if (urls.length() == 0) {
                            urls = image;
                        } else {
                            urls += "," + image;
                        }
                    }
                    fileUrl = fastdfs_file_url + urls;
                } catch (Exception e) {
                    e.printStackTrace();
                }
            } else {
                try {
                    fileUrl = fastdfs_file_url + CommonUtil.PrescriptionQRCodetoNeiWang(ipt);
                }catch (Exception e){
                    e.printStackTrace();
                }
            }
        }
        System.out.println("服务码-----------1"+fileUrl);
        param.put("planDetailId", planDetailId);
        param.put("doctorCode", doctorCode);
        param.put("imageUrl",fileUrl);
        //specialistUrl= "http://localhost:10051";
        HttpResponse response = HttpUtils.doPost(specialistUrl + createServiceQrCode, param);
        JSONObject result = new JSONObject(response.getContent());
@ -469,7 +526,15 @@ public class RehabilitationManageService extends BaseService {
        HttpResponse response = HttpUtils.doGet(specialistUrl + serviceDoctorList, param);
        JSONObject result = new JSONObject(response.getContent());
        if(result.getInt("status")==200){
            return result.getJSONArray("obj");
            JSONArray jsonArray = result.getJSONArray("obj");
            String doctorCode ="";
            Doctor doctor = null;
            for(int i=0;i<jsonArray.length();i++){
                doctorCode = jsonArray.getJSONObject(i).get("doctorCode")+"";
                doctor = doctorDao.findByCode(doctorCode);
                jsonArray.getJSONObject(i).put("doctorPhoto",doctor!=null?doctor.getPhoto():"");
            }
            return jsonArray;
        }
        throw new Exception("请求微服务失败!");
    }
@ -550,7 +615,9 @@ public class RehabilitationManageService extends BaseService {
        param.put("image", image);
        //specialistUrl= "http://localhost:10051";
        HttpResponse response = HttpUtils.doPost(specialistUrl + updateNoteAndImageRehabilitationOperate, param);
        System.out.println("返回数据=======1===="+response);
        JSONObject result = new JSONObject(response.getContent());
        System.out.println("返回数据=======2===="+result);
        if(result.getInt("status") == 200){
            JSONObject object = result.getJSONObject("obj");
            //保存wlyy_message

+ 0 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/util/CommonUtil.java

@ -5,7 +5,6 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.yihu.wlyy.util.fastdfs.FastDFSUtil;
import it.sauronsoftware.jave.*;
import net.sf.json.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/zysoft/BookingController.java

@ -678,7 +678,7 @@ public class BookingController extends WeixinBaseController {
                        json.put("date", DateUtil.dateToStrLong(obj.getStartTime()));
                        json.put("orgName", obj.getOrgName());
                        json.put("orgCode", obj.getOrgCode());
                        json.put("doctorName", obj.getDeptName());
                        json.put("doctorName", obj.getDoctorName());
                        json.put("deptName", obj.getDeptName());
//                        json.put("remark", patientName + ",您好!\n" + msg);
                        json.put("remark", remark);

+ 51 - 78
patient-co/patient-co-wlyy/src/main/resources/wechat/weixin_menu_jimei.txt

@ -2,96 +2,69 @@
"button":[
   {
	  "name":"家庭医生",
	  "sub_button":[
	      {
            "type":"view",
            "name":"健康评估",
            "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fjkpg%2fhtml%2fjkpg.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
          },
		  {
			"type":"view",
			"name":"签约管理",
			"url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fqygl%2fhtml%2fsigning_management.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
		  },
		  {
			"type":"view",
			"name":"医生咨询",
			"url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fyszx%2fhtml%2fdoctor-consultation.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
		  },
		  {
			"type":"view",
			"name":"医生指导",
			"url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fyszd%2fhtml%2fdoctor-guidance.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
		  },
		  {
            "type":"view",
            "name":"健康文章",
            "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fjkjy%2fhtml%2farticle_list.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
          }
	  ]
	  "type":"view",
      "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fhome%2fhtml%2findex.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
   },
   {
	  "name":"健康管理",
	  "name":"快捷服务",
	  "sub_button":[
		 {
			  "type":"view",
			  "name":"预约挂号",
			  "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fwdyy%2fhtml%2fappointment-register.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
		 },
         		"type":"view",
         		"name":"预约挂号",
         		"url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fwdyy%2fhtml%2fappointment-register.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
         },
		 {
            	"type":"view",
         	    "name":"医生咨询",
         		"url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fyszx%2fhtml%2fdoctor-consultation.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
         },
		 {
               "type":"view",
               "name":"健康记录",
               "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fjkjl%2fhtml%2fhealth-record.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
                "type":"view",
               	"name":"健康评估",
               	"url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fjkpg%2fhtml%2fjkpg.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
         },
         {
                "type":"view",
                "name":"康复管理",
                "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fkfgl%2fhtml%2frecover_manage.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
         },
		{
			"type":"click",
			"name":"健康档案",
			"key":"jiankangdangan"
		},
         {
            "type":"view",
            "name":"疾病社区",
            "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fjbsq%2fhtml%2fdisease-community.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
        },
        {
                    "type":"click",
                    "name":"妇幼保健",
                    "key":"fuyoubaojian"
        }
                "type":"view",
                "name":"慢病管理",
                "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fjbsq%2fhtml%2fslow-disease-manage.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
         }
	  ]
   },
   {
	  "name":"我的",
	  "sub_button":[
		{
		   "type":"view",
		   "name":"集美家签特色",
		   "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fdist%2fhtml%2fexclusive-service.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
		},
		{
           "type":"view",
           "name":"电子健康卡",
           "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fgrzx%2fhtml%2fmy-health-card.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
        },
		{
		   "type":"view",
		   "name":"我的资料",
		   "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fgrzx%2fhtml%2fmy-detail.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
		},
        {
           "type":"view",
           "name":"我的家庭",
           "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fjtgx%2fhtml%2ffamily.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
        },
		{
		   "type":"view",
		   "name":"我的设备",
		   "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fwdsb%2fhtml%2fmy-equipments.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
		}
	     {
         		"type":"view",
         		"name":"集美家签特色",
         		"url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fdist%2fhtml%2fexclusive-service.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
         },
		 {
                "type":"view",
                "name":"电子健康卡",
                "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fgrzx%2fhtml%2fmy-health-card.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
         },
         {
        		"type":"view",
        		"name":"我的资料",
        		"url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fgrzx%2fhtml%2fmy-detail.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
         },
		 {
        	    "type":"view",
        	    "name":"健康银行",
        	    "url":"https://open.weixin.qq.com/connect/oauth2/authorize?appid=appId&redirect_uri=server_url%2fwx%2fhtml%2fjkjf%2fhtml%2funopened.html&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
         },
         {
                "type":"click",
                "name":"用户指南",
                "key":"caozuoshuoming"
         }
	 ]
  }],
    "matchrule":{
      "tag_id":"103"
      }
  }
]
}