Browse Source

2023-11-23 框架更新,集成aviator,oracle数据源,magic_api

develop
zhousq 12 months ago
parent
commit
e63044289d
  1. 7
      lzbi-admin/pom.xml
  2. 5
      lzbi-admin/src/main/resources/application-dev.yml
  3. 10
      lzbi-admin/src/main/resources/application.yml
  4. 12
      lzbi-common/pom.xml
  5. 2
      lzbi-framework/src/main/java/com/lzbi/framework/config/SecurityConfig.java
  6. 4
      lzbi-generator/src/main/resources/generator.yml
  7. 425
      lzbi-generator/src/main/resources/vm/vue/index-tree.vue.vm
  8. 480
      lzbi-generator/src/main/resources/vm/vue/index.vue.vm
  9. 6
      lzbi-module/src/main/java/com/lzbi/bi/controller/DcBusiDataScreenMainController.java
  10. 166
      lzbi-module/src/main/java/com/lzbi/bi/controller/DcBusiTargetAdjustController.java
  11. 166
      lzbi-module/src/main/java/com/lzbi/bi/controller/DcBusiTargetDraftController.java
  12. 323
      lzbi-module/src/main/java/com/lzbi/bi/domain/DcBusiTargetAdjust.java
  13. 783
      lzbi-module/src/main/java/com/lzbi/bi/domain/DcBusiTargetDraft.java
  14. 64
      lzbi-module/src/main/java/com/lzbi/bi/mapper/DcBusiTargetAdjustMapper.java
  15. 64
      lzbi-module/src/main/java/com/lzbi/bi/mapper/DcBusiTargetDraftMapper.java
  16. 2
      lzbi-module/src/main/resources/mapper/DcBusiTargetAdjustMapper.xml

7
lzbi-admin/pom.xml

@ -70,6 +70,13 @@
<groupId>com.lzbi</groupId> <groupId>com.lzbi</groupId>
<artifactId>lzbi-module</artifactId> <artifactId>lzbi-module</artifactId>
</dependency> </dependency>
<!-- 以spring-boot-starter的方式引用 -->
<dependency>
<groupId>org.ssssssss</groupId>
<artifactId>magic-api-spring-boot-starter</artifactId>
<version>2.1.1</version>
</dependency>
</dependencies> </dependencies>
<build> <build>

5
lzbi-admin/src/main/resources/application-dev.yml

@ -35,6 +35,11 @@ spring:
url: jdbc:mysql://10.10.10.56:13306/lzdc_bi_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 url: jdbc:mysql://10.10.10.56:13306/lzdc_bi_db?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: luenmei username: luenmei
password: 123456 password: 123456
# 主库数据源
charge:
url: jdbc:oracle:thin:@//10.10.10.60:1521/HX?CONNECT_TIMEOUT=10000&Read_Timeout=120000
username: lmjt_sys
password: lmjt_sys
# 从库数据源 # 从库数据源
slave: slave:
# 从数据源开关/默认关闭 # 从数据源开关/默认关闭

10
lzbi-admin/src/main/resources/application.yml

@ -115,3 +115,13 @@ xss:
excludes: /system/notice excludes: /system/notice
# 匹配链接 # 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/* urlPatterns: /system/*,/monitor/*,/tool/*
magic-api:
#配置web页面入口
web: /magic/api
#配置文件存储位置。当以classpath开头时,为只读模式
resource:
type: database # 配置存储在数据库中
tableName: magic_api_file # 数据库中的表名
#datasource: master #指定数据源(单数据源时无需配置,多数据源时默认使用主数据源,如果存在其他数据源中需要指定。)
prefix: /magic-api # key前缀
readonly: false

12
lzbi-common/pom.xml

@ -136,6 +136,18 @@
<artifactId>hutool-all</artifactId> <artifactId>hutool-all</artifactId>
<version>5.8.16</version> <version>5.8.16</version>
</dependency> </dependency>
<!-- -->
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0.3.0</version>
</dependency>
<!-- -->
<dependency>
<groupId>com.googlecode.aviator</groupId>
<artifactId>aviator</artifactId>
<version>5.4.1</version>
</dependency>
</dependencies> </dependencies>
</project> </project>

2
lzbi-framework/src/main/java/com/lzbi/framework/config/SecurityConfig.java

@ -111,7 +111,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
// 过滤请求 // 过滤请求
.authorizeRequests() .authorizeRequests()
// 对于登录login 注册register 验证码captchaImage 允许匿名访问 // 对于登录login 注册register 验证码captchaImage 允许匿名访问
.antMatchers("/login", "/register", "/captchaImage","/assetData/**").permitAll() .antMatchers("/login", "/register", "/captchaImage","/assetData/**","/magic/api/**").permitAll()
// 静态资源,可匿名访问 // 静态资源,可匿名访问
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
.antMatchers( "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll() .antMatchers( "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()

4
lzbi-generator/src/main/resources/generator.yml

@ -1,9 +1,9 @@
# 代码生成 # 代码生成
gen: gen:
# 作者 # 作者
author: ruoyi author: win
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool # 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
packageName: com.lzbi.system packageName: com.lzbi
# 自动去除表前缀,默认是false # 自动去除表前缀,默认是false
autoRemovePre: false autoRemovePre: false
# 表前缀(生成类名不会包含表前缀,多个用逗号分隔) # 表前缀(生成类名不会包含表前缀,多个用逗号分隔)

425
lzbi-generator/src/main/resources/vm/vue/index-tree.vue.vm

@ -1,6 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
#foreach($column in $columns) #foreach($column in $columns)
#if($column.query) #if($column.query)
#set($dictType=$column.dictType) #set($dictType=$column.dictType)
@ -17,14 +17,14 @@
v-model="queryParams.${column.javaField}" v-model="queryParams.${column.javaField}"
placeholder="请输入${comment}" placeholder="请输入${comment}"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter="handleQuery"
/> />
</el-form-item> </el-form-item>
#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && "" != $dictType) #elseif(($column.htmlType == "select" || $column.htmlType == "radio") && "" != $dictType)
<el-form-item label="${comment}" prop="${column.javaField}"> <el-form-item label="${comment}" prop="${column.javaField}">
<el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable> <el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable>
<el-option <el-option
v-for="dict in dict.type.${dictType}" v-for="dict in ${dictType}"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
@ -42,16 +42,15 @@
<el-date-picker clearable <el-date-picker clearable
v-model="queryParams.${column.javaField}" v-model="queryParams.${column.javaField}"
type="date" type="date"
value-format="yyyy-MM-dd" value-format="YYYY-MM-DD"
placeholder="选择${comment}"> placeholder="选择${comment}">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
#elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN") #elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
<el-form-item label="${comment}"> <el-form-item label="${comment}" style="width: 308px">
<el-date-picker <el-date-picker
v-model="daterange${AttrName}" v-model="daterange${AttrName}"
style="width: 240px" value-format="YYYY-MM-DD"
value-format="yyyy-MM-dd"
type="daterange" type="daterange"
range-separator="-" range-separator="-"
start-placeholder="开始日期" start-placeholder="开始日期"
@ -62,8 +61,8 @@
#end #end
#end #end
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -72,8 +71,7 @@
<el-button <el-button
type="primary" type="primary"
plain plain
icon="el-icon-plus" icon="Plus"
size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['${moduleName}:${businessName}:add']" v-hasPermi="['${moduleName}:${businessName}:add']"
>新增</el-button> >新增</el-button>
@ -82,12 +80,11 @@
<el-button <el-button
type="info" type="info"
plain plain
icon="el-icon-sort" icon="Sort"
size="mini"
@click="toggleExpandAll" @click="toggleExpandAll"
>展开/折叠</el-button> >展开/折叠</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table <el-table
@ -109,23 +106,23 @@
#if($column.pk) #if($column.pk)
#elseif($column.list && $column.htmlType == "datetime") #elseif($column.list && $column.htmlType == "datetime")
<el-table-column label="${comment}" align="center" prop="${javaField}" width="180"> <el-table-column label="${comment}" align="center" prop="${javaField}" width="180">
<template slot-scope="scope"> <template #default="scope">
<span>{{ parseTime(scope.row.${javaField}, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.${javaField}, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
#elseif($column.list && $column.htmlType == "imageUpload") #elseif($column.list && $column.htmlType == "imageUpload")
<el-table-column label="${comment}" align="center" prop="${javaField}" width="100"> <el-table-column label="${comment}" align="center" prop="${javaField}" width="100">
<template slot-scope="scope"> <template #default="scope">
<image-preview :src="scope.row.${javaField}" :width="50" :height="50"/> <image-preview :src="scope.row.${javaField}" :width="50" :height="50"/>
</template> </template>
</el-table-column> </el-table-column>
#elseif($column.list && "" != $column.dictType) #elseif($column.list && "" != $column.dictType)
<el-table-column label="${comment}" align="center" prop="${javaField}"> <el-table-column label="${comment}" align="center" prop="${javaField}">
<template slot-scope="scope"> <template #default="scope">
#if($column.htmlType == "checkbox") #if($column.htmlType == "checkbox")
<dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/> <dict-tag :options="${column.dictType}" :value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/>
#else #else
<dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField}"/> <dict-tag :options="${column.dictType}" :value="scope.row.${javaField}"/>
#end #end
</template> </template>
</el-table-column> </el-table-column>
@ -138,35 +135,17 @@
#end #end
#end #end
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template #default="scope">
<el-button <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${moduleName}:${businessName}:edit']">修改</el-button>
size="mini" <el-button link type="primary" icon="Plus" @click="handleAdd(scope.row)" v-hasPermi="['${moduleName}:${businessName}:add']">新增</el-button>
type="text" <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${moduleName}:${businessName}:remove']">删除</el-button>
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['${moduleName}:${businessName}:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-plus"
@click="handleAdd(scope.row)"
v-hasPermi="['${moduleName}:${businessName}:add']"
>新增</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['${moduleName}:${businessName}:remove']"
>删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 添加或修改${functionName}对话框 --> <!-- 添加或修改${functionName}对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" v-model="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="${businessName}Ref" :model="form" :rules="rules" label-width="80px">
#foreach($column in $columns) #foreach($column in $columns)
#set($field=$column.javaField) #set($field=$column.javaField)
#if($column.insert && !$column.pk) #if($column.insert && !$column.pk)
@ -180,7 +159,14 @@
#set($dictType=$column.dictType) #set($dictType=$column.dictType)
#if("" != $treeParentCode && $column.javaField == $treeParentCode) #if("" != $treeParentCode && $column.javaField == $treeParentCode)
<el-form-item label="${comment}" prop="${treeParentCode}"> <el-form-item label="${comment}" prop="${treeParentCode}">
<treeselect v-model="form.${treeParentCode}" :options="${businessName}Options" :normalizer="normalizer" placeholder="请选择${comment}" /> <el-tree-select
v-model="form.${treeParentCode}"
:data="${businessName}Options"
:props="{ value: '${treeCode}', label: '${treeName}', children: 'children' }"
value-key="${treeCode}"
placeholder="请选择${comment}"
check-strictly
/>
</el-form-item> </el-form-item>
#elseif($column.htmlType == "input") #elseif($column.htmlType == "input")
<el-form-item label="${comment}" prop="${field}"> <el-form-item label="${comment}" prop="${field}">
@ -202,7 +188,7 @@
<el-form-item label="${comment}" prop="${field}"> <el-form-item label="${comment}" prop="${field}">
<el-select v-model="form.${field}" placeholder="请选择${comment}"> <el-select v-model="form.${field}" placeholder="请选择${comment}">
<el-option <el-option
v-for="dict in dict.type.${dictType}" v-for="dict in ${dictType}"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
#if($column.javaType == "Integer" || $column.javaType == "Long") #if($column.javaType == "Integer" || $column.javaType == "Long")
@ -223,7 +209,7 @@
<el-form-item label="${comment}" prop="${field}"> <el-form-item label="${comment}" prop="${field}">
<el-checkbox-group v-model="form.${field}"> <el-checkbox-group v-model="form.${field}">
<el-checkbox <el-checkbox
v-for="dict in dict.type.${dictType}" v-for="dict in ${dictType}"
:key="dict.value" :key="dict.value"
:label="dict.value"> :label="dict.value">
{{dict.label}} {{dict.label}}
@ -240,7 +226,7 @@
<el-form-item label="${comment}" prop="${field}"> <el-form-item label="${comment}" prop="${field}">
<el-radio-group v-model="form.${field}"> <el-radio-group v-model="form.${field}">
<el-radio <el-radio
v-for="dict in dict.type.${dictType}" v-for="dict in ${dictType}"
:key="dict.value" :key="dict.value"
#if($column.javaType == "Integer" || $column.javaType == "Long") #if($column.javaType == "Integer" || $column.javaType == "Long")
:label="parseInt(dict.value)" :label="parseInt(dict.value)"
@ -261,7 +247,7 @@
<el-date-picker clearable <el-date-picker clearable
v-model="form.${field}" v-model="form.${field}"
type="date" type="date"
value-format="yyyy-MM-dd" value-format="YYYY-MM-DD"
placeholder="选择${comment}"> placeholder="选择${comment}">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
@ -274,65 +260,51 @@
#end #end
#end #end
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <template #footer>
<el-button type="primary" @click="submitForm">确 定</el-button> <div class="dialog-footer">
<el-button @click="cancel">取 消</el-button> <el-button type="primary" @click="submitForm">确 定</el-button>
</div> <el-button @click="cancel">取 消</el-button>
</div>
</template>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script setup name="${BusinessName}">
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}"; import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default { const { proxy } = getCurrentInstance();
name: "${BusinessName}",
#if(${dicts} != '') #if(${dicts} != '')
dicts: [${dicts}], #set($dictsNoSymbol=$dicts.replace("'", ""))
const { ${dictsNoSymbol} } = proxy.useDict(${dicts});
#end #end
components: {
Treeselect const ${businessName}List = ref([]);
}, const ${businessName}Options = ref([]);
data() { const open = ref(false);
return { const loading = ref(true);
// 遮罩层 const showSearch = ref(true);
loading: true, const title = ref("");
// 显示搜索条件 const isExpandAll = ref(true);
showSearch: true, const refreshTable = ref(true);
// ${functionName}表格数据
${businessName}List: [],
// ${functionName}树选项
${businessName}Options: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 是否展开,默认全部展开
isExpandAll: true,
// 重新渲染表格状态
refreshTable: true,
#foreach ($column in $columns) #foreach ($column in $columns)
#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") #if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
// $comment时间范围 const daterange${AttrName} = ref([]);
daterange${AttrName}: [],
#end #end
#end #end
// 查询参数
queryParams: { const data = reactive({
#foreach ($column in $columns) form: {},
queryParams: {
#foreach ($column in $columns)
#if($column.query) #if($column.query)
$column.javaField: null#if($foreach.count != $columns.size()),#end $column.javaField: null#if($foreach.count != $columns.size()),#end
#end #end
#end #end
}, },
// 表单参数 rules: {
form: {}, #foreach ($column in $columns)
// 表单校验
rules: {
#foreach ($column in $columns)
#if($column.required) #if($column.required)
#set($parentheseIndex=$column.columnComment.indexOf("(")) #set($parentheseIndex=$column.columnComment.indexOf("("))
#if($parentheseIndex != -1) #if($parentheseIndex != -1)
@ -340,166 +312,163 @@ export default {
#else #else
#set($comment=$column.columnComment) #set($comment=$column.columnComment)
#end #end
$column.javaField: [ $column.javaField: [
{ required: true, message: "$comment不能为空", trigger: #if($column.htmlType == "select" || $column.htmlType == "radio")"change"#else"blur"#end } { required: true, message: "$comment不能为空", trigger: #if($column.htmlType == "select" || $column.htmlType == "radio")"change"#else"blur"#end }
]#if($foreach.count != $columns.size()),#end ]#if($foreach.count != $columns.size()),#end
#end #end
#end #end
} }
}; });
},
created() { const { queryParams, form, rules } = toRefs(data);
this.getList();
}, /** 查询${functionName}列表 */
methods: { function getList() {
/** 查询${functionName}列表 */ loading.value = true;
getList() {
this.loading = true;
#foreach ($column in $columns) #foreach ($column in $columns)
#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") #if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
this.queryParams.params = {}; queryParams.value.params = {};
#break #break
#end #end
#end #end
#foreach ($column in $columns) #foreach ($column in $columns)
#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") #if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
if (null != this.daterange${AttrName} && '' != this.daterange${AttrName}) { if (null != daterange${AttrName} && '' != daterange${AttrName}) {
this.queryParams.params["begin${AttrName}"] = this.daterange${AttrName}[0]; queryParams.value.params["begin${AttrName}"] = daterange${AttrName}.value[0];
this.queryParams.params["end${AttrName}"] = this.daterange${AttrName}[1]; queryParams.value.params["end${AttrName}"] = daterange${AttrName}.value[1];
} }
#end #end
#end #end
list${BusinessName}(this.queryParams).then(response => { list${BusinessName}(queryParams.value).then(response => {
this.${businessName}List = this.handleTree(response.data, "${treeCode}", "${treeParentCode}"); ${businessName}List.value = proxy.handleTree(response.data, "${treeCode}", "${treeParentCode}");
this.loading = false; loading.value = false;
}); });
}, }
/** 转换${functionName}数据结构 */
normalizer(node) { /** 查询${functionName}下拉树结构 */
if (node.children && !node.children.length) { function getTreeselect() {
delete node.children; list${BusinessName}().then(response => {
} ${businessName}Options.value = [];
return { const data = { ${treeCode}: 0, ${treeName}: '顶级节点', children: [] };
id: node.${treeCode}, data.children = proxy.handleTree(response.data, "${treeCode}", "${treeParentCode}");
label: node.${treeName}, ${businessName}Options.value.push(data);
children: node.children });
}; }
},
/** 查询${functionName}下拉树结构 */ // 取消按钮
getTreeselect() { function cancel() {
list${BusinessName}().then(response => { open.value = false;
this.${businessName}Options = []; reset();
const data = { ${treeCode}: 0, ${treeName}: '顶级节点', children: [] }; }
data.children = this.handleTree(response.data, "${treeCode}", "${treeParentCode}");
this.${businessName}Options.push(data); // 表单重置
}); function reset() {
}, form.value = {
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
#foreach ($column in $columns) #foreach ($column in $columns)
#if($column.htmlType == "checkbox") #if($column.htmlType == "checkbox")
$column.javaField: []#if($foreach.count != $columns.size()),#end $column.javaField: []#if($foreach.count != $columns.size()),#end
#else #else
$column.javaField: null#if($foreach.count != $columns.size()),#end $column.javaField: null#if($foreach.count != $columns.size()),#end
#end #end
#end #end
}; };
this.resetForm("form"); proxy.resetForm("${businessName}Ref");
}, }
/** 搜索按钮操作 */
handleQuery() { /** 搜索按钮操作 */
this.getList(); function handleQuery() {
}, getList();
/** 重置按钮操作 */ }
resetQuery() {
/** 重置按钮操作 */
function resetQuery() {
#foreach ($column in $columns) #foreach ($column in $columns)
#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") #if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
this.daterange${AttrName} = []; daterange${AttrName}.value = [];
#end #end
#end #end
this.resetForm("queryForm"); proxy.resetForm("queryRef");
this.handleQuery(); handleQuery();
}, }
/** 新增按钮操作 */
handleAdd(row) { /** 新增按钮操作 */
this.reset(); function handleAdd(row) {
this.getTreeselect(); reset();
if (row != null && row.${treeCode}) { getTreeselect();
this.form.${treeParentCode} = row.${treeCode}; if (row != null && row.${treeCode}) {
} else { form.value.${treeParentCode} = row.${treeCode};
this.form.${treeParentCode} = 0; } else {
} form.value.${treeParentCode} = 0;
this.open = true; }
this.title = "添加${functionName}"; open.value = true;
}, title.value = "添加${functionName}";
/** 展开/折叠操作 */ }
toggleExpandAll() {
this.refreshTable = false; /** 展开/折叠操作 */
this.isExpandAll = !this.isExpandAll; function toggleExpandAll() {
this.$nextTick(() => { refreshTable.value = false;
this.refreshTable = true; isExpandAll.value = !isExpandAll.value;
}); nextTick(() => {
}, refreshTable.value = true;
/** 修改按钮操作 */ });
handleUpdate(row) { }
this.reset();
this.getTreeselect(); /** 修改按钮操作 */
if (row != null) { async function handleUpdate(row) {
this.form.${treeParentCode} = row.${treeParentCode}; reset();
} await getTreeselect();
get${BusinessName}(row.${pkColumn.javaField}).then(response => { if (row != null) {
this.form = response.data; form.value.${treeParentCode} = row.${treeParentCode};
}
get${BusinessName}(row.${pkColumn.javaField}).then(response => {
form.value = response.data;
#foreach ($column in $columns) #foreach ($column in $columns)
#if($column.htmlType == "checkbox") #if($column.htmlType == "checkbox")
this.form.$column.javaField = this.form.${column.javaField}.split(","); form.value.$column.javaField = form.value.${column.javaField}.split(",");
#end #end
#end #end
this.open = true; open.value = true;
this.title = "修改${functionName}"; title.value = "修改${functionName}";
}); });
}, }
/** 提交按钮 */
submitForm() { /** 提交按钮 */
this.#[[$]]#refs["form"].validate(valid => { function submitForm() {
if (valid) { proxy.#[[$]]#refs["${businessName}Ref"].validate(valid => {
if (valid) {
#foreach ($column in $columns) #foreach ($column in $columns)
#if($column.htmlType == "checkbox") #if($column.htmlType == "checkbox")
this.form.$column.javaField = this.form.${column.javaField}.join(","); form.value.$column.javaField = form.value.${column.javaField}.join(",");
#end #end
#end #end
if (this.form.${pkColumn.javaField} != null) { if (form.value.${pkColumn.javaField} != null) {
update${BusinessName}(this.form).then(response => { update${BusinessName}(form.value).then(response => {
this.#[[$modal]]#.msgSuccess("修改成功"); proxy.#[[$modal]]#.msgSuccess("修改成功");
this.open = false; open.value = false;
this.getList(); getList();
}); });
} else { } else {
add${BusinessName}(this.form).then(response => { add${BusinessName}(form.value).then(response => {
this.#[[$modal]]#.msgSuccess("新增成功"); proxy.#[[$modal]]#.msgSuccess("新增成功");
this.open = false; open.value = false;
this.getList(); getList();
}); });
} }
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
this.#[[$modal]]#.confirm('是否确认删除${functionName}编号为"' + row.${pkColumn.javaField} + '"的数据项?').then(function() {
return del${BusinessName}(row.${pkColumn.javaField});
}).then(() => {
this.getList();
this.#[[$modal]]#.msgSuccess("删除成功");
}).catch(() => {});
} }
} });
}; }
/** 删除按钮操作 */
function handleDelete(row) {
proxy.#[[$modal]]#.confirm('是否确认删除${functionName}编号为"' + row.${pkColumn.javaField} + '"的数据项?').then(function() {
return del${BusinessName}(row.${pkColumn.javaField});
}).then(() => {
getList();
proxy.#[[$modal]]#.msgSuccess("删除成功");
}).catch(() => {});
}
getList();
</script> </script>

480
lzbi-generator/src/main/resources/vm/vue/index.vue.vm

@ -1,6 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
#foreach($column in $columns) #foreach($column in $columns)
#if($column.query) #if($column.query)
#set($dictType=$column.dictType) #set($dictType=$column.dictType)
@ -17,14 +17,14 @@
v-model="queryParams.${column.javaField}" v-model="queryParams.${column.javaField}"
placeholder="请输入${comment}" placeholder="请输入${comment}"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter="handleQuery"
/> />
</el-form-item> </el-form-item>
#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && "" != $dictType) #elseif(($column.htmlType == "select" || $column.htmlType == "radio") && "" != $dictType)
<el-form-item label="${comment}" prop="${column.javaField}"> <el-form-item label="${comment}" prop="${column.javaField}">
<el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable> <el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable>
<el-option <el-option
v-for="dict in dict.type.${dictType}" v-for="dict in ${dictType}"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
@ -42,16 +42,15 @@
<el-date-picker clearable <el-date-picker clearable
v-model="queryParams.${column.javaField}" v-model="queryParams.${column.javaField}"
type="date" type="date"
value-format="yyyy-MM-dd" value-format="YYYY-MM-DD"
placeholder="请选择${comment}"> placeholder="请选择${comment}">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
#elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN") #elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
<el-form-item label="${comment}"> <el-form-item label="${comment}" style="width: 308px">
<el-date-picker <el-date-picker
v-model="daterange${AttrName}" v-model="daterange${AttrName}"
style="width: 240px" value-format="YYYY-MM-DD"
value-format="yyyy-MM-dd"
type="daterange" type="daterange"
range-separator="-" range-separator="-"
start-placeholder="开始日期" start-placeholder="开始日期"
@ -62,8 +61,8 @@
#end #end
#end #end
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -72,8 +71,7 @@
<el-button <el-button
type="primary" type="primary"
plain plain
icon="el-icon-plus" icon="Plus"
size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['${moduleName}:${businessName}:add']" v-hasPermi="['${moduleName}:${businessName}:add']"
>新增</el-button> >新增</el-button>
@ -82,8 +80,7 @@
<el-button <el-button
type="success" type="success"
plain plain
icon="el-icon-edit" icon="Edit"
size="mini"
:disabled="single" :disabled="single"
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['${moduleName}:${businessName}:edit']" v-hasPermi="['${moduleName}:${businessName}:edit']"
@ -93,8 +90,7 @@
<el-button <el-button
type="danger" type="danger"
plain plain
icon="el-icon-delete" icon="Delete"
size="mini"
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['${moduleName}:${businessName}:remove']" v-hasPermi="['${moduleName}:${businessName}:remove']"
@ -104,13 +100,12 @@
<el-button <el-button
type="warning" type="warning"
plain plain
icon="el-icon-download" icon="Download"
size="mini"
@click="handleExport" @click="handleExport"
v-hasPermi="['${moduleName}:${businessName}:export']" v-hasPermi="['${moduleName}:${businessName}:export']"
>导出</el-button> >导出</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="${businessName}List" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="${businessName}List" @selection-change="handleSelectionChange">
@ -127,23 +122,23 @@
<el-table-column label="${comment}" align="center" prop="${javaField}" /> <el-table-column label="${comment}" align="center" prop="${javaField}" />
#elseif($column.list && $column.htmlType == "datetime") #elseif($column.list && $column.htmlType == "datetime")
<el-table-column label="${comment}" align="center" prop="${javaField}" width="180"> <el-table-column label="${comment}" align="center" prop="${javaField}" width="180">
<template slot-scope="scope"> <template #default="scope">
<span>{{ parseTime(scope.row.${javaField}, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.${javaField}, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
#elseif($column.list && $column.htmlType == "imageUpload") #elseif($column.list && $column.htmlType == "imageUpload")
<el-table-column label="${comment}" align="center" prop="${javaField}" width="100"> <el-table-column label="${comment}" align="center" prop="${javaField}" width="100">
<template slot-scope="scope"> <template #default="scope">
<image-preview :src="scope.row.${javaField}" :width="50" :height="50"/> <image-preview :src="scope.row.${javaField}" :width="50" :height="50"/>
</template> </template>
</el-table-column> </el-table-column>
#elseif($column.list && "" != $column.dictType) #elseif($column.list && "" != $column.dictType)
<el-table-column label="${comment}" align="center" prop="${javaField}"> <el-table-column label="${comment}" align="center" prop="${javaField}">
<template slot-scope="scope"> <template #default="scope">
#if($column.htmlType == "checkbox") #if($column.htmlType == "checkbox")
<dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/> <dict-tag :options="${column.dictType}" :value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/>
#else #else
<dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField}"/> <dict-tag :options="${column.dictType}" :value="scope.row.${javaField}"/>
#end #end
</template> </template>
</el-table-column> </el-table-column>
@ -152,21 +147,9 @@
#end #end
#end #end
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template #default="scope">
<el-button <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${moduleName}:${businessName}:edit']">修改</el-button>
size="mini" <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${moduleName}:${businessName}:remove']">删除</el-button>
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['${moduleName}:${businessName}:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['${moduleName}:${businessName}:remove']"
>删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -174,14 +157,14 @@
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
:page.sync="queryParams.pageNum" v-model:page="queryParams.pageNum"
:limit.sync="queryParams.pageSize" v-model:limit="queryParams.pageSize"
@pagination="getList" @pagination="getList"
/> />
<!-- 添加或修改${functionName}对话框 --> <!-- 添加或修改${functionName}对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" v-model="open" width="60%" append-to-body :close-on-click-modal="false">
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="${businessName}Ref" :model="form" :rules="rules" label-width="80px">
#foreach($column in $columns) #foreach($column in $columns)
#set($field=$column.javaField) #set($field=$column.javaField)
#if($column.insert && !$column.pk) #if($column.insert && !$column.pk)
@ -213,7 +196,7 @@
<el-form-item label="${comment}" prop="${field}"> <el-form-item label="${comment}" prop="${field}">
<el-select v-model="form.${field}" placeholder="请选择${comment}"> <el-select v-model="form.${field}" placeholder="请选择${comment}">
<el-option <el-option
v-for="dict in dict.type.${dictType}" v-for="dict in ${dictType}"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
#if($column.javaType == "Integer" || $column.javaType == "Long") #if($column.javaType == "Integer" || $column.javaType == "Long")
@ -234,7 +217,7 @@
<el-form-item label="${comment}" prop="${field}"> <el-form-item label="${comment}" prop="${field}">
<el-checkbox-group v-model="form.${field}"> <el-checkbox-group v-model="form.${field}">
<el-checkbox <el-checkbox
v-for="dict in dict.type.${dictType}" v-for="dict in ${dictType}"
:key="dict.value" :key="dict.value"
:label="dict.value"> :label="dict.value">
{{dict.label}} {{dict.label}}
@ -251,7 +234,7 @@
<el-form-item label="${comment}" prop="${field}"> <el-form-item label="${comment}" prop="${field}">
<el-radio-group v-model="form.${field}"> <el-radio-group v-model="form.${field}">
<el-radio <el-radio
v-for="dict in dict.type.${dictType}" v-for="dict in ${dictType}"
:key="dict.value" :key="dict.value"
#if($column.javaType == "Integer" || $column.javaType == "Long") #if($column.javaType == "Integer" || $column.javaType == "Long")
:label="parseInt(dict.value)" :label="parseInt(dict.value)"
@ -272,7 +255,7 @@
<el-date-picker clearable <el-date-picker clearable
v-model="form.${field}" v-model="form.${field}"
type="date" type="date"
value-format="yyyy-MM-dd" value-format="YYYY-MM-DD"
placeholder="请选择${comment}"> placeholder="请选择${comment}">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
@ -288,10 +271,10 @@
<el-divider content-position="center">${subTable.functionName}信息</el-divider> <el-divider content-position="center">${subTable.functionName}信息</el-divider>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd${subClassName}">添加</el-button> <el-button type="primary" icon="Plus" @click="handleAdd${subClassName}">添加</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDelete${subClassName}">删除</el-button> <el-button type="danger" icon="Delete" @click="handleDelete${subClassName}">删除</el-button>
</el-col> </el-col>
</el-row> </el-row>
<el-table :data="${subclassName}List" :row-class-name="row${subClassName}Index" @selection-change="handle${subClassName}SelectionChange" ref="${subclassName}"> <el-table :data="${subclassName}List" :row-class-name="row${subClassName}Index" @selection-change="handle${subClassName}SelectionChange" ref="${subclassName}">
@ -308,22 +291,27 @@
#if($column.pk || $javaField == ${subTableFkclassName}) #if($column.pk || $javaField == ${subTableFkclassName})
#elseif($column.list && $column.htmlType == "input") #elseif($column.list && $column.htmlType == "input")
<el-table-column label="$comment" prop="${javaField}" width="150"> <el-table-column label="$comment" prop="${javaField}" width="150">
<template slot-scope="scope"> <template #default="scope">
<el-input v-model="scope.row.$javaField" placeholder="请输入$comment" /> <el-input v-model="scope.row.$javaField" placeholder="请输入$comment" />
</template> </template>
</el-table-column> </el-table-column>
#elseif($column.list && $column.htmlType == "datetime") #elseif($column.list && $column.htmlType == "datetime")
<el-table-column label="$comment" prop="${javaField}" width="240"> <el-table-column label="$comment" prop="${javaField}" width="240">
<template slot-scope="scope"> <template #default="scope">
<el-date-picker clearable v-model="scope.row.$javaField" type="date" value-format="yyyy-MM-dd" placeholder="请选择$comment" /> <el-date-picker clearable
v-model="scope.row.$javaField"
type="date"
value-format="YYYY-MM-DD"
placeholder="请选择$comment">
</el-date-picker>
</template> </template>
</el-table-column> </el-table-column>
#elseif($column.list && ($column.htmlType == "select" || $column.htmlType == "radio") && "" != $column.dictType) #elseif($column.list && ($column.htmlType == "select" || $column.htmlType == "radio") && "" != $column.dictType)
<el-table-column label="$comment" prop="${javaField}" width="150"> <el-table-column label="$comment" prop="${javaField}" width="150">
<template slot-scope="scope"> <template #default="scope">
<el-select v-model="scope.row.$javaField" placeholder="请选择$comment"> <el-select v-model="scope.row.$javaField" placeholder="请选择$comment">
<el-option <el-option
v-for="dict in dict.type.$column.dictType" v-for="dict in $column.dictType"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value" :value="dict.value"
@ -333,7 +321,7 @@
</el-table-column> </el-table-column>
#elseif($column.list && ($column.htmlType == "select" || $column.htmlType == "radio") && "" == $column.dictType) #elseif($column.list && ($column.htmlType == "select" || $column.htmlType == "radio") && "" == $column.dictType)
<el-table-column label="$comment" prop="${javaField}" width="150"> <el-table-column label="$comment" prop="${javaField}" width="150">
<template slot-scope="scope"> <template #default="scope">
<el-select v-model="scope.row.$javaField" placeholder="请选择$comment"> <el-select v-model="scope.row.$javaField" placeholder="请选择$comment">
<el-option label="请选择字典生成" value="" /> <el-option label="请选择字典生成" value="" />
</el-select> </el-select>
@ -344,72 +332,60 @@
</el-table> </el-table>
#end #end
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <template #footer>
<el-button type="primary" @click="submitForm">确 定</el-button> <div class="dialog-footer">
<el-button @click="cancel">取 消</el-button> <el-button type="primary" @click="submitForm">确 定</el-button>
</div> <el-button @click="cancel">取 消</el-button>
</div>
</template>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script setup name="${BusinessName}">
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}"; import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}";
export default { const { proxy } = getCurrentInstance();
name: "${BusinessName}",
#if(${dicts} != '') #if(${dicts} != '')
dicts: [${dicts}], #set($dictsNoSymbol=$dicts.replace("'", ""))
#end const { ${dictsNoSymbol} } = proxy.useDict(${dicts});
data() { #end
return {
// 遮罩层 const ${businessName}List = ref([]);
loading: true,
// 选中数组
ids: [],
#if($table.sub) #if($table.sub)
// 子表选中数据 const ${subclassName}List = ref([]);
checked${subClassName}: [], #end
#end const open = ref(false);
// 非单个禁用 const loading = ref(true);
single: true, const showSearch = ref(true);
// 非多个禁用 const ids = ref([]);
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// ${functionName}表格数据
${businessName}List: [],
#if($table.sub) #if($table.sub)
// ${subTable.functionName}表格数据 const checked${subClassName} = ref([]);
${subclassName}List: [],
#end #end
// 弹出层标题 const single = ref(true);
title: "", const multiple = ref(true);
// 是否显示弹出层 const total = ref(0);
open: false, const title = ref("");
#foreach ($column in $columns) #foreach ($column in $columns)
#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") #if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
// $comment时间范围 const daterange${AttrName} = ref([]);
daterange${AttrName}: [],
#end #end
#end #end
// 查询参数
queryParams: { const data = reactive({
pageNum: 1, form: {},
pageSize: 10, queryParams: {
#foreach ($column in $columns) pageNum: 1,
pageSize: 10,
#foreach ($column in $columns)
#if($column.query) #if($column.query)
$column.javaField: null#if($foreach.count != $columns.size()),#end $column.javaField: null#if($foreach.count != $columns.size()),#end
#end #end
#end #end
}, },
// 表单参数 rules: {
form: {}, #foreach ($column in $columns)
// 表单校验
rules: {
#foreach ($column in $columns)
#if($column.required) #if($column.required)
#set($parentheseIndex=$column.columnComment.indexOf("(")) #set($parentheseIndex=$column.columnComment.indexOf("("))
#if($parentheseIndex != -1) #if($parentheseIndex != -1)
@ -417,186 +393,198 @@ export default {
#else #else
#set($comment=$column.columnComment) #set($comment=$column.columnComment)
#end #end
$column.javaField: [ $column.javaField: [
{ required: true, message: "$comment不能为空", trigger: #if($column.htmlType == "select" || $column.htmlType == "radio")"change"#else"blur"#end } { required: true, message: "$comment不能为空", trigger: #if($column.htmlType == "select" || $column.htmlType == "radio")"change"#else"blur"#end }
]#if($foreach.count != $columns.size()),#end ]#if($foreach.count != $columns.size()),#end
#end #end
#end #end
} }
}; });
},
created() { const { queryParams, form, rules } = toRefs(data);
this.getList();
}, /** 查询${functionName}列表 */
methods: { function getList() {
/** 查询${functionName}列表 */ loading.value = true;
getList() {
this.loading = true;
#foreach ($column in $columns) #foreach ($column in $columns)
#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") #if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
this.queryParams.params = {}; queryParams.value.params = {};
#break #break
#end #end
#end #end
#foreach ($column in $columns) #foreach ($column in $columns)
#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") #if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
if (null != this.daterange${AttrName} && '' != this.daterange${AttrName}) { if (null != daterange${AttrName} && '' != daterange${AttrName}) {
this.queryParams.params["begin${AttrName}"] = this.daterange${AttrName}[0]; queryParams.value.params["begin${AttrName}"] = daterange${AttrName}.value[0];
this.queryParams.params["end${AttrName}"] = this.daterange${AttrName}[1]; queryParams.value.params["end${AttrName}"] = daterange${AttrName}.value[1];
} }
#end #end
#end #end
list${BusinessName}(this.queryParams).then(response => { list${BusinessName}(queryParams.value).then(response => {
this.${businessName}List = response.rows; ${businessName}List.value = response.rows;
this.total = response.total; total.value = response.total;
this.loading = false; loading.value = false;
}); });
}, }
// 取消按钮
cancel() { // 取消按钮
this.open = false; function cancel() {
this.reset(); open.value = false;
}, reset();
// 表单重置 }
reset() {
this.form = { // 表单重置
function reset() {
form.value = {
#foreach ($column in $columns) #foreach ($column in $columns)
#if($column.htmlType == "checkbox") #if($column.htmlType == "checkbox")
$column.javaField: []#if($foreach.count != $columns.size()),#end $column.javaField: []#if($foreach.count != $columns.size()),#end
#else #else
$column.javaField: null#if($foreach.count != $columns.size()),#end $column.javaField: null#if($foreach.count != $columns.size()),#end
#end #end
#end #end
}; };
#if($table.sub) #if($table.sub)
this.${subclassName}List = []; ${subclassName}List.value = [];
#end #end
this.resetForm("form"); proxy.resetForm("${businessName}Ref");
}, }
/** 搜索按钮操作 */
handleQuery() { /** 搜索按钮操作 */
this.queryParams.pageNum = 1; function handleQuery() {
this.getList(); queryParams.value.pageNum = 1;
}, getList();
/** 重置按钮操作 */ }
resetQuery() {
/** 重置按钮操作 */
function resetQuery() {
#foreach ($column in $columns) #foreach ($column in $columns)
#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") #if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
this.daterange${AttrName} = []; daterange${AttrName}.value = [];
#end #end
#end #end
this.resetForm("queryForm"); proxy.resetForm("queryRef");
this.handleQuery(); handleQuery();
}, }
// 多选框选中数据
handleSelectionChange(selection) { // 多选框选中数据
this.ids = selection.map(item => item.${pkColumn.javaField}) function handleSelectionChange(selection) {
this.single = selection.length!==1 ids.value = selection.map(item => item.${pkColumn.javaField});
this.multiple = !selection.length single.value = selection.length != 1;
}, multiple.value = !selection.length;
/** 新增按钮操作 */ }
handleAdd() {
this.reset(); /** 新增按钮操作 */
this.open = true; function handleAdd() {
this.title = "添加${functionName}"; reset();
}, open.value = true;
/** 修改按钮操作 */ title.value = "添加${functionName}";
handleUpdate(row) { }
this.reset();
const ${pkColumn.javaField} = row.${pkColumn.javaField} || this.ids /** 修改按钮操作 */
get${BusinessName}(${pkColumn.javaField}).then(response => { function handleUpdate(row) {
this.form = response.data; reset();
const _${pkColumn.javaField} = row.${pkColumn.javaField} || ids.value
get${BusinessName}(_${pkColumn.javaField}).then(response => {
form.value = response.data;
#foreach ($column in $columns) #foreach ($column in $columns)
#if($column.htmlType == "checkbox") #if($column.htmlType == "checkbox")
this.form.$column.javaField = this.form.${column.javaField}.split(","); form.value.$column.javaField = form.value.${column.javaField}.split(",");
#end #end
#end #end
#if($table.sub) #if($table.sub)
this.${subclassName}List = response.data.${subclassName}List; ${subclassName}List.value = response.data.${subclassName}List;
#end #end
this.open = true; open.value = true;
this.title = "修改${functionName}"; title.value = "修改${functionName}";
}); });
}, }
/** 提交按钮 */
submitForm() { /** 提交按钮 */
this.#[[$]]#refs["form"].validate(valid => { function submitForm() {
if (valid) { proxy.#[[$]]#refs["${businessName}Ref"].validate(valid => {
if (valid) {
#foreach ($column in $columns) #foreach ($column in $columns)
#if($column.htmlType == "checkbox") #if($column.htmlType == "checkbox")
this.form.$column.javaField = this.form.${column.javaField}.join(","); form.value.$column.javaField = form.value.${column.javaField}.join(",");
#end #end
#end #end
#if($table.sub) #if($table.sub)
this.form.${subclassName}List = this.${subclassName}List; form.value.${subclassName}List = ${subclassName}List.value;
#end #end
if (this.form.${pkColumn.javaField} != null) { if (form.value.${pkColumn.javaField} != null) {
update${BusinessName}(this.form).then(response => { update${BusinessName}(form.value).then(response => {
this.#[[$modal]]#.msgSuccess("修改成功"); proxy.#[[$modal]]#.msgSuccess("修改成功");
this.open = false; open.value = false;
this.getList(); getList();
}); });
} else { } else {
add${BusinessName}(this.form).then(response => { add${BusinessName}(form.value).then(response => {
this.#[[$modal]]#.msgSuccess("新增成功"); proxy.#[[$modal]]#.msgSuccess("新增成功");
this.open = false; open.value = false;
this.getList(); getList();
}); });
} }
} }
}); });
}, }
/** 删除按钮操作 */
handleDelete(row) { /** 删除按钮操作 */
const ${pkColumn.javaField}s = row.${pkColumn.javaField} || this.ids; function handleDelete(row) {
this.#[[$modal]]#.confirm('是否确认删除${functionName}编号为"' + ${pkColumn.javaField}s + '"的数据项?').then(function() { const _${pkColumn.javaField}s = row.${pkColumn.javaField} || ids.value;
return del${BusinessName}(${pkColumn.javaField}s); proxy.#[[$modal]]#.confirm('是否确认删除${functionName}编号为"' + _${pkColumn.javaField}s + '"的数据项?').then(function() {
}).then(() => { return del${BusinessName}(_${pkColumn.javaField}s);
this.getList(); }).then(() => {
this.#[[$modal]]#.msgSuccess("删除成功"); getList();
}).catch(() => {}); proxy.#[[$modal]]#.msgSuccess("删除成功");
}, }).catch(() => {});
}
#if($table.sub) #if($table.sub)
/** ${subTable.functionName}序号 */ /** ${subTable.functionName}序号 */
row${subClassName}Index({ row, rowIndex }) { function row${subClassName}Index({ row, rowIndex }) {
row.index = rowIndex + 1; row.index = rowIndex + 1;
}, }
/** ${subTable.functionName}添加按钮操作 */
handleAdd${subClassName}() { /** ${subTable.functionName}添加按钮操作 */
let obj = {}; function handleAdd${subClassName}() {
let obj = {};
#foreach($column in $subTable.columns) #foreach($column in $subTable.columns)
#if($column.pk || $column.javaField == ${subTableFkclassName}) #if($column.pk || $column.javaField == ${subTableFkclassName})
#elseif($column.list && "" != $javaField) #elseif($column.list && "" != $javaField)
obj.$column.javaField = ""; obj.$column.javaField = "";
#end #end
#end #end
this.${subclassName}List.push(obj); ${subclassName}List.value.push(obj);
}, }
/** ${subTable.functionName}删除按钮操作 */
handleDelete${subClassName}() { /** ${subTable.functionName}删除按钮操作 */
if (this.checked${subClassName}.length == 0) { function handleDelete${subClassName}() {
this.#[[$modal]]#.msgError("请先选择要删除的${subTable.functionName}数据"); if (checked${subClassName}.value.length == 0) {
} else { proxy.#[[$modal]]#.msgError("请先选择要删除的${subTable.functionName}数据");
const ${subclassName}List = this.${subclassName}List; } else {
const checked${subClassName} = this.checked${subClassName}; const ${subclassName}s = ${subclassName}List.value;
this.${subclassName}List = ${subclassName}List.filter(function(item) { const checked${subClassName}s = checked${subClassName}.value;
return checked${subClassName}.indexOf(item.index) == -1 ${subclassName}List.value = ${subclassName}s.filter(function(item) {
}); return checked${subClassName}s.indexOf(item.index) == -1
} });
},
/** 复选框选中数据 */
handle${subClassName}SelectionChange(selection) {
this.checked${subClassName} = selection.map(item => item.index)
},
#end
/** 导出按钮操作 */
handleExport() {
this.download('${moduleName}/${businessName}/export', {
...this.queryParams
}, `${businessName}_#[[${new Date().getTime()}]]#.xlsx`)
}
} }
}; }
/** 复选框选中数据 */
function handle${subClassName}SelectionChange(selection) {
checked${subClassName}.value = selection.map(item => item.index)
}
#end
/** 导出按钮操作 */
function handleExport() {
proxy.download('${moduleName}/${businessName}/export', {
...queryParams.value
}, `${businessName}_#[[${new Date().getTime()}]]#.xlsx`)
}
getList();
</script> </script>

6
lzbi-module/src/main/java/com/lzbi/bi/controller/DcBusiDataScreenMainController.java

@ -153,14 +153,14 @@ public class DcBusiDataScreenMainController extends BaseController{
List<DcBusiDataScreenVo> group = dcBusiDataScreenMainService.selectSquareGroup(qdate); List<DcBusiDataScreenVo> group = dcBusiDataScreenMainService.selectSquareGroup(qdate);
JSONObject all=new JSONObject(); JSONObject all=new JSONObject();
group.forEach(item->{ group.forEach(item->{
all.put(item.getCoallost(),item.getMonthAll()); all.put(item.getCoallost(),StringUtils.getfomatDouble(item.getMonthAll()));
all.put("unit",item.getTargetUnit()); all.put("unit",item.getTargetUnit());
}); });
JSONArray out=new JSONArray(); JSONArray out=new JSONArray();
real.forEach(item->{ real.forEach(item->{
JSONObject tmp=new JSONObject(); JSONObject tmp=new JSONObject();
tmp.put("name",item.getCompanyName()); tmp.put("name",item.getCompanyName());
tmp.put("value",item.getMonthAll()); tmp.put("value",StringUtils.getfomatDouble(item.getMonthAll()));
tmp.put("unit",item.getTargetUnit()); tmp.put("unit",item.getTargetUnit());
out.add(tmp); out.add(tmp);
}); });
@ -168,7 +168,7 @@ public class DcBusiDataScreenMainController extends BaseController{
self.forEach(item->{ self.forEach(item->{
JSONObject tmp=new JSONObject(); JSONObject tmp=new JSONObject();
tmp.put("name",item.getCompanyName()); tmp.put("name",item.getCompanyName());
tmp.put("value",item.getMonthAll()); tmp.put("value",StringUtils.getfomatDouble(item.getMonthAll()));
tmp.put("unit",item.getTargetUnit()); tmp.put("unit",item.getTargetUnit());
in.add(tmp); in.add(tmp);
}); });

166
lzbi-module/src/main/java/com/lzbi/bi/controller/DcBusiTargetAdjustController.java

@ -1,132 +1,104 @@
package com.lzbi.bi.controller; package com.lzbi.bi.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import java.util.List;
import javax.servlet.http.HttpServletResponse;
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 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.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import com.lzbi.bi.domain.DcBusiTargetAdjust; import com.lzbi.bi.domain.DcBusiTargetAdjust;
import com.lzbi.bi.service.DcBusiTargetAdjustService; import com.lzbi.bi.service.IDcBusiTargetAdjustService;
import com.lzbi.common.utils.poi.ExcelUtil;
import com.lzbi.common.core.page.TableDataInfo;
/** /**
* 资产指标调整单;(dc_busi_target_adjust)表控制层 * 资产指标调整单Controller
* @author : zhousq *
* @date : 2023-11-16 * @author zhousq
* @date 2023-11-23
*/ */
@Api(tags = "资产指标调整单对象功能接口")
@RestController @RestController
@RequestMapping("/assetData/dcBusiTargetAdjust") @RequestMapping("/asset/AssetTargetAdjustBill")
public class DcBusiTargetAdjustController extends BaseController{ public class DcBusiTargetAdjustController extends BaseController
{
@Autowired @Autowired
private DcBusiTargetAdjustService dcBusiTargetAdjustService; private IDcBusiTargetAdjustService dcBusiTargetAdjustService;
/** /**
* 分页列表查询 * 查询资产指标调整单列表
* @return 分页数据
*/ */
@PreAuthorize("@ss.hasPermi('assetData:AssetTargetAdjustBill:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(DcBusiTargetAdjust dcBusiTargetAdjust) public TableDataInfo list(DcBusiTargetAdjust dcBusiTargetAdjust)
{ startPage(); {
List<DcBusiTargetAdjust> list = dcBusiTargetAdjustService.selectByVo(dcBusiTargetAdjust); startPage();
List<DcBusiTargetAdjust> list = dcBusiTargetAdjustService.selectDcBusiTargetAdjustList(dcBusiTargetAdjust);
return getDataTable(list); return getDataTable(list);
} }
/** /**
*根据ID获取详情 * 导出资产指标调整单列表
*@param id
@return DcBusiTargetAdjust 没有反馈空
*/
@ApiOperation("根据ID获取资产指标调整单详细信息")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(dcBusiTargetAdjustService.getById(id));
}
/**
* 资产指标调整单-新增
*@param dcBusiTargetAdjust
*@return DcBusiTargetAdjust
*/
@ApiOperation("新增资产指标调整单一条数据")
@Log(title = "", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@Valid @RequestBody DcBusiTargetAdjust dcBusiTargetAdjust) {
//BeanValidators.validateWithException(validator, dcBusiTargetAdjust);
dcBusiTargetAdjust.setCreatedBy(getUsername());
dcBusiTargetAdjust.setCreatedTime(DateUtils.getNowDate());
dcBusiTargetAdjust.setTenantId("0");
dcBusiTargetAdjust.setUpdatedBy(getUsername());
dcBusiTargetAdjust.setUpdatedTime(DateUtils.getNowDate());
return toAjax(dcBusiTargetAdjustService.insertByVo(dcBusiTargetAdjust));
}
/**
* 资产指标调整单-修改
*@param dcBusiTargetAdjust
*@return DcBusiTargetAdjust
*/ */
@ApiOperation("资产指标调整单修改") @PreAuthorize("@ss.hasPermi('assetData:AssetTargetAdjustBill:export')")
@Log(title = "", businessType = BusinessType.UPDATE) @Log(title = "资产指标调整单", businessType = BusinessType.EXPORT)
@PutMapping @PostMapping("/export")
public AjaxResult edit(@Valid @RequestBody DcBusiTargetAdjust dcBusiTargetAdjust) { public void export(HttpServletResponse response, DcBusiTargetAdjust dcBusiTargetAdjust)
//BeanValidators.validateWithException(validator, dcBusiTargetAdjust); {
dcBusiTargetAdjust.setUpdatedBy(getUsername()); List<DcBusiTargetAdjust> list = dcBusiTargetAdjustService.selectDcBusiTargetAdjustList(dcBusiTargetAdjust);
dcBusiTargetAdjust.setUpdatedTime(DateUtils.getNowDate()); ExcelUtil<DcBusiTargetAdjust> util = new ExcelUtil<DcBusiTargetAdjust>(DcBusiTargetAdjust.class);
return toAjax(dcBusiTargetAdjustService.updateById(dcBusiTargetAdjust)); util.exportExcel(response, list, "资产指标调整单数据");
} }
/** /**
* 通过ID删除资产指标调整单 * 获取资产指标调整单详细信息
* @param
* @return 成功1 失败0
*/ */
@ApiOperation("根据ID删除资产指标调整单") @PreAuthorize("@ss.hasPermi('assetData:AssetTargetAdjustBill: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) { {
DcBusiTargetAdjust dcBusiTargetAdjust=new DcBusiTargetAdjust(); return success(dcBusiTargetAdjustService.selectDcBusiTargetAdjustById(id));
dcBusiTargetAdjust.setId(id);
return toAjax(dcBusiTargetAdjustService.removeById( dcBusiTargetAdjust));
} }
/** /**
* 批量删除资产指标调整单 * 新增资产指标调整单
* @param ids 数组
* @return 删除的条数
*/ */
@ApiOperation("批量删除资产指标调整单") @PreAuthorize("@ss.hasPermi('assetData:AssetTargetAdjustBill:add')")
@Log(title = "批量删除资产指标调整单", businessType = BusinessType.DELETE) @Log(title = "资产指标调整单", businessType = BusinessType.INSERT)
@DeleteMapping("/ids/{ids}") @PostMapping
public AjaxResult batchRemove(@PathVariable Long[] ids) { public AjaxResult add(@RequestBody DcBusiTargetAdjust dcBusiTargetAdjust)
List<Long> collect = Arrays.stream(ids).collect(Collectors.toList()); {
return toAjax(dcBusiTargetAdjustService.removeBatchByIds(collect)); return toAjax(dcBusiTargetAdjustService.insertDcBusiTargetAdjust(dcBusiTargetAdjust));
} }
/** /**
* 通过模版导入"资产指标调整单数据 * 修改资产指标调整单
*
*/ */
@ApiOperation("资产指标调整单数据导入") @PreAuthorize("@ss.hasPermi('assetData:AssetTargetAdjustBill:edit')")
@PostMapping("/importTemplate") @Log(title = "资产指标调整单", businessType = BusinessType.UPDATE)
public void importTemplate(HttpServletResponse response) { @PutMapping
ExcelUtil<DcBusiTargetAdjust> util = new ExcelUtil<>(DcBusiTargetAdjust.class); public AjaxResult edit(@RequestBody DcBusiTargetAdjust dcBusiTargetAdjust)
util.importTemplateExcel(response, "资产指标调整单导出数据"); {
return toAjax(dcBusiTargetAdjustService.updateDcBusiTargetAdjust(dcBusiTargetAdjust));
} }
/** /**
* "资产指标调整单数据导出功能 * 删除资产指标调整单
*/ */
@ApiOperation("导出资产指标调整单数据") @PreAuthorize("@ss.hasPermi('assetData:AssetTargetAdjustBill:remove')")
@PostMapping("/export") @Log(title = "资产指标调整单", businessType = BusinessType.DELETE)
public void export(HttpServletResponse response, DcBusiTargetAdjust dcBusiTargetAdjust) { @DeleteMapping("/{ids}")
QueryWrapper<DcBusiTargetAdjust> queryWrapper = new QueryWrapper<>(); public AjaxResult remove(@PathVariable Long[] ids)
List<DcBusiTargetAdjust> list = dcBusiTargetAdjustService.list(queryWrapper); {
ExcelUtil<DcBusiTargetAdjust> util = new ExcelUtil<>(DcBusiTargetAdjust.class); return toAjax(dcBusiTargetAdjustService.deleteDcBusiTargetAdjustByIds(ids));
util.exportExcel(response, list, "导出的资产指标调整单数据");
} }
} }

166
lzbi-module/src/main/java/com/lzbi/bi/controller/DcBusiTargetDraftController.java

@ -1,132 +1,104 @@
package com.lzbi.bi.controller; package com.lzbi.bi.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import java.util.List;
import javax.servlet.http.HttpServletResponse;
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 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.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import com.lzbi.bi.domain.DcBusiTargetDraft; import com.lzbi.bi.domain.DcBusiTargetDraft;
import com.lzbi.bi.service.DcBusiTargetDraftService; import com.lzbi.bi.service.IDcBusiTargetDraftService;
import com.lzbi.common.utils.poi.ExcelUtil;
import com.lzbi.common.core.page.TableDataInfo;
/** /**
* 指标数据底稿表;(dc_busi_target_draft)表控制层 * 指标数据底稿Controller
* @author : zhousq *
* @date : 2023-11-16 * @author zhousq
* @date 2023-11-23
*/ */
@Api(tags = "指标数据底稿表对象功能接口")
@RestController @RestController
@RequestMapping("/assetData/dcBusiTargetDraft") @RequestMapping("/asset/AssetTargetdraft")
public class DcBusiTargetDraftController extends BaseController{ public class DcBusiTargetDraftController extends BaseController
{
@Autowired @Autowired
private DcBusiTargetDraftService dcBusiTargetDraftService; private IDcBusiTargetDraftService dcBusiTargetDraftService;
/** /**
* 分页列表查询 * 查询指标数据底稿列表
* @return 分页数据
*/ */
@PreAuthorize("@ss.hasPermi('assetData:AssetTargetdraft:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(DcBusiTargetDraft dcBusiTargetDraft) public TableDataInfo list(DcBusiTargetDraft dcBusiTargetDraft)
{ startPage(); {
List<DcBusiTargetDraft> list = dcBusiTargetDraftService.selectByVo(dcBusiTargetDraft); startPage();
List<DcBusiTargetDraft> list = dcBusiTargetDraftService.selectDcBusiTargetDraftList(dcBusiTargetDraft);
return getDataTable(list); return getDataTable(list);
} }
/** /**
*根据ID获取详情 * 导出指标数据底稿列表
*@param id
@return DcBusiTargetDraft 没有反馈空
*/
@ApiOperation("根据ID获取指标数据底稿表详细信息")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(dcBusiTargetDraftService.getById(id));
}
/**
* 指标数据底稿表-新增
*@param dcBusiTargetDraft
*@return DcBusiTargetDraft
*/
@ApiOperation("新增指标数据底稿表一条数据")
@Log(title = "", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@Valid @RequestBody DcBusiTargetDraft dcBusiTargetDraft) {
//BeanValidators.validateWithException(validator, dcBusiTargetDraft);
dcBusiTargetDraft.setCreatedBy(getUsername());
dcBusiTargetDraft.setCreatedTime(DateUtils.getNowDate());
dcBusiTargetDraft.setTenantId("0");
dcBusiTargetDraft.setUpdatedBy(getUsername());
dcBusiTargetDraft.setUpdatedTime(DateUtils.getNowDate());
return toAjax(dcBusiTargetDraftService.insertByVo(dcBusiTargetDraft));
}
/**
* 指标数据底稿表-修改
*@param dcBusiTargetDraft
*@return DcBusiTargetDraft
*/ */
@ApiOperation("指标数据底稿表修改") @PreAuthorize("@ss.hasPermi('assetData:AssetTargetdraft:export')")
@Log(title = "", businessType = BusinessType.UPDATE) @Log(title = "指标数据底稿", businessType = BusinessType.EXPORT)
@PutMapping @PostMapping("/export")
public AjaxResult edit(@Valid @RequestBody DcBusiTargetDraft dcBusiTargetDraft) { public void export(HttpServletResponse response, DcBusiTargetDraft dcBusiTargetDraft)
//BeanValidators.validateWithException(validator, dcBusiTargetDraft); {
dcBusiTargetDraft.setUpdatedBy(getUsername()); List<DcBusiTargetDraft> list = dcBusiTargetDraftService.selectDcBusiTargetDraftList(dcBusiTargetDraft);
dcBusiTargetDraft.setUpdatedTime(DateUtils.getNowDate()); ExcelUtil<DcBusiTargetDraft> util = new ExcelUtil<DcBusiTargetDraft>(DcBusiTargetDraft.class);
return toAjax(dcBusiTargetDraftService.updateById(dcBusiTargetDraft)); util.exportExcel(response, list, "指标数据底稿数据");
} }
/** /**
* 通过ID删除指标数据底稿表 * 获取指标数据底稿详细信息
* @param
* @return 成功1 失败0
*/ */
@ApiOperation("根据ID删除指标数据底稿表") @PreAuthorize("@ss.hasPermi('assetData:AssetTargetdraft: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) { {
DcBusiTargetDraft dcBusiTargetDraft=new DcBusiTargetDraft(); return success(dcBusiTargetDraftService.selectDcBusiTargetDraftById(id));
dcBusiTargetDraft.setId(id);
return toAjax(dcBusiTargetDraftService.removeById( dcBusiTargetDraft));
} }
/** /**
* 批量删除指标数据底稿表 * 新增指标数据底稿
* @param ids 数组
* @return 删除的条数
*/ */
@ApiOperation("批量删除指标数据底稿表") @PreAuthorize("@ss.hasPermi('assetData:AssetTargetdraft:add')")
@Log(title = "批量删除指标数据底稿", businessType = BusinessType.DELETE) @Log(title = "指标数据底稿", businessType = BusinessType.INSERT)
@DeleteMapping("/ids/{ids}") @PostMapping
public AjaxResult batchRemove(@PathVariable Long[] ids) { public AjaxResult add(@RequestBody DcBusiTargetDraft dcBusiTargetDraft)
List<Long> collect = Arrays.stream(ids).collect(Collectors.toList()); {
return toAjax(dcBusiTargetDraftService.removeBatchByIds(collect)); return toAjax(dcBusiTargetDraftService.insertDcBusiTargetDraft(dcBusiTargetDraft));
} }
/** /**
* 通过模版导入"指标数据底稿表数据 * 修改指标数据底稿
*
*/ */
@ApiOperation("指标数据底稿表数据导入") @PreAuthorize("@ss.hasPermi('assetData:AssetTargetdraft:edit')")
@PostMapping("/importTemplate") @Log(title = "指标数据底稿", businessType = BusinessType.UPDATE)
public void importTemplate(HttpServletResponse response) { @PutMapping
ExcelUtil<DcBusiTargetDraft> util = new ExcelUtil<>(DcBusiTargetDraft.class); public AjaxResult edit(@RequestBody DcBusiTargetDraft dcBusiTargetDraft)
util.importTemplateExcel(response, "指标数据底稿表导出数据"); {
return toAjax(dcBusiTargetDraftService.updateDcBusiTargetDraft(dcBusiTargetDraft));
} }
/** /**
* "指标数据底稿表数据导出功能 * 删除指标数据底稿
*/ */
@ApiOperation("导出指标数据底稿表数据") @PreAuthorize("@ss.hasPermi('assetData:AssetTargetdraft:remove')")
@PostMapping("/export") @Log(title = "指标数据底稿", businessType = BusinessType.DELETE)
public void export(HttpServletResponse response, DcBusiTargetDraft dcBusiTargetDraft) { @DeleteMapping("/{ids}")
QueryWrapper<DcBusiTargetDraft> queryWrapper = new QueryWrapper<>(); public AjaxResult remove(@PathVariable Long[] ids)
List<DcBusiTargetDraft> list = dcBusiTargetDraftService.list(queryWrapper); {
ExcelUtil<DcBusiTargetDraft> util = new ExcelUtil<>(DcBusiTargetDraft.class); return toAjax(dcBusiTargetDraftService.deleteDcBusiTargetDraftByIds(ids));
util.exportExcel(response, list, "导出的指标数据底稿表数据");
} }
} }

323
lzbi-module/src/main/java/com/lzbi/bi/domain/DcBusiTargetAdjust.java

@ -1,65 +1,296 @@
package com.lzbi.bi.domain; package com.lzbi.bi.domain;
import com.lzbi.common.core.domain.BaseEntity; import java.math.BigDecimal;
import com.lzbi.module.base.BaseModuleEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date; import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.lzbi.common.annotation.Excel;
import com.lzbi.common.core.domain.BaseEntity;
/** /**
* 资产指标调整单; * 资产指标调整单对象 dc_busi_target_adjust
* @author : zhousq *
* @date : 2023-11-16 * @author zhousq
* @date 2023-11-23
*/ */
@Data public class DcBusiTargetAdjust extends BaseEntity
@NoArgsConstructor {
@AllArgsConstructor private static final long serialVersionUID = 1L;
@Accessors(chain = true)
@ApiModel(value = "资产指标调整单",description = "") /** 租户号 */
@TableName("dc_busi_target_adjust") @Excel(name = "租户号")
public class DcBusiTargetAdjust extends BaseModuleEntity { private String tenantId;
/** 乐观锁 */
@Excel(name = "乐观锁")
private Long REVISION;
/** 创建人 */
@Excel(name = "创建人")
private String createdBy;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createdTime;
/** 更新人 */
@Excel(name = "更新人")
private String updatedBy;
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date updatedTime;
/** 删除人 */
@Excel(name = "删除人")
private String deleteBy;
/** 删除时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "删除时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date deleteTime;
/** 单据号 */ /** 单据号 */
@ApiModelProperty(name = "单据号",notes = "") @Excel(name = "单据号")
private String billSerial ; private String billSerial;
/** 单据类别 */ /** 单据类别 */
@ApiModelProperty(name = "单据类别",notes = "") @Excel(name = "单据类别")
private String biilType ; private String biilType;
/** 指标编码 */ /** 指标编码 */
@ApiModelProperty(name = "指标编码",notes = "") @Excel(name = "指标编码")
private String targetCode ; private String targetCode;
/** 资产ID */ /** 资产ID */
@ApiModelProperty(name = "资产ID",notes = "") @Excel(name = "资产ID")
private Integer assetId ; private Long assetId;
/** 原始值 */ /** 原始值 */
@ApiModelProperty(name = "原始值",notes = "") @Excel(name = "原始值")
private Double valOrginal ; private BigDecimal valOrginal;
/** 调整值 */ /** 调整值 */
@ApiModelProperty(name = "调整值",notes = "") @Excel(name = "调整值")
private Double valAdjust ; private BigDecimal valAdjust;
/** 结果值 */ /** 结果值 */
@ApiModelProperty(name = "结果值",notes = "") @Excel(name = "结果值")
private Double valResult ; private BigDecimal valResult;
/** 主键 */ /** 主键 */
@ApiModelProperty(name = "主键",notes = "") private Long id;
@TableId
private long id;
/** 调整目标日期 */ /** 调整目标日期 */
@ApiModelProperty(name = "调整目标日期",notes = "") @JsonFormat(pattern = "yyyy-MM-dd")
private Date dateAdjust ; @Excel(name = "调整目标日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date dateAdjust;
/** 调整目标时间 */ /** 调整目标时间 */
@ApiModelProperty(name = "调整目标时间",notes = "") @Excel(name = "调整目标时间")
private String hourAdjust ; private String hourAdjust;
/** 调整目标日期字符串 */ /** 调整目标日期字符串 */
@ApiModelProperty(name = "调整目标日期字符串",notes = "") @Excel(name = "调整目标日期字符串")
private String dateAdjustStr ; private String dateAdjustStr;
public void setTenantId(String tenantId)
{
this.tenantId = tenantId;
}
public String getTenantId()
{
return tenantId;
}
public void setREVISION(Long REVISION)
{
this.REVISION = REVISION;
}
public Long getREVISION()
{
return REVISION;
}
public void setCreatedBy(String createdBy)
{
this.createdBy = createdBy;
}
public String getCreatedBy()
{
return createdBy;
}
public void setCreatedTime(Date createdTime)
{
this.createdTime = createdTime;
}
public Date getCreatedTime()
{
return createdTime;
}
public void setUpdatedBy(String updatedBy)
{
this.updatedBy = updatedBy;
}
public String getUpdatedBy()
{
return updatedBy;
}
public void setUpdatedTime(Date updatedTime)
{
this.updatedTime = updatedTime;
}
public Date getUpdatedTime()
{
return updatedTime;
}
public void setDeleteBy(String deleteBy)
{
this.deleteBy = deleteBy;
}
public String getDeleteBy()
{
return deleteBy;
}
public void setDeleteTime(Date deleteTime)
{
this.deleteTime = deleteTime;
}
public Date getDeleteTime()
{
return deleteTime;
}
public void setBillSerial(String billSerial)
{
this.billSerial = billSerial;
}
public String getBillSerial()
{
return billSerial;
}
public void setBiilType(String biilType)
{
this.biilType = biilType;
}
public String getBiilType()
{
return biilType;
}
public void setTargetCode(String targetCode)
{
this.targetCode = targetCode;
}
public String getTargetCode()
{
return targetCode;
}
public void setAssetId(Long assetId)
{
this.assetId = assetId;
}
public Long getAssetId()
{
return assetId;
}
public void setValOrginal(BigDecimal valOrginal)
{
this.valOrginal = valOrginal;
}
public BigDecimal getValOrginal()
{
return valOrginal;
}
public void setValAdjust(BigDecimal valAdjust)
{
this.valAdjust = valAdjust;
}
public BigDecimal getValAdjust()
{
return valAdjust;
}
public void setValResult(BigDecimal valResult)
{
this.valResult = valResult;
}
public BigDecimal getValResult()
{
return valResult;
}
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setDateAdjust(Date dateAdjust)
{
this.dateAdjust = dateAdjust;
}
public Date getDateAdjust()
{
return dateAdjust;
}
public void setHourAdjust(String hourAdjust)
{
this.hourAdjust = hourAdjust;
}
public String getHourAdjust()
{
return hourAdjust;
}
public void setDateAdjustStr(String dateAdjustStr)
{
this.dateAdjustStr = dateAdjustStr;
}
public String getDateAdjustStr()
{
return dateAdjustStr;
}
@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("billSerial", getBillSerial())
.append("biilType", getBiilType())
.append("targetCode", getTargetCode())
.append("assetId", getAssetId())
.append("valOrginal", getValOrginal())
.append("valAdjust", getValAdjust())
.append("valResult", getValResult())
.append("id", getId())
.append("dateAdjust", getDateAdjust())
.append("hourAdjust", getHourAdjust())
.append("dateAdjustStr", getDateAdjustStr())
.toString();
}
} }

783
lzbi-module/src/main/java/com/lzbi/bi/domain/DcBusiTargetDraft.java

@ -1,156 +1,729 @@
package com.lzbi.bi.domain; package com.lzbi.bi.domain;
import io.swagger.annotations.ApiModel; import java.math.BigDecimal;
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 java.util.Date;
import lombok.AllArgsConstructor; import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data; import org.apache.commons.lang3.builder.ToStringBuilder;
import lombok.NoArgsConstructor; import org.apache.commons.lang3.builder.ToStringStyle;
import lombok.experimental.Accessors; import com.lzbi.common.annotation.Excel;
import com.lzbi.module.base.BaseModuleEntity; import com.lzbi.common.core.domain.BaseEntity;
/** /**
* 指标数据底稿表; * 指标数据底稿对象 dc_busi_target_draft
* @author : zhousq *
* @date : 2023-11-16 * @author zhousq
* @date 2023-11-23
*/ */
@Data public class DcBusiTargetDraft extends BaseEntity
@NoArgsConstructor {
@AllArgsConstructor private static final long serialVersionUID = 1L;
@Accessors(chain = true)
@ApiModel(value = "指标数据底稿表",description = "") /** 租户号 */
@TableName("dc_busi_target_draft") @Excel(name = "租户号")
public class DcBusiTargetDraft extends BaseModuleEntity{ private String tenantId;
/** 乐观锁 */
@Excel(name = "乐观锁")
private Long REVISION;
/** 创建人 */
@Excel(name = "创建人")
private String createdBy;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createdTime;
/** 更新人 */
@Excel(name = "更新人")
private String updatedBy;
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date updatedTime;
/** 删除人 */
@Excel(name = "删除人")
private String deleteBy;
/** 删除时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "删除时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date deleteTime;
/** 主键 */ /** 主键 */
@ApiModelProperty(name = "主键",notes = "") private Long id;
@TableId
private long id;
/** 指标主键 */ /** 指标主键 */
@ApiModelProperty(name = "指标主键",notes = "") @Excel(name = "指标主键")
private Integer targetId ; private Long targetId;
/** 指标编码 */ /** 指标编码 */
@ApiModelProperty(name = "指标编码",notes = "") @Excel(name = "指标编码")
private String targetCode ; private String targetCode;
/** 年份 */ /** 年份 */
@ApiModelProperty(name = "年份",notes = "") @Excel(name = "年份")
private String countYear ; private String countYear;
/** 月份 */ /** 月份 */
@ApiModelProperty(name = "月份",notes = "") @Excel(name = "月份")
private String countMonth ; private String countMonth;
/** 日 */ /** 日 */
@ApiModelProperty(name = "日",notes = "") @Excel(name = "日")
private String countDay ; private String countDay;
/** 1时;[00:00:00,00:59:59] */ /** 1时;[00:00:00,00:59:59] */
@ApiModelProperty(name = "1时",notes = "[00:00:00,00:59:59]") @Excel(name = "1时;[00:00:00,00:59:59]")
private Double val01 ; private BigDecimal val01;
/** 2时;[01:00:00,01:59:59] */ /** 2时;[01:00:00,01:59:59] */
@ApiModelProperty(name = "2时",notes = "[01:00:00,01:59:59]") @Excel(name = "2时;[01:00:00,01:59:59]")
private Double val02 ; private BigDecimal val02;
/** 3时;[02:00:00,02:59:59] */ /** 3时;[02:00:00,02:59:59] */
@ApiModelProperty(name = "3时",notes = "[02:00:00,02:59:59]") @Excel(name = "3时;[02:00:00,02:59:59]")
private Double val03 ; private BigDecimal val03;
/** 4时 */ /** 4时 */
@ApiModelProperty(name = "4时",notes = "") @Excel(name = "4时")
private Double val04 ; private BigDecimal val04;
/** 5时 */ /** 5时 */
@ApiModelProperty(name = "5时",notes = "") @Excel(name = "5时")
private Double val05 ; private BigDecimal val05;
/** 6时 */ /** 6时 */
@ApiModelProperty(name = "6时",notes = "") @Excel(name = "6时")
private Double val06 ; private BigDecimal val06;
/** 7时 */ /** 7时 */
@ApiModelProperty(name = "7时",notes = "") @Excel(name = "7时")
private Double val07 ; private BigDecimal val07;
/** 8时 */ /** 8时 */
@ApiModelProperty(name = "8时",notes = "") @Excel(name = "8时")
private Double val08 ; private BigDecimal val08;
/** 9时 */ /** 9时 */
@ApiModelProperty(name = "9时",notes = "") @Excel(name = "9时")
private Double val09 ; private BigDecimal val09;
/** 10时 */ /** 10时 */
@ApiModelProperty(name = "10时",notes = "") @Excel(name = "10时")
private Double val10 ; private BigDecimal val10;
/** 11时 */ /** 11时 */
@ApiModelProperty(name = "11时",notes = "") @Excel(name = "11时")
private Double val11 ; private BigDecimal val11;
/** 12时 */ /** 12时 */
@ApiModelProperty(name = "12时",notes = "") @Excel(name = "12时")
private Double val12 ; private BigDecimal val12;
/** 13时 */ /** 13时 */
@ApiModelProperty(name = "13时",notes = "") @Excel(name = "13时")
private Double val13 ; private BigDecimal val13;
/** 14时 */ /** 14时 */
@ApiModelProperty(name = "14时",notes = "") @Excel(name = "14时")
private Double val14 ; private BigDecimal val14;
/** 15时 */ /** 15时 */
@ApiModelProperty(name = "15时",notes = "") @Excel(name = "15时")
private Double val15 ; private BigDecimal val15;
/** 16时 */ /** 16时 */
@ApiModelProperty(name = "16时",notes = "") @Excel(name = "16时")
private Double val16 ; private BigDecimal val16;
/** 17时 */ /** 17时 */
@ApiModelProperty(name = "17时",notes = "") @Excel(name = "17时")
private Double val17 ; private BigDecimal val17;
/** 18时 */ /** 18时 */
@ApiModelProperty(name = "18时",notes = "") @Excel(name = "18时")
private Double val18 ; private BigDecimal val18;
/** 18时 */ /** 18时 */
@ApiModelProperty(name = "18时",notes = "") @Excel(name = "18时")
private Double val19 ; private BigDecimal val19;
/** 20时 */ /** 20时 */
@ApiModelProperty(name = "20时",notes = "") @Excel(name = "20时")
private Double val20 ; private BigDecimal val20;
/** 21时 */ /** 21时 */
@ApiModelProperty(name = "21时",notes = "") @Excel(name = "21时")
private Double val21 ; private BigDecimal val21;
/** 22时 */ /** 22时 */
@ApiModelProperty(name = "22时",notes = "") @Excel(name = "22时")
private Double val22 ; private BigDecimal val22;
/** 23时 */ /** 23时 */
@ApiModelProperty(name = "23时",notes = "") @Excel(name = "23时")
private Double val23 ; private BigDecimal val23;
/** 24时 */ /** 24时 */
@ApiModelProperty(name = "24时",notes = "") @Excel(name = "24时")
private Double val24 ; private BigDecimal val24;
/** 公司 */ /** 公司 */
@ApiModelProperty(name = "公司",notes = "") @Excel(name = "公司")
private String companyCode ; private String companyCode;
/** 公司名称 */ /** 公司名称 */
@ApiModelProperty(name = "公司名称",notes = "") @Excel(name = "公司名称")
private String companyName ; private String companyName;
/** 组织机构代码 */ /** 组织机构代码 */
@ApiModelProperty(name = "组织机构代码",notes = "") @Excel(name = "组织机构代码")
private String orgCode ; private String orgCode;
/** 组织机构名称 */ /** 组织机构名称 */
@ApiModelProperty(name = "组织机构名称",notes = "") @Excel(name = "组织机构名称")
private String orgName ; private String orgName;
/** 生产专业 */ /** 生产专业 */
@ApiModelProperty(name = "生产专业",notes = "") @Excel(name = "生产专业")
private String workType ; private String workType;
/** 统计单元名称 */ /** 统计单元名称 */
@ApiModelProperty(name = "统计单元名称",notes = "") @Excel(name = "统计单元名称")
private String countUnitName ; private String countUnitName;
/** 资产ID */ /** 资产ID */
@ApiModelProperty(name = "资产ID",notes = "") @Excel(name = "资产ID")
private Integer assetId ; private Long assetId;
/** 上线 */ /** 上线 */
@ApiModelProperty(name = "上线",notes = "") @Excel(name = "上线")
private Double valUpLimit ; private BigDecimal valUpLimit;
/** 下线 */ /** 下线 */
@ApiModelProperty(name = "下线",notes = "") @Excel(name = "下线")
private Double valDownLimit ; private BigDecimal valDownLimit;
/** 均值 */ /** 均值 */
@ApiModelProperty(name = "均值",notes = "") @Excel(name = "均值")
private Double valAvg ; private BigDecimal valAvg;
/** 合值 */ /** 合值 */
@ApiModelProperty(name = "合值",notes = "") @Excel(name = "合值")
private Double valTotal ; private BigDecimal valTotal;
/** 积算 */ /** 积算 */
@ApiModelProperty(name = "积算",notes = "") @Excel(name = "积算")
private Double valCompute ; private BigDecimal valCompute;
public void setTenantId(String tenantId)
{
this.tenantId = tenantId;
}
public String getTenantId()
{
return tenantId;
}
public void setREVISION(Long REVISION)
{
this.REVISION = REVISION;
}
public Long getREVISION()
{
return REVISION;
}
public void setCreatedBy(String createdBy)
{
this.createdBy = createdBy;
}
public String getCreatedBy()
{
return createdBy;
}
public void setCreatedTime(Date createdTime)
{
this.createdTime = createdTime;
}
public Date getCreatedTime()
{
return createdTime;
}
public void setUpdatedBy(String updatedBy)
{
this.updatedBy = updatedBy;
}
public String getUpdatedBy()
{
return updatedBy;
}
public void setUpdatedTime(Date updatedTime)
{
this.updatedTime = updatedTime;
}
public Date getUpdatedTime()
{
return updatedTime;
}
public void setDeleteBy(String deleteBy)
{
this.deleteBy = deleteBy;
}
public String getDeleteBy()
{
return deleteBy;
}
public void setDeleteTime(Date deleteTime)
{
this.deleteTime = deleteTime;
}
public Date getDeleteTime()
{
return deleteTime;
}
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setTargetId(Long targetId)
{
this.targetId = targetId;
}
public Long getTargetId()
{
return targetId;
}
public void setTargetCode(String targetCode)
{
this.targetCode = targetCode;
}
public String getTargetCode()
{
return targetCode;
}
public void setCountYear(String countYear)
{
this.countYear = countYear;
}
public String getCountYear()
{
return countYear;
}
public void setCountMonth(String countMonth)
{
this.countMonth = countMonth;
}
public String getCountMonth()
{
return countMonth;
}
public void setCountDay(String countDay)
{
this.countDay = countDay;
}
public String getCountDay()
{
return countDay;
}
public void setVal01(BigDecimal val01)
{
this.val01 = val01;
}
public BigDecimal getVal01()
{
return val01;
}
public void setVal02(BigDecimal val02)
{
this.val02 = val02;
}
public BigDecimal getVal02()
{
return val02;
}
public void setVal03(BigDecimal val03)
{
this.val03 = val03;
}
public BigDecimal getVal03()
{
return val03;
}
public void setVal04(BigDecimal val04)
{
this.val04 = val04;
}
public BigDecimal getVal04()
{
return val04;
}
public void setVal05(BigDecimal val05)
{
this.val05 = val05;
}
public BigDecimal getVal05()
{
return val05;
}
public void setVal06(BigDecimal val06)
{
this.val06 = val06;
}
public BigDecimal getVal06()
{
return val06;
}
public void setVal07(BigDecimal val07)
{
this.val07 = val07;
}
public BigDecimal getVal07()
{
return val07;
}
public void setVal08(BigDecimal val08)
{
this.val08 = val08;
}
public BigDecimal getVal08()
{
return val08;
}
public void setVal09(BigDecimal val09)
{
this.val09 = val09;
}
public BigDecimal getVal09()
{
return val09;
}
public void setVal10(BigDecimal val10)
{
this.val10 = val10;
}
public BigDecimal getVal10()
{
return val10;
}
public void setVal11(BigDecimal val11)
{
this.val11 = val11;
}
public BigDecimal getVal11()
{
return val11;
}
public void setVal12(BigDecimal val12)
{
this.val12 = val12;
}
public BigDecimal getVal12()
{
return val12;
}
public void setVal13(BigDecimal val13)
{
this.val13 = val13;
}
public BigDecimal getVal13()
{
return val13;
}
public void setVal14(BigDecimal val14)
{
this.val14 = val14;
}
public BigDecimal getVal14()
{
return val14;
}
public void setVal15(BigDecimal val15)
{
this.val15 = val15;
}
public BigDecimal getVal15()
{
return val15;
}
public void setVal16(BigDecimal val16)
{
this.val16 = val16;
}
public BigDecimal getVal16()
{
return val16;
}
public void setVal17(BigDecimal val17)
{
this.val17 = val17;
}
public BigDecimal getVal17()
{
return val17;
}
public void setVal18(BigDecimal val18)
{
this.val18 = val18;
}
public BigDecimal getVal18()
{
return val18;
}
public void setVal19(BigDecimal val19)
{
this.val19 = val19;
}
public BigDecimal getVal19()
{
return val19;
}
public void setVal20(BigDecimal val20)
{
this.val20 = val20;
}
public BigDecimal getVal20()
{
return val20;
}
public void setVal21(BigDecimal val21)
{
this.val21 = val21;
}
public BigDecimal getVal21()
{
return val21;
}
public void setVal22(BigDecimal val22)
{
this.val22 = val22;
}
public BigDecimal getVal22()
{
return val22;
}
public void setVal23(BigDecimal val23)
{
this.val23 = val23;
}
public BigDecimal getVal23()
{
return val23;
}
public void setVal24(BigDecimal val24)
{
this.val24 = val24;
}
public BigDecimal getVal24()
{
return val24;
}
public void setCompanyCode(String companyCode)
{
this.companyCode = companyCode;
}
public String getCompanyCode()
{
return companyCode;
}
public void setCompanyName(String companyName)
{
this.companyName = companyName;
}
public String getCompanyName()
{
return companyName;
}
public void setOrgCode(String orgCode)
{
this.orgCode = orgCode;
}
public String getOrgCode()
{
return orgCode;
}
public void setOrgName(String orgName)
{
this.orgName = orgName;
}
public String getOrgName()
{
return orgName;
}
public void setWorkType(String workType)
{
this.workType = workType;
}
public String getWorkType()
{
return workType;
}
public void setCountUnitName(String countUnitName)
{
this.countUnitName = countUnitName;
}
public String getCountUnitName()
{
return countUnitName;
}
public void setAssetId(Long assetId)
{
this.assetId = assetId;
}
public Long getAssetId()
{
return assetId;
}
public void setValUpLimit(BigDecimal valUpLimit)
{
this.valUpLimit = valUpLimit;
}
public BigDecimal getValUpLimit()
{
return valUpLimit;
}
public void setValDownLimit(BigDecimal valDownLimit)
{
this.valDownLimit = valDownLimit;
}
public BigDecimal getValDownLimit()
{
return valDownLimit;
}
public void setValAvg(BigDecimal valAvg)
{
this.valAvg = valAvg;
}
public BigDecimal getValAvg()
{
return valAvg;
}
public void setValTotal(BigDecimal valTotal)
{
this.valTotal = valTotal;
}
public BigDecimal getValTotal()
{
return valTotal;
}
public void setValCompute(BigDecimal valCompute)
{
this.valCompute = valCompute;
}
public BigDecimal getValCompute()
{
return valCompute;
}
@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("targetId", getTargetId())
.append("targetCode", getTargetCode())
.append("countYear", getCountYear())
.append("countMonth", getCountMonth())
.append("countDay", getCountDay())
.append("val01", getVal01())
.append("val02", getVal02())
.append("val03", getVal03())
.append("val04", getVal04())
.append("val05", getVal05())
.append("val06", getVal06())
.append("val07", getVal07())
.append("val08", getVal08())
.append("val09", getVal09())
.append("val10", getVal10())
.append("val11", getVal11())
.append("val12", getVal12())
.append("val13", getVal13())
.append("val14", getVal14())
.append("val15", getVal15())
.append("val16", getVal16())
.append("val17", getVal17())
.append("val18", getVal18())
.append("val19", getVal19())
.append("val20", getVal20())
.append("val21", getVal21())
.append("val22", getVal22())
.append("val23", getVal23())
.append("val24", getVal24())
.append("companyCode", getCompanyCode())
.append("companyName", getCompanyName())
.append("orgCode", getOrgCode())
.append("orgName", getOrgName())
.append("workType", getWorkType())
.append("countUnitName", getCountUnitName())
.append("assetId", getAssetId())
.append("valUpLimit", getValUpLimit())
.append("valDownLimit", getValDownLimit())
.append("valAvg", getValAvg())
.append("valTotal", getValTotal())
.append("valCompute", getValCompute())
.toString();
}
} }

64
lzbi-module/src/main/java/com/lzbi/bi/mapper/DcBusiTargetAdjustMapper.java

@ -1,17 +1,61 @@
package com.lzbi.bi.mapper; package com.lzbi.bi.mapper;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lzbi.bi.domain.DcBusiTargetAdjust;
import java.util.List; import java.util.List;
import com.lzbi.bi.domain.DcBusiTargetAdjust;
/** /**
* 资产指标调整单;(dc_busi_target_adjust)表数据库访问层 * 资产指标调整单Mapper接口
* @author : zhousq *
* @date : 2023-11-16 * @author zhousq
* @date 2023-11-23
*/ */
@InterceptorIgnore(tenantLine = "true") public interface DcBusiTargetAdjustMapper
public interface DcBusiTargetAdjustMapper extends BaseMapper<DcBusiTargetAdjust>{ {
List<DcBusiTargetAdjust> selectByVo( DcBusiTargetAdjust beanVo); /**
int insertByVo( DcBusiTargetAdjust beanVo); * 查询资产指标调整单
*
* @param id 资产指标调整单主键
* @return 资产指标调整单
*/
public DcBusiTargetAdjust selectDcBusiTargetAdjustById(Long id);
/**
* 查询资产指标调整单列表
*
* @param dcBusiTargetAdjust 资产指标调整单
* @return 资产指标调整单集合
*/
public List<DcBusiTargetAdjust> selectDcBusiTargetAdjustList(DcBusiTargetAdjust dcBusiTargetAdjust);
/**
* 新增资产指标调整单
*
* @param dcBusiTargetAdjust 资产指标调整单
* @return 结果
*/
public int insertDcBusiTargetAdjust(DcBusiTargetAdjust dcBusiTargetAdjust);
/**
* 修改资产指标调整单
*
* @param dcBusiTargetAdjust 资产指标调整单
* @return 结果
*/
public int updateDcBusiTargetAdjust(DcBusiTargetAdjust dcBusiTargetAdjust);
/**
* 删除资产指标调整单
*
* @param id 资产指标调整单主键
* @return 结果
*/
public int deleteDcBusiTargetAdjustById(Long id);
/**
* 批量删除资产指标调整单
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteDcBusiTargetAdjustByIds(Long[] ids);
} }

64
lzbi-module/src/main/java/com/lzbi/bi/mapper/DcBusiTargetDraftMapper.java

@ -1,17 +1,61 @@
package com.lzbi.bi.mapper; package com.lzbi.bi.mapper;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lzbi.bi.domain.DcBusiTargetDraft;
import java.util.List; import java.util.List;
import com.lzbi.bi.domain.DcBusiTargetDraft;
/** /**
* 指标数据底稿表;(dc_busi_target_draft)表数据库访问层 * 指标数据底稿Mapper接口
* @author : zhousq *
* @date : 2023-11-16 * @author zhousq
* @date 2023-11-23
*/ */
@InterceptorIgnore(tenantLine = "true") public interface DcBusiTargetDraftMapper
public interface DcBusiTargetDraftMapper extends BaseMapper<DcBusiTargetDraft>{ {
List<DcBusiTargetDraft> selectByVo( DcBusiTargetDraft beanVo); /**
int insertByVo( DcBusiTargetDraft beanVo); * 查询指标数据底稿
*
* @param id 指标数据底稿主键
* @return 指标数据底稿
*/
public DcBusiTargetDraft selectDcBusiTargetDraftById(Long id);
/**
* 查询指标数据底稿列表
*
* @param dcBusiTargetDraft 指标数据底稿
* @return 指标数据底稿集合
*/
public List<DcBusiTargetDraft> selectDcBusiTargetDraftList(DcBusiTargetDraft dcBusiTargetDraft);
/**
* 新增指标数据底稿
*
* @param dcBusiTargetDraft 指标数据底稿
* @return 结果
*/
public int insertDcBusiTargetDraft(DcBusiTargetDraft dcBusiTargetDraft);
/**
* 修改指标数据底稿
*
* @param dcBusiTargetDraft 指标数据底稿
* @return 结果
*/
public int updateDcBusiTargetDraft(DcBusiTargetDraft dcBusiTargetDraft);
/**
* 删除指标数据底稿
*
* @param id 指标数据底稿主键
* @return 结果
*/
public int deleteDcBusiTargetDraftById(Long id);
/**
* 批量删除指标数据底稿
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteDcBusiTargetDraftByIds(Long[] ids);
} }

2
lzbi-module/src/main/resources/mapper/DcBusiTargetAdjustMapper.xml

@ -64,7 +64,7 @@
id, id,
date_adjust, date_adjust,
hour_adjust, hour_adjust,
date_adjust_str, date_adjust_str
from dc_busi_target_adjust from dc_busi_target_adjust
</sql> </sql>
<select id="selectByVo" resultMap="rmDcBusiTargetAdjust" parameterType="com.lzbi.bi.domain.DcBusiTargetAdjust"> <select id="selectByVo" resultMap="rmDcBusiTargetAdjust" parameterType="com.lzbi.bi.domain.DcBusiTargetAdjust">

Loading…
Cancel
Save