diff --git a/lzbi-admin/src/main/resources/application-prod.yml b/lzbi-admin/src/main/resources/application-prod.yml index cbafad0..44c5474 100644 --- a/lzbi-admin/src/main/resources/application-prod.yml +++ b/lzbi-admin/src/main/resources/application-prod.yml @@ -1,13 +1,13 @@ # 开发环境配置 server: # 服务器的HTTP端口,默认为8080 - port: 8000 + port: 9001 # redis 配置 spring: redis: # 地址 - host: 10.10.10.55 + host: 10.10.10.51 # 端口,默认为6379 port: 7000 # 数据库索引 @@ -27,68 +27,82 @@ spring: # #连接池最大阻塞等待时间(使用负值表示没有限制) max-wait: -1ms datasource: - type: com.alibaba.druid.pool.DruidDataSource - driverClassName: com.mysql.cj.jdbc.Driver - druid: - # 主库数据源 - master: - url: jdbc:mysql://10.10.10.56:13306/lzdc_bi_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 - username: luenmei - password: 123456 - # 从库数据源 - slave: - # 从数据源开关/默认关闭 - enabled: false - url: - username: - password: - # 初始连接数 - initialSize: 5 - # 最小连接池数量 - minIdle: 10 - # 最大连接池数量 - maxActive: 20 - # 配置获取连接等待超时的时间 - maxWait: 60000 - # 配置连接超时时间 - connectTimeout: 30000 - # 配置网络超时时间 - socketTimeout: 60000 - # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 - timeBetweenEvictionRunsMillis: 60000 - # 配置一个连接在池中最小生存的时间,单位是毫秒 - minEvictableIdleTimeMillis: 300000 - # 配置一个连接在池中最大生存的时间,单位是毫秒 - maxEvictableIdleTimeMillis: 900000 - # 配置检测连接是否有效 - validationQuery: SELECT 1 FROM DUAL - testWhileIdle: true - testOnBorrow: false - testOnReturn: false - webStatFilter: - enabled: true - statViewServlet: - enabled: true - # 设置白名单,不填则允许所有访问 - allow: - url-pattern: /druid/* - # 控制台管理用户名和密码 - login-username: ruoyi - login-password: 123456 - filter: - stat: + dynamic: + strict: true + druid: + # 初始连接数 + initialSize: 5 + # 最小连接池数量 + minIdle: 10 + # 最大连接池数量 + maxActive: 20 + # 配置获取连接等待超时的时间 + maxWait: 60000 + # 配置连接超时时间 + connectTimeout: 30000 + # 配置网络超时时间 + socketTimeout: 60000 + # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 + timeBetweenEvictionRunsMillis: 60000 + # 配置一个连接在池中最小生存的时间,单位是毫秒 + minEvictableIdleTimeMillis: 300000 + # 配置一个连接在池中最大生存的时间,单位是毫秒 + maxEvictableIdleTimeMillis: 900000 + # 配置检测连接是否有效 + validationQuery: SELECT 1 + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + webStatFilter: enabled: true - # 慢SQL记录 - log-slow-sql: true - slow-sql-millis: 1000 - merge-sql: true - wall: - config: - multi-statement-allow: true + statViewServlet: + enabled: true + # 设置白名单,不填则允许所有访问 + allow: + url-pattern: /druid/* + # 控制台管理用户名和密码 + login-username: luenmeilz + login-password: 123456 + filter: + stat: + enabled: true + # 慢SQL记录 + log-slow-sql: true + slow-sql-millis: 1000 + merge-sql: true + wall: + config: + multi-statement-allow: true + datasource: + # 主库数据源 + master: + url: jdbc:mysql://10.10.10.53:13306/lzdc_bi_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&rewriteBatchedStatements=true + username: luenmeilz + password: 123456 + # # 计费数据库 + # charge: + # driverClassName: oracle.jdbc.OracleDriver + # url: jdbc:oracle:thin:@//10.10.10.60:1521/HX?CONNECT_TIMEOUT=10000&Read_Timeout=120000 + # username: lmjt_sys + # password: lmjt_sys + # 从库数据源 + slave: + # 从数据源开关/默认关闭 + url: jdbc:mysql://10.10.10.56:13306/lzdc_bi_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + username: luenmei + password: 123456 + workDB: + driverClassName: org.postgresql.Driver + #type: com.alibaba.druid.pool.DruidDataSource + url: jdbc:postgresql://10.10.10.56:5432/dctestdb?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=Asia/Shanghai + username: postgres + password: 123456 + primary: master + # 日志配置 logging: file: path: logs level: - com.lzbi: info - org.springframework: warn \ No newline at end of file + com.lzbi: debug + org.springframework: warn diff --git a/lzbi-admin/src/main/resources/application-test.yml b/lzbi-admin/src/main/resources/application-test.yml index 1221278..dfe8333 100644 --- a/lzbi-admin/src/main/resources/application-test.yml +++ b/lzbi-admin/src/main/resources/application-test.yml @@ -27,68 +27,82 @@ spring: # #连接池最大阻塞等待时间(使用负值表示没有限制) max-wait: -1ms datasource: - type: com.alibaba.druid.pool.DruidDataSource - driverClassName: com.mysql.cj.jdbc.Driver - druid: - # 主库数据源 - master: - url: jdbc:mysql://10.10.10.56:13306/lzdc_bi_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 - username: luenmei - password: 123456 - # 从库数据源 - slave: - # 从数据源开关/默认关闭 - enabled: false - url: - username: - password: - # 初始连接数 - initialSize: 5 - # 最小连接池数量 - minIdle: 10 - # 最大连接池数量 - maxActive: 20 - # 配置获取连接等待超时的时间 - maxWait: 60000 - # 配置连接超时时间 - connectTimeout: 30000 - # 配置网络超时时间 - socketTimeout: 60000 - # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 - timeBetweenEvictionRunsMillis: 60000 - # 配置一个连接在池中最小生存的时间,单位是毫秒 - minEvictableIdleTimeMillis: 300000 - # 配置一个连接在池中最大生存的时间,单位是毫秒 - maxEvictableIdleTimeMillis: 900000 - # 配置检测连接是否有效 - validationQuery: SELECT 1 FROM DUAL - testWhileIdle: true - testOnBorrow: false - testOnReturn: false - webStatFilter: - enabled: true - statViewServlet: - enabled: true - # 设置白名单,不填则允许所有访问 - allow: - url-pattern: /druid/* - # 控制台管理用户名和密码 - login-username: luenmeilz - login-password: 123456 - filter: - stat: + dynamic: + strict: true + druid: + # 初始连接数 + initialSize: 5 + # 最小连接池数量 + minIdle: 10 + # 最大连接池数量 + maxActive: 20 + # 配置获取连接等待超时的时间 + maxWait: 60000 + # 配置连接超时时间 + connectTimeout: 30000 + # 配置网络超时时间 + socketTimeout: 60000 + # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 + timeBetweenEvictionRunsMillis: 60000 + # 配置一个连接在池中最小生存的时间,单位是毫秒 + minEvictableIdleTimeMillis: 300000 + # 配置一个连接在池中最大生存的时间,单位是毫秒 + maxEvictableIdleTimeMillis: 900000 + # 配置检测连接是否有效 + validationQuery: SELECT 1 + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + webStatFilter: enabled: true - # 慢SQL记录 - log-slow-sql: true - slow-sql-millis: 1000 - merge-sql: true - wall: - config: - multi-statement-allow: true + statViewServlet: + enabled: true + # 设置白名单,不填则允许所有访问 + allow: + url-pattern: /druid/* + # 控制台管理用户名和密码 + login-username: luenmeilz + login-password: 123456 + filter: + stat: + enabled: true + # 慢SQL记录 + log-slow-sql: true + slow-sql-millis: 1000 + merge-sql: true + wall: + config: + multi-statement-allow: true + datasource: + # 主库数据源 + master: + url: jdbc:mysql://10.10.10.56:13306/lzdc_bi_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&rewriteBatchedStatements=true + username: luenmei + password: 123456 + # # 计费数据库 + # charge: + # driverClassName: oracle.jdbc.OracleDriver + # url: jdbc:oracle:thin:@//10.10.10.60:1521/HX?CONNECT_TIMEOUT=10000&Read_Timeout=120000 + # username: lmjt_sys + # password: lmjt_sys + # 从库数据源 + slave: + # 从数据源开关/默认关闭 + url: jdbc:mysql://10.10.10.56:13306/lzdc_bi_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + username: luenmei + password: 123456 + workDB: + driverClassName: org.postgresql.Driver + #type: com.alibaba.druid.pool.DruidDataSource + url: jdbc:postgresql://10.10.10.56:5432/dctestdb?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=Asia/Shanghai + username: postgres + password: 123456 + primary: master + # 日志配置 logging: file: path: logs level: com.lzbi: debug - org.springframework: warn \ No newline at end of file + org.springframework: warn diff --git a/lzbi-common/src/main/java/com/lzbi/common/core/domain/entity/SysDept.java b/lzbi-common/src/main/java/com/lzbi/common/core/domain/entity/SysDept.java index 78d633a..bff42e7 100644 --- a/lzbi-common/src/main/java/com/lzbi/common/core/domain/entity/SysDept.java +++ b/lzbi-common/src/main/java/com/lzbi/common/core/domain/entity/SysDept.java @@ -60,9 +60,13 @@ public class SysDept extends BaseEntity /** 类别 */ private String orgType; + + private Long value; /** 子部门 */ private List children = new ArrayList(); - + public Long getValue(){ + return deptId; + } public Long getDeptId() { return deptId; diff --git a/lzbi-module/src/main/java/com/lzbi/asset/controller/DcBusiWorkReadConfigController.java b/lzbi-module/src/main/java/com/lzbi/asset/controller/DcBusiWorkReadConfigController.java index a3213d6..35fbcf0 100644 --- a/lzbi-module/src/main/java/com/lzbi/asset/controller/DcBusiWorkReadConfigController.java +++ b/lzbi-module/src/main/java/com/lzbi/asset/controller/DcBusiWorkReadConfigController.java @@ -1,151 +1,121 @@ package com.lzbi.asset.controller; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.lzbi.code.service.CodeNoGenerater; -import com.lzbi.code.service.DcBaseCoderuleDefineService; +import java.util.List; +import java.util.Optional; +import javax.servlet.http.HttpServletResponse; + +import com.fasterxml.jackson.databind.ext.OptionalHandlerFactory; +import com.github.pagehelper.PageHelper; +import com.lzbi.common.AssetQueryParams; +import com.lzbi.common.core.page.PageDomain; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; import com.lzbi.common.annotation.Log; import com.lzbi.common.core.controller.BaseController; import com.lzbi.common.core.domain.AjaxResult; -import com.lzbi.common.core.page.TableDataInfo; import com.lzbi.common.enums.BusinessType; -import com.lzbi.common.utils.DateUtils; -import com.lzbi.common.utils.poi.ExcelUtil; -import com.lzbi.draft.service.DcBusiParamBillMasterService; -import com.lzbi.task.TaskParamDfratProcess; -import com.lzbi.task.TaskWorkParamRead; -import com.lzbi.task.service.WorkParamReadService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import javax.servlet.http.HttpServletResponse; -import javax.validation.Valid; -import org.springframework.web.bind.annotation.*; - -import java.util.*; -import java.util.stream.Collectors; - import com.lzbi.asset.domain.DcBusiWorkReadConfig; import com.lzbi.asset.service.DcBusiWorkReadConfigService; +import com.lzbi.common.utils.poi.ExcelUtil; +import com.lzbi.common.core.page.TableDataInfo; + +import static com.lzbi.common.core.page.TableSupport.getPageDomain; /** - * 互联参数读取数据对照表;(dc_busi_work_read_config)表控制层 - * @author : zhousq - * @date : 2023-11-30 + * 互联参数读取数据对照Controller + * + * @author zhousq + * @date 2023-12-04 */ -@Api(tags = "互联参数读取数据对照表对象功能接口") @RestController -@RequestMapping("/asset/dcBusiWorkReadConfig") -public class DcBusiWorkReadConfigController extends BaseController{ +@RequestMapping("/asset/assetExtConfig") +public class DcBusiWorkReadConfigController extends BaseController +{ @Autowired private DcBusiWorkReadConfigService dcBusiWorkReadConfigService; /** - * 分页列表查询 - * @return 分页数据 + * 查询互联参数读取数据对照列表 */ - @GetMapping("/list") - public TableDataInfo list(DcBusiWorkReadConfig dcBusiWorkReadConfig) - { startPage(); - List list = null; + + @PostMapping("/list") + public TableDataInfo list(@RequestBody AssetQueryParams assetQueryParams) + { + //startPage(); + PageHelper.startPage(assetQueryParams.getPageNum(), assetQueryParams.getPageSize()); + List list = dcBusiWorkReadConfigService.selectDcBusiWorkReadConfigMainList(assetQueryParams); return getDataTable(list); } - /** - *根据ID获取详情 - *@param id - @return DcBusiWorkReadConfig 没有反馈空 - */ - @ApiOperation("根据ID获取互联参数读取数据对照表详细信息") - @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) { - return AjaxResult.success(dcBusiWorkReadConfigService.getById(id)); - } - /** - * 互联参数读取数据对照表-新增 - *@param - *@return DcBusiWorkReadConfig - */ - @ApiOperation("新增互联参数读取数据对照表一条数据") - @Log(title = "", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@Valid @RequestBody DcBusiWorkReadConfig dcBusiWorkReadConfig) { - //BeanValidators.validateWithException(validator, dcBusiWorkReadConfig); - dcBusiWorkReadConfig.setCreatedBy(getUsername()); - dcBusiWorkReadConfig.setCreatedTime(DateUtils.getNowDate()); - dcBusiWorkReadConfig.setTenantId("0"); - dcBusiWorkReadConfig.setUpdatedBy(getUsername()); - dcBusiWorkReadConfig.setUpdatedTime(DateUtils.getNowDate()); - return toAjax(true); + @PostMapping("/detail/list") + public TableDataInfo list(@RequestBody DcBusiWorkReadConfig dcBusiWorkReadConfig) + { + //startPage(); + dcBusiWorkReadConfig.setAssetCode(Optional.ofNullable(dcBusiWorkReadConfig.getAssetCode()).orElse("*")); + dcBusiWorkReadConfig.setAssetName(Optional.ofNullable(dcBusiWorkReadConfig.getAssetName()).orElse("")); + List list = dcBusiWorkReadConfigService.selectDcBusiWorkReadConfigList(dcBusiWorkReadConfig); + return getDataTable(list); } /** - * 互联参数读取数据对照表-修改 - *@param - *@return DcBusiWorkReadConfig + * 导出互联参数读取数据对照列表 */ - @ApiOperation("互联参数读取数据对照表修改") - @Log(title = "", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@Valid @RequestBody DcBusiWorkReadConfig dcBusiWorkReadConfig) { - //BeanValidators.validateWithException(validator, dcBusiWorkReadConfig); - dcBusiWorkReadConfig.setUpdatedBy(getUsername()); - dcBusiWorkReadConfig.setUpdatedTime(DateUtils.getNowDate()); - return toAjax(dcBusiWorkReadConfigService.updateById(dcBusiWorkReadConfig)); + //@PreAuthorize("@ss.hasPermi('asset:assetExtConfig:export')") + @Log(title = "互联参数读取数据对照", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, DcBusiWorkReadConfig DcBusiWorkReadConfig) + { + List list = dcBusiWorkReadConfigService.selectDcBusiWorkReadConfigList(DcBusiWorkReadConfig); + ExcelUtil util = new ExcelUtil(DcBusiWorkReadConfig.class); + util.exportExcel(response, list, "互联参数读取数据对照数据"); } + /** - * 通过ID删除互联参数读取数据对照表 - * @param id - * @return 成功1 失败0 + * 获取互联参数读取数据对照详细信息 */ - @ApiOperation("根据ID删除互联参数读取数据对照表") - @Log(title = "单一互联参数读取数据对照表", businessType = BusinessType.DELETE) - @DeleteMapping("/id/{id}") - public AjaxResult batchRemove(@PathVariable Long id) { - DcBusiWorkReadConfig dcBusiWorkReadConfig=new DcBusiWorkReadConfig(); - dcBusiWorkReadConfig.setId(id); - return toAjax(dcBusiWorkReadConfigService.removeById( dcBusiWorkReadConfig)); + //@PreAuthorize("@ss.hasPermi('asset:assetExtConfig:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(dcBusiWorkReadConfigService.selectDcBusiWorkReadConfigById(id)); } + /** - * 批量删除互联参数读取数据对照表 - * @param ids 数组 - * @return 删除的条数 + * 新增互联参数读取数据对照 */ - @ApiOperation("批量删除互联参数读取数据对照表") - @Log(title = "批量删除互联参数读取数据对照表", businessType = BusinessType.DELETE) - @DeleteMapping("/ids/{ids}") - public AjaxResult batchRemove(@PathVariable Long[] ids) { - List collect = Arrays.stream(ids).collect(Collectors.toList()); - return toAjax(dcBusiWorkReadConfigService.removeBatchByIds(collect)); + ///@PreAuthorize("@ss.hasPermi('asset:assetExtConfig:add')") + @Log(title = "互联参数读取数据对照", businessType = BusinessType.INSERT) + @PostMapping("/add") + public AjaxResult add(@RequestBody DcBusiWorkReadConfig DcBusiWorkReadConfig) + { + return toAjax(dcBusiWorkReadConfigService.insertDcBusiWorkReadConfig(DcBusiWorkReadConfig)); } + /** - * 通过模版导入"互联参数读取数据对照表数据 - * + * 修改互联参数读取数据对照 */ - @ApiOperation("互联参数读取数据对照表数据导入") - @PostMapping("/importTemplate") - public void importTemplate(HttpServletResponse response) { - ExcelUtil util = new ExcelUtil<>(DcBusiWorkReadConfig.class); - util.importTemplateExcel(response, "互联参数读取数据对照表导出数据"); + //@PreAuthorize("@ss.hasPermi('asset:assetExtConfig:edit')") + @Log(title = "互联参数读取数据对照", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody DcBusiWorkReadConfig DcBusiWorkReadConfig) + { + return toAjax(dcBusiWorkReadConfigService.updateDcBusiWorkReadConfig(DcBusiWorkReadConfig)); } + /** - * "互联参数读取数据对照表数据导出功能 + * 删除互联参数读取数据对照 */ - @ApiOperation("导出互联参数读取数据对照表数据") - @PostMapping("/export") - public void export(HttpServletResponse response, DcBusiWorkReadConfig dcBusiWorkReadConfig) { - QueryWrapper queryWrapper = new QueryWrapper<>(); - List list = dcBusiWorkReadConfigService.list(queryWrapper); - ExcelUtil util = new ExcelUtil<>(DcBusiWorkReadConfig.class); - util.exportExcel(response, list, "导出的互联参数读取数据对照表数据"); - } - @GetMapping("/getWork") - public AjaxResult getWorkParamValue(){ - TaskWorkParamRead taskWorkParamRead=new TaskWorkParamRead(); - taskWorkParamRead.runTask(false); - return success(); - } - @GetMapping("/getDraft") - public AjaxResult getDraftValue(){ - TaskParamDfratProcess taskParamDfratProcess=new TaskParamDfratProcess(); - taskParamDfratProcess.doBills(null); - return success(); + // @PreAuthorize("@ss.hasPermi('asset:assetExtConfig:remove')") + @Log(title = "互联参数读取数据对照", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(dcBusiWorkReadConfigService.deleteDcBusiWorkReadConfigByIds(ids)); } -} \ No newline at end of file +} diff --git a/lzbi-module/src/main/java/com/lzbi/asset/domain/DcBusiParamSource.java b/lzbi-module/src/main/java/com/lzbi/asset/domain/DcBusiParamSource.java new file mode 100644 index 0000000..67ff1ec --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/asset/domain/DcBusiParamSource.java @@ -0,0 +1,60 @@ +package com.lzbi.asset.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.TableId; +import java.io.Serializable; +import java.util.Date; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.Accessors; +import com.lzbi.module.base.BaseModuleEntity; + +/** + * 采集参数来源信息表; + * @author : zhousq + * @date : 2023-12-5 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@Accessors(chain = true) +@ApiModel(value = "采集参数来源信息表",description = "") +@TableName("dc_busi_param_source") +public class DcBusiParamSource extends BaseModuleEntity{ + /** 参数编码 */ + @ApiModelProperty(name = "参数编码",notes = "") + private String paramCode ; + /** 参数名称 */ + @ApiModelProperty(name = "参数名称",notes = "") + private String paramName ; + /** 分组名称 */ + @ApiModelProperty(name = "分组名称",notes = "") + private String groupName ; + /** 分组编码 */ + @ApiModelProperty(name = "分组编码",notes = "") + private String groupCode ; + /** 扩展属性 */ + @ApiModelProperty(name = "扩展属性",notes = "") + private String extPro ; + /** 来源类型 */ + @ApiModelProperty(name = "来源类型",notes = "") + private String sourceType ; + /** 是否有效 */ + @ApiModelProperty(name = "是否有效",notes = "") + private String enabledFlag ; + /** 主键 */ + @ApiModelProperty(name = "主键",notes = "") + @TableId(type= IdType.AUTO) + private Integer id ; + /** 所属专业 */ + @ApiModelProperty(name = "所属专业",notes = "") + private String fieldCode ; + /** 所属名称 */ + @ApiModelProperty(name = "所属名称",notes = "") + private String fieldName ; + +} \ No newline at end of file diff --git a/lzbi-module/src/main/java/com/lzbi/asset/domain/DcBusiWorkReadConfig.java b/lzbi-module/src/main/java/com/lzbi/asset/domain/DcBusiWorkReadConfig.java index eb2ab2e..839a9b7 100644 --- a/lzbi-module/src/main/java/com/lzbi/asset/domain/DcBusiWorkReadConfig.java +++ b/lzbi-module/src/main/java/com/lzbi/asset/domain/DcBusiWorkReadConfig.java @@ -1,54 +1,80 @@ package com.lzbi.asset.domain; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import com.baomidou.mybatisplus.annotation.TableName; -import com.baomidou.mybatisplus.annotation.TableId; -import java.util.Date; -import lombok.AllArgsConstructor; import lombok.Data; -import lombok.NoArgsConstructor; -import lombok.experimental.Accessors; +import com.lzbi.common.annotation.Excel; import com.lzbi.module.base.BaseModuleEntity; /** - * 互联参数读取数据对照表; - * @author : zhousq - * @date : 2023-11-30 + * 互联参数读取数据对照对象 dc_busi_work_read_config + * + * @author zhousq + * @date 2023-12-04 */ -@Data -@NoArgsConstructor -@AllArgsConstructor -@Accessors(chain = true) -@ApiModel(value = "互联参数读取数据对照表",description = "") -@TableName("dc_busi_work_read_config") -public class DcBusiWorkReadConfig extends BaseModuleEntity{ + @Data +public class DcBusiWorkReadConfig extends BaseModuleEntity +{ + private static final long serialVersionUID = 1L; /** 主键 */ - @ApiModelProperty(name = "主键",notes = "") - @TableId - private Long id ; + @Excel(name = "主键") + private Long id; + + /** 公司ID */ + private Long companyId; + + /** 公司名称 */ + @Excel(name = "公司名称") + private String companyName; + + /** 组织机构名称 */ + @Excel(name = "组织机构名称") + private String organizeName; + + /** 组织机构ID */ + private Long oragnizeId; + /** 统计单元编码 */ - @ApiModelProperty(name = "统计单元编码",notes = "") - private String assetCode ; - /** 统计单元参数编码 */ - @ApiModelProperty(name = "统计单元参数编码",notes = "") - private String assetParamCode ; + private String assetCode; + + /** 统计单元名称 */ + @Excel(name = "统计单元名称") + private String assetName; + + /** 统计参数编码 */ + private String assetParamCode; + /** 目标参数编码 */ - @ApiModelProperty(name = "目标参数编码",notes = "") - private String goalParamCode ; - /** 目标参数辅助查询参数1 */ - @ApiModelProperty(name = "目标参数辅助查询参数1",notes = "") - private String goalParamExt1 ; - /** 目标参数辅助查询参数2 */ - @ApiModelProperty(name = "目标参数辅助查询参数2",notes = "") - private String goalParamExt2 ; + private String goalParamCode; + + /** 目标参数名称 */ + @Excel(name = "目标参数名称") + private String goalParamName; + + /** 目标参数扩展1 */ + @Excel(name = "目标参数扩展1") + private String goalParamExt1; + + /** 目标参数扩展2 */ + @Excel(name = "目标参数扩展2") + private String goalParamExt2; + /** 读取数值类型 */ - @ApiModelProperty(name = "读取数值类型",notes = "") - private String goalParamType ; - /** 数据来源;生产IOT:work;计费:charge;Erp:erp */ - @ApiModelProperty(name = "数据来源",notes = "生产IOT:work;计费:charge;Erp:erp") - private String goalSource ; - @ApiModelProperty(name = "所属专业") - private String assetFieldCode ; - -} \ No newline at end of file + @Excel(name = "读取数值类型") + private String goalParamType; + + /** 数据来源 */ + @Excel(name = "数据来源") + private String goalSource; + + /** 生产专业编码 */ + private String assetFieldCode; + + /** 生产专业名称 */ + @Excel(name = "生产专业名称") + private String assetFieldName; + + /** 统计单元参数名称 */ + @Excel(name = "统计单元参数名称") + private String assetParamName; + private Integer paramCounts; + +} diff --git a/lzbi-module/src/main/java/com/lzbi/asset/mapper/DcBusiParamSourceMapper.java b/lzbi-module/src/main/java/com/lzbi/asset/mapper/DcBusiParamSourceMapper.java new file mode 100644 index 0000000..f77c072 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/asset/mapper/DcBusiParamSourceMapper.java @@ -0,0 +1,17 @@ +package com.lzbi.asset.mapper; + +import com.baomidou.mybatisplus.annotation.InterceptorIgnore; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.lzbi.asset.domain.DcBusiParamSource; +import java.util.List; + +/** + * 采集参数来源信息表;(dc_busi_param_source)表数据库访问层 + * @author : zhousq + * @date : 2023-12-5 + */ +@InterceptorIgnore(tenantLine = "true") +public interface DcBusiParamSourceMapper extends BaseMapper{ + List selectByVo( DcBusiParamSource beanVo); + int insertByVo( DcBusiParamSource beanVo); +} \ No newline at end of file diff --git a/lzbi-module/src/main/java/com/lzbi/asset/mapper/DcBusiWorkReadConfigMapper.java b/lzbi-module/src/main/java/com/lzbi/asset/mapper/DcBusiWorkReadConfigMapper.java index 2f179ad..325cb4e 100644 --- a/lzbi-module/src/main/java/com/lzbi/asset/mapper/DcBusiWorkReadConfigMapper.java +++ b/lzbi-module/src/main/java/com/lzbi/asset/mapper/DcBusiWorkReadConfigMapper.java @@ -1,17 +1,65 @@ package com.lzbi.asset.mapper; -import com.baomidou.mybatisplus.annotation.InterceptorIgnore; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.lzbi.asset.domain.DcBusiWorkReadConfig; import java.util.List; +import com.lzbi.asset.domain.DcBusiWorkReadConfig; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.lzbi.common.AssetQueryParams; /** - * 互联参数读取数据对照表;(dc_busi_work_read_config)表数据库访问层 - * @author : zhousq - * @date : 2023-11-30 + * 互联参数读取数据对照Mapper接口 + * + * @author zhousq + * @date 2023-12-04 */ -@InterceptorIgnore(tenantLine = "true") -public interface DcBusiWorkReadConfigMapper extends BaseMapper{ - List selectByVo( DcBusiWorkReadConfig beanVo); - int insertByVo( DcBusiWorkReadConfig beanVo); -} \ No newline at end of file + +public interface DcBusiWorkReadConfigMapper extends BaseMapper +{ + /** + * 查询互联参数读取数据对照 + * + * @param id 互联参数读取数据对照主键 + * @return 互联参数读取数据对照 + */ + public DcBusiWorkReadConfig selectDcBusiWorkReadConfigById(Long id); + + /** + * 查询互联参数读取数据对照列表 + * + * @param dcBusiWorkReadConfig 互联参数读取数据对照 + * @return 互联参数读取数据对照集合 + */ + public List selectDcBusiWorkReadConfigList(DcBusiWorkReadConfig dcBusiWorkReadConfig); + public List selectDcBusiWorkReadConfigMainList(AssetQueryParams assetQueryParams); + + /** + * 新增互联参数读取数据对照 + * + * @param dcBusiWorkReadConfig 互联参数读取数据对照 + * @return 结果 + */ + public int insertDcBusiWorkReadConfig(DcBusiWorkReadConfig dcBusiWorkReadConfig); + + /** + * 修改互联参数读取数据对照 + * + * @param dcBusiWorkReadConfig 互联参数读取数据对照 + * @return 结果 + */ + public int updateDcBusiWorkReadConfig(DcBusiWorkReadConfig dcBusiWorkReadConfig); + + /** + * 删除互联参数读取数据对照 + * + * @param id 互联参数读取数据对照主键 + * @return 结果 + */ + public int deleteDcBusiWorkReadConfigById(Long id); + + /** + * 批量删除互联参数读取数据对照 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteDcBusiWorkReadConfigByIds(Long[] ids); +} diff --git a/lzbi-module/src/main/java/com/lzbi/asset/service/DcBusiParamSourceService.java b/lzbi-module/src/main/java/com/lzbi/asset/service/DcBusiParamSourceService.java new file mode 100644 index 0000000..77f185b --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/asset/service/DcBusiParamSourceService.java @@ -0,0 +1,25 @@ +package com.lzbi.asset.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.lzbi.asset.mapper.DcBusiParamSourceMapper; +import org.springframework.stereotype.Service; +import com.lzbi.asset.domain.DcBusiParamSource; +import java.util.List; + +/** + * 采集参数来源信息表;(dc_busi_param_source)表服务接口 + * @author : zhousq + * @date : 2023-12-5 + */ +@Service +public class DcBusiParamSourceService extends ServiceImpl implements IService { + + public List selectByVo( DcBusiParamSource dcBusiParamSource){ + return baseMapper.selectByVo(dcBusiParamSource); + } + public int insertByVo( DcBusiParamSource dcBusiParamSource){ + return baseMapper.insertByVo(dcBusiParamSource); + } + +} \ No newline at end of file diff --git a/lzbi-module/src/main/java/com/lzbi/asset/service/DcBusiWorkReadConfigService.java b/lzbi-module/src/main/java/com/lzbi/asset/service/DcBusiWorkReadConfigService.java index c9bf374..7b1cce6 100644 --- a/lzbi-module/src/main/java/com/lzbi/asset/service/DcBusiWorkReadConfigService.java +++ b/lzbi-module/src/main/java/com/lzbi/asset/service/DcBusiWorkReadConfigService.java @@ -1,25 +1,96 @@ package com.lzbi.asset.service; -import com.baomidou.mybatisplus.extension.service.IService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.lzbi.asset.mapper.DcBusiWorkReadConfigMapper; -import org.springframework.stereotype.Service; -import com.lzbi.asset.domain.DcBusiWorkReadConfig; import java.util.List; +import com.lzbi.common.AssetQueryParams; +import com.lzbi.common.utils.DateUtils; +import org.springframework.stereotype.Service; +import com.lzbi.asset.domain.DcBusiWorkReadConfig; +import com.lzbi.asset.mapper.DcBusiWorkReadConfigMapper; +import com.baomidou.mybatisplus.extension.service.IService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; /** - * 互联参数读取数据对照表;(dc_busi_work_read_config)表服务接口 - * @author : zhousq - * @date : 2023-11-30 + * 互联参数读取数据对照Service业务层处理 + * + * @author zhousq + * @date 2023-12-04 */ @Service -public class DcBusiWorkReadConfigService extends ServiceImpl implements IService { +public class DcBusiWorkReadConfigService extends ServiceImpl implements IService +{ + + /** + * 查询互联参数读取数据对照 + * + * @param id 互联参数读取数据对照主键 + * @return 互联参数读取数据对照 + */ + public DcBusiWorkReadConfig selectDcBusiWorkReadConfigById(Long id) + { + return baseMapper.selectDcBusiWorkReadConfigById(id); + } + + /** + * 查询互联参数读取数据对照列表 + * + * @param dcBusiWorkReadConfig 互联参数读取数据对照 + * @return 互联参数读取数据对照 + */ + public List selectDcBusiWorkReadConfigList(DcBusiWorkReadConfig dcBusiWorkReadConfig) + { + return baseMapper.selectDcBusiWorkReadConfigList(dcBusiWorkReadConfig); + } + public List selectDcBusiWorkReadConfigMainList(AssetQueryParams asetQueryParams) + { + return baseMapper.selectDcBusiWorkReadConfigMainList(asetQueryParams); + } + /** + * 新增互联参数读取数据对照 + * + * @param dcBusiWorkReadConfig 互联参数读取数据对照 + * @return 结果 + */ - public List selectByVo( DcBusiWorkReadConfig dcBusiWorkReadConfig){ - return baseMapper.selectByVo(dcBusiWorkReadConfig); + public int insertDcBusiWorkReadConfig(DcBusiWorkReadConfig dcBusiWorkReadConfig) + { + dcBusiWorkReadConfig.setCreatedTime(DateUtils.getNowDate()); + return baseMapper.insertDcBusiWorkReadConfig(dcBusiWorkReadConfig); } - public int insertByVo( DcBusiWorkReadConfig dcBusiWorkReadConfig){ - return baseMapper.insertByVo(dcBusiWorkReadConfig); + + /** + * 修改互联参数读取数据对照 + * + * @param dcBusiWorkReadConfig 互联参数读取数据对照 + * @return 结果 + */ + + public int updateDcBusiWorkReadConfig(DcBusiWorkReadConfig dcBusiWorkReadConfig) + { + dcBusiWorkReadConfig.setUpdatedTime(DateUtils.getNowDate()); + return baseMapper.updateDcBusiWorkReadConfig(dcBusiWorkReadConfig); } -} \ No newline at end of file + /** + * 批量删除互联参数读取数据对照 + * + * @param ids 需要删除的互联参数读取数据对照主键 + * @return 结果 + */ + + public int deleteDcBusiWorkReadConfigByIds(Long[] ids) + { + return baseMapper.deleteDcBusiWorkReadConfigByIds(ids); + } + + /** + * 删除互联参数读取数据对照信息 + * + * @param id 互联参数读取数据对照主键 + * @return 结果 + */ + + public int deleteDcBusiWorkReadConfigById(Long id) + { + return baseMapper.deleteDcBusiWorkReadConfigById(id); + } +} diff --git a/lzbi-module/src/main/java/com/lzbi/common/AssetQueryParams.java b/lzbi-module/src/main/java/com/lzbi/common/AssetQueryParams.java new file mode 100644 index 0000000..731a939 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/common/AssetQueryParams.java @@ -0,0 +1,35 @@ +package com.lzbi.common; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @auth create by Administrator + * @date 2023/12/5 + * AssetQueryParams + * 统计单元联动查询参数 + */ +@Data +public class AssetQueryParams { + @ApiModelProperty("公司ID") + private Long companyID; + @ApiModelProperty("组织机构ID") + private Long orgID; + @ApiModelProperty("所属专业编码") + private String fieldCode; + @ApiModelProperty("统计单元编码") + private String assetCode; + @ApiModelProperty("统计单元ID") + private Long assetId; + @ApiModelProperty("公司名称") + private Long companyName; + @ApiModelProperty("组织机构名称") + private Long orgName; + @ApiModelProperty("所属专业名称") + private String fieldName; + @ApiModelProperty("统计单元名称") + private String assetName; + private Integer pageNum; + private Integer pageSize; + +} diff --git a/lzbi-module/src/main/java/com/lzbi/common/SelectOptionsControl.java b/lzbi-module/src/main/java/com/lzbi/common/SelectOptionsControl.java new file mode 100644 index 0000000..d5d54de --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/common/SelectOptionsControl.java @@ -0,0 +1,107 @@ +package com.lzbi.common; + +import com.lzbi.asset.domain.DcBaseAssetInfo; +import com.lzbi.asset.domain.DcBusiParamSource; +import com.lzbi.asset.service.DcBusiParamSourceService; +import com.lzbi.asset.service.IDcBaseAssetInfoService; +import com.lzbi.common.core.controller.BaseController; +import com.lzbi.common.core.domain.AjaxResult; +import com.lzbi.common.core.domain.TreeSelect; +import com.lzbi.common.core.domain.entity.SysDept; +import com.lzbi.special.domain.DcBaseWorkSpecial; +import com.lzbi.special.service.DcBaseWorkSpecialService; +import com.lzbi.system.service.impl.SysDeptServiceImpl; +import io.swagger.annotations.ApiModel; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.lang.Nullable; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @auth create by Administrator + * @date 2023/12/5 + * SelectOptionsControl + */ +@ApiModel("通用选择接口") +@RestController +@RequestMapping("/tool") +public class SelectOptionsControl extends BaseController { + @Autowired + private SysDeptServiceImpl sysDeptService; + @Autowired + DcBaseWorkSpecialService dcBaseWorkSpecialService; + @Autowired + IDcBaseAssetInfoService dcBaseAssetInfoService; + @Autowired + DcBusiParamSourceService dcBusiParamSourceService; + ///获取部门类型为公司的列表,树形选择 + @GetMapping("/company/tree/{depId}") + public AjaxResult getCompanyTreeList(@Nullable @PathVariable Long depId){ + if(depId==0){ + depId=null; + } + List lsysDept = sysDeptService.selectCompany(depId); + List treeSelects = sysDeptService.buildDeptTreeSelect(lsysDept); + return AjaxResult.success( treeSelects) ; + } + //普通列表 + @GetMapping("/company/list/{depId}") + public AjaxResult getCompanyList(@Nullable @PathVariable Long depId){ + if(depId==0){ + depId=null; + } + return AjaxResult.success(sysDeptService.selectCompany(depId)) ; + } + ///获取部门类型为组织的列表 + @GetMapping("/org/list/{depId}") + public AjaxResult getOrgList(@Nullable @PathVariable Long depId){ + if(depId==0){ + depId=null; + } + return AjaxResult.success(sysDeptService.selectOrg(depId)) ; + } + ///获取部门类型为组织的树形选择 + @GetMapping("/org/tree/{depId}") + public AjaxResult getOrgTreeList(@Nullable @PathVariable Long depId){ + if(depId==0){ + depId=null; + } + List lsysDept = sysDeptService.selectOrg(depId); + return AjaxResult.success(sysDeptService.buildDeptTreeSelect(lsysDept)) ; + } + //获取生产专业的列表 + @GetMapping("/special/list") + public AjaxResult getSepcialSelectList() + { + DcBaseWorkSpecial dcBaseWorkSpecialDao=new DcBaseWorkSpecial(); + return AjaxResult.success( dcBaseWorkSpecialService.selectDcBaseWorkSpecialDictList(dcBaseWorkSpecialDao)); + } + //根据条件获取统计单元列表 + @PostMapping("/assetInfo/list") + public AjaxResult getAssetSelectList(@RequestBody AssetQueryParams assetQueryParams) + { + DcBaseAssetInfo dcBaseAssetInfo=new DcBaseAssetInfo(); + //dcBaseAssetInfo.setAssetClass(assetQueryParams.getFieldCode()); + dcBaseAssetInfo.setComanyId(assetQueryParams.getCompanyID()); + dcBaseAssetInfo.setDeptId(assetQueryParams.getOrgID()); + return AjaxResult.success(dcBaseAssetInfoService.selectDcBaseAssetInfoList(dcBaseAssetInfo)); + } + //根据条件获取统计单元指标列表 + @PostMapping("/assetTaget/list") + public AjaxResult getAssetTargetSelectList(@RequestBody AssetQueryParams assetQueryParams) + { + + return AjaxResult.success(null); + } + // + //获取IOT参数列表 + @GetMapping("/iotParam/list/{fcode}") + public AjaxResult getAssetIotParamList(@PathVariable String fcode) + { + DcBusiParamSource dcBusiParamSource=new DcBusiParamSource(); + dcBusiParamSource.setEnabledFlag("0"); + dcBusiParamSource.setFieldCode(fcode); + return AjaxResult.success(dcBusiParamSourceService.selectByVo(dcBusiParamSource)); + } +} diff --git a/lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiParamBillMasterController.java b/lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiParamBillMasterController.java index dbcc05f..587af03 100644 --- a/lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiParamBillMasterController.java +++ b/lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiParamBillMasterController.java @@ -16,7 +16,7 @@ import com.lzbi.common.annotation.Log; import com.lzbi.common.core.controller.BaseController; import com.lzbi.common.core.domain.AjaxResult; import com.lzbi.common.enums.BusinessType; -import com.lzbi.draft.domain.DcBusiParamBillMasterDao; +import com.lzbi.draft.domain.DcBusiParamBillMaster; import com.lzbi.draft.service.DcBusiParamBillMasterService; import com.lzbi.common.utils.poi.ExcelUtil; import com.lzbi.common.core.page.TableDataInfo; @@ -28,7 +28,7 @@ import com.lzbi.common.core.page.TableDataInfo; * @date 2023-11-28 */ @RestController -@RequestMapping("/asset/data/paramData") +@RequestMapping("/draft/paramInBill") public class DcBusiParamBillMasterController extends BaseController { @Autowired @@ -39,10 +39,10 @@ public class DcBusiParamBillMasterController extends BaseController */ @PreAuthorize("@ss.hasPermi('param:paramData:list')") @GetMapping("/list") - public TableDataInfo list(DcBusiParamBillMasterDao dcBusiParamBillMasterDao) + public TableDataInfo list(DcBusiParamBillMaster dcBusiParamBillMasterDao) { startPage(); - List list = dcBusiParamBillMasterService.selectDcBusiParamBillMasterDaoList(dcBusiParamBillMasterDao); + List list = dcBusiParamBillMasterService.selectDcBusiParamBillMasterDaoList(dcBusiParamBillMasterDao); return getDataTable(list); } @@ -52,10 +52,10 @@ public class DcBusiParamBillMasterController extends BaseController @PreAuthorize("@ss.hasPermi('param:paramData:export')") @Log(title = "参数采集(录入)单据主", businessType = BusinessType.EXPORT) @PostMapping("/export") - public void export(HttpServletResponse response, DcBusiParamBillMasterDao dcBusiParamBillMasterDao) + public void export(HttpServletResponse response, DcBusiParamBillMaster dcBusiParamBillMasterDao) { - List list = dcBusiParamBillMasterService.selectDcBusiParamBillMasterDaoList(dcBusiParamBillMasterDao); - ExcelUtil util = new ExcelUtil(DcBusiParamBillMasterDao.class); + List list = dcBusiParamBillMasterService.selectDcBusiParamBillMasterDaoList(dcBusiParamBillMasterDao); + ExcelUtil util = new ExcelUtil(DcBusiParamBillMaster.class); util.exportExcel(response, list, "参数采集(录入)单据主数据"); } @@ -75,7 +75,7 @@ public class DcBusiParamBillMasterController extends BaseController @PreAuthorize("@ss.hasPermi('param:paramData:add')") @Log(title = "参数采集(录入)单据主", businessType = BusinessType.INSERT) @PostMapping - public AjaxResult add(@RequestBody DcBusiParamBillMasterDao dcBusiParamBillMasterDao) + public AjaxResult add(@RequestBody DcBusiParamBillMaster dcBusiParamBillMasterDao) { return toAjax(dcBusiParamBillMasterService.insertDcBusiParamBillMasterDao(dcBusiParamBillMasterDao)); } @@ -86,7 +86,7 @@ public class DcBusiParamBillMasterController extends BaseController @PreAuthorize("@ss.hasPermi('param:paramData:edit')") @Log(title = "参数采集(录入)单据主", businessType = BusinessType.UPDATE) @PutMapping - public AjaxResult edit(@RequestBody DcBusiParamBillMasterDao dcBusiParamBillMasterDao) + public AjaxResult edit(@RequestBody DcBusiParamBillMaster dcBusiParamBillMasterDao) { return toAjax(dcBusiParamBillMasterService.updateDcBusiParamBillMasterDao(dcBusiParamBillMasterDao)); } diff --git a/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamBillMaster.java b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamBillMaster.java new file mode 100644 index 0000000..c0bc7ae --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamBillMaster.java @@ -0,0 +1,75 @@ +package com.lzbi.draft.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.TableId; +import java.util.Date; +import java.util.List; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.Accessors; +import com.lzbi.module.base.BaseModuleEntity; + +/** + * 参数采集(录入)单据主对象 dc_busi_param_bill_master + * + * @author win + * @date 2023-11-28 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@Accessors(chain = true) +@ApiModel(value = "参数采集(录入)单据主表",description = "") +@TableName("dc_busi_param_bill_master") +public class DcBusiParamBillMaster extends BaseModuleEntity +{ + /** 主键 */ + @ApiModelProperty(name = "主键",notes = "") + @TableId(type= IdType.AUTO) + private Long id ; + /** 单据编号 */ + @ApiModelProperty(name = "单据编号",notes = "") + private String billNo ; + /** 采集时间 */ + @ApiModelProperty(name = "采集时间",notes = "") + private String billIncomeDate ; + /** 单据类型 */ + @ApiModelProperty(name = "单据类型",notes = "") + private String billType ; + /** 审核类型 */ + @ApiModelProperty(name = "审核类型",notes = "") + private String checkType ; + /** 审核状态 */ + @ApiModelProperty(name = "审核状态",notes = "") + private String checkStatus ; + /** 公司ID */ + @ApiModelProperty(name = "公司ID",notes = "") + private Integer companyId ; + /** 公司名称 */ + @ApiModelProperty(name = "公司名称",notes = "") + private String companyName ; + /** 组织机构名称 */ + @ApiModelProperty(name = "组织机构名称",notes = "") + private String organizeName ; + /** 组织机构ID */ + @ApiModelProperty(name = "组织机构ID",notes = "") + private Integer oragnizeId ; + /** 统计单元编码 */ + @ApiModelProperty(name = "统计单元编码",notes = "") + private String assetCode ; + /** 统计单元名称 */ + @ApiModelProperty(name = "统计单元名称",notes = "") + private String assetName ; + + /** 参数数据采集(录入)明细信息 */ + private List dcBusiParamBillSubList; + + + + +} diff --git a/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamBillMasterDao.java b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamBillMasterDao.java deleted file mode 100644 index 2730bff..0000000 --- a/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamBillMasterDao.java +++ /dev/null @@ -1,94 +0,0 @@ -package com.lzbi.draft.domain; - -import java.util.List; -import java.util.Date; -import lombok.Data; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.lzbi.common.annotation.Excel; -import com.lzbi.module.base.BaseModuleEntity; - -/** - * 参数采集(录入)单据主对象 dc_busi_param_bill_master - * - * @author win - * @date 2023-11-28 - */ -@Data -public class DcBusiParamBillMasterDao extends BaseModuleEntity -{ - private static final long serialVersionUID = 1L; - - /** 租户号 */ - private String tenantId; - - /** 乐观锁 */ - private Long REVISION; - - /** 创建人 */ - private String createdBy; - - /** 创建时间 */ - private Date createdTime; - - /** 更新人 */ - private String updatedBy; - - /** 更新时间 */ - private Date updatedTime; - - /** 删除人 */ - private String deleteBy; - - /** 删除时间 */ - private Date deleteTime; - - /** 主键 */ - private Long id; - - /** 单据编号 */ - @Excel(name = "单据编号") - private String billNo; - - /** 采集时间 */ - @Excel(name = "采集时间") - private String billIncomeDate; - - /** 单据类型 */ - @Excel(name = "单据类型") - private String billType; - - /** 审核类型 */ - @Excel(name = "审核类型") - private String checkType; - - /** 审核状态 */ - @Excel(name = "审核状态") - private String checkStatus; - - /** 参数数据采集(录入)明细信息 */ - private List dcBusiParamBillSubDaoList; - - - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("tenantId", getTenantId()) - .append("REVISION", getREVISION()) - .append("createdBy", getCreatedBy()) - .append("createdTime", getCreatedTime()) - .append("updatedBy", getUpdatedBy()) - .append("updatedTime", getUpdatedTime()) - .append("deleteBy", getDeleteBy()) - .append("deleteTime", getDeleteTime()) - .append("id", getId()) - .append("billNo", getBillNo()) - .append("billIncomeDate", getBillIncomeDate()) - .append("billType", getBillType()) - .append("checkType", getCheckType()) - .append("checkStatus", getCheckStatus()) - .append("dcBusiParamBillSubList", getDcBusiParamBillSubDaoList()) - .toString(); - } -} diff --git a/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamBillSub.java b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamBillSub.java index 0dcc1e0..6b2fdb4 100644 --- a/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamBillSub.java +++ b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamBillSub.java @@ -29,7 +29,7 @@ import com.lzbi.module.base.BaseModuleEntity; public class DcBusiParamBillSub extends BaseModuleEntity{ /** 主键 */ @ApiModelProperty(name = "主键",notes = "") - @TableId + @TableId(type = IdType.AUTO) private Integer id ; /** 单据编码 */ @ApiModelProperty(name = "单据编码",notes = "") diff --git a/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetDraftDayDao.java b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetDraftDayDao.java index b3b2683..7748f43 100644 --- a/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetDraftDayDao.java +++ b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetDraftDayDao.java @@ -20,30 +20,6 @@ public class DcBusiTargetDraftDayDao extends BaseModuleEntity { private static final long serialVersionUID = 1L; - /** 租户号 */ - private String tenantId; - - /** 乐观锁 */ - private Long REVISION; - - /** 创建人 */ - private String createdBy; - - /** 创建时间 */ - private Date createdTime; - - /** 更新人 */ - private String updatedBy; - - /** 更新时间 */ - private Date updatedTime; - - /** 删除人 */ - private String deleteBy; - - /** 删除时间 */ - private Date deleteTime; - /** 主键 */ private Long id; diff --git a/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiParamBillMasterMapper.java b/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiParamBillMasterMapper.java index f3ce54e..1dc92a6 100644 --- a/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiParamBillMasterMapper.java +++ b/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiParamBillMasterMapper.java @@ -2,7 +2,7 @@ package com.lzbi.draft.mapper; import java.util.List; -import com.lzbi.draft.domain.DcBusiParamBillMasterDao; +import com.lzbi.draft.domain.DcBusiParamBillMaster; import com.lzbi.draft.domain.DcBusiParamBillSub; import com.baomidou.mybatisplus.core.mapper.BaseMapper; @@ -13,7 +13,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; * @date 2023-11-28 */ -public interface DcBusiParamBillMasterMapper extends BaseMapper +public interface DcBusiParamBillMasterMapper extends BaseMapper { /** * 查询参数采集(录入)单据主 @@ -21,7 +21,7 @@ public interface DcBusiParamBillMasterMapper extends BaseMapper selectDcBusiParamBillMasterDaoList(DcBusiParamBillMasterDao dcBusiParamBillMasterDao); + public List selectDcBusiParamBillMasterDaoList(DcBusiParamBillMaster dcBusiParamBillMasterDao); /** * 新增参数采集(录入)单据主 @@ -37,7 +37,7 @@ public interface DcBusiParamBillMasterMapper extends BaseMapper implements IService +public class DcBusiParamBillMasterService extends ServiceImpl implements IService { /** @@ -28,7 +28,7 @@ public class DcBusiParamBillMasterService extends ServiceImpl selectDcBusiParamBillMasterDaoList(DcBusiParamBillMasterDao dcBusiParamBillMasterDao) + public List selectDcBusiParamBillMasterDaoList(DcBusiParamBillMaster dcBusiParamBillMasterDao) { return baseMapper.selectDcBusiParamBillMasterDaoList(dcBusiParamBillMasterDao); } @@ -52,7 +52,7 @@ public class DcBusiParamBillMasterService extends ServiceImpl dcBusiParamBillSubDaoList = dcBusiParamBillMasterDao.getDcBusiParamBillSubDaoList(); + List dcBusiParamBillSubDaoList = dcBusiParamBillMasterDao.getDcBusiParamBillSubList(); String billNo = dcBusiParamBillMasterDao.getBillNo(); if (StringUtils.isNotNull(dcBusiParamBillSubDaoList)) { diff --git a/lzbi-module/src/main/java/com/lzbi/module/base/BaseModuleEntity.java b/lzbi-module/src/main/java/com/lzbi/module/base/BaseModuleEntity.java index 05ab81b..df79afa 100644 --- a/lzbi-module/src/main/java/com/lzbi/module/base/BaseModuleEntity.java +++ b/lzbi-module/src/main/java/com/lzbi/module/base/BaseModuleEntity.java @@ -36,13 +36,17 @@ public class BaseModuleEntity implements Serializable,Cloneable{ /** 删除时间 */ @ApiModelProperty(name = "删除时间",notes = "") private Date deleteTime ; + + @ApiModelProperty("分页") + private Integer pageNum ; + @ApiModelProperty("分页大小") + private Integer pageSize ; /** 部门id */ @ApiModelProperty(name = "部门id",notes = "") private Long deptId ; /** 用户id */ @ApiModelProperty(name = "用户id",notes = "") private Long userId ; - public String getTenantId() { return tenantId; } @@ -107,6 +111,21 @@ public class BaseModuleEntity implements Serializable,Cloneable{ this.deleteTime = deleteTime; } + public Integer getPageNum() { + return pageNum; + } + + public void setPageNum(Integer pageNum) { + this.pageNum = pageNum; + } + + public Integer getPageSize() { + return pageSize; + } + + public void setPageSize(Integer pageSize) { + this.pageSize = pageSize; + } public Long getDeptId() { return deptId; } diff --git a/lzbi-module/src/main/java/com/lzbi/special/controller/DcBaseWorkSpecialController.java b/lzbi-module/src/main/java/com/lzbi/special/controller/DcBaseWorkSpecialController.java index 710cc66..5546c1e 100644 --- a/lzbi-module/src/main/java/com/lzbi/special/controller/DcBaseWorkSpecialController.java +++ b/lzbi-module/src/main/java/com/lzbi/special/controller/DcBaseWorkSpecialController.java @@ -48,7 +48,7 @@ public class DcBaseWorkSpecialController extends BaseController public TableDataInfo list(DcBaseWorkSpecial dcBaseWorkSpecial) { startPage(); - List list = dcBaseWorkSpecialService.selectDcBaseWorkSpecialDaoList(dcBaseWorkSpecial); + List list = dcBaseWorkSpecialService.selectDcBaseWorkSpecialList(dcBaseWorkSpecial); return getDataTable(list); } @@ -60,7 +60,7 @@ public class DcBaseWorkSpecialController extends BaseController @PostMapping("/export") public void export(HttpServletResponse response, DcBaseWorkSpecial dcBaseWorkSpecial) { - List list = dcBaseWorkSpecialService.selectDcBaseWorkSpecialDaoList(dcBaseWorkSpecial); + List list = dcBaseWorkSpecialService.selectDcBaseWorkSpecialList(dcBaseWorkSpecial); ExcelUtil util = new ExcelUtil(DcBaseWorkSpecial.class); util.exportExcel(response, list, "生产专业管理数据"); } @@ -94,7 +94,7 @@ public class DcBaseWorkSpecialController extends BaseController @PutMapping public AjaxResult edit(@RequestBody DcBaseWorkSpecial dcBaseWorkSpecial) { - return toAjax(dcBaseWorkSpecialService.updateDcBaseWorkSpecialDao(dcBaseWorkSpecial)); + return toAjax(dcBaseWorkSpecialService.updateDcBaseWorkSpecial(dcBaseWorkSpecial)); } /** @@ -116,7 +116,7 @@ public class DcBaseWorkSpecialController extends BaseController @GetMapping("/listNoPage") public AjaxResult listNoPage(DcBaseWorkSpecial dcBaseWorkSpecial) { - List list = dcBaseWorkSpecialService.selectDcBaseWorkSpecialDaoList(dcBaseWorkSpecial); + List list = dcBaseWorkSpecialService.selectDcBaseWorkSpecialList(dcBaseWorkSpecial); return AjaxResult.success(list); } /** diff --git a/lzbi-module/src/main/java/com/lzbi/special/mapper/DcBaseWorkSpecialMapper.java b/lzbi-module/src/main/java/com/lzbi/special/mapper/DcBaseWorkSpecialMapper.java index 12f6b15..1dfc9a0 100644 --- a/lzbi-module/src/main/java/com/lzbi/special/mapper/DcBaseWorkSpecialMapper.java +++ b/lzbi-module/src/main/java/com/lzbi/special/mapper/DcBaseWorkSpecialMapper.java @@ -30,7 +30,7 @@ public interface DcBaseWorkSpecialMapper extends BaseMapper * @return 生产专业管理集合 */ public List selectDcBaseWorkSpecialList(DcBaseWorkSpecial dcBaseWorkSpecial); - + public List selectDcBaseWorkSpecialDictList(DcBaseWorkSpecial dcBaseWorkSpecial); /** * 新增生产专业管理 * diff --git a/lzbi-module/src/main/java/com/lzbi/special/service/DcBaseWorkSpecialService.java b/lzbi-module/src/main/java/com/lzbi/special/service/DcBaseWorkSpecialService.java index a9a1f55..41aa85a 100644 --- a/lzbi-module/src/main/java/com/lzbi/special/service/DcBaseWorkSpecialService.java +++ b/lzbi-module/src/main/java/com/lzbi/special/service/DcBaseWorkSpecialService.java @@ -38,11 +38,14 @@ public class DcBaseWorkSpecialService extends ServiceImpl selectDcBaseWorkSpecialDaoList(DcBaseWorkSpecial dcBaseWorkSpecial) + public List selectDcBaseWorkSpecialList(DcBaseWorkSpecial dcBaseWorkSpecial) { return baseMapper.selectDcBaseWorkSpecialList(dcBaseWorkSpecial); } - + public List selectDcBaseWorkSpecialDictList(DcBaseWorkSpecial dcBaseWorkSpecial) + { + return baseMapper.selectDcBaseWorkSpecialDictList(dcBaseWorkSpecial); + } /** * 新增生产专业管理 * @@ -63,7 +66,7 @@ public class DcBaseWorkSpecialService extends ServiceImpl dcBusiParamBillSubs = dcBusiParamBillSubService.selectByVo(billSub); @@ -148,10 +147,10 @@ public class TaskParamDfratProcess { } public void doBills(String billNo){ - DcBusiParamBillMasterDao dcBusiParamBillMasterDao=new DcBusiParamBillMasterDao(); + DcBusiParamBillMaster dcBusiParamBillMasterDao=new DcBusiParamBillMaster(); dcBusiParamBillMasterDao.setCheckStatus("1"); dcBusiParamBillMasterDao.setBillNo(billNo); - List dcBusiParamBillMasterDaos = dcBusiParamBillMasterService.selectDcBusiParamBillMasterDaoList(dcBusiParamBillMasterDao); + List dcBusiParamBillMasterDaos = dcBusiParamBillMasterService.selectDcBusiParamBillMasterDaoList(dcBusiParamBillMasterDao); dcBusiParamBillMasterDaos.forEach(item->{ doBill(item); }); diff --git a/lzbi-module/src/main/java/com/lzbi/task/TaskWorkParamRead.java b/lzbi-module/src/main/java/com/lzbi/task/TaskWorkParamRead.java index b1204a6..3f5ddb2 100644 --- a/lzbi-module/src/main/java/com/lzbi/task/TaskWorkParamRead.java +++ b/lzbi-module/src/main/java/com/lzbi/task/TaskWorkParamRead.java @@ -11,7 +11,7 @@ import com.lzbi.code.service.DcBaseCoderuleDefineService; import com.lzbi.common.utils.StringUtils; import com.lzbi.common.utils.spring.SpringUtils; -import com.lzbi.draft.domain.DcBusiParamBillMasterDao; +import com.lzbi.draft.domain.DcBusiParamBillMaster; import com.lzbi.draft.domain.DcBusiParamBillSub; import com.lzbi.draft.service.DcBusiParamBillMasterService; import com.lzbi.task.domain.DcBusiWorkReadLog; @@ -87,7 +87,7 @@ public class TaskWorkParamRead { //String inComeDate="2023-11-29"; DcBusiCoderuleConfigDao ruleIdByBusicode = dcBaseCoderuleDefineService.getRuleIdByBusicode(BUSICODE); DcBaseCoderuleDefineDao ruleDao = dcBaseCoderuleDefineService.selectDcBaseCoderuleDefineDaoById(ruleIdByBusicode.getRuleId()); - DcBusiParamBillMasterDao billm=new DcBusiParamBillMasterDao(); + DcBusiParamBillMaster billm=new DcBusiParamBillMaster(); String billNo=codeNoGenerater.getCode(ruleDao); if(StringUtils.isNull(billNo)){ billNo= "AD_"+String.valueOf(System.currentTimeMillis()); @@ -103,7 +103,7 @@ public class TaskWorkParamRead { DcBusiWorkReadConfig dwrc=new DcBusiWorkReadConfig(); //dwrc.setAssetCode(assetCode); dwrc.setGoalSource(SOURCE); - List dcBusiWorkReadConfigs = dcBusiWorkReadConfigService.selectByVo(dwrc); + List dcBusiWorkReadConfigs = dcBusiWorkReadConfigService.selectDcBusiWorkReadConfigList(dwrc); List pcl=dcBusiWorkReadConfigs.parallelStream().map(DcBusiWorkReadConfig::getGoalParamCode).collect(Collectors.toList()); List dcl=dcBusiWorkReadConfigs.parallelStream().map(DcBusiWorkReadConfig::getGoalParamExt1).collect(Collectors.toList()); List listRow=getWorkReadVo(inComeDate,pcl,dcl); @@ -124,7 +124,7 @@ public class TaskWorkParamRead { billSub.add(subDao); } }); - billm.setDcBusiParamBillSubDaoList(billSub); + billm.setDcBusiParamBillSubList(billSub); return dcBusiParamBillMasterService.insertDcBusiParamBillMasterDao(billm); } } diff --git a/lzbi-module/src/main/resources/mapper/asset/DcBaseAssetInfoMapper.xml b/lzbi-module/src/main/resources/mapper/asset/DcBaseAssetInfoMapper.xml index abf2616..6b20cd3 100644 --- a/lzbi-module/src/main/resources/mapper/asset/DcBaseAssetInfoMapper.xml +++ b/lzbi-module/src/main/resources/mapper/asset/DcBaseAssetInfoMapper.xml @@ -46,7 +46,6 @@ dept_id from dc_base_asset_info - - - + + and TENANT_ID = #{tenantId}, + and special_code = #{specialCode} + and special_name like concat('%', #{specialName}, '%') + + + - + - select a.TENANT_ID, a.REVISION, a.CREATED_BY, a.CREATED_TIME, a.UPDATED_BY, a.UPDATED_TIME, a.DELETE_BY, a.DELETE_TIME, a.id, a.bill_no, a.bill_income_date, a.bill_type, a.check_type, a.check_status, b.TENANT_ID as sub_TENANT_ID, b.CREATED_BY as sub_CREATED_BY, b.CREATED_TIME as sub_CREATED_TIME, b.UPDATED_BY as sub_UPDATED_BY, b.UPDATED_TIME as sub_UPDATED_TIME, b.DELETE_BY as sub_DELETE_BY, b.DELETE_TIME as sub_DELETE_TIME, b.id as sub_id, b.bill_no as sub_bill_no,b.asset_code as sub_asset_code, b.field_type as sub_field_type, b.param_code as sub_param_code, b.param_value as sub_param_value, b.count_date as sub_count_date, b.count_hour as sub_count_hour from dc_busi_param_bill_master a @@ -67,7 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where a.id = #{id} - + insert into dc_busi_param_bill_master TENANT_ID, @@ -101,7 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + update dc_busi_param_bill_master TENANT_ID = #{tenantId}, diff --git a/lzbi-module/src/main/resources/mapper/asset/DcBusiParamSourceMapper.xml b/lzbi-module/src/main/resources/mapper/asset/DcBusiParamSourceMapper.xml new file mode 100644 index 0000000..c6e3e47 --- /dev/null +++ b/lzbi-module/src/main/resources/mapper/asset/DcBusiParamSourceMapper.xml @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select + tenant_id, + revision, + created_by, + created_time, + updated_by, + updated_time, + delete_by, + delete_time, + param_code, + param_name, + group_name, + group_code, + ext_pro, + source_type, + enabled_flag, + id, + field_code, + field_name + from dc_busi_param_source + + + + insert into dc_busi_param_source + + tenant_id, + revision, + created_by, + created_time, + updated_by, + updated_time, + delete_by, + delete_time, + param_code, + param_name, + group_name, + group_code, + ext_pro, + source_type, + enabled_flag, + id, + field_code, + field_name, + + + #{tenantId}, + #{revision}, + #{createdBy}, + #{createdTime}, + #{updatedBy}, + #{updatedTime}, + #{deleteBy}, + #{deleteTime}, + #{paramCode}, + #{paramName}, + #{groupName}, + #{groupCode}, + #{extPro}, + #{sourceType}, + #{enabledFlag}, + #{id}, + #{fieldCode}, + #{fieldName}, + + + + \ No newline at end of file diff --git a/lzbi-module/src/main/resources/mapper/asset/DcBusiWorkReadConfigMapper.xml b/lzbi-module/src/main/resources/mapper/asset/DcBusiWorkReadConfigMapper.xml index 8e04ab7..aaa8c81 100644 --- a/lzbi-module/src/main/resources/mapper/asset/DcBusiWorkReadConfigMapper.xml +++ b/lzbi-module/src/main/resources/mapper/asset/DcBusiWorkReadConfigMapper.xml @@ -1,128 +1,169 @@ - +PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" +"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - select - tenant_id, - revision, - created_by, - created_time, - updated_by, - updated_time, - delete_by, - delete_time, - id, - asset_code, - asset_param_code, - goal_param_code, - goal_param_ext1, - goal_param_ext2, - goal_param_type, - goal_source, - asset_field_code - from dc_busi_work_read_config + + + select tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time, id, company_id, company_name, organize_name, oragnize_id, asset_code, asset_name, asset_param_code, goal_param_code, goal_param_name, goal_param_ext1, goal_param_ext2, goal_param_type, goal_source, asset_field_code, asset_field_name, asset_param_name from dc_busi_work_read_config - + + + and company_name like concat('%', #{companyName}, '%') + and organize_name like concat('%', #{organizeName}, '%') + and oragnize_id = #{oragnizeId} + and company_id = #{companyId} + and asset_field_name like concat('%', #{assetFieldName}, '%') + and asset_field_code = #{ assetFieldCode} + and asset_name like concat('%', #{assetName}, '%') + and asset_code = #{assetCode} + + + - + + + + insert into dc_busi_work_read_config - tenant_id, - revision, - created_by, - created_time, - updated_by, - updated_time, - delete_by, - delete_time, - id, - asset_code, - asset_param_code, - goal_param_code, - goal_param_ext1, - goal_param_ext2, - goal_param_type, - goal_source, - asset_field_code - + tenant_id, + revision, + created_by, + created_time, + updated_by, + updated_time, + delete_by, + delete_time, + company_id, + company_name, + organize_name, + oragnize_id, + asset_code, + asset_name, + asset_param_code, + goal_param_code, + goal_param_name, + goal_param_ext1, + goal_param_ext2, + goal_param_type, + goal_source, + asset_field_code, + asset_field_name, + asset_param_name, + - #{tenantId}, - #{revision}, - #{createdBy}, - #{createdTime}, - #{updatedBy}, - #{updatedTime}, - #{deleteBy}, - #{deleteTime}, - #{id}, - #{assetCode}, - #{assetParamCode}, - #{goalParamCode}, - #{goalParamExt1}, - #{goalParamExt2}, - #{goalParamType}, - #{goalSource}, - #{assetFieldCode}, - + #{tenantId}, + #{revision}, + #{createdBy}, + #{createdTime}, + #{updatedBy}, + #{updatedTime}, + #{deleteBy}, + #{deleteTime}, + #{companyId}, + #{companyName}, + #{organizeName}, + #{oragnizeId}, + #{assetCode}, + #{assetName}, + #{assetParamCode}, + #{goalParamCode}, + #{goalParamName}, + #{goalParamExt1}, + #{goalParamExt2}, + #{goalParamType}, + #{goalSource}, + #{assetFieldCode}, + #{assetFieldName}, + #{assetParamName}, + + + + update dc_busi_work_read_config + + tenant_id = #{tenantId}, + revision = #{revision}, + created_by = #{createdBy}, + created_time = #{createdTime}, + updated_by = #{updatedBy}, + updated_time = #{updatedTime}, + delete_by = #{deleteBy}, + delete_time = #{deleteTime}, + company_id = #{companyId}, + company_name = #{companyName}, + organize_name = #{organizeName}, + oragnize_id = #{oragnizeId}, + asset_code = #{assetCode}, + asset_name = #{assetName}, + asset_param_code = #{assetParamCode}, + goal_param_code = #{goalParamCode}, + goal_param_name = #{goalParamName}, + goal_param_ext1 = #{goalParamExt1}, + goal_param_ext2 = #{goalParamExt2}, + goal_param_type = #{goalParamType}, + goal_source = #{goalSource}, + asset_field_code = #{assetFieldCode}, + asset_field_name = #{assetFieldName}, + asset_param_name = #{assetParamName}, + + where id = #{id} + + + + delete from dc_busi_work_read_config where id = #{id} + + + + delete from dc_busi_work_read_config where id in + + #{id} + + \ No newline at end of file diff --git a/lzbi-system/src/main/java/com/lzbi/system/mapper/SysDeptMapper.java b/lzbi-system/src/main/java/com/lzbi/system/mapper/SysDeptMapper.java index f82b20d..2312ae5 100644 --- a/lzbi-system/src/main/java/com/lzbi/system/mapper/SysDeptMapper.java +++ b/lzbi-system/src/main/java/com/lzbi/system/mapper/SysDeptMapper.java @@ -115,4 +115,7 @@ public interface SysDeptMapper * @return 结果 */ public int deleteDeptById(Long deptId); + //add by zhousq 2023-12 根据部门类别筛选部门 + public List selectOrg(Long parentId); + public List selectCompany(Long parentId); } diff --git a/lzbi-system/src/main/java/com/lzbi/system/service/ISysDeptService.java b/lzbi-system/src/main/java/com/lzbi/system/service/ISysDeptService.java index d9db4ba..1ac5ba4 100644 --- a/lzbi-system/src/main/java/com/lzbi/system/service/ISysDeptService.java +++ b/lzbi-system/src/main/java/com/lzbi/system/service/ISysDeptService.java @@ -121,4 +121,8 @@ public interface ISysDeptService * @return 结果 */ public int deleteDeptById(Long deptId); + + public List selectOrg(Long parentId); + public List selectCompany(Long parentId); + } diff --git a/lzbi-system/src/main/java/com/lzbi/system/service/impl/SysDeptServiceImpl.java b/lzbi-system/src/main/java/com/lzbi/system/service/impl/SysDeptServiceImpl.java index 0515b5e..307cd78 100644 --- a/lzbi-system/src/main/java/com/lzbi/system/service/impl/SysDeptServiceImpl.java +++ b/lzbi-system/src/main/java/com/lzbi/system/service/impl/SysDeptServiceImpl.java @@ -305,7 +305,14 @@ public class SysDeptServiceImpl implements ISysDeptService { public int deleteDeptById(Long deptId) { return deptMapper.deleteDeptById(deptId); } - + @Override + public List selectOrg(Long parentId){ + return deptMapper.selectOrg(parentId); + } + @Override + public List selectCompany(Long parentId){ + return deptMapper.selectCompany(parentId); + } /** * 递归列表 */ @@ -341,4 +348,6 @@ public class SysDeptServiceImpl implements ISysDeptService { private boolean hasChild(List list, SysDept t) { return getChildList(list, t).size() > 0; } + + } diff --git a/lzbi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/lzbi-system/src/main/resources/mapper/system/SysDeptMapper.xml index 6b0ae77..1795541 100644 --- a/lzbi-system/src/main/resources/mapper/system/SysDeptMapper.xml +++ b/lzbi-system/src/main/resources/mapper/system/SysDeptMapper.xml @@ -68,7 +68,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" from sys_dept d where d.dept_id = #{deptId} - + +