From 2f58a0d25b92e2a60b27ac2028e00c0659142271 Mon Sep 17 00:00:00 2001 From: chenhc <2369838784@qq.com> Date: Wed, 4 Dec 2024 15:57:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=A7=91=E5=AE=A4=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E7=BB=8F=E8=90=A5=E5=88=86=E6=9E=90=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dev/DeviceBusinessProjectController.java | 131 ++++++++++++++++++ .../DeviceBusinessProjectDeviceMapper.java | 18 +++ .../dao/dev/DeviceBusinessProjectMapper.java | 16 +++ .../api/entity/dev/DeviceBusinessProject.java | 124 +++++++++++++++++ .../dev/DeviceBusinessProjectDevice.java | 52 +++++++ .../req/dev/DeviceBusinessProjectRequest.java | 99 +++++++++++++ .../DeviceBusinessProjectDeviceService.java | 62 +++++++++ .../thrsys/DeviceBusinessProjectService.java | 23 +++ .../dev/DeviceBusinessProjectDeviceMapper.xml | 48 +++++++ .../dev/DeviceBusinessProjectMapper.xml | 41 ++++++ src/main/resources/schemas/schema_v2.4.sql | 40 ++++++ 11 files changed, 654 insertions(+) create mode 100644 src/main/java/com/glxp/api/controller/dev/DeviceBusinessProjectController.java create mode 100644 src/main/java/com/glxp/api/dao/dev/DeviceBusinessProjectDeviceMapper.java create mode 100644 src/main/java/com/glxp/api/dao/dev/DeviceBusinessProjectMapper.java create mode 100644 src/main/java/com/glxp/api/entity/dev/DeviceBusinessProject.java create mode 100644 src/main/java/com/glxp/api/entity/dev/DeviceBusinessProjectDevice.java create mode 100644 src/main/java/com/glxp/api/req/dev/DeviceBusinessProjectRequest.java create mode 100644 src/main/java/com/glxp/api/service/thrsys/DeviceBusinessProjectDeviceService.java create mode 100644 src/main/java/com/glxp/api/service/thrsys/DeviceBusinessProjectService.java create mode 100644 src/main/resources/mybatis/mapper/dev/DeviceBusinessProjectDeviceMapper.xml create mode 100644 src/main/resources/mybatis/mapper/dev/DeviceBusinessProjectMapper.xml diff --git a/src/main/java/com/glxp/api/controller/dev/DeviceBusinessProjectController.java b/src/main/java/com/glxp/api/controller/dev/DeviceBusinessProjectController.java new file mode 100644 index 000000000..253e1d68f --- /dev/null +++ b/src/main/java/com/glxp/api/controller/dev/DeviceBusinessProjectController.java @@ -0,0 +1,131 @@ +package com.glxp.api.controller.dev; + + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.json.JSONUtil; +import com.github.pagehelper.PageInfo; +import com.glxp.api.annotation.AuthRuleAnnotation; +import com.glxp.api.common.enums.ResultEnum; +import com.glxp.api.common.res.BaseResponse; +import com.glxp.api.common.util.ResultVOUtils; +import com.glxp.api.controller.BaseController; +import com.glxp.api.entity.auth.AuthAdmin; +import com.glxp.api.entity.auth.InvBusUserEntity; +import com.glxp.api.entity.auth.InvWarehouseEntity; +import com.glxp.api.entity.auth.WarehouseUserEntity; +import com.glxp.api.entity.dev.DeviceBusinessProject; +import com.glxp.api.entity.dev.DeviceBusinessProjectDevice; +import com.glxp.api.entity.dev.DeviceInfoEntity; +import com.glxp.api.req.dev.DeviceBusinessProjectRequest; +import com.glxp.api.req.dev.DeviceCheckQuery; +import com.glxp.api.res.PageSimpleResponse; +import com.glxp.api.service.thrsys.DeviceBusinessProjectDeviceService; +import com.glxp.api.service.thrsys.DeviceBusinessProjectService; +import com.glxp.api.vo.dev.DeviceCheckVo; +import com.glxp.api.vo.dev.DeviceInfoVo; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.lang.reflect.Array; +import java.util.Date; +import java.util.List; +import java.util.Map; + + +@RestController +@RequiredArgsConstructor +@Slf4j +@RequestMapping +public class DeviceBusinessProjectController extends BaseController { + + @Resource + DeviceBusinessProjectService deviceBusinessProjectService; + @Resource + DeviceBusinessProjectDeviceService deviceBusinessProjectDeviceService; + + + /** + * 分组查询收费项目接口 + * + * @param query + * @return + */ + @AuthRuleAnnotation("") + @PostMapping("/udi/device/businessProject/page") + public BaseResponse page(@RequestBody DeviceBusinessProjectRequest query) { + List list = deviceBusinessProjectService.pageList(query); + PageInfo pageInfo = new PageInfo<>(list); + PageSimpleResponse page = new PageSimpleResponse(); + page.setTotal(pageInfo.getTotal()); + page.setList(pageInfo.getList()); + return ResultVOUtils.success(page); + } + + + + /** + * 查询收费项目下的设备明细接口 + * + * @param query + * @return + */ + @AuthRuleAnnotation("") + @PostMapping("/udi/device/businessProject/detailList") + public BaseResponse detailList(@RequestBody DeviceBusinessProjectRequest query) { + List list = deviceBusinessProjectDeviceService.detailList(query); + PageInfo pageInfo = new PageInfo<>(list); + PageSimpleResponse page = new PageSimpleResponse(); + page.setTotal(pageInfo.getTotal()); + page.setList(pageInfo.getList()); + return ResultVOUtils.success(page); + } + + + + /** + * 查询收费项目下可进行绑定的设备列表接口 + * + * @param query + * @return + */ + @AuthRuleAnnotation("") + @PostMapping("/udi/device/businessProject/selectNotSelectDevice") + public BaseResponse selectNotSelectDevice(@RequestBody DeviceBusinessProjectRequest query) { + List list = deviceBusinessProjectDeviceService.selectNotSelectDevice(query); + PageInfo pageInfo = new PageInfo<>(list); + PageSimpleResponse page = new PageSimpleResponse(); + page.setTotal(pageInfo.getTotal()); + page.setList(pageInfo.getList()); + return ResultVOUtils.success(page); + } + + + + @AuthRuleAnnotation("") + @PostMapping("/udi/device/businessProject/addDeviceProject") + public BaseResponse addDeviceProject(@RequestBody Map params) { + String sfxm = String.valueOf(params.get("sfxm")); + List userListJson = (List) params.get("deviceList"); + if (StrUtil.isBlank(sfxm) || CollUtil.isEmpty(userListJson)) + return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); + + deviceBusinessProjectDeviceService.addDeviceProject(sfxm, userListJson); + return ResultVOUtils.success(); + } + + + @AuthRuleAnnotation("") + @PostMapping("/udi/device/businessProject/deleteDeviceProject") + public BaseResponse deleteDeviceProject(@RequestBody DeviceBusinessProjectDevice deviceBusinessProjectDevice) { + if (null == deviceBusinessProjectDevice || deviceBusinessProjectDevice.getDeviceCode() == null) return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); + deviceBusinessProjectDeviceService.deleteDeviceProject(deviceBusinessProjectDevice.getDeviceCode()); + return ResultVOUtils.success(); + } + +} diff --git a/src/main/java/com/glxp/api/dao/dev/DeviceBusinessProjectDeviceMapper.java b/src/main/java/com/glxp/api/dao/dev/DeviceBusinessProjectDeviceMapper.java new file mode 100644 index 000000000..44dec8bee --- /dev/null +++ b/src/main/java/com/glxp/api/dao/dev/DeviceBusinessProjectDeviceMapper.java @@ -0,0 +1,18 @@ +package com.glxp.api.dao.dev; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.api.entity.dev.DeviceBusinessProjectDevice; +import com.glxp.api.entity.dev.DeviceInfoEntity; +import com.glxp.api.req.dev.DeviceBusinessProjectRequest; +import com.glxp.api.vo.dev.DeviceInfoVo; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +@Mapper +public interface DeviceBusinessProjectDeviceMapper extends BaseMapper { + List detailList(DeviceBusinessProjectRequest sfxm); + + List selectNotSelectDevice(DeviceBusinessProjectRequest query); +} \ No newline at end of file diff --git a/src/main/java/com/glxp/api/dao/dev/DeviceBusinessProjectMapper.java b/src/main/java/com/glxp/api/dao/dev/DeviceBusinessProjectMapper.java new file mode 100644 index 000000000..b94d5b4c2 --- /dev/null +++ b/src/main/java/com/glxp/api/dao/dev/DeviceBusinessProjectMapper.java @@ -0,0 +1,16 @@ +package com.glxp.api.dao.dev; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.api.entity.dev.DeviceBusinessProject; +import com.glxp.api.req.dev.DeviceBusinessProjectRequest; +import com.glxp.api.req.dev.DeviceCheckQuery; +import com.glxp.api.vo.dev.DeviceCheckVo; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface DeviceBusinessProjectMapper extends BaseMapper { + + List pageVo(DeviceBusinessProjectRequest query); +} \ No newline at end of file diff --git a/src/main/java/com/glxp/api/entity/dev/DeviceBusinessProject.java b/src/main/java/com/glxp/api/entity/dev/DeviceBusinessProject.java new file mode 100644 index 000000000..2a13e4993 --- /dev/null +++ b/src/main/java/com/glxp/api/entity/dev/DeviceBusinessProject.java @@ -0,0 +1,124 @@ +package com.glxp.api.entity.dev; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import lombok.Data; + +@ApiModel(value="com-glxp-api-entity-dev-DeviceBusinessProject") +@Data +@TableName(value = "device_business_project") +public class DeviceBusinessProject implements Serializable { + @TableId(value = "id", type = IdType.AUTO) + @ApiModelProperty(value="") + private Long id; + + /** + * 收费时间 + */ + @TableField(value = "chargTime") + @ApiModelProperty(value="收费时间") + private Date chargTime; + + /** + * 收费项目 + */ + @TableField(value = "sfxm") + @ApiModelProperty(value="收费项目") + private String sfxm; + + /** + * 收费名称 + */ + @TableField(value = "sfmc") + @ApiModelProperty(value="收费名称") + private String sfmc; + + /** + * 收费金额 + */ + @TableField(value = "je") + @ApiModelProperty(value="收费金额") + private BigDecimal je; + + /** + * 收费mz + */ + @TableField(value = "sfmz") + @ApiModelProperty(value="收费mz") + private String sfmz; + + /** + * 当前部门编码 + */ + @TableField(value = "deptCode") + @ApiModelProperty(value="当前部门编码") + private String deptCode; + + /** + * 当前部门编码 + */ + @TableField(value = "deptName") + @ApiModelProperty(value="当前部门编码") + private String deptName; + + /** + * 创建人 + */ + @TableField(value = "createUser") + @ApiModelProperty(value="创建人") + private String createUser; + + /** + * 创建时间 + */ + @TableField(value = "createTime") + @ApiModelProperty(value="创建时间") + private Date createTime; + + /** + * 更新人 + */ + @TableField(value = "updateUser") + @ApiModelProperty(value="更新人") + private String updateUser; + + /** + * 更新时间 + */ + @TableField(value = "updateTime") + @ApiModelProperty(value="更新时间") + private Date updateTime; + + private static final long serialVersionUID = 1L; + + public static final String COL_ID = "id"; + + public static final String COL_CHARGTIME = "chargTime"; + + public static final String COL_SFXM = "sfxm"; + + public static final String COL_SFMC = "sfmc"; + + public static final String COL_JE = "je"; + + public static final String COL_SFMZ = "sfmz"; + + public static final String COL_DEPTCODE = "deptCode"; + + public static final String COL_DEPTNAME = "deptName"; + + public static final String COL_CREATEUSER = "createUser"; + + public static final String COL_CREATETIME = "createTime"; + + public static final String COL_UPDATEUSER = "updateUser"; + + public static final String COL_UPDATETIME = "updateTime"; +} \ No newline at end of file diff --git a/src/main/java/com/glxp/api/entity/dev/DeviceBusinessProjectDevice.java b/src/main/java/com/glxp/api/entity/dev/DeviceBusinessProjectDevice.java new file mode 100644 index 000000000..f7fd198dc --- /dev/null +++ b/src/main/java/com/glxp/api/entity/dev/DeviceBusinessProjectDevice.java @@ -0,0 +1,52 @@ +package com.glxp.api.entity.dev; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + +/** + * 设备收费项目-设备关联表 + */ +@ApiModel(value="com-glxp-api-entity-dev-DeviceBusinessProjectDevice") +@Data +@TableName(value = "device_business_project_device") +public class DeviceBusinessProjectDevice implements Serializable { + + @TableId(value = "id", type = IdType.AUTO) + @ApiModelProperty(value="") + private Long id; + + /** + * 设备编码 + */ + @TableField(value = "deviceCode") + @ApiModelProperty(value="设备编码") + private String deviceCode; + + /** + * 收费项目 + */ + @TableField(value = "sfxm") + @ApiModelProperty(value="收费项目") + private String sfxm; + + @TableField(value = "updateTime") + @ApiModelProperty(value="") + private Date updateTime; + + private static final long serialVersionUID = 1L; + + public static final String COL_ID = "id"; + + public static final String COL_DEVICECODE = "deviceCode"; + + public static final String COL_SFXM = "sfxm"; + + public static final String COL_UPDATETIME = "updateTime"; +} \ No newline at end of file diff --git a/src/main/java/com/glxp/api/req/dev/DeviceBusinessProjectRequest.java b/src/main/java/com/glxp/api/req/dev/DeviceBusinessProjectRequest.java new file mode 100644 index 000000000..1fae2cd33 --- /dev/null +++ b/src/main/java/com/glxp/api/req/dev/DeviceBusinessProjectRequest.java @@ -0,0 +1,99 @@ +package com.glxp.api.req.dev; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.glxp.api.util.page.ListPageRequest; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +@Data +public class DeviceBusinessProjectRequest extends ListPageRequest { + @TableId(value = "id", type = IdType.AUTO) + @ApiModelProperty(value="") + private Long id; + + /** + * 收费时间 + */ + @TableField(value = "chargTime") + @ApiModelProperty(value="收费时间") + private Date chargTime; + + /** + * 收费项目 + */ + @TableField(value = "sfxm") + @ApiModelProperty(value="收费项目") + private String sfxm; + + /** + * 收费名称 + */ + @TableField(value = "sfmc") + @ApiModelProperty(value="收费名称") + private String sfmc; + + /** + * 收费金额 + */ + @TableField(value = "je") + @ApiModelProperty(value="收费金额") + private BigDecimal je; + + /** + * 收费mz + */ + @TableField(value = "sfmz") + @ApiModelProperty(value="收费mz") + private String sfmz; + + /** + * 当前部门编码 + */ + @TableField(value = "deptCode") + @ApiModelProperty(value="当前部门编码") + private String deptCode; + + /** + * 当前部门编码 + */ + @TableField(value = "deptName") + @ApiModelProperty(value="当前部门编码") + private String deptName; + + /** + * 创建人 + */ + @TableField(value = "createUser") + @ApiModelProperty(value="创建人") + private String createUser; + + /** + * 创建时间 + */ + @TableField(value = "createTime") + @ApiModelProperty(value="创建时间") + private Date createTime; + + /** + * 更新人 + */ + @TableField(value = "updateUser") + @ApiModelProperty(value="更新人") + private String updateUser; + + + /** + * 更新时间 + */ + @TableField(value = "updateTime") + @ApiModelProperty(value="更新时间") + private Date updateTime; + + + private String key; +} diff --git a/src/main/java/com/glxp/api/service/thrsys/DeviceBusinessProjectDeviceService.java b/src/main/java/com/glxp/api/service/thrsys/DeviceBusinessProjectDeviceService.java new file mode 100644 index 000000000..25c5f8f1d --- /dev/null +++ b/src/main/java/com/glxp/api/service/thrsys/DeviceBusinessProjectDeviceService.java @@ -0,0 +1,62 @@ +package com.glxp.api.service.thrsys; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.github.pagehelper.PageHelper; +import com.glxp.api.entity.dev.DeviceBusinessProject; +import com.glxp.api.entity.dev.DeviceInfoEntity; +import com.glxp.api.exception.JsonException; +import com.glxp.api.req.dev.DeviceBusinessProjectRequest; +import com.glxp.api.vo.dev.DeviceInfoVo; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.List; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.glxp.api.entity.dev.DeviceBusinessProjectDevice; +import com.glxp.api.dao.dev.DeviceBusinessProjectDeviceMapper; +@Service +public class DeviceBusinessProjectDeviceService extends ServiceImpl { + + public List detailList(DeviceBusinessProjectRequest query) { + if (query == null || StrUtil.isEmpty(query.getSfxm())){ + throw new JsonException("收费项目编码不可为空"); + } + if (query.getPage() != null) { + PageHelper.startPage(query.getPage(), query.getLimit()); + } + List list = this.baseMapper.detailList(query); + return list; + } + + public List selectNotSelectDevice(DeviceBusinessProjectRequest query) { + if (query == null || StrUtil.isEmpty(query.getSfxm())){ + throw new JsonException("收费项目编码不可为空"); + } + if (query.getPage() != null) { + PageHelper.startPage(query.getPage(), query.getLimit()); + } + List list = this.baseMapper.selectNotSelectDevice(query); + return list; + } + + public void addDeviceProject(String sfxm, List userList) { + if (CollUtil.isNotEmpty(userList)){ + List objects = new ArrayList<>(); + for (int i = 0; i < userList.size(); i++) { + String s = userList.get(i); + DeviceBusinessProjectDevice deviceBusinessProjectDevice = new DeviceBusinessProjectDevice(); + deviceBusinessProjectDevice.setSfxm(sfxm); + deviceBusinessProjectDevice.setDeviceCode(s); + objects.add(deviceBusinessProjectDevice); + } + this.saveBatch(objects); + } + } + + + public void deleteDeviceProject(String getDeviceCode) { + remove(new LambdaQueryWrapper().eq(DeviceBusinessProjectDevice::getDeviceCode,getDeviceCode)); + } +} diff --git a/src/main/java/com/glxp/api/service/thrsys/DeviceBusinessProjectService.java b/src/main/java/com/glxp/api/service/thrsys/DeviceBusinessProjectService.java new file mode 100644 index 000000000..186589d25 --- /dev/null +++ b/src/main/java/com/glxp/api/service/thrsys/DeviceBusinessProjectService.java @@ -0,0 +1,23 @@ +package com.glxp.api.service.thrsys; + +import com.github.pagehelper.PageHelper; +import com.glxp.api.req.dev.DeviceBusinessProjectRequest; +import com.glxp.api.vo.dev.DeviceCheckVo; +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.List; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.glxp.api.dao.dev.DeviceBusinessProjectMapper; +import com.glxp.api.entity.dev.DeviceBusinessProject; +@Service +public class DeviceBusinessProjectService extends ServiceImpl { + + public List pageList(DeviceBusinessProjectRequest query) { + if (query.getPage() != null) { + PageHelper.startPage(query.getPage(), query.getLimit()); + } + List list = this.baseMapper.pageVo(query); + + return list; + } +} diff --git a/src/main/resources/mybatis/mapper/dev/DeviceBusinessProjectDeviceMapper.xml b/src/main/resources/mybatis/mapper/dev/DeviceBusinessProjectDeviceMapper.xml new file mode 100644 index 000000000..6c52cea75 --- /dev/null +++ b/src/main/resources/mybatis/mapper/dev/DeviceBusinessProjectDeviceMapper.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + id, deviceCode, sfxm, updateTime + + + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/dev/DeviceBusinessProjectMapper.xml b/src/main/resources/mybatis/mapper/dev/DeviceBusinessProjectMapper.xml new file mode 100644 index 000000000..9e84e4e4b --- /dev/null +++ b/src/main/resources/mybatis/mapper/dev/DeviceBusinessProjectMapper.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + id, chargTime, sfxm, sfmc, je, sfmz, deptCode, deptName, `createUser`, createTime, + updateUser, updateTime + + + + + \ No newline at end of file diff --git a/src/main/resources/schemas/schema_v2.4.sql b/src/main/resources/schemas/schema_v2.4.sql index 055891cdb..3cb1db726 100644 --- a/src/main/resources/schemas/schema_v2.4.sql +++ b/src/main/resources/schemas/schema_v2.4.sql @@ -3993,3 +3993,43 @@ VALUES (46026, 102, '1', 1, 'profitNum', '盘盈数量', 'text', NULL, NULL, NUL INSERT ignore INTO `sys_custom_config_detail` (`id`, `configId`, `type`, `isShow`, `columnName`, `columnDesc`, `columnType`, `colorRule`, `sort`, `lableRule`, `width`, `tooltip`, `buttonRule`, `number`, `lineNumber`, `clickFuc`, `size`, `style`, `disabled`, `checkRules`, `inputType`, `disabledFuc`, `expression`, `dataFuc`, `isShowXx`) VALUES (46027, 102, '1', 1, 'lossNum', '盘亏数量', 'text', NULL, NULL, NULL, 102, NULL, NULL, 127, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + + + +INSERT ignore INTO `auth_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, +`visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) +VALUES (5235, '效益管理', 1703, 0, 'benefitManagement', NULL, NULL, 1, 0, 'M', '0', '0', NULL, NULL, '超级用户', '2023-02-08 17:01:50', NULL, NULL, NULL); +INSERT ignore INTO `auth_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, +`visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) +VALUES (5236, '收费项目关系', 5235, 1, 'purchase/benefitManagement/projectRelationship', 'purchase/benefitManagement/projectRelationship', '', 1, 0, 'C', '0', '0', 'purchase:purApplyArgument:purApplyArgument', NULL, '超级用户', '2023-02-08 17:02:19', NULL, NULL, NULL); + + +CREATE TABLE IF NOT EXISTS `device_business_project` +( + `id` bigint NOT NULL AUTO_INCREMENT, + `chargTime` datetime DEFAULT NULL COMMENT '收费时间', + `sfxm` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '收费项目', + `sfmc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '收费名称', + `je` decimal(10,3) DEFAULT NULL COMMENT '收费金额', + `sfmz` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '收费mz', + `deptCode` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '当前部门编码', + `deptName` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '当前部门编码', + `createUser` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '创建人', + `createTime` datetime DEFAULT NULL COMMENT '创建时间', + `updateUser` varchar(255) DEFAULT NULL COMMENT '更新人', + `updateTime` datetime DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`id`) USING BTREE + ) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 + COLLATE = utf8mb4_0900_ai_ci + ROW_FORMAT = DYNAMIC COMMENT='设备收费项目表'; + + + +CREATE TABLE IF NOT EXISTS `device_business_project_device` ( + `id` bigint NOT NULL AUTO_INCREMENT, + `deviceCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '设备编码', + `sfxm` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '收费项目', + `updateTime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='设备收费项目-设备关联表'; \ No newline at end of file