Browse Source

2023-12-5 新增【公司选择接口、组织选择接口、专业选择接口、统计单元选择接口、统计单元参数选择接口、目标参数选择接口、配置主查询列表接口、配置子查询列表接口】

develop
zhousq 11 months ago
parent
commit
69f8a57d2b
  1. 136
      lzbi-admin/src/main/resources/application-prod.yml
  2. 130
      lzbi-admin/src/main/resources/application-test.yml
  3. 6
      lzbi-common/src/main/java/com/lzbi/common/core/domain/entity/SysDept.java
  4. 202
      lzbi-module/src/main/java/com/lzbi/asset/controller/DcBusiWorkReadConfigController.java
  5. 60
      lzbi-module/src/main/java/com/lzbi/asset/domain/DcBusiParamSource.java
  6. 80
      lzbi-module/src/main/java/com/lzbi/asset/domain/DcBusiWorkReadConfig.java
  7. 17
      lzbi-module/src/main/java/com/lzbi/asset/mapper/DcBusiParamSourceMapper.java
  8. 70
      lzbi-module/src/main/java/com/lzbi/asset/mapper/DcBusiWorkReadConfigMapper.java
  9. 25
      lzbi-module/src/main/java/com/lzbi/asset/service/DcBusiParamSourceService.java
  10. 99
      lzbi-module/src/main/java/com/lzbi/asset/service/DcBusiWorkReadConfigService.java
  11. 35
      lzbi-module/src/main/java/com/lzbi/common/AssetQueryParams.java
  12. 107
      lzbi-module/src/main/java/com/lzbi/common/SelectOptionsControl.java
  13. 18
      lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiParamBillMasterController.java
  14. 119
      lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamBillMaster.java
  15. 2
      lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamBillSub.java
  16. 24
      lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetDraftDayDao.java
  17. 12
      lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiParamBillMasterMapper.java
  18. 16
      lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiParamBillMasterService.java
  19. 20
      lzbi-module/src/main/java/com/lzbi/module/base/BaseModuleEntity.java
  20. 1
      lzbi-module/src/main/java/com/lzbi/special/mapper/DcBaseWorkSpecialMapper.java
  21. 5
      lzbi-module/src/main/java/com/lzbi/special/service/DcBaseWorkSpecialService.java
  22. 9
      lzbi-module/src/main/java/com/lzbi/task/TaskParamDfratProcess.java
  23. 8
      lzbi-module/src/main/java/com/lzbi/task/TaskWorkParamRead.java
  24. 2
      lzbi-module/src/main/resources/mapper/asset/DcBaseAssetInfoMapper.xml
  25. 12
      lzbi-module/src/main/resources/mapper/asset/DcBaseWorkSpecialMapper.xml
  26. 18
      lzbi-module/src/main/resources/mapper/asset/DcBusiParamBillMasterMapper.xml
  27. 135
      lzbi-module/src/main/resources/mapper/asset/DcBusiParamSourceMapper.xml
  28. 271
      lzbi-module/src/main/resources/mapper/asset/DcBusiWorkReadConfigMapper.xml
  29. 3
      lzbi-system/src/main/java/com/lzbi/system/mapper/SysDeptMapper.java
  30. 4
      lzbi-system/src/main/java/com/lzbi/system/service/ISysDeptService.java
  31. 11
      lzbi-system/src/main/java/com/lzbi/system/service/impl/SysDeptServiceImpl.java
  32. 19
      lzbi-system/src/main/resources/mapper/system/SysDeptMapper.xml

136
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
com.lzbi: debug
org.springframework: warn

130
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
org.springframework: warn

6
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<SysDept> children = new ArrayList<SysDept>();
public Long getValue(){
return deptId;
}
public Long getDeptId()
{
return deptId;

202
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<DcBusiWorkReadConfig> list = null;
@PostMapping("/list")
public TableDataInfo list(@RequestBody AssetQueryParams assetQueryParams)
{
//startPage();
PageHelper.startPage(assetQueryParams.getPageNum(), assetQueryParams.getPageSize());
List<DcBusiWorkReadConfig> 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<DcBusiWorkReadConfig> 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<DcBusiWorkReadConfig> list = dcBusiWorkReadConfigService.selectDcBusiWorkReadConfigList(DcBusiWorkReadConfig);
ExcelUtil<DcBusiWorkReadConfig> util = new ExcelUtil<DcBusiWorkReadConfig>(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<Long> 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<DcBusiWorkReadConfig> 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<DcBusiWorkReadConfig> queryWrapper = new QueryWrapper<>();
List<DcBusiWorkReadConfig> list = dcBusiWorkReadConfigService.list(queryWrapper);
ExcelUtil<DcBusiWorkReadConfig> 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));
}
}
}

60
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 ;
}

80
lzbi-module/src/main/java/com/lzbi/asset/domain/DcBusiWorkReadConfig.java

@ -0,0 +1,80 @@
package com.lzbi.asset.domain;
import lombok.Data;
import com.lzbi.common.annotation.Excel;
import com.lzbi.module.base.BaseModuleEntity;
/**
* 互联参数读取数据对照对象 dc_busi_work_read_config
*
* @author zhousq
* @date 2023-12-04
*/
@Data
public class DcBusiWorkReadConfig extends BaseModuleEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
@Excel(name = "主键")
private Long id;
/** 公司ID */
private Long companyId;
/** 公司名称 */
@Excel(name = "公司名称")
private String companyName;
/** 组织机构名称 */
@Excel(name = "组织机构名称")
private String organizeName;
/** 组织机构ID */
private Long oragnizeId;
/** 统计单元编码 */
private String assetCode;
/** 统计单元名称 */
@Excel(name = "统计单元名称")
private String assetName;
/** 统计参数编码 */
private String assetParamCode;
/** 目标参数编码 */
private String goalParamCode;
/** 目标参数名称 */
@Excel(name = "目标参数名称")
private String goalParamName;
/** 目标参数扩展1 */
@Excel(name = "目标参数扩展1")
private String goalParamExt1;
/** 目标参数扩展2 */
@Excel(name = "目标参数扩展2")
private String goalParamExt2;
/** 读取数值类型 */
@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;
}

17
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<DcBusiParamSource>{
List<DcBusiParamSource> selectByVo( DcBusiParamSource beanVo);
int insertByVo( DcBusiParamSource beanVo);
}

70
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<DcBusiWorkReadConfig>{
List<DcBusiWorkReadConfig> selectByVo( DcBusiWorkReadConfig beanVo);
int insertByVo( DcBusiWorkReadConfig beanVo);
}
public interface DcBusiWorkReadConfigMapper extends BaseMapper<DcBusiWorkReadConfig>
{
/**
* 查询互联参数读取数据对照
*
* @param id 互联参数读取数据对照主键
* @return 互联参数读取数据对照
*/
public DcBusiWorkReadConfig selectDcBusiWorkReadConfigById(Long id);
/**
* 查询互联参数读取数据对照列表
*
* @param dcBusiWorkReadConfig 互联参数读取数据对照
* @return 互联参数读取数据对照集合
*/
public List<DcBusiWorkReadConfig> selectDcBusiWorkReadConfigList(DcBusiWorkReadConfig dcBusiWorkReadConfig);
public List<DcBusiWorkReadConfig> 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);
}

25
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<DcBusiParamSourceMapper, DcBusiParamSource> implements IService<DcBusiParamSource> {
public List<DcBusiParamSource> selectByVo( DcBusiParamSource dcBusiParamSource){
return baseMapper.selectByVo(dcBusiParamSource);
}
public int insertByVo( DcBusiParamSource dcBusiParamSource){
return baseMapper.insertByVo(dcBusiParamSource);
}
}

99
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<DcBusiWorkReadConfigMapper, DcBusiWorkReadConfig> implements IService<DcBusiWorkReadConfig> {
public class DcBusiWorkReadConfigService extends ServiceImpl<DcBusiWorkReadConfigMapper, DcBusiWorkReadConfig> implements IService<DcBusiWorkReadConfig>
{
/**
* 查询互联参数读取数据对照
*
* @param id 互联参数读取数据对照主键
* @return 互联参数读取数据对照
*/
public DcBusiWorkReadConfig selectDcBusiWorkReadConfigById(Long id)
{
return baseMapper.selectDcBusiWorkReadConfigById(id);
}
/**
* 查询互联参数读取数据对照列表
*
* @param dcBusiWorkReadConfig 互联参数读取数据对照
* @return 互联参数读取数据对照
*/
public List<DcBusiWorkReadConfig> selectDcBusiWorkReadConfigList(DcBusiWorkReadConfig dcBusiWorkReadConfig)
{
return baseMapper.selectDcBusiWorkReadConfigList(dcBusiWorkReadConfig);
}
public List<DcBusiWorkReadConfig> selectDcBusiWorkReadConfigMainList(AssetQueryParams asetQueryParams)
{
return baseMapper.selectDcBusiWorkReadConfigMainList(asetQueryParams);
}
/**
* 新增互联参数读取数据对照
*
* @param dcBusiWorkReadConfig 互联参数读取数据对照
* @return 结果
*/
public List<DcBusiWorkReadConfig> 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);
}
}
/**
* 批量删除互联参数读取数据对照
*
* @param ids 需要删除的互联参数读取数据对照主键
* @return 结果
*/
public int deleteDcBusiWorkReadConfigByIds(Long[] ids)
{
return baseMapper.deleteDcBusiWorkReadConfigByIds(ids);
}
/**
* 删除互联参数读取数据对照信息
*
* @param id 互联参数读取数据对照主键
* @return 结果
*/
public int deleteDcBusiWorkReadConfigById(Long id)
{
return baseMapper.deleteDcBusiWorkReadConfigById(id);
}
}

35
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;
}

107
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.DcBaseWorkSpecialDao;
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<SysDept> lsysDept = sysDeptService.selectCompany(depId);
List<TreeSelect> 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<SysDept> lsysDept = sysDeptService.selectOrg(depId);
return AjaxResult.success(sysDeptService.buildDeptTreeSelect(lsysDept)) ;
}
//获取生产专业的列表
@GetMapping("/special/list")
public AjaxResult getSepcialSelectList()
{
DcBaseWorkSpecialDao dcBaseWorkSpecialDao=new DcBaseWorkSpecialDao();
return AjaxResult.success( dcBaseWorkSpecialService.selectDcBaseWorkSpecialDaoDictList(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));
}
}

18
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<DcBusiParamBillMasterDao> list = dcBusiParamBillMasterService.selectDcBusiParamBillMasterDaoList(dcBusiParamBillMasterDao);
List<DcBusiParamBillMaster> 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<DcBusiParamBillMasterDao> list = dcBusiParamBillMasterService.selectDcBusiParamBillMasterDaoList(dcBusiParamBillMasterDao);
ExcelUtil<DcBusiParamBillMasterDao> util = new ExcelUtil<DcBusiParamBillMasterDao>(DcBusiParamBillMasterDao.class);
List<DcBusiParamBillMaster> list = dcBusiParamBillMasterService.selectDcBusiParamBillMasterDaoList(dcBusiParamBillMasterDao);
ExcelUtil<DcBusiParamBillMaster> util = new ExcelUtil<DcBusiParamBillMaster>(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));
}

119
lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamBillMaster.java

@ -1,94 +1,75 @@
package com.lzbi.draft.domain;
import java.util.List;
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 org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.lzbi.common.annotation.Excel;
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
public class DcBusiParamBillMasterDao extends BaseModuleEntity
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ApiModel(value = "参数采集(录入)单据主表",description = "")
@TableName("dc_busi_param_bill_master")
public class DcBusiParamBillMaster 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;
@ApiModelProperty(name = "主键",notes = "")
@TableId(type= IdType.AUTO)
private Long id ;
/** 单据编号 */
@Excel(name = "单据编号")
private String billNo;
@ApiModelProperty(name = "单据编号",notes = "")
private String billNo ;
/** 采集时间 */
@Excel(name = "采集时间")
private String billIncomeDate;
@ApiModelProperty(name = "采集时间",notes = "")
private String billIncomeDate ;
/** 单据类型 */
@Excel(name = "单据类型")
private String billType;
@ApiModelProperty(name = "单据类型",notes = "")
private String billType ;
/** 审核类型 */
@Excel(name = "审核类型")
private String checkType;
@ApiModelProperty(name = "审核类型",notes = "")
private String checkType ;
/** 审核状态 */
@Excel(name = "审核状态")
private String checkStatus;
@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<DcBusiParamBillSub> dcBusiParamBillSubDaoList;
private List<DcBusiParamBillSub> dcBusiParamBillSubList;
@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();
}
}

2
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 = "")

24
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;

12
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<DcBusiParamBillMasterDao>
public interface DcBusiParamBillMasterMapper extends BaseMapper<DcBusiParamBillMaster>
{
/**
* 查询参数采集录入单据主
@ -21,7 +21,7 @@ public interface DcBusiParamBillMasterMapper extends BaseMapper<DcBusiParamBillM
* @param id 参数采集录入单据主主键
* @return 参数采集录入单据主
*/
public DcBusiParamBillMasterDao selectDcBusiParamBillMasterDaoById(Long id);
public DcBusiParamBillMaster selectDcBusiParamBillMasterDaoById(Long id);
/**
* 查询参数采集录入单据主列表
@ -29,7 +29,7 @@ public interface DcBusiParamBillMasterMapper extends BaseMapper<DcBusiParamBillM
* @param dcBusiParamBillMasterDao 参数采集录入单据主
* @return 参数采集录入单据主集合
*/
public List<DcBusiParamBillMasterDao> selectDcBusiParamBillMasterDaoList(DcBusiParamBillMasterDao dcBusiParamBillMasterDao);
public List<DcBusiParamBillMaster> selectDcBusiParamBillMasterDaoList(DcBusiParamBillMaster dcBusiParamBillMasterDao);
/**
* 新增参数采集录入单据主
@ -37,7 +37,7 @@ public interface DcBusiParamBillMasterMapper extends BaseMapper<DcBusiParamBillM
* @param dcBusiParamBillMasterDao 参数采集录入单据主
* @return 结果
*/
public int insertDcBusiParamBillMasterDao(DcBusiParamBillMasterDao dcBusiParamBillMasterDao);
public int insertDcBusiParamBillMasterDao(DcBusiParamBillMaster dcBusiParamBillMasterDao);
/**
* 修改参数采集录入单据主
@ -45,7 +45,7 @@ public interface DcBusiParamBillMasterMapper extends BaseMapper<DcBusiParamBillM
* @param dcBusiParamBillMasterDao 参数采集录入单据主
* @return 结果
*/
public int updateDcBusiParamBillMasterDao(DcBusiParamBillMasterDao dcBusiParamBillMasterDao);
public int updateDcBusiParamBillMasterDao(DcBusiParamBillMaster dcBusiParamBillMasterDao);
/**
* 删除参数采集录入单据主

16
lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiParamBillMasterService.java

@ -2,7 +2,7 @@ package com.lzbi.draft.service;
import java.util.List;
import com.lzbi.draft.domain.DcBusiParamBillMasterDao;
import com.lzbi.draft.domain.DcBusiParamBillMaster;
import com.lzbi.draft.domain.DcBusiParamBillSub;
import com.lzbi.common.utils.StringUtils;
import org.springframework.stereotype.Service;
@ -19,7 +19,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
* @date 2023-11-28
*/
@Service
public class DcBusiParamBillMasterService extends ServiceImpl<DcBusiParamBillMasterMapper, DcBusiParamBillMasterDao> implements IService<DcBusiParamBillMasterDao>
public class DcBusiParamBillMasterService extends ServiceImpl<DcBusiParamBillMasterMapper, DcBusiParamBillMaster> implements IService<DcBusiParamBillMaster>
{
/**
@ -28,7 +28,7 @@ public class DcBusiParamBillMasterService extends ServiceImpl<DcBusiParamBillMas
* @param id 参数采集录入单据主主键
* @return 参数采集录入单据主
*/
public DcBusiParamBillMasterDao selectDcBusiParamBillMasterDaoById(Long id)
public DcBusiParamBillMaster selectDcBusiParamBillMasterDaoById(Long id)
{
return baseMapper.selectDcBusiParamBillMasterDaoById(id);
}
@ -39,7 +39,7 @@ public class DcBusiParamBillMasterService extends ServiceImpl<DcBusiParamBillMas
* @param dcBusiParamBillMasterDao 参数采集录入单据主
* @return 参数采集录入单据主
*/
public List<DcBusiParamBillMasterDao> selectDcBusiParamBillMasterDaoList(DcBusiParamBillMasterDao dcBusiParamBillMasterDao)
public List<DcBusiParamBillMaster> selectDcBusiParamBillMasterDaoList(DcBusiParamBillMaster dcBusiParamBillMasterDao)
{
return baseMapper.selectDcBusiParamBillMasterDaoList(dcBusiParamBillMasterDao);
}
@ -52,7 +52,7 @@ public class DcBusiParamBillMasterService extends ServiceImpl<DcBusiParamBillMas
*/
@Transactional
public int insertDcBusiParamBillMasterDao(DcBusiParamBillMasterDao dcBusiParamBillMasterDao)
public int insertDcBusiParamBillMasterDao(DcBusiParamBillMaster dcBusiParamBillMasterDao)
{
dcBusiParamBillMasterDao.setCreatedTime(DateUtils.getNowDate());
int rows = baseMapper.insertDcBusiParamBillMasterDao(dcBusiParamBillMasterDao);
@ -69,7 +69,7 @@ public class DcBusiParamBillMasterService extends ServiceImpl<DcBusiParamBillMas
*/
@Transactional
public int updateDcBusiParamBillMasterDao(DcBusiParamBillMasterDao dcBusiParamBillMasterDao)
public int updateDcBusiParamBillMasterDao(DcBusiParamBillMaster dcBusiParamBillMasterDao)
{
dcBusiParamBillMasterDao.setUpdatedTime(DateUtils.getNowDate());
baseMapper.deleteDcBusiParamBillSubDaoByBillNo(dcBusiParamBillMasterDao.getId());
@ -110,9 +110,9 @@ public class DcBusiParamBillMasterService extends ServiceImpl<DcBusiParamBillMas
*
* @param dcBusiParamBillMasterDao 参数采集录入单据主对象
*/
public void insertDcBusiParamBillSubDao(DcBusiParamBillMasterDao dcBusiParamBillMasterDao)
public void insertDcBusiParamBillSubDao(DcBusiParamBillMaster dcBusiParamBillMasterDao)
{
List<DcBusiParamBillSub> dcBusiParamBillSubDaoList = dcBusiParamBillMasterDao.getDcBusiParamBillSubDaoList();
List<DcBusiParamBillSub> dcBusiParamBillSubDaoList = dcBusiParamBillMasterDao.getDcBusiParamBillSubList();
String billNo = dcBusiParamBillMasterDao.getBillNo();
if (StringUtils.isNotNull(dcBusiParamBillSubDaoList))
{

20
lzbi-module/src/main/java/com/lzbi/module/base/BaseModuleEntity.java

@ -37,6 +37,10 @@ public class BaseModuleEntity implements Serializable,Cloneable{
@ApiModelProperty(name = "删除时间",notes = "")
private Date deleteTime ;
@ApiModelProperty("分页")
private Integer pageNum ;
@ApiModelProperty("分页大小")
private Integer pageSize ;
public String getTenantId() {
return tenantId;
}
@ -100,4 +104,20 @@ public class BaseModuleEntity implements Serializable,Cloneable{
public void setDeleteTime(Date deleteTime) {
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;
}
}

1
lzbi-module/src/main/java/com/lzbi/special/mapper/DcBaseWorkSpecialMapper.java

@ -30,6 +30,7 @@ public interface DcBaseWorkSpecialMapper extends BaseMapper<DcBaseWorkSpecialDao
* @return 生产专业管理集合
*/
public List<DcBaseWorkSpecialDao> selectDcBaseWorkSpecialDaoList(DcBaseWorkSpecialDao dcBaseWorkSpecialDao);
public List<DcBaseWorkSpecialDao> selectDcBaseWorkSpecialDaoDictList(DcBaseWorkSpecialDao dcBaseWorkSpecialDao);
/**
* 新增生产专业管理

5
lzbi-module/src/main/java/com/lzbi/special/service/DcBaseWorkSpecialService.java

@ -42,7 +42,10 @@ public class DcBaseWorkSpecialService extends ServiceImpl<DcBaseWorkSpecialMappe
{
return baseMapper.selectDcBaseWorkSpecialDaoList(dcBaseWorkSpecialDao);
}
public List<DcBaseWorkSpecialDao> selectDcBaseWorkSpecialDaoDictList(DcBaseWorkSpecialDao dcBaseWorkSpecialDao)
{
return baseMapper.selectDcBaseWorkSpecialDaoDictList(dcBaseWorkSpecialDao);
}
/**
* 新增生产专业管理
*

9
lzbi-module/src/main/java/com/lzbi/task/TaskParamDfratProcess.java

@ -3,14 +3,13 @@ package com.lzbi.task;
import cn.hutool.core.date.DateUtil;
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.domain.DcBusiParamDraftDay;
import com.lzbi.draft.domain.ParamDraftQueryVo;
import com.lzbi.draft.service.DcBusiParamBillMasterService;
import com.lzbi.draft.service.DcBusiParamBillSubService;
import com.lzbi.draft.service.DcBusiParamDraftDayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Comparator;
@ -33,7 +32,7 @@ public class TaskParamDfratProcess {
DcBusiParamBillSubService dcBusiParamBillSubService= SpringUtils.getBean(DcBusiParamBillSubService.class);
DcBusiParamDraftDayService dBusiParamDraftDayService=SpringUtils.getBean(DcBusiParamDraftDayService.class);
public void doBill(DcBusiParamBillMasterDao billMasterDao){
public void doBill(DcBusiParamBillMaster billMasterDao){
DcBusiParamBillSub billSub=new DcBusiParamBillSub();
billSub.setBillNo(billMasterDao.getBillNo());
List<DcBusiParamBillSub> 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<DcBusiParamBillMasterDao> dcBusiParamBillMasterDaos = dcBusiParamBillMasterService.selectDcBusiParamBillMasterDaoList(dcBusiParamBillMasterDao);
List<DcBusiParamBillMaster> dcBusiParamBillMasterDaos = dcBusiParamBillMasterService.selectDcBusiParamBillMasterDaoList(dcBusiParamBillMasterDao);
dcBusiParamBillMasterDaos.forEach(item->{
doBill(item);
});

8
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<DcBusiWorkReadConfig> dcBusiWorkReadConfigs = dcBusiWorkReadConfigService.selectByVo(dwrc);
List<DcBusiWorkReadConfig> dcBusiWorkReadConfigs = dcBusiWorkReadConfigService.selectDcBusiWorkReadConfigList(dwrc);
List<String> pcl=dcBusiWorkReadConfigs.parallelStream().map(DcBusiWorkReadConfig::getGoalParamCode).collect(Collectors.toList());
List<String> dcl=dcBusiWorkReadConfigs.parallelStream().map(DcBusiWorkReadConfig::getGoalParamExt1).collect(Collectors.toList());
List<DcBusiWorkReadLog> 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);
}
}

2
lzbi-module/src/main/resources/mapper/asset/DcBaseAssetInfoMapper.xml

@ -46,7 +46,6 @@
dept_id
from dc_base_asset_info
</sql>
<select id="selectDcBaseAssetInfoList" parameterType="DcBaseAssetInfo" resultMap="DcBaseAssetInfoResult">
<include refid="selectDcBaseAssetInfoVo"/>
<where>
@ -67,7 +66,6 @@
<if test="deptId != null ">and dept_id = #{deptId}</if>
</where>
</select>
<select id="selectDcBaseAssetInfoById" parameterType="Long" resultMap="DcBaseAssetInfoResult">
<include refid="selectDcBaseAssetInfoVo"/>
where id = #{id}

12
lzbi-module/src/main/resources/mapper/asset/DcBaseWorkSpecialMapper.xml

@ -24,12 +24,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDcBaseWorkSpecialDaoList" parameterType="DcBaseWorkSpecialDao" resultMap="DcBaseWorkSpecialResult">
<include refid="selectDcBaseWorkSpecialVo"/>
<where>
<where>
<if test="tenantId != null">and TENANT_ID = #{tenantId},</if>
<if test="specialCode != null and specialCode != ''"> and special_code = #{specialCode}</if>
<if test="specialName != null and specialName != ''"> and special_name like concat('%', #{specialName}, '%')</if>
</where>
</select>
<select id="selectDcBaseWorkSpecialDaoDictList" parameterType="DcBaseWorkSpecialDao" resultMap="DcBaseWorkSpecialResult">
select special_code, special_name from dc_base_work_special
<where>
<if test="tenantId != null">and TENANT_ID = #{tenantId},</if>
<if test="specialCode != null and specialCode != ''"> and special_code = #{specialCode}</if>
<if test="specialName != null and specialName != ''"> and special_name like concat('%', #{specialName}, '%')</if>
</where>
</select>
<select id="selectDcBaseWorkSpecialDaoById" parameterType="Long" resultMap="DcBaseWorkSpecialResult">
<include refid="selectDcBaseWorkSpecialVo"/>
where id = #{id}

18
lzbi-module/src/main/resources/mapper/asset/DcBusiParamBillMasterMapper.xml

@ -4,9 +4,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.lzbi.draft.mapper.DcBusiParamBillMasterMapper">
<resultMap type="com.lzbi.draft.domain.DcBusiParamBillMasterDao" id="DcBusiParamBillMasterDaoResult">
<resultMap type="com.lzbi.draft.domain.DcBusiParamBillMaster" id="DcBusiParamBillMasterResult">
<result property="tenantId" column="TENANT_ID" />
<result property="REVISION" column="REVISION" />
<result property="revision" column="REVISION" />
<result property="createdBy" column="CREATED_BY" />
<result property="createdTime" column="CREATED_TIME" />
<result property="updatedBy" column="UPDATED_BY" />
@ -21,11 +21,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="checkStatus" column="check_status" />
</resultMap>
<resultMap id="DcBusiParamBillMasterDaoDcBusiParamBillSubDaoResult" type="DcBusiParamBillMasterDao" extends="DcBusiParamBillMasterDaoResult">
<collection property="dcBusiParamBillSubDaoList" notNullColumn="sub_id" javaType="java.util.List" resultMap="DcBusiParamBillSubDaoResult" />
<resultMap id="DcBusiParamBillMasterDcBusiParamBillSubResult" type="DcBusiParamBillMaster" extends="DcBusiParamBillMasterResult">
<collection property="dcBusiParamBillSubList" notNullColumn="sub_id" javaType="java.util.List" resultMap="DcBusiParamBillSubResult" />
</resultMap>
<resultMap type="DcBusiParamBillSub" id="DcBusiParamBillSubDaoResult">
<resultMap type="DcBusiParamBillSub" id="DcBusiParamBillSubResult">
<result property="tenantId" column="sub_TENANT_ID" />
<result property="createdBy" column="sub_CREATED_BY" />
<result property="createdTime" column="sub_CREATED_TIME" />
@ -48,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select TENANT_ID, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, DELETE_BY, DELETE_TIME, id, bill_no, bill_income_date, bill_type, check_type, check_status from dc_busi_param_bill_master
</sql>
<select id="selectDcBusiParamBillMasterDaoList" parameterType="DcBusiParamBillMasterDao" resultMap="DcBusiParamBillMasterDaoResult">
<select id="selectDcBusiParamBillMasterDaoList" parameterType="DcBusiParamBillMaster" resultMap="DcBusiParamBillMasterResult">
<include refid="selectDcBusiParamBillMasterVo"/>
<where>
<if test="billNo != null and billNo != ''"> and bill_no = #{billNo}</if>
@ -59,7 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</select>
<select id="selectDcBusiParamBillMasterDaoById" parameterType="Long" resultMap="DcBusiParamBillMasterDaoDcBusiParamBillSubDaoResult">
<select id="selectDcBusiParamBillMasterDaoById" parameterType="Long" resultMap="DcBusiParamBillMasterDcBusiParamBillSubResult">
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}
</select>
<insert id="insertDcBusiParamBillMasterDao" parameterType="DcBusiParamBillMasterDao" useGeneratedKeys="true" keyProperty="id">
<insert id="insertDcBusiParamBillMasterDao" parameterType="DcBusiParamBillMaster" useGeneratedKeys="true" keyProperty="id">
insert into dc_busi_param_bill_master
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="tenantId != null">TENANT_ID,</if>
@ -101,7 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
</insert>
<update id="updateDcBusiParamBillMasterDao" parameterType="DcBusiParamBillMasterDao">
<update id="updateDcBusiParamBillMasterDao" parameterType="DcBusiParamBillMaster">
update dc_busi_param_bill_master
<trim prefix="SET" suffixOverrides=",">
<if test="tenantId != null">TENANT_ID = #{tenantId},</if>

135
lzbi-module/src/main/resources/mapper/asset/DcBusiParamSourceMapper.xml

@ -0,0 +1,135 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.lzbi.asset.mapper.DcBusiParamSourceMapper">
<resultMap type="com.lzbi.asset.domain.DcBusiParamSource" id="rmDcBusiParamSource">
<!-- 租户号 -->
<result property="tenantId" column="tenant_id"/>
<!-- 乐观锁 -->
<result property="revision" column="revision"/>
<!-- 创建人 -->
<result property="createdBy" column="created_by"/>
<!-- 创建时间 -->
<result property="createdTime" column="created_time"/>
<!-- 更新人 -->
<result property="updatedBy" column="updated_by"/>
<!-- 更新时间 -->
<result property="updatedTime" column="updated_time"/>
<!-- 删除人 -->
<result property="deleteBy" column="delete_by"/>
<!-- 删除时间 -->
<result property="deleteTime" column="delete_time"/>
<!-- 参数编码 -->
<result property="paramCode" column="param_code"/>
<!-- 参数名称 -->
<result property="paramName" column="param_name"/>
<!-- 分组名称 -->
<result property="groupName" column="group_name"/>
<!-- 分组编码 -->
<result property="groupCode" column="group_code"/>
<!-- 扩展属性 -->
<result property="extPro" column="ext_pro"/>
<!-- 来源类型 -->
<result property="sourceType" column="source_type"/>
<!-- 是否有效 -->
<result property="enabledFlag" column="enabled_flag"/>
<!-- 主键 -->
<result property="id" column="id"/>
<!-- 所属专业 -->
<result property="fieldCode" column="field_code"/>
<!-- 所属名称 -->
<result property="fieldName" column="field_name"/>
</resultMap>
<sql id="baseQuerySql">
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
</sql>
<select id="selectByVo" resultMap="rmDcBusiParamSource" parameterType="com.lzbi.asset.domain.DcBusiParamSource">
<include refid="baseQuerySql"/>
<where>
<if test="tenantId != null and tenantId != ''"> and tenant_id = #{tenantId}</if>
<if test="revision != null and revision != ''"> and revision = #{revision}</if>
<if test="createdBy != null and createdBy != ''"> and created_by = #{createdBy}</if>
<if test="createdTime != null and createdTime != ''"> and created_time = #{createdTime}</if>
<if test="updatedBy != null and updatedBy != ''"> and updated_by = #{updatedBy}</if>
<if test="updatedTime != null and updatedTime != ''"> and updated_time = #{updatedTime}</if>
<if test="deleteBy != null and deleteBy != ''"> and delete_by = #{deleteBy}</if>
<if test="deleteTime != null and deleteTime != ''"> and delete_time = #{deleteTime}</if>
<if test="paramCode != null and paramCode != ''"> and param_code = #{paramCode}</if>
<if test="paramName != null and paramName != ''"> and param_name = #{paramName}</if>
<if test="groupName != null and groupName != ''"> and group_name = #{groupName}</if>
<if test="groupCode != null and groupCode != ''"> and group_code = #{groupCode}</if>
<if test="extPro != null and extPro != ''"> and ext_pro = #{extPro}</if>
<if test="sourceType != null and sourceType != ''"> and source_type = #{sourceType}</if>
<if test="enabledFlag != null and enabledFlag != ''"> and enabled_flag = #{enabledFlag}</if>
<if test="id != null and id != ''"> and id = #{id}</if>
<if test="fieldCode != null and fieldCode != ''"> and field_code = #{fieldCode}</if>
<if test="fieldName != null and fieldName != ''"> and field_name = #{fieldName}</if>
</where>
</select>
<insert id="insertByVo" parameterType="com.lzbi.asset.domain.DcBusiParamSource">
insert into dc_busi_param_source
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="tenantId != null and tenantId != ''">tenant_id,</if>
<if test="revision != null and revision != ''">revision,</if>
<if test="createdBy != null and createdBy != ''">created_by,</if>
<if test="createdTime != null and createdTime != ''">created_time,</if>
<if test="updatedBy != null and updatedBy != ''">updated_by,</if>
<if test="updatedTime != null and updatedTime != ''">updated_time,</if>
<if test="deleteBy != null and deleteBy != ''">delete_by,</if>
<if test="deleteTime != null and deleteTime != ''">delete_time,</if>
<if test="paramCode != null and paramCode != ''">param_code,</if>
<if test="paramName != null and paramName != ''">param_name,</if>
<if test="groupName != null and groupName != ''">group_name,</if>
<if test="groupCode != null and groupCode != ''">group_code,</if>
<if test="extPro != null and extPro != ''">ext_pro,</if>
<if test="sourceType != null and sourceType != ''">source_type,</if>
<if test="enabledFlag != null and enabledFlag != ''">enabled_flag,</if>
<if test="id != null and id != ''">id,</if>
<if test="fieldCode != null and fieldCode != ''">field_code,</if>
<if test="fieldName != null and fieldName != ''">field_name,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="tenantId != null and tenantId != ''">#{tenantId},</if>
<if test="revision != null and revision != ''">#{revision},</if>
<if test="createdBy != null and createdBy != ''">#{createdBy},</if>
<if test="createdTime != null and createdTime != ''">#{createdTime},</if>
<if test="updatedBy != null and updatedBy != ''">#{updatedBy},</if>
<if test="updatedTime != null and updatedTime != ''">#{updatedTime},</if>
<if test="deleteBy != null and deleteBy != ''">#{deleteBy},</if>
<if test="deleteTime != null and deleteTime != ''">#{deleteTime},</if>
<if test="paramCode != null and paramCode != ''">#{paramCode},</if>
<if test="paramName != null and paramName != ''">#{paramName},</if>
<if test="groupName != null and groupName != ''">#{groupName},</if>
<if test="groupCode != null and groupCode != ''">#{groupCode},</if>
<if test="extPro != null and extPro != ''">#{extPro},</if>
<if test="sourceType != null and sourceType != ''">#{sourceType},</if>
<if test="enabledFlag != null and enabledFlag != ''">#{enabledFlag},</if>
<if test="id != null and id != ''">#{id},</if>
<if test="fieldCode != null and fieldCode != ''">#{fieldCode},</if>
<if test="fieldName != null and fieldName != ''">#{fieldName},</if>
</trim>
</insert>
</mapper>

271
lzbi-module/src/main/resources/mapper/asset/DcBusiWorkReadConfigMapper.xml

@ -1,128 +1,169 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.lzbi.asset.mapper.DcBusiWorkReadConfigMapper">
<resultMap type="com.lzbi.asset.domain.DcBusiWorkReadConfig" id="rmDcBusiWorkReadConfig">
<!-- 租户号 -->
<result property="tenantId" column="tenant_id"/>
<!-- 乐观锁 -->
<result property="revision" column="revision"/>
<!-- 创建人 -->
<result property="createdBy" column="created_by"/>
<!-- 创建时间 -->
<result property="createdTime" column="created_time"/>
<!-- 更新人 -->
<result property="updatedBy" column="updated_by"/>
<!-- 更新时间 -->
<result property="updatedTime" column="updated_time"/>
<!-- 删除人 -->
<result property="deleteBy" column="delete_by"/>
<!-- 删除时间 -->
<result property="deleteTime" column="delete_time"/>
<!-- 主键 -->
<result property="id" column="id"/>
<!-- 统计单元编码 -->
<result property="assetCode" column="asset_code"/>
<!-- 统计单元参数编码 -->
<result property="assetParamCode" column="asset_param_code"/>
<!-- 目标参数编码 -->
<result property="goalParamCode" column="goal_param_code"/>
<!-- 目标参数辅助查询参数1 -->
<result property="goalParamExt1" column="goal_param_ext1"/>
<!-- 目标参数辅助查询参数2 -->
<result property="goalParamExt2" column="goal_param_ext2"/>
<!-- 读取数值类型 -->
<result property="goalParamType" column="goal_param_type"/>
<!-- 数据来源 -->
<result property="goalSource" column="goal_source"/>
<!-- 数据来源 -->
<result property="assetFieldCode" column="asset_field_code"/>
<resultMap type="com.lzbi.asset.domain.DcBusiWorkReadConfig" id="DcBusiWorkReadConfigResult">
<result property="tenantId" column="tenant_id" />
<result property="revision" column="revision" />
<result property="createdBy" column="created_by" />
<result property="createdTime" column="created_time" />
<result property="updatedBy" column="updated_by" />
<result property="updatedTime" column="updated_time" />
<result property="deleteBy" column="delete_by" />
<result property="deleteTime" column="delete_time" />
<result property="id" column="id" />
<result property="companyId" column="company_id" />
<result property="companyName" column="company_name" />
<result property="organizeName" column="organize_name" />
<result property="oragnizeId" column="oragnize_id" />
<result property="assetCode" column="asset_code" />
<result property="assetName" column="asset_name" />
<result property="assetParamCode" column="asset_param_code" />
<result property="goalParamCode" column="goal_param_code" />
<result property="goalParamName" column="goal_param_name" />
<result property="goalParamExt1" column="goal_param_ext1" />
<result property="goalParamExt2" column="goal_param_ext2" />
<result property="goalParamType" column="goal_param_type" />
<result property="goalSource" column="goal_source" />
<result property="assetFieldCode" column="asset_field_code" />
<result property="assetFieldName" column="asset_field_name" />
<result property="assetParamName" column="asset_param_name" />
<result property="paramCounts" column="param_counts" />
</resultMap>
<sql id="baseQuerySql">
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
<sql id="selectDcBusiWorkReadConfigVo">
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
</sql>
<select id="selectByVo" resultMap="rmDcBusiWorkReadConfig" parameterType="com.lzbi.asset.domain.DcBusiWorkReadConfig">
<include refid="baseQuerySql"/>
<select id="selectDcBusiWorkReadConfigList" parameterType="DcBusiWorkReadConfig" resultMap="DcBusiWorkReadConfigResult">
<include refid="selectDcBusiWorkReadConfigVo"/>
<where>
<if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
<if test="organizeName != null and organizeName != ''"> and organize_name like concat('%', #{organizeName}, '%')</if>
<if test="oragnizeId != null "> and oragnize_id = #{oragnizeId}</if>
<if test="companyId != null "> and company_id = #{companyId}</if>
<if test="assetFieldName != null and assetFieldName != ''"> and asset_field_name like concat('%', #{assetFieldName}, '%')</if>
<if test=" assetFieldCode != null "> and asset_field_code = #{ assetFieldCode}</if>
<if test="assetName != null and assetName != ''"> and asset_name like concat('%', #{assetName}, '%')</if>
<if test=" assetCode != null "> and asset_code = #{assetCode}</if>
</where>
</select>
<select id="selectDcBusiWorkReadConfigMainList" parameterType="com.lzbi.common.AssetQueryParams" resultMap="DcBusiWorkReadConfigResult">
select company_id, company_name, organize_name, oragnize_id, asset_code, asset_name,asset_field_code, asset_field_name,count(asset_param_code) as param_counts from dc_busi_work_read_config
<where>
<if test="tenantId != null "> and tenant_id = #{tenantId}</if>
<if test="revision != null "> and revision = #{revision}</if>
<if test="createdBy != null and createdBy != ''"> and created_by = #{createdBy}</if>
<if test="createdTime != null "> and created_time = #{createdTime}</if>
<if test="updatedBy != null and updatedBy != ''"> and updated_by = #{updatedBy}</if>
<if test="updatedTime != null "> and updated_time = #{updatedTime}</if>
<if test="deleteBy != null and deleteBy != ''"> and delete_by = #{deleteBy}</if>
<if test="deleteTime != null "> and delete_time = #{deleteTime}</if>
<if test="id != null "> and id = #{id}</if>
<if test="assetCode != null and assetCode != ''"> and asset_code = #{assetCode}</if>
<if test="assetParamCode != null and assetParamCode != ''"> and asset_param_code = #{assetParamCode}</if>
<if test="goalParamCode != null and goalParamCode != ''"> and goal_param_code = #{goalParamCode}</if>
<if test="goalParamExt1 != null and goalParamExt1 != ''"> and goal_param_ext1 = #{goalParamExt1}</if>
<if test="goalParamExt2 != null and goalParamExt2 != ''"> and goal_param_ext2 = #{goalParamExt2}</if>
<if test="goalParamType != null and goalParamType != ''"> and goal_param_type = #{goalParamType}</if>
<if test="goalSource != null and goalSource != ''"> and goal_source = #{goalSource}</if>
<if test="assetFieldCode != null and assetFieldCode != ''"> and asset_field_code = #{assetFieldCode}</if>
<if test="companyID != null "> and company_id = #{companyID}</if>
<if test="orgID != null "> and oragnize_id = #{orgID}</if>
<if test="fieldCode != null "> and asset_field_code = #{fieldCode} </if>
<if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
<if test="orgName != null and orgName != ''"> and organize_name like concat('%', #{organizeName}, '%')</if>
<if test="fieldName != null and fieldName != ''"> and asset_field_name like concat('%', #{assetFieldName}, '%')</if>
</where>
group by company_id, company_name, organize_name, oragnize_id, asset_code, asset_name,asset_field_code, asset_field_name
</select>
<insert id="insertByVo" parameterType="com.lzbi.asset.domain.DcBusiWorkReadConfig">
<select id="selectDcBusiWorkReadConfigById" parameterType="Long" resultMap="DcBusiWorkReadConfigResult">
<include refid="selectDcBusiWorkReadConfigVo"/>
where id = #{id}
</select>
<insert id="insertDcBusiWorkReadConfig" parameterType="DcBusiWorkReadConfig" useGeneratedKeys="true" keyProperty="id">
insert into dc_busi_work_read_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="tenantId != null and tenantId != ''">tenant_id,</if>
<if test="revision != null and revision != ''">revision,</if>
<if test="createdBy != null and createdBy != ''">created_by,</if>
<if test="createdTime != null and createdTime != ''">created_time,</if>
<if test="updatedBy != null and updatedBy != ''">updated_by,</if>
<if test="updatedTime != null and updatedTime != ''">updated_time,</if>
<if test="deleteBy != null and deleteBy != ''">delete_by,</if>
<if test="deleteTime != null and deleteTime != ''">delete_time,</if>
<if test="id != null and id != ''">id,</if>
<if test="assetCode != null and assetCode != ''">asset_code,</if>
<if test="assetParamCode != null and assetParamCode != ''">asset_param_code,</if>
<if test="goalParamCode != null and goalParamCode != ''">goal_param_code,</if>
<if test="goalParamExt1 != null and goalParamExt1 != ''">goal_param_ext1,</if>
<if test="goalParamExt2 != null and goalParamExt2 != ''">goal_param_ext2,</if>
<if test="goalParamType != null and goalParamType != ''">goal_param_type,</if>
<if test="goalSource != null and goalSource != ''">goal_source,</if>
<if test="assetFieldCode != null and assetFieldCode != ''">asset_field_code</if>
</trim>
<if test="tenantId != null">tenant_id,</if>
<if test="revision != null">revision,</if>
<if test="createdBy != null">created_by,</if>
<if test="createdTime != null">created_time,</if>
<if test="updatedBy != null">updated_by,</if>
<if test="updatedTime != null">updated_time,</if>
<if test="deleteBy != null">delete_by,</if>
<if test="deleteTime != null">delete_time,</if>
<if test="companyId != null">company_id,</if>
<if test="companyName != null">company_name,</if>
<if test="organizeName != null">organize_name,</if>
<if test="oragnizeId != null">oragnize_id,</if>
<if test="assetCode != null">asset_code,</if>
<if test="assetName != null">asset_name,</if>
<if test="assetParamCode != null">asset_param_code,</if>
<if test="goalParamCode != null">goal_param_code,</if>
<if test="goalParamName != null">goal_param_name,</if>
<if test="goalParamExt1 != null">goal_param_ext1,</if>
<if test="goalParamExt2 != null">goal_param_ext2,</if>
<if test="goalParamType != null">goal_param_type,</if>
<if test="goalSource != null">goal_source,</if>
<if test="assetFieldCode != null">asset_field_code,</if>
<if test="assetFieldName != null">asset_field_name,</if>
<if test="assetParamName != null">asset_param_name,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="tenantId != null and tenantId != ''">#{tenantId},</if>
<if test="revision != null and revision != ''">#{revision},</if>
<if test="createdBy != null and createdBy != ''">#{createdBy},</if>
<if test="createdTime != null and createdTime != ''">#{createdTime},</if>
<if test="updatedBy != null and updatedBy != ''">#{updatedBy},</if>
<if test="updatedTime != null and updatedTime != ''">#{updatedTime},</if>
<if test="deleteBy != null and deleteBy != ''">#{deleteBy},</if>
<if test="deleteTime != null and deleteTime != ''">#{deleteTime},</if>
<if test="id != null and id != ''">#{id},</if>
<if test="assetCode != null and assetCode != ''">#{assetCode},</if>
<if test="assetParamCode != null and assetParamCode != ''">#{assetParamCode},</if>
<if test="goalParamCode != null and goalParamCode != ''">#{goalParamCode},</if>
<if test="goalParamExt1 != null and goalParamExt1 != ''">#{goalParamExt1},</if>
<if test="goalParamExt2 != null and goalParamExt2 != ''">#{goalParamExt2},</if>
<if test="goalParamType != null and goalParamType != ''">#{goalParamType},</if>
<if test="goalSource != null and goalSource != ''">#{goalSource},</if>
<if test="assetFieldCode != null and assetFieldCode != ''">#{assetFieldCode},</if>
</trim>
<if test="tenantId != null">#{tenantId},</if>
<if test="revision != null">#{revision},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="updatedBy != null">#{updatedBy},</if>
<if test="updatedTime != null">#{updatedTime},</if>
<if test="deleteBy != null">#{deleteBy},</if>
<if test="deleteTime != null">#{deleteTime},</if>
<if test="companyId != null">#{companyId},</if>
<if test="companyName != null">#{companyName},</if>
<if test="organizeName != null">#{organizeName},</if>
<if test="oragnizeId != null">#{oragnizeId},</if>
<if test="assetCode != null">#{assetCode},</if>
<if test="assetName != null">#{assetName},</if>
<if test="assetParamCode != null">#{assetParamCode},</if>
<if test="goalParamCode != null">#{goalParamCode},</if>
<if test="goalParamName != null">#{goalParamName},</if>
<if test="goalParamExt1 != null">#{goalParamExt1},</if>
<if test="goalParamExt2 != null">#{goalParamExt2},</if>
<if test="goalParamType != null">#{goalParamType},</if>
<if test="goalSource != null">#{goalSource},</if>
<if test="assetFieldCode != null">#{assetFieldCode},</if>
<if test="assetFieldName != null">#{assetFieldName},</if>
<if test="assetParamName != null">#{assetParamName},</if>
</trim>
</insert>
<update id="updateDcBusiWorkReadConfig" parameterType="DcBusiWorkReadConfig">
update dc_busi_work_read_config
<trim prefix="SET" suffixOverrides=",">
<if test="tenantId != null">tenant_id = #{tenantId},</if>
<if test="revision != null">revision = #{revision},</if>
<if test="createdBy != null">created_by = #{createdBy},</if>
<if test="createdTime != null">created_time = #{createdTime},</if>
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
<if test="deleteBy != null">delete_by = #{deleteBy},</if>
<if test="deleteTime != null">delete_time = #{deleteTime},</if>
<if test="companyId != null">company_id = #{companyId},</if>
<if test="companyName != null">company_name = #{companyName},</if>
<if test="organizeName != null">organize_name = #{organizeName},</if>
<if test="oragnizeId != null">oragnize_id = #{oragnizeId},</if>
<if test="assetCode != null">asset_code = #{assetCode},</if>
<if test="assetName != null">asset_name = #{assetName},</if>
<if test="assetParamCode != null">asset_param_code = #{assetParamCode},</if>
<if test="goalParamCode != null">goal_param_code = #{goalParamCode},</if>
<if test="goalParamName != null">goal_param_name = #{goalParamName},</if>
<if test="goalParamExt1 != null">goal_param_ext1 = #{goalParamExt1},</if>
<if test="goalParamExt2 != null">goal_param_ext2 = #{goalParamExt2},</if>
<if test="goalParamType != null">goal_param_type = #{goalParamType},</if>
<if test="goalSource != null">goal_source = #{goalSource},</if>
<if test="assetFieldCode != null">asset_field_code = #{assetFieldCode},</if>
<if test="assetFieldName != null">asset_field_name = #{assetFieldName},</if>
<if test="assetParamName != null">asset_param_name = #{assetParamName},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDcBusiWorkReadConfigById" parameterType="Long">
delete from dc_busi_work_read_config where id = #{id}
</delete>
<delete id="deleteDcBusiWorkReadConfigByIds" parameterType="String">
delete from dc_busi_work_read_config where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

3
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<SysDept> selectOrg(Long parentId);
public List<SysDept> selectCompany(Long parentId);
}

4
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<SysDept> selectOrg(Long parentId);
public List<SysDept> selectCompany(Long parentId);
}

11
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<SysDept> selectOrg(Long parentId){
return deptMapper.selectOrg(parentId);
}
@Override
public List<SysDept> selectCompany(Long parentId){
return deptMapper.selectCompany(parentId);
}
/**
* 递归列表
*/
@ -341,4 +348,6 @@ public class SysDeptServiceImpl implements ISysDeptService {
private boolean hasChild(List<SysDept> list, SysDept t) {
return getChildList(list, t).size() > 0;
}
}

19
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}
</select>
<select id="selectCompany" parameterType="long" resultMap="SysDeptResult">
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status,d.short_name,d.all_name,d.org_type,
(select dept_name from sys_dept where dept_id = d.parent_id) parent_name
from sys_dept d
<where>
org_type in ('1001','1002')
<if test="parentId != null "> and d.parent_id = #{parentId}</if>
</where>
</select>
<select id="selectOrg" parameterType="long" resultMap="SysDeptResult">
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status,d.short_name,d.all_name,d.org_type,
(select dept_name from sys_dept where dept_id = d.parent_id) parent_name
from sys_dept d
<where>
org_type not in ('1001','1002')
<if test="parentId != null "> and d.parent_id = #{parentId}</if>
</where>
</select>
<select id="checkDeptExistUser" parameterType="Long" resultType="int">
select count(1) from sys_user where dept_id = #{deptId} and del_flag = '0'
</select>

Loading…
Cancel
Save