Преглед изворни кода

Merge remote-tracking branch 'origin/dev' into dev

lhh пре 1 недеља
родитељ
комит
e717476178

+ 6 - 16
business/base-service/src/main/java/com/yihu/jw/patient/service/BasePatientService.java

@ -2,37 +2,28 @@ package com.yihu.jw.patient.service;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.base.patient.PatientMedicareCardDO;
import com.yihu.jw.entity.hospital.consult.WlyyHospitalSysDictDO;
import com.yihu.jw.entity.hospital.prescription.WlyyInspectionDO;
import com.yihu.jw.entity.hospital.prescription.WlyyOutpatientDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionInfoDO;
import com.yihu.jw.healthCare.service.HealthCareNewService;
import com.yihu.jw.healthCare.service.HealthCareService;
import com.yihu.jw.hospital.mapping.dao.PatientMappingDao;
import com.yihu.jw.hospital.prescription.dao.OutpatientDao;
import com.yihu.jw.hospital.prescription.dao.PrescriptionDao;
import com.yihu.jw.hospital.prescription.dao.PrescriptionInfoDao;
import com.yihu.jw.hospital.prescription.dao.WlyyInspectionDao;
import com.yihu.jw.hospital.prescription.service.PrescriptionService;
import com.yihu.jw.hospital.ykyy.service.YkyyService;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.patient.dao.BasePatientGroupDao;
import com.yihu.jw.patient.dao.BasePatientGroupDictDao;
import com.yihu.jw.patient.util.ConstantUtils;
import com.yihu.jw.restmodel.base.patient.BasePatientVO;
import com.yihu.jw.restmodel.hospital.prescription.WlyyInspectionVO;
import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionInfoVO;
import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionVO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.rm.base.BaseRequestMapping;
import com.yihu.jw.rm.iot.IotRequestMapping;
import com.yihu.jw.sms.dao.HospitalSysDictDao;
import com.yihu.jw.util.common.IdCardUtil;
@ -40,10 +31,8 @@ import com.yihu.jw.utils.hibernate.HibenateUtils;
import com.yihu.mysql.query.BaseJpaService;
import com.yihu.utils.security.MD5;
import org.apache.commons.lang3.StringUtils;
import org.checkerframework.checker.units.qual.A;
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.data.repository.CrudRepository;
@ -166,7 +155,7 @@ public class BasePatientService<T, R extends CrudRepository> extends BaseJpaServ
     * @param sorts
     * @return
     */
    public MixEnvelop queryPatientBaseInfo(String nameOrIdcard, int page, int size, String sorts)throws Exception{
    public MixEnvelop queryPatientBaseInfo(String nameOrIdcard,String mobile, int page, int size, String sorts)throws Exception{
        List<Map<String, Object>> result = new ArrayList<>();
        String sql = "SELECT\n" +
                "\tID AS \"id\",\n" +
@ -189,11 +178,12 @@ public class BasePatientService<T, R extends CrudRepository> extends BaseJpaServ
                " street_name \"streetName\"," +
                " address AS \"address\"\n" +
                "FROM\n" +
                "\tbase_patient\n";
                "\tbase_patient where 1=1 ";
        if (StringUtils.isNotEmpty(nameOrIdcard)){
            sql+="WHERE\n" +
                    "\tNAME LIKE '%"+nameOrIdcard+"%'\n" +
                    "OR idcard LIKE '%"+nameOrIdcard+"%'\n";
            sql+=" and NAME LIKE '%"+nameOrIdcard+"%' OR idcard LIKE '%"+nameOrIdcard+"%' ";
        }
        if(StringUtils.isNotBlank(mobile)){
            sql  += " and mobile like '%"+mobile+"%' ";
        }
        /*sql+="ORDER BY\n" +
                "\tcreate_time DESC"*/;

+ 4 - 3
business/sms-service/src/main/java/com/yihu/jw/sms/service/TXYSmsService.java

@ -47,8 +47,9 @@ public class TXYSmsService {
     * 初始化接口参数
     */
    private void init(){
        if(redisTemplate.hasKey(key+ ":SecretId")){
            SecretId = redisTemplate.opsForValue().get(key + ":SecretId");
        String keyS = ":SecretId1";
        if(redisTemplate.hasKey(key+ keyS)){
            SecretId = redisTemplate.opsForValue().get(key + keyS);
            SecretKey = redisTemplate.opsForValue().get(key + ":SecretKey");
            signName = redisTemplate.opsForValue().get(key + ":signName");
            smsSdkAppId = redisTemplate.opsForValue().get(key + ":smsSdkAppId");
@ -60,7 +61,7 @@ public class TXYSmsService {
        for (WlyyHospitalSysDictDO wlyyHospitalSysDictDO:dictDOList){
            if (wlyyHospitalSysDictDO.getDictCode().equalsIgnoreCase("SecretId")){
                SecretId=wlyyHospitalSysDictDO.getDictValue();
                redisTemplate.opsForValue().set(key + ":SecretId",SecretId);
                redisTemplate.opsForValue().set(key + keyS,SecretId);
            }else if (wlyyHospitalSysDictDO.getDictCode().equalsIgnoreCase("SecretKey")){
                SecretKey=wlyyHospitalSysDictDO.getDictValue();
                redisTemplate.opsForValue().set(key + ":SecretKey",SecretKey);

+ 7 - 11
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/doctor/BaseDoctorEndpoint.java

@ -1,14 +1,12 @@
package com.yihu.jw.base.endpoint.doctor;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.base.endpoint.common.excel.AExcelReader;
import com.yihu.jw.base.endpoint.common.populationBatchImport.PopulationMsg;
import com.yihu.jw.base.service.doctor.BaseDoctorService;
import com.yihu.jw.base.service.doctor.excelImport.BaseDoctorExcelDO;
import com.yihu.jw.base.service.doctor.excelImport.BaseDoctorExcelDOReader;
import com.yihu.jw.base.service.org.OrgTreeService;
import com.yihu.jw.base.util.ConstantUtils;
import com.yihu.jw.base.util.JavaBeanUtils;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.hospital.consult.WlyyHospitalSysDictDO;
import com.yihu.jw.exception.business.ManageException;
import com.yihu.jw.hospital.dict.WlyyHospitalSysDictDao;
@ -30,10 +28,12 @@ import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.MediaType;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
@ -41,12 +41,6 @@ import java.io.OutputStream;
import java.util.List;
import java.util.Map;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
 * 医生基础信息控制器
 *
@ -227,6 +221,8 @@ public class BaseDoctorEndpoint extends EnvelopRestEndpoint {
    public PageEnvelop getDoctorFullInfolist(
            @ApiParam(name = "nameOrIdcard", value = "医生姓名或医生身份证号")
            @RequestParam(value = "nameOrIdcard", required = false) String nameOrIdcard,
            @ApiParam(name = "mobile", value = "身份证")
            @RequestParam(value = "mobile", required = false) String mobile,
            @RequestParam(value = "orgCode", required = false) String orgCode,
            @ApiParam(name = "doctorStatus", value = "医生是否生效")
            @RequestParam(value = "doctorStatus", required = false) String doctorStatus,
@ -234,7 +230,7 @@ public class BaseDoctorEndpoint extends EnvelopRestEndpoint {
            @RequestParam(value = "page") int page,
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
            @RequestParam(value = "size") int size) throws Exception {
        JSONObject result = baseDoctorService.queryDoctorListFullInfo(nameOrIdcard,orgCode, doctorStatus,page,size,wechatId);
        JSONObject result = baseDoctorService.queryDoctorListFullInfo(nameOrIdcard,mobile,orgCode, doctorStatus,page,size,wechatId);
        return success(result.getJSONArray("msg"),result.getInteger("count"),page,size);
    }

+ 3 - 9
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/patient/BasePatientEndpoint.java

@ -16,7 +16,6 @@ import com.yihu.jw.entity.base.servicePackage.ServicePackageRecordDO;
import com.yihu.jw.entity.base.servicePackage.ServicePackageSignRecordDO;
import com.yihu.jw.entity.base.team.BaseTeamDO;
import com.yihu.jw.entity.care.archive.ArchiveDO;
import com.yihu.jw.entity.care.device.DeviceDetail;
import com.yihu.jw.entity.care.label.WlyyPatientLabelDO;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.patient.service.BasePatientService;
@ -24,22 +23,15 @@ import com.yihu.jw.restmodel.base.patient.BasePatientVO;
import com.yihu.jw.restmodel.web.*;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.rm.base.BaseRequestMapping;
import com.yihu.utils.date.DateUtil;
import com.yihu.utils.security.MD5;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import jxl.Sheet;
import jxl.Workbook;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.util.*;
/**
@ -183,6 +175,8 @@ public class BasePatientEndpoint extends EnvelopRestEndpoint {
    public MixEnvelop queryPatientBaseInfo(
            @ApiParam(name = "nameOrIdcard", value = "居民姓名或身份证")
            @RequestParam(value = "nameOrIdcard", required = false) String nameOrIdcard,
            @ApiParam(name = "mobile", value = "身份证")
            @RequestParam(value = "mobile", required = false) String mobile,
            @ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1")
            @RequestParam(value = "page") int page,
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
@ -190,7 +184,7 @@ public class BasePatientEndpoint extends EnvelopRestEndpoint {
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts) throws Exception {
        return basePatientService.queryPatientBaseInfo(nameOrIdcard, page,size,sorts);
        return basePatientService.queryPatientBaseInfo(nameOrIdcard,mobile, page,size,sorts);
    }

+ 0 - 3
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/role/MenuEndpoint.java

@ -1,6 +1,5 @@
package com.yihu.jw.base.endpoint.role;
import com.alibaba.fastjson.JSON;
import com.yihu.jw.base.contant.CommonContant;
import com.yihu.jw.base.service.role.MenuService;
import com.yihu.jw.base.service.role.RoleMenuService;
@ -345,7 +344,6 @@ public class MenuEndpoint extends EnvelopRestEndpoint {
            @ApiParam(name = "roleId", value = "角色id")
            @RequestParam(value = "roleId", required = false) String roleId) {
        try {
            System.out.println("获取角色登录菜单==>参数:" + roleId);
            List<MenuVO> menuVOs = roleMenuService.findMenuByRoleId(roleId);
            menuVOs.forEach(menuVO -> {
                if (CommonContant.DEFAULT_PARENTID.equals(menuVO.getParentId())) {
@ -365,7 +363,6 @@ public class MenuEndpoint extends EnvelopRestEndpoint {
            menuVOs = menuVOs.stream()
                    .filter(menu -> CommonContant.DEFAULT_PARENTID.equals(menu.getParentId()))
                    .collect(Collectors.toList());
            System.out.println("结果==>" + JSON.toJSONString(menuVOs));
            return success(menuVOs);
        } catch (Exception e) {
            e.printStackTrace();

+ 6 - 114
svr/svr-base/src/main/java/com/yihu/jw/base/service/doctor/BaseDoctorService.java

@ -206,56 +206,13 @@ public class BaseDoctorService extends BaseJpaService<BaseDoctorDO, BaseDoctorDa
     * @param docStatus
     * @return
     */
    public JSONObject queryDoctorListFullInfo(String nameOrIdcard, String orgCode, String docStatus, int page, int size,String wechatId) throws Exception {
    public JSONObject queryDoctorListFullInfo(String nameOrIdcard,String mobile, String orgCode, String docStatus, int page, int size,String wechatId) throws Exception {
        JSONObject result = new JSONObject();
        String orgCodeVale = null == orgCode ? "" : orgCode;
        String del = null == docStatus ? "" : docStatus;
        String nameOrIdcardValue = null == nameOrIdcard ? "" : "%" + nameOrIdcard + "%";
        int start = 0 == page ? page++ : (page - 1) * size;
        int end = 0 == size ? 15 : page * size;
//        String sql = "select" +
//                "  tb.id as id," +
//                "  tb.name as name," +
//                "  tb.idcard as idcard,  " +
//                "  tb.sex as sex,  " +
//                "  tb.mobile as mobile,  " +
//                "  GROUP_CONCAT(tb.org SEPARATOR ',') as orgInfo,  " +
//                "  tb.job_title_name as jobTitleName,  " +
//                "  tb.status as status " +
//                "from  " +
//                "  (  " +
//                "    select  " +
//                "     doc.id,  " +
//                "     doc.name,  " +
//                "     doc.idcard,  " +
//                "     case doc.sex when 1 then '男' when 2 then '女' else '未知' end as sex,  " +
//                "     doc.mobile,  " +
//                "     concat(hos.org_name,'/',dept.name,'/',hos.doctor_duty_name) as org,  " +
//                "     doc.job_title_name,  " +
//                "     case doc.del when 0 then '已失效' when 1 then '生效中' end as status,  " +
//                "      doc.create_time  " +
//                "   from  " +
//                "     base_doctor doc,  " +
//                "     base_doctor_hospital hos,  " +
//                "     dict_hospital_dept dept  " +
//                "  where  " +
//                "    doc.id = hos.doctor_code  " +
//                "    and  " +
//                "    hos.org_code = dept.org_code " +
//                "    and " +
//                "    hos.dept_code = dept.code  " +
//                "    and  " +
//                "    ((doc.idcard like '{idcard}' or ''= '{idcard}' ) or (doc.name like '{name}'  or ''= '{name}' )  and (hos.org_code = '{orgCode}' or ''= '{orgCode}') and (doc.del = '{docStatus}' or ''= '{docStatus}'))  " +
//                "  ) tb  " +
//                "GROUP BY tb.id order by tb.create_time desc limit {start},{end} ";
//        String finalSql = sql
//                .replace("{idcard}",nameOrIdcardValue)
//                .replace("{name}",nameOrIdcardValue)
//                .replace("{orgCode}",orgCodeVale)
//                .replace("{docStatus}",del)
//                .replace("{start}",String.valueOf(start))
//                .replace("{end}",String.valueOf(end));
        String sql="SELECT\n" +
                "\ttb.id AS \"id\",\n" +
                "\ttb.idcard AS \"idcard\",\n" +
@ -311,16 +268,14 @@ public class BaseDoctorService extends BaseJpaService<BaseDoctorDO, BaseDoctorDa
                " base_doctor doc LEFT join base_doctor_hospital hos on doc.id = hos.doctor_code " +
                " LEFT JOIN dict_hospital_dept dept on hos.org_code = dept.org_code" +
                " AND hos.dept_code = dept.code"+
                /*"\tbase_doctor doc,\n" +
                "\tbase_doctor_hospital hos,\n" +
                "\tdict_hospital_dept dept\n" +*/
                " WHERE 1=1";
                /*"\tdoc.id = hos.doctor_code\n" +
                "AND hos.org_code = dept.org_code\n" +
                "AND hos.dept_code = dept.code\n"*/
        if (!StringUtils.isEmpty(nameOrIdcard)){
            sql += " and (doc.idcard LIKE '%"+nameOrIdcard+"%' or doc.name LIKE '%"+nameOrIdcard+"%')";
        }if (!StringUtils.isEmpty(orgCode)){
        }
        if(org.apache.commons.lang3.StringUtils.isNotBlank(mobile)){
            sql  += " and doc.mobile like '%"+mobile+"%' ";
        }
        if (!StringUtils.isEmpty(orgCode)){
            sql += " and hos.org_code = '"+orgCode+"'";
        }
        if (!StringUtils.isEmpty(del)){
@ -339,65 +294,8 @@ public class BaseDoctorService extends BaseJpaService<BaseDoctorDO, BaseDoctorDa
                "ORDER BY\n" +
                "\ttb.create_time DESC";
//        if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)){
//            sql+=" GROUP BY\n" +
//                    "\ttb. ID,\n" +
//                    "\ttb.idcard,\n" +
//                    "\ttb. NAME,\n" +
//                    "\ttb.sex,\n" +
//                    "\ttb.mobile,\n" +
//                    "\ttb.job_title_name,\n" +
//                    "\ttb.status,\n" +
//                    "  tb.create_time\n" +
//                    "ORDER BY\n" +
//                    "\ttb.create_time DESC";
//        }else {
//            sql+=" GROUP BY\n" +
//                    "\ttb. ID\n" +
//                    "ORDER BY\n" +
//                    "\ttb.create_time DESC";
//        }
        List<Map<String,Object>> list=null;
        list = hibenateUtils.createSQLQuery(sql,page,size);
       /* if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)){
            if (flag){
                sql+=" LIMIT  " + (page - 1) * size + "," + size + "";
                Logger.getAnonymousLogger().info("finalCountSql="+sql);
                list = jdbcTemplate.queryForList(sql);
            }else {
                String oracleSql="SELECT\n" +
                        "\t*\n" +
                        "FROM\n" +
                        "\t(\n" +
                        "\t\tSELECT\n" +
                        "\t\t\tA .*\n" +
                        "\t\tFROM\n" +
                        "\t\t\t(";
                oracleSql+=sql;
                oracleSql+="\t\t\t) A\n" +
                        "\t\tWHERE\n" +
                        "  ROWNUM <="+page*size +
                        "\t) \n" +
                        "WHERE\n" +
                        "\tROWNUM >= "+(page-1)*size;
                Logger.getAnonymousLogger().info("oracleSql="+oracleSql);
                list = jdbcTemplate.queryForList(oracleSql);
            }
        }else {
            sql+=" LIMIT  " + (page - 1) * size + "," + size + "";
            Logger.getAnonymousLogger().info("finalCountSql="+sql);
            list = jdbcTemplate.queryForList(sql);
        }*/
        String countSql = " select " +
                "     COUNT(DISTINCT (doc.id)) as count " +
                "   from " +
@ -419,7 +317,6 @@ public class BaseDoctorService extends BaseJpaService<BaseDoctorDO, BaseDoctorDa
            countSql += " and doc.del  = '"+del+"'";
        }
//        List<Map<String,Object>> list = jdbcTemplate.queryForList(finalSql);
        Logger.getAnonymousLogger().info("finalCountSql="+countSql);
        int count = jdbcTemplate.queryForObject(countSql,Integer.class);
        List<WlyyHospitalSysDictDO> listDict = wlyyHospitalSysDictDao.findByDictName("doctor_level");
@ -428,11 +325,6 @@ public class BaseDoctorService extends BaseJpaService<BaseDoctorDO, BaseDoctorDa
            String deptname = map.get("deptname")==null?"":map.get("deptname").toString();
            String doctorDutyName = map.get("doctorDutyName")==null?"":map.get("doctorDutyName").toString();
            map.put("orgInfo",orgname+"/"+deptname+"/"+doctorDutyName);
            /*for (WlyyHospitalSysDictDO wlyyHospitalSysDictDO:listDict){
                if (map.get("doctorlevel").toString().equals(wlyyHospitalSysDictDO.getDictCode())){
                    map.put("levelName",wlyyHospitalSysDictDO.getDictValue());
                }
            }*/
        }
        result.put("count", count);
        result.put("msg", JavaBeanUtils.getInstance().mapListJson(list));

+ 0 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/service/notice/NoticeService.java

@ -7,7 +7,6 @@ import com.yihu.jw.base.util.delay.DelayService;
import com.yihu.jw.base.util.delay.Notice;
import com.yihu.jw.base.util.delay.OnDelayedListener;
import com.yihu.jw.base.util.delay.RedisLock;
import com.yihu.jw.base.util.threadPool.ThreadPoolUtil;
import com.yihu.jw.entity.base.notice.NoticeDO;
import com.yihu.jw.entity.base.notice.UserNoticeDO;
import com.yihu.jw.entity.base.user.UserDO;

+ 13 - 11
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/assistance/EmergencyAssistanceService.java

@ -147,17 +147,19 @@ public class EmergencyAssistanceService extends BaseJpaService<EmergencyAssistan
     * 获取百度天气
     */
    public JSONObject getBaiduWeather(){
        try {
            String url = "https://api.map.baidu.com/weather/v1/?district_id=330100&data_type=now&ak=0vjnCSReegE7A47a941ohjv9a07ONiMC";
            String response = httpClientUtil.get(url,"UTF-8");
            JSONObject responseObj = JSONObject.parseObject(response);
            if (responseObj.getInteger("status")==0){
                JSONObject now = responseObj.getJSONObject("result").getJSONObject("now");
                return now;
            }
        }catch (Exception e){
            e.printStackTrace();
        }
//        try {
//            String url = "https://api.map.baidu.com/weather/v1/?district_id=330100&data_type=now&ak=0vjnCSReegE7A47a941ohjv9a07ONiMC";
//            String response = httpClientUtil.get(url,"UTF-8");
//            JSONObject responseObj = JSONObject.parseObject(response);
//            if (responseObj!=null&&responseObj.getInteger("status")!=null&&responseObj.getInteger("status")==0){
//                if(responseObj.getJSONObject("result")!=null){
//                    JSONObject now = responseObj.getJSONObject("result").getJSONObject("now");
//                    return now;
//                }
//            }
//        }catch (Exception e){
//            e.printStackTrace();
//        }
        return new JSONObject();
    }

+ 22 - 19
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/util/HttpClientUtilCare.java

@ -1,12 +1,6 @@
package com.yihu.jw.care.util;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.entity.base.dict.BaseExceptionDictDO;
import com.yihu.jw.entity.base.dict.BaseExceptionLogDO;
import com.yihu.jw.entity.base.dict.BaseExceptionServerDictDO;
import com.yihu.jw.util.dao.BaseExceptionDictUtilDao;
import com.yihu.jw.util.dao.BaseExceptionLogUtilDao;
import com.yihu.jw.util.dao.BaseExceptionServerDictUtilDao;
import org.apache.http.Consts;
import org.apache.http.HttpEntity;
import org.apache.http.NameValuePair;
@ -20,14 +14,10 @@ import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestTemplate;
@ -35,7 +25,10 @@ import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@Component
public class HttpClientUtilCare {
@ -566,14 +559,24 @@ public class HttpClientUtilCare {
    }
    public  org.springframework.http.HttpEntity<JSONObject> iotAssesTokenPostHttp(String url, MultiValueMap<String, String> params,HttpMethod method){
        RestTemplate restTemplate = new RestTemplate();
        HttpHeaders headers = new HttpHeaders();
        MediaType type = MediaType.parseMediaType(MediaType.APPLICATION_FORM_URLENCODED_VALUE);
        headers.setContentType(type);
        headers.add("Accept", MediaType.APPLICATION_JSON.toString());
        org.springframework.http.HttpEntity<MultiValueMap<String, String>> request = new org.springframework.http.HttpEntity<>(params, headers);
        org.springframework.http.HttpEntity<JSONObject> response = restTemplate.exchange(url, method, request, JSONObject.class);
        return response;
        try {
            RestTemplate restTemplate = new RestTemplate();
            HttpHeaders headers = new HttpHeaders();
            MediaType type = MediaType.parseMediaType(MediaType.APPLICATION_FORM_URLENCODED_VALUE);
            headers.setContentType(type);
            headers.add("Accept", MediaType.APPLICATION_JSON.toString());
            org.springframework.http.HttpEntity<MultiValueMap<String, String>> request = new org.springframework.http.HttpEntity<>(params, headers);
            org.springframework.http.HttpEntity<JSONObject> response = restTemplate.exchange(url, method, request, JSONObject.class);
            return response;
        }catch (Exception e){
            e.printStackTrace();
            JSONObject responseBody = new JSONObject();
            responseBody.put("code",-1);
            responseBody.put("msg","请求失败");
            org.springframework.http.HttpEntity<JSONObject> response = new org.springframework.http.HttpEntity<JSONObject>(responseBody);
            return response;
        }
    }
    /**