Browse Source

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

wangzhinan 4 years ago
parent
commit
48d02fa936

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

@ -58,6 +58,8 @@ import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.patient.dao.BasePatientMedicareCardDao;
import com.yihu.jw.restmodel.base.dict.DictHospitalDeptVO;
import com.yihu.jw.restmodel.base.org.BaseOrgVO;
import com.yihu.jw.restmodel.base.wx.WxGraphicMessageVO;
import com.yihu.jw.restmodel.base.wx.WxReplySceneVO;
import com.yihu.jw.restmodel.hospital.archive.ArchiveVO;
import com.yihu.jw.restmodel.hospital.consult.WlyyHospitalSysDictVO;
import com.yihu.jw.restmodel.hospital.doctor.WlyyDoctorWorkTimeVO;
@ -6788,7 +6790,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        String uid = userAgent.getUID();
        StringBuffer sql = new StringBuffer("SELECT b.*, c.oneself_pickup_flg,f.job_title_code,f.job_title_name  FROM (SELECT a.* FROM wlyy_prescription a WHERE a.patient_code = '");
        StringBuffer countSql = new StringBuffer("select COUNT(b.id) count FROM (SELECT a.* FROM wlyy_prescription a WHERE a.patient_code = '");
        sql.append(uid).append("') b LEFT JOIN wlyy_prescription_info d ON b.id = d.prescription_id LEFT JOIN wlyy_prescription_expressage c ON c.outpatient_id = b.outpatient_id LEFT JOIN base_doctor f ON b.doctor=f.id ");
        sql.append(uid).append("') b LEFT JOIN wlyy_prescription_info d ON b.id = d.prescription_id LEFT JOIN wlyy_prescription_expressage c ON c.outpatient_id = b.outpatient_id LEFT JOIN base_doctor f ON b.doctor=f.id  ");
        countSql.append(uid).append("') b LEFT JOIN wlyy_prescription_info d ON b.id = d.prescription_id LEFT JOIN wlyy_prescription_expressage c ON c.outpatient_id = b.outpatient_id LEFT JOIN base_doctor f ON b.doctor=f.id  ");
        if (StringUtils.isNotEmpty(status)){
@ -6816,8 +6818,38 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    " OR b.real_order LIKE '%"+keyName+"%' " +
                    ")");
        }
        sql.append(" order by b.prescribe_time DESC limit ").append((page-1)*size).append(",").append(size);
        List<WlyyPrescriptionVO> list = jdbcTemplate.query(sql.toString(), new BeanPropertyRowMapper<>(WlyyPrescriptionVO.class));
        sql.append(" order by b.prescribe_time DESC ");
        List<WlyyPrescriptionVO>  list=null;
        if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)){
            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.toString();
            oracleSql+="\t\t\t) A\n" +
                    "\t\tWHERE\n" +
                    "  ROWNUM <="+page*size +
                    "\t) \n" +
                    "WHERE\n" +
                    "\tROWNUM >= "+(page-1)*size;
            list = jdbcTemplate.query(oracleSql, new BeanPropertyRowMapper<>(WlyyPrescriptionVO.class));
        }else {
//            sql+=" LIMIT  " + (page - 1) * size + "," + size + "";
            sql.append("  limit ").append((page-1)*size).append(",").append(size);
            list = jdbcTemplate.query(sql.toString(), new BeanPropertyRowMapper<>(WlyyPrescriptionVO.class));
        }
//        List<WlyyPrescriptionVO> list = jdbcTemplate.query(sql.toString(), new BeanPropertyRowMapper<>(WlyyPrescriptionVO.class));
        List<Map<String, Object>> mapList = jdbcTemplate.queryForList(countSql.toString());
        long count = Long.parseLong(mapList.get(0).get("count").toString());
        logger.info("sql="+sql.toString());

+ 51 - 2
business/base-service/src/main/java/com/yihu/jw/wlyy/service/WlyyBusinessService.java

@ -14,12 +14,15 @@ import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorRoleDO;
import com.yihu.jw.entity.base.org.BaseOrgDO;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.base.patient.PatientMedicareCardDO;
import com.yihu.jw.entity.hospital.mapping.DoctorMappingDO;
import com.yihu.jw.entity.hospital.prescription.WlyyOutpatientDO;
import com.yihu.jw.hospital.mapping.dao.DoctorMappingDao;
import com.yihu.jw.hospital.prescription.dao.OutpatientDao;
import com.yihu.jw.hospital.prescription.service.PrescriptionService;
import com.yihu.jw.org.dao.BaseOrgDao;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.patient.dao.BasePatientMedicareCardDao;
import com.yihu.jw.util.common.IdCardUtil;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.util.wechat.wxhttp.HttpUtil;
@ -75,6 +78,13 @@ public class WlyyBusinessService {
    @Autowired
    private DoctorMappingDao doctorMappingDao;
    @Autowired
    private PrescriptionService prescriptionService;
    @Autowired
    private BasePatientMedicareCardDao patientMedicareCardDao;
    /**
     * 推送系统门诊wlyy系统消息
     * @param doctor
@ -254,7 +264,7 @@ public class WlyyBusinessService {
     * @return
     * @throws Exception
     */
    public String wlyyGetPatientAccetokenByIdcard(String patientId) throws Exception {
    public String wlyyGetPatientAccetokenByIdcard(String patientId,String wxId) throws Exception {
        
        String idcard = "";
        String result = "";
@ -264,7 +274,46 @@ public class WlyyBusinessService {
    
            Map<String,String> params = new HashMap<>();
            params.put("idcard",idcard);
            
            String patientCardNo = null;
            if (wxId.equalsIgnoreCase("xm_zsyy_wx")){
                net.sf.json.JSONArray array =prescriptionService.findPatientCard(patientId);
                for (int i=0;i<array.size();i++){
                    net.sf.json.JSONObject object = array.getJSONObject(i);
                    String cardType = object.getString("CARD_TYPE");
                    String cardNo = object.getString("CARD_NO");
                    String cardTypeName = object.getString("CARD_TYPE_NAME");
                    PatientMedicareCardDO patientMedicareCardDO = patientMedicareCardDao.findByCode(cardNo);
                    if (patientMedicareCardDO==null){
                        patientMedicareCardDO = new PatientMedicareCardDO();
                        patientMedicareCardDO.setCode(cardNo);
                        patientMedicareCardDO.setParentType("A");
                        if (cardType.equalsIgnoreCase("2")){
                            patientMedicareCardDO.setType("A_01");
                            patientCardNo = cardNo;
                        }else {
                            patientMedicareCardDO.setType("A_03");
                        }
                        patientMedicareCardDO.setPatientCode(patientId);
                        patientMedicareCardDO.setOrgCode("350211A1002");
                        patientMedicareCardDO.setCityCode("350200");
                        patientMedicareCardDO.setDel("1");
                        patientMedicareCardDO.setRemark(cardTypeName);
                        patientMedicareCardDao.save(patientMedicareCardDO);
                    }
                }
            }else {
                //TODO
            }
            //查询i健康信息,没有就注册;
            Map<String,String> patientSccParams = new HashMap<>();
            patientSccParams.put("scc",patientCardNo);
            patientSccParams.put("name",basePatientDO.getName());
            patientSccParams.put("idCard",basePatientDO.getIdcard());
            patientSccParams.put("phone",basePatientDO.getPhone());
            patientSccParams.put("birthday",basePatientDO.getBirthday().toString());
            wlyyHttpService.sendWlyyMes("wlyyFindAccountBySsc",null,params);
            JSONObject rs = wlyyHttpService.sendWlyyMes("wlyyGetPatientAccetokenByIdcard",null,params);
            if(rs!=null){
                Integer status = rs.getInteger("status");

+ 1 - 5
common/common-entity/pom.xml

@ -23,10 +23,6 @@
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hibernate.validator</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>6.0.13.Final</version>
        </dependency>
    </dependencies>
</project>

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

@ -304,8 +304,13 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
        }
    
        //医生咨询
        result.put("zxCount",imService.SessionsUnreadMessageCount(doctor.getId(),"1"));//专家咨询咨询数量
        result.put("fzCount",imService.SessionsUnreadMessageCount(doctor.getId(),"9"));//图文复诊数量
        Integer zxCount = imService.SessionsUnreadMessageCount(doctor.getId(), "1");
        Integer fzCount = imService.SessionsUnreadMessageCount(doctor.getId(), "9");
        Integer spCount = imService.SessionsUnreadMessageCount(doctor.getId(), "16");
        result.put("zxCount",zxCount);//专家咨询咨询数量
        result.put("fzCount",fzCount);//图文复诊数量
        result.put("spCount",spCount);//图文复诊数量
        result.put("totalCount",zxCount+fzCount+spCount);
        return success("请求成功",result);
    }

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

@ -1020,7 +1020,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    @ApiOperation(value = "根据居民CODE换取居民请求秘钥")
    public Envelop getPatientAccetokenByIdcard(@ApiParam(name = "patientCode", value = "居民CODE")
                                               @RequestParam(value = "patientCode",required = true) String patientCode)throws Exception{
        return success(wlyyBusinessService.wlyyGetPatientAccetokenByIdcard(patientCode));
        return success(wlyyBusinessService.wlyyGetPatientAccetokenByIdcard(patientCode,wxId));
    }
    
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findWlyyPatient)

+ 3 - 28
svr/svr-iot-job/pom.xml

@ -32,10 +32,6 @@
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.tomcat.embed</groupId>
            <artifactId>tomcat-embed-jasper</artifactId>
@ -82,17 +78,15 @@
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>base-service</artifactId>
            <version>${parent.version}</version>
            <artifactId>common-exception</artifactId>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>im-service</artifactId>
            <version>2.0.0</version>
            <artifactId>common-util</artifactId>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-exception</artifactId>
            <artifactId>common-web</artifactId>
        </dependency>
        <!-- Jzkl Starter -->
        <dependency>
@ -106,18 +100,6 @@
            <version>2.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-core</artifactId>
            <version>RELEASE</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-commons</artifactId>
            <version>1.3.2</version>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
@ -151,13 +133,6 @@
            <version>2.4.4</version>
        </dependency>
        <!--oracle驱动-->
        <dependency>
            <groupId>com.oracle</groupId>
            <artifactId>ojdbc6</artifactId>
            <version>11.2.0.3</version>
        </dependency>
    </dependencies>
    <build>

+ 0 - 96
svr/svr-iot-job/src/main/java/com/yihu/jw/service/device/IotDeviceSimService.java

@ -1,17 +1,11 @@
package com.yihu.jw.service.device;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.entity.iot.device.IotDeviceDO;
import com.yihu.jw.entity.iot.device.IotDeviceSimDO;
import com.yihu.jw.entity.iot.device.IotPatientDeviceDO;
import com.yihu.jw.entity.iot.dict.IotSystemDictDO;
import com.yihu.jw.repository.device.IotDeviceDao;
import com.yihu.jw.repository.device.IotDeviceSimDao;
import com.yihu.jw.repository.device.IotPatientDeviceDao;
import com.yihu.jw.repository.dict.IotSystemDictDao;
import com.yihu.jw.restmodel.iot.device.IotOrderVO;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.iot.IotRequestMapping;
import com.yihu.jw.util.http.HttpClientUtil;
import com.yihu.mysql.query.BaseJpaService;
import org.apache.commons.lang.StringUtils;
@ -23,7 +17,6 @@ import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
 * @author HZY
@ -72,96 +65,7 @@ public class IotDeviceSimService extends BaseJpaService<IotDeviceSimDO, IotDevic
        iotDeviceSimDao.save(simDO);
    }
    /**
     *新增SIM卡
     * @param json
     */
    public MixEnvelop<IotOrderVO, IotOrderVO> addSIM(String json) {
        IotDeviceSimDO sim = JSONObject.parseObject(json, IotDeviceSimDO.class);
        IotDeviceSimDO deviceSimDaoBySim = iotDeviceSimDao.findBySim(sim.getSim());
        if(deviceSimDaoBySim!=null){
            return MixEnvelop.getError("SIM已存在");
        }
        IotPatientDeviceDO patientSim = iotPatientDeviceDao.findBySim(sim.getSim());
        if (patientSim!=null){
            sim.setDeviceName(patientSim.getDeviceName());
            sim.setDeviceSn(patientSim.getDeviceSn());
            sim.setContactsName(patientSim.getPatientName());
            sim.setContactsMobile(patientSim.getMobile());
        } else {
            IotDeviceDO deviceSim = iotDeviceDao.findBySimNo(sim.getSim());
            if (deviceSim!=null){
                sim.setDeviceName(deviceSim.getName());
                sim.setDeviceSn(deviceSim.getDeviceSn());
            }
        }
        sim.setRemainingBalance(sim.getAdvancePayment()-sim.getPayment());
        sim.setStatus(1);
        sim.setDel("0");
        iotDeviceSimDao.save(sim);
        return MixEnvelop.getSuccess(IotRequestMapping.DeviceSim.message_success_add);
    }
    /**
     * 条件分页查找
     * @param page
     * @param size
     * @param status
     * @param sim
     * @param sn
     * @return
     */
    public MixEnvelop<IotDeviceSimDO, IotDeviceSimDO> conditionQueryPage(Integer page, Integer size, String status, String sim, String sn){
        StringBuffer sql = new StringBuffer("SELECT c.* from iot_device_sim c WHERE 1=1 ");
        StringBuffer sqlCount = new StringBuffer("SELECT COUNT(c.id) count from iot_device_sim c  WHERE 1=1 ");
        List<Object> args = new ArrayList<>();
        if(StringUtils.isNotBlank(status)){
            sql.append(" and c.status=? ");
            sqlCount.append("and c.status='").append(status).append("' ");
            args.add(status);
        }
        if(StringUtils.isNotBlank(sim)){
            sql.append(" and (c.sim like '%").append(sim).append("%')");
            sqlCount.append(" and (c.sim like '%").append(sim).append("%')");
        }
        if(StringUtils.isNotBlank(sn)){
            sql.append(" and (c.device_sn like '%").append(sn).append("%')");
            sqlCount.append(" and (c.device_sn like '%").append(sn).append("%')");
        }
        sql.append("order by c.update_time desc limit ").append((page-1)*size).append(",").append(size);
        List<IotDeviceSimDO> list = jdbcTemplate.query(sql.toString(),args.toArray(),new BeanPropertyRowMapper(IotDeviceSimDO.class));
        List<Map<String,Object>> countList = jdbcTemplate.queryForList(sqlCount.toString());
        long count = Long.valueOf(countList.get(0).get("count").toString());
        return MixEnvelop.getSuccessListWithPage(IotRequestMapping.DeviceSim.message_success_find,list, page, size,count);
    }
    /**
     * 分页查找所有应用SIM卡信息
     * @param page
     * @param size
     * @return
     */
    public MixEnvelop<IotDeviceSimDO, IotDeviceSimDO> findAllSim(Integer page, Integer size) {
        StringBuffer sql= new StringBuffer("SELECT DISTINCT * FROM iot_device_sim ");
        sql.append(" limit ").append((page-1)*size).append(",").append(size);
        List<IotDeviceSimDO> list = jdbcTemplate.query(sql.toString(),new BeanPropertyRowMapper(IotDeviceSimDO.class));
        //获取总数
        long count = list.size();
        return MixEnvelop.getSuccessListWithPage(IotRequestMapping.DeviceSim.message_success_find,list,page, size,count);
    }
    /**

+ 1 - 40
svr/svr-iot-job/src/main/java/com/yihu/jw/web/quota/JobController.java

@ -1,10 +1,6 @@
package com.yihu.jw.web.quota;
import com.yihu.jw.entity.hospital.prescription.WlyyOutpatientDO;
import com.yihu.jw.im.service.ImService;
import com.yihu.jw.internet.service.DataGeneratorService;
import com.yihu.jw.internet.service.ykyy.YkyyInternetService;
import com.yihu.jw.job.*;
import com.yihu.jw.job.QuartzHelper;
import com.yihu.jw.job.wlw.DeviceQualityPlanJob;
import com.yihu.jw.job.wlw.InventoryWarningJob;
import com.yihu.jw.job.wlw.SimBalanceJob;
@ -26,7 +22,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.List;
import java.util.UUID;
/**
@ -43,15 +38,6 @@ public class JobController extends BaseController {
    private final JobService jobService;
    private final QuartzHelper quartzHelper;
    @Autowired
    private ImService imService;
    @Autowired
    private DataGeneratorService dataGeneratorService;
    @Autowired
    private YkyyInternetService ykyyInternetService;
    @Autowired
    private SimBalanceService simBalanceService;
@ -302,31 +288,6 @@ public class JobController extends BaseController {
    }
    @RequestMapping(value = "/delData", method = RequestMethod.POST)
    @ApiOperation("删除数据")
    public String delData(String doctor,String date) {
        try {
            List<WlyyOutpatientDO> list = dataGeneratorService.delData(doctor,date);
            imService.deleteJobData(list,date);
            return write(200, "数据已经删除");
        } catch (Exception e) {
            error(e);
            return error(-1, "数据已经删除");
        }
    }
    @RequestMapping(value = "/testImg", method = RequestMethod.GET)
    @ApiOperation("测试图片")
    public String testImg(String path) {
      return write(200, ykyyInternetService.testImg(path));
    }
    @RequestMapping(value = "/deviceInventoryWarning", method = RequestMethod.GET)
    @ApiOperation("设备库存预警提醒")
    public String deviceInventoryWarning() {

+ 1 - 141
svr/svr-iot-job/src/main/resources/application.yml

@ -120,81 +120,6 @@ wlyy:
wechat:
  id: d24d1367-7f4f-43af-910e-a0a43799e040  # base库中,wx_wechat 的id字段
---
spring:
  profiles: jwOracleTest
  datasource:
    driver-class-name: oracle.jdbc.driver.OracleDriver
    url: jdbc:oracle:thin:@172.26.0.141:1521:helowin
    username: normal
    password: normal
  jpa:
    properties:
      hibernate:
        dialect: org.hibernate.dialect.Oracle10gDialect
        show_sql: true
    database: oracle
hlwyyEntrance:
  url: http://172.16.1.42:10023
# mq 是否获取his数据,flag代表获取演示数据,false代表获取his真实数据
demo:
  flag: false
hospital:
  url: https://wx.xmzsh.com
  mqUser: JKZL
  mqPwd: 123456
  SourceSysCode: S60
  TargetSysCode: S01
im:
  im_list_get: http://172.26.0.105:3000/
  data_base_name: im_internet_hospital
fastDFS:
  fastdfs_file_url: http://172.26.0.110:8888/
wlyy:
  url: http://www.xmtyw.cn/wlyytest/
wechat:
  id: xm_ykyy_wx  # base库中,wx_wechat 的id字段
---
spring:
  profiles: jwOracleProd
  datasource:
    driver-class-name: oracle.jdbc.driver.OracleDriver
    url: jdbc:oracle:thin:@10.10.10.16:1521/rac
    username: HLWYY
    password: Xmykzxhlwyy963
  jpa:
    properties:
      hibernate:
        dialect: org.hibernate.dialect.Oracle10gDialect
        show_sql: true
    database: oracle
hlwyyEntrance:
  url: http://172.16.1.42:10023
# mq 是否获取his数据,flag代表获取演示数据,false代表获取his真实数据
demo:
  flag: false
hospital:
  url: https://wx.xmzsh.com
  mqUser: JKZL
  mqPwd: 123456
  SourceSysCode: S60
  TargetSysCode: S01
im:
  im_list_get: http://172.26.0.105:3000/
  data_base_name: im_internet_hospital
fastDFS:
  fastdfs_file_url: http://172.26.0.110:8888/
wlyy:
  url: http://www.xmtyw.cn/wlyytest/
wechat:
  id: xm_ykyy_wx  # base库中,wx_wechat 的id字段
---
spring:
  profiles: jwprod
@ -224,78 +149,13 @@ wlyy:
wechat:
  id: d24d1367-7f4f-43af-910e-a0a43799e040  # base库中,wx_wechat 的id字段
---
spring:
  profiles: xzprod
  datasource:
    url: jdbc:mysql://172.16.100.240:7306/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true
    username: jkzl
    password: jkzl@2020
hlwyyEntrance:
  url: http://172.16.100.63:10023
# mq 是否获取his数据,flag代表获取演示数据,false代表获取his真实数据
demo:
  flag: false
hospital:
  url: https://wx.xmzsh.com
  mqUser: JKZL
  mqPwd: 123456
  SourceSysCode: S60
  TargetSysCode: S01
im:
  im_list_get: http://172.16.100.241:3000/
  data_base_name: im
fastDFS:
  fastdfs_file_url: http://172.16.100.240:8888/
wlyy:
  url: http://www.xmtyw.cn/wlyytest/
wechat:
  id: d24d1367-7f4f-43af-910e-a0a43799e040  # base库中,wx_wechat 的id字段
---
spring:
  profiles: xzprod_in
  datasource:
    url: jdbc:mysql://192.168.103.155:7306/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true
    username: jkzl
    password: jkzl@2020
hlwyyEntrance:
  url: http://172.16.100.63:10023
# mq 是否获取his数据,flag代表获取演示数据,false代表获取his真实数据
demo:
  flag: false
hospital:
  url: https://wx.xmzsh.com
  mqUser: JKZL
  mqPwd: 123456
  SourceSysCode: S60
  TargetSysCode: S01
im:
  im_list_get: http://192.168.103.150:3000/
  data_base_name: im
fastDFS:
  fastdfs_file_url: http://192.168.103.159:8888/
wlyy:
  url: http://www.xmtyw.cn/wlyytest/
wechat:
  id: d24d1367-7f4f-43af-910e-a0a43799e040  # base库中,wx_wechat 的id字段
---
spring:
  profiles: iotprod
  datasource:
    url: jdbc:mysql://59.61.92.90:20002/xmiot?useUnicode:true&amp;characterEncoding=utf-8&amp;autoReconnect=true
    url: jdbc:mysql://10.90.32.2:20002/xmiot?useUnicode:true&amp;characterEncoding=utf-8&amp;autoReconnect=true
    username: wlyy
    password: jkzlehr@123
  redis:
    host: 59.61.92.90 # Redis server host.
    port: 9054  # Redis server port.
    password: jkzlehr
wlyy:
  url: http://www.xmtyw.cn/wlyy/

+ 1 - 1
svr/svr-iot-job/src/main/resources/bootstrap.yml

@ -74,5 +74,5 @@ spring:
  profiles: iotprod
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://192.168.120.174:1221}
      uri: ${wlyy.spring.config.uri:http://192.168.120.216:1221}
      label: ${wlyy.spring.config.label:master}

+ 1 - 1
svr/svr-iot/src/main/java/com/yihu/iot/controller/platform/IotInterfaceController.java

@ -360,7 +360,7 @@ public class IotInterfaceController extends EnvelopRestEndpoint {
                size = 10;
            }
            return MixEnvelop.getSuccess(IotRequestMapping.Platform.message_success_find, iotInterfaceLogService.findInterfaceLog(page,size,interfaceName,addressIp));
            return iotInterfaceLogService.findInterfaceLog(page,size,interfaceName,addressIp);
        } catch (Exception e) {
            e.printStackTrace();
            return MixEnvelop.getError(e.getMessage());

+ 6 - 2
svr/svr-iot/src/main/java/com/yihu/iot/service/platform/IotInterfaceLogService.java

@ -101,17 +101,21 @@ public class IotInterfaceLogService extends BaseJpaService<IotInterfaceLogDO, Io
        StringBuffer sql =new StringBuffer("SELECT c.* FROM iot_interface_log c WHERE 1=1 ");
        StringBuffer countSql=new StringBuffer("SELECT COUNT(c.id) count FROM iot_interface_log c WHERE 1=1 ");
        if (StringUtils.isNotBlank(interfaceName)){
            sql.append(" and c.interface_name like'%").append(interfaceName).append("%'");
            countSql.append(" and c.interface_name like'%").append(interfaceName).append("%'");
        }
        if (StringUtils.isNotBlank(addressIP)){
            sql.append(" and c.address_ip='").append(addressIP).append("'");
            countSql.append(" and c.address_ip='").append(addressIP).append("'");
        }
        sql.append(" order by c.time desc limit ").append((page-1)*size).append(",").append(size);
        List<IotInterfaceLogDO> list = jdbcTemplate.query(sql.toString(), new BeanPropertyRowMapper<>(IotInterfaceLogDO.class));
        List<Map<String, Object>> mapList = jdbcTemplate.queryForList(countSql.toString());
        ArrayList<IotInterfaceLogVO> resultList = new ArrayList<>();
        list.forEach(one->{
@ -120,7 +124,7 @@ public class IotInterfaceLogService extends BaseJpaService<IotInterfaceLogDO, Io
            resultList.add(target);
        });
        long count =list.size();
        long count = (long) mapList.get(0).get("count");
        return MixEnvelop.getSuccessListWithPage(IotRequestMapping.Platform.message_success_find,resultList,page, size,count);

+ 10 - 0
svr/svr-wlyy-health-bank/pom.xml

@ -25,6 +25,10 @@
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-tomcat</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.hibernate</groupId>
                    <artifactId>hibernate-validator</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
@ -111,6 +115,12 @@
            <groupId>com.yihu</groupId>
            <artifactId>mysql-starter</artifactId>
            <version>2.0.0</version>
            <exclusions>
                <exclusion>
                    <groupId>org.hibernate</groupId>
                    <artifactId>hibernate-validator</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.yihu</groupId>