Browse Source

Merge remote-tracking branch 'origin/develop' into develop

develop
bobol 9 months ago
parent
commit
e6392f6b02
  1. 6
      lzbi-generator/src/main/resources/vm/java/domain.java.vm
  2. 3
      lzbi-generator/src/main/resources/vm/java/service.java.vm
  3. 684
      lzbi-generator/src/main/resources/vm/vue/index.vue_ruoyi.vm
  4. 1
      lzbi-module/src/main/java/com/lzbi/asset/domain/DcBaseAssetInfo.java
  5. 18
      lzbi-module/src/main/java/com/lzbi/bill/service/DcBusiPlanTargetMonthService.java
  6. 2
      lzbi-module/src/main/java/com/lzbi/code/mapper/DcBaseCoderuleDefineMapper.java
  7. 10
      lzbi-module/src/main/java/com/lzbi/code/service/DcBaseCoderuleDefineService.java
  8. 21
      lzbi-module/src/main/java/com/lzbi/common/SelectOptionsControl.java
  9. 48
      lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiParamCollectBill.java
  10. 131
      lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetBillMasterController.java
  11. 274
      lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetCollectBill.java
  12. 32
      lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiBillModelMaster.java
  13. 1
      lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamBillMaster.java
  14. 100
      lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetBillMaster.java
  15. 95
      lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetBillSub.java
  16. 21
      lzbi-module/src/main/java/com/lzbi/draft/domain/DeptQueryParams.java
  17. 90
      lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetBillMasterMapper.java
  18. 8
      lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustDaySubService.java
  19. 133
      lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetBillMasterService.java
  20. 1
      lzbi-module/src/main/java/com/lzbi/module/base/BaseModuleEntity.java
  21. 93
      lzbi-module/src/main/java/com/lzbi/targetFolder/controller/DcBaseAssetTargetController.java
  22. 15
      lzbi-module/src/main/java/com/lzbi/targetFolder/controller/DcBaseTargetModelController.java
  23. 60
      lzbi-module/src/main/java/com/lzbi/targetFolder/domain/DcBaseAssetTarget.java
  24. 23
      lzbi-module/src/main/java/com/lzbi/targetFolder/mapper/DcBaseAssetTargetMapper.java
  25. 38
      lzbi-module/src/main/java/com/lzbi/targetFolder/service/DcBaseAssetTargetService.java
  26. 137
      lzbi-module/src/main/resources/mapper/asset/DcBaseAssetInfoMapper.xml
  27. 14
      lzbi-module/src/main/resources/mapper/asset/DcBaseCoderuleDefineMapper.xml
  28. 9
      lzbi-module/src/main/resources/mapper/draft/DcBusiBillModelMasterMapper.xml
  29. 181
      lzbi-module/src/main/resources/mapper/draft/DcBusiTargetBillMasterMapper.xml
  30. 55
      lzbi-module/src/main/resources/mapper/targetFolder/DcBaseAssetTargetMapper.xml

6
lzbi-generator/src/main/resources/vm/java/domain.java.vm

@ -6,6 +6,8 @@ import ${import};
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import lombok.Data;
import io.swagger.annotations.ApiModelProperty;
import lombok.experimental.Accessors;
import com.lzbi.common.annotation.Excel;
#if($table.crud || $table.sub)
import com.lzbi.module.base.BaseModuleEntity;
@ -25,6 +27,7 @@ import com.lzbi.common.core.domain.TreeEntity;
#set($Entity="TreeEntity")
#end
@Data
@Accessors(chain = true)
public class ${ClassName} extends ${Entity}
{
private static final long serialVersionUID = 1L;
@ -41,11 +44,14 @@ public class ${ClassName} extends ${Entity}
#end
#if($parentheseIndex != -1)
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
@ApiModelProperty(name = "${comment}",notes = "")
#elseif($column.javaType == 'Date')
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "${comment}", width = 30, dateFormat = "yyyy-MM-dd")
@ApiModelProperty(name = "${comment}",notes = "")
#else
@Excel(name = "${comment}")
@ApiModelProperty(name = "${comment}",notes = "$column.javaField")
#end
#end
private $column.javaType $column.javaField;

3
lzbi-generator/src/main/resources/vm/java/service.java.vm

@ -11,6 +11,7 @@ import org.springframework.stereotype.Service;
#if($table.sub)
import java.util.ArrayList;
import com.lzbi.common.utils.DateUtils;
import com.lzbi.common.utils.StringUtils
import org.springframework.transaction.annotation.Transactional;
import ${packageName}.domain.${subClassName};
#end
@ -156,7 +157,7 @@ public class ${ClassName}Service extends ServiceImpl<${ClassName}Mapper, ${Class
}
if (list.size() > 0)
{
baseMapper.batch${subClassName}list);
baseMapper.batch${subClassName}(list);
}
}
}

684
lzbi-generator/src/main/resources/vm/vue/index.vue_ruoyi.vm

@ -0,0 +1,684 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" class="my-custom-form">
<el-row>
#foreach($column in $columns)
#if($column.query)
#set($dictType=$column.dictType)
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
#set($parentheseIndex=$column.columnComment.indexOf("("))
#if($parentheseIndex != -1)
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
#else
#set($comment=$column.columnComment)
#end
#if($column.htmlType == "input")
<el-col :span="4">
<el-form-item label="${comment}" prop="${column.javaField}" label-width="auto">
<el-input
v-model="queryParams.${column.javaField}"
placeholder="请输入${comment}"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
</el-col>
#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && $dictType)
<el-col :span="4">
<el-form-item label="${comment}" prop="${column.javaField}" label-width="auto">
<el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable>
<el-option
v-for="dict in ${dictType}"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && !$dictType)
<el-col :span="4">
<el-form-item label="${comment}" prop="${column.javaField}" label-width="auto">
<el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable>
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item>
</el-col>
#elseif($column.htmlType == "datetime" && $column.queryType != "BETWEEN")
<el-col :span="4">
<el-form-item label="${comment}" prop="${column.javaField}" label-width="auto">
<el-date-picker clearable
v-model="queryParams.${column.javaField}"
type="date"
value-format="YYYY-MM-DD"
placeholder="请选择${comment}">
</el-date-picker>
</el-form-item>
</el-col>
#elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
<el-col :span="4">
<el-form-item label="${comment}" style="width: 308px" label-width="auto">
<el-date-picker
v-model="daterange${AttrName}"
value-format="YYYY-MM-DD"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
</el-col>
#end
#end
#end
<el-form-item class="childTextAlignLeft">
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-row>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="Plus"
@click="handleAdd"
v-hasPermi="['${moduleName}:${businessName}:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="Edit"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['${moduleName}:${businessName}:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="Delete"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['${moduleName}:${businessName}:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
@click="handleExport"
v-hasPermi="['${moduleName}:${businessName}:export']"
>导出</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="${businessName}List" @selection-change="handleSelectionChange" :max-height="tableHeight" :border="true" :column-width-draggable="true">
<el-table-column type="selection" width="55" align="center" fixed="left"/>
#foreach($column in $columns)
#set($javaField=$column.javaField)
#set($parentheseIndex=$column.columnComment.indexOf("("))
#if($parentheseIndex != -1)
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
#else
#set($comment=$column.columnComment)
#end
#if($column.pk)
<el-table-column label="${comment}" align="center" :width="120" prop="${javaField}" />
#elseif($column.list && $column.htmlType == "datetime")
<el-table-column label="${comment}" align="center" :width="120" prop="${javaField}" width="180">
<template #default="scope">
<span>{{ parseTime(scope.row.${javaField}, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
#elseif($column.list && $column.htmlType == "imageUpload")
<el-table-column label="${comment}" align="center" :width="120" prop="${javaField}" width="100">
<template #default="scope">
<image-preview :src="scope.row.${javaField}" :width="50" :height="50"/>
</template>
</el-table-column>
#elseif($column.list && "" != $column.dictType)
<el-table-column label="${comment}" align="center" :width="120" prop="${javaField}">
<template #default="scope">
#if($column.htmlType == "checkbox")
<dict-tag :options="${column.dictType}" :value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/>
#else
<dict-tag :options="${column.dictType}" :value="scope.row.${javaField}"/>
#end
</template>
</el-table-column>
#elseif($column.list && "" != $javaField)
<el-table-column label="${comment}" align="center" :width="120" prop="${javaField}" />
#end
#end
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" :width="200" :fixed="fixedColumns?'right':false">
<template #header>
<div class="fixed-column-header" style="text-align: center;display: block;" @dblclick="toggleFixedColumns">
<span style="text-align: center;display: block;">操作<img style="width:10px;margin-left:5px" v-show="fixedColumns" :src="lock" alt="Image"/></span>
</div>
</template>
<template #default="scope">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${moduleName}:${businessName}:edit']">修改</el-button>
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${moduleName}:${businessName}:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改${functionName}对话框 -->
<el-dialog :title="title" v-model="open" width="60%" append-to-body :close-on-click-modal="true">
<el-form ref="${businessName}Ref" :model="form" :rules="rules" label-width="120px" class="my-custom-form">
<el-row>
#foreach($column in $columns)
#set($field=$column.javaField)
#if($column.insert && !$column.pk)
#if(($column.usableColumn) || (!$column.superColumn))
#set($parentheseIndex=$column.columnComment.indexOf("("))
#if($parentheseIndex != -1)
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
#else
#set($comment=$column.columnComment)
#end
#set($dictType=$column.dictType)
#if($column.htmlType == "input")
<el-col :span="12">
<el-form-item label="${comment}" prop="${field}">
<el-input v-model="form.${field}" placeholder="请输入${comment}" />
</el-form-item>
</el-col>
#elseif($column.htmlType == "imageUpload")
<el-col :span="12">
<el-form-item label="${comment}" prop="${field}">
<image-upload v-model="form.${field}"/>
</el-form-item>
</el-col>
#elseif($column.htmlType == "fileUpload")
<el-col :span="12">
<el-form-item label="${comment}" prop="${field}">
<file-upload v-model="form.${field}"/>
</el-form-item>
</el-col>
#elseif($column.htmlType == "editor")
<el-col :span="12">
<el-form-item label="${comment}">
<editor v-model="form.${field}" :min-height="192"/>
</el-form-item>
</el-col>
#elseif($column.htmlType == "select" && $dictType)
<el-col :span="12">
<el-form-item label="${comment}" prop="${field}">
<el-select v-model="form.${field}" placeholder="请选择${comment}">
<el-option
v-for="dict in ${dictType}"
:key="dict.value"
:label="dict.label"
#if($column.javaType == "Integer" || $column.javaType == "Long")
:value="parseInt(dict.value)"
#else
:value="dict.value"
#end
></el-option>
</el-select>
</el-form-item>
</el-col>
#elseif($column.htmlType == "select" && !$dictType)
<el-col :span="12">
<el-form-item label="${comment}" prop="${field}">
<el-select v-model="form.${field}" placeholder="请选择${comment}">
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item>
</el-col>
#elseif($column.htmlType == "checkbox" && "" != $dictType)
<el-col :span="12">
<el-form-item label="${comment}" prop="${field}">
<el-checkbox-group v-model="form.${field}">
<el-checkbox
v-for="dict in ${dictType}"
:key="dict.value"
:label="dict.value">
{{dict.label}}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
#elseif($column.htmlType == "checkbox" && $dictType)
<el-col :span="12">
<el-form-item label="${comment}" prop="${field}">
<el-checkbox-group v-model="form.${field}">
<el-checkbox>请选择字典生成</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
#elseif($column.htmlType == "radio" && "" != $dictType)
<el-col :span="12">
<el-form-item label="${comment}" prop="${field}">
<el-radio-group v-model="form.${field}">
<el-radio
v-for="dict in ${dictType}"
:key="dict.value"
#if($column.javaType == "Integer" || $column.javaType == "Long")
:label="parseInt(dict.value)"
#else
:label="dict.value"
#end
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
#elseif($column.htmlType == "radio" && $dictType)
<el-col :span="12">
<el-form-item label="${comment}" prop="${field}">
<el-radio-group v-model="form.${field}">
<el-radio label="1">请选择字典生成</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
#elseif($column.htmlType == "datetime")
<el-col :span="12">
<el-form-item label="${comment}" prop="${field}">
<el-date-picker clearable
v-model="form.${field}"
type="date"
value-format="YYYY-MM-DD"
placeholder="请选择${comment}">
</el-date-picker>
</el-form-item>
</el-col>
#elseif($column.htmlType == "textarea")
<el-col :span="12">
<el-form-item label="${comment}" prop="${field}">
<el-input v-model="form.${field}" type="textarea" placeholder="请输入内容" />
</el-form-item>
</el-col>
#end
#end
#end
#end
#if($table.sub)
<el-divider content-position="center">${subTable.functionName}信息</el-divider>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" icon="Plus" @click="handleAdd${subClassName}">添加</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" icon="Delete" @click="handleDelete${subClassName}">删除</el-button>
</el-col>
</el-row>
<el-table :data="${subclassName}List" :row-class-name="row${subClassName}Index" @selection-change="handle${subClassName}SelectionChange" ref="${subclassName}">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="序号" align="center" prop="index" width="50"/>
#foreach($column in $subTable.columns)
#set($javaField=$column.javaField)
#set($parentheseIndex=$column.columnComment.indexOf("("))
#if($parentheseIndex != -1)
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
#else
#set($comment=$column.columnComment)
#end
#if($column.pk || $javaField == ${subTableFkclassName})
#elseif($column.list && $column.htmlType == "input")
<el-table-column label="$comment" prop="${javaField}" width="150">
<template #default="scope">
<el-input v-model="scope.row.$javaField" placeholder="请输入$comment" />
</template>
</el-table-column>
#elseif($column.list && $column.htmlType == "datetime")
<el-table-column label="$comment" prop="${javaField}" width="240">
<template #default="scope">
<el-date-picker clearable
v-model="scope.row.$javaField"
type="date"
value-format="YYYY-MM-DD"
placeholder="请选择$comment">
</el-date-picker>
</template>
</el-table-column>
#elseif($column.list && ($column.htmlType == "select" || $column.htmlType == "radio") && "" != $column.dictType)
<el-table-column label="$comment" prop="${javaField}" width="150">
<template #default="scope">
<el-select v-model="scope.row.$javaField" placeholder="请选择$comment">
<el-option
v-for="dict in $column.dictType"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</template>
</el-table-column>
#elseif($column.list && ($column.htmlType == "select" || $column.htmlType == "radio") && "" == $column.dictType)
<el-table-column label="$comment" prop="${javaField}" width="150">
<template #default="scope">
<el-select v-model="scope.row.$javaField" placeholder="请选择$comment">
<el-option label="请选择字典生成" value="" />
</el-select>
</template>
</el-table-column>
#end
#end
</el-table>
#end
</el-row>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<style lang="scss" >
@import "@/assets/styles/self-defined.scss";
</style>
<script setup name="${BusinessName}">
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}";
import lock from "@/assets/icons/svg/lock.svg";
const { proxy } = getCurrentInstance();
#if(${dicts} != '')
#set($dictsNoSymbol=$dicts.replace("'", ""))
const { ${dictsNoSymbol} } = proxy.useDict(${dicts});
#end
const ${businessName}List = ref([]);
#if($table.sub)
const ${subclassName}List = ref([]);
#end
const open = ref(false);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref([]);
#if($table.sub)
const checked${subClassName} = ref([]);
#end
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const title = ref("");
const tableHeight = ref("0px");
const collapseVisible = ref(false);
const fixedColumns = ref(false);
#foreach ($column in $columns)
#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
const daterange${AttrName} = ref([]);
#end
#end
const data = reactive({
form: {},
queryParams: {
pageNum: 1,
pageSize: 10,
#foreach ($column in $columns)
#if($column.query)
$column.javaField: null#if($foreach.count != $columns.size()),#end
#end
#end
},
rules: {
#foreach ($column in $columns)
#if($column.required)
#set($parentheseIndex=$column.columnComment.indexOf("("))
#if($parentheseIndex != -1)
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
#else
#set($comment=$column.columnComment)
#end
$column.javaField: [
{ required: true, message: "$comment不能为空", trigger: #if($column.htmlType == "select" || $column.htmlType == "radio")"change"#else"blur"#end }
]#if($foreach.count != $columns.size()),#end
#end
#end
}
});
const { queryParams, form, rules } = toRefs(data);
/** 查询${functionName}列表 */
function getList() {
loading.value = true;
#foreach ($column in $columns)
#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
queryParams.value.params = {};
#break
#end
#end
#foreach ($column in $columns)
#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
if (null != daterange${AttrName} && '' != daterange${AttrName}) {
queryParams.value.params["begin${AttrName}"] = daterange${AttrName}.value[0];
queryParams.value.params["end${AttrName}"] = daterange${AttrName}.value[1];
}
#end
#end
list${BusinessName}(queryParams.value).then(response => {
${businessName}List.value = response.rows;
total.value = response.total;
loading.value = false;
});
}
// 取消按钮
function cancel() {
open.value = false;
reset();
}
// 表单重置
function reset() {
form.value = {
#foreach ($column in $columns)
#if($column.htmlType == "checkbox")
$column.javaField: []#if($foreach.count != $columns.size()),#end
#else
$column.javaField: null#if($foreach.count != $columns.size()),#end
#end
#end
};
#if($table.sub)
${subclassName}List.value = [];
#end
proxy.resetForm("${businessName}Ref");
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNum = 1;
getList();
}
/** 重置按钮操作 */
function resetQuery() {
#foreach ($column in $columns)
#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
daterange${AttrName}.value = [];
#end
#end
proxy.resetForm("queryRef");
handleQuery();
}
// 多选框选中数据
function handleSelectionChange(selection) {
ids.value = selection.map(item => item.${pkColumn.javaField});
single.value = selection.length != 1;
multiple.value = !selection.length;
}
/** 新增按钮操作 */
function handleAdd() {
reset();
open.value = true;
title.value = "添加${functionName}";
}
/** 修改按钮操作 */
function handleUpdate(row) {
reset();
const _${pkColumn.javaField} = row.${pkColumn.javaField} || ids.value
get${BusinessName}(_${pkColumn.javaField}).then(response => {
form.value = response.data;
#foreach ($column in $columns)
#if($column.htmlType == "checkbox")
form.value.$column.javaField = form.value.${column.javaField}.split(",");
#end
#end
#if($table.sub)
${subclassName}List.value = response.data.${subclassName}List;
#end
open.value = true;
title.value = "修改${functionName}";
});
}
/** 提交按钮 */
function submitForm() {
proxy.#[[$]]#refs["${businessName}Ref"].validate(valid => {
if (valid) {
#foreach ($column in $columns)
#if($column.htmlType == "checkbox")
form.value.$column.javaField = form.value.${column.javaField}.join(",");
#end
#end
#if($table.sub)
form.value.${subclassName}List = ${subclassName}List.value;
#end
if (form.value.${pkColumn.javaField} != null) {
update${BusinessName}(form.value).then(response => {
proxy.#[[$modal]]#.msgSuccess("修改成功");
open.value = false;
getList();
});
} else {
add${BusinessName}(form.value).then(response => {
proxy.#[[$modal]]#.msgSuccess("新增成功");
open.value = false;
getList();
});
}
}
});
}
/** 删除按钮操作 */
function handleDelete(row) {
const _${pkColumn.javaField}s = row.${pkColumn.javaField} || ids.value;
proxy.#[[$modal]]#.confirm('是否确认删除${functionName}编号为"' + _${pkColumn.javaField}s + '"的数据项?').then(function() {
return del${BusinessName}(_${pkColumn.javaField}s);
}).then(() => {
getList();
proxy.#[[$modal]]#.msgSuccess("删除成功");
}).catch(() => {});
}
#if($table.sub)
/** ${subTable.functionName}序号 */
function row${subClassName}Index({ row, rowIndex }) {
row.index = rowIndex + 1;
}
/** ${subTable.functionName}添加按钮操作 */
function handleAdd${subClassName}() {
let obj = {};
#foreach($column in $subTable.columns)
#if($column.pk || $column.javaField == ${subTableFkclassName})
#elseif($column.list && "" != $javaField)
obj.$column.javaField = "";
#end
#end
${subclassName}List.value.push(obj);
}
/** ${subTable.functionName}删除按钮操作 */
function handleDelete${subClassName}() {
if (checked${subClassName}.value.length == 0) {
proxy.#[[$modal]]#.msgError("请先选择要删除的${subTable.functionName}数据");
} else {
const ${subclassName}s = ${subclassName}List.value;
const checked${subClassName}s = checked${subClassName}.value;
${subclassName}List.value = ${subclassName}s.filter(function(item) {
return checked${subClassName}s.indexOf(item.index) == -1
});
}
}
/** 复选框选中数据 */
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`)
}
function toggleFixedColumns() {
fixedColumns.value = !fixedColumns.value;
}
onMounted(()=>{
calculateTableHeight();
window.addEventListener('resize', calculateTableHeight);
window.onresize = () => {
return (() => {
calculateTableHeight();
})()
}
})
onUnmounted(() => {
window.removeEventListener('resize', calculateTableHeight);
});
watch(
[collapseVisible,showSearch],
() => {
calculateTableHeight();
}
);
const calculateTableHeight = () => {
nextTick(() => {
const heightForm = proxy.$refs.queryRef?.$el.clientHeight || 0;
const windowHeight = window.innerHeight;
const paginationHeight = 60;
const tableHeaderHeight = 40;
const tableMargin = 20;
const remainingHeight = windowHeight - paginationHeight - tableHeaderHeight - tableMargin - heightForm - 100;
tableHeight.value = remainingHeight + 'px';
});
};
function toggleCollapse() {
collapseVisible.value = !collapseVisible.value;
if(collapseVisible.value){
editName.value = "折叠筛选项";
}else{
editName.value = "更多筛选项"
}
}
getList();
</script>

1
lzbi-module/src/main/java/com/lzbi/asset/domain/DcBaseAssetInfo.java

@ -13,7 +13,6 @@ import lombok.experimental.Accessors;
* @date 2023-11-27
*/
@Data
//@TableName("dc_base_work_special")
@Accessors(chain = true)
public class DcBaseAssetInfo extends BaseModuleEntity {
private static final long serialVersionUID = 1L;

18
lzbi-module/src/main/java/com/lzbi/bill/service/DcBusiPlanTargetMonthService.java

@ -9,7 +9,7 @@ import com.lzbi.common.utils.DateUtils;
import com.lzbi.special.domain.DcBaseWorkSpecial;
import com.lzbi.special.mapper.DcBaseWorkSpecialMapper;
import com.lzbi.system.service.impl.SysDeptServiceImpl;
import com.lzbi.targetFolder.domain.DcBaseAssetTargetDao;
import com.lzbi.targetFolder.domain.DcBaseAssetTarget;
import com.lzbi.targetFolder.mapper.DcBaseAssetTargetMapper;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -94,10 +94,10 @@ public class DcBusiPlanTargetMonthService extends ServiceImpl<DcBusiPlanTargetMo
if (ObjectUtils.isNotEmpty(dcBaseAssetInfo)) {
dcBusiPlanTargetMonth.setAssetName(dcBaseAssetInfo.getAssetName());
}
DcBaseAssetTargetDao dcBaseAssetTargetDao = dcBaseAssetTargetMapper.selectDcBaseAssetTargetDaoByTargetCodeAndAssetCode(dcBusiPlanTargetMonth.getTargetCode(), dcBusiPlanTargetMonth.getAssetCode());
if (ObjectUtils.isNotEmpty(dcBaseAssetTargetDao)) {
dcBusiPlanTargetMonth.setTargetNameDefine(dcBaseAssetTargetDao.getTargetName());
dcBusiPlanTargetMonth.setTargetNameAlias(dcBaseAssetTargetDao.getTargetNameAlias());
DcBaseAssetTarget dcBaseAssetTarget = dcBaseAssetTargetMapper.selectDcBaseAssetTargetByTargetCodeAndAssetCode(dcBusiPlanTargetMonth.getTargetCode(), dcBusiPlanTargetMonth.getAssetCode());
if (ObjectUtils.isNotEmpty(dcBaseAssetTarget)) {
dcBusiPlanTargetMonth.setTargetNameDefine(dcBaseAssetTarget.getTargetName());
dcBusiPlanTargetMonth.setTargetNameAlias(dcBaseAssetTarget.getTargetNameAlias());
}
dcBusiPlanTargetMonth.setCreatedTime(DateUtils.getNowDate());
@ -133,10 +133,10 @@ public class DcBusiPlanTargetMonthService extends ServiceImpl<DcBusiPlanTargetMo
if (ObjectUtils.isNotEmpty(dcBaseAssetInfo)) {
dcBusiPlanTargetMonth.setAssetName(dcBaseAssetInfo.getAssetName());
}
DcBaseAssetTargetDao dcBaseAssetTargetDao = dcBaseAssetTargetMapper.selectDcBaseAssetTargetDaoByTargetCodeAndAssetCode(dcBusiPlanTargetMonth.getTargetCode(), dcBusiPlanTargetMonth.getAssetCode());
if (ObjectUtils.isNotEmpty(dcBaseAssetTargetDao)) {
dcBusiPlanTargetMonth.setTargetNameDefine(dcBaseAssetTargetDao.getTargetName());
dcBusiPlanTargetMonth.setTargetNameAlias(dcBaseAssetTargetDao.getTargetNameAlias());
DcBaseAssetTarget dcBaseAssetTarget = dcBaseAssetTargetMapper.selectDcBaseAssetTargetByTargetCodeAndAssetCode(dcBusiPlanTargetMonth.getTargetCode(), dcBusiPlanTargetMonth.getAssetCode());
if (ObjectUtils.isNotEmpty(dcBaseAssetTarget)) {
dcBusiPlanTargetMonth.setTargetNameDefine(dcBaseAssetTarget.getTargetName());
dcBusiPlanTargetMonth.setTargetNameAlias(dcBaseAssetTarget.getTargetNameAlias());
}
dcBusiPlanTargetMonth.setUpdatedTime(DateUtils.getNowDate());
return baseMapper.updateDcBusiPlanTargetMonth(dcBusiPlanTargetMonth);

2
lzbi-module/src/main/java/com/lzbi/code/mapper/DcBaseCoderuleDefineMapper.java

@ -39,6 +39,7 @@ public interface DcBaseCoderuleDefineMapper extends BaseMapper<DcBaseCoderuleDef
*/
public int insertDcBaseCoderuleDefineDao(DcBaseCoderuleDefineDao dcBaseCoderuleDefineDao);
public int insertSerial(Long ruleId);
public int deleteSerialByRuleId(Long ruleId);
/**
* 修改编码规则定义
@ -63,6 +64,7 @@ public interface DcBaseCoderuleDefineMapper extends BaseMapper<DcBaseCoderuleDef
* @return 结果
*/
public int deleteDcBaseCoderuleDefineDaoByIds(Long[] ids);
public int deleteDcBaseCoderuleserialByIds(Long[] ids);
public DcBaseCoderuleSerialDao getSerialByRuleId(Long rid);
public int updateSerial(long revision ,long serial,long id);

10
lzbi-module/src/main/java/com/lzbi/code/service/DcBaseCoderuleDefineService.java

@ -15,6 +15,8 @@ import com.lzbi.code.domain.DcBaseCoderuleDefineDao;
import com.lzbi.code.mapper.DcBaseCoderuleDefineMapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Transactional;
/**
* 编码规则定义Service业务层处理
*
@ -53,7 +55,7 @@ public class DcBaseCoderuleDefineService extends ServiceImpl<DcBaseCoderuleDefin
* @param dcBaseCoderuleDefineDao 编码规则定义
* @return 结果
*/
@Transactional
public int insertDcBaseCoderuleDefineDao(DcBaseCoderuleDefineDao dcBaseCoderuleDefineDao)
{
dcBaseCoderuleDefineDao.setCreatedTime(DateUtils.getNowDate());
@ -84,10 +86,12 @@ public class DcBaseCoderuleDefineService extends ServiceImpl<DcBaseCoderuleDefin
* @param ids 需要删除的编码规则定义主键
* @return 结果
*/
@Transactional
public int deleteDcBaseCoderuleDefineDaoByIds(Long[] ids)
{
return baseMapper.deleteDcBaseCoderuleDefineDaoByIds(ids);
int ret =baseMapper.deleteDcBaseCoderuleDefineDaoByIds(ids);
baseMapper.deleteDcBaseCoderuleserialByIds(ids);;
return ret;
}
/**

21
lzbi-module/src/main/java/com/lzbi/common/SelectOptionsControl.java

@ -11,7 +11,7 @@ import com.lzbi.common.core.domain.entity.SysDept;
import com.lzbi.special.domain.DcBaseWorkSpecial;
import com.lzbi.special.service.DcBaseWorkSpecialService;
import com.lzbi.system.service.impl.SysDeptServiceImpl;
import com.lzbi.targetFolder.domain.DcBaseAssetTargetDao;
import com.lzbi.targetFolder.domain.DcBaseAssetTarget;
import com.lzbi.targetFolder.service.DcBaseAssetTargetService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
@ -114,21 +114,22 @@ public class SelectOptionsControl extends BaseController {
@PostMapping("/assetTaget/list")
public AjaxResult getAssetTargetSelectList(@RequestBody AssetQueryParams assetQueryParams)
{
DcBaseAssetTargetDao dcBaseAssetTargetDao=new DcBaseAssetTargetDao();
dcBaseAssetTargetDao.setAssetCode(assetQueryParams.getAssetCode());
dcBaseAssetTargetDao.setColumnType(null);
DcBaseAssetTarget dcBaseAssetTarget=new DcBaseAssetTarget();
dcBaseAssetTarget.setAssetCode(assetQueryParams.getAssetCode());
dcBaseAssetTarget.setTargetField(assetQueryParams.getFieldCode());
dcBaseAssetTarget.setColumnType("T");
//dcBaseAssetTargetDao.setAssetId(assetQueryParams.getAssetId());
return AjaxResult.success(dcBaseAssetTargetService.selectDcBaseAssetTargetDaoList(dcBaseAssetTargetDao));
return AjaxResult.success(dcBaseAssetTargetService.selectDcBaseAssetTargetList(dcBaseAssetTarget));
}
@PostMapping("/assetParam/list")
public AjaxResult getAssetParamSelectList(@RequestBody AssetQueryParams assetQueryParams)
{
DcBaseAssetTargetDao dcBaseAssetTargetDao=new DcBaseAssetTargetDao();
dcBaseAssetTargetDao.setAssetCode(assetQueryParams.getAssetCode());
dcBaseAssetTargetDao.setTargetField(assetQueryParams.getFieldCode());
dcBaseAssetTargetDao.setColumnType("P");
DcBaseAssetTarget dcBaseAssetTarget=new DcBaseAssetTarget();
dcBaseAssetTarget.setAssetCode(assetQueryParams.getAssetCode());
dcBaseAssetTarget.setTargetField(assetQueryParams.getFieldCode());
dcBaseAssetTarget.setColumnType("P");
//dcBaseAssetTargetDao.setAssetId(assetQueryParams.getAssetId());
return AjaxResult.success(dcBaseAssetTargetService.selectDcBaseAssetTargetDaoList(dcBaseAssetTargetDao));
return AjaxResult.success(dcBaseAssetTargetService.selectDcBaseAssetTargetList(dcBaseAssetTarget));
}
//
//获取IOT参数列表

48
lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiParamCollectBill.java

@ -17,10 +17,7 @@ import com.lzbi.common.enums.BusinessType;
import com.lzbi.common.utils.SecurityUtils;
import com.lzbi.common.utils.StringUtils;
import com.lzbi.common.utils.poi.ExcelUtil;
import com.lzbi.draft.domain.DcBusiBillModelMaster;
import com.lzbi.draft.domain.DcBusiBillModelSub;
import com.lzbi.draft.domain.DcBusiParamBillMaster;
import com.lzbi.draft.domain.DcBusiParamBillSub;
import com.lzbi.draft.domain.*;
import com.lzbi.draft.service.DcBusiBillModelMasterService;
import com.lzbi.draft.service.DcBusiParamBillMasterService;
import com.lzbi.system.service.ISysDeptService;
@ -85,12 +82,35 @@ public class DcBusiParamCollectBill extends BaseController
LoginUser loginUser = SecurityUtils.getLoginUser();
dcBusiBillModelMaster.setCreatedBy(loginUser.getUsername());
dcBusiBillModelMaster.setCompanyId(Optional.ofNullable(companyId).orElse(null));
dcBusiBillModelMaster.setModelType("P");
//dcBusiBillModelMaster.setDeptId(loginUser.getDeptId());
//dcBusiBillModelMaster.setRoleId(loginUser.getUser().getRoleId());
startPage();
List<DcBusiBillModelMaster> list = dcBusiBillModelMasterService.selectDcBusiBillModelMasterList(dcBusiBillModelMaster);
return getDataTable(list);
}
@GetMapping("/userModellist")
public TableDataInfo getUserModellist(DeptQueryParams deptQueryParams)
{ startPage();
List<DcBusiBillModelMaster> list;
if(StringUtils.isNotNull(deptQueryParams)){
DcBusiBillModelMaster dcBusiBillModelMaster=new DcBusiBillModelMaster();
LoginUser loginUser = SecurityUtils.getLoginUser();
dcBusiBillModelMaster.setCreatedBy(loginUser.getUsername());
dcBusiBillModelMaster.setModelType("P");
if(Optional.ofNullable(deptQueryParams.getOrgType()).orElse("").equals("1002")){
dcBusiBillModelMaster.setCompanyId(Optional.ofNullable(deptQueryParams.getDeptId()).orElse(0L));
}else{
dcBusiBillModelMaster.setOrgId(Optional.ofNullable(deptQueryParams.getDeptId()).orElse(0L));
}
list = dcBusiBillModelMasterService.selectDcBusiBillModelMasterList(dcBusiBillModelMaster);
}else{
list=new ArrayList<>();
}
return getDataTable(list);
}
@GetMapping("/userModelById/{mid}")
public AjaxResult getUserModelById(@PathVariable Long mid)
{
@ -141,6 +161,7 @@ public class DcBusiParamCollectBill extends BaseController
dcBusiBillModelMaster.setBillModelPoint(dcBusiParamBillMaster.getCountTimes());
dcBusiBillModelMaster.setRoleId(loginUser.getUser().getRoleId());
dcBusiBillModelMaster.setDeptId(loginUser.getDeptId());
dcBusiBillModelMaster.setModelType("P");
long deptId=dcBusiParamBillMaster.getCompanyId();
SysDept sysDept = Optional.ofNullable(sysDeptService.selectDeptById(deptId)).orElse(new SysDept()) ;
dcBusiBillModelMaster.setCompanyId(deptId);
@ -180,6 +201,16 @@ public class DcBusiParamCollectBill extends BaseController
@PostMapping("/saveBillCollectObj")
public AjaxResult saveBillCollectByObj(@RequestBody DcBusiParamBillMaster dcBusiParamBillMaster){
dcBusiParamBillMaster.setId(null);
dcBusiParamBillMaster.setCreatedBy(SecurityUtils.getLoginUser().getUsername());
dcBusiParamBillMaster.setCreatedTime(DateUtil.date());
long deptId=dcBusiParamBillMaster.getCompanyId();
SysDept sysDept = Optional.ofNullable(sysDeptService.selectDeptById(deptId)).orElse(new SysDept()) ;
dcBusiParamBillMaster.setCompanyId(deptId);
dcBusiParamBillMaster.setCompanyName(sysDept.getDeptName());
deptId=dcBusiParamBillMaster.getOragnizeId();
dcBusiParamBillMaster.setOragnizeId(deptId);
sysDept = Optional.ofNullable(sysDeptService.selectDeptById(deptId)).orElse(new SysDept()) ;
dcBusiParamBillMaster.setOrganizeName(sysDept.getDeptName());
return AjaxResult.success(dcBusiParamBillMasterService.insertDcBusiParamBillMasterDao(dcBusiParamBillMaster));
}
@ApiOperation("保存参数采集数据-subDatas数组方式")
@ -196,6 +227,15 @@ public class DcBusiParamCollectBill extends BaseController
String countDate=dcBusiParamBillMaster.getCountDate();
dcBusiParamBillMaster.setBillIncomeDate(countDate);
dcBusiParamBillMaster.setCreatedBy(SecurityUtils.getLoginUser().getUsername());
dcBusiParamBillMaster.setCreatedTime(DateUtil.date());
long deptId=dcBusiParamBillMaster.getCompanyId();
SysDept sysDept = Optional.ofNullable(sysDeptService.selectDeptById(deptId)).orElse(new SysDept()) ;
dcBusiParamBillMaster.setCompanyId(deptId);
dcBusiParamBillMaster.setCompanyName(sysDept.getDeptName());
deptId=dcBusiParamBillMaster.getOragnizeId();
dcBusiParamBillMaster.setOragnizeId(deptId);
sysDept = Optional.ofNullable(sysDeptService.selectDeptById(deptId)).orElse(new SysDept()) ;
dcBusiParamBillMaster.setOrganizeName(sysDept.getDeptName());
JSONArray jsonArray=Optional.ofNullable(JSONArray.from(dcBusiParamBillMaster.getSubDatas())).orElse(new JSONArray());
jsonArray.forEach(item->{
JSONObject jsb = JSONObject.from(item);

131
lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetBillMasterController.java

@ -0,0 +1,131 @@
package com.lzbi.draft.controller;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
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.core.controller.BaseController;
import com.lzbi.common.core.domain.AjaxResult;
import com.lzbi.common.enums.BusinessType;
import com.lzbi.draft.domain. DcBusiTargetBillMaster;
import com.lzbi.draft.service.DcBusiTargetBillMasterService;
import com.lzbi.common.utils.poi.ExcelUtil;
import com.lzbi.common.core.page.TableDataInfo;
/**
* 统计指标录入Controller
*
* @author zhousq
* @date 2023-12-14
*/
@RestController
@RequestMapping("/draft/targetBillMaster")
public class DcBusiTargetBillMasterController extends BaseController
{
@Autowired
private DcBusiTargetBillMasterService dcBusiTargetBillMasterService;
/**
* 查询统计指标录入列表
*/
@ApiOperation("查询统计指标录入列表")
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBusiTargetBillMaster", value = "", dataType = "DcBusiTargetBillMaster", dataTypeClass = DcBusiTargetBillMaster.class),
})
@PreAuthorize("@ss.hasPermi('draft:targetCollect:list')")
@GetMapping("/list")
public TableDataInfo list(DcBusiTargetBillMaster DcBusiTargetBillMaster)
{
startPage();
List< DcBusiTargetBillMaster> list = dcBusiTargetBillMasterService.selectDcBusiTargetBillMasterList(DcBusiTargetBillMaster);
return getDataTable(list);
}
/**
* 导出统计指标录入列表
*/
@ApiOperation("导出统计指标录入列表")
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBusiTargetBillMaster", value = "", dataType = "DcBusiTargetBillMaster", dataTypeClass = DcBusiTargetBillMaster.class),
})
@PreAuthorize("@ss.hasPermi('draft:targetCollect:export')")
@Log(title = "统计指标录入", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response,DcBusiTargetBillMaster DcBusiTargetBillMaster)
{
List<DcBusiTargetBillMaster> list = dcBusiTargetBillMasterService.selectDcBusiTargetBillMasterList(DcBusiTargetBillMaster);
ExcelUtil<DcBusiTargetBillMaster> util = new ExcelUtil<DcBusiTargetBillMaster>(DcBusiTargetBillMaster.class);
util.exportExcel(response, list, "统计指标录入数据");
}
/**
* 获取统计指标录入详细信息
*/
@ApiOperation("获取统计指标录入详细信息")
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "", dataType = "Long", dataTypeClass = Long.class),
})
@PreAuthorize("@ss.hasPermi('draft:targetCollect:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(dcBusiTargetBillMasterService.selectDcBusiTargetBillMasterById(id));
}
/**
* 新增统计指标录入
*/
@ApiOperation("新增统计指标录入")
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBusiTargetBillMaster", value = "", dataType = "DcBusiTargetBillMaster", dataTypeClass = DcBusiTargetBillMaster.class),
})
@PreAuthorize("@ss.hasPermi('draft:targetCollect:add')")
@Log(title = "统计指标录入", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DcBusiTargetBillMaster DcBusiTargetBillMaster)
{
return toAjax(dcBusiTargetBillMasterService.insertDcBusiTargetBillMaster(DcBusiTargetBillMaster));
}
/**
* 修改统计指标录入
*/
@ApiOperation("修改统计指标录入")
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBusiTargetBillMaster", value = "", dataType = "DcBusiTargetBillMaster", dataTypeClass = DcBusiTargetBillMaster.class),
})
@PreAuthorize("@ss.hasPermi('draft:targetCollect:edit')")
@Log(title = "统计指标录入", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DcBusiTargetBillMaster DcBusiTargetBillMaster)
{
return toAjax(dcBusiTargetBillMasterService.updateDcBusiTargetBillMaster(DcBusiTargetBillMaster));
}
/**
* 删除统计指标录入
*/
@ApiOperation("删除统计指标录入")
@ApiImplicitParams({
@ApiImplicitParam(name = "ids", value = "", dataType = "Long", dataTypeClass =Long.class),
})
@PreAuthorize("@ss.hasPermi('draft:targetCollect:remove')")
@Log(title = "统计指标录入", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(dcBusiTargetBillMasterService.deleteDcBusiTargetBillMasterByIds(ids));
}
}

274
lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetCollectBill.java

@ -0,0 +1,274 @@
package com.lzbi.draft.controller;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.lzbi.code.domain.DcBaseCoderuleDefineDao;
import com.lzbi.code.domain.DcBusiCoderuleConfigDao;
import com.lzbi.code.service.CodeNoGenerater;
import com.lzbi.code.service.DcBaseCoderuleDefineService;
import com.lzbi.common.core.controller.BaseController;
import com.lzbi.common.core.domain.AjaxResult;
import com.lzbi.common.core.domain.entity.SysDept;
import com.lzbi.common.core.domain.model.LoginUser;
import com.lzbi.common.core.page.TableDataInfo;
import com.lzbi.common.utils.SecurityUtils;
import com.lzbi.common.utils.StringUtils;
import com.lzbi.draft.domain.*;
import com.lzbi.draft.service.DcBusiBillModelMasterService;
import com.lzbi.draft.service.DcBusiTargetBillMasterService;
import com.lzbi.system.service.ISysDeptService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
/**
* 参数采集录入单据主Controller
*
* @author win
* @date 2023-11-28
*/
@RestController
@RequestMapping("/draft/targetCollect")
public class DcBusiTargetCollectBill extends BaseController
{
@Autowired
private DcBusiBillModelMasterService dcBusiBillModelMasterService;
@Autowired
private DcBusiTargetBillMasterService dcBusiTargetBillMasterService;
@Autowired
private DcBaseCoderuleDefineService dcBaseCoderuleDefineService;
@Autowired
private CodeNoGenerater codeNoGenerater;
@Autowired
private ISysDeptService sysDeptService;
/**
* 查询参数采集录入
* 根据
*/
// @PreAuthorize("@ss.hasPermi('param:paramData:list')")
@GetMapping("/list")
public TableDataInfo list(DcBusiTargetBillMaster dcBusiTargetBillMasterDao)
{
startPage();
//List<DcBusiTargetBillMaster> list = dcBusiTargetBillMasterService.selectDcBusiTargetBillMasterDaoList(dcBusiTargetBillMasterDao);
return getDataTable(null);
}
/**
* 根据根据公司查询模版现根据用户名进行过滤
* 根据
*/
@ApiOperation("根据根据公司查询模版,现根据用户名进行过滤")
@ApiImplicitParams({
@ApiImplicitParam(name = "companyId", value = "", dataType = "Long", dataTypeClass = Long.class),
})
//@PreAuthorize("@ss.hasPermi('param:paramData:list')")
@GetMapping("/userModellist/{companyId}")
public TableDataInfo getUserModellist(@PathVariable Long companyId)
{
DcBusiBillModelMaster dcBusiBillModelMaster=new DcBusiBillModelMaster();
LoginUser loginUser = SecurityUtils.getLoginUser();
dcBusiBillModelMaster.setCreatedBy(loginUser.getUsername());
dcBusiBillModelMaster.setCompanyId(Optional.ofNullable(companyId).orElse(null));
dcBusiBillModelMaster.setModelType("T");
//dcBusiBillModelMaster.setDeptId(loginUser.getDeptId());
//dcBusiBillModelMaster.setRoleId(loginUser.getUser().getRoleId());
startPage();
List<DcBusiBillModelMaster> list = dcBusiBillModelMasterService.selectDcBusiBillModelMasterList(dcBusiBillModelMaster);
return getDataTable(list);
}
@GetMapping("/userModellist")
public TableDataInfo getUserModellist(DeptQueryParams deptQueryParams)
{ startPage();
List<DcBusiBillModelMaster> list;
if(StringUtils.isNotNull(deptQueryParams)){
DcBusiBillModelMaster dcBusiBillModelMaster=new DcBusiBillModelMaster();
LoginUser loginUser = SecurityUtils.getLoginUser();
dcBusiBillModelMaster.setCreatedBy(loginUser.getUsername());
dcBusiBillModelMaster.setModelType("T");
if(Optional.ofNullable(deptQueryParams.getOrgType()).orElse("").equals("1002")){
dcBusiBillModelMaster.setCompanyId(Optional.ofNullable(deptQueryParams.getDeptId()).orElse(0L));
}else{
dcBusiBillModelMaster.setOrgId(Optional.ofNullable(deptQueryParams.getDeptId()).orElse(0L));
}
list = dcBusiBillModelMasterService.selectDcBusiBillModelMasterList(dcBusiBillModelMaster);
}else{
list=new ArrayList<>();
}
return getDataTable(list);
}
@GetMapping("/userModelById/{mid}")
public AjaxResult getUserModelById(@PathVariable Long mid)
{
DcBusiBillModelMaster dcBusiBillModelMaster = dcBusiBillModelMasterService.selectDcBusiBillModelMasterById(mid);
return AjaxResult.success(dcBusiBillModelMaster);
}
/**
* 根据根据公司查询模版现根据角色ID进行过滤
* 根据
*/
@ApiOperation("根据根据公司查询模版,现根据角色ID进行过滤")
@ApiImplicitParams({
@ApiImplicitParam(name = "companyId", value = "", dataType = "Long", dataTypeClass = Long.class),
})
//@PreAuthorize("@ss.hasPermi('param:paramData:list')")
@GetMapping("/roleModellist/{companyId}")
public TableDataInfo getRoleModellist(@PathVariable Long companyId)
{
DcBusiBillModelMaster dcBusiBillModelMaster=new DcBusiBillModelMaster();
LoginUser loginUser = SecurityUtils.getLoginUser();
dcBusiBillModelMaster.setCompanyId(Optional.ofNullable(companyId).orElse(null));
dcBusiBillModelMaster.setRoleId(loginUser.getUser().getRoleId());
dcBusiBillModelMaster.setModelType("T");
startPage();
List<DcBusiBillModelMaster> list = dcBusiBillModelMasterService.selectDcBusiBillModelMasterList(dcBusiBillModelMaster);
return getDataTable(list);
}
@ApiOperation("根据单据模版编号获取模版内容信息")
@ApiImplicitParams({
@ApiImplicitParam(name = "modelNo", value = "", dataType = "String", dataTypeClass = String.class),
})
@GetMapping("/getBillModelDetail/{modelNo}")
public AjaxResult getBillModelDetail(@PathVariable String modelNo){
List<DcBusiBillModelSub> list=new ArrayList<>();
return AjaxResult.success();
}
@ApiOperation("保存配置模版")
@ApiImplicitParams({
@ApiImplicitParam(name = "dcBusiTargetBillMaster", value = "", dataType = "DcBusiParamBillMaster", dataTypeClass = DcBusiTargetBillMaster.class),
})
@PostMapping("/saveBillModel")
public AjaxResult saveBillModel(@RequestBody DcBusiTargetBillMaster dcBusiParamBillMaster){
LoginUser loginUser = SecurityUtils.getLoginUser();
String billModelNo=Optional.ofNullable(getBillModelNo()).orElse(StringUtils.leftPad(String.valueOf(dcBusiParamBillMaster.getCompanyId()),4)+"#"+DateUtil.formatDateTime(DateUtil.date()));
DcBusiBillModelMaster dcBusiBillModelMaster=new DcBusiBillModelMaster();
dcBusiBillModelMaster.setCreatedTime(DateUtil.date());
dcBusiBillModelMaster.setCreatedBy(loginUser.getUsername());
dcBusiBillModelMaster.setBillModelPoint(dcBusiParamBillMaster.getCountTimes());
dcBusiBillModelMaster.setRoleId(loginUser.getUser().getRoleId());
dcBusiBillModelMaster.setDeptId(loginUser.getDeptId());
dcBusiBillModelMaster.setModelType("T");
long deptId=dcBusiParamBillMaster.getCompanyId();
SysDept sysDept = Optional.ofNullable(sysDeptService.selectDeptById(deptId)).orElse(new SysDept()) ;
dcBusiBillModelMaster.setCompanyId(deptId);
dcBusiBillModelMaster.setCompanyName(sysDept.getDeptName());
deptId=dcBusiParamBillMaster.getOragnizeId();
dcBusiBillModelMaster.setOrgId(deptId);
sysDept = Optional.ofNullable(sysDeptService.selectDeptById(deptId)).orElse(new SysDept()) ;
dcBusiBillModelMaster.setOrgName(sysDept.getDeptName());
dcBusiBillModelMaster.setDataState("0");
dcBusiBillModelMaster.setUseState("1");
dcBusiBillModelMaster.setFieldCode(dcBusiParamBillMaster.getFieldCode());
dcBusiBillModelMaster.setFieldName(dcBusiParamBillMaster.getFieldName());
dcBusiBillModelMaster.setBillModelNo(billModelNo);
dcBusiBillModelMaster.setBillModelName(dcBusiParamBillMaster.getBiilModelName());
List<DcBusiBillModelSub> dcBusiBillModelSubList=new ArrayList<>();
JSONArray jsonArray=Optional.ofNullable(JSONArray.from(dcBusiParamBillMaster.getSubDatas())).orElse(new JSONArray());
jsonArray.forEach(item -> {
JSONObject jsb = JSONObject.from(item);
DcBusiBillModelSub modelSub=new DcBusiBillModelSub();
modelSub.setBillModelNo(billModelNo);
modelSub.setAssetCode(jsb.getString("assetCode"));
modelSub.setAssetName(jsb.getString("assetName"));
//modelSub.setAssetId(item.get);
modelSub.setAssetUnitCode(jsb.getString("targetCode"));
modelSub.setAssetUnitName(jsb.getString("targetName"));
modelSub.setAssetUnitType("T");
modelSub.setAUnit(jsb.getString("targetUint"));
dcBusiBillModelSubList.add(modelSub);
});
dcBusiBillModelMaster.setDcBusiBillModelSubList(dcBusiBillModelSubList);
return AjaxResult.success(dcBusiBillModelMasterService.insertDcBusiBillModelMaster(dcBusiBillModelMaster));
}
@ApiOperation("保存参数采集数据-直接对象方式")
@ApiImplicitParams({
@ApiImplicitParam(name = "dcBusiParamBillMaster", value = "", dataType = "DcBusiParamBillMaster", dataTypeClass = DcBusiTargetBillMaster.class),
})
@PostMapping("/saveBillCollectObj")
public AjaxResult saveBillCollectByObj(@RequestBody DcBusiTargetBillMaster dcBusiTargetBillMaster){
dcBusiTargetBillMaster.setId(null);
dcBusiTargetBillMaster.setCreatedBy(SecurityUtils.getLoginUser().getUsername());
dcBusiTargetBillMaster.setCreatedTime(DateUtil.date());
long deptId=dcBusiTargetBillMaster.getCompanyId();
SysDept sysDept = Optional.ofNullable(sysDeptService.selectDeptById(deptId)).orElse(new SysDept()) ;
dcBusiTargetBillMaster.setCompanyId(deptId);
dcBusiTargetBillMaster.setCompanyName(sysDept.getDeptName());
deptId=dcBusiTargetBillMaster.getOragnizeId();
dcBusiTargetBillMaster.setOragnizeId(deptId);
sysDept = Optional.ofNullable(sysDeptService.selectDeptById(deptId)).orElse(new SysDept()) ;
dcBusiTargetBillMaster.setOrganizeName(sysDept.getDeptName());
return AjaxResult.success(dcBusiTargetBillMasterService.insertDcBusiTargetBillMaster(dcBusiTargetBillMaster));
}
@ApiOperation("保存参数采集数据-subDatas数组方式")
@ApiImplicitParams({
@ApiImplicitParam(name = "dcBusiTargetBillMaster", value = "", dataType = "DcBusiTargetBillMaster", dataTypeClass = DcBusiTargetBillMaster.class),
})
@PostMapping("/saveBillCollectArray")
/*subDatas为动态数据列,值是分开的索要对每个列值进行处理*/
public AjaxResult saveBillCollectBy(@RequestBody DcBusiTargetBillMaster dcBusiTargetBillMaster){
List<DcBusiTargetBillSub> dcBusiTargetBillSubList =new ArrayList<>();
String billNo=dcBusiTargetBillMaster.getBillNo();
String fieldCode=dcBusiTargetBillMaster.getFieldCode();
String fieldName=dcBusiTargetBillMaster.getFieldName();
String countDate=dcBusiTargetBillMaster.getCountDate();
dcBusiTargetBillMaster.setBillIncomeDate(countDate);
dcBusiTargetBillMaster.setCreatedBy(SecurityUtils.getLoginUser().getUsername());
dcBusiTargetBillMaster.setCreatedTime(DateUtil.date());
long deptId=dcBusiTargetBillMaster.getCompanyId();
SysDept sysDept = Optional.ofNullable(sysDeptService.selectDeptById(deptId)).orElse(new SysDept()) ;
dcBusiTargetBillMaster.setCompanyId(deptId);
dcBusiTargetBillMaster.setCompanyName(sysDept.getDeptName());
deptId=dcBusiTargetBillMaster.getOragnizeId();
dcBusiTargetBillMaster.setOragnizeId(deptId);
sysDept = Optional.ofNullable(sysDeptService.selectDeptById(deptId)).orElse(new SysDept()) ;
dcBusiTargetBillMaster.setOrganizeName(sysDept.getDeptName());
JSONArray jsonArray=Optional.ofNullable(JSONArray.from(dcBusiTargetBillMaster.getSubDatas())).orElse(new JSONArray());
jsonArray.forEach(item->{
JSONObject jsb = JSONObject.from(item);
for(int i=1;i<31;i++){
String fname="val_"+String.valueOf(i);
Double value=jsb.getDouble(fname);
if(StringUtils.isNotNull(value)){
DcBusiTargetBillSub dcBusiTargetBillSub=new DcBusiTargetBillSub();
//基本数据
dcBusiTargetBillSub.setBillNo(billNo);
dcBusiTargetBillSub.setId(null);
dcBusiTargetBillSub.setTargetCode(jsb.getString("targetCode"));
dcBusiTargetBillSub.setAssetCode(jsb.getString("assetCode"));
dcBusiTargetBillSub.setAssetName(jsb.getString("assetName"));
//dcBusiTargetBillSub.setCountDate(jsb.getString("countDate"));
dcBusiTargetBillSub.setCountDate(countDate);
dcBusiTargetBillSub.setTargetUint(jsb.getString("targetUint"));
dcBusiTargetBillSub.setTargetName(jsb.getString("targetName"));
dcBusiTargetBillSub.setFieldCode(fieldCode);
dcBusiTargetBillSub.setFieldName(fieldName);
dcBusiTargetBillSub.setCountDay(i);
dcBusiTargetBillSub.setTargetValue(value);
dcBusiTargetBillSubList.add(dcBusiTargetBillSub);
}
}
});
dcBusiTargetBillMaster.setDcBusiTargetBillSubList(dcBusiTargetBillSubList);
return AjaxResult.success(dcBusiTargetBillMasterService.insertDcBusiTargetBillMaster(dcBusiTargetBillMaster));
}
private String getBillModelNo(){
DcBusiCoderuleConfigDao ruleIdByBusicode =Optional.ofNullable(dcBaseCoderuleDefineService.getRuleIdByBusicode("BILL_MODEL_NO")).orElse(new DcBusiCoderuleConfigDao()) ;
DcBaseCoderuleDefineDao ruleDao = dcBaseCoderuleDefineService.selectDcBaseCoderuleDefineDaoById(ruleIdByBusicode.getRuleId());
return codeNoGenerater.getCode(ruleDao);
}
}

32
lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiBillModelMaster.java

@ -1,15 +1,9 @@
package com.lzbi.draft.domain;
import java.util.List;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import lombok.Data;
import com.lzbi.common.annotation.Excel;
import com.lzbi.module.base.BaseModuleEntity;
@ -25,62 +19,76 @@ import com.lzbi.module.base.BaseModuleEntity;
public class DcBusiBillModelMaster extends BaseModuleEntity
{
/** 主键 */
@ApiModelProperty(name = "主键",notes = "")
@TableId(type= IdType.AUTO)
private Long id ;
// @ApiModelProperty(name = "主键",notes = "")
// @TableId(type= IdType.AUTO)
// private Long id ;
private static final long serialVersionUID = 1L;
/** 部门Id */
@Excel(name = "部门Id")
private Long deptId;
// @Excel(name = "部门Id")
// @ApiModelProperty(name = "模版类型",notes = "")
// private Long deptId;
/** 角色ID */
@Excel(name = "角色ID")
@ApiModelProperty(name = "角色ID",notes = "")
private Long roleId;
/** 任务模版编号 */
@Excel(name = "任务模版编号")
@ApiModelProperty(name = "任务模版编号",notes = "")
private String billModelNo;
/** 任务模版名称 */
@Excel(name = "任务模版名称")
@ApiModelProperty(name = "任务模版名称",notes = "")
private String billModelName;
/** 所属专业编码 */
@Excel(name = "所属专业编码")
@ApiModelProperty(name = "所属专业编码",notes = "")
private String fieldCode;
/** 所属公司名称 */
@Excel(name = "所属公司名称")
@ApiModelProperty(name = "所属公司名称",notes = "")
private String companyName;
/** 所属公司ID */
@Excel(name = "所属公司ID")
@ApiModelProperty(name = "所属公司ID",notes = "")
private Long companyId;
/** 任务整点 */
@Excel(name = "任务整点")
@ApiModelProperty(name = "任务整点",notes = "")
private String billModelPoint;
/** 所属组织名称 */
@Excel(name = "所属组织名称")
@ApiModelProperty(name = "所属组织名称",notes = "")
private String orgName;
/** 所属组织ID */
@Excel(name = "所属组织ID")
@ApiModelProperty(name = "所属组织ID",notes = "")
private Long orgId;
/** 数据状态 */
@Excel(name = "数据状态")
@ApiModelProperty(name = "数据状态",notes = "")
private String dataState;
/** 使用状态 */
@Excel(name = "使用状态")
@ApiModelProperty(name = "使用状态",notes = "")
private String useState;
/** 所属专业名称 */
@Excel(name = "所属专业名称")
@ApiModelProperty(name = "所属专业名称",notes = "")
private String fieldName;
@ApiModelProperty(name = "模版类型",notes = "")
private String modelType;
/** 数据录入单模版子信息 */
private List<DcBusiBillModelSub> dcBusiBillModelSubList;

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

@ -78,6 +78,7 @@ public class DcBusiParamBillMaster extends BaseModuleEntity
private String fieldCode;
@ApiModelProperty(name = "专业名称",notes = "")
private String fieldName;
/** 参数数据采集(录入)明细信息 */
private List<DcBusiParamBillSub> dcBusiParamBillSubList;
@ApiModelProperty(name = "data数组数据未转换",notes = "")

100
lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetBillMaster.java

@ -0,0 +1,100 @@
package com.lzbi.draft.domain;
import java.util.List;
import java.util.Date;
import com.alibaba.fastjson2.JSONArray;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import lombok.Data;
import com.lzbi.common.annotation.Excel;
import com.lzbi.module.base.BaseModuleEntity;
/**
* 统计指标录入对象 dc_busi_target_bill_master
*
* @author zhousq
* @date 2023-12-14
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ApiModel(value = "指标采集(录入)单据主表",description = "")
@TableName("dc_busi_target_bill_master")
public class DcBusiTargetBillMaster extends BaseModuleEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 单据编号 */
@Excel(name = "单据编号")
@ApiModelProperty(name = "单据编号",notes = "")
private String billNo;
/** 采集时间 */
@Excel(name = "采集时间")
@ApiModelProperty(name = "采集时间",notes = "")
private String billIncomeDate;
/** 单据类型 */
@Excel(name = "单据类型")
@ApiModelProperty(name = "单据类型",notes = "")
private String billType;
/** 审核类型 */
@Excel(name = "审核类型")
@ApiModelProperty(name = "审核类型",notes = "")
private String checkType;
/** 审核状态 */
@Excel(name = "审核状态")
@ApiModelProperty(name = "审核状态",notes = "")
private String checkStatus;
/** 公司ID */
@Excel(name = "公司ID")
@ApiModelProperty(name = "公司ID",notes = "")
private Long companyId;
/** 公司名称 */
@Excel(name = "公司名称")
@ApiModelProperty(name = "公司名称",notes = "")
private String companyName;
/** 组织机构名称 */
@Excel(name = "组织机构名称")
@ApiModelProperty(name = "组织机构名称",notes = "")
private String organizeName;
/** 组织机构ID */
@Excel(name = "组织机构ID")
@ApiModelProperty(name = "组织机构ID",notes = "")
private Long oragnizeId;
/** 指标数据采集(录入)明细信息 */
private List<DcBusiTargetBillSub> dcBusiTargetBillSubList;
@ApiModelProperty(name = "单据模版名称",notes = "")
private String biilModelName ;
@ApiModelProperty(name = "模版编码",notes = "")
private String billModelNo ;
@ApiModelProperty(name = "统计月份",notes = "")
private String countDate ;
@ApiModelProperty(name = "统计日期",notes = "")
private String countTimes;
@ApiModelProperty(name = "专业编码",notes = "")
private String fieldCode;
@ApiModelProperty(name = "专业名称",notes = "")
private String fieldName;
@ApiModelProperty(name = "data数组数据未转换",notes = "")
private JSONArray subDatas;
}

95
lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetBillSub.java

@ -0,0 +1,95 @@
package com.lzbi.draft.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.lzbi.common.annotation.Excel;
import com.lzbi.module.base.BaseModuleEntity;
/**
* 指标数据采集录入明细对象 dc_busi_target_bill_sub
*
* @author zhousq
* @date 2023-12-14
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ApiModel(value = "指标数据采集(录入)明细表",description = "")
@TableName("dc_busi_target_bill_sub")
public class DcBusiTargetBillSub extends BaseModuleEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
@ApiModelProperty(name = "主键",notes = "")
private Long id;
/** 单据编码 */
@Excel(name = "单据编码")
@ApiModelProperty(name = "单据编码",notes = "")
private String billNo;
/** 指标名称 */
@Excel(name = "指标名称")
@ApiModelProperty(name = "指标名称",notes = "")
private String targetName;
/** 指标编码 */
@Excel(name = "指标编码")
@ApiModelProperty(name = "指标编码",notes = "")
private String targetCode;
/** 指标单位 */
@Excel(name = "指标单位")
@ApiModelProperty(name = "指标单位",notes = "")
private String targetUint;
/** 指标值 */
@Excel(name = "指标值")
@ApiModelProperty(name = "指标值",notes = "")
private Double targetValue;
/** 统计日期 */
@Excel(name = "统计日期")
@ApiModelProperty(name = "统计日期",notes = "")
private String countDate;
/** 天 */
@Excel(name = "天")
@ApiModelProperty(name = "天",notes = "")
private Integer countDay;
/** 所属专业编码 */
@Excel(name = "所属专业编码")
@ApiModelProperty(name = "所属专业编码",notes = "")
private String fieldCode;
/** 所属专业名称 */
@Excel(name = "所属专业名称")
@ApiModelProperty(name = "所属专业名称",notes = "")
private String fieldName;
/** 统计单元编码 */
@Excel(name = "统计单元编码")
@ApiModelProperty(name = "统计单元编码",notes = "")
private String assetCode;
/** 统计单元名称 */
@Excel(name = "统计单元名称")
@ApiModelProperty(name = "统计单元名称",notes = "")
private String assetName;
}

21
lzbi-module/src/main/java/com/lzbi/draft/domain/DeptQueryParams.java

@ -0,0 +1,21 @@
package com.lzbi.draft.domain;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @auth create by Administrator
* @date 2023/12/14
* DeptQueryParams
*/
@Data
public class DeptQueryParams {
@ApiModelProperty("页码")
private Integer pageNum;
@ApiModelProperty("页长")
private Integer pageSize;
@ApiModelProperty("部门ID")
private Long deptId;
@ApiModelProperty("部门类型")
private String orgType;
}

90
lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetBillMasterMapper.java

@ -0,0 +1,90 @@
package com.lzbi.draft.mapper;
import java.util.List;
import com.lzbi.draft.domain.DcBusiTargetBillMaster;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lzbi.draft.domain.DcBusiTargetBillSub;
/**
* 统计指标录入Mapper接口
*
* @author zhousq
* @date 2023-12-14
*/
public interface DcBusiTargetBillMasterMapper extends BaseMapper<DcBusiTargetBillMaster>
{
/**
* 查询统计指标录入
*
* @param id 统计指标录入主键
* @return 统计指标录入
*/
public DcBusiTargetBillMaster selectDcBusiTargetBillMasterById(Long id);
/**
* 查询统计指标录入列表
*
* @param dcBusiTargetBillMaster 统计指标录入
* @return 统计指标录入集合
*/
public List<DcBusiTargetBillMaster> selectDcBusiTargetBillMasterList(DcBusiTargetBillMaster dcBusiTargetBillMaster);
/**
* 新增统计指标录入
*
* @param dcBusiTargetBillMaster 统计指标录入
* @return 结果
*/
public int insertDcBusiTargetBillMaster(DcBusiTargetBillMaster dcBusiTargetBillMaster);
/**
* 修改统计指标录入
*
* @param dcBusiTargetBillMaster 统计指标录入
* @return 结果
*/
public int updateDcBusiTargetBillMaster(DcBusiTargetBillMaster dcBusiTargetBillMaster);
/**
* 删除统计指标录入
*
* @param id 统计指标录入主键
* @return 结果
*/
public int deleteDcBusiTargetBillMasterById(Long id);
/**
* 批量删除统计指标录入
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteDcBusiTargetBillMasterByIds(Long[] ids);
public List<String> selectDcBusiTargetBillMasterBillNoByIds(Long[] ids);
/**
* 批量删除指标数据采集录入明细
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteDcBusiTargetBillSubByBillNos(List<String> ids);
/**
* 批量新增指标数据采集录入明细
*
* @param dcBusiTargetBillSubList 指标数据采集录入明细列表
* @return 结果
*/
public int batchDcBusiTargetBillSub(List<DcBusiTargetBillSub> dcBusiTargetBillSubList);
/**
* 通过统计指标录入主键删除指标数据采集录入明细信息
*
* @param id 统计指标录入ID
* @return 结果
*/
public int deleteDcBusiTargetBillSubByBillNo(String billNo);
}

8
lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetAdjustDaySubService.java

@ -4,7 +4,7 @@ import java.util.List;
import com.lzbi.common.utils.DateUtils;
import com.lzbi.draft.domain.DcBusiTargetAdjustDaySubDao;
import com.lzbi.draft.mapper.DcBusiTargetAdjustDaySubMapper;
import com.lzbi.targetFolder.domain.DcBaseAssetTargetDao;
import com.lzbi.targetFolder.domain.DcBaseAssetTarget;
import com.lzbi.targetFolder.mapper.DcBaseAssetTargetMapper;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.stereotype.Service;
@ -59,9 +59,9 @@ public class DcBusiTargetAdjustDaySubService extends ServiceImpl<DcBusiTargetAdj
@Transactional(rollbackFor = Exception.class)
public int insertDcBusiTargetAdjustDaySubDao(DcBusiTargetAdjustDaySubDao dcBusiTargetAdjustDaySubDao, String assetCode)
{
DcBaseAssetTargetDao dcBaseAssetTargetDao = dcBaseAssetTargetMapper.selectDcBaseAssetTargetDaoByTargetCodeAndAssetCode(dcBusiTargetAdjustDaySubDao.getTargetCode(), assetCode);
if (ObjectUtils.isNotEmpty(dcBaseAssetTargetDao)) {
dcBusiTargetAdjustDaySubDao.setTargetName(dcBaseAssetTargetDao.getTargetName());
DcBaseAssetTarget dcBaseAssetTarget = dcBaseAssetTargetMapper.selectDcBaseAssetTargetByTargetCodeAndAssetCode(dcBusiTargetAdjustDaySubDao.getTargetCode(), assetCode);
if (ObjectUtils.isNotEmpty(dcBaseAssetTarget)) {
dcBusiTargetAdjustDaySubDao.setTargetName(dcBaseAssetTarget.getTargetName());
}
dcBusiTargetAdjustDaySubDao.setCreatedTime(DateUtils.getNowDate());
return baseMapper.insertDcBusiTargetAdjustDaySubDao(dcBusiTargetAdjustDaySubDao);

133
lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetBillMasterService.java

@ -0,0 +1,133 @@
package com.lzbi.draft.service;
import java.util.List;
import com.lzbi.common.utils.DateUtils;
import com.lzbi.common.utils.StringUtils;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import com.lzbi.common.utils.DateUtils;
import org.springframework.transaction.annotation.Transactional;
import com.lzbi.draft.domain.DcBusiTargetBillSub;
import com.lzbi.draft.domain.DcBusiTargetBillMaster;
import com.lzbi.draft.mapper.DcBusiTargetBillMasterMapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* 统计指标录入Service业务层处理
*
* @author zhousq
* @date 2023-12-14
*/
@Service
public class DcBusiTargetBillMasterService extends ServiceImpl<DcBusiTargetBillMasterMapper, DcBusiTargetBillMaster> implements IService<DcBusiTargetBillMaster>
{
/**
* 查询统计指标录入
*
* @param id 统计指标录入主键
* @return 统计指标录入
*/
public DcBusiTargetBillMaster selectDcBusiTargetBillMasterById(Long id)
{
return baseMapper.selectDcBusiTargetBillMasterById(id);
}
/**
* 查询统计指标录入列表
*
* @param dcBusiTargetBillMaster 统计指标录入
* @return 统计指标录入
*/
public List<DcBusiTargetBillMaster> selectDcBusiTargetBillMasterList(DcBusiTargetBillMaster dcBusiTargetBillMaster)
{
return baseMapper.selectDcBusiTargetBillMasterList(dcBusiTargetBillMaster);
}
/**
* 新增统计指标录入
*
* @param dcBusiTargetBillMaster 统计指标录入
* @return 结果
*/
@Transactional
public int insertDcBusiTargetBillMaster(DcBusiTargetBillMaster dcBusiTargetBillMaster)
{
dcBusiTargetBillMaster.setCreatedTime(DateUtils.getNowDate());
int rows = baseMapper.insertDcBusiTargetBillMaster(dcBusiTargetBillMaster);
insertDcBusiTargetBillSub(dcBusiTargetBillMaster);
return rows;
}
/**
* 修改统计指标录入
*
* @param dcBusiTargetBillMaster 统计指标录入
* @return 结果
*/
@Transactional
public int updateDcBusiTargetBillMaster(DcBusiTargetBillMaster dcBusiTargetBillMaster)
{
dcBusiTargetBillMaster.setUpdatedTime(DateUtils.getNowDate());
baseMapper.deleteDcBusiTargetBillSubByBillNo(dcBusiTargetBillMaster.getBillNo());
insertDcBusiTargetBillSub(dcBusiTargetBillMaster);
return baseMapper.updateDcBusiTargetBillMaster(dcBusiTargetBillMaster);
}
/**
* 批量删除统计指标录入
*
* @param ids 需要删除的统计指标录入主键
* @return 结果
*/
@Transactional
public int deleteDcBusiTargetBillMasterByIds(Long[] ids)
{
List<String> strings = baseMapper.selectDcBusiTargetBillMasterBillNoByIds(ids);
baseMapper.deleteDcBusiTargetBillSubByBillNos(strings);
return baseMapper.deleteDcBusiTargetBillMasterByIds(ids);
}
/**
* 删除统计指标录入信息
*
* @param id 统计指标录入主键
* @return 结果
*/
@Transactional
public int deleteDcBusiTargetBillMasterById(Long id)
{
DcBusiTargetBillMaster dcBusiTargetBillMaster = baseMapper.selectDcBusiTargetBillMasterById(id);
baseMapper.deleteDcBusiTargetBillSubByBillNo(dcBusiTargetBillMaster.getBillNo());
return baseMapper.deleteDcBusiTargetBillMasterById(id);
}
/**
* 新增指标数据采集录入明细信息
*
* @param dcBusiTargetBillMaster 统计指标录入对象
*/
public void insertDcBusiTargetBillSub(DcBusiTargetBillMaster dcBusiTargetBillMaster)
{
List<DcBusiTargetBillSub> dcBusiTargetBillSubDaoList = dcBusiTargetBillMaster.getDcBusiTargetBillSubList();
String billNo = dcBusiTargetBillMaster.getBillNo();
if (StringUtils.isNotNull(dcBusiTargetBillSubDaoList))
{
List<DcBusiTargetBillSub> list = new ArrayList<DcBusiTargetBillSub>();
for (DcBusiTargetBillSub dcBusiTargetBillSubDao : dcBusiTargetBillSubDaoList)
{
dcBusiTargetBillSubDao.setBillNo(billNo);
list.add(dcBusiTargetBillSubDao);
}
if (list.size() > 0)
{
baseMapper.batchDcBusiTargetBillSub(list);
}
}
}
}

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

@ -65,7 +65,6 @@ public class BaseModuleEntity implements Serializable, Cloneable {
*/
@ApiModelProperty(name = "删除时间", notes = "")
private Date deleteTime;
@ApiModelProperty("分页")
private Integer pageNum;
@ApiModelProperty("分页大小")

93
lzbi-module/src/main/java/com/lzbi/targetFolder/controller/DcBaseAssetTargetController.java

@ -1,8 +1,14 @@
package com.lzbi.targetFolder.controller;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject;
import com.lzbi.common.utils.DateUtils;
import com.lzbi.targetFolder.domain.DcBaseAssetTarget;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -17,7 +23,6 @@ import com.lzbi.common.annotation.Log;
import com.lzbi.common.core.controller.BaseController;
import com.lzbi.common.core.domain.AjaxResult;
import com.lzbi.common.enums.BusinessType;
import com.lzbi.targetFolder.domain.DcBaseAssetTargetDao;
import com.lzbi.targetFolder.service.DcBaseAssetTargetService;
import com.lzbi.common.utils.poi.ExcelUtil;
import com.lzbi.common.core.page.TableDataInfo;
@ -40,10 +45,10 @@ public class DcBaseAssetTargetController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('target:target:list')")
@GetMapping("/list")
public TableDataInfo list(DcBaseAssetTargetDao dcBaseAssetTargetDao)
public TableDataInfo list(DcBaseAssetTarget dcBaseAssetTarget)
{
startPage();
List<DcBaseAssetTargetDao> list = dcBaseAssetTargetService.selectDcBaseAssetTargetDaoList(dcBaseAssetTargetDao);
List<DcBaseAssetTarget> list = dcBaseAssetTargetService.selectDcBaseAssetTargetList(dcBaseAssetTarget);
return getDataTable(list);
}
@ -53,10 +58,10 @@ public class DcBaseAssetTargetController extends BaseController
@PreAuthorize("@ss.hasPermi('target:target:export')")
@Log(title = "资产指标配置", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DcBaseAssetTargetDao dcBaseAssetTargetDao)
public void export(HttpServletResponse response, DcBaseAssetTarget dcBaseAssetTarget)
{
List<DcBaseAssetTargetDao> list = dcBaseAssetTargetService.selectDcBaseAssetTargetDaoList(dcBaseAssetTargetDao);
ExcelUtil<DcBaseAssetTargetDao> util = new ExcelUtil<DcBaseAssetTargetDao>(DcBaseAssetTargetDao.class);
List<DcBaseAssetTarget> list = dcBaseAssetTargetService.selectDcBaseAssetTargetList(dcBaseAssetTarget);
ExcelUtil<DcBaseAssetTarget> util = new ExcelUtil<DcBaseAssetTarget>(DcBaseAssetTarget.class);
util.exportExcel(response, list, "资产指标配置数据");
}
@ -67,7 +72,7 @@ public class DcBaseAssetTargetController extends BaseController
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(dcBaseAssetTargetService.selectDcBaseAssetTargetDaoById(id));
return success(dcBaseAssetTargetService.selectDcBaseAssetTargetById(id));
}
/**
@ -76,9 +81,9 @@ public class DcBaseAssetTargetController extends BaseController
@PreAuthorize("@ss.hasPermi('target:target:add')")
@Log(title = "资产指标配置", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DcBaseAssetTargetDao dcBaseAssetTargetDao)
public AjaxResult add(@RequestBody DcBaseAssetTarget dcBaseAssetTarget)
{
return toAjax(dcBaseAssetTargetService.insertDcBaseAssetTargetDao(dcBaseAssetTargetDao));
return toAjax(dcBaseAssetTargetService.insertDcBaseAssetTarget(dcBaseAssetTarget));
}
/**
@ -87,9 +92,9 @@ public class DcBaseAssetTargetController extends BaseController
@PreAuthorize("@ss.hasPermi('target:target:edit')")
@Log(title = "资产指标配置", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DcBaseAssetTargetDao dcBaseAssetTargetDao)
public AjaxResult edit(@RequestBody DcBaseAssetTarget dcBaseAssetTarget)
{
return toAjax(dcBaseAssetTargetService.updateDcBaseAssetTargetDao(dcBaseAssetTargetDao));
return toAjax(dcBaseAssetTargetService.updateDcBaseAssetTarget(dcBaseAssetTarget));
}
/**
@ -100,7 +105,7 @@ public class DcBaseAssetTargetController extends BaseController
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(dcBaseAssetTargetService.deleteDcBaseAssetTargetDaoByIds(ids));
return toAjax(dcBaseAssetTargetService.deleteDcBaseAssetTargetByIds(ids));
}
@ -109,11 +114,71 @@ public class DcBaseAssetTargetController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('target:target:list')")
@GetMapping("/listNoPage")
public AjaxResult listNoPage(DcBaseAssetTargetDao dcBaseAssetTargetDao)
public AjaxResult listNoPage(DcBaseAssetTarget dcBaseAssetTarget)
{
List<DcBaseAssetTargetDao> list = dcBaseAssetTargetService.selectDcBaseAssetTargetDaoList(dcBaseAssetTargetDao);
List<DcBaseAssetTarget> list = dcBaseAssetTargetService.selectDcBaseAssetTargetList(dcBaseAssetTarget);
return AjaxResult.success(list);
}
/**
* 新增资产信息
*/
@PreAuthorize("@ss.hasPermi('lzbi:assetInfo:add')")
@Log(title = "资产信息", businessType = BusinessType.INSERT)
@PostMapping("/addBatch")
public AjaxResult addBatch(@RequestBody JSONArray jsonArray)
{
if (jsonArray == null) {
throw new IllegalArgumentException("未能接收任何参数!");
}
List<DcBaseAssetTarget> beanList = new ArrayList<>();
try {
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject beanObject = jsonArray.getJSONObject(i);
// 移除ID属性
beanObject.remove("id");
DcBaseAssetTarget dcBaseAssetTarget = JSON.toJavaObject(beanObject, DcBaseAssetTarget.class);
dcBaseAssetTarget.setCreatedTime(DateUtils.getNowDate());
dcBaseAssetTarget.setDeptId(getDeptId());
dcBaseAssetTarget.setUserId(getUserId());
dcBaseAssetTarget.setCreatedBy(String.valueOf(getUserId()));
dcBaseAssetTarget.setCreatedTime(DateUtils.getNowDate());
beanList.add(dcBaseAssetTarget);
}
} catch (Exception e) {
throw new IllegalArgumentException("解析list对象异常!");
}
return toAjax(dcBaseAssetTargetService.saveBatch(beanList));
}
/**
* 修改资产信息
*/
@PreAuthorize("@ss.hasPermi('lzbi:assetInfo:edit')")
@Log(title = "资产信息", businessType = BusinessType.UPDATE)
@PutMapping("/editBatch")
public AjaxResult editBatch(@RequestBody JSONArray jsonArray)
{
if (jsonArray == null) {
throw new IllegalArgumentException("未能接收任何参数!");
}
List<DcBaseAssetTarget> beanList = new ArrayList<>();
try {
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject beanObject = jsonArray.getJSONObject(i);
DcBaseAssetTarget dcBaseAssetTarget = JSON.toJavaObject(beanObject, DcBaseAssetTarget.class);
dcBaseAssetTarget.setUpdatedBy(String.valueOf(getUserId()));
dcBaseAssetTarget.setUpdatedTime(DateUtils.getNowDate());
beanList.add(dcBaseAssetTarget);
}
} catch (Exception e) {
throw new IllegalArgumentException("解析list对象异常!");
}
return toAjax(dcBaseAssetTargetService.updateBatchById(beanList));
}
}

15
lzbi-module/src/main/java/com/lzbi/targetFolder/controller/DcBaseTargetModelController.java

@ -197,6 +197,21 @@ public class DcBaseTargetModelController extends BaseController
}
/**
* 查询指标模版配置列表
*/
@ApiOperation("查询指标模版配置列表")
@ApiImplicitParams({
@ApiImplicitParam(name = "DcBaseTargetModel", value = "", dataType = "DcBaseTargetModel", dataTypeClass = DcBaseTargetModel.class),
})
@PreAuthorize("@ss.hasPermi('target:targetModel:list')")
@GetMapping("/listNoPage")
public AjaxResult listNoPage(DcBaseTargetModel DcBaseTargetModel)
{
List< DcBaseTargetModel> list = dcBaseTargetModelService.selectDcBaseTargetModelList(DcBaseTargetModel);
return AjaxResult.success(list);
}
}

60
lzbi-module/src/main/java/com/lzbi/targetFolder/domain/DcBaseAssetTargetDao.java → lzbi-module/src/main/java/com/lzbi/targetFolder/domain/DcBaseAssetTarget.java

@ -2,32 +2,29 @@ package com.lzbi.targetFolder.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.experimental.Accessors;
import lombok.Data;
import com.lzbi.common.annotation.Excel;
import com.lzbi.module.base.BaseModuleEntity;
import lombok.experimental.Accessors;
/**
* 资产指标配置对象 dc_base_asset_target
*
*
* @author Lu.JL
* @date 2023-11-30
* @date 2023-12-14
*/
@Data
@Accessors(chain = true)
public class DcBaseAssetTargetDao extends BaseModuleEntity
@Data
@Accessors(chain = true)
public class DcBaseAssetTarget extends BaseModuleEntity
{
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
/** 主键 */
private Long id;
/** 资产ID */
@Excel(name = "资产ID")
/** 统计单元编码 */
@Excel(name = "统计单元编码")
private String assetCode;
/** 统计单元ID */
@Excel(name = "统计单元ID")
private Long assetId;
/** 指标模型编码 */
@ -38,6 +35,7 @@ public class DcBaseAssetTargetDao extends BaseModuleEntity
@Excel(name = "指标名称")
private String targetName;
/** 指标别名 */
@Excel(name = "指标别名")
private String targetNameAlias;
@ -73,32 +71,20 @@ public class DcBaseAssetTargetDao extends BaseModuleEntity
@Excel(name = "是否积算")
private String flagCompute;
/** 排序 */
@Excel(name = "排序")
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String sort;
/** 统计单元编码 */
@Excel(name = "统计单元编码")
private String assetCode;
//add by zhousq 2023-12-12
@ApiModelProperty("所属专业名称")
/** 所属专业名称 */
@Excel(name = "所属专业名称")
private String targetFieldName;
@ApiModelProperty("单位")
private String fieldUnit;
@ApiModelProperty("字段类型")
private String columnType;
private String value;
private String label;
public String getValue() {
return this.targetCode;
}
public String getLabel() {
return this.targetCode;
}
/** T指标P参数 */
@Excel(name = "T指标P参数")
private String columnType;
/** 单位 */
@Excel(name = "单位")
private String fieldUnit;
}

23
lzbi-module/src/main/java/com/lzbi/targetFolder/mapper/DcBaseAssetTargetMapper.java

@ -1,7 +1,8 @@
package com.lzbi.targetFolder.mapper;
import java.util.List;
import com.lzbi.targetFolder.domain.DcBaseAssetTargetDao;
import com.lzbi.targetFolder.domain.DcBaseAssetTarget;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -14,7 +15,7 @@ import org.apache.ibatis.annotations.Param;
*/
@Mapper
public interface DcBaseAssetTargetMapper extends BaseMapper<DcBaseAssetTargetDao>
public interface DcBaseAssetTargetMapper extends BaseMapper<DcBaseAssetTarget>
{
/**
* 查询资产指标配置
@ -22,7 +23,7 @@ public interface DcBaseAssetTargetMapper extends BaseMapper<DcBaseAssetTargetDao
* @param id 资产指标配置主键
* @return 资产指标配置
*/
public DcBaseAssetTargetDao selectDcBaseAssetTargetDaoById(Long id);
public DcBaseAssetTarget selectDcBaseAssetTargetById(Long id);
/**
* 查询资产指标配置
*
@ -30,24 +31,24 @@ public interface DcBaseAssetTargetMapper extends BaseMapper<DcBaseAssetTargetDao
* @param assetCode 统计单元编码
* @return 资产指标配置
*/
public DcBaseAssetTargetDao selectDcBaseAssetTargetDaoByTargetCodeAndAssetCode(@Param("targetCode") String targetCode, @Param("assetCode") String assetCode);
public DcBaseAssetTarget selectDcBaseAssetTargetByTargetCodeAndAssetCode(@Param("targetCode") String targetCode, @Param("assetCode") String assetCode);
/**
* 查询资产指标配置列表
*
* @param dcBaseAssetTargetDao 资产指标配置
* @param dcBaseAssetTarget 资产指标配置
* @return 资产指标配置集合
*/
public List<DcBaseAssetTargetDao> selectDcBaseAssetTargetDaoList(DcBaseAssetTargetDao dcBaseAssetTargetDao);
public List<DcBaseAssetTarget> selectDcBaseAssetTargetList(DcBaseAssetTarget dcBaseAssetTarget);
/**
* 新增资产指标配置
*
* @param dcBaseAssetTargetDao 资产指标配置
* @param dcBaseAssetTarget 资产指标配置
* @return 结果
*/
public int insertDcBaseAssetTargetDao(DcBaseAssetTargetDao dcBaseAssetTargetDao);
public int insertDcBaseAssetTarget(DcBaseAssetTarget dcBaseAssetTarget);
/**
* 修改资产指标配置
@ -55,7 +56,7 @@ public interface DcBaseAssetTargetMapper extends BaseMapper<DcBaseAssetTargetDao
* @param dcBaseAssetTarget 资产指标配置
* @return 结果
*/
public int updateDcBaseAssetTargetDao(DcBaseAssetTargetDao dcBaseAssetTargetDao);
public int updateDcBaseAssetTarget(DcBaseAssetTarget dcBaseAssetTarget);
/**
* 删除资产指标配置
@ -63,7 +64,7 @@ public interface DcBaseAssetTargetMapper extends BaseMapper<DcBaseAssetTargetDao
* @param id 资产指标配置主键
* @return 结果
*/
public int deleteDcBaseAssetTargetDaoById(Long id);
public int deleteDcBaseAssetTargetById(Long id);
/**
* 批量删除资产指标配置
@ -71,5 +72,5 @@ public interface DcBaseAssetTargetMapper extends BaseMapper<DcBaseAssetTargetDao
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteDcBaseAssetTargetDaoByIds(Long[] ids);
public int deleteDcBaseAssetTargetByIds(Long[] ids);
}

38
lzbi-module/src/main/java/com/lzbi/targetFolder/service/DcBaseAssetTargetService.java

@ -3,9 +3,9 @@ package com.lzbi.targetFolder.service;
import java.util.List;
import com.lzbi.common.utils.DateUtils;
import com.lzbi.targetFolder.domain.DcBaseAssetTarget;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lzbi.targetFolder.domain.DcBaseAssetTargetDao;
import com.lzbi.targetFolder.mapper.DcBaseAssetTargetMapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -16,7 +16,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
* @date 2023-11-30
*/
@Service
public class DcBaseAssetTargetService extends ServiceImpl<DcBaseAssetTargetMapper, DcBaseAssetTargetDao> implements IService<DcBaseAssetTargetDao>
public class DcBaseAssetTargetService extends ServiceImpl<DcBaseAssetTargetMapper, DcBaseAssetTarget> implements IService<DcBaseAssetTarget>
{
@Autowired
private DcBaseAssetTargetMapper dcBaseAssetTargetMapper;
@ -27,46 +27,46 @@ public class DcBaseAssetTargetService extends ServiceImpl<DcBaseAssetTargetMappe
* @param id 资产指标配置主键
* @return 资产指标配置
*/
public DcBaseAssetTargetDao selectDcBaseAssetTargetDaoById(Long id)
public DcBaseAssetTarget selectDcBaseAssetTargetById(Long id)
{
return dcBaseAssetTargetMapper.selectDcBaseAssetTargetDaoById(id);
return dcBaseAssetTargetMapper.selectDcBaseAssetTargetById(id);
}
/**
* 查询资产指标配置列表
*
* @param dcBaseAssetTargetDao 资产指标配置
* @param dcBaseAssetTarget 资产指标配置
* @return 资产指标配置
*/
public List<DcBaseAssetTargetDao> selectDcBaseAssetTargetDaoList(DcBaseAssetTargetDao dcBaseAssetTargetDao)
public List<DcBaseAssetTarget> selectDcBaseAssetTargetList(DcBaseAssetTarget dcBaseAssetTarget)
{
return dcBaseAssetTargetMapper.selectDcBaseAssetTargetDaoList(dcBaseAssetTargetDao);
return dcBaseAssetTargetMapper.selectDcBaseAssetTargetList(dcBaseAssetTarget);
}
/**
* 新增资产指标配置
*
* @param dcBaseAssetTargetDao 资产指标配置
* @param dcBaseAssetTarget 资产指标配置
* @return 结果
*/
public int insertDcBaseAssetTargetDao(DcBaseAssetTargetDao dcBaseAssetTargetDao)
public int insertDcBaseAssetTarget(DcBaseAssetTarget dcBaseAssetTarget)
{
dcBaseAssetTargetDao.setCreatedTime(DateUtils.getNowDate());
return dcBaseAssetTargetMapper.insertDcBaseAssetTargetDao(dcBaseAssetTargetDao);
dcBaseAssetTarget.setCreatedTime(DateUtils.getNowDate());
return dcBaseAssetTargetMapper.insertDcBaseAssetTarget(dcBaseAssetTarget);
}
/**
* 修改资产指标配置
*
* @param dcBaseAssetTargetDao 资产指标配置
* @param dcBaseAssetTarget 资产指标配置
* @return 结果
*/
public int updateDcBaseAssetTargetDao(DcBaseAssetTargetDao dcBaseAssetTargetDao)
public int updateDcBaseAssetTarget(DcBaseAssetTarget dcBaseAssetTarget)
{
dcBaseAssetTargetDao.setUpdatedTime(DateUtils.getNowDate());
return dcBaseAssetTargetMapper.updateDcBaseAssetTargetDao(dcBaseAssetTargetDao);
dcBaseAssetTarget.setUpdatedTime(DateUtils.getNowDate());
return dcBaseAssetTargetMapper.updateDcBaseAssetTarget(dcBaseAssetTarget);
}
/**
@ -76,9 +76,9 @@ public class DcBaseAssetTargetService extends ServiceImpl<DcBaseAssetTargetMappe
* @return 结果
*/
public int deleteDcBaseAssetTargetDaoByIds(Long[] ids)
public int deleteDcBaseAssetTargetByIds(Long[] ids)
{
return dcBaseAssetTargetMapper.deleteDcBaseAssetTargetDaoByIds(ids);
return dcBaseAssetTargetMapper.deleteDcBaseAssetTargetByIds(ids);
}
/**
@ -88,8 +88,8 @@ public class DcBaseAssetTargetService extends ServiceImpl<DcBaseAssetTargetMappe
* @return 结果
*/
public int deleteDcBaseAssetTargetDaoById(Long id)
public int deleteDcBaseAssetTargetById(Long id)
{
return dcBaseAssetTargetMapper.deleteDcBaseAssetTargetDaoById(id);
return dcBaseAssetTargetMapper.deleteDcBaseAssetTargetById(id);
}
}

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

@ -4,94 +4,64 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.lzbi.asset.mapper.DcBaseAssetInfoMapper">
<resultMap type="DcBaseAssetInfo" id="DcBaseAssetInfoResult">
<result property="tenantId" column="TENANT_ID"/>
<result property="REVISION" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
<result property="deleteBy" column="DELETE_BY"/>
<result property="deleteTime" column="DELETE_TIME"/>
<result property="id" column="id"/>
<result property="assetName" column="asset_name"/>
<result property="assetCode" column="asset_code"/>
<result property="assetClass" column="asset_class"/>
<result property="flagValidateDept" column="flag_validate_dept"/>
<result property="flagValidateRole" column="flag_validate_role"/>
<result property="flagValidateUser" column="flag_validate_user"/>
<result property="statusAsset" column="status_asset"/>
<result property="comanyId" column="comany_id"/>
<result property="deptId" column="dept_id"/>
<resultMap type="com.lzbi.asset.domain.DcBaseAssetInfo" id="DcBaseAssetInfoResult">
<result property="tenantId" column="tenant_id" />
<result property="revision" column="revision" />
<result property="createdBy" column="created_by" />
<result property="createdTime" column="created_time" />
<result property="updatedBy" column="updated_by" />
<result property="updatedTime" column="updated_time" />
<result property="deleteBy" column="delete_by" />
<result property="deleteTime" column="delete_time" />
<result property="id" column="id" />
<result property="assetName" column="asset_name" />
<result property="assetCode" column="asset_code" />
<result property="assetClass" column="asset_class" />
<result property="flagValidateDept" column="flag_validate_dept" />
<result property="flagValidateRole" column="flag_validate_role" />
<result property="flagValidateUser" column="flag_validate_user" />
<result property="statusAsset" column="status_asset" />
<result property="comanyId" column="comany_id" />
<result property="deptId" column="dept_id" />
<result property="userId" column="user_id" />
</resultMap>
<sql id="selectDcBaseAssetInfoVo">
select TENANT_ID,
REVISION,
CREATED_BY,
CREATED_TIME,
UPDATED_BY,
UPDATED_TIME,
DELETE_BY,
DELETE_TIME,
id,
asset_name,
asset_code,
asset_class,
flag_validate_dept,
flag_validate_role,
flag_validate_user,
status_asset,
comany_id,
dept_id
from dc_base_asset_info
select tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time, id, asset_name, asset_code, asset_class, flag_validate_dept, flag_validate_role, flag_validate_user, status_asset, comany_id, dept_id, user_id from dc_base_asset_info
</sql>
<select id="selectDcBaseAssetInfoList" parameterType="DcBaseAssetInfo" resultMap="DcBaseAssetInfoResult">
<include refid="selectDcBaseAssetInfoVo"/>
<where>
<if test="assetName != null and assetName != ''">and asset_name like concat('%', #{assetName}, '%')</if>
<if test="assetCode != null and assetCode != ''">and asset_code = #{assetCode}</if>
<if test="assetClass != null and assetClass != ''">and asset_class = #{assetClass}</if>
<if test="flagValidateDept != null and flagValidateDept != ''">and flag_validate_dept =
#{flagValidateDept}
</if>
<if test="flagValidateRole != null and flagValidateRole != ''">and flag_validate_role =
#{flagValidateRole}
</if>
<if test="flagValidateUser != null and flagValidateUser != ''">and flag_validate_user =
#{flagValidateUser}
</if>
<if test="statusAsset != null and statusAsset != ''">and status_asset = #{statusAsset}</if>
<if test="comanyId != null ">and comany_id = #{comanyId}</if>
<if test="deptId != null ">and dept_id = #{deptId}</if>
<if test="assetName != null and assetName != ''"> and asset_name like concat('%', #{assetName}, '%')</if>
<if test="assetCode != null and assetCode != ''"> and asset_code = #{assetCode}</if>
<if test="assetClass != null and assetClass != ''"> and asset_class = #{assetClass}</if>
<if test="flagValidateDept != null and flagValidateDept != ''"> and flag_validate_dept = #{flagValidateDept}</if>
<if test="flagValidateRole != null and flagValidateRole != ''"> and flag_validate_role = #{flagValidateRole}</if>
<if test="flagValidateUser != null and flagValidateUser != ''"> and flag_validate_user = #{flagValidateUser}</if>
<if test="statusAsset != null and statusAsset != ''"> and status_asset = #{statusAsset}</if>
<if test="comanyId != null "> and comany_id = #{comanyId}</if>
<if test="deptId != null "> and dept_id = #{deptId}</if>
<if test="userId != null "> and user_id = #{userId}</if>
</where>
</select>
<select id="selectDcBaseAssetInfoById" parameterType="Long" resultMap="DcBaseAssetInfoResult">
<include refid="selectDcBaseAssetInfoVo"/>
where id = #{id}
</select>
<select id="selectDcBaseAssetInfoByCode" parameterType="String" resultMap="DcBaseAssetInfoResult">
<include refid="selectDcBaseAssetInfoVo"/>
where asset_code = #{assetCode}
</select>
<!--add by zhousq 2023-12-12 -->
<select id="selectDcBaseAssetInfoMap" resultType="hashmap">
select asset_code,
asset_name
from dc_base_asset_info
</select>
<insert id="insertDcBaseAssetInfo" parameterType="DcBaseAssetInfo" useGeneratedKeys="true" keyProperty="id">
insert into dc_base_asset_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="tenantId != null">TENANT_ID,</if>
<if test="REVISION != null">REVISION,</if>
<if test="createdBy != null">CREATED_BY,</if>
<if test="createdTime != null">CREATED_TIME,</if>
<if test="updatedBy != null">UPDATED_BY,</if>
<if test="updatedTime != null">UPDATED_TIME,</if>
<if test="deleteBy != null">DELETE_BY,</if>
<if test="deleteTime != null">DELETE_TIME,</if>
<if test="tenantId != null">tenant_id,</if>
<if test="revision != null">revision,</if>
<if test="createdBy != null">created_by,</if>
<if test="createdTime != null">created_time,</if>
<if test="updatedBy != null">updated_by,</if>
<if test="updatedTime != null">updated_time,</if>
<if test="deleteBy != null">delete_by,</if>
<if test="deleteTime != null">delete_time,</if>
<if test="assetName != null and assetName != ''">asset_name,</if>
<if test="assetCode != null and assetCode != ''">asset_code,</if>
<if test="assetClass != null and assetClass != ''">asset_class,</if>
@ -101,10 +71,11 @@
<if test="statusAsset != null">status_asset,</if>
<if test="comanyId != null">comany_id,</if>
<if test="deptId != null">dept_id,</if>
<if test="userId != null">user_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="tenantId != null">#{tenantId},</if>
<if test="REVISION != null">#{REVISION},</if>
<if test="revision != null">#{revision},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="updatedBy != null">#{updatedBy},</if>
@ -120,20 +91,21 @@
<if test="statusAsset != null">#{statusAsset},</if>
<if test="comanyId != null">#{comanyId},</if>
<if test="deptId != null">#{deptId},</if>
<if test="userId != null">#{userId},</if>
</trim>
</insert>
<update id="updateDcBaseAssetInfo" parameterType="DcBaseAssetInfo">
update dc_base_asset_info
<trim prefix="SET" suffixOverrides=",">
<if test="tenantId != null">TENANT_ID = #{tenantId},</if>
<if test="REVISION != null">REVISION = #{REVISION},</if>
<if test="createdBy != null">CREATED_BY = #{createdBy},</if>
<if test="createdTime != null">CREATED_TIME = #{createdTime},</if>
<if test="updatedBy != null">UPDATED_BY = #{updatedBy},</if>
<if test="updatedTime != null">UPDATED_TIME = #{updatedTime},</if>
<if test="deleteBy != null">DELETE_BY = #{deleteBy},</if>
<if test="deleteTime != null">DELETE_TIME = #{deleteTime},</if>
<if test="tenantId != null">tenant_id = #{tenantId},</if>
<if test="revision != null">revision = #{revision},</if>
<if test="createdBy != null">created_by = #{createdBy},</if>
<if test="createdTime != null">created_time = #{createdTime},</if>
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
<if test="deleteBy != null">delete_by = #{deleteBy},</if>
<if test="deleteTime != null">delete_time = #{deleteTime},</if>
<if test="assetName != null and assetName != ''">asset_name = #{assetName},</if>
<if test="assetCode != null and assetCode != ''">asset_code = #{assetCode},</if>
<if test="assetClass != null and assetClass != ''">asset_class = #{assetClass},</if>
@ -143,14 +115,13 @@
<if test="statusAsset != null">status_asset = #{statusAsset},</if>
<if test="comanyId != null">comany_id = #{comanyId},</if>
<if test="deptId != null">dept_id = #{deptId},</if>
<if test="userId != null">user_id = #{userId},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDcBaseAssetInfoById" parameterType="Long">
delete
from dc_base_asset_info
where id = #{id}
delete from dc_base_asset_info where id = #{id}
</delete>
<delete id="deleteDcBaseAssetInfoByIds" parameterType="String">

14
lzbi-module/src/main/resources/mapper/asset/DcBaseCoderuleDefineMapper.xml

@ -129,10 +129,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="codeSplitFlag != null">#{codeSplitFlag},</if>
</trim>
</insert>
<insert id="insertSerial" parameterType="long" useGeneratedKeys="true" keyProperty="id">
<insert id="insertSerial" parameterType="long" >
insert into dc_base_coderule_serial(code_rule_id,serial_id,revision) values (#{param1},0,0)
</insert>
<delete id="deleteSerialByRuleId" parameterType="long" >
delete from dc_base_coderule_serial where code_rule_id=#{param1}
</delete>
<update id="updateDcBaseCoderuleDefineDao" parameterType="DcBaseCoderuleDefineDao">
update dc_base_coderule_define
<trim prefix="SET" suffixOverrides=",">
@ -163,8 +165,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</delete>
<delete id="deleteDcBaseCoderuleserialByIds" parameterType="String">
delete from dc_base_coderule_serial where code_rule_id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<select id="getSerialByRuleId" resultMap="rmDcBaseCoderuleSerial" parameterType="long">
select
tenant_id,

9
lzbi-module/src/main/resources/mapper/draft/DcBusiBillModelMasterMapper.xml

@ -27,6 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="dataState" column="data_state" />
<result property="useState" column="use_state" />
<result property="fieldName" column="field_name" />
<result property="modelType" column="model_type" />
</resultMap>
<resultMap id="DcBusiBillModelMasterDcBusiBillModelSubResult" type="DcBusiBillModelMaster" extends="DcBusiBillModelMasterResult">
@ -48,7 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectDcBusiBillModelMasterVo">
select tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time, dept_id, role_id, bill_model_no, bill_model_name, field_code, company_name, company_id, bill_model_point, org_name, org_id, id, data_state, use_state, field_name from dc_busi_bill_model_master
select tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time, dept_id, role_id, bill_model_no, bill_model_name, field_code, company_name, company_id, bill_model_point, org_name, org_id, id, data_state, use_state, field_name,model_type from dc_busi_bill_model_master
</sql>
<select id="selectDcBusiBillModelMasterList" parameterType="DcBusiBillModelMaster" resultMap="DcBusiBillModelMasterResult">
@ -67,11 +68,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="dataState != null and dataState != ''"> and data_state = #{dataState}</if>
<if test="useState != null and useState != ''"> and use_state = #{useState}</if>
<if test="fieldName != null and fieldName != ''"> and field_name like concat('%', #{fieldName}, '%')</if>
<if test="modelType != null and modelType != ''"> and model_type =#{modelType}</if>
</where>
</select>
<select id="selectDcBusiBillModelMasterById" parameterType="Long" resultMap="DcBusiBillModelMasterDcBusiBillModelSubResult">
select a.tenant_id, a.revision, a.created_by, a.created_time, a.updated_by, a.updated_time, a.delete_by, a.delete_time, a.dept_id, a.role_id, a.bill_model_no, a.bill_model_name, a.field_code, a.company_name, a.company_id, a.bill_model_point, a.org_name, a.org_id, a.id, a.data_state, a.use_state, a.field_name,
select a.tenant_id, a.revision, a.created_by, a.created_time, a.updated_by, a.updated_time, a.delete_by, a.delete_time, a.dept_id, a.role_id, a.bill_model_no, a.bill_model_name, a.field_code, a.company_name, a.company_id, a.bill_model_point, a.org_name, a.org_id, a.id, a.data_state, a.use_state, a.field_name,a.model_type,
b.bill_model_no as sub_bill_model_no, b.asset_code as sub_asset_code, b.asset_name as sub_asset_name, b.asset_unit_code as sub_asset_unit_code, b.asset_unit_name as sub_asset_unit_name, b.asset_unit_type as sub_asset_unit_type, b.id as sub_id, b.asset_id as sub_asset_id,asset_unit_alials_name as sub_asset_unit_alials_name,a_unit as sub_a_unit
from dc_busi_bill_model_master a
left join dc_busi_bill_model_sub b on b.bill_model_no = a.bill_model_no
@ -102,6 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="dataState != null">data_state,</if>
<if test="useState != null">use_state,</if>
<if test="fieldName != null">field_name,</if>
<if test="modelType != null "> model_type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="tenantId != null">#{tenantId},</if>
@ -125,6 +128,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="dataState != null">#{dataState},</if>
<if test="useState != null">#{useState},</if>
<if test="fieldName != null">#{fieldName},</if>
<if test="modelType != null "> #{modelType},</if>
</trim>
</insert>
@ -152,6 +156,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="dataState != null">data_state = #{dataState},</if>
<if test="useState != null">use_state = #{useState},</if>
<if test="fieldName != null">field_name = #{fieldName},</if>
<if test="modelType != null"> model_type =#{modelType},</if>
</trim>
where id = #{id}
</update>

181
lzbi-module/src/main/resources/mapper/draft/DcBusiTargetBillMasterMapper.xml

@ -0,0 +1,181 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.lzbi.draft.mapper.DcBusiTargetBillMasterMapper">
<resultMap type="com.lzbi.draft.domain.DcBusiTargetBillMaster" id="DcBusiTargetBillMasterResult">
<result property="id" column="id" />
<result property="billNo" column="bill_no" />
<result property="billIncomeDate" column="bill_income_date" />
<result property="billType" column="bill_type" />
<result property="checkType" column="check_type" />
<result property="checkStatus" column="check_status" />
<result property="tenantId" column="tenant_id" />
<result property="revision" column="revision" />
<result property="createdBy" column="created_by" />
<result property="createdTime" column="created_time" />
<result property="updatedBy" column="updated_by" />
<result property="updatedTime" column="updated_time" />
<result property="deleteBy" column="delete_by" />
<result property="deleteTime" column="delete_time" />
<result property="companyId" column="company_id" />
<result property="companyName" column="company_name" />
<result property="organizeName" column="organize_name" />
<result property="oragnizeId" column="oragnize_id" />
</resultMap>
<resultMap id="DcBusiTargetBillMasterDcBusiTargetBillSubResult" type="DcBusiTargetBillMaster" extends="DcBusiTargetBillMasterResult">
<collection property="dcBusiTargetBillSubList" notNullColumn="sub_id" javaType="java.util.List" resultMap="DcBusiTargetBillSubResult" />
</resultMap>
<resultMap type="DcBusiTargetBillSub" id="DcBusiTargetBillSubResult">
<result property="id" column="sub_id" />
<result property="billNo" column="sub_bill_no" />
<result property="targetName" column="sub_target_name" />
<result property="targetCode" column="sub_target_code" />
<result property="targetUint" column="sub_target_uint" />
<result property="targetValue" column="sub_target_value" />
<result property="countDate" column="sub_count_date" />
<result property="countDay" column="sub_count_day" />
<result property="fieldCode" column="sub_field_code" />
<result property="fieldName" column="sub_field_name" />
<result property="assetCode" column="sub_asset_code" />
<result property="assetName" column="sub_asset_name" />
<result property="tenantId" column="sub_tenant_id" />
<result property="revision" column="sub_revision" />
<result property="createdBy" column="sub_created_by" />
<result property="createdTime" column="sub_created_time" />
<result property="updatedBy" column="sub_updated_by" />
<result property="updatedTime" column="sub_updated_time" />
<result property="deleteBy" column="sub_delete_by" />
<result property="deleteTime" column="sub_delete_time" />
</resultMap>
<sql id="selectDcBusiTargetBillMasterVo">
select id, bill_no, bill_income_date, bill_type, check_type, check_status, tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time, company_id, company_name, organize_name, oragnize_id from dc_busi_target_bill_master
</sql>
<select id="selectDcBusiTargetBillMasterList" parameterType="DcBusiTargetBillMaster" resultMap="DcBusiTargetBillMasterResult">
<include refid="selectDcBusiTargetBillMasterVo"/>
<where>
<if test="billNo != null and billNo != ''"> and bill_no = #{billNo}</if>
<if test="billIncomeDate != null and billIncomeDate != ''"> and bill_income_date = #{billIncomeDate}</if>
<if test="billType != null and billType != ''"> and bill_type = #{billType}</if>
<if test="checkType != null and checkType != ''"> and check_type = #{checkType}</if>
<if test="checkStatus != null and checkStatus != ''"> and check_status = #{checkStatus}</if>
<if test="companyId != null "> and company_id = #{companyId}</if>
<if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
<if test="organizeName != null and organizeName != ''"> and organize_name like concat('%', #{organizeName}, '%')</if>
<if test="oragnizeId != null "> and oragnize_id = #{oragnizeId}</if>
</where>
</select>
<select id="selectDcBusiTargetBillMasterById" parameterType="Long" resultMap="DcBusiTargetBillMasterDcBusiTargetBillSubResult">
select a.id, a.bill_no, a.bill_income_date, a.bill_type, a.check_type, a.check_status, a.tenant_id, a.revision, a.created_by, a.created_time, a.updated_by, a.updated_time, a.delete_by, a.delete_time, a.company_id, a.company_name, a.organize_name, a.oragnize_id,
b.id as sub_id, b.bill_no as sub_bill_no, b.target_name as sub_target_name, b.target_code as sub_target_code, b.target_uint as sub_target_uint, b.target_value as sub_target_value, b.count_date as sub_count_date, b.count_day as sub_count_day, b.field_code as sub_field_code, b.field_name as sub_field_name, b.asset_code as sub_asset_code, b.asset_name as sub_asset_name, b.tenant_id as sub_tenant_id, b.revision as sub_revision, b.created_by as sub_created_by, b.created_time as sub_created_time, b.updated_by as sub_updated_by, b.updated_time as sub_updated_time, b.delete_by as sub_delete_by, b.delete_time as sub_delete_time
from dc_busi_target_bill_master a
left join dc_busi_target_bill_sub b on b.bill_no = a.id
where a.id = #{id}
</select>
<insert id="insertDcBusiTargetBillMaster" parameterType="DcBusiTargetBillMaster" useGeneratedKeys="true" keyProperty="id">
insert into dc_busi_target_bill_master
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="billNo != null">bill_no,</if>
<if test="billIncomeDate != null">bill_income_date,</if>
<if test="billType != null">bill_type,</if>
<if test="checkType != null">check_type,</if>
<if test="checkStatus != null">check_status,</if>
<if test="tenantId != null">tenant_id,</if>
<if test="revision != null">revision,</if>
<if test="createdBy != null">created_by,</if>
<if test="createdTime != null">created_time,</if>
<if test="updatedBy != null">updated_by,</if>
<if test="updatedTime != null">updated_time,</if>
<if test="deleteBy != null">delete_by,</if>
<if test="deleteTime != null">delete_time,</if>
<if test="companyId != null">company_id,</if>
<if test="companyName != null">company_name,</if>
<if test="organizeName != null">organize_name,</if>
<if test="oragnizeId != null">oragnize_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="billNo != null">#{billNo},</if>
<if test="billIncomeDate != null">#{billIncomeDate},</if>
<if test="billType != null">#{billType},</if>
<if test="checkType != null">#{checkType},</if>
<if test="checkStatus != null">#{checkStatus},</if>
<if test="tenantId != null">#{tenantId},</if>
<if test="revision != null">#{revision},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="updatedBy != null">#{updatedBy},</if>
<if test="updatedTime != null">#{updatedTime},</if>
<if test="deleteBy != null">#{deleteBy},</if>
<if test="deleteTime != null">#{deleteTime},</if>
<if test="companyId != null">#{companyId},</if>
<if test="companyName != null">#{companyName},</if>
<if test="organizeName != null">#{organizeName},</if>
<if test="oragnizeId != null">#{oragnizeId},</if>
</trim>
</insert>
<update id="updateDcBusiTargetBillMaster" parameterType="DcBusiTargetBillMaster">
update dc_busi_target_bill_master
<trim prefix="SET" suffixOverrides=",">
<if test="billNo != null">bill_no = #{billNo},</if>
<if test="billIncomeDate != null">bill_income_date = #{billIncomeDate},</if>
<if test="billType != null">bill_type = #{billType},</if>
<if test="checkType != null">check_type = #{checkType},</if>
<if test="checkStatus != null">check_status = #{checkStatus},</if>
<if test="tenantId != null">tenant_id = #{tenantId},</if>
<if test="revision != null">revision = #{revision},</if>
<if test="createdBy != null">created_by = #{createdBy},</if>
<if test="createdTime != null">created_time = #{createdTime},</if>
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
<if test="deleteBy != null">delete_by = #{deleteBy},</if>
<if test="deleteTime != null">delete_time = #{deleteTime},</if>
<if test="companyId != null">company_id = #{companyId},</if>
<if test="companyName != null">company_name = #{companyName},</if>
<if test="organizeName != null">organize_name = #{organizeName},</if>
<if test="oragnizeId != null">oragnize_id = #{oragnizeId},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDcBusiTargetBillMasterById" parameterType="Long">
delete from dc_busi_target_bill_master where id = #{id}
</delete>
<select id="selectDcBusiTargetBillMasterBillNoByIds" parameterType="String" resultType="String">
select bill_no from dc_busi_target_bill_master where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</select>
<delete id="deleteDcBusiTargetBillMasterByIds" parameterType="String">
delete from dc_busi_target_bill_master where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<delete id="deleteDcBusiTargetBillSubByBillNos" parameterType="collection">
delete from dc_busi_target_bill_sub where bill_no in
<foreach item="billNo" collection="list" open="(" separator="," close=")">
#{billNo}
</foreach>
</delete>
<delete id="deleteDcBusiTargetBillSubByBillNo" parameterType="String">
delete from dc_busi_target_bill_sub where bill_no = #{billNo}
</delete>
<insert id="batchDcBusiTargetBillSub">
insert into dc_busi_target_bill_sub( id, bill_no, target_name, target_code, target_uint, target_value, count_date, count_day, field_code, field_name, asset_code, asset_name, tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time) values
<foreach item="item" index="index" collection="list" separator=",">
( #{item.id}, #{item.billNo}, #{item.targetName}, #{item.targetCode}, #{item.targetUint}, #{item.targetValue}, #{item.countDate}, #{item.countDay}, #{item.fieldCode}, #{item.fieldName}, #{item.assetCode}, #{item.assetName}, #{item.tenantId}, #{item.revision}, #{item.createdBy}, #{item.createdTime}, #{item.updatedBy}, #{item.updatedTime}, #{item.deleteBy}, #{item.deleteTime})
</foreach>
</insert>
</mapper>

55
lzbi-module/src/main/resources/mapper/targetFolder/DcBaseAssetTargetMapper.xml

@ -3,13 +3,14 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.lzbi.targetFolder.mapper.DcBaseAssetTargetMapper">
<resultMap type="com.lzbi.targetFolder.domain.DcBaseAssetTargetDao" id="DcBaseAssetTargetResult">
<resultMap type="com.lzbi.targetFolder.domain.DcBaseAssetTarget" id="DcBaseAssetTargetResult">
<result property="id" column="id" />
<result property="assetId" column="asset_id" />
<result property="assetCode" column="asset_code" />
<result property="assetId" column="asset_id" />
<result property="targetModelCode" column="target_model_code" />
<result property="targetName" column="target_name" />
<result property="targetNameAlias" column="target_name_alias" />
<result property="targetCode" column="target_code" />
<result property="targetField" column="target_field" />
<result property="limitUp" column="limit_up" />
@ -18,7 +19,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="flagAvg" column="flag_avg" />
<result property="flagSum" column="flag_sum" />
<result property="flagCompute" column="flag_compute" />
<result property="sort" column="sort" />
<result property="tenantId" column="tenant_id" />
<result property="revision" column="revision" />
<result property="createdBy" column="created_by" />
@ -27,19 +27,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updatedTime" column="updated_time" />
<result property="deleteBy" column="delete_by" />
<result property="deleteTime" column="delete_time" />
<result property="sort" column="sort" />
<result property="targetFieldName" column="target_field_name" />
<result property="fieldUnit" column="field_unit" />
<result property="columnType" column="column_type" />
<result property="fieldUnit" column="field_unit" />
</resultMap>
<sql id="selectDcBaseAssetTargetVo">
select id, asset_id,asset_code, target_model_code, target_name, target_code, target_field, limit_up, limit_down, value_base, flag_avg, flag_sum, flag_compute, sort, tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time,target_field_name
value_type,
field_unit
from dc_base_asset_target
select id, asset_code, asset_id, target_model_code, target_name, target_name_alias, target_code, target_field, limit_up, limit_down, value_base, flag_avg, flag_sum, flag_compute, tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time, sort, target_field_name, column_type, field_unit from dc_base_asset_target
</sql>
<select id="selectDcBaseAssetTargetDaoList" parameterType="DcBaseAssetTargetDao" resultMap="DcBaseAssetTargetResult">
<select id="selectDcBaseAssetTargetList" parameterType="DcBaseAssetTarget" resultMap="DcBaseAssetTargetResult">
<include refid="selectDcBaseAssetTargetVo"/>
<where>
<if test="assetId != null "> and asset_id = #{assetId}</if>
@ -53,17 +51,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectDcBaseAssetTargetDaoById" parameterType="Long" resultMap="DcBaseAssetTargetResult">
<select id="selectDcBaseAssetTargetById" parameterType="Long" resultMap="DcBaseAssetTargetResult">
<include refid="selectDcBaseAssetTargetVo"/>
where id = #{id}
</select>
<insert id="insertDcBaseAssetTargetDao" parameterType="DcBaseAssetTargetDao" useGeneratedKeys="true" keyProperty="id">
<insert id="insertDcBaseAssetTarget" parameterType="DcBaseAssetTarget" useGeneratedKeys="true" keyProperty="id">
insert into dc_base_asset_target
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="assetCode != null">asset_code,</if>
<if test="assetId != null">asset_id,</if>
<if test="targetModelCode != null">target_model_code,</if>
<if test="targetName != null">target_name,</if>
<if test="targetNameAlias != null">target_name_alias,</if>
<if test="targetCode != null">target_code,</if>
<if test="targetField != null">target_field,</if>
<if test="limitUp != null">limit_up,</if>
@ -72,7 +72,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="flagAvg != null">flag_avg,</if>
<if test="flagSum != null">flag_sum,</if>
<if test="flagCompute != null">flag_compute,</if>
<if test="sort != null">sort,</if>
<if test="tenantId != null">tenant_id,</if>
<if test="revision != null">revision,</if>
<if test="createdBy != null">created_by,</if>
@ -81,11 +80,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updatedTime != null">updated_time,</if>
<if test="deleteBy != null">delete_by,</if>
<if test="deleteTime != null">delete_time,</if>
</trim>
<if test="sort != null">sort,</if>
<if test="targetFieldName != null">target_field_name,</if>
<if test="columnType != null">column_type,</if>
<if test="fieldUnit != null">field_unit,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="assetCode != null">#{assetCode},</if>
<if test="assetId != null">#{assetId},</if>
<if test="targetModelCode != null">#{targetModelCode},</if>
<if test="targetName != null">#{targetName},</if>
<if test="targetNameAlias != null">#{targetNameAlias},</if>
<if test="targetCode != null">#{targetCode},</if>
<if test="targetField != null">#{targetField},</if>
<if test="limitUp != null">#{limitUp},</if>
@ -94,7 +99,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="flagAvg != null">#{flagAvg},</if>
<if test="flagSum != null">#{flagSum},</if>
<if test="flagCompute != null">#{flagCompute},</if>
<if test="sort != null">#{sort},</if>
<if test="tenantId != null">#{tenantId},</if>
<if test="revision != null">#{revision},</if>
<if test="createdBy != null">#{createdBy},</if>
@ -103,15 +107,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updatedTime != null">#{updatedTime},</if>
<if test="deleteBy != null">#{deleteBy},</if>
<if test="deleteTime != null">#{deleteTime},</if>
</trim>
<if test="sort != null">#{sort},</if>
<if test="targetFieldName != null">#{targetFieldName},</if>
<if test="columnType != null">#{columnType},</if>
<if test="fieldUnit != null">#{fieldUnit},</if>
</trim>
</insert>
<update id="updateDcBaseAssetTargetDao" parameterType="DcBaseAssetTargetDao">
<update id="updateDcBaseAssetTarget" parameterType="DcBaseAssetTarget">
update dc_base_asset_target
<trim prefix="SET" suffixOverrides=",">
<if test="assetCode != null">asset_code = #{assetCode},</if>
<if test="assetId != null">asset_id = #{assetId},</if>
<if test="targetModelCode != null">target_model_code = #{targetModelCode},</if>
<if test="targetName != null">target_name = #{targetName},</if>
<if test="targetNameAlias != null">target_name_alias = #{targetNameAlias},</if>
<if test="targetCode != null">target_code = #{targetCode},</if>
<if test="targetField != null">target_field = #{targetField},</if>
<if test="limitUp != null">limit_up = #{limitUp},</if>
@ -120,7 +130,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="flagAvg != null">flag_avg = #{flagAvg},</if>
<if test="flagSum != null">flag_sum = #{flagSum},</if>
<if test="flagCompute != null">flag_compute = #{flagCompute},</if>
<if test="sort != null">sort = #{sort},</if>
<if test="tenantId != null">tenant_id = #{tenantId},</if>
<if test="revision != null">revision = #{revision},</if>
<if test="createdBy != null">created_by = #{createdBy},</if>
@ -129,15 +138,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
<if test="deleteBy != null">delete_by = #{deleteBy},</if>
<if test="deleteTime != null">delete_time = #{deleteTime},</if>
<if test="sort != null">sort = #{sort},</if>
<if test="targetFieldName != null">target_field_name = #{targetFieldName},</if>
<if test="columnType != null">column_type = #{columnType},</if>
<if test="fieldUnit != null">field_unit = #{fieldUnit},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDcBaseAssetTargetDaoById" parameterType="Long">
<delete id="deleteDcBaseAssetTargetById" parameterType="Long">
delete from dc_base_asset_target where id = #{id}
</delete>
<delete id="deleteDcBaseAssetTargetDaoByIds" parameterType="String">
<delete id="deleteDcBaseAssetTargetByIds" parameterType="String">
delete from dc_base_asset_target where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}

Loading…
Cancel
Save