ソースを参照

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

yeshijie 3 年 前
コミット
418c411ce1
14 ファイル変更164 行追加63 行削除
  1. 33 0
      business/base-service/src/main/java/com/yihu/jw/file_upload/FileUploadService.java
  2. 1 1
      business/base-service/src/main/java/com/yihu/jw/hospital/dict/service/WlyyHospitalSysDictService.java
  3. 15 15
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java
  4. 13 16
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/XzyyPrescriptionService.java
  5. 14 2
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/XzzxEntranceService.java
  6. 2 0
      business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java
  7. 25 4
      business/base-service/src/main/java/com/yihu/jw/wechat/enterprise/EnterpriseService.java
  8. 0 9
      common/common-entity/src/main/java/com/yihu/jw/entity/base/menu/BaseMenuShowDO.java
  9. 1 0
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/base/BaseRequestMapping.java
  10. 31 5
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/article/ArticleEndpoint.java
  11. 7 1
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/common/FileUploadController.java
  12. 7 6
      svr/svr-base/src/main/java/com/yihu/jw/base/service/menu/BaseMenuManageService.java
  13. 11 2
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/patient/PatientNoLoginEndPoint.java
  14. 4 2
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

+ 33 - 0
business/base-service/src/main/java/com/yihu/jw/file_upload/FileUploadService.java

@ -25,6 +25,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.mock.web.MockMultipartFile;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import sun.misc.BASE64Decoder;
import javax.activation.MimetypesFileTypeMap;
import java.io.*;
@ -522,5 +523,37 @@ public class FileUploadService {
        fastDFSHelper.delete(groupName,fileName);
    }
    /*
     * base64上传图片心脏
     * @param jsonData,头像转化后的输入流
     * @return
     * @throws Exception
     */
    public UploadVO uploadImagesBase64(String jsonData,String fastdfs_file_url) throws Exception {
        if(StringUtils.isBlank(jsonData)){
            throw new FileInputStreamEmptyException("图片的base64文件文件流不可为空!");
        }
        if(StringUtils.isBlank(fastdfs_file_url)){
            throw new FastfdsFileURLEmptyException("fastdfs url不可为空!");
        }
        BASE64Decoder decoder = new BASE64Decoder();
        byte[] bfile = decoder.decodeBuffer(jsonData);
        InputStream inputStream = new ByteArrayInputStream(bfile);
        ObjectNode objectNode = fastDFSHelper.upload(inputStream, "png", "");
        String groupName = objectNode.get("groupName").toString();
        String remoteFileName = objectNode.get("remoteFileName").toString();
        //解析返回的objectNode
        UploadVO uploadVO = new UploadVO();
        uploadVO.setFileName(remoteFileName);
        uploadVO.setFileType(groupName);
        uploadVO.setFullUri(objectNode.get("fileId").toString().replaceAll("\"", ""));
        uploadVO.setFullUrl(fastdfs_file_url + objectNode.get("fileId").toString().replaceAll("\"", ""));
        //返回文件路径
        return uploadVO;
    }
}

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/dict/service/WlyyHospitalSysDictService.java

@ -54,7 +54,7 @@ public class WlyyHospitalSysDictService extends BaseJpaService<WlyyHospitalSysDi
                " t.create_time as \"createTime\""+
                " from wlyy_hospital_sys_dict t where 1=1 ";
        if (StringUtils.isNoneBlank(name)){
            sql+=" and t.dict_name like '%"+name+"%'";
            sql+=" and t.dict_name = '"+name+"'";
        }
        if (StringUtils.isNoneBlank(modelName)){
            sql+=" and t.model_name like '%"+modelName+"%'";

+ 15 - 15
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -3148,24 +3148,24 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        if (StringUtils.isNotBlank(startTime)) {
            if ("xm_ykyy_wx".equals(wxId)) {
                if (flag){
                    totalSql += " and e.create_time >= str_to_date('" + startTime + " 00:00:00','YYYY-MM-DD HH24:MI:SS')";
                    totalSql += " and p.create_time >= str_to_date('" + startTime + " 00:00:00','YYYY-MM-DD HH24:MI:SS')";
                }else {
                    totalSql += " and e.create_time >= to_date('" + startTime + " 00:00:00','YYYY-MM-DD HH24:MI:SS')";
                    totalSql += " and p.create_time >= to_date('" + startTime + " 00:00:00','YYYY-MM-DD HH24:MI:SS')";
                }
            } else {
                totalSql += " AND e.create_time >='" + startTime + " 00:00:00'";
                totalSql += " AND p.create_time >='" + startTime + " 00:00:00'";
            }
        }
        if (StringUtils.isNotBlank(endTime)) {
            if ("xm_ykyy_wx".equals(wxId)) {
                if (flag){
                    totalSql += " and e.create_time <= str_to_date('" + endTime + " 23:59:59','YYYY-MM-DD HH24:MI:SS')";
                    totalSql += " and p.create_time <= str_to_date('" + endTime + " 23:59:59','YYYY-MM-DD HH24:MI:SS')";
                }else {
                    totalSql += " and e.create_time <= to_date('" + endTime + " 23:59:59','YYYY-MM-DD HH24:MI:SS')";
                    totalSql += " and p.create_time <= to_date('" + endTime + " 23:59:59','YYYY-MM-DD HH24:MI:SS')";
                }
            } else {
                totalSql += " AND e.create_time <='" + endTime + " 23:59:59'";
                totalSql += " AND p.create_time <='" + endTime + " 23:59:59'";
            }
        }
@ -3234,29 +3234,29 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        if (StringUtils.isNotBlank(startTime)) {
            if ("xm_ykyy_wx".equals(wxId)) {
                if (flag){
                    sql += " and e.create_time >= str_to_date('" + startTime + " 00:00:00','YYYY-MM-DD HH24:MI:SS')";
                    sql += " and p.create_time >= str_to_date('" + startTime + " 00:00:00','YYYY-MM-DD HH24:MI:SS')";
                }else {
                    sql += " and e.create_time >= to_date('" + startTime + " 00:00:00','YYYY-MM-DD HH24:MI:SS')";
                    sql += " and p.create_time >= to_date('" + startTime + " 00:00:00','YYYY-MM-DD HH24:MI:SS')";
                }
            } else {
                sql += " AND e.create_time >='" + startTime + " 00:00:00'";
                sql += " AND p.create_time >='" + startTime + " 00:00:00'";
            }
        }
        if (StringUtils.isNotBlank(endTime)) {
            if ("xm_ykyy_wx".equals(wxId)) {
                if (flag){
                    sql += " and e.create_time <= str_to_date('" + endTime + " 23:59:59','YYYY-MM-DD HH24:MI:SS')";
                    sql += " and p.create_time <= str_to_date('" + endTime + " 23:59:59','YYYY-MM-DD HH24:MI:SS')";
                }else {
                    sql += " and e.create_time <= to_date('" + endTime + " 23:59:59','YYYY-MM-DD HH24:MI:SS')";
                    sql += " and p.create_time <= to_date('" + endTime + " 23:59:59','YYYY-MM-DD HH24:MI:SS')";
                }
            } else {
                sql += " AND e.create_time <='" + endTime + " 23:59:59'";
                sql += " AND p.create_time <='" + endTime + " 23:59:59'";
            }
        }
        sql +=" order by e.create_time desc ";
        sql +=" order by p.create_time desc ";
        /*       sql += " LIMIT " + (page - 1) * size + "," + size + "";*/
        List<Map<String, Object>> list = hibenateUtils.createSQLQuery(sql, page, size);
        for (Map<String, Object> map : list) {
@ -8994,13 +8994,13 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    }
                    logger.info("进入处方签名");
                    //处方签名
                    xzyyPrescriptionService.SOF_SignDataWithExtraInfo(wlyyPrescriptionDO);
                    String baseSign=xzyyPrescriptionService.SOF_SignDataWithExtraInfo(wlyyPrescriptionDO);
                    //同步电子病历
                    WlyyPrescriptionEmrDO prescriptionEmrDO = prescriptionEmrDao.findEmrByPrescriptionId(prescriptionId);
                    try {
                        if (prescriptionEmrDO != null) {
                            logger.info("电子病历同步");
                            xzzxEntranceService.saveEmrToEntrance(prescriptionId);
                            xzzxEntranceService.saveEmrToEntrance(prescriptionId,baseSign);
                            logger.info("电子病历同步");
                            logger.info("电子病历签名");
                            xzyyPrescriptionService.SOF_SignDataWithExtraInfoEmr(wlyyPrescriptionDO);

+ 13 - 16
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/XzyyPrescriptionService.java

@ -267,11 +267,12 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
     * @param prescriptionDO
     * @throws Exception
     */
    public void SOF_SignDataWithExtraInfo(WlyyPrescriptionDO prescriptionDO) throws Exception {
    public String SOF_SignDataWithExtraInfo(WlyyPrescriptionDO prescriptionDO) throws Exception {
        WlyyOutpatientDO outpatientDO = outpatientDao.findById(prescriptionDO.getOutpatientId());
        List<WlyyPrescriptionInfoDO> infoDOS = infoDao.findByPrescriptionId(prescriptionDO.getId(), 1);
        List<WlyyPrescriptionDiagnosisDO> diagnosisDOS = diagnosisDao.findByPrescriptionId(prescriptionDO.getId(),1);
        JSONObject object = new JSONObject();
        String baseSign="";
        object.put("infos",infoDOS);
        object.put("registerSn",outpatientDO.getRegisterNo());
        object.put("diagnosiss",diagnosisDOS);
@ -297,9 +298,14 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
                JSONObject object1 = synRecipeInfo("hash_004",getCode(),patientName,patientAge.toString(),patientSex,"SF",recipeTime,hashValue,hashType,openId,idcard);
                if (object1.getString("status").equalsIgnoreCase("0")){
                    logger.info("西药处方签名成功"+object1);
                    JSONObject jsonObject1 = JSONObject.parseObject(object1.getString("data"));
                    if (jsonObject1!=null){
                        baseSign=jsonObject1.getString("stamp");
                    }
                }
            }
        }
        return baseSign;
    }
    /**
@ -442,7 +448,6 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
                clientId=oauthCaConfigDO.getClientId();
                clientSecret=oauthCaConfigDO.getClientSecret();
            }
            JSONObject object = new JSONObject();
            JSONObject msg = new JSONObject();
            JSONObject head = new JSONObject();
            head.put("clientId",clientId);
@ -454,10 +459,8 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
            }
            body.put("openId",openId);
            msg.put("body",body);
            object.put("msg",msg);
            object.put("signType",0);
            logger.info("请求参数:"+object);
            String response = httpClientUtil.sendPost(url,object.toJSONString());
            logger.info("请求参数:"+msg);
            String response = httpClientUtil.sendPost(url,msg.toJSONString());
            logger.info("请求自动签名授权接口 :"+response);
            return JSONObject.parseObject(response);
        }catch (Exception e){
@ -482,7 +485,6 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
                clientId=oauthCaConfigDO.getClientId();
                clientSecret=oauthCaConfigDO.getClientSecret();
            }
            JSONObject object = new JSONObject();
            JSONObject msg = new JSONObject();
            JSONObject head = new JSONObject();
            head.put("clientId",clientId);
@ -494,10 +496,8 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
            }
            body.put("openId",baseDoctorDO.getOpenid());
            msg.put("body",body);
            object.put("msg",msg);
            object.put("signType",0);
            logger.info("请求参数:"+object);
            String response = httpClientUtil.sendPost(url,object.toJSONString());
            logger.info("请求参数:"+msg);
            String response = httpClientUtil.sendPost(url,msg.toJSONString());
            JSONObject jsonRes=JSONObject.parseObject(response);
            JSONObject jsonObject = jsonRes.getJSONObject("data");
            Integer grantStep = jsonObject.getInteger("grantStep");
@ -530,7 +530,6 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
                clientId=oauthCaConfigDO.getClientId();
                clientSecret=oauthCaConfigDO.getClientSecret();
            }
            JSONObject object = new JSONObject();
            JSONObject msg = new JSONObject();
            JSONObject head = new JSONObject();
            head.put("clientId",clientId);
@ -542,10 +541,8 @@ public class XzyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
            }
            body.put("openId",openId);
            msg.put("body",body);
            object.put("msg",msg);
            object.put("signType",0);
            logger.info("请求参数:"+object);
            String response = httpClientUtil.sendPost(url,object.toJSONString());
            logger.info("请求参数:"+msg);
            String response = httpClientUtil.sendPost(url,msg.toJSONString());
            logger.info("退出授权接口 :"+response);
            return JSONObject.parseObject(response);
        }catch (Exception e){

+ 14 - 2
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/XzzxEntranceService.java

@ -22,6 +22,7 @@ import com.yihu.jw.entity.hospital.httplog.WlyyHttpLogDO;
import com.yihu.jw.entity.hospital.mapping.DoctorMappingDO;
import com.yihu.jw.entity.hospital.mapping.PatientMappingDO;
import com.yihu.jw.entity.hospital.prescription.*;
import com.yihu.jw.file_upload.FileUploadService;
import com.yihu.jw.hospital.dict.WlyyChargeDictDao;
import com.yihu.jw.hospital.dict.WlyyHospitalSysDictDao;
import com.yihu.jw.hospital.httplog.dao.WlyyHttpLogDao;
@ -33,6 +34,7 @@ import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.restmodel.hospital.doctor.CheckInfoVO;
import com.yihu.jw.restmodel.hospital.doctor.PersonInfoVO;
import com.yihu.jw.restmodel.hospital.prescription.*;
import com.yihu.jw.restmodel.iot.common.UploadVO;
import com.yihu.jw.util.common.IdCardUtil;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.util.http.HttpClientUtil;
@ -49,6 +51,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
@ -120,6 +123,10 @@ public class XzzxEntranceService{
    private BaseDoctorHospitalDao baseDoctorHospitalDao;
    @Autowired
    private PrescriptionEmrDao prescriptionEmrDao;
    @Value("${fastDFS.fastdfs_file_url}")
    private String fastdfs_file_url;
    @Autowired
    private FileUploadService fileUploadService;
    private static String key="bvvsf3JA0mUXMU+mVnMaOQ==";
@ -1841,6 +1848,7 @@ public class XzzxEntranceService{
                htmlDeo = replaceHtml(htmlDeo,"@patientAge@",jsonObject.getString("patientAge"));
                htmlDeo = replaceHtml(htmlDeo,"@patientsex@",jsonObject.getString("patientsex"));
                htmlDeo = replaceHtml(htmlDeo,"@deptCode@",jsonObject.getString("deptCode"));
                htmlDeo = replaceHtml(htmlDeo,"@baseSign@",jsonObject.getString("baseSign"));
                htmlDeo = replaceHtml(htmlDeo,"@r+outpatientCode@",jsonObject.getString("outpatientCode"));
                htmlDeo = replaceHtml(htmlDeo,"@patientClan@",jsonObject.getString("patientClan"));
                htmlDeo = replaceHtml(htmlDeo,"@Special@",prescriptionEmrDO.getSpecialHistory());
@ -3456,7 +3464,7 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
     * @return
     * @throws Exception
     */
    public String  saveEmrToEntrance(String prescriptionId) throws Exception {
    public String  saveEmrToEntrance(String prescriptionId,String baseSign) throws Exception {
        Map<String,String> params = new HashedMap();
        WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDao.findOne(prescriptionId);
        JSONObject paramRequest = new JSONObject();
@ -3510,7 +3518,11 @@ public Map checkSyncHis(String IoFlag,String PayCardNo,String NullahNumber,Strin
            paramRequest.put("emrtype","93");
            paramRequest.put("emrtitle","互联网医院");
            if (StringUtils.isNoneBlank(baseSign)){
                //UploadVO uploadVO=fileUploadService.uploadImagesBase64(baseSign,fastdfs_file_url);
                //paramRequest.put("baseSign","https://ih.xmheart.com/fastdfs/"+uploadVO.getFullUri());
                paramRequest.put("baseSign",baseSign);
            }
        }
        params.put("jsonInfo",paramRequest.toJSONString());
        String response = "";

+ 2 - 0
business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java

@ -1499,6 +1499,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
     */
    public BusinessOrderDO updatePayStatusByRelation(String relationCode,String wxId) throws Exception {
        logger.info("入参:"+relationCode);
        logger.info("进入无需支付");
        String baseUrl = prescriptionService.findDomainUrlInDict();
        BusinessOrderDO businessOrderDO = businessOrderDao.selectByRelationCode(relationCode);
        WlyyHospitalSysDictDO changeMethod = hospitalSysDictDao.findById("consultPay");
@ -1589,6 +1590,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                    }
                }
                if (wxId.equalsIgnoreCase("xm_zsyy_wx")){
                    logger.info("进入无需支付zs"+relationCode+"=="+wxId);
                    String url=baseUrl+"/hlwyy/ims-app-web/#/onlineChat/detail?_rs_title="+outpatientDO.getDescription()+"&type=3&id="+outpatientDO.getId();
                    enterpriseService.sendTWMesByDoctor("zsyy",outpatientDO.getDoctor(),title,msg,url);
                }else if (wxId.equalsIgnoreCase("xm_xzzx_wx")){

+ 25 - 4
business/base-service/src/main/java/com/yihu/jw/wechat/enterprise/EnterpriseService.java

@ -156,11 +156,22 @@ public class EnterpriseService {
    public String sendMKMesByDoctor(String enterpriseId,String doctor,String content)throws Exception {
        BaseDoctorDO baseDoctorDO = baseDoctorDao.findById(doctor);
        String res="";
        if (baseDoctorDO != null && StringUtils.isNotBlank(baseDoctorDO.getMobile())) {
            WxEnterpriseUserDO user = wxEnterpriseUserDao.findByEnterpriseIdAndMobile(enterpriseId, baseDoctorDO.getMobile());
            if (user != null) {
                return sendMKMes(enterpriseId, user.getUserid(), content);
                WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
                wlyyHttpLogDO.setDoctor(doctor);
                wlyyHttpLogDO.setRequest(content);
                wlyyHttpLogDO.setName("im消息推送");
                wlyyHttpLogDO.setCode(enterpriseId);
                wlyyHttpLogDO.setCreateTime(new Date());
                wlyyHttpLogDO.setRequest("enterpriseId:"+enterpriseId+",doctor:"+doctor+",url:"+content);
                res=sendMKMes(enterpriseId, user.getUserid(), content);
                wlyyHttpLogDO.setResponse(res);
                logger.info(res);
                wlyyHttpLogDao.save(wlyyHttpLogDO);
                return res;
            }
        }
        return "";
@ -195,7 +206,7 @@ public class EnterpriseService {
                        wlyyHttpLogDO.setCode(outPatientId);
                        wlyyHttpLogDO.setCreateTime(new Date());
                        wlyyHttpLogDO.setRequest("enterpriseId:"+enterpriseId+",doctor:"+doctor+",url:"+url);
                        wlyyHttpLogDO.setResponse(res);
                            wlyyHttpLogDO.setResponse(res);
                        logger.info(res);
                        wlyyHttpLogDao.save(wlyyHttpLogDO);
                    }
@ -253,7 +264,7 @@ public class EnterpriseService {
    public String sendTWMes(String enterpriseId,String userId,String title,String description,String url)throws Exception{
        String mesurl = "https://qyapi.weixin.qq.com/cg1-bin/message/send?access_token="+getToken(enterpriseId);
        String mesurl = "https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token="+getToken(enterpriseId);
        JSONObject param = new JSONObject();
        param.put("touser",userId);
@ -343,6 +354,16 @@ public class EnterpriseService {
        String rs = HttpUtil.sendPost(mesurl,param.toJSONString());
        logger.info("MKMes:"+rs);
        WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
        wlyyHttpLogDO.setDoctor(userId);
        wlyyHttpLogDO.setRequest(content);
        wlyyHttpLogDO.setName("im消息推送");
        wlyyHttpLogDO.setCode(enterpriseId);
        wlyyHttpLogDO.setCreateTime(new Date());
        wlyyHttpLogDO.setRequest("enterpriseId:"+enterpriseId+",doctor:"+userId+",url:"+content);
        wlyyHttpLogDO.setResponse(rs);
        logger.info(rs);
        wlyyHttpLogDao.save(wlyyHttpLogDO);
        return rs;
    }

+ 0 - 9
common/common-entity/src/main/java/com/yihu/jw/entity/base/menu/BaseMenuShowDO.java

@ -13,7 +13,6 @@ public class BaseMenuShowDO extends UuidIdentityEntityWithCreateTime {
    private String modelId;
    private String modelName;
    private String menuId;
    private String menuName;
    private String isDel;
    private Integer menuSort;
    private String styleCode;
@ -43,14 +42,6 @@ public class BaseMenuShowDO extends UuidIdentityEntityWithCreateTime {
    public void setMenuId(String menuId) {
        this.menuId = menuId;
    }
    @Column(name = "menu_name")
    public String getMenuName() {
        return menuName;
    }
    public void setMenuName(String menuName) {
        this.menuName = menuName;
    }
    @Column(name = "is_del")
    public String getIsDel() {
        return isDel;

+ 1 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/base/BaseRequestMapping.java

@ -293,6 +293,7 @@ public class BaseRequestMapping {
        public static final String UPLOAD_STREAM  = "/upload_stream";
        public static final String UPLOAD_STREAM_video  = "/upload_stream_video";
        public static final String UPLOAD_STRING  = "/upload_string";
        public static final String UPLOAD_STRINGBASE64  = "/UPLOAD_STRINGBASE64";
        public static final String UPLOAD_STREAM_ATTACHMENT  = "/upload_stream_attachment";
        public static final String DELETE_FILE = "/DELETE_FILE";

+ 31 - 5
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/article/ArticleEndpoint.java

@ -4,12 +4,16 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.base.dao.article.KnowledgeArticleDictDao;
import com.yihu.jw.base.dao.article.KnowledgeArticleUserDao;
import com.yihu.jw.base.dao.role.RoleDao;
import com.yihu.jw.base.dao.user.UserDao;
import com.yihu.jw.base.service.article.KnowledgeArticleService;
import com.yihu.jw.base.service.article.KnowledgeArticleUserService;
import com.yihu.jw.base.service.article.KnowledgeCategoryService;
import com.yihu.jw.doctor.dao.BaseDoctorHospitalDao;
import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
import com.yihu.jw.entity.base.patient.BasePatientBusinessDO;
import com.yihu.jw.entity.base.role.RoleDO;
import com.yihu.jw.entity.base.user.UserDO;
import com.yihu.jw.entity.hospital.article.KnowledgeArticleDO;
import com.yihu.jw.entity.hospital.article.KnowledgeArticleDictDO;
import com.yihu.jw.entity.hospital.article.KnowledgeArticleUserDO;
@ -53,6 +57,10 @@ public class ArticleEndpoint extends EnvelopRestEndpoint {
	private KnowledgeArticleUserDao knowledgeArticleUserDao;
	@Autowired
	private KnowledgeArticleDictDao knowledgeArticleDictDao;
	@Autowired
	private UserDao userdao;
	@Autowired
	private RoleDao roleDao;
	
	@GetMapping(value = BaseHospitalRequestMapping.KnowledgeArticle.searchKnowledgePageList)
	@ApiOperation(value = "获取文章列表")
@ -81,12 +89,30 @@ public class ArticleEndpoint extends EnvelopRestEndpoint {
			@RequestParam(value = "pageSize", required = true,defaultValue = "10")Integer pageSize)throws Exception{
		try {
			if(StringUtils.isBlank(filters)){
				filters=filters+"del=1";
			}else{
				filters=filters+";del=1";
			String userId=getUID();
			UserDO userDO = userdao.findById(userId);
			boolean queryAll=false;
			if (userDO!=null){
				RoleDO roleDO= roleDao.findOne(userDO.getRoleId());
				if (roleDO!=null){
					if ("admin".equalsIgnoreCase(roleDO.getCode())){
						queryAll=true;
					}
				}
			}
			if (queryAll){
				if(StringUtils.isBlank(filters)){
					filters=filters+"del=1";
				}else{
					filters=filters+";del=1";
				}
			}else {
				if(StringUtils.isBlank(filters)){
					filters=filters+"del=1"+";createUser='"+userId+"'";
				}else{
					filters=filters+";del=1"+";createUser='"+userId+"'";
				}
			}
			List<KnowledgeArticleDictDO> list  = knowledgeArticleService.search(fields,filters,sorts,page,pageSize);
			List<KnowledgeArticleDictDO> totals  = knowledgeArticleService.search(fields,filters,sorts);

+ 7 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/common/FileUploadController.java

@ -168,6 +168,12 @@ public class FileUploadController extends EnvelopRestEndpoint {
            return success("上传成功", uploadVO);
        }
    @PostMapping(value = BaseRequestMapping.FileUpload.UPLOAD_STRINGBASE64)
    @ApiOperation(value = "base64上传图片Xz",notes = "base64上传图片Xz")
    public ObjEnvelop<UploadVO> uploadBase64(@ApiParam(name = "jsonData", value = "头像转化后的输入流")
                                             @RequestBody String jsonData) throws Exception {
        UploadVO uploadVO = fileUploadService.uploadImagesBase64(jsonData,fastdfs_file_url);
        return success("上传成功", uploadVO);
    }
}

+ 7 - 6
svr/svr-base/src/main/java/com/yihu/jw/base/service/menu/BaseMenuManageService.java

@ -471,8 +471,9 @@ public class BaseMenuManageService {
                " t.model_id as \"modelId\", " +
                " t.model_name as \"modelName\", " +
                " t.menu_id as \"menuId\", " +
                " t.menu_name as \"menuName\", " +
                " m.name as \"menuName\", " +
                " t.is_del as \"isDel\"," +
                " m.status as \"status\"," +
                " t.create_time as \"createTime\"," +
                " t.menu_sort as \"menuSort\"," +
                " t.style_code as \"styleCode\"," +
@ -486,17 +487,17 @@ public class BaseMenuManageService {
                " t.model_id as \"modelId\", " +
                " t.model_name as \"modelName\", " +
                " t.menu_id as \"menuId\", " +
                " t.menu_name as \"menuName\", " +
                " m.name as \"menuName\", " +
                " t.is_del as \"isDel\"," +
                " t.create_time as \"createTime\"," +
                " t.menu_sort as \"menuSort\"," +
                " t.style_code as \"styleCode\"," +
                " m.status as \"status\"," +
                " t.style_name as \"styleName\" " +
                " from base_menu_show t left join " +
                " base_link_dict m on t.menu_id= m.id" +
                " where t.is_del ='1' and t.model_id='03' and t.status='1' order by t.menu_sort asc ";
                " where t.is_del ='1' and t.model_id='03' order by t.menu_sort asc ";
        List<Map<String,Object>> listLink=hibenateUtils.createSQLQuery(sqlLink);
        for (Map<String,Object> map:listModel){
            List<Map<String,Object>> child = new ArrayList<>();
            if("03".equalsIgnoreCase(map.get("modelId").toString())){
@ -508,8 +509,8 @@ public class BaseMenuManageService {
                        child.add(childMap);
                    }
                }
                map.put("childList",child);
            }
            map.put("childList",child);
        }
        return listModel;
    }
@ -670,7 +671,7 @@ public class BaseMenuManageService {
                " t.menu_title as \"menuTitle\", " +
                " t.describtion as \"describtion\", " +
                " t.menu_img as \"menuImg\"  " +
                "from base_menu_dict t   where 1=1 and t.is_del ='1' and status =1";
                "from base_menu_dict t   where 1=1 and t.is_del ='1' and t.status =1";
        if (StringUtils.isNoneBlank(parentId)){
            sqlParent+=" and t.id = '"+parentId+"'";
        }else {

+ 11 - 2
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/patient/PatientNoLoginEndPoint.java

@ -1146,9 +1146,10 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
                                    List<BaseNatAppointmentDO> baseNatAppointmentDOS = baseNatAppointmentDao.findByRealOrderList(waitPayDetailVO.getRecipeNo());
                                    for (BaseNatAppointmentDO natAppointmentDO:baseNatAppointmentDOS){
                                        if (channelId.contains("WX")){
//发送支付成功通知
                                        if (channelId.contains("WX")&&natAppointmentDO.getPayStatus().equalsIgnoreCase("0")){
                                            //发送支付成功通知
                                            String pushPayLog = null;
                                            logger.info("支付完成开始推送模板消息==="+natAppointmentDO.getName());
                                            String fee = waitPayDetailVO.getFee();
                                            if (wxId.equalsIgnoreCase("xm_zsyy_wx")){
                                                String title="您在厦门大学附属中山医院有一笔交易已支付完成!";
@ -1176,6 +1177,14 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
                                                        remark);
                                                logger.info("中山发送模板消息返回结果="+responseMsg);
                                                System.out.println("结束发送模板消息");
                                                WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
                                                wlyyHttpLogDO.setRequest(url);
                                                wlyyHttpLogDO.setName("核酸检测模板消息推送");
                                                wlyyHttpLogDO.setCode(natAppointmentDO.getId().toString());
                                                wlyyHttpLogDO.setCreateTime(new Date());
                                                wlyyHttpLogDO.setRequest(url);
                                                wlyyHttpLogDO.setResponse(responseMsg);
                                                wlyyHttpLogDao.save(wlyyHttpLogDO);
                                            }
                                        }else if (channelId.contains("ALI")){
                                            if (natAppointmentDO.getPayStatus().equalsIgnoreCase("0")){

+ 4 - 2
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

@ -2712,9 +2712,11 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    @ApiOperation(value = "保存电子病历")
    public ObjEnvelop saveEmr(
            @ApiParam(name = "prescriptionId", value = "prescriptionId")
            @RequestParam(value = "prescriptionId",defaultValue = "",required = true) String prescriptionId) throws Exception {
            @RequestParam(value = "prescriptionId",defaultValue = "",required = true) String prescriptionId,
            @ApiParam(name = "baseSign", value = "baseSign")
            @RequestParam(value = "baseSign",defaultValue = "",required = false) String baseSign) throws Exception {
        ObjEnvelop objEnvelop = new ObjEnvelop();
        objEnvelop.setObj(xzzxEntranceService.saveEmrToEntrance(prescriptionId));
        objEnvelop.setObj(xzzxEntranceService.saveEmrToEntrance(prescriptionId,baseSign));
        return objEnvelop;
    }
    @PostMapping(value = BaseHospitalRequestMapping.Prescription.prescriptionManage)