1、新增iot(摄像头)模块

2、服务指令代码调整(非可用版本)
This commit is contained in:
1378012178@qq.com 2025-03-14 15:33:34 +08:00
parent 7e345e67ec
commit bdd5fede35
11 changed files with 388 additions and 182 deletions

View File

@ -39,8 +39,8 @@ public class ConfigServiceType implements Serializable {
@ApiModelProperty(value = "id")
private java.lang.String id;
/**服务类别id*/
@Excel(name = "服务类别id", width = 15)
@ApiModelProperty(value = "服务类别id")
@Excel(name = "服务类别", width = 15)
@ApiModelProperty(value = "服务类别")
@Dict(dicCode = "id" , dictTable = "config_service_category" , dicText = "category_name")
private java.lang.String categoryId;
/**服务类型名称*/
@ -52,13 +52,13 @@ public class ConfigServiceType implements Serializable {
@ApiModelProperty(value = "排序")
private java.lang.Integer sort;
/**是否启用 0启用 1未启用*/
@Excel(name = "是否启用 0启用 1未启用", width = 15)
@ApiModelProperty(value = "是否启用 0启用 1未启用")
@Excel(name = "是否启用", width = 15)
@ApiModelProperty(value = "是否启用")
@Dict(dicCode = "iz_enabled")
private java.lang.String izEnabled;
/**是否删除 0未删除 1删除*/
@Excel(name = "是否删除 0未删除 1删除", width = 15)
@ApiModelProperty(value = "是否删除 0未删除 1删除")
@Excel(name = "是否删除", width = 15)
@ApiModelProperty(value = "是否删除")
@TableLogic
private java.lang.String delFlag;
/**创建人*/

View File

@ -47,13 +47,13 @@ public class ConfigServiceCategory implements Serializable {
@ApiModelProperty(value = "排序")
private java.lang.Integer sort;
/**是否启用 0启用 1未启用*/
@Excel(name = "是否启用 0启用 1未启用", width = 15)
@ApiModelProperty(value = "是否启用 0启用 1未启用")
@Excel(name = "是否启用", width = 15)
@ApiModelProperty(value = "是否启用")
@Dict(dicCode = "iz_enabled")
private java.lang.String izEnabled;
/**是否删除 0未删除 1删除*/
@Excel(name = "是否删除 0未删除 1删除", width = 15)
@ApiModelProperty(value = "是否删除 0未删除 1删除")
@Excel(name = "是否删除", width = 15)
@ApiModelProperty(value = "是否删除")
@TableLogic
private java.lang.String delFlag;
/**创建人*/

View File

@ -1,43 +1,30 @@
package com.nu.modules.serviceDirective.controller;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nu.modules.serviceDirective.entity.ConfigServiceDirective;
import com.nu.modules.serviceDirective.service.IConfigServiceDirectiveService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.query.QueryRuleEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.query.QueryRuleEnum;
import org.jeecg.common.util.oConvertUtils;
import com.nu.modules.serviceDirective.entity.ConfigServiceDirective;
import com.nu.modules.serviceDirective.service.IConfigServiceDirectiveService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.apache.shiro.authz.annotation.RequiresPermissions;
/**
* @Description: 服务指令
@ -83,6 +70,112 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
QueryWrapper<ConfigServiceDirective> queryWrapper = QueryGenerator.initQueryWrapper(configServiceDirective, req.getParameterMap(), customeRuleMap);
Page<ConfigServiceDirective> page = new Page<ConfigServiceDirective>(pageNo, pageSize);
IPage<ConfigServiceDirective> pageList = configServiceDirectiveService.page(page, queryWrapper);
//处理单元格合并所需数据
{
List<ConfigServiceDirective> records_ = pageList.getRecords();
List<ConfigServiceDirective> records = BeanUtil.copyToList(records_, ConfigServiceDirective.class);
String fwlb = "";//存储循环到的服务类别值
int fwlb_repCount = 0;//存储服务类别重复了几次
String fwlx = "";//存储循环到的服务类型值
int fwlx_repCount = 0;//存储服务类型重复了几次
String zlbq = "";//存储循环到的指令标签值
int zlbq_repCount = 0;//存储指令标签重复了几次
for (int i = 0; i < records.size(); i++) {
if (i == 0) {
fwlb = records.get(i).getCategoryId();
fwlx = records.get(i).getTypeId();
zlbq = records.get(i).getInstructionTagId();
} else {
//服务类别
{
if (fwlb.equals(records.get(i).getCategoryId())) {
//如果是重复数据则存储对应数据
fwlb_repCount++;
records.get(i).setCategoryRowSpan(0);
if (i == records.size() - 1) {
records.get(i - fwlb_repCount).setCategoryRowSpan(fwlb_repCount + 1);
}
} else {
//需要做服务类别重复数据记录
if (fwlb_repCount > 0) {
records.get(i - fwlb_repCount).setCategoryRowSpan(fwlb_repCount + 1);
}
//处理服务类型
{
if (fwlx_repCount > 0) {
records.get(i - fwlx_repCount).setTypeRowSpan(fwlx_repCount + 1);
}
//重置数据
fwlx = "";
fwlx_repCount = 0;
}
//处理指令标签
{
if (zlbq_repCount > 0) {
records.get(i - zlbq_repCount).setInstructionRowSpan(zlbq_repCount + 1);
}
//重置数据
zlbq = "";
zlbq_repCount = 0;
}
//重置数据
fwlb = records.get(i).getCategoryId();
fwlb_repCount = 0;
}
}
//服务类型
{
if (fwlx.equals(records.get(i).getTypeId())) {
//如果是重复数据则存储对应数据
fwlx_repCount++;
records.get(i).setTypeRowSpan(0);
if (i == records.size() - 1) {
records.get(i - fwlx_repCount).setTypeRowSpan(fwlx_repCount + 1);
}
} else {
//需要做重复数据记录
if (fwlx_repCount > 0) {
records.get(i - fwlx_repCount).setTypeRowSpan(fwlx_repCount + 1);
}
//处理指令标签
{
if (zlbq_repCount > 0) {
records.get(i - zlbq_repCount).setInstructionRowSpan(zlbq_repCount + 1);
}
//重置数据
zlbq = "";
zlbq_repCount = 0;
}
//重置数据
fwlx = records.get(i).getTypeId();
fwlx_repCount = 0;
}
}
//指令标签
{
if (zlbq.equals(records.get(i).getInstructionTagId())) {
//如果是重复数据则存储对应数据
zlbq_repCount++;
records.get(i).setInstructionRowSpan(0);
if (i == records.size() - 1) {
records.get(i - zlbq_repCount).setInstructionRowSpan(zlbq_repCount + 1);
}
} else {
//需要做重复数据记录
if (zlbq_repCount > 0) {
records.get(i - zlbq_repCount).setInstructionRowSpan(zlbq_repCount + 1);
}
//重置数据
zlbq = records.get(i).getInstructionTagId();
zlbq_repCount = 0;
}
}
}
}
pageList.setRecords(records);
}
return Result.OK(pageList);
}

View File

@ -4,10 +4,8 @@ import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.*;
import org.jeecg.common.constant.ProvinceCityArea;
import org.jeecg.common.util.SpringContextUtils;
import lombok.Data;
@ -39,16 +37,19 @@ public class ConfigServiceDirective implements Serializable {
@ApiModelProperty(value = "id")
private java.lang.String id;
/**服务类别id*/
@Excel(name = "服务类别id", width = 15)
@ApiModelProperty(value = "服务类别id")
@Excel(name = "服务类别", width = 15)
@ApiModelProperty(value = "服务类别")
@Dict(dicCode = "id" , dictTable = "config_service_category" , dicText = "category_name")
private java.lang.String categoryId;
/**服务类型id*/
@Excel(name = "服务类型id", width = 15)
@ApiModelProperty(value = "服务类型id")
@Excel(name = "服务类型", width = 15)
@ApiModelProperty(value = "服务类型")
@Dict(dicCode = "id" , dictTable = "config_service_type" , dicText = "type_name")
private java.lang.String typeId;
/**指令标签id*/
@Excel(name = "指令标签id", width = 15)
@ApiModelProperty(value = "指令标签id")
@Excel(name = "指令标签", width = 15)
@ApiModelProperty(value = "指令标签")
@Dict(dicCode = "instruction_tag" )
private java.lang.String instructionTagId;
/**服务指令名称*/
@Excel(name = "服务指令名称", width = 15)
@ -63,20 +64,24 @@ public class ConfigServiceDirective implements Serializable {
@ApiModelProperty(value = "提成价格")
private java.math.BigDecimal comPrice;
/**是否参与医保报销 0不报销 1报销*/
@Excel(name = "是否参与医保报销 0不报销 1报销", width = 15)
@ApiModelProperty(value = "是否参与医保报销 0不报销 1报销")
@Excel(name = "医保报销", width = 15)
@ApiModelProperty(value = "医保报销")
@Dict(dicCode = "med_ins_reimb" )
private java.lang.String izReimbursement;
/**是否参与机构优惠 0不参与 1参与*/
@Excel(name = "是否参与机构优惠 0不参与 1参与", width = 15)
@ApiModelProperty(value = "是否参与机构优惠 0不参与 1参与")
@Excel(name = "机构优惠", width = 15)
@ApiModelProperty(value = "机构优惠")
@Dict(dicCode = "institutional_discount" )
private java.lang.String izPreferential;
/**收费频次 1按次收费 2按天收费*/
@Excel(name = "收费频次 1按次收费 2按天收费", width = 15)
@ApiModelProperty(value = "收费频次 1按次收费 2按天收费")
@Excel(name = "收费频次", width = 15)
@ApiModelProperty(value = "收费频次")
@Dict(dicCode = "billing_frequency" )
private java.lang.String chargingFrequency;
/**周期类型 1日常护理 2周期护理 3即时护理*/
@Excel(name = "周期类型 1日常护理 2周期护理 3即时护理", width = 15)
@ApiModelProperty(value = "周期类型 1日常护理 2周期护理 3即时护理")
@Excel(name = "周期类型", width = 15)
@ApiModelProperty(value = "周期类型")
@Dict(dicCode = "period_type" )
private java.lang.String cycleType;
/**排序*/
@Excel(name = "排序", width = 15)
@ -91,13 +96,13 @@ public class ConfigServiceDirective implements Serializable {
@ApiModelProperty(value = "服务时长(分钟)")
private java.lang.String serviceDuration;
/**是否启用 0启用 1未启用*/
@Excel(name = "是否启用 0启用 1未启用", width = 15)
@ApiModelProperty(value = "是否启用 0启用 1未启用")
@Excel(name = "是否启用", width = 15)
@ApiModelProperty(value = "是否启用")
@Dict(dicCode = "iz_enabled")
private java.lang.String izEnabled;
/**是否删除 0未删除 1删除*/
@Excel(name = "是否删除 0未删除 1删除", width = 15)
@ApiModelProperty(value = "是否删除 0未删除 1删除")
@Excel(name = "是否删除", width = 15)
@ApiModelProperty(value = "是否删除")
@TableLogic
private java.lang.String delFlag;
/**创建人*/
@ -127,4 +132,12 @@ public class ConfigServiceDirective implements Serializable {
@Excel(name = "视频文件", width = 15)
@ApiModelProperty(value = "视频文件")
private java.lang.String mp4File;
@TableField(exist = false)
private Integer categoryRowSpan;
@TableField(exist = false)
private Integer typeRowSpan;
@TableField(exist = false)
private Integer instructionRowSpan;
}

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.nursingunit.boot</groupId>
<artifactId>nu-iot-api</artifactId>
<version>2.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>nu-iot-local-api</artifactId>
</project>

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.nursingunit.boot</groupId>
<artifactId>nursing-unit-iot</artifactId>
<version>2.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>nu-iot-api</artifactId>
<packaging>pom</packaging>
<modules>
<module>nu-iot-local-api</module>
</modules>
<dependencies>
<dependency>
<groupId>com.nursingunit.boot</groupId>
<artifactId>nursing-unit-base-core</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,35 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.nursingunit.boot</groupId>
<artifactId>nursing-unit-iot</artifactId>
<version>2.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>nu-iot-biz</artifactId>
<dependencies>
<dependency>
<groupId>com.nursingunit.boot</groupId>
<artifactId>nu-iot-local-api</artifactId>
<version>${nursingunit.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
</dependency>
<dependency>
<groupId>org.jeecgframework.boot</groupId>
<artifactId>hibernate-re</artifactId>
</dependency>
<!-- 企业微信/钉钉 api -->
<dependency>
<groupId>org.jeecgframework</groupId>
<artifactId>weixin4j</artifactId>
</dependency>
</dependencies>
</project>

19
nursing-unit-iot/pom.xml Normal file
View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.nursingunit.boot</groupId>
<artifactId>nursing-unit-parent</artifactId>
<version>2.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>nursing-unit-iot</artifactId>
<packaging>pom</packaging>
<modules>
<module>nu-iot-api</module>
<module>nu-iot-biz</module>
</modules>
</project>

View File

@ -24,12 +24,19 @@
<artifactId>nursing-unit-demo</artifactId>
<version>${nursingunit.version}</version>
</dependency>
<!-- CONFIG 示例模块 -->
<!-- CONFIG 模块 -->
<dependency>
<groupId>com.nursingunit.boot</groupId>
<artifactId>nu-config-biz</artifactId>
<version>${nursingunit.version}</version>
</dependency>
<!-- IOT 摄像头 模块 -->
<dependency>
<groupId>com.nursingunit.boot</groupId>
<artifactId>nu-iot-biz</artifactId>
<version>${nursingunit.version}</version>
</dependency>
<!-- flyway 数据库自动升级 -->
<dependency>

View File

@ -164,6 +164,7 @@ spring:
datasource:
master:
url: jdbc:mysql://1.92.152.160:33061/nursing_unit_001?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
# url: jdbc:mysql://localhost:3306/nursing_unit_001?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: root
password: root
driver-class-name: com.mysql.cj.jdbc.Driver

View File

@ -71,6 +71,7 @@
<module>nursing-unit-base-core</module>
<module>nursing-unit-demo</module>
<module>nursing-unit-config</module>
<module>nursing-unit-iot</module>
<module>nursing-unit-system</module>
</modules>