Kaynağa Gözat

Merge branch 'dev' of humingfen/wlyy2.0 into dev

humingfen 5 yıl önce
ebeveyn
işleme
ca9b7417d2

+ 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
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 + "' ";
        }

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

@ -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());