Browse Source

Merge branch 'develop' of https://gitee.com/lmlz_0/manage into develop

develop
bobol 12 months ago
parent
commit
180f9040de
  1. 52
      lzbi-admin/src/main/resources/application-prod.yml
  2. 44
      lzbi-admin/src/main/resources/application-test.yml
  3. 6
      lzbi-common/src/main/java/com/lzbi/common/core/domain/entity/SysDept.java
  4. 200
      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. 108
      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. 68
      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. 97
      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. 75
      lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamBillMaster.java
  15. 94
      lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamBillMasterDao.java
  16. 2
      lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamBillSub.java
  17. 24
      lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetDraftDayDao.java
  18. 12
      lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiParamBillMasterMapper.java
  19. 16
      lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiParamBillMasterService.java
  20. 21
      lzbi-module/src/main/java/com/lzbi/module/base/BaseModuleEntity.java
  21. 8
      lzbi-module/src/main/java/com/lzbi/special/controller/DcBaseWorkSpecialController.java
  22. 2
      lzbi-module/src/main/java/com/lzbi/special/mapper/DcBaseWorkSpecialMapper.java
  23. 9
      lzbi-module/src/main/java/com/lzbi/special/service/DcBaseWorkSpecialService.java
  24. 9
      lzbi-module/src/main/java/com/lzbi/task/TaskParamDfratProcess.java
  25. 8
      lzbi-module/src/main/java/com/lzbi/task/TaskWorkParamRead.java
  26. 2
      lzbi-module/src/main/resources/mapper/asset/DcBaseAssetInfoMapper.xml
  27. 15
      lzbi-module/src/main/resources/mapper/asset/DcBaseWorkSpecialMapper.xml
  28. 18
      lzbi-module/src/main/resources/mapper/asset/DcBusiParamBillMasterMapper.xml
  29. 135
      lzbi-module/src/main/resources/mapper/asset/DcBusiParamSourceMapper.xml
  30. 265
      lzbi-module/src/main/resources/mapper/asset/DcBusiWorkReadConfigMapper.xml
  31. 3
      lzbi-system/src/main/java/com/lzbi/system/mapper/SysDeptMapper.java
  32. 4
      lzbi-system/src/main/java/com/lzbi/system/service/ISysDeptService.java
  33. 11
      lzbi-system/src/main/java/com/lzbi/system/service/impl/SysDeptServiceImpl.java
  34. 19
      lzbi-system/src/main/resources/mapper/system/SysDeptMapper.xml

52
lzbi-admin/src/main/resources/application-prod.yml

@ -1,13 +1,13 @@
# 开发环境配置 # 开发环境配置
server: server:
# 服务器的HTTP端口,默认为8080 # 服务器的HTTP端口,默认为8080
port: 8000 port: 9001
# redis 配置 # redis 配置
spring: spring:
redis: redis:
# 地址 # 地址
host: 10.10.10.55 host: 10.10.10.51
# 端口,默认为6379 # 端口,默认为6379
port: 7000 port: 7000
# 数据库索引 # 数据库索引
@ -27,21 +27,9 @@ spring:
# #连接池最大阻塞等待时间(使用负值表示没有限制) # #连接池最大阻塞等待时间(使用负值表示没有限制)
max-wait: -1ms max-wait: -1ms
datasource: datasource:
type: com.alibaba.druid.pool.DruidDataSource dynamic:
driverClassName: com.mysql.cj.jdbc.Driver strict: true
druid: 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 initialSize: 5
# 最小连接池数量 # 最小连接池数量
@ -61,7 +49,7 @@ spring:
# 配置一个连接在池中最大生存的时间,单位是毫秒 # 配置一个连接在池中最大生存的时间,单位是毫秒
maxEvictableIdleTimeMillis: 900000 maxEvictableIdleTimeMillis: 900000
# 配置检测连接是否有效 # 配置检测连接是否有效
validationQuery: SELECT 1 FROM DUAL validationQuery: SELECT 1
testWhileIdle: true testWhileIdle: true
testOnBorrow: false testOnBorrow: false
testOnReturn: false testOnReturn: false
@ -73,7 +61,7 @@ spring:
allow: allow:
url-pattern: /druid/* url-pattern: /druid/*
# 控制台管理用户名和密码 # 控制台管理用户名和密码
login-username: ruoyi login-username: luenmeilz
login-password: 123456 login-password: 123456
filter: filter:
stat: stat:
@ -85,10 +73,36 @@ spring:
wall: wall:
config: config:
multi-statement-allow: true 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: logging:
file: file:
path: logs path: logs
level: level:
com.lzbi: info com.lzbi: debug
org.springframework: warn org.springframework: warn

44
lzbi-admin/src/main/resources/application-test.yml

@ -27,21 +27,9 @@ spring:
# #连接池最大阻塞等待时间(使用负值表示没有限制) # #连接池最大阻塞等待时间(使用负值表示没有限制)
max-wait: -1ms max-wait: -1ms
datasource: datasource:
type: com.alibaba.druid.pool.DruidDataSource dynamic:
driverClassName: com.mysql.cj.jdbc.Driver strict: true
druid: 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 initialSize: 5
# 最小连接池数量 # 最小连接池数量
@ -61,7 +49,7 @@ spring:
# 配置一个连接在池中最大生存的时间,单位是毫秒 # 配置一个连接在池中最大生存的时间,单位是毫秒
maxEvictableIdleTimeMillis: 900000 maxEvictableIdleTimeMillis: 900000
# 配置检测连接是否有效 # 配置检测连接是否有效
validationQuery: SELECT 1 FROM DUAL validationQuery: SELECT 1
testWhileIdle: true testWhileIdle: true
testOnBorrow: false testOnBorrow: false
testOnReturn: false testOnReturn: false
@ -85,6 +73,32 @@ spring:
wall: wall:
config: config:
multi-statement-allow: true 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: logging:
file: file:

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 String orgType;
private Long value;
/** 子部门 */ /** 子部门 */
private List<SysDept> children = new ArrayList<SysDept>(); private List<SysDept> children = new ArrayList<SysDept>();
public Long getValue(){
return deptId;
}
public Long getDeptId() public Long getDeptId()
{ {
return deptId; return deptId;

200
lzbi-module/src/main/java/com/lzbi/asset/controller/DcBusiWorkReadConfigController.java

@ -1,151 +1,121 @@
package com.lzbi.asset.controller; package com.lzbi.asset.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import java.util.List;
import com.lzbi.code.service.CodeNoGenerater; import java.util.Optional;
import com.lzbi.code.service.DcBaseCoderuleDefineService; 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.annotation.Log;
import com.lzbi.common.core.controller.BaseController; import com.lzbi.common.core.controller.BaseController;
import com.lzbi.common.core.domain.AjaxResult; import com.lzbi.common.core.domain.AjaxResult;
import com.lzbi.common.core.page.TableDataInfo;
import com.lzbi.common.enums.BusinessType; 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.domain.DcBusiWorkReadConfig;
import com.lzbi.asset.service.DcBusiWorkReadConfigService; 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)表控制层 * 互联参数读取数据对照Controller
* @author : zhousq *
* @date : 2023-11-30 * @author zhousq
* @date 2023-12-04
*/ */
@Api(tags = "互联参数读取数据对照表对象功能接口")
@RestController @RestController
@RequestMapping("/asset/dcBusiWorkReadConfig") @RequestMapping("/asset/assetExtConfig")
public class DcBusiWorkReadConfigController extends BaseController{ public class DcBusiWorkReadConfigController extends BaseController
{
@Autowired @Autowired
private DcBusiWorkReadConfigService dcBusiWorkReadConfigService; private DcBusiWorkReadConfigService dcBusiWorkReadConfigService;
/** /**
* 分页列表查询 * 查询互联参数读取数据对照列表
* @return 分页数据
*/ */
@GetMapping("/list")
public TableDataInfo list(DcBusiWorkReadConfig dcBusiWorkReadConfig) @PostMapping("/list")
{ startPage(); public TableDataInfo list(@RequestBody AssetQueryParams assetQueryParams)
List<DcBusiWorkReadConfig> list = null; {
//startPage();
PageHelper.startPage(assetQueryParams.getPageNum(), assetQueryParams.getPageSize());
List<DcBusiWorkReadConfig> list = dcBusiWorkReadConfigService.selectDcBusiWorkReadConfigMainList(assetQueryParams);
return getDataTable(list); return getDataTable(list);
} }
/** @PostMapping("/detail/list")
*根据ID获取详情 public TableDataInfo list(@RequestBody DcBusiWorkReadConfig dcBusiWorkReadConfig)
*@param id {
@return DcBusiWorkReadConfig 没有反馈空 //startPage();
*/ dcBusiWorkReadConfig.setAssetCode(Optional.ofNullable(dcBusiWorkReadConfig.getAssetCode()).orElse("*"));
@ApiOperation("根据ID获取互联参数读取数据对照表详细信息") dcBusiWorkReadConfig.setAssetName(Optional.ofNullable(dcBusiWorkReadConfig.getAssetName()).orElse(""));
@GetMapping(value = "/{id}") List<DcBusiWorkReadConfig> list = dcBusiWorkReadConfigService.selectDcBusiWorkReadConfigList(dcBusiWorkReadConfig);
public AjaxResult getInfo(@PathVariable("id") Long id) { return getDataTable(list);
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);
} }
/** /**
* 互联参数读取数据对照表-修改 * 导出互联参数读取数据对照列表
*@param
*@return DcBusiWorkReadConfig
*/ */
@ApiOperation("互联参数读取数据对照表修改") //@PreAuthorize("@ss.hasPermi('asset:assetExtConfig:export')")
@Log(title = "", businessType = BusinessType.UPDATE) @Log(title = "互联参数读取数据对照", businessType = BusinessType.EXPORT)
@PutMapping @PostMapping("/export")
public AjaxResult edit(@Valid @RequestBody DcBusiWorkReadConfig dcBusiWorkReadConfig) { public void export(HttpServletResponse response, DcBusiWorkReadConfig DcBusiWorkReadConfig)
//BeanValidators.validateWithException(validator, dcBusiWorkReadConfig); {
dcBusiWorkReadConfig.setUpdatedBy(getUsername()); List<DcBusiWorkReadConfig> list = dcBusiWorkReadConfigService.selectDcBusiWorkReadConfigList(DcBusiWorkReadConfig);
dcBusiWorkReadConfig.setUpdatedTime(DateUtils.getNowDate()); ExcelUtil<DcBusiWorkReadConfig> util = new ExcelUtil<DcBusiWorkReadConfig>(DcBusiWorkReadConfig.class);
return toAjax(dcBusiWorkReadConfigService.updateById(dcBusiWorkReadConfig)); util.exportExcel(response, list, "互联参数读取数据对照数据");
} }
/** /**
* 通过ID删除互联参数读取数据对照表 * 获取互联参数读取数据对照详细信息
* @param id
* @return 成功1 失败0
*/ */
@ApiOperation("根据ID删除互联参数读取数据对照表") //@PreAuthorize("@ss.hasPermi('asset:assetExtConfig:query')")
@Log(title = "单一互联参数读取数据对照表", businessType = BusinessType.DELETE) @GetMapping(value = "/{id}")
@DeleteMapping("/id/{id}") public AjaxResult getInfo(@PathVariable("id") Long id)
public AjaxResult batchRemove(@PathVariable Long id) { {
DcBusiWorkReadConfig dcBusiWorkReadConfig=new DcBusiWorkReadConfig(); return success(dcBusiWorkReadConfigService.selectDcBusiWorkReadConfigById(id));
dcBusiWorkReadConfig.setId(id);
return toAjax(dcBusiWorkReadConfigService.removeById( dcBusiWorkReadConfig));
} }
/** /**
* 批量删除互联参数读取数据对照表 * 新增互联参数读取数据对照
* @param ids 数组
* @return 删除的条数
*/ */
@ApiOperation("批量删除互联参数读取数据对照表") ///@PreAuthorize("@ss.hasPermi('asset:assetExtConfig:add')")
@Log(title = "批量删除互联参数读取数据对照", businessType = BusinessType.DELETE) @Log(title = "互联参数读取数据对照", businessType = BusinessType.INSERT)
@DeleteMapping("/ids/{ids}") @PostMapping("/add")
public AjaxResult batchRemove(@PathVariable Long[] ids) { public AjaxResult add(@RequestBody DcBusiWorkReadConfig DcBusiWorkReadConfig)
List<Long> collect = Arrays.stream(ids).collect(Collectors.toList()); {
return toAjax(dcBusiWorkReadConfigService.removeBatchByIds(collect)); return toAjax(dcBusiWorkReadConfigService.insertDcBusiWorkReadConfig(DcBusiWorkReadConfig));
} }
/** /**
* 通过模版导入"互联参数读取数据对照表数据 * 修改互联参数读取数据对照
*
*/ */
@ApiOperation("互联参数读取数据对照表数据导入") //@PreAuthorize("@ss.hasPermi('asset:assetExtConfig:edit')")
@PostMapping("/importTemplate") @Log(title = "互联参数读取数据对照", businessType = BusinessType.UPDATE)
public void importTemplate(HttpServletResponse response) { @PutMapping
ExcelUtil<DcBusiWorkReadConfig> util = new ExcelUtil<>(DcBusiWorkReadConfig.class); public AjaxResult edit(@RequestBody DcBusiWorkReadConfig DcBusiWorkReadConfig)
util.importTemplateExcel(response, "互联参数读取数据对照表导出数据"); {
return toAjax(dcBusiWorkReadConfigService.updateDcBusiWorkReadConfig(DcBusiWorkReadConfig));
} }
/** /**
* "互联参数读取数据对照表数据导出功能 * 删除互联参数读取数据对照
*/ */
@ApiOperation("导出互联参数读取数据对照表数据") // @PreAuthorize("@ss.hasPermi('asset:assetExtConfig:remove')")
@PostMapping("/export") @Log(title = "互联参数读取数据对照", businessType = BusinessType.DELETE)
public void export(HttpServletResponse response, DcBusiWorkReadConfig dcBusiWorkReadConfig) { @DeleteMapping("/{ids}")
QueryWrapper<DcBusiWorkReadConfig> queryWrapper = new QueryWrapper<>(); public AjaxResult remove(@PathVariable Long[] ids)
List<DcBusiWorkReadConfig> list = dcBusiWorkReadConfigService.list(queryWrapper); {
ExcelUtil<DcBusiWorkReadConfig> util = new ExcelUtil<>(DcBusiWorkReadConfig.class); return toAjax(dcBusiWorkReadConfigService.deleteDcBusiWorkReadConfigByIds(ids));
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();
} }
} }

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

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

@ -1,54 +1,80 @@
package com.lzbi.asset.domain; 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.Data;
import lombok.NoArgsConstructor; import com.lzbi.common.annotation.Excel;
import lombok.experimental.Accessors;
import com.lzbi.module.base.BaseModuleEntity; import com.lzbi.module.base.BaseModuleEntity;
/** /**
* 互联参数读取数据对照表; * 互联参数读取数据对照对象 dc_busi_work_read_config
* @author : zhousq *
* @date : 2023-11-30 * @author zhousq
* @date 2023-12-04
*/ */
@Data @Data
@NoArgsConstructor public class DcBusiWorkReadConfig extends BaseModuleEntity
@AllArgsConstructor {
@Accessors(chain = true) private static final long serialVersionUID = 1L;
@ApiModel(value = "互联参数读取数据对照表",description = "")
@TableName("dc_busi_work_read_config")
public class DcBusiWorkReadConfig extends BaseModuleEntity{
/** 主键 */ /** 主键 */
@ApiModelProperty(name = "主键",notes = "") @Excel(name = "主键")
@TableId private Long id;
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;
private String assetCode ;
/** 统计单元参数编码 */ /** 统计单元名称 */
@ApiModelProperty(name = "统计单元参数编码",notes = "") @Excel(name = "统计单元名称")
private String assetParamCode ; private String assetName;
/** 统计参数编码 */
private String assetParamCode;
/** 目标参数编码 */ /** 目标参数编码 */
@ApiModelProperty(name = "目标参数编码",notes = "") private String goalParamCode;
private String goalParamCode ;
/** 目标参数辅助查询参数1 */ /** 目标参数名称 */
@ApiModelProperty(name = "目标参数辅助查询参数1",notes = "") @Excel(name = "目标参数名称")
private String goalParamExt1 ; private String goalParamName;
/** 目标参数辅助查询参数2 */
@ApiModelProperty(name = "目标参数辅助查询参数2",notes = "") /** 目标参数扩展1 */
private String goalParamExt2 ; @Excel(name = "目标参数扩展1")
private String goalParamExt1;
/** 目标参数扩展2 */
@Excel(name = "目标参数扩展2")
private String goalParamExt2;
/** 读取数值类型 */ /** 读取数值类型 */
@ApiModelProperty(name = "读取数值类型",notes = "") @Excel(name = "读取数值类型")
private String goalParamType ; private String goalParamType;
/** 数据来源;生产IOT:work;计费:charge;Erp:erp */
@ApiModelProperty(name = "数据来源",notes = "生产IOT:work;计费:charge;Erp:erp") /** 数据来源 */
private String goalSource ; @Excel(name = "数据来源")
@ApiModelProperty(name = "所属专业") private String goalSource;
private String assetFieldCode ;
/** 生产专业编码 */
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);
}

68
lzbi-module/src/main/java/com/lzbi/asset/mapper/DcBusiWorkReadConfigMapper.java

@ -1,17 +1,65 @@
package com.lzbi.asset.mapper; 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 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)表数据库访问层 * 互联参数读取数据对照Mapper接口
* @author : zhousq *
* @date : 2023-11-30 * @author zhousq
* @date 2023-12-04
*/
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 结果
*/ */
@InterceptorIgnore(tenantLine = "true") public int deleteDcBusiWorkReadConfigByIds(Long[] ids);
public interface DcBusiWorkReadConfigMapper extends BaseMapper<DcBusiWorkReadConfig>{
List<DcBusiWorkReadConfig> selectByVo( DcBusiWorkReadConfig beanVo);
int insertByVo( DcBusiWorkReadConfig beanVo);
} }

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

97
lzbi-module/src/main/java/com/lzbi/asset/service/DcBusiWorkReadConfigService.java

@ -1,25 +1,96 @@
package com.lzbi.asset.service; 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 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)表服务接口 * 互联参数读取数据对照Service业务层处理
* @author : zhousq *
* @date : 2023-11-30 * @author zhousq
* @date 2023-12-04
*/ */
@Service @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 int insertDcBusiWorkReadConfig(DcBusiWorkReadConfig dcBusiWorkReadConfig)
{
dcBusiWorkReadConfig.setCreatedTime(DateUtils.getNowDate());
return baseMapper.insertDcBusiWorkReadConfig(dcBusiWorkReadConfig);
}
/**
* 修改互联参数读取数据对照
*
* @param dcBusiWorkReadConfig 互联参数读取数据对照
* @return 结果
*/
public List<DcBusiWorkReadConfig> selectByVo( DcBusiWorkReadConfig dcBusiWorkReadConfig){ public int updateDcBusiWorkReadConfig(DcBusiWorkReadConfig dcBusiWorkReadConfig)
return baseMapper.selectByVo(dcBusiWorkReadConfig); {
dcBusiWorkReadConfig.setUpdatedTime(DateUtils.getNowDate());
return baseMapper.updateDcBusiWorkReadConfig(dcBusiWorkReadConfig);
} }
public int insertByVo( DcBusiWorkReadConfig dcBusiWorkReadConfig){
return baseMapper.insertByVo(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.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<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()
{
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));
}
}

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.controller.BaseController;
import com.lzbi.common.core.domain.AjaxResult; import com.lzbi.common.core.domain.AjaxResult;
import com.lzbi.common.enums.BusinessType; 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.draft.service.DcBusiParamBillMasterService;
import com.lzbi.common.utils.poi.ExcelUtil; import com.lzbi.common.utils.poi.ExcelUtil;
import com.lzbi.common.core.page.TableDataInfo; import com.lzbi.common.core.page.TableDataInfo;
@ -28,7 +28,7 @@ import com.lzbi.common.core.page.TableDataInfo;
* @date 2023-11-28 * @date 2023-11-28
*/ */
@RestController @RestController
@RequestMapping("/asset/data/paramData") @RequestMapping("/draft/paramInBill")
public class DcBusiParamBillMasterController extends BaseController public class DcBusiParamBillMasterController extends BaseController
{ {
@Autowired @Autowired
@ -39,10 +39,10 @@ public class DcBusiParamBillMasterController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('param:paramData:list')") @PreAuthorize("@ss.hasPermi('param:paramData:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(DcBusiParamBillMasterDao dcBusiParamBillMasterDao) public TableDataInfo list(DcBusiParamBillMaster dcBusiParamBillMasterDao)
{ {
startPage(); startPage();
List<DcBusiParamBillMasterDao> list = dcBusiParamBillMasterService.selectDcBusiParamBillMasterDaoList(dcBusiParamBillMasterDao); List<DcBusiParamBillMaster> list = dcBusiParamBillMasterService.selectDcBusiParamBillMasterDaoList(dcBusiParamBillMasterDao);
return getDataTable(list); return getDataTable(list);
} }
@ -52,10 +52,10 @@ public class DcBusiParamBillMasterController extends BaseController
@PreAuthorize("@ss.hasPermi('param:paramData:export')") @PreAuthorize("@ss.hasPermi('param:paramData:export')")
@Log(title = "参数采集(录入)单据主", businessType = BusinessType.EXPORT) @Log(title = "参数采集(录入)单据主", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, DcBusiParamBillMasterDao dcBusiParamBillMasterDao) public void export(HttpServletResponse response, DcBusiParamBillMaster dcBusiParamBillMasterDao)
{ {
List<DcBusiParamBillMasterDao> list = dcBusiParamBillMasterService.selectDcBusiParamBillMasterDaoList(dcBusiParamBillMasterDao); List<DcBusiParamBillMaster> list = dcBusiParamBillMasterService.selectDcBusiParamBillMasterDaoList(dcBusiParamBillMasterDao);
ExcelUtil<DcBusiParamBillMasterDao> util = new ExcelUtil<DcBusiParamBillMasterDao>(DcBusiParamBillMasterDao.class); ExcelUtil<DcBusiParamBillMaster> util = new ExcelUtil<DcBusiParamBillMaster>(DcBusiParamBillMaster.class);
util.exportExcel(response, list, "参数采集(录入)单据主数据"); util.exportExcel(response, list, "参数采集(录入)单据主数据");
} }
@ -75,7 +75,7 @@ public class DcBusiParamBillMasterController extends BaseController
@PreAuthorize("@ss.hasPermi('param:paramData:add')") @PreAuthorize("@ss.hasPermi('param:paramData:add')")
@Log(title = "参数采集(录入)单据主", businessType = BusinessType.INSERT) @Log(title = "参数采集(录入)单据主", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody DcBusiParamBillMasterDao dcBusiParamBillMasterDao) public AjaxResult add(@RequestBody DcBusiParamBillMaster dcBusiParamBillMasterDao)
{ {
return toAjax(dcBusiParamBillMasterService.insertDcBusiParamBillMasterDao(dcBusiParamBillMasterDao)); return toAjax(dcBusiParamBillMasterService.insertDcBusiParamBillMasterDao(dcBusiParamBillMasterDao));
} }
@ -86,7 +86,7 @@ public class DcBusiParamBillMasterController extends BaseController
@PreAuthorize("@ss.hasPermi('param:paramData:edit')") @PreAuthorize("@ss.hasPermi('param:paramData:edit')")
@Log(title = "参数采集(录入)单据主", businessType = BusinessType.UPDATE) @Log(title = "参数采集(录入)单据主", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody DcBusiParamBillMasterDao dcBusiParamBillMasterDao) public AjaxResult edit(@RequestBody DcBusiParamBillMaster dcBusiParamBillMasterDao)
{ {
return toAjax(dcBusiParamBillMasterService.updateDcBusiParamBillMasterDao(dcBusiParamBillMasterDao)); return toAjax(dcBusiParamBillMasterService.updateDcBusiParamBillMasterDao(dcBusiParamBillMasterDao));
} }

75
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<DcBusiParamBillSub> dcBusiParamBillSubList;
}

94
lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamBillMasterDao.java

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

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{ public class DcBusiParamBillSub extends BaseModuleEntity{
/** 主键 */ /** 主键 */
@ApiModelProperty(name = "主键",notes = "") @ApiModelProperty(name = "主键",notes = "")
@TableId @TableId(type = IdType.AUTO)
private Integer id ; private Integer id ;
/** 单据编码 */ /** 单据编码 */
@ApiModelProperty(name = "单据编码",notes = "") @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 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; 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 java.util.List;
import com.lzbi.draft.domain.DcBusiParamBillMasterDao; import com.lzbi.draft.domain.DcBusiParamBillMaster;
import com.lzbi.draft.domain.DcBusiParamBillSub; import com.lzbi.draft.domain.DcBusiParamBillSub;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -13,7 +13,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @date 2023-11-28 * @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 参数采集录入单据主主键 * @param id 参数采集录入单据主主键
* @return 参数采集录入单据主 * @return 参数采集录入单据主
*/ */
public DcBusiParamBillMasterDao selectDcBusiParamBillMasterDaoById(Long id); public DcBusiParamBillMaster selectDcBusiParamBillMasterDaoById(Long id);
/** /**
* 查询参数采集录入单据主列表 * 查询参数采集录入单据主列表
@ -29,7 +29,7 @@ public interface DcBusiParamBillMasterMapper extends BaseMapper<DcBusiParamBillM
* @param dcBusiParamBillMasterDao 参数采集录入单据主 * @param dcBusiParamBillMasterDao 参数采集录入单据主
* @return 参数采集录入单据主集合 * @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 参数采集录入单据主 * @param dcBusiParamBillMasterDao 参数采集录入单据主
* @return 结果 * @return 结果
*/ */
public int insertDcBusiParamBillMasterDao(DcBusiParamBillMasterDao dcBusiParamBillMasterDao); public int insertDcBusiParamBillMasterDao(DcBusiParamBillMaster dcBusiParamBillMasterDao);
/** /**
* 修改参数采集录入单据主 * 修改参数采集录入单据主
@ -45,7 +45,7 @@ public interface DcBusiParamBillMasterMapper extends BaseMapper<DcBusiParamBillM
* @param dcBusiParamBillMasterDao 参数采集录入单据主 * @param dcBusiParamBillMasterDao 参数采集录入单据主
* @return 结果 * @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 java.util.List;
import com.lzbi.draft.domain.DcBusiParamBillMasterDao; import com.lzbi.draft.domain.DcBusiParamBillMaster;
import com.lzbi.draft.domain.DcBusiParamBillSub; import com.lzbi.draft.domain.DcBusiParamBillSub;
import com.lzbi.common.utils.StringUtils; import com.lzbi.common.utils.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -19,7 +19,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
* @date 2023-11-28 * @date 2023-11-28
*/ */
@Service @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 参数采集录入单据主主键 * @param id 参数采集录入单据主主键
* @return 参数采集录入单据主 * @return 参数采集录入单据主
*/ */
public DcBusiParamBillMasterDao selectDcBusiParamBillMasterDaoById(Long id) public DcBusiParamBillMaster selectDcBusiParamBillMasterDaoById(Long id)
{ {
return baseMapper.selectDcBusiParamBillMasterDaoById(id); return baseMapper.selectDcBusiParamBillMasterDaoById(id);
} }
@ -39,7 +39,7 @@ public class DcBusiParamBillMasterService extends ServiceImpl<DcBusiParamBillMas
* @param dcBusiParamBillMasterDao 参数采集录入单据主 * @param dcBusiParamBillMasterDao 参数采集录入单据主
* @return 参数采集录入单据主 * @return 参数采集录入单据主
*/ */
public List<DcBusiParamBillMasterDao> selectDcBusiParamBillMasterDaoList(DcBusiParamBillMasterDao dcBusiParamBillMasterDao) public List<DcBusiParamBillMaster> selectDcBusiParamBillMasterDaoList(DcBusiParamBillMaster dcBusiParamBillMasterDao)
{ {
return baseMapper.selectDcBusiParamBillMasterDaoList(dcBusiParamBillMasterDao); return baseMapper.selectDcBusiParamBillMasterDaoList(dcBusiParamBillMasterDao);
} }
@ -52,7 +52,7 @@ public class DcBusiParamBillMasterService extends ServiceImpl<DcBusiParamBillMas
*/ */
@Transactional @Transactional
public int insertDcBusiParamBillMasterDao(DcBusiParamBillMasterDao dcBusiParamBillMasterDao) public int insertDcBusiParamBillMasterDao(DcBusiParamBillMaster dcBusiParamBillMasterDao)
{ {
dcBusiParamBillMasterDao.setCreatedTime(DateUtils.getNowDate()); dcBusiParamBillMasterDao.setCreatedTime(DateUtils.getNowDate());
int rows = baseMapper.insertDcBusiParamBillMasterDao(dcBusiParamBillMasterDao); int rows = baseMapper.insertDcBusiParamBillMasterDao(dcBusiParamBillMasterDao);
@ -69,7 +69,7 @@ public class DcBusiParamBillMasterService extends ServiceImpl<DcBusiParamBillMas
*/ */
@Transactional @Transactional
public int updateDcBusiParamBillMasterDao(DcBusiParamBillMasterDao dcBusiParamBillMasterDao) public int updateDcBusiParamBillMasterDao(DcBusiParamBillMaster dcBusiParamBillMasterDao)
{ {
dcBusiParamBillMasterDao.setUpdatedTime(DateUtils.getNowDate()); dcBusiParamBillMasterDao.setUpdatedTime(DateUtils.getNowDate());
baseMapper.deleteDcBusiParamBillSubDaoByBillNo(dcBusiParamBillMasterDao.getId()); baseMapper.deleteDcBusiParamBillSubDaoByBillNo(dcBusiParamBillMasterDao.getId());
@ -110,9 +110,9 @@ public class DcBusiParamBillMasterService extends ServiceImpl<DcBusiParamBillMas
* *
* @param dcBusiParamBillMasterDao 参数采集录入单据主对象 * @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(); String billNo = dcBusiParamBillMasterDao.getBillNo();
if (StringUtils.isNotNull(dcBusiParamBillSubDaoList)) if (StringUtils.isNotNull(dcBusiParamBillSubDaoList))
{ {

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

@ -36,13 +36,17 @@ public class BaseModuleEntity implements Serializable,Cloneable{
/** 删除时间 */ /** 删除时间 */
@ApiModelProperty(name = "删除时间",notes = "") @ApiModelProperty(name = "删除时间",notes = "")
private Date deleteTime ; private Date deleteTime ;
@ApiModelProperty("分页")
private Integer pageNum ;
@ApiModelProperty("分页大小")
private Integer pageSize ;
/** 部门id */ /** 部门id */
@ApiModelProperty(name = "部门id",notes = "") @ApiModelProperty(name = "部门id",notes = "")
private Long deptId ; private Long deptId ;
/** 用户id */ /** 用户id */
@ApiModelProperty(name = "用户id",notes = "") @ApiModelProperty(name = "用户id",notes = "")
private Long userId ; private Long userId ;
public String getTenantId() { public String getTenantId() {
return tenantId; return tenantId;
} }
@ -107,6 +111,21 @@ public class BaseModuleEntity implements Serializable,Cloneable{
this.deleteTime = 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;
}
public Long getDeptId() { public Long getDeptId() {
return deptId; return deptId;
} }

8
lzbi-module/src/main/java/com/lzbi/special/controller/DcBaseWorkSpecialController.java

@ -49,7 +49,7 @@ public class DcBaseWorkSpecialController extends BaseController
public TableDataInfo list(DcBaseWorkSpecial dcBaseWorkSpecial) public TableDataInfo list(DcBaseWorkSpecial dcBaseWorkSpecial)
{ {
startPage(); startPage();
List<DcBaseWorkSpecial> list = dcBaseWorkSpecialService.selectDcBaseWorkSpecialDaoList(dcBaseWorkSpecial); List<DcBaseWorkSpecial> list = dcBaseWorkSpecialService.selectDcBaseWorkSpecialList(dcBaseWorkSpecial);
return getDataTable(list); return getDataTable(list);
} }
@ -61,7 +61,7 @@ public class DcBaseWorkSpecialController extends BaseController
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, DcBaseWorkSpecial dcBaseWorkSpecial) public void export(HttpServletResponse response, DcBaseWorkSpecial dcBaseWorkSpecial)
{ {
List<DcBaseWorkSpecial> list = dcBaseWorkSpecialService.selectDcBaseWorkSpecialDaoList(dcBaseWorkSpecial); List<DcBaseWorkSpecial> list = dcBaseWorkSpecialService.selectDcBaseWorkSpecialList(dcBaseWorkSpecial);
ExcelUtil<DcBaseWorkSpecial> util = new ExcelUtil<DcBaseWorkSpecial>(DcBaseWorkSpecial.class); ExcelUtil<DcBaseWorkSpecial> util = new ExcelUtil<DcBaseWorkSpecial>(DcBaseWorkSpecial.class);
util.exportExcel(response, list, "生产专业管理数据"); util.exportExcel(response, list, "生产专业管理数据");
} }
@ -95,7 +95,7 @@ public class DcBaseWorkSpecialController extends BaseController
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody DcBaseWorkSpecial dcBaseWorkSpecial) public AjaxResult edit(@RequestBody DcBaseWorkSpecial dcBaseWorkSpecial)
{ {
return toAjax(dcBaseWorkSpecialService.updateDcBaseWorkSpecialDao(dcBaseWorkSpecial)); return toAjax(dcBaseWorkSpecialService.updateDcBaseWorkSpecial(dcBaseWorkSpecial));
} }
/** /**
@ -117,7 +117,7 @@ public class DcBaseWorkSpecialController extends BaseController
@GetMapping("/listNoPage") @GetMapping("/listNoPage")
public AjaxResult listNoPage(DcBaseWorkSpecial dcBaseWorkSpecial) public AjaxResult listNoPage(DcBaseWorkSpecial dcBaseWorkSpecial)
{ {
List<DcBaseWorkSpecial> list = dcBaseWorkSpecialService.selectDcBaseWorkSpecialDaoList(dcBaseWorkSpecial); List<DcBaseWorkSpecial> list = dcBaseWorkSpecialService.selectDcBaseWorkSpecialList(dcBaseWorkSpecial);
return AjaxResult.success(list); return AjaxResult.success(list);
} }

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

@ -30,7 +30,7 @@ public interface DcBaseWorkSpecialMapper extends BaseMapper<DcBaseWorkSpecial>
* @return 生产专业管理集合 * @return 生产专业管理集合
*/ */
public List<DcBaseWorkSpecial> selectDcBaseWorkSpecialList(DcBaseWorkSpecial dcBaseWorkSpecial); public List<DcBaseWorkSpecial> selectDcBaseWorkSpecialList(DcBaseWorkSpecial dcBaseWorkSpecial);
public List<DcBaseWorkSpecial> selectDcBaseWorkSpecialDictList(DcBaseWorkSpecial dcBaseWorkSpecial);
/** /**
* 新增生产专业管理 * 新增生产专业管理
* *

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

@ -38,11 +38,14 @@ public class DcBaseWorkSpecialService extends ServiceImpl<DcBaseWorkSpecialMappe
* @return 生产专业管理 * @return 生产专业管理
*/ */
public List<DcBaseWorkSpecial> selectDcBaseWorkSpecialDaoList(DcBaseWorkSpecial dcBaseWorkSpecial) public List<DcBaseWorkSpecial> selectDcBaseWorkSpecialList(DcBaseWorkSpecial dcBaseWorkSpecial)
{ {
return baseMapper.selectDcBaseWorkSpecialList(dcBaseWorkSpecial); return baseMapper.selectDcBaseWorkSpecialList(dcBaseWorkSpecial);
} }
public List<DcBaseWorkSpecial> selectDcBaseWorkSpecialDictList(DcBaseWorkSpecial dcBaseWorkSpecial)
{
return baseMapper.selectDcBaseWorkSpecialDictList(dcBaseWorkSpecial);
}
/** /**
* 新增生产专业管理 * 新增生产专业管理
* *
@ -63,7 +66,7 @@ public class DcBaseWorkSpecialService extends ServiceImpl<DcBaseWorkSpecialMappe
* @return 结果 * @return 结果
*/ */
public int updateDcBaseWorkSpecialDao(DcBaseWorkSpecial dcBaseWorkSpecial) public int updateDcBaseWorkSpecial(DcBaseWorkSpecial dcBaseWorkSpecial)
{ {
dcBaseWorkSpecial.setUpdatedTime(DateUtils.getNowDate()); dcBaseWorkSpecial.setUpdatedTime(DateUtils.getNowDate());
return baseMapper.updateDcBaseWorkSpecial(dcBaseWorkSpecial); return baseMapper.updateDcBaseWorkSpecial(dcBaseWorkSpecial);

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 cn.hutool.core.date.DateUtil;
import com.lzbi.common.utils.StringUtils; import com.lzbi.common.utils.StringUtils;
import com.lzbi.common.utils.spring.SpringUtils; 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.DcBusiParamBillSub;
import com.lzbi.draft.domain.DcBusiParamDraftDay; import com.lzbi.draft.domain.DcBusiParamDraftDay;
import com.lzbi.draft.domain.ParamDraftQueryVo; import com.lzbi.draft.domain.ParamDraftQueryVo;
import com.lzbi.draft.service.DcBusiParamBillMasterService; import com.lzbi.draft.service.DcBusiParamBillMasterService;
import com.lzbi.draft.service.DcBusiParamBillSubService; import com.lzbi.draft.service.DcBusiParamBillSubService;
import com.lzbi.draft.service.DcBusiParamDraftDayService; import com.lzbi.draft.service.DcBusiParamDraftDayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.util.Comparator; import java.util.Comparator;
@ -33,7 +32,7 @@ public class TaskParamDfratProcess {
DcBusiParamBillSubService dcBusiParamBillSubService= SpringUtils.getBean(DcBusiParamBillSubService.class); DcBusiParamBillSubService dcBusiParamBillSubService= SpringUtils.getBean(DcBusiParamBillSubService.class);
DcBusiParamDraftDayService dBusiParamDraftDayService=SpringUtils.getBean(DcBusiParamDraftDayService.class); DcBusiParamDraftDayService dBusiParamDraftDayService=SpringUtils.getBean(DcBusiParamDraftDayService.class);
public void doBill(DcBusiParamBillMasterDao billMasterDao){ public void doBill(DcBusiParamBillMaster billMasterDao){
DcBusiParamBillSub billSub=new DcBusiParamBillSub(); DcBusiParamBillSub billSub=new DcBusiParamBillSub();
billSub.setBillNo(billMasterDao.getBillNo()); billSub.setBillNo(billMasterDao.getBillNo());
List<DcBusiParamBillSub> dcBusiParamBillSubs = dcBusiParamBillSubService.selectByVo(billSub); List<DcBusiParamBillSub> dcBusiParamBillSubs = dcBusiParamBillSubService.selectByVo(billSub);
@ -148,10 +147,10 @@ public class TaskParamDfratProcess {
} }
public void doBills(String billNo){ public void doBills(String billNo){
DcBusiParamBillMasterDao dcBusiParamBillMasterDao=new DcBusiParamBillMasterDao(); DcBusiParamBillMaster dcBusiParamBillMasterDao=new DcBusiParamBillMaster();
dcBusiParamBillMasterDao.setCheckStatus("1"); dcBusiParamBillMasterDao.setCheckStatus("1");
dcBusiParamBillMasterDao.setBillNo(billNo); dcBusiParamBillMasterDao.setBillNo(billNo);
List<DcBusiParamBillMasterDao> dcBusiParamBillMasterDaos = dcBusiParamBillMasterService.selectDcBusiParamBillMasterDaoList(dcBusiParamBillMasterDao); List<DcBusiParamBillMaster> dcBusiParamBillMasterDaos = dcBusiParamBillMasterService.selectDcBusiParamBillMasterDaoList(dcBusiParamBillMasterDao);
dcBusiParamBillMasterDaos.forEach(item->{ dcBusiParamBillMasterDaos.forEach(item->{
doBill(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.StringUtils;
import com.lzbi.common.utils.spring.SpringUtils; 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.DcBusiParamBillSub;
import com.lzbi.draft.service.DcBusiParamBillMasterService; import com.lzbi.draft.service.DcBusiParamBillMasterService;
import com.lzbi.task.domain.DcBusiWorkReadLog; import com.lzbi.task.domain.DcBusiWorkReadLog;
@ -87,7 +87,7 @@ public class TaskWorkParamRead {
//String inComeDate="2023-11-29"; //String inComeDate="2023-11-29";
DcBusiCoderuleConfigDao ruleIdByBusicode = dcBaseCoderuleDefineService.getRuleIdByBusicode(BUSICODE); DcBusiCoderuleConfigDao ruleIdByBusicode = dcBaseCoderuleDefineService.getRuleIdByBusicode(BUSICODE);
DcBaseCoderuleDefineDao ruleDao = dcBaseCoderuleDefineService.selectDcBaseCoderuleDefineDaoById(ruleIdByBusicode.getRuleId()); DcBaseCoderuleDefineDao ruleDao = dcBaseCoderuleDefineService.selectDcBaseCoderuleDefineDaoById(ruleIdByBusicode.getRuleId());
DcBusiParamBillMasterDao billm=new DcBusiParamBillMasterDao(); DcBusiParamBillMaster billm=new DcBusiParamBillMaster();
String billNo=codeNoGenerater.getCode(ruleDao); String billNo=codeNoGenerater.getCode(ruleDao);
if(StringUtils.isNull(billNo)){ if(StringUtils.isNull(billNo)){
billNo= "AD_"+String.valueOf(System.currentTimeMillis()); billNo= "AD_"+String.valueOf(System.currentTimeMillis());
@ -103,7 +103,7 @@ public class TaskWorkParamRead {
DcBusiWorkReadConfig dwrc=new DcBusiWorkReadConfig(); DcBusiWorkReadConfig dwrc=new DcBusiWorkReadConfig();
//dwrc.setAssetCode(assetCode); //dwrc.setAssetCode(assetCode);
dwrc.setGoalSource(SOURCE); 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> pcl=dcBusiWorkReadConfigs.parallelStream().map(DcBusiWorkReadConfig::getGoalParamCode).collect(Collectors.toList());
List<String> dcl=dcBusiWorkReadConfigs.parallelStream().map(DcBusiWorkReadConfig::getGoalParamExt1).collect(Collectors.toList()); List<String> dcl=dcBusiWorkReadConfigs.parallelStream().map(DcBusiWorkReadConfig::getGoalParamExt1).collect(Collectors.toList());
List<DcBusiWorkReadLog> listRow=getWorkReadVo(inComeDate,pcl,dcl); List<DcBusiWorkReadLog> listRow=getWorkReadVo(inComeDate,pcl,dcl);
@ -124,7 +124,7 @@ public class TaskWorkParamRead {
billSub.add(subDao); billSub.add(subDao);
} }
}); });
billm.setDcBusiParamBillSubDaoList(billSub); billm.setDcBusiParamBillSubList(billSub);
return dcBusiParamBillMasterService.insertDcBusiParamBillMasterDao(billm); return dcBusiParamBillMasterService.insertDcBusiParamBillMasterDao(billm);
} }
} }

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

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

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

@ -25,16 +25,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDcBaseWorkSpecialList" parameterType="DcBaseWorkSpecial" resultMap="DcBaseWorkSpecialResult"> <select id="selectDcBaseWorkSpecialList" parameterType="DcBaseWorkSpecial" resultMap="DcBaseWorkSpecialResult">
<include refid="selectDcBaseWorkSpecialVo"/> <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="selectDcBaseWorkSpecialDictList" parameterType="DcBaseWorkSpecial" 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="specialCode != null and specialCode != ''"> and special_code = #{specialCode}</if>
<if test="specialName != null and specialName != ''"> and special_name like concat('%', #{specialName}, '%')</if> <if test="specialName != null and specialName != ''"> and special_name like concat('%', #{specialName}, '%')</if>
</where> </where>
ORDER BY
CASE
WHEN updated_time IS NOT NULL AND updated_time > created_time THEN updated_time
ELSE created_time
END DESC
</select> </select>
<select id="selectDcBaseWorkSpecialById" parameterType="Long" resultMap="DcBaseWorkSpecialResult"> <select id="selectDcBaseWorkSpecialById" parameterType="Long" resultMap="DcBaseWorkSpecialResult">
<include refid="selectDcBaseWorkSpecialVo"/> <include refid="selectDcBaseWorkSpecialVo"/>
where id = #{id} 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"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.lzbi.draft.mapper.DcBusiParamBillMasterMapper"> <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="tenantId" column="TENANT_ID" />
<result property="REVISION" column="REVISION" /> <result property="revision" column="REVISION" />
<result property="createdBy" column="CREATED_BY" /> <result property="createdBy" column="CREATED_BY" />
<result property="createdTime" column="CREATED_TIME" /> <result property="createdTime" column="CREATED_TIME" />
<result property="updatedBy" column="UPDATED_BY" /> <result property="updatedBy" column="UPDATED_BY" />
@ -21,11 +21,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="checkStatus" column="check_status" /> <result property="checkStatus" column="check_status" />
</resultMap> </resultMap>
<resultMap id="DcBusiParamBillMasterDaoDcBusiParamBillSubDaoResult" type="DcBusiParamBillMasterDao" extends="DcBusiParamBillMasterDaoResult"> <resultMap id="DcBusiParamBillMasterDcBusiParamBillSubResult" type="DcBusiParamBillMaster" extends="DcBusiParamBillMasterResult">
<collection property="dcBusiParamBillSubDaoList" notNullColumn="sub_id" javaType="java.util.List" resultMap="DcBusiParamBillSubDaoResult" /> <collection property="dcBusiParamBillSubList" notNullColumn="sub_id" javaType="java.util.List" resultMap="DcBusiParamBillSubResult" />
</resultMap> </resultMap>
<resultMap type="DcBusiParamBillSub" id="DcBusiParamBillSubDaoResult"> <resultMap type="DcBusiParamBillSub" id="DcBusiParamBillSubResult">
<result property="tenantId" column="sub_TENANT_ID" /> <result property="tenantId" column="sub_TENANT_ID" />
<result property="createdBy" column="sub_CREATED_BY" /> <result property="createdBy" column="sub_CREATED_BY" />
<result property="createdTime" column="sub_CREATED_TIME" /> <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 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> </sql>
<select id="selectDcBusiParamBillMasterDaoList" parameterType="DcBusiParamBillMasterDao" resultMap="DcBusiParamBillMasterDaoResult"> <select id="selectDcBusiParamBillMasterDaoList" parameterType="DcBusiParamBillMaster" resultMap="DcBusiParamBillMasterResult">
<include refid="selectDcBusiParamBillMasterVo"/> <include refid="selectDcBusiParamBillMasterVo"/>
<where> <where>
<if test="billNo != null and billNo != ''"> and bill_no = #{billNo}</if> <if test="billNo != null and billNo != ''"> and bill_no = #{billNo}</if>
@ -59,7 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where> </where>
</select> </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, 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 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 from dc_busi_param_bill_master a
@ -67,7 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where a.id = #{id} where a.id = #{id}
</select> </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 insert into dc_busi_param_bill_master
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="tenantId != null">TENANT_ID,</if> <if test="tenantId != null">TENANT_ID,</if>
@ -101,7 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim> </trim>
</insert> </insert>
<update id="updateDcBusiParamBillMasterDao" parameterType="DcBusiParamBillMasterDao"> <update id="updateDcBusiParamBillMasterDao" parameterType="DcBusiParamBillMaster">
update dc_busi_param_bill_master update dc_busi_param_bill_master
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="tenantId != null">TENANT_ID = #{tenantId},</if> <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>

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

@ -1,128 +1,169 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.lzbi.asset.mapper.DcBusiWorkReadConfigMapper"> <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> </resultMap>
<sql id="baseQuerySql">
select <sql id="selectDcBusiWorkReadConfigVo">
tenant_id, 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
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> </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> <where>
<if test="tenantId != null "> and tenant_id = #{tenantId}</if> <if test="companyID != null "> and company_id = #{companyID}</if>
<if test="revision != null "> and revision = #{revision}</if> <if test="orgID != null "> and oragnize_id = #{orgID}</if>
<if test="createdBy != null and createdBy != ''"> and created_by = #{createdBy}</if> <if test="fieldCode != null "> and asset_field_code = #{fieldCode} </if>
<if test="createdTime != null "> and created_time = #{createdTime}</if> <if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
<if test="updatedBy != null and updatedBy != ''"> and updated_by = #{updatedBy}</if> <if test="orgName != null and orgName != ''"> and organize_name like concat('%', #{organizeName}, '%')</if>
<if test="updatedTime != null "> and updated_time = #{updatedTime}</if> <if test="fieldName != null and fieldName != ''"> and asset_field_name like concat('%', #{assetFieldName}, '%')</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>
</where> </where>
group by company_id, company_name, organize_name, oragnize_id, asset_code, asset_name,asset_field_code, asset_field_name
</select> </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 insert into dc_busi_work_read_config
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="tenantId != null and tenantId != ''">tenant_id,</if> <if test="tenantId != null">tenant_id,</if>
<if test="revision != null and revision != ''">revision,</if> <if test="revision != null">revision,</if>
<if test="createdBy != null and createdBy != ''">created_by,</if> <if test="createdBy != null">created_by,</if>
<if test="createdTime != null and createdTime != ''">created_time,</if> <if test="createdTime != null">created_time,</if>
<if test="updatedBy != null and updatedBy != ''">updated_by,</if> <if test="updatedBy != null">updated_by,</if>
<if test="updatedTime != null and updatedTime != ''">updated_time,</if> <if test="updatedTime != null">updated_time,</if>
<if test="deleteBy != null and deleteBy != ''">delete_by,</if> <if test="deleteBy != null">delete_by,</if>
<if test="deleteTime != null and deleteTime != ''">delete_time,</if> <if test="deleteTime != null">delete_time,</if>
<if test="id != null and id != ''">id,</if> <if test="companyId != null">company_id,</if>
<if test="assetCode != null and assetCode != ''">asset_code,</if> <if test="companyName != null">company_name,</if>
<if test="assetParamCode != null and assetParamCode != ''">asset_param_code,</if> <if test="organizeName != null">organize_name,</if>
<if test="goalParamCode != null and goalParamCode != ''">goal_param_code,</if> <if test="oragnizeId != null">oragnize_id,</if>
<if test="goalParamExt1 != null and goalParamExt1 != ''">goal_param_ext1,</if> <if test="assetCode != null">asset_code,</if>
<if test="goalParamExt2 != null and goalParamExt2 != ''">goal_param_ext2,</if> <if test="assetName != null">asset_name,</if>
<if test="goalParamType != null and goalParamType != ''">goal_param_type,</if> <if test="assetParamCode != null">asset_param_code,</if>
<if test="goalSource != null and goalSource != ''">goal_source,</if> <if test="goalParamCode != null">goal_param_code,</if>
<if test="assetFieldCode != null and assetFieldCode != ''">asset_field_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>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="tenantId != null and tenantId != ''">#{tenantId},</if> <if test="tenantId != null">#{tenantId},</if>
<if test="revision != null and revision != ''">#{revision},</if> <if test="revision != null">#{revision},</if>
<if test="createdBy != null and createdBy != ''">#{createdBy},</if> <if test="createdBy != null">#{createdBy},</if>
<if test="createdTime != null and createdTime != ''">#{createdTime},</if> <if test="createdTime != null">#{createdTime},</if>
<if test="updatedBy != null and updatedBy != ''">#{updatedBy},</if> <if test="updatedBy != null">#{updatedBy},</if>
<if test="updatedTime != null and updatedTime != ''">#{updatedTime},</if> <if test="updatedTime != null">#{updatedTime},</if>
<if test="deleteBy != null and deleteBy != ''">#{deleteBy},</if> <if test="deleteBy != null">#{deleteBy},</if>
<if test="deleteTime != null and deleteTime != ''">#{deleteTime},</if> <if test="deleteTime != null">#{deleteTime},</if>
<if test="id != null and id != ''">#{id},</if> <if test="companyId != null">#{companyId},</if>
<if test="assetCode != null and assetCode != ''">#{assetCode},</if> <if test="companyName != null">#{companyName},</if>
<if test="assetParamCode != null and assetParamCode != ''">#{assetParamCode},</if> <if test="organizeName != null">#{organizeName},</if>
<if test="goalParamCode != null and goalParamCode != ''">#{goalParamCode},</if> <if test="oragnizeId != null">#{oragnizeId},</if>
<if test="goalParamExt1 != null and goalParamExt1 != ''">#{goalParamExt1},</if> <if test="assetCode != null">#{assetCode},</if>
<if test="goalParamExt2 != null and goalParamExt2 != ''">#{goalParamExt2},</if> <if test="assetName != null">#{assetName},</if>
<if test="goalParamType != null and goalParamType != ''">#{goalParamType},</if> <if test="assetParamCode != null">#{assetParamCode},</if>
<if test="goalSource != null and goalSource != ''">#{goalSource},</if> <if test="goalParamCode != null">#{goalParamCode},</if>
<if test="assetFieldCode != null and assetFieldCode != ''">#{assetFieldCode},</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> </trim>
</insert> </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> </mapper>

3
lzbi-system/src/main/java/com/lzbi/system/mapper/SysDeptMapper.java

@ -115,4 +115,7 @@ public interface SysDeptMapper
* @return 结果 * @return 结果
*/ */
public int deleteDeptById(Long deptId); 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 结果 * @return 结果
*/ */
public int deleteDeptById(Long deptId); 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) { public int deleteDeptById(Long deptId) {
return deptMapper.deleteDeptById(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) { private boolean hasChild(List<SysDept> list, SysDept t) {
return getChildList(list, t).size() > 0; 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 from sys_dept d
where d.dept_id = #{deptId} where d.dept_id = #{deptId}
</select> </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 id="checkDeptExistUser" parameterType="Long" resultType="int">
select count(1) from sys_user where dept_id = #{deptId} and del_flag = '0' select count(1) from sys_user where dept_id = #{deptId} and del_flag = '0'
</select> </select>

Loading…
Cancel
Save