Browse Source

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

wangzhinan 5 years ago
parent
commit
0552f29253

+ 3 - 3
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/role/RoleVO.java

@ -20,7 +20,7 @@ public class RoleVO extends UuidIdentityVOWithOperator {
	@ApiModelProperty(value = "角色代码", example = "1")
	private String code;
	@ApiModelProperty(value = "1.系统管理员,2.saas管理员,3.机构管理员", example = "1")
	private String type;
	private Integer type;
	@ApiModelProperty(value = "sassId", example = "1")
	private String saasId;
	@ApiModelProperty(value =  "状态: -1 删除,1有效.", example = "1")
@ -58,11 +58,11 @@ public class RoleVO extends UuidIdentityVOWithOperator {
		this.code = code;
	}
	public String getType() {
	public Integer getType() {
		return type;
	}
	public void setType(String type) {
	public void setType(Integer type) {
		this.type = type;
	}

+ 1 - 1
gateway/ag-basic/src/main/resources/application.yml

@ -182,7 +182,7 @@ spring:
spring:
  profiles: iotprod
  datasource:
     url: jdbc:mysql://59.61.92.90:20002/iot-base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true&useSSL=false
     url: jdbc:mysql://10.90.32.2:20002/iot-base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true&useSSL=false
     username: wlyy
     password: jkzlehr@123
  redis:

+ 1 - 1
gateway/ag-basic/src/main/resources/bootstrap.yml

@ -95,5 +95,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
server/svr-authentication/src/main/resources/bootstrap.yml

@ -97,5 +97,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
server/svr-configuration/src/main/resources/bootstrap.yml

@ -137,6 +137,6 @@ spring:
      failFast: true #启动快速失败 即链接不到配置服务就启动失败
      server:
        git:
          uri: ${wlyy.spring.config.git.uri:http://192.168.120.216:10010/jkzl/config.git}
          uri: ${wlyy.spring.config.git.uri:http://127.0.0.1:10010/jkzl/config.git}
          basedir: /usr/local/wlyy2.0-config
        default-label: ${wlyy.spring.config.git.label:master}

+ 5 - 5
svr/svr-base/src/main/resources/application.yml

@ -292,7 +292,7 @@ testPattern:
spring:
  profiles: iotprod
  datasource:
    url: jdbc:mysql://59.61.92.90:20002/iot-base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true
    url: jdbc:mysql://10.90.32.2:20002/iot-base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true
    username: wlyy
    password: jkzlehr@123
#    url: jdbc:mysql://172.19.103.77/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true
@ -300,10 +300,10 @@ spring:
#    password: 123456
  elasticsearch:
    cluster-name: jkzl #集群名 默认elasticsearch
    cluster-nodes: 59.61.92.90:20010,59.61.92.90:20012 #配置es节点信息,逗号分隔,如果没有指定,则启动ClientNode
    cluster-nodes: 10.90.32.2:20010,10.90.32.2:20012 #配置es节点信息,逗号分隔,如果没有指定,则启动ClientNode
    client-transport-sniff: false
    jest:
      uris: http://59.61.92.90:20009,http://59.61.92.90:20011
      uris: http://10.90.32.2:20009,http://10.90.32.2:20011
      connection-timeout: 60000 # Connection timeout in milliseconds.
      multi-threaded: true # Enable connection requests from multiple execution threads.
  activemq:
@ -311,8 +311,8 @@ spring:
    user: admin
    password: admin
  redis:
    host: 59.61.92.90 # Redis server host.
    port: 9054  # Redis server port.
    host: 10.90.32.2 # Redis server host.
    port: 20008  # Redis server port.
    password: jkzlehr
fastDFS:
  fastdfs_file_url: http://172.19.103.54:80/

+ 1 - 1
svr/svr-base/src/main/resources/bootstrap.yml

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

+ 10 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/file_upload/FileUploadEndpoint.java

@ -13,6 +13,7 @@ import com.yihu.jw.wlyy.service.WlyyBusinessService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -70,7 +71,9 @@ public class FileUploadEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = BaseRequestMapping.FileUpload.UPLOAD_STREAM)
    @ApiOperation(value = "文件流上传文件", notes = "文件流上传文件")
    public ObjEnvelop<UploadVO> uploadStream(@ApiParam(value = "文件", required = true)
                                                 @RequestParam(value = "file", required = true) MultipartFile file) throws Exception{
                                                 @RequestParam(value = "file", required = true) MultipartFile file,
                                             @ApiParam(value = "文件", required = true)
                                             @RequestParam(value = "filename", required = false) String filename) throws Exception{
        UploadVO uploadVO = new UploadVO();
        if (isClose.equalsIgnoreCase("1")){
            Map<String, Object> map = fileUploadService.uploadImg(file);
@ -85,6 +88,12 @@ public class FileUploadEndpoint extends EnvelopRestEndpoint {
        }else {
            // 得到文件的完整名称  xxx.txt
            String originalFilename = file.getOriginalFilename();
            
            //判断文件名称是否有包含后缀,及前端是否有传后缀名称,有的话拼接图片后缀
            if(originalFilename.lastIndexOf(".") == 0 && StringUtils.isNotEmpty(filename)){
                originalFilename = originalFilename +"."+filename;
            }
            
            InputStream inputStream = file.getInputStream();
            uploadVO = fileUploadService.uploadStream(inputStream,originalFilename,fastdfs_file_url);
        }

+ 1 - 1
svr/svr-iot/readme.MD

@ -3,7 +3,7 @@ Internet of things  物联网平台
filters 字符串拼接规则
         * like:使用"?"来表示,如:name?'%医'
         * like:使用"?"来表示,如:name?医
         * in:使用"="来表示并用","逗号对值进行分隔,如:status=2,3,4,5
         * not in:使用"<>"来表示并用","逗号对值进行分隔,如:status=2,3,4,5
         * =:使用"="来表示,如:status=2

+ 5 - 1
svr/svr-iot/src/main/java/com/yihu/iot/controller/device/IotDeviceInventoryController.java

@ -62,6 +62,10 @@ public class IotDeviceInventoryController extends EnvelopRestEndpoint {
                                                                                              @RequestParam(value = "name", required = false) String name,
                                                                                              @ApiParam(name = "categoryCode", value = "设备类型标识")
                                                                                              @RequestParam(value = "categoryCode", required = false) String categoryCode,
                                                                                              @ApiParam(name = "hospital", value = "社区医院", defaultValue = "")
                                                                                                  @RequestParam(value = "hospital", required = false) String hospital,
                                                                                              @ApiParam(name = "productId", value = "产品id")
                                                                                                  @RequestParam(value = "productId", required = false) String productId,
                                                                                              @ApiParam(name = "type", value = "调拨类型(1入库 2设备调拨出库 3核销出库)")
                                                                                              @RequestParam(value = "type", required = false) Integer type,
                                                                                              @ApiParam(name = "page", value = "第几页", defaultValue = "1")
@ -69,7 +73,7 @@ public class IotDeviceInventoryController extends EnvelopRestEndpoint {
                                                                                              @ApiParam(name = "pageSize", value = "每页记录数")
                                                                                              @RequestParam(value = "pageSize", required = false) Integer pageSize) {
        try {
            return deviceInventoryService.getDeviceInventoryLog(name, categoryCode, type, page, pageSize);
            return deviceInventoryService.getDeviceInventoryLog(name, categoryCode,hospital, productId, type, page, pageSize);
        } catch (Exception e) {
            e.printStackTrace();
            return MixEnvelop.getError(e.getMessage());

+ 7 - 1
svr/svr-iot/src/main/java/com/yihu/iot/service/device/IotDeviceInventoryService.java

@ -149,7 +149,7 @@ public class IotDeviceInventoryService extends BaseJpaService<IotDeviceInventory
        return deviceDOList.size();
    }
    public MixEnvelop<IotDeviceInventoryLogVO, IotDeviceInventoryLogVO> getDeviceInventoryLog(String name, String categoryCode, Integer type, Integer page, Integer pageSize) {
    public MixEnvelop<IotDeviceInventoryLogVO, IotDeviceInventoryLogVO> getDeviceInventoryLog(String name, String categoryCode, String hospital, String productId, Integer type, Integer page, Integer pageSize) {
        String sql = "SELECT l.*, count(d.id) num FROM `iot_device_inventory_log` l LEFT JOIN iot_device d on l.id = d.inventory_log_id where 1=1 ";
        if (StringUtils.isNotBlank(name)) {
            sql += "and l.name like '%" + name + "%' ";
@ -157,6 +157,12 @@ public class IotDeviceInventoryService extends BaseJpaService<IotDeviceInventory
        if (StringUtils.isNotBlank(categoryCode)) {
            sql += "and l.category_code = '" + categoryCode + "' ";
        }
        if (StringUtils.isNotBlank(productId)) {
            sql += "and l.product_id = '" + productId + "' ";
        }
        if (StringUtils.isNotBlank(hospital)) {
            sql += "and l.hospital = '" + hospital + "' ";
        }
        if (type != null) {
            sql += "and l.type = '" + type + "' ";
        }

+ 4 - 2
svr/svr-iot/src/main/java/com/yihu/iot/service/device/IotPatientDeviceService.java

@ -96,13 +96,13 @@ public class IotPatientDeviceService extends BaseJpaService<IotPatientDeviceDO,
        }
        //更新SIM管理的SIM卡信息
        IotDeviceSimDO sim = iotDeviceSimDao.findBySim(patientDevice.getSim());
       /* IotDeviceSimDO sim = iotDeviceSimDao.findBySim(patientDevice.getSim());
        sim.setDeviceName(patientDevice.getDeviceName());
        sim.setDeviceSn(patientDevice.getDeviceSn());
        sim.setContactsName(patientDevice.getPatientName());
        sim.setContactsMobile(patientDevice.getMobile());
        sim.setDel("0");
        iotDeviceSimDao.save(sim);
        iotDeviceSimDao.save(sim);*/
        return patientDeviceDO;
@ -442,6 +442,7 @@ public class IotPatientDeviceService extends BaseJpaService<IotPatientDeviceDO,
        if(StringUtils.isNotBlank(patientName)){
            sql += "and d.patient_name like '%" + patientName + "%' ";
        }
        sql += "order by o.update_time desc ";
        //判断是否需要分页
        if (page != null && pageSize != null) {
            Long count = Long.valueOf(jdbcTempalte.queryForList(sql).size());
@ -474,6 +475,7 @@ public class IotPatientDeviceService extends BaseJpaService<IotPatientDeviceDO,
        if(StringUtils.isNotBlank(hospitalName)){
            sql += "and d.hospital_name like '%" + hospitalName + "%' ";
        }
        sql += "order by d.update_time desc ";
        //判断是否需要分页
        if (page != null && pageSize != null) {
            Long count = Long.valueOf(jdbcTempalte.queryForList(sql).size());