wangjun il y a 4 ans
Parent
commit
6ea9e39edd
14 fichiers modifiés avec 342 ajouts et 18 suppressions
  1. 22 0
      business/base-service/src/main/java/com/yihu/jw/hospital/family/service/WlyyFamilyMemberService.java
  2. 188 0
      business/base-service/src/main/java/com/yihu/jw/hospital/httplog/service/WlyyHttpLogService.java
  3. 22 1
      business/base-service/src/main/java/com/yihu/jw/hospital/message/service/SystemMessageService.java
  4. 9 3
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/TnyyEntranceService.java
  5. 2 2
      business/base-service/src/main/java/com/yihu/jw/internet/service/InternetCommonService.java
  6. 1 1
      business/es-service/src/main/java/com/yihu/jw/es/service/StatisticsEsService.java
  7. 1 0
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/hospital/BaseHospitalRequestMapping.java
  8. 0 1
      gateway/ag-basic/src/main/java/com/yihu/jw/gateway/methlog/WlyyHospitalSysDictDao.java
  9. 3 1
      server/svr-authentication/src/main/java/com/yihu/jw/security/service/RegisterService.java
  10. 61 4
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/methodlog/MethodLogEndpoint.java
  11. 1 0
      svr/svr-internet-hospital-job/src/main/resources/application.yml
  12. 12 0
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/dict/PrivateDictEndpoint.java
  13. 12 1
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/hospital/WlyyFamilyMemberController.java
  14. 8 4
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

+ 22 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/family/service/WlyyFamilyMemberService.java

@ -11,6 +11,7 @@ import com.yihu.jw.hospital.family.dao.BasePatientMemberDictDao;
import com.yihu.jw.hospital.family.dao.WlyyPatientFamilyMemberDao;
import com.yihu.jw.hospital.mapping.dao.PatientMappingDao;
import com.yihu.jw.hospital.prescription.service.entrance.EntranceService;
import com.yihu.jw.hospital.prescription.service.entrance.TnyyEntranceService;
import com.yihu.jw.hospital.prescription.service.entrance.XzzxEntranceService;
import com.yihu.jw.hospital.prescription.service.entrance.YkyyEntranceService;
import com.yihu.jw.hospital.ykyy.service.YkyyService;
@ -56,6 +57,8 @@ public class WlyyFamilyMemberService extends BaseJpaService<WlyyPatientFamilyMem
    @Autowired
    private WlyyHospitalSysDictDao wlyyHospitalSysDictDao;
    @Autowired
    private TnyyEntranceService tnyyEntranceService;
    @Autowired
    private YkyyService ykyyService;
    @Value("${wechat.id}")
    private String wxId;
@ -224,6 +227,24 @@ public class WlyyFamilyMemberService extends BaseJpaService<WlyyPatientFamilyMem
                mixEnvelop.setMessage("您所添加的家属无就诊记录,无法添加");
                return  mixEnvelop;
            }
        }else if ("sd_tnzyy_wx".equalsIgnoreCase(wxId)){
            com.alibaba.fastjson.JSONArray jsonArray1 = tnyyEntranceService.selectPatientMappingCode(idCard);
            if (jsonArray1!=null&&jsonArray1.size()>0){
                com.alibaba.fastjson.JSONObject jsonObject = JSONObject.parseObject(jsonArray1.get(0).toString());
                if (jsonObject!=null){
                    familyId = jsonObject.getString("BRID");
                    String familySex = IdCardUtil.getSexForIdcard(idCard);
                    if (familySex.equalsIgnoreCase("男")){
                        sex =1 ;
                    }else if (familySex.equalsIgnoreCase("女")){
                        sex = 2 ;
                    }
                }
            }else {
                mixEnvelop.setStatus(408);
                mixEnvelop.setMessage("您所添加的家属无就诊记录,无法添加");
                return  mixEnvelop;
            }
        }
        basePatientDO.setSex(sex);
        if ("xm_xzzx_wx".equalsIgnoreCase(wxId)){
@ -249,6 +270,7 @@ public class WlyyFamilyMemberService extends BaseJpaService<WlyyPatientFamilyMem
        basePatientDO.setName(familyName);
        basePatientDO.setIdcard(idCard);
        basePatientDO.setRegister("0");
        basePatientDO.setEnabled(1);
        basePatientDO.setDel("1");
        BasePatientDO sucessPatient= basePatientDao.save(basePatientDO);

+ 188 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/httplog/service/WlyyHttpLogService.java

@ -65,7 +65,78 @@ public class WlyyHttpLogService  extends BaseJpaService<WlyyHttpLogDO, WlyyHttpL
                "b.name as \"doctorName\"" +
                " from wlyy_http_log t left join base_patient a on t.patient = a.id " +
                " left join base_doctor b on t.doctor = b.id where 1=1 and (t.code like '%Check%' or t.name = '合理用药审核接口')";
        if (StringUtils.isNotBlank(startTime)){
            if("xm_ykyy_wx".equals(wxId)){
                if (flag){
                    sql+=" and t.create_time > '"+startTime+"'";
                }else {
                    sql+=" and t.create_time > to_date('" + startTime + "', 'yyyy-mm-dd hh24:mi:ss') ";
                }
            }else{
                sql+=" and t.create_time > '"+startTime+"'";
            }
        }
        if (StringUtils.isNotBlank(endTime)){
            if("xm_ykyy_wx".equals(wxId)){
                if (flag){
                    sql+="  and t.create_time<'" + endTime + "'";
                }else {
                    sql+="  and t.create_time< to_date('" + endTime + "','yyyy-mm-dd hh24:mi:ss')";
                }
            }else{
                sql+="  and t.create_time<'" + endTime + "'";
            }
        }
        if (StringUtils.isNotBlank(faceName)){
            sql+=" and t.name like '%"+faceName+"%'";
        }
        if (StringUtils.isNotBlank(patient)){
            sql+=" and a.name like '%"+patient+"%'";
        }
        if (StringUtils.isNotBlank(doctor)){
            sql+=" and b.name like '%"+doctor+"%'";
        }
        List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql,page,pageSize);
        String sqlcount = "SELECT COUNT(1) AS \"total\" FROM ("+sql+") q";
        Long count = 0L;
        List<Map<String,Object>> total = hibenateUtils.createSQLQuery(sqlcount);
        if(total!=null){
            //mysql 与 Oracle 聚合函数返回类型不一致,需要判断装换
            count = hibenateUtils.objTransformLong(total.get(0).get("total"));
        }
        mixEnvelop.setTotalCount(count.intValue());
        mixEnvelop.setDetailModelList(list);
        mixEnvelop.setPageSize(pageSize);
        mixEnvelop.setCurrPage(page);
        return mixEnvelop;
    }
    public MixEnvelop findWlyyHttpLogInBase(String startTime, String endTime, String code,String faceName, String patient, String doctor,String responeKeyWord,String requestKeyWord, Integer page, Integer pageSize){
        MixEnvelop mixEnvelop = new MixEnvelop();
        String sql = "select t.id as \"id\"," +
                "t.code as \"code\"," +
                "t.name as \"name\"," +
                "t.patient as \"patient\"," +
                "t.doctor as \"doctor\"," +
                "t.request as \"request\"," +
                "t.response as \"response\"," +
                "t.status as \"status\",";
        if("xm_ykyy_wx".equals(wxId)){
            if (flag){
                sql+="date_format(t.create_time, '%Y-%m-%d %H:%i:%s')  as \"createTime\",";
            }else {
                sql+="  to_char(t.create_time,'yyyy-MM-dd HH24:mi:ss') as \"createTime\",";
            }
        }else{
            sql+="date_format(t.create_time, '%Y-%m-%d %H:%i:%s')  as \"createTime\",";
        }
        sql+=" a.name as \"patientName\"," +
                "b.name as \"doctorName\"" +
                " from wlyy_http_log t left join base_patient a on t.patient = a.id " +
                " left join base_doctor b on t.doctor = b.id where 1=1 ";
        if (StringUtils.isNotBlank(startTime)){
            if("xm_ykyy_wx".equals(wxId)){
                if (flag){
                    sql+=" and t.create_time > '"+startTime+"'";
@ -87,6 +158,9 @@ public class WlyyHttpLogService  extends BaseJpaService<WlyyHttpLogDO, WlyyHttpL
                sql+="  and t.create_time<'" + endTime + "'";
            }
        }
        if (StringUtils.isNotBlank(code)){
            sql+=" and t.code = '"+code+"'";
        }
        if (StringUtils.isNotBlank(faceName)){
            sql+=" and t.name like '%"+faceName+"%'";
        }
@ -96,6 +170,120 @@ public class WlyyHttpLogService  extends BaseJpaService<WlyyHttpLogDO, WlyyHttpL
        if (StringUtils.isNotBlank(doctor)){
            sql+=" and b.name like '%"+doctor+"%'";
        }
        if (StringUtils.isNotBlank(requestKeyWord)){
            sql+=" and t.request like '%"+requestKeyWord+"%'";
        }
        if (StringUtils.isNotBlank(responeKeyWord)){
            sql+=" and t.response like '%"+responeKeyWord+"%'";
        }
        List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql,page,pageSize);
        String sqlcount = "SELECT COUNT(1) AS \"total\" FROM ("+sql+") q";
        Long count = 0L;
        List<Map<String,Object>> total = hibenateUtils.createSQLQuery(sqlcount);
        if(total!=null){
            //mysql 与 Oracle 聚合函数返回类型不一致,需要判断装换
            count = hibenateUtils.objTransformLong(total.get(0).get("total"));
        }
        mixEnvelop.setTotalCount(count.intValue());
        mixEnvelop.setDetailModelList(list);
        mixEnvelop.setPageSize(pageSize);
        mixEnvelop.setCurrPage(page);
        return mixEnvelop;
    }
    public MixEnvelop findLoginLog(String startTime, String endTime, String userId,String userName, String openId, String userAgent,String loginType,String opreateStart, String opreateEnd,  Integer page, Integer pageSize) {
        MixEnvelop mixEnvelop = new MixEnvelop();
        String sql = "select t.id as \"id\"," +
                "t.user_id as \"userId\"," +
                "p.name as \"patientName\"," +
                "d.name as \"doctorName\"," +
                "t.user_agent as \"userAgent\"," +
                "t.login_type as \"loginType\"," +
                "t.openid as \"openid\"," ;
        if("xm_ykyy_wx".equals(wxId)){
            if (flag){
                sql+="date_format(t.create_time, '%Y-%m-%d %H:%i:%s')  as \"createTime\",";
            }else {
                sql+="  to_char(t.create_time,'yyyy-MM-dd HH24:mi:ss') as \"createTime\",";
            }
        }else{
            sql+="date_format(t.create_time, '%Y-%m-%d %H:%i:%s')  as \"createTime\",";
        }
        if("xm_ykyy_wx".equals(wxId)){
            if (flag){
                sql+="date_format(t.operate_time, '%Y-%m-%d %H:%i:%s')  as \"operateTime\",";
            }else {
                sql+="  to_char(t.operate_time,'yyyy-MM-dd HH24:mi:ss') as \"operateTime\",";
            }
        }else{
            sql+="date_format(t.operate_time, '%Y-%m-%d %H:%i:%s')  as \"operateTime\",";
        }
        sql+=" a.name as \"patientName\"," +
                "b.name as \"doctorName\"" +
                " from wlyy_http_log t left join base_patient p on t.user_id = p.id " +
                " left join base_doctor d on t.user_id = d.id where 1=1 ";
        if (StringUtils.isNotBlank(startTime)){
            if("xm_ykyy_wx".equals(wxId)){
                if (flag){
                    sql+=" and t.create_time > '"+startTime+"'";
                }else {
                    sql+=" and t.create_time > to_date('" + startTime + "', 'yyyy-mm-dd hh24:mi:ss') ";
                }
            }else{
                sql+=" and t.create_time > '"+startTime+"'";
            }
        }
        if (StringUtils.isNotBlank(endTime)){
            if("xm_ykyy_wx".equals(wxId)){
                if (flag){
                    sql+="  and t.create_time<'" + endTime + "'";
                }else {
                    sql+="  and t.create_time< to_date('" + endTime + "','yyyy-mm-dd hh24:mi:ss')";
                }
            }else{
                sql+="  and t.create_time<'" + endTime + "'";
            }
        }
        if (StringUtils.isNotBlank(userId)){
            sql+=" and t.user_id = '"+userId+"'";
        }
        if (StringUtils.isNoneBlank(userName)){
            if ("2".equalsIgnoreCase(loginType)){
                sql+=" and d.name like '%"+userName+"%'";
            }else {
                sql+=" and p.name like '%"+userName+"%'";
            }
        }
        if (StringUtils.isNotBlank(loginType)){
            sql+=" and t.login_type ='"+loginType+"'";
        }
        if (StringUtils.isNotBlank(openId)){
            sql+=" and t.openId like '%"+openId+"%'";
        }
        if (StringUtils.isNotBlank(userAgent)){
            sql+=" and t.user_agent like '%"+userAgent+"%'";
        }
        if (StringUtils.isNotBlank(opreateStart)){
            if("xm_ykyy_wx".equals(wxId)){
                if (flag){
                    sql+=" and t.operate_time > '"+opreateStart+"'";
                }else {
                    sql+=" and t.operate_time > to_date('" + opreateStart + "', 'yyyy-mm-dd hh24:mi:ss') ";
                }
            }else{
                sql+=" and t.operate_time > '"+opreateStart+"'";
            }
        }
        if (StringUtils.isNotBlank(opreateEnd)){
            if("xm_ykyy_wx".equals(wxId)){
                if (flag){
                    sql+="  and t.operate_time<'" + opreateEnd + "'";
                }else {
                    sql+="  and t.operate_time< to_date('" + opreateEnd + "','yyyy-mm-dd hh24:mi:ss')";
                }
            }else{
                sql+="  and t.operate_time<'" + opreateEnd + "'";
            }
        }
        List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql,page,pageSize);
        String sqlcount = "SELECT COUNT(1) AS \"total\" FROM ("+sql+") q";
        Long count = 0L;

+ 22 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/message/service/SystemMessageService.java

@ -1,9 +1,12 @@
package com.yihu.jw.hospital.message.service;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.jw.entity.hospital.message.SystemMessageDO;
import com.yihu.jw.hospital.message.dao.SystemMessageDao;
import com.yihu.jw.utils.StringUtil;
import com.yihu.mysql.query.BaseJpaService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -21,6 +24,8 @@ public class SystemMessageService extends BaseJpaService<SystemMessageDO,SystemM
    @Autowired
    private SystemMessageDao systemMessageDao;
    @Autowired
    private ObjectMapper objectMapper;
    /**
@ -87,7 +92,23 @@ public class SystemMessageService extends BaseJpaService<SystemMessageDO,SystemM
        return systemMessageDO;
    }
    /**
     * 发送系统消息通用接口
     */
    public  SystemMessageDO commenSystemMessage(String jsonParam,String jsonContent) throws Exception{
        if (StringUtils.isNoneBlank(jsonParam)){
            SystemMessageDO systemMessageDO = objectMapper.readValue(jsonParam,SystemMessageDO.class);
            systemMessageDO.setDel("1");
            systemMessageDO.setIsRead("0");
            if (StringUtils.isNoneBlank(jsonContent)){
                JSONObject jsonObject = JSONObject.parseObject(jsonContent);
                systemMessageDO.setData(jsonObject.toJSONString());
            }
            systemMessageDao.save(systemMessageDO);
            return systemMessageDO;
        }
        return null;
    }
}

+ 9 - 3
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/TnyyEntranceService.java

@ -704,13 +704,17 @@ public class TnyyEntranceService {
     * @return
     * @throws Exception
     */
    public JSONArray selectMzRecord(String doctor) throws Exception {
    public JSONArray selectMzRecord(String doctor,String patientName) throws Exception {
        DoctorMappingDO doctorMappingDO = doctorMappingDao.findByDoctor(doctor);
        String condition = "";
        if (doctorMappingDO!=null){
            condition = " and mz.YSDM ='"+doctorMappingDO.getMappingCode()+"' ";
        }
        String sql = "SELECT br.BRID,br.BRXM,br.BRXB,CONVERT(varchar(100), br.CSNY, 120) as birthDay,br.MZHM,br.SFZH from MS_BRDA br WHERE br.BRID IN(SELECT mz.BRBH FROM YS_MZ_JZLS mz where 1=1 "+condition+" GROUP BY mz.BRBH ) and br.SFZH is not null and br.BRXM !='作废' ";
        if (StringUtils.isNoneBlank(patientName)){
            sql+=" and br.BRXM like '%"+patientName+"%'";
        }
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);
        logger.info("selectMzRecord:"+sql);
@ -733,7 +737,7 @@ public class TnyyEntranceService {
     * @return
     * @throws Exception
     */
    public JSONArray selectZyRecord(String doctor) throws Exception {
    public JSONArray selectZyRecord(String doctor,String patientName) throws Exception {
        DoctorMappingDO doctorMappingDO = doctorMappingDao.findByDoctor(doctor);
        String condition = "";
        if (doctorMappingDO!=null){
@ -742,6 +746,9 @@ public class TnyyEntranceService {
            return null;
        }
        String sql = "SELECT br.BRID,br.BRXM,br.BRXB,CONVERT(varchar(100), br.CSNY, 120) as birthDay ,br.MZHM,br.SFZH from MS_BRDA br WHERE br.BRID IN(SELECT cast(brry.BAHM as numeric(18,0)) FROM ZY_BRRY brry where 1=1 and isnumeric(brry.BAHM) = 1 "+condition+" GROUP BY brry.BAHM) and br.BRXM !='作废' and br.SFZH is not null ";
        if (StringUtils.isNoneBlank(patientName)){
            sql+=" and br.BRXM like '%"+patientName+"%' ";
        }
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);
        logger.info("selectZyRecord:"+sql);
@ -807,7 +814,6 @@ public class TnyyEntranceService {
                "\tV_ZY_BRRY brry\n" +
                "where\n" +
                "  brry.BAHM ='"+brid+"' ";
        sql += " order by h.KSSJ desc";
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);
        HttpResponse response = HttpUtils.doGet(url,params);

+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/internet/service/InternetCommonService.java

@ -376,9 +376,9 @@ public class InternetCommonService extends BaseJpaService<InternetUpErrorLogDO,
                jb.put("cert_no",  info.get("cert_no")== null ? "0":info.get("cert_no"));
                jb.put("prac_no",  info.get("prac_no")== null ? "0":info.get("prac_no"));
                //资格证书
                jb.put("doc_cert",ImgUtils.getImageStr(imgPath+"doctor"+ File.separator+info.get("name")+File.separator+"资格证.jpg"));
                jb.put("doc_cert",ImgUtils.getImageStr(imgPath+"doctor"+ File.separator+info.get("name")+File.separator+"zg.jpg"));
                //执业证书
                jb.put("cert_doc_prac", ImgUtils.getImageStr(imgPath+"doctor"+ File.separator+info.get("name")+File.separator+"执业证.jpg"));
                jb.put("cert_doc_prac", ImgUtils.getImageStr(imgPath+"doctor"+ File.separator+info.get("name")+File.separator+"zy.jpg"));
                jb.put("txt_introduction",StringUtils.isNoneBlank(superviseDataDict.getTxtIntroduction())?superviseDataDict.getTxtIntroduction():"");
            }catch (Exception e){

+ 1 - 1
business/es-service/src/main/java/com/yihu/jw/es/service/StatisticsEsService.java

@ -4144,7 +4144,7 @@ public class StatisticsEsService {
            //已接诊
            List<SaveModel> haveReceiveTotal = elasticsearchUtil.findListDateQuotaLevel2(startTime, endTime, area, level, index1, SaveModel.timeLevel_ZL, lowLevel,lowCode,"1");
            //未接诊
            List<SaveModel> noReceiveTotal = elasticsearchUtil.findListDateQuotaLevel2(startTime, endTime, area, level, index, SaveModel.timeLevel_ZL, lowLevel,lowCode,"0");
            List<SaveModel> noReceiveTotal = elasticsearchUtil.findListDateQuotaLevel2(startTime, endTime, area, level, index1, SaveModel.timeLevel_ZL, lowLevel,lowCode,"0");
            logger.info("noReceiveTotal"+noReceiveTotal==null?"0":String.valueOf(noReceiveTotal.size())+";"+noReceiveTotal.get(0).getResult1());
                result.put("resultList", getCoutListPC1(level, lowLevel, endTotal, total, haveReceiveTotal,noReceiveTotal,concleTotal));
    }

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

@ -1227,6 +1227,7 @@ public class BaseHospitalRequestMapping {
        public static final String updateMessage  = "/updateMessage";
        public static final String searchMessagePageList  = "/searchMessagePageList";
        public static final String queryById  = "/queryById";
        public static final String commenSystemMessage  = "/commenSystemMessage";
    }
    /**

+ 0 - 1
gateway/ag-basic/src/main/java/com/yihu/jw/gateway/methlog/WlyyHospitalSysDictDao.java

@ -1,6 +1,5 @@
package com.yihu.jw.gateway.methlog;
import com.yihu.jw.entity.base.login.BaseLoginLogDO;
import com.yihu.jw.entity.hospital.consult.WlyyHospitalSysDictDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;

+ 3 - 1
server/svr-authentication/src/main/java/com/yihu/jw/security/service/RegisterService.java

@ -13,6 +13,7 @@ import com.yihu.utils.security.MD5;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -40,6 +41,8 @@ public class RegisterService {
    @Autowired
    private StringRedisTemplate redisTemplate;
    @Value("${wechat.id}")
    private String wechatId;
    @Autowired
    private YkyyService ykyyService;
@ -133,7 +136,6 @@ public class RegisterService {
            patient.setLocked(0);
            patient.setCreateTime(new Date());
            patient.setUpdateTime(new Date());
            BasePatientDO temp = basePatientDao.save(patient);
            PatientMedicareCardDO medicareCardDO = new PatientMedicareCardDO();

+ 61 - 4
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/methodlog/MethodLogEndpoint.java

@ -3,7 +3,9 @@ package com.yihu.jw.base.endpoint.methodlog;
import com.yihu.jw.base.methlog.BaseMethodLogDO;
import com.yihu.jw.base.methlog.BaseMethodLogService;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.hospital.httplog.service.WlyyHttpLogService;
import com.yihu.jw.restmodel.base.doctor.BaseDoctorVO;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.rm.base.BaseRequestMapping;
@ -12,10 +14,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@ -31,6 +30,8 @@ public class MethodLogEndpoint extends EnvelopRestEndpoint {
	
	@Autowired
	private BaseMethodLogService baseMethodLogService;
	@Autowired
	private WlyyHttpLogService wlyyHttpLogService;
	
	@GetMapping(value = BaseRequestMapping.BaseMethodLog.getLog)
	@ApiOperation(value = "获取分页")
@ -54,4 +55,60 @@ public class MethodLogEndpoint extends EnvelopRestEndpoint {
		int count = (int) baseMethodLogService.getCount(filters);
		return success(baseDoctors, count, page, size);
	}
	@PostMapping(value = "/findHttpLog")
	@ApiOperation(value = "查询接口操作日志")
	public MixEnvelop findHttpLog(@ApiParam(name = "startTime", value = "startTime")
								  @RequestParam(value = "startTime", required = false) String startTime,
								  @ApiParam(name = "endTime", value = "endTime")
								  @RequestParam(value = "endTime", required = false) String endTime,
								  @ApiParam(name = "interfaceName", value = "interfaceName")
								  @RequestParam(value = "interfaceName", required = false) String interfaceName,
								  @ApiParam(name = "code", value = "code")
                                  @RequestParam(value = "code", required = false) String code,
								  @ApiParam(name = "patient", value = "patient")
								  @RequestParam(value = "patient", required = false) String patient,
								  @ApiParam(name = "doctor", value = "doctor")
								  @RequestParam(value = "doctor", required = false) String doctor,
								  @ApiParam(name = "responseKeyWord", value = "返回值关键字")
									  @RequestParam(value = "responseKeyWord", required = false) String responseKeyWord,
								  @ApiParam(name = "requestKeyWord", value = "请求参数关键字")
									  @RequestParam(value = "requestKeyWord", required = false) String requestKeyWord,
								  @ApiParam(name = "page", value = "page")
								  @RequestParam(value = "page", required = false) Integer page,
								  @ApiParam(name = "pageSize", value = "pageSize")
								  @RequestParam(value = "pageSize", required = false) Integer pageSize
	) {
		return wlyyHttpLogService.findWlyyHttpLogInBase(startTime,endTime,code,interfaceName,patient,doctor,responseKeyWord,requestKeyWord,page,pageSize);
	}
	@GetMapping(value = "/findLoginLog")
	@ApiOperation(value = "查询接口操作日志")
	public MixEnvelop findLoginLog(@ApiParam(name = "startTime", value = "startTime")
								  @RequestParam(value = "startTime", required = false) String startTime,
								  @ApiParam(name = "endTime", value = "endTime")
								  @RequestParam(value = "endTime", required = false) String endTime,
								   @ApiParam(name = "opreateStart", value = "opreateStart")
									   @RequestParam(value = "opreateStart", required = false) String opreateStart,
								   @ApiParam(name = "opreateEnd", value = "opreateEnd")
									   @RequestParam(value = "opreateEnd", required = false) String opreateEnd,
								  @ApiParam(name = "userId", value = "userId")
								  @RequestParam(value = "userId", required = false) String userId,
								  @ApiParam(name = "userName", value = "userName")
								  @RequestParam(value = "userName", required = false) String userName,
								  @ApiParam(name = "openId", value = "openId")
								  @RequestParam(value = "openId", required = false) String openId,
								  @ApiParam(name = "userAgent", value = "userAgent")
								  @RequestParam(value = "userAgent", required = false) String userAgent,
								  @ApiParam(name = "loginType", value = "2医生 3 患者 4 授权")
								  @RequestParam(value = "loginType", required = false) String loginType,
								  @ApiParam(name = "page", value = "page")
								  @RequestParam(value = "page", required = false) Integer page,
								  @ApiParam(name = "pageSize", value = "pageSize")
								  @RequestParam(value = "pageSize", required = false) Integer pageSize
	) {
		return wlyyHttpLogService.findLoginLog(startTime,endTime,userId,userName,openId,userAgent, loginType, opreateStart, opreateEnd,page,pageSize);
	}
}

+ 1 - 0
svr/svr-internet-hospital-job/src/main/resources/application.yml

@ -335,6 +335,7 @@ wlyy:
wechat:
  id: d24d1367-7f4f-43af-910e-a0a43799e040  # base库中,wx_wechat 的id字段
  flag: false #演示环境  true走Mysql数据库  false走Oracle
  ids: xm_xzzx_wx
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code:

+ 12 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/dict/PrivateDictEndpoint.java

@ -134,4 +134,16 @@ public class PrivateDictEndpoint extends EnvelopRestEndpoint {
        return success(list, count, page, pageSize, SystemMessageDO.class);
    }
    @PostMapping(value = BaseHospitalRequestMapping.SystemMessage.commenSystemMessage)
    @ApiOperation(value = "发送系统消息通用接口")
    public Envelop commenSystemMessage(
            @ApiParam(name = "jsonParam", value = "实体参数")
            @RequestParam(value = "jsonParam", required = false) String jsonParam,
            @ApiParam(name = "jsonContent", value = "消息内容")
            @RequestParam(value = "jsonContent", required = false) String jsonContent)throws Exception{
        return success(systemMessageService.commenSystemMessage(jsonParam,jsonContent));
    }
}

+ 12 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/hospital/WlyyFamilyMemberController.java

@ -10,6 +10,7 @@ import com.yihu.jw.hospital.family.dao.WlyyPatientFamilyMemberDao;
import com.yihu.jw.hospital.family.service.PatientMemberDictService;
import com.yihu.jw.hospital.family.service.WlyyFamilyMemberService;
import com.yihu.jw.hospital.prescription.service.entrance.EntranceService;
import com.yihu.jw.hospital.prescription.service.entrance.TnyyEntranceService;
import com.yihu.jw.hospital.prescription.service.entrance.XzzxEntranceService;
import com.yihu.jw.hospital.prescription.service.entrance.YkyyEntranceService;
import com.yihu.jw.restmodel.web.Envelop;
@ -65,6 +66,8 @@ public class WlyyFamilyMemberController extends EnvelopRestEndpoint {
    @Autowired
    private XzzxEntranceService xzzxEntranceService;
    @Autowired
    private TnyyEntranceService tnyyEntranceService;
    @Autowired
    private WlyyHospitalSysDictDao wlyyHospitalSysDictDao;
    @Value("${wechat.id}")
    private String wxId;
@ -142,8 +145,16 @@ public class WlyyFamilyMemberController extends EnvelopRestEndpoint {
                mixEnvelop.setMessage("您所添加的家属无就诊记录,无法添加");
                return  mixEnvelop;
            }
        }
        }else if ("sd_tnzyy_wx".equalsIgnoreCase(wxId)){
            com.alibaba.fastjson.JSONArray jsonArray1 = tnyyEntranceService.selectPatientMappingCode(idCard);
            if (jsonArray1!=null&&jsonArray1.size()>0){
            }else {
                mixEnvelop.setStatus(408);
                mixEnvelop.setMessage("您所添加的家属无就诊记录,无法添加");
                return  mixEnvelop;
            }
        }
        if (StringUtils.isEmpty(client_id)) {
            mixEnvelop.setStatus(468);
            mixEnvelop.setMessage("client_id不能为空");

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

@ -2377,9 +2377,11 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    @ApiOperation(value = "查询门诊记录下的患者列表")
    public Envelop selectMzRecord(
            @ApiParam(name = "doctor", value = "doctor")
            @RequestParam(value = "doctor",defaultValue = "",required = true) String doctor) throws Exception {
            @RequestParam(value = "doctor",defaultValue = "",required = true) String doctor,
            @ApiParam(name = "patientName", value = "patientName")
            @RequestParam(value = "patientName",defaultValue = "",required = false) String patientName) throws Exception {
        return success(tnyyEntranceService.selectMzRecord(doctor));
        return success(tnyyEntranceService.selectMzRecord(doctor,patientName));
    }
@ -2387,9 +2389,11 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    @ApiOperation(value = "查询住院记录下的患者列表")
    public Envelop selectZyRecord(
            @ApiParam(name = "doctor", value = "doctor")
            @RequestParam(value = "doctor",defaultValue = "",required = true) String doctor) throws Exception {
            @RequestParam(value = "doctor",defaultValue = "",required = true) String doctor,
            @ApiParam(name = "patientName", value = "patientName")
            @RequestParam(value = "patientName",defaultValue = "",required = false) String patientName) throws Exception {
        return success(tnyyEntranceService.selectZyRecord(doctor));
        return success(tnyyEntranceService.selectZyRecord(doctor,patientName));
    }