zhousq
12 months ago
37 changed files with 3429 additions and 177 deletions
@ -0,0 +1,115 @@ |
|||||
|
package ${packageName}.controller; |
||||
|
|
||||
|
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 ${packageName}.domain.${ClassName}; |
||||
|
import ${packageName}.service.I${ClassName}Service; |
||||
|
import com.lzbi.common.utils.poi.ExcelUtil; |
||||
|
#if($table.crud || $table.sub) |
||||
|
import com.lzbi.common.core.page.TableDataInfo; |
||||
|
#elseif($table.tree) |
||||
|
#end |
||||
|
|
||||
|
/** |
||||
|
* ${functionName}Controller |
||||
|
* |
||||
|
* @author ${author} |
||||
|
* @date ${datetime} |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("/${moduleName}/${businessName}") |
||||
|
public class ${ClassName}Controller extends BaseController |
||||
|
{ |
||||
|
@Autowired |
||||
|
private I${ClassName}Service ${className}Service; |
||||
|
|
||||
|
/** |
||||
|
* 查询${functionName}列表 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:list')") |
||||
|
@GetMapping("/list") |
||||
|
#if($table.crud || $table.sub) |
||||
|
public TableDataInfo list(${ClassName} ${className}) |
||||
|
{ |
||||
|
startPage(); |
||||
|
List<${ClassName}> list = ${className}Service.select${ClassName}List(${className}); |
||||
|
return getDataTable(list); |
||||
|
} |
||||
|
#elseif($table.tree) |
||||
|
public AjaxResult list(${ClassName} ${className}) |
||||
|
{ |
||||
|
List<${ClassName}> list = ${className}Service.select${ClassName}List(${className}); |
||||
|
return success(list); |
||||
|
} |
||||
|
#end |
||||
|
|
||||
|
/** |
||||
|
* 导出${functionName}列表 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:export')") |
||||
|
@Log(title = "${functionName}", businessType = BusinessType.EXPORT) |
||||
|
@PostMapping("/export") |
||||
|
public void export(HttpServletResponse response, ${ClassName} ${className}) |
||||
|
{ |
||||
|
List<${ClassName}> list = ${className}Service.select${ClassName}List(${className}); |
||||
|
ExcelUtil<${ClassName}> util = new ExcelUtil<${ClassName}>(${ClassName}.class); |
||||
|
util.exportExcel(response, list, "${functionName}数据"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取${functionName}详细信息 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:query')") |
||||
|
@GetMapping(value = "/{${pkColumn.javaField}}") |
||||
|
public AjaxResult getInfo(@PathVariable("${pkColumn.javaField}") ${pkColumn.javaType} ${pkColumn.javaField}) |
||||
|
{ |
||||
|
return success(${className}Service.select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaField})); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增${functionName} |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:add')") |
||||
|
@Log(title = "${functionName}", businessType = BusinessType.INSERT) |
||||
|
@PostMapping |
||||
|
public AjaxResult add(@RequestBody ${ClassName} ${className}) |
||||
|
{ |
||||
|
return toAjax(${className}Service.insert${ClassName}(${className})); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改${functionName} |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:edit')") |
||||
|
@Log(title = "${functionName}", businessType = BusinessType.UPDATE) |
||||
|
@PutMapping |
||||
|
public AjaxResult edit(@RequestBody ${ClassName} ${className}) |
||||
|
{ |
||||
|
return toAjax(${className}Service.update${ClassName}(${className})); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除${functionName} |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:remove')") |
||||
|
@Log(title = "${functionName}", businessType = BusinessType.DELETE) |
||||
|
@DeleteMapping("/{${pkColumn.javaField}s}") |
||||
|
public AjaxResult remove(@PathVariable ${pkColumn.javaType}[] ${pkColumn.javaField}s) |
||||
|
{ |
||||
|
return toAjax(${className}Service.delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaField}s)); |
||||
|
} |
||||
|
} |
@ -0,0 +1,105 @@ |
|||||
|
package ${packageName}.domain; |
||||
|
|
||||
|
#foreach ($import in $importList) |
||||
|
import ${import}; |
||||
|
#end |
||||
|
import org.apache.commons.lang3.builder.ToStringBuilder; |
||||
|
import org.apache.commons.lang3.builder.ToStringStyle; |
||||
|
import com.lzbi.common.annotation.Excel; |
||||
|
#if($table.crud || $table.sub) |
||||
|
import com.lzbi.common.core.domain.BaseEntity; |
||||
|
#elseif($table.tree) |
||||
|
import com.lzbi.common.core.domain.TreeEntity; |
||||
|
#end |
||||
|
|
||||
|
/** |
||||
|
* ${functionName}对象 ${tableName} |
||||
|
* |
||||
|
* @author ${author} |
||||
|
* @date ${datetime} |
||||
|
*/ |
||||
|
#if($table.crud || $table.sub) |
||||
|
#set($Entity="BaseEntity") |
||||
|
#elseif($table.tree) |
||||
|
#set($Entity="TreeEntity") |
||||
|
#end |
||||
|
public class ${ClassName} extends ${Entity} |
||||
|
{ |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
#foreach ($column in $columns) |
||||
|
#if(!$table.isSuperColumn($column.javaField)) |
||||
|
/** $column.columnComment */ |
||||
|
#if($column.list) |
||||
|
#set($parentheseIndex=$column.columnComment.indexOf("(")) |
||||
|
#if($parentheseIndex != -1) |
||||
|
#set($comment=$column.columnComment.substring(0, $parentheseIndex)) |
||||
|
#else |
||||
|
#set($comment=$column.columnComment) |
||||
|
#end |
||||
|
#if($parentheseIndex != -1) |
||||
|
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") |
||||
|
#elseif($column.javaType == 'Date') |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd") |
||||
|
@Excel(name = "${comment}", width = 30, dateFormat = "yyyy-MM-dd") |
||||
|
#else |
||||
|
@Excel(name = "${comment}") |
||||
|
#end |
||||
|
#end |
||||
|
private $column.javaType $column.javaField; |
||||
|
|
||||
|
#end |
||||
|
#end |
||||
|
#if($table.sub) |
||||
|
/** $table.subTable.functionName信息 */ |
||||
|
private List<${subClassName}> ${subclassName}List; |
||||
|
|
||||
|
#end |
||||
|
#foreach ($column in $columns) |
||||
|
#if(!$table.isSuperColumn($column.javaField)) |
||||
|
#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]")) |
||||
|
#set($AttrName=$column.javaField) |
||||
|
#else |
||||
|
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) |
||||
|
#end |
||||
|
public void set${AttrName}($column.javaType $column.javaField) |
||||
|
{ |
||||
|
this.$column.javaField = $column.javaField; |
||||
|
} |
||||
|
|
||||
|
public $column.javaType get${AttrName}() |
||||
|
{ |
||||
|
return $column.javaField; |
||||
|
} |
||||
|
#end |
||||
|
#end |
||||
|
|
||||
|
#if($table.sub) |
||||
|
public List<${subClassName}> get${subClassName}List() |
||||
|
{ |
||||
|
return ${subclassName}List; |
||||
|
} |
||||
|
|
||||
|
public void set${subClassName}List(List<${subClassName}> ${subclassName}List) |
||||
|
{ |
||||
|
this.${subclassName}List = ${subclassName}List; |
||||
|
} |
||||
|
|
||||
|
#end |
||||
|
@Override |
||||
|
public String toString() { |
||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
||||
|
#foreach ($column in $columns) |
||||
|
#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]")) |
||||
|
#set($AttrName=$column.javaField) |
||||
|
#else |
||||
|
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) |
||||
|
#end |
||||
|
.append("${column.javaField}", get${AttrName}()) |
||||
|
#end |
||||
|
#if($table.sub) |
||||
|
.append("${subclassName}List", get${subClassName}List()) |
||||
|
#end |
||||
|
.toString(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,91 @@ |
|||||
|
package ${packageName}.mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import ${packageName}.domain.${ClassName}; |
||||
|
#if($table.sub) |
||||
|
import ${packageName}.domain.${subClassName}; |
||||
|
#end |
||||
|
|
||||
|
/** |
||||
|
* ${functionName}Mapper接口 |
||||
|
* |
||||
|
* @author ${author} |
||||
|
* @date ${datetime} |
||||
|
*/ |
||||
|
public interface ${ClassName}Mapper |
||||
|
{ |
||||
|
/** |
||||
|
* 查询${functionName} |
||||
|
* |
||||
|
* @param ${pkColumn.javaField} ${functionName}主键 |
||||
|
* @return ${functionName} |
||||
|
*/ |
||||
|
public ${ClassName} select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); |
||||
|
|
||||
|
/** |
||||
|
* 查询${functionName}列表 |
||||
|
* |
||||
|
* @param ${className} ${functionName} |
||||
|
* @return ${functionName}集合 |
||||
|
*/ |
||||
|
public List<${ClassName}> select${ClassName}List(${ClassName} ${className}); |
||||
|
|
||||
|
/** |
||||
|
* 新增${functionName} |
||||
|
* |
||||
|
* @param ${className} ${functionName} |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int insert${ClassName}(${ClassName} ${className}); |
||||
|
|
||||
|
/** |
||||
|
* 修改${functionName} |
||||
|
* |
||||
|
* @param ${className} ${functionName} |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int update${ClassName}(${ClassName} ${className}); |
||||
|
|
||||
|
/** |
||||
|
* 删除${functionName} |
||||
|
* |
||||
|
* @param ${pkColumn.javaField} ${functionName}主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除${functionName} |
||||
|
* |
||||
|
* @param ${pkColumn.javaField}s 需要删除的数据主键集合 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s); |
||||
|
#if($table.sub) |
||||
|
|
||||
|
/** |
||||
|
* 批量删除${subTable.functionName} |
||||
|
* |
||||
|
* @param ${pkColumn.javaField}s 需要删除的数据主键集合 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int delete${subClassName}By${subTableFkClassName}s(${pkColumn.javaType}[] ${pkColumn.javaField}s); |
||||
|
|
||||
|
/** |
||||
|
* 批量新增${subTable.functionName} |
||||
|
* |
||||
|
* @param ${subclassName}List ${subTable.functionName}列表 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int batch${subClassName}(List<${subClassName}> ${subclassName}List); |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 通过${functionName}主键删除${subTable.functionName}信息 |
||||
|
* |
||||
|
* @param ${pkColumn.javaField} ${functionName}ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int delete${subClassName}By${subTableFkClassName}(${pkColumn.javaType} ${pkColumn.javaField}); |
||||
|
#end |
||||
|
} |
@ -0,0 +1 @@ |
|||||
|
原若依3.8.6自带的mybits版本代码,如需使用替换上级目录的文件 |
@ -0,0 +1,61 @@ |
|||||
|
package ${packageName}.service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import ${packageName}.domain.${ClassName}; |
||||
|
|
||||
|
/** |
||||
|
* ${functionName}Service接口 |
||||
|
* |
||||
|
* @author ${author} |
||||
|
* @date ${datetime} |
||||
|
*/ |
||||
|
public interface I${ClassName}Service |
||||
|
{ |
||||
|
/** |
||||
|
* 查询${functionName} |
||||
|
* |
||||
|
* @param ${pkColumn.javaField} ${functionName}主键 |
||||
|
* @return ${functionName} |
||||
|
*/ |
||||
|
public ${ClassName} select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); |
||||
|
|
||||
|
/** |
||||
|
* 查询${functionName}列表 |
||||
|
* |
||||
|
* @param ${className} ${functionName} |
||||
|
* @return ${functionName}集合 |
||||
|
*/ |
||||
|
public List<${ClassName}> select${ClassName}List(${ClassName} ${className}); |
||||
|
|
||||
|
/** |
||||
|
* 新增${functionName} |
||||
|
* |
||||
|
* @param ${className} ${functionName} |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int insert${ClassName}(${ClassName} ${className}); |
||||
|
|
||||
|
/** |
||||
|
* 修改${functionName} |
||||
|
* |
||||
|
* @param ${className} ${functionName} |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int update${ClassName}(${ClassName} ${className}); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除${functionName} |
||||
|
* |
||||
|
* @param ${pkColumn.javaField}s 需要删除的${functionName}主键集合 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s); |
||||
|
|
||||
|
/** |
||||
|
* 删除${functionName}信息 |
||||
|
* |
||||
|
* @param ${pkColumn.javaField} ${functionName}主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); |
||||
|
} |
@ -0,0 +1,76 @@ |
|||||
|
package ${packageName}.domain; |
||||
|
|
||||
|
#foreach ($import in $subImportList) |
||||
|
import ${import}; |
||||
|
#end |
||||
|
import org.apache.commons.lang3.builder.ToStringBuilder; |
||||
|
import org.apache.commons.lang3.builder.ToStringStyle; |
||||
|
import com.lzbi.common.annotation.Excel; |
||||
|
import com.lzbi.common.core.domain.BaseEntity; |
||||
|
|
||||
|
/** |
||||
|
* ${subTable.functionName}对象 ${subTableName} |
||||
|
* |
||||
|
* @author ${author} |
||||
|
* @date ${datetime} |
||||
|
*/ |
||||
|
public class ${subClassName} extends BaseEntity |
||||
|
{ |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
#foreach ($column in $subTable.columns) |
||||
|
#if(!$table.isSuperColumn($column.javaField)) |
||||
|
/** $column.columnComment */ |
||||
|
#if($column.list) |
||||
|
#set($parentheseIndex=$column.columnComment.indexOf("(")) |
||||
|
#if($parentheseIndex != -1) |
||||
|
#set($comment=$column.columnComment.substring(0, $parentheseIndex)) |
||||
|
#else |
||||
|
#set($comment=$column.columnComment) |
||||
|
#end |
||||
|
#if($parentheseIndex != -1) |
||||
|
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") |
||||
|
#elseif($column.javaType == 'Date') |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd") |
||||
|
@Excel(name = "${comment}", width = 30, dateFormat = "yyyy-MM-dd") |
||||
|
#else |
||||
|
@Excel(name = "${comment}") |
||||
|
#end |
||||
|
#end |
||||
|
private $column.javaType $column.javaField; |
||||
|
|
||||
|
#end |
||||
|
#end |
||||
|
#foreach ($column in $subTable.columns) |
||||
|
#if(!$table.isSuperColumn($column.javaField)) |
||||
|
#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]")) |
||||
|
#set($AttrName=$column.javaField) |
||||
|
#else |
||||
|
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) |
||||
|
#end |
||||
|
public void set${AttrName}($column.javaType $column.javaField) |
||||
|
{ |
||||
|
this.$column.javaField = $column.javaField; |
||||
|
} |
||||
|
|
||||
|
public $column.javaType get${AttrName}() |
||||
|
{ |
||||
|
return $column.javaField; |
||||
|
} |
||||
|
#end |
||||
|
#end |
||||
|
|
||||
|
@Override |
||||
|
public String toString() { |
||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
||||
|
#foreach ($column in $subTable.columns) |
||||
|
#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]")) |
||||
|
#set($AttrName=$column.javaField) |
||||
|
#else |
||||
|
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) |
||||
|
#end |
||||
|
.append("${column.javaField}", get${AttrName}()) |
||||
|
#end |
||||
|
.toString(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,474 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px"> |
||||
|
#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-form-item label="${comment}" prop="${column.javaField}"> |
||||
|
<el-input |
||||
|
v-model="queryParams.${column.javaField}" |
||||
|
placeholder="请输入${comment}" |
||||
|
clearable |
||||
|
@keyup.enter="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && "" != $dictType) |
||||
|
<el-form-item label="${comment}" prop="${column.javaField}"> |
||||
|
<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> |
||||
|
#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && $dictType) |
||||
|
<el-form-item label="${comment}" prop="${column.javaField}"> |
||||
|
<el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable> |
||||
|
<el-option label="请选择字典生成" value="" /> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
#elseif($column.htmlType == "datetime" && $column.queryType != "BETWEEN") |
||||
|
<el-form-item label="${comment}" prop="${column.javaField}"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="queryParams.${column.javaField}" |
||||
|
type="date" |
||||
|
value-format="YYYY-MM-DD" |
||||
|
placeholder="选择${comment}"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
#elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN") |
||||
|
<el-form-item label="${comment}" style="width: 308px"> |
||||
|
<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> |
||||
|
#end |
||||
|
#end |
||||
|
#end |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> |
||||
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button> |
||||
|
</el-form-item> |
||||
|
</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="info" |
||||
|
plain |
||||
|
icon="Sort" |
||||
|
@click="toggleExpandAll" |
||||
|
>展开/折叠</el-button> |
||||
|
</el-col> |
||||
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-table |
||||
|
v-if="refreshTable" |
||||
|
v-loading="loading" |
||||
|
:data="${businessName}List" |
||||
|
row-key="${treeCode}" |
||||
|
:default-expand-all="isExpandAll" |
||||
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" |
||||
|
> |
||||
|
#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) |
||||
|
#elseif($column.list && $column.htmlType == "datetime") |
||||
|
<el-table-column label="${comment}" align="center" 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" 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" 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) |
||||
|
#if(${foreach.index} == 1) |
||||
|
<el-table-column label="${comment}" prop="${javaField}" /> |
||||
|
#else |
||||
|
<el-table-column label="${comment}" align="center" prop="${javaField}" /> |
||||
|
#end |
||||
|
#end |
||||
|
#end |
||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
||||
|
<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="Plus" @click="handleAdd(scope.row)" v-hasPermi="['${moduleName}:${businessName}:add']">新增</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> |
||||
|
|
||||
|
<!-- 添加或修改${functionName}对话框 --> |
||||
|
<el-dialog :title="title" v-model="open" width="500px" append-to-body> |
||||
|
<el-form ref="${businessName}Ref" :model="form" :rules="rules" label-width="80px"> |
||||
|
#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("" != $treeParentCode && $column.javaField == $treeParentCode) |
||||
|
<el-form-item label="${comment}" prop="${treeParentCode}"> |
||||
|
<el-tree-select |
||||
|
v-model="form.${treeParentCode}" |
||||
|
:data="${businessName}Options" |
||||
|
:props="{ value: '${treeCode}', label: '${treeName}', children: 'children' }" |
||||
|
value-key="${treeCode}" |
||||
|
placeholder="请选择${comment}" |
||||
|
check-strictly |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
#elseif($column.htmlType == "input") |
||||
|
<el-form-item label="${comment}" prop="${field}"> |
||||
|
<el-input v-model="form.${field}" placeholder="请输入${comment}" /> |
||||
|
</el-form-item> |
||||
|
#elseif($column.htmlType == "imageUpload") |
||||
|
<el-form-item label="${comment}" prop="${field}"> |
||||
|
<image-upload v-model="form.${field}"/> |
||||
|
</el-form-item> |
||||
|
#elseif($column.htmlType == "fileUpload") |
||||
|
<el-form-item label="${comment}" prop="${field}"> |
||||
|
<file-upload v-model="form.${field}"/> |
||||
|
</el-form-item> |
||||
|
#elseif($column.htmlType == "editor") |
||||
|
<el-form-item label="${comment}"> |
||||
|
<editor v-model="form.${field}" :min-height="192"/> |
||||
|
</el-form-item> |
||||
|
#elseif($column.htmlType == "select" && "" != $dictType) |
||||
|
<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> |
||||
|
#elseif($column.htmlType == "select" && $dictType) |
||||
|
<el-form-item label="${comment}" prop="${field}"> |
||||
|
<el-select v-model="form.${field}" placeholder="请选择${comment}"> |
||||
|
<el-option label="请选择字典生成" value="" /> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
#elseif($column.htmlType == "checkbox" && "" != $dictType) |
||||
|
<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> |
||||
|
#elseif($column.htmlType == "checkbox" && $dictType) |
||||
|
<el-form-item label="${comment}" prop="${field}"> |
||||
|
<el-checkbox-group v-model="form.${field}"> |
||||
|
<el-checkbox>请选择字典生成</el-checkbox> |
||||
|
</el-checkbox-group> |
||||
|
</el-form-item> |
||||
|
#elseif($column.htmlType == "radio" && "" != $dictType) |
||||
|
<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> |
||||
|
#elseif($column.htmlType == "radio" && $dictType) |
||||
|
<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> |
||||
|
#elseif($column.htmlType == "datetime") |
||||
|
<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> |
||||
|
#elseif($column.htmlType == "textarea") |
||||
|
<el-form-item label="${comment}" prop="${field}"> |
||||
|
<el-input v-model="form.${field}" type="textarea" placeholder="请输入内容" /> |
||||
|
</el-form-item> |
||||
|
#end |
||||
|
#end |
||||
|
#end |
||||
|
#end |
||||
|
</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> |
||||
|
|
||||
|
<script setup name="${BusinessName}"> |
||||
|
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}"; |
||||
|
|
||||
|
const { proxy } = getCurrentInstance(); |
||||
|
#if(${dicts} != '') |
||||
|
#set($dictsNoSymbol=$dicts.replace("'", "")) |
||||
|
const { ${dictsNoSymbol} } = proxy.useDict(${dicts}); |
||||
|
#end |
||||
|
|
||||
|
const ${businessName}List = ref([]); |
||||
|
const ${businessName}Options = ref([]); |
||||
|
const open = ref(false); |
||||
|
const loading = ref(true); |
||||
|
const showSearch = ref(true); |
||||
|
const title = ref(""); |
||||
|
const isExpandAll = ref(true); |
||||
|
const refreshTable = ref(true); |
||||
|
#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: { |
||||
|
#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 = proxy.handleTree(response.data, "${treeCode}", "${treeParentCode}"); |
||||
|
loading.value = false; |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/** 查询${functionName}下拉树结构 */ |
||||
|
function getTreeselect() { |
||||
|
list${BusinessName}().then(response => { |
||||
|
${businessName}Options.value = []; |
||||
|
const data = { ${treeCode}: 0, ${treeName}: '顶级节点', children: [] }; |
||||
|
data.children = proxy.handleTree(response.data, "${treeCode}", "${treeParentCode}"); |
||||
|
${businessName}Options.value.push(data); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
// 取消按钮 |
||||
|
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 |
||||
|
}; |
||||
|
proxy.resetForm("${businessName}Ref"); |
||||
|
} |
||||
|
|
||||
|
/** 搜索按钮操作 */ |
||||
|
function handleQuery() { |
||||
|
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 handleAdd(row) { |
||||
|
reset(); |
||||
|
getTreeselect(); |
||||
|
if (row != null && row.${treeCode}) { |
||||
|
form.value.${treeParentCode} = row.${treeCode}; |
||||
|
} else { |
||||
|
form.value.${treeParentCode} = 0; |
||||
|
} |
||||
|
open.value = true; |
||||
|
title.value = "添加${functionName}"; |
||||
|
} |
||||
|
|
||||
|
/** 展开/折叠操作 */ |
||||
|
function toggleExpandAll() { |
||||
|
refreshTable.value = false; |
||||
|
isExpandAll.value = !isExpandAll.value; |
||||
|
nextTick(() => { |
||||
|
refreshTable.value = true; |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/** 修改按钮操作 */ |
||||
|
async function handleUpdate(row) { |
||||
|
reset(); |
||||
|
await getTreeselect(); |
||||
|
if (row != null) { |
||||
|
form.value.${treeParentCode} = row.${treeParentCode}; |
||||
|
} |
||||
|
get${BusinessName}(row.${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 |
||||
|
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 (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) { |
||||
|
proxy.#[[$modal]]#.confirm('是否确认删除${functionName}编号为"' + row.${pkColumn.javaField} + '"的数据项?').then(function() { |
||||
|
return del${BusinessName}(row.${pkColumn.javaField}); |
||||
|
}).then(() => { |
||||
|
getList(); |
||||
|
proxy.#[[$modal]]#.msgSuccess("删除成功"); |
||||
|
}).catch(() => {}); |
||||
|
} |
||||
|
|
||||
|
getList(); |
||||
|
</script> |
@ -0,0 +1,590 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px"> |
||||
|
#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-form-item label="${comment}" prop="${column.javaField}"> |
||||
|
<el-input |
||||
|
v-model="queryParams.${column.javaField}" |
||||
|
placeholder="请输入${comment}" |
||||
|
clearable |
||||
|
@keyup.enter="handleQuery" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && "" != $dictType) |
||||
|
<el-form-item label="${comment}" prop="${column.javaField}"> |
||||
|
<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> |
||||
|
#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && $dictType) |
||||
|
<el-form-item label="${comment}" prop="${column.javaField}"> |
||||
|
<el-select v-model="queryParams.${column.javaField}" placeholder="请选择${comment}" clearable> |
||||
|
<el-option label="请选择字典生成" value="" /> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
#elseif($column.htmlType == "datetime" && $column.queryType != "BETWEEN") |
||||
|
<el-form-item label="${comment}" prop="${column.javaField}"> |
||||
|
<el-date-picker clearable |
||||
|
v-model="queryParams.${column.javaField}" |
||||
|
type="date" |
||||
|
value-format="YYYY-MM-DD" |
||||
|
placeholder="请选择${comment}"> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
#elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN") |
||||
|
<el-form-item label="${comment}" style="width: 308px"> |
||||
|
<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> |
||||
|
#end |
||||
|
#end |
||||
|
#end |
||||
|
<el-form-item> |
||||
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> |
||||
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button> |
||||
|
</el-form-item> |
||||
|
</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"> |
||||
|
<el-table-column type="selection" width="55" align="center" /> |
||||
|
#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" prop="${javaField}" /> |
||||
|
#elseif($column.list && $column.htmlType == "datetime") |
||||
|
<el-table-column label="${comment}" align="center" 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" 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" 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" prop="${javaField}" /> |
||||
|
#end |
||||
|
#end |
||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
||||
|
<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="false"> |
||||
|
<el-form ref="${businessName}Ref" :model="form" :rules="rules" label-width="80px"> |
||||
|
#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-form-item label="${comment}" prop="${field}"> |
||||
|
<el-input v-model="form.${field}" placeholder="请输入${comment}" /> |
||||
|
</el-form-item> |
||||
|
#elseif($column.htmlType == "imageUpload") |
||||
|
<el-form-item label="${comment}" prop="${field}"> |
||||
|
<image-upload v-model="form.${field}"/> |
||||
|
</el-form-item> |
||||
|
#elseif($column.htmlType == "fileUpload") |
||||
|
<el-form-item label="${comment}" prop="${field}"> |
||||
|
<file-upload v-model="form.${field}"/> |
||||
|
</el-form-item> |
||||
|
#elseif($column.htmlType == "editor") |
||||
|
<el-form-item label="${comment}"> |
||||
|
<editor v-model="form.${field}" :min-height="192"/> |
||||
|
</el-form-item> |
||||
|
#elseif($column.htmlType == "select" && "" != $dictType) |
||||
|
<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> |
||||
|
#elseif($column.htmlType == "select" && $dictType) |
||||
|
<el-form-item label="${comment}" prop="${field}"> |
||||
|
<el-select v-model="form.${field}" placeholder="请选择${comment}"> |
||||
|
<el-option label="请选择字典生成" value="" /> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
#elseif($column.htmlType == "checkbox" && "" != $dictType) |
||||
|
<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> |
||||
|
#elseif($column.htmlType == "checkbox" && $dictType) |
||||
|
<el-form-item label="${comment}" prop="${field}"> |
||||
|
<el-checkbox-group v-model="form.${field}"> |
||||
|
<el-checkbox>请选择字典生成</el-checkbox> |
||||
|
</el-checkbox-group> |
||||
|
</el-form-item> |
||||
|
#elseif($column.htmlType == "radio" && "" != $dictType) |
||||
|
<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> |
||||
|
#elseif($column.htmlType == "radio" && $dictType) |
||||
|
<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> |
||||
|
#elseif($column.htmlType == "datetime") |
||||
|
<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> |
||||
|
#elseif($column.htmlType == "textarea") |
||||
|
<el-form-item label="${comment}" prop="${field}"> |
||||
|
<el-input v-model="form.${field}" type="textarea" placeholder="请输入内容" /> |
||||
|
</el-form-item> |
||||
|
#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-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> |
||||
|
|
||||
|
<script setup name="${BusinessName}"> |
||||
|
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}"; |
||||
|
|
||||
|
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(""); |
||||
|
#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`) |
||||
|
} |
||||
|
|
||||
|
getList(); |
||||
|
</script> |
@ -0,0 +1 @@ |
|||||
|
原有 v2版本的代码模版 |
@ -0,0 +1,104 @@ |
|||||
|
package com.lzbi.draft.controller; |
||||
|
|
||||
|
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.DcBusiParamBillMasterDao; |
||||
|
import com.lzbi.draft.service.DcBusiParamBillMasterService; |
||||
|
import com.lzbi.common.utils.poi.ExcelUtil; |
||||
|
import com.lzbi.common.core.page.TableDataInfo; |
||||
|
|
||||
|
/** |
||||
|
* 参数采集(录入)单据主Controller |
||||
|
* |
||||
|
* @author win |
||||
|
* @date 2023-11-28 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("/asset/paramData") |
||||
|
public class DcBusiParamBillMasterController extends BaseController |
||||
|
{ |
||||
|
@Autowired |
||||
|
private DcBusiParamBillMasterService dcBusiParamBillMasterService; |
||||
|
|
||||
|
/** |
||||
|
* 查询参数采集(录入)单据主列表 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('param:paramData:list')") |
||||
|
@GetMapping("/list") |
||||
|
public TableDataInfo list(DcBusiParamBillMasterDao dcBusiParamBillMasterDao) |
||||
|
{ |
||||
|
startPage(); |
||||
|
List<DcBusiParamBillMasterDao> list = dcBusiParamBillMasterService.selectDcBusiParamBillMasterDaoList(dcBusiParamBillMasterDao); |
||||
|
return getDataTable(list); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 导出参数采集(录入)单据主列表 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('param:paramData:export')") |
||||
|
@Log(title = "参数采集(录入)单据主", businessType = BusinessType.EXPORT) |
||||
|
@PostMapping("/export") |
||||
|
public void export(HttpServletResponse response, DcBusiParamBillMasterDao dcBusiParamBillMasterDao) |
||||
|
{ |
||||
|
List<DcBusiParamBillMasterDao> list = dcBusiParamBillMasterService.selectDcBusiParamBillMasterDaoList(dcBusiParamBillMasterDao); |
||||
|
ExcelUtil<DcBusiParamBillMasterDao> util = new ExcelUtil<DcBusiParamBillMasterDao>(DcBusiParamBillMasterDao.class); |
||||
|
util.exportExcel(response, list, "参数采集(录入)单据主数据"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取参数采集(录入)单据主详细信息 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('param:paramData:query')") |
||||
|
@GetMapping(value = "/{id}") |
||||
|
public AjaxResult getInfo(@PathVariable("id") Long id) |
||||
|
{ |
||||
|
return success(dcBusiParamBillMasterService.selectDcBusiParamBillMasterDaoById(id)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增参数采集(录入)单据主 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('param:paramData:add')") |
||||
|
@Log(title = "参数采集(录入)单据主", businessType = BusinessType.INSERT) |
||||
|
@PostMapping |
||||
|
public AjaxResult add(@RequestBody DcBusiParamBillMasterDao dcBusiParamBillMasterDao) |
||||
|
{ |
||||
|
return toAjax(dcBusiParamBillMasterService.insertDcBusiParamBillMasterDao(dcBusiParamBillMasterDao)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改参数采集(录入)单据主 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('param:paramData:edit')") |
||||
|
@Log(title = "参数采集(录入)单据主", businessType = BusinessType.UPDATE) |
||||
|
@PutMapping |
||||
|
public AjaxResult edit(@RequestBody DcBusiParamBillMasterDao dcBusiParamBillMasterDao) |
||||
|
{ |
||||
|
return toAjax(dcBusiParamBillMasterService.updateDcBusiParamBillMasterDao(dcBusiParamBillMasterDao)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除参数采集(录入)单据主 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('param:paramData:remove')") |
||||
|
@Log(title = "参数采集(录入)单据主", businessType = BusinessType.DELETE) |
||||
|
@DeleteMapping("/{ids}") |
||||
|
public AjaxResult remove(@PathVariable Long[] ids) |
||||
|
{ |
||||
|
return toAjax(dcBusiParamBillMasterService.deleteDcBusiParamBillMasterDaoByIds(ids)); |
||||
|
} |
||||
|
} |
@ -0,0 +1,104 @@ |
|||||
|
package com.lzbi.draft.controller; |
||||
|
|
||||
|
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.DcBusiTargetDraftDayDao; |
||||
|
import com.lzbi.draft.service.DcBusiTargetDraftDayService; |
||||
|
import com.lzbi.common.utils.poi.ExcelUtil; |
||||
|
import com.lzbi.common.core.page.TableDataInfo; |
||||
|
|
||||
|
/** |
||||
|
* 指标数据底稿(日)Controller |
||||
|
* |
||||
|
* @author win |
||||
|
* @date 2023-11-28 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("/asset/targetDay") |
||||
|
public class DcBusiTargetDraftDayController extends BaseController |
||||
|
{ |
||||
|
@Autowired |
||||
|
private DcBusiTargetDraftDayService dcBusiTargetDraftDayService; |
||||
|
|
||||
|
/** |
||||
|
* 查询指标数据底稿(日)列表 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('target:targetDay:list')") |
||||
|
@GetMapping("/list") |
||||
|
public TableDataInfo list(DcBusiTargetDraftDayDao dcBusiTargetDraftDayDao) |
||||
|
{ |
||||
|
startPage(); |
||||
|
List<DcBusiTargetDraftDayDao> list = dcBusiTargetDraftDayService.selectDcBusiTargetDraftDayDaoList(dcBusiTargetDraftDayDao); |
||||
|
return getDataTable(list); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 导出指标数据底稿(日)列表 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('target:targetDay:export')") |
||||
|
@Log(title = "指标数据底稿(日)", businessType = BusinessType.EXPORT) |
||||
|
@PostMapping("/export") |
||||
|
public void export(HttpServletResponse response, DcBusiTargetDraftDayDao dcBusiTargetDraftDayDao) |
||||
|
{ |
||||
|
List<DcBusiTargetDraftDayDao> list = dcBusiTargetDraftDayService.selectDcBusiTargetDraftDayDaoList(dcBusiTargetDraftDayDao); |
||||
|
ExcelUtil<DcBusiTargetDraftDayDao> util = new ExcelUtil<DcBusiTargetDraftDayDao>(DcBusiTargetDraftDayDao.class); |
||||
|
util.exportExcel(response, list, "指标数据底稿(日)数据"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取指标数据底稿(日)详细信息 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('target:targetDay:query')") |
||||
|
@GetMapping(value = "/{id}") |
||||
|
public AjaxResult getInfo(@PathVariable("id") Long id) |
||||
|
{ |
||||
|
return success(dcBusiTargetDraftDayService.selectDcBusiTargetDraftDayDaoById(id)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增指标数据底稿(日) |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('target:targetDay:add')") |
||||
|
@Log(title = "指标数据底稿(日)", businessType = BusinessType.INSERT) |
||||
|
@PostMapping |
||||
|
public AjaxResult add(@RequestBody DcBusiTargetDraftDayDao dcBusiTargetDraftDayDao) |
||||
|
{ |
||||
|
return toAjax(dcBusiTargetDraftDayService.insertDcBusiTargetDraftDayDao(dcBusiTargetDraftDayDao)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改指标数据底稿(日) |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('target:targetDay:edit')") |
||||
|
@Log(title = "指标数据底稿(日)", businessType = BusinessType.UPDATE) |
||||
|
@PutMapping |
||||
|
public AjaxResult edit(@RequestBody DcBusiTargetDraftDayDao dcBusiTargetDraftDayDao) |
||||
|
{ |
||||
|
return toAjax(dcBusiTargetDraftDayService.updateDcBusiTargetDraftDayDao(dcBusiTargetDraftDayDao)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除指标数据底稿(日) |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('target:targetDay:remove')") |
||||
|
@Log(title = "指标数据底稿(日)", businessType = BusinessType.DELETE) |
||||
|
@DeleteMapping("/{ids}") |
||||
|
public AjaxResult remove(@PathVariable Long[] ids) |
||||
|
{ |
||||
|
return toAjax(dcBusiTargetDraftDayService.deleteDcBusiTargetDraftDayDaoByIds(ids)); |
||||
|
} |
||||
|
} |
@ -0,0 +1,94 @@ |
|||||
|
package com.lzbi.draft.domain; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Date; |
||||
|
import lombok.Data; |
||||
|
import org.apache.commons.lang3.builder.ToStringBuilder; |
||||
|
import org.apache.commons.lang3.builder.ToStringStyle; |
||||
|
import com.lzbi.common.annotation.Excel; |
||||
|
import com.lzbi.module.base.BaseModuleEntity; |
||||
|
|
||||
|
/** |
||||
|
* 参数采集(录入)单据主对象 dc_busi_param_bill_master |
||||
|
* |
||||
|
* @author win |
||||
|
* @date 2023-11-28 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class DcBusiParamBillMasterDao extends BaseModuleEntity |
||||
|
{ |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** 租户号 */ |
||||
|
private String tenantId; |
||||
|
|
||||
|
/** 乐观锁 */ |
||||
|
private Long REVISION; |
||||
|
|
||||
|
/** 创建人 */ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** 创建时间 */ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** 更新人 */ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** 更新时间 */ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
/** 删除人 */ |
||||
|
private String deleteBy; |
||||
|
|
||||
|
/** 删除时间 */ |
||||
|
private Date deleteTime; |
||||
|
|
||||
|
/** 主键 */ |
||||
|
private Long id; |
||||
|
|
||||
|
/** 单据编号 */ |
||||
|
@Excel(name = "单据编号") |
||||
|
private String billNo; |
||||
|
|
||||
|
/** 采集时间 */ |
||||
|
@Excel(name = "采集时间") |
||||
|
private String billIncomeDate; |
||||
|
|
||||
|
/** 单据类型 */ |
||||
|
@Excel(name = "单据类型") |
||||
|
private String billType; |
||||
|
|
||||
|
/** 审核类型 */ |
||||
|
@Excel(name = "审核类型") |
||||
|
private String checkType; |
||||
|
|
||||
|
/** 审核状态 */ |
||||
|
@Excel(name = "审核状态") |
||||
|
private String checkStatus; |
||||
|
|
||||
|
/** 参数数据采集(录入)明细信息 */ |
||||
|
private List<DcBusiParamBillSubDao> dcBusiParamBillSubDaoList; |
||||
|
|
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public String toString() { |
||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
||||
|
.append("tenantId", getTenantId()) |
||||
|
.append("REVISION", getREVISION()) |
||||
|
.append("createdBy", getCreatedBy()) |
||||
|
.append("createdTime", getCreatedTime()) |
||||
|
.append("updatedBy", getUpdatedBy()) |
||||
|
.append("updatedTime", getUpdatedTime()) |
||||
|
.append("deleteBy", getDeleteBy()) |
||||
|
.append("deleteTime", getDeleteTime()) |
||||
|
.append("id", getId()) |
||||
|
.append("billNo", getBillNo()) |
||||
|
.append("billIncomeDate", getBillIncomeDate()) |
||||
|
.append("billType", getBillType()) |
||||
|
.append("checkType", getCheckType()) |
||||
|
.append("checkStatus", getCheckStatus()) |
||||
|
.append("dcBusiParamBillSubList", getDcBusiParamBillSubDaoList()) |
||||
|
.toString(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,98 @@ |
|||||
|
package com.lzbi.draft.domain; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.Date; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.Data; |
||||
|
import org.apache.commons.lang3.builder.ToStringBuilder; |
||||
|
import org.apache.commons.lang3.builder.ToStringStyle; |
||||
|
import com.lzbi.common.annotation.Excel; |
||||
|
import com.lzbi.module.base.BaseModuleEntity; |
||||
|
|
||||
|
/** |
||||
|
* 参数数据采集(录入)明细对象 dc_busi_param_bill_sub |
||||
|
* |
||||
|
* @author win |
||||
|
* @date 2023-11-28 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class DcBusiParamBillSubDao extends BaseModuleEntity |
||||
|
{ |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** 租户号 */ |
||||
|
private String tenantId; |
||||
|
|
||||
|
/** 乐观锁 */ |
||||
|
private Long REVISION; |
||||
|
|
||||
|
/** 创建人 */ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** 创建时间 */ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** 更新人 */ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** 更新时间 */ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
/** 删除人 */ |
||||
|
private String deleteBy; |
||||
|
|
||||
|
/** 删除时间 */ |
||||
|
private Date deleteTime; |
||||
|
|
||||
|
/** 主键 */ |
||||
|
private Long id; |
||||
|
|
||||
|
/** 单据编码 */ |
||||
|
@Excel(name = "单据编码") |
||||
|
private String billNo; |
||||
|
|
||||
|
/** 公司名称 */ |
||||
|
@Excel(name = "公司名称") |
||||
|
private String companyName; |
||||
|
|
||||
|
/** 公司编码 */ |
||||
|
@Excel(name = "公司编码") |
||||
|
private String companyCode; |
||||
|
|
||||
|
/** 组织机构代码 */ |
||||
|
@Excel(name = "组织机构代码") |
||||
|
private String orgCode; |
||||
|
|
||||
|
/** 组织机构名称 */ |
||||
|
@Excel(name = "组织机构名称") |
||||
|
private String orgName; |
||||
|
|
||||
|
/** 统计单元编码 */ |
||||
|
@Excel(name = "统计单元编码") |
||||
|
private String assetCode; |
||||
|
|
||||
|
/** 统计单元名称 */ |
||||
|
@Excel(name = "统计单元名称") |
||||
|
private String assetName; |
||||
|
|
||||
|
/** 所属专业 */ |
||||
|
@Excel(name = "所属专业") |
||||
|
private String fieldType; |
||||
|
|
||||
|
/** 指标名称 */ |
||||
|
@Excel(name = "指标名称") |
||||
|
private String paramName; |
||||
|
|
||||
|
/** 指标编码 */ |
||||
|
@Excel(name = "指标编码") |
||||
|
private String paramCode; |
||||
|
|
||||
|
/** 指标单位 */ |
||||
|
@Excel(name = "指标单位") |
||||
|
private String paramUint; |
||||
|
|
||||
|
/** 参数值 */ |
||||
|
@Excel(name = "参数值") |
||||
|
private BigDecimal paramValue; |
||||
|
|
||||
|
} |
@ -0,0 +1,110 @@ |
|||||
|
package com.lzbi.draft.domain; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.Date; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import lombok.Data; |
||||
|
import org.apache.commons.lang3.builder.ToStringBuilder; |
||||
|
import org.apache.commons.lang3.builder.ToStringStyle; |
||||
|
import com.lzbi.common.annotation.Excel; |
||||
|
import com.lzbi.module.base.BaseModuleEntity; |
||||
|
|
||||
|
/** |
||||
|
* 指标数据底稿(日)对象 dc_busi_target_draft_day |
||||
|
* |
||||
|
* @author win |
||||
|
* @date 2023-11-28 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class DcBusiTargetDraftDayDao extends BaseModuleEntity |
||||
|
{ |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** 租户号 */ |
||||
|
private String tenantId; |
||||
|
|
||||
|
/** 乐观锁 */ |
||||
|
private Long REVISION; |
||||
|
|
||||
|
/** 创建人 */ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** 创建时间 */ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** 更新人 */ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** 更新时间 */ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
/** 删除人 */ |
||||
|
private String deleteBy; |
||||
|
|
||||
|
/** 删除时间 */ |
||||
|
private Date deleteTime; |
||||
|
|
||||
|
/** 主键 */ |
||||
|
private Long id; |
||||
|
|
||||
|
/** 公司名称 */ |
||||
|
@Excel(name = "公司名称") |
||||
|
private String companyName; |
||||
|
|
||||
|
/** 公司编码 */ |
||||
|
@Excel(name = "公司编码") |
||||
|
private String companyCode; |
||||
|
|
||||
|
/** 组织机构代码 */ |
||||
|
@Excel(name = "组织机构代码") |
||||
|
private String orgCode; |
||||
|
|
||||
|
/** 组织机构名称 */ |
||||
|
@Excel(name = "组织机构名称") |
||||
|
private String orgName; |
||||
|
|
||||
|
/** 统计单元编码 */ |
||||
|
@Excel(name = "统计单元编码") |
||||
|
private String assetCode; |
||||
|
|
||||
|
/** 统计单元名称 */ |
||||
|
@Excel(name = "统计单元名称") |
||||
|
private String assetName; |
||||
|
|
||||
|
/** 所属专业 */ |
||||
|
@Excel(name = "所属专业") |
||||
|
private String fieldType; |
||||
|
|
||||
|
/** 指标名称 */ |
||||
|
@Excel(name = "指标名称") |
||||
|
private String targetName; |
||||
|
|
||||
|
/** 指标编码 */ |
||||
|
@Excel(name = "指标编码") |
||||
|
private String targetCode; |
||||
|
|
||||
|
/** 指标单位 */ |
||||
|
@Excel(name = "指标单位") |
||||
|
private String targetUint; |
||||
|
|
||||
|
/** 年月日【yyyy-mm-dd】 */ |
||||
|
@Excel(name = "年月日【yyyy-mm-dd】") |
||||
|
private String countDate; |
||||
|
|
||||
|
/** 原值 */ |
||||
|
@Excel(name = "原值") |
||||
|
private BigDecimal valOriginal; |
||||
|
|
||||
|
/** 调整值 */ |
||||
|
@Excel(name = "调整值") |
||||
|
private BigDecimal valAdjust; |
||||
|
|
||||
|
/** 结果值 */ |
||||
|
@Excel(name = "结果值") |
||||
|
private BigDecimal valResult; |
||||
|
|
||||
|
/** 计划值 */ |
||||
|
@Excel(name = "计划值") |
||||
|
private String valPlan; |
||||
|
|
||||
|
} |
@ -0,0 +1,90 @@ |
|||||
|
package com.lzbi.draft.mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
import com.lzbi.draft.domain.DcBusiParamBillMasterDao; |
||||
|
import com.lzbi.draft.domain.DcBusiParamBillSubDao; |
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
|
||||
|
/** |
||||
|
* 参数采集(录入)单据主Mapper接口 |
||||
|
* |
||||
|
* @author win |
||||
|
* @date 2023-11-28 |
||||
|
*/ |
||||
|
|
||||
|
public interface DcBusiParamBillMasterMapper extends BaseMapper<DcBusiParamBillMasterDao> |
||||
|
{ |
||||
|
/** |
||||
|
* 查询参数采集(录入)单据主 |
||||
|
* |
||||
|
* @param id 参数采集(录入)单据主主键 |
||||
|
* @return 参数采集(录入)单据主 |
||||
|
*/ |
||||
|
public DcBusiParamBillMasterDao selectDcBusiParamBillMasterDaoById(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 查询参数采集(录入)单据主列表 |
||||
|
* |
||||
|
* @param dcBusiParamBillMasterDao 参数采集(录入)单据主 |
||||
|
* @return 参数采集(录入)单据主集合 |
||||
|
*/ |
||||
|
public List<DcBusiParamBillMasterDao> selectDcBusiParamBillMasterDaoList(DcBusiParamBillMasterDao dcBusiParamBillMasterDao); |
||||
|
|
||||
|
/** |
||||
|
* 新增参数采集(录入)单据主 |
||||
|
* |
||||
|
* @param dcBusiParamBillMasterDao 参数采集(录入)单据主 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int insertDcBusiParamBillMasterDao(DcBusiParamBillMasterDao dcBusiParamBillMasterDao); |
||||
|
|
||||
|
/** |
||||
|
* 修改参数采集(录入)单据主 |
||||
|
* |
||||
|
* @param dcBusiParamBillMasterDao 参数采集(录入)单据主 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int updateDcBusiParamBillMasterDao(DcBusiParamBillMasterDao dcBusiParamBillMasterDao); |
||||
|
|
||||
|
/** |
||||
|
* 删除参数采集(录入)单据主 |
||||
|
* |
||||
|
* @param id 参数采集(录入)单据主主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteDcBusiParamBillMasterDaoById(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除参数采集(录入)单据主 |
||||
|
* |
||||
|
* @param ids 需要删除的数据主键集合 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteDcBusiParamBillMasterDaoByIds(Long[] ids); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除参数数据采集(录入)明细 |
||||
|
* |
||||
|
* @param ids 需要删除的数据主键集合 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteDcBusiParamBillSubDaoByBillNos(Long[] ids); |
||||
|
|
||||
|
/** |
||||
|
* 批量新增参数数据采集(录入)明细 |
||||
|
* |
||||
|
* @param dcBusiParamBillSubDaoList 参数数据采集(录入)明细列表 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int batchDcBusiParamBillSubDao(List<DcBusiParamBillSubDao> dcBusiParamBillSubDaoList); |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 通过参数采集(录入)单据主主键删除参数数据采集(录入)明细信息 |
||||
|
* |
||||
|
* @param id 参数采集(录入)单据主ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteDcBusiParamBillSubDaoByBillNo(Long id); |
||||
|
} |
@ -0,0 +1,64 @@ |
|||||
|
package com.lzbi.draft.mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
import com.lzbi.draft.domain.DcBusiTargetDraftDayDao; |
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
|
||||
|
/** |
||||
|
* 指标数据底稿(日)Mapper接口 |
||||
|
* |
||||
|
* @author win |
||||
|
* @date 2023-11-28 |
||||
|
*/ |
||||
|
|
||||
|
public interface DcBusiTargetDraftDayMapper extends BaseMapper<DcBusiTargetDraftDayDao> |
||||
|
{ |
||||
|
/** |
||||
|
* 查询指标数据底稿(日) |
||||
|
* |
||||
|
* @param id 指标数据底稿(日)主键 |
||||
|
* @return 指标数据底稿(日) |
||||
|
*/ |
||||
|
public DcBusiTargetDraftDayDao selectDcBusiTargetDraftDayDaoById(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 查询指标数据底稿(日)列表 |
||||
|
* |
||||
|
* @param dcBusiTargetDraftDayDao 指标数据底稿(日) |
||||
|
* @return 指标数据底稿(日)集合 |
||||
|
*/ |
||||
|
public List<DcBusiTargetDraftDayDao> selectDcBusiTargetDraftDayDaoList(DcBusiTargetDraftDayDao dcBusiTargetDraftDayDao); |
||||
|
|
||||
|
/** |
||||
|
* 新增指标数据底稿(日) |
||||
|
* |
||||
|
* @param dcBusiTargetDraftDayDao 指标数据底稿(日) |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int insertDcBusiTargetDraftDayDao(DcBusiTargetDraftDayDao dcBusiTargetDraftDayDao); |
||||
|
|
||||
|
/** |
||||
|
* 修改指标数据底稿(日) |
||||
|
* |
||||
|
* @param dcBusiTargetDraftDay 指标数据底稿(日) |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int updateDcBusiTargetDraftDayDao(DcBusiTargetDraftDayDao dcBusiTargetDraftDayDao); |
||||
|
|
||||
|
/** |
||||
|
* 删除指标数据底稿(日) |
||||
|
* |
||||
|
* @param id 指标数据底稿(日)主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteDcBusiTargetDraftDayDaoById(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除指标数据底稿(日) |
||||
|
* |
||||
|
* @param ids 需要删除的数据主键集合 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteDcBusiTargetDraftDayDaoByIds(Long[] ids); |
||||
|
} |
@ -0,0 +1,130 @@ |
|||||
|
package com.lzbi.draft.service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
import com.lzbi.draft.domain.DcBusiParamBillMasterDao; |
||||
|
import com.lzbi.draft.domain.DcBusiParamBillSubDao; |
||||
|
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.mapper.DcBusiParamBillMasterMapper; |
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
/** |
||||
|
* 参数采集(录入)单据主Service业务层处理 |
||||
|
* |
||||
|
* @author win |
||||
|
* @date 2023-11-28 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class DcBusiParamBillMasterService extends ServiceImpl<DcBusiParamBillMasterMapper, DcBusiParamBillMasterDao> implements IService<DcBusiParamBillMasterDao> |
||||
|
{ |
||||
|
|
||||
|
/** |
||||
|
* 查询参数采集(录入)单据主 |
||||
|
* |
||||
|
* @param id 参数采集(录入)单据主主键 |
||||
|
* @return 参数采集(录入)单据主 |
||||
|
*/ |
||||
|
public DcBusiParamBillMasterDao selectDcBusiParamBillMasterDaoById(Long id) |
||||
|
{ |
||||
|
return baseMapper.selectDcBusiParamBillMasterDaoById(id); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查询参数采集(录入)单据主列表 |
||||
|
* |
||||
|
* @param dcBusiParamBillMasterDao 参数采集(录入)单据主 |
||||
|
* @return 参数采集(录入)单据主 |
||||
|
*/ |
||||
|
public List<DcBusiParamBillMasterDao> selectDcBusiParamBillMasterDaoList(DcBusiParamBillMasterDao dcBusiParamBillMasterDao) |
||||
|
{ |
||||
|
return baseMapper.selectDcBusiParamBillMasterDaoList(dcBusiParamBillMasterDao); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增参数采集(录入)单据主 |
||||
|
* |
||||
|
* @param dcBusiParamBillMasterDao 参数采集(录入)单据主 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Transactional |
||||
|
|
||||
|
public int insertDcBusiParamBillMasterDao(DcBusiParamBillMasterDao dcBusiParamBillMasterDao) |
||||
|
{ |
||||
|
dcBusiParamBillMasterDao.setCreatedTime(DateUtils.getNowDate()); |
||||
|
int rows = baseMapper.insertDcBusiParamBillMasterDao(dcBusiParamBillMasterDao); |
||||
|
insertDcBusiParamBillSubDao(dcBusiParamBillMasterDao); |
||||
|
return rows; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改参数采集(录入)单据主 |
||||
|
* |
||||
|
* @param dcBusiParamBillMasterDao 参数采集(录入)单据主 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Transactional |
||||
|
|
||||
|
public int updateDcBusiParamBillMasterDao(DcBusiParamBillMasterDao dcBusiParamBillMasterDao) |
||||
|
{ |
||||
|
dcBusiParamBillMasterDao.setUpdatedTime(DateUtils.getNowDate()); |
||||
|
baseMapper.deleteDcBusiParamBillSubDaoByBillNo(dcBusiParamBillMasterDao.getId()); |
||||
|
insertDcBusiParamBillSubDao(dcBusiParamBillMasterDao); |
||||
|
return baseMapper.updateDcBusiParamBillMasterDao(dcBusiParamBillMasterDao); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 批量删除参数采集(录入)单据主 |
||||
|
* |
||||
|
* @param ids 需要删除的参数采集(录入)单据主主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Transactional |
||||
|
|
||||
|
public int deleteDcBusiParamBillMasterDaoByIds(Long[] ids) |
||||
|
{ |
||||
|
baseMapper.deleteDcBusiParamBillSubDaoByBillNos(ids); |
||||
|
return baseMapper.deleteDcBusiParamBillMasterDaoByIds(ids); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除参数采集(录入)单据主信息 |
||||
|
* |
||||
|
* @param id 参数采集(录入)单据主主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Transactional |
||||
|
|
||||
|
public int deleteDcBusiParamBillMasterDaoById(Long id) |
||||
|
{ |
||||
|
baseMapper.deleteDcBusiParamBillSubDaoByBillNo(id); |
||||
|
return baseMapper.deleteDcBusiParamBillMasterDaoById(id); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增参数数据采集(录入)明细信息 |
||||
|
* |
||||
|
* @param dcBusiParamBillMasterDao 参数采集(录入)单据主对象 |
||||
|
*/ |
||||
|
public void insertDcBusiParamBillSubDao(DcBusiParamBillMasterDao dcBusiParamBillMasterDao) |
||||
|
{ |
||||
|
List<DcBusiParamBillSubDao> dcBusiParamBillSubDaoList = dcBusiParamBillMasterDao.getDcBusiParamBillSubDaoList(); |
||||
|
String billNo = dcBusiParamBillMasterDao.getBillNo(); |
||||
|
if (StringUtils.isNotNull(dcBusiParamBillSubDaoList)) |
||||
|
{ |
||||
|
List<DcBusiParamBillSubDao> list = new ArrayList<DcBusiParamBillSubDao>(); |
||||
|
for (DcBusiParamBillSubDao dcBusiParamBillSubDao : dcBusiParamBillSubDaoList) |
||||
|
{ |
||||
|
dcBusiParamBillSubDao.setBillNo(billNo); |
||||
|
list.add(dcBusiParamBillSubDao); |
||||
|
} |
||||
|
if (list.size() > 0) |
||||
|
{ |
||||
|
baseMapper.batchDcBusiParamBillSubDao(list); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,92 @@ |
|||||
|
package com.lzbi.draft.service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
import com.lzbi.draft.domain.DcBusiTargetDraftDayDao; |
||||
|
import com.lzbi.common.utils.DateUtils; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import com.lzbi.draft.mapper.DcBusiTargetDraftDayMapper; |
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
/** |
||||
|
* 指标数据底稿(日)Service业务层处理 |
||||
|
* |
||||
|
* @author win |
||||
|
* @date 2023-11-28 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class DcBusiTargetDraftDayService extends ServiceImpl<DcBusiTargetDraftDayMapper, DcBusiTargetDraftDayDao> implements IService<DcBusiTargetDraftDayDao> |
||||
|
{ |
||||
|
|
||||
|
/** |
||||
|
* 查询指标数据底稿(日) |
||||
|
* |
||||
|
* @param id 指标数据底稿(日)主键 |
||||
|
* @return 指标数据底稿(日) |
||||
|
*/ |
||||
|
public DcBusiTargetDraftDayDao selectDcBusiTargetDraftDayDaoById(Long id) |
||||
|
{ |
||||
|
return baseMapper.selectDcBusiTargetDraftDayDaoById(id); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查询指标数据底稿(日)列表 |
||||
|
* |
||||
|
* @param dcBusiTargetDraftDayDao 指标数据底稿(日) |
||||
|
* @return 指标数据底稿(日) |
||||
|
*/ |
||||
|
public List<DcBusiTargetDraftDayDao> selectDcBusiTargetDraftDayDaoList(DcBusiTargetDraftDayDao dcBusiTargetDraftDayDao) |
||||
|
{ |
||||
|
return baseMapper.selectDcBusiTargetDraftDayDaoList(dcBusiTargetDraftDayDao); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增指标数据底稿(日) |
||||
|
* |
||||
|
* @param dcBusiTargetDraftDayDao 指标数据底稿(日) |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
|
||||
|
public int insertDcBusiTargetDraftDayDao(DcBusiTargetDraftDayDao dcBusiTargetDraftDayDao) |
||||
|
{ |
||||
|
dcBusiTargetDraftDayDao.setCreatedTime(DateUtils.getNowDate()); |
||||
|
return baseMapper.insertDcBusiTargetDraftDayDao(dcBusiTargetDraftDayDao); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改指标数据底稿(日) |
||||
|
* |
||||
|
* @param dcBusiTargetDraftDayDao 指标数据底稿(日) |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
|
||||
|
public int updateDcBusiTargetDraftDayDao(DcBusiTargetDraftDayDao dcBusiTargetDraftDayDao) |
||||
|
{ |
||||
|
dcBusiTargetDraftDayDao.setUpdatedTime(DateUtils.getNowDate()); |
||||
|
return baseMapper.updateDcBusiTargetDraftDayDao(dcBusiTargetDraftDayDao); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 批量删除指标数据底稿(日) |
||||
|
* |
||||
|
* @param ids 需要删除的指标数据底稿(日)主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
|
||||
|
public int deleteDcBusiTargetDraftDayDaoByIds(Long[] ids) |
||||
|
{ |
||||
|
return baseMapper.deleteDcBusiTargetDraftDayDaoByIds(ids); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除指标数据底稿(日)信息 |
||||
|
* |
||||
|
* @param id 指标数据底稿(日)主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
|
||||
|
public int deleteDcBusiTargetDraftDayDaoById(Long id) |
||||
|
{ |
||||
|
return baseMapper.deleteDcBusiTargetDraftDayDaoById(id); |
||||
|
} |
||||
|
} |
@ -0,0 +1,105 @@ |
|||||
|
package com.lzbi.special.controller; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
|
||||
|
import com.lzbi.special.service.DcBaseWorkSpecialService; |
||||
|
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.special.domain.DcBaseWorkSpecialDao; |
||||
|
import com.lzbi.common.utils.poi.ExcelUtil; |
||||
|
import com.lzbi.common.core.page.TableDataInfo; |
||||
|
|
||||
|
/** |
||||
|
* 生产专业管理Controller |
||||
|
* |
||||
|
* @author win |
||||
|
* @date 2023-11-28 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("/special/specialManager") |
||||
|
public class DcBaseWorkSpecialController extends BaseController |
||||
|
{ |
||||
|
@Autowired |
||||
|
private DcBaseWorkSpecialService dcBaseWorkSpecialService; |
||||
|
|
||||
|
/** |
||||
|
* 查询生产专业管理列表 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('special:specialManager:list')") |
||||
|
@GetMapping("/list") |
||||
|
public TableDataInfo list(DcBaseWorkSpecialDao dcBaseWorkSpecialDao) |
||||
|
{ |
||||
|
startPage(); |
||||
|
List<DcBaseWorkSpecialDao> list = dcBaseWorkSpecialService.selectDcBaseWorkSpecialDaoList(dcBaseWorkSpecialDao); |
||||
|
return getDataTable(list); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 导出生产专业管理列表 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('special:specialManager:export')") |
||||
|
@Log(title = "生产专业管理", businessType = BusinessType.EXPORT) |
||||
|
@PostMapping("/export") |
||||
|
public void export(HttpServletResponse response, DcBaseWorkSpecialDao dcBaseWorkSpecialDao) |
||||
|
{ |
||||
|
List<DcBaseWorkSpecialDao> list = dcBaseWorkSpecialService.selectDcBaseWorkSpecialDaoList(dcBaseWorkSpecialDao); |
||||
|
ExcelUtil<DcBaseWorkSpecialDao> util = new ExcelUtil<DcBaseWorkSpecialDao>(DcBaseWorkSpecialDao.class); |
||||
|
util.exportExcel(response, list, "生产专业管理数据"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取生产专业管理详细信息 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('special:specialManager:query')") |
||||
|
@GetMapping(value = "/{id}") |
||||
|
public AjaxResult getInfo(@PathVariable("id") Long id) |
||||
|
{ |
||||
|
return success(dcBaseWorkSpecialService.selectDcBaseWorkSpecialDaoById(id)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增生产专业管理 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('special:specialManager:add')") |
||||
|
@Log(title = "生产专业管理", businessType = BusinessType.INSERT) |
||||
|
@PostMapping |
||||
|
public AjaxResult add(@RequestBody DcBaseWorkSpecialDao dcBaseWorkSpecialDao) |
||||
|
{ |
||||
|
return toAjax(dcBaseWorkSpecialService.insertDcBaseWorkSpecialDao(dcBaseWorkSpecialDao)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改生产专业管理 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('special:specialManager:edit')") |
||||
|
@Log(title = "生产专业管理", businessType = BusinessType.UPDATE) |
||||
|
@PutMapping |
||||
|
public AjaxResult edit(@RequestBody DcBaseWorkSpecialDao dcBaseWorkSpecialDao) |
||||
|
{ |
||||
|
return toAjax(dcBaseWorkSpecialService.updateDcBaseWorkSpecialDao(dcBaseWorkSpecialDao)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除生产专业管理 |
||||
|
*/ |
||||
|
@PreAuthorize("@ss.hasPermi('special:specialManager:remove')") |
||||
|
@Log(title = "生产专业管理", businessType = BusinessType.DELETE) |
||||
|
@DeleteMapping("/{ids}") |
||||
|
public AjaxResult remove(@PathVariable Long[] ids) |
||||
|
{ |
||||
|
return toAjax(dcBaseWorkSpecialService.deleteDcBaseWorkSpecialDaoByIds(ids)); |
||||
|
} |
||||
|
} |
@ -0,0 +1,171 @@ |
|||||
|
package com.lzbi.special.domain; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import org.apache.commons.lang3.builder.ToStringBuilder; |
||||
|
import org.apache.commons.lang3.builder.ToStringStyle; |
||||
|
import com.lzbi.common.annotation.Excel; |
||||
|
import com.lzbi.module.base.BaseModuleEntity; |
||||
|
|
||||
|
/** |
||||
|
* 生产专业管理对象 dc_base_work_special |
||||
|
* |
||||
|
* @author win |
||||
|
* @date 2023-11-28 |
||||
|
*/ |
||||
|
public class DcBaseWorkSpecialDao extends BaseModuleEntity |
||||
|
{ |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** 租户号 */ |
||||
|
private String tenantId; |
||||
|
|
||||
|
/** 乐观锁 */ |
||||
|
private Long REVISION; |
||||
|
|
||||
|
/** 创建人 */ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** 创建时间 */ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** 更新人 */ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** 更新时间 */ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
/** 删除人 */ |
||||
|
private String deleteBy; |
||||
|
|
||||
|
/** 删除时间 */ |
||||
|
private Date deleteTime; |
||||
|
|
||||
|
/** 主键 */ |
||||
|
private Long id; |
||||
|
|
||||
|
/** 专业编码 */ |
||||
|
@Excel(name = "专业编码") |
||||
|
private String specialCode; |
||||
|
|
||||
|
/** 专业名称 */ |
||||
|
@Excel(name = "专业名称") |
||||
|
private String specialName; |
||||
|
|
||||
|
public void setTenantId(String tenantId) |
||||
|
{ |
||||
|
this.tenantId = tenantId; |
||||
|
} |
||||
|
|
||||
|
public String getTenantId() |
||||
|
{ |
||||
|
return tenantId; |
||||
|
} |
||||
|
public void setREVISION(Long REVISION) |
||||
|
{ |
||||
|
this.REVISION = REVISION; |
||||
|
} |
||||
|
|
||||
|
public Long getREVISION() |
||||
|
{ |
||||
|
return REVISION; |
||||
|
} |
||||
|
public void setCreatedBy(String createdBy) |
||||
|
{ |
||||
|
this.createdBy = createdBy; |
||||
|
} |
||||
|
|
||||
|
public String getCreatedBy() |
||||
|
{ |
||||
|
return createdBy; |
||||
|
} |
||||
|
public void setCreatedTime(Date createdTime) |
||||
|
{ |
||||
|
this.createdTime = createdTime; |
||||
|
} |
||||
|
|
||||
|
public Date getCreatedTime() |
||||
|
{ |
||||
|
return createdTime; |
||||
|
} |
||||
|
public void setUpdatedBy(String updatedBy) |
||||
|
{ |
||||
|
this.updatedBy = updatedBy; |
||||
|
} |
||||
|
|
||||
|
public String getUpdatedBy() |
||||
|
{ |
||||
|
return updatedBy; |
||||
|
} |
||||
|
public void setUpdatedTime(Date updatedTime) |
||||
|
{ |
||||
|
this.updatedTime = updatedTime; |
||||
|
} |
||||
|
|
||||
|
public Date getUpdatedTime() |
||||
|
{ |
||||
|
return updatedTime; |
||||
|
} |
||||
|
public void setDeleteBy(String deleteBy) |
||||
|
{ |
||||
|
this.deleteBy = deleteBy; |
||||
|
} |
||||
|
|
||||
|
public String getDeleteBy() |
||||
|
{ |
||||
|
return deleteBy; |
||||
|
} |
||||
|
public void setDeleteTime(Date deleteTime) |
||||
|
{ |
||||
|
this.deleteTime = deleteTime; |
||||
|
} |
||||
|
|
||||
|
public Date getDeleteTime() |
||||
|
{ |
||||
|
return deleteTime; |
||||
|
} |
||||
|
public void setId(Long id) |
||||
|
{ |
||||
|
this.id = id; |
||||
|
} |
||||
|
|
||||
|
public Long getId() |
||||
|
{ |
||||
|
return id; |
||||
|
} |
||||
|
public void setSpecialCode(String specialCode) |
||||
|
{ |
||||
|
this.specialCode = specialCode; |
||||
|
} |
||||
|
|
||||
|
public String getSpecialCode() |
||||
|
{ |
||||
|
return specialCode; |
||||
|
} |
||||
|
public void setSpecialName(String specialName) |
||||
|
{ |
||||
|
this.specialName = specialName; |
||||
|
} |
||||
|
|
||||
|
public String getSpecialName() |
||||
|
{ |
||||
|
return specialName; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String toString() { |
||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
||||
|
.append("tenantId", getTenantId()) |
||||
|
.append("REVISION", getREVISION()) |
||||
|
.append("createdBy", getCreatedBy()) |
||||
|
.append("createdTime", getCreatedTime()) |
||||
|
.append("updatedBy", getUpdatedBy()) |
||||
|
.append("updatedTime", getUpdatedTime()) |
||||
|
.append("deleteBy", getDeleteBy()) |
||||
|
.append("deleteTime", getDeleteTime()) |
||||
|
.append("id", getId()) |
||||
|
.append("specialCode", getSpecialCode()) |
||||
|
.append("specialName", getSpecialName()) |
||||
|
.toString(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,65 @@ |
|||||
|
package com.lzbi.special.mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.lzbi.special.domain.DcBaseWorkSpecialDao; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 生产专业管理Mapper接口 |
||||
|
* |
||||
|
* @author win |
||||
|
* @date 2023-11-28 |
||||
|
*/ |
||||
|
|
||||
|
public interface DcBaseWorkSpecialMapper extends BaseMapper<DcBaseWorkSpecialDao> |
||||
|
{ |
||||
|
/** |
||||
|
* 查询生产专业管理 |
||||
|
* |
||||
|
* @param id 生产专业管理主键 |
||||
|
* @return 生产专业管理 |
||||
|
*/ |
||||
|
public DcBaseWorkSpecialDao selectDcBaseWorkSpecialDaoById(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 查询生产专业管理列表 |
||||
|
* |
||||
|
* @param dcBaseWorkSpecialDao 生产专业管理 |
||||
|
* @return 生产专业管理集合 |
||||
|
*/ |
||||
|
public List<DcBaseWorkSpecialDao> selectDcBaseWorkSpecialDaoList(DcBaseWorkSpecialDao dcBaseWorkSpecialDao); |
||||
|
|
||||
|
/** |
||||
|
* 新增生产专业管理 |
||||
|
* |
||||
|
* @param dcBaseWorkSpecialDao 生产专业管理 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int insertDcBaseWorkSpecialDao(DcBaseWorkSpecialDao dcBaseWorkSpecialDao); |
||||
|
|
||||
|
/** |
||||
|
* 修改生产专业管理 |
||||
|
* |
||||
|
* @param dcBaseWorkSpecialDao 生产专业管理 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int updateDcBaseWorkSpecialDao(DcBaseWorkSpecialDao dcBaseWorkSpecialDao); |
||||
|
|
||||
|
/** |
||||
|
* 删除生产专业管理 |
||||
|
* |
||||
|
* @param id 生产专业管理主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteDcBaseWorkSpecialDaoById(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除生产专业管理 |
||||
|
* |
||||
|
* @param ids 需要删除的数据主键集合 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteDcBaseWorkSpecialDaoByIds(Long[] ids); |
||||
|
} |
@ -0,0 +1,95 @@ |
|||||
|
package com.lzbi.special.service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
import com.lzbi.common.utils.DateUtils; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import com.lzbi.special.domain.DcBaseWorkSpecialDao; |
||||
|
import com.lzbi.special.mapper.DcBaseWorkSpecialMapper; |
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
/** |
||||
|
* 生产专业管理Service业务层处理 |
||||
|
* |
||||
|
* @author win |
||||
|
* @date 2023-11-28 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class DcBaseWorkSpecialService extends ServiceImpl<DcBaseWorkSpecialMapper, DcBaseWorkSpecialDao> implements IService<DcBaseWorkSpecialDao> |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 查询生产专业管理 |
||||
|
* |
||||
|
* @param id 生产专业管理主键 |
||||
|
* @return 生产专业管理 |
||||
|
*/ |
||||
|
|
||||
|
public DcBaseWorkSpecialDao selectDcBaseWorkSpecialDaoById(Long id) |
||||
|
{ |
||||
|
return baseMapper.selectDcBaseWorkSpecialDaoById(id); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查询生产专业管理列表 |
||||
|
* |
||||
|
* @param dcBaseWorkSpecialDao 生产专业管理 |
||||
|
* @return 生产专业管理 |
||||
|
*/ |
||||
|
|
||||
|
public List<DcBaseWorkSpecialDao> selectDcBaseWorkSpecialDaoList(DcBaseWorkSpecialDao dcBaseWorkSpecialDao) |
||||
|
{ |
||||
|
return baseMapper.selectDcBaseWorkSpecialDaoList(dcBaseWorkSpecialDao); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增生产专业管理 |
||||
|
* |
||||
|
* @param dcBaseWorkSpecialDao 生产专业管理 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
|
||||
|
public int insertDcBaseWorkSpecialDao(DcBaseWorkSpecialDao dcBaseWorkSpecialDao) |
||||
|
{ |
||||
|
dcBaseWorkSpecialDao.setCreatedTime(DateUtils.getNowDate()); |
||||
|
return baseMapper.insertDcBaseWorkSpecialDao(dcBaseWorkSpecialDao); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改生产专业管理 |
||||
|
* |
||||
|
* @param dcBaseWorkSpecialDao 生产专业管理 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
|
||||
|
public int updateDcBaseWorkSpecialDao(DcBaseWorkSpecialDao dcBaseWorkSpecialDao) |
||||
|
{ |
||||
|
dcBaseWorkSpecialDao.setUpdatedTime(DateUtils.getNowDate()); |
||||
|
return baseMapper.updateDcBaseWorkSpecialDao(dcBaseWorkSpecialDao); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 批量删除生产专业管理 |
||||
|
* |
||||
|
* @param ids 需要删除的生产专业管理主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
|
||||
|
public int deleteDcBaseWorkSpecialDaoByIds(Long[] ids) |
||||
|
{ |
||||
|
return baseMapper.deleteDcBaseWorkSpecialDaoByIds(ids); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除生产专业管理信息 |
||||
|
* |
||||
|
* @param id 生产专业管理主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
|
||||
|
public int deleteDcBaseWorkSpecialDaoById(Long id) |
||||
|
{ |
||||
|
return baseMapper.deleteDcBaseWorkSpecialDaoById(id); |
||||
|
} |
||||
|
} |
@ -0,0 +1,93 @@ |
|||||
|
<?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.special.mapper.DcBaseWorkSpecialMapper"> |
||||
|
|
||||
|
<resultMap type="com.lzbi.special.domain.DcBaseWorkSpecialDao" id="DcBaseWorkSpecialResult"> |
||||
|
<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="specialCode" column="special_code" /> |
||||
|
<result property="specialName" column="special_name" /> |
||||
|
</resultMap> |
||||
|
|
||||
|
<sql id="selectDcBaseWorkSpecialVo"> |
||||
|
select TENANT_ID, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, DELETE_BY, DELETE_TIME, id, special_code, special_name from dc_base_work_special |
||||
|
</sql> |
||||
|
|
||||
|
<select id="selectDcBaseWorkSpecialDaoList" parameterType="DcBaseWorkSpecialDao" resultMap="DcBaseWorkSpecialResult"> |
||||
|
<include refid="selectDcBaseWorkSpecialVo"/> |
||||
|
<where> |
||||
|
<if test="specialCode != null and specialCode != ''"> and special_code = #{specialCode}</if> |
||||
|
<if test="specialName != null and specialName != ''"> and special_name like concat('%', #{specialName}, '%')</if> |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectDcBaseWorkSpecialDaoById" parameterType="Long" resultMap="DcBaseWorkSpecialResult"> |
||||
|
<include refid="selectDcBaseWorkSpecialVo"/> |
||||
|
where id = #{id} |
||||
|
</select> |
||||
|
|
||||
|
<insert id="insertDcBaseWorkSpecialDao" parameterType="DcBaseWorkSpecialDao" useGeneratedKeys="true" keyProperty="id"> |
||||
|
insert into dc_base_work_special |
||||
|
<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="specialCode != null">special_code,</if> |
||||
|
<if test="specialName != null">special_name,</if> |
||||
|
</trim> |
||||
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
|
<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="specialCode != null">#{specialCode},</if> |
||||
|
<if test="specialName != null">#{specialName},</if> |
||||
|
</trim> |
||||
|
</insert> |
||||
|
|
||||
|
<update id="updateDcBaseWorkSpecialDao" parameterType="DcBaseWorkSpecialDao"> |
||||
|
update dc_base_work_special |
||||
|
<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="specialCode != null">special_code = #{specialCode},</if> |
||||
|
<if test="specialName != null">special_name = #{specialName},</if> |
||||
|
</trim> |
||||
|
where id = #{id} |
||||
|
</update> |
||||
|
|
||||
|
<delete id="deleteDcBaseWorkSpecialDaoById" parameterType="Long"> |
||||
|
delete from dc_base_work_special where id = #{id} |
||||
|
</delete> |
||||
|
|
||||
|
<delete id="deleteDcBaseWorkSpecialDaoByIds" parameterType="String"> |
||||
|
delete from dc_base_work_special where id in |
||||
|
<foreach item="id" collection="array" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</delete> |
||||
|
</mapper> |
@ -0,0 +1,157 @@ |
|||||
|
<?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.DcBusiParamBillMasterMapper"> |
||||
|
|
||||
|
<resultMap type="com.lzbi.draft.domain.DcBusiParamBillMasterDao" id="DcBusiParamBillMasterDaoResult"> |
||||
|
<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="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" /> |
||||
|
</resultMap> |
||||
|
|
||||
|
<resultMap id="DcBusiParamBillMasterDaoDcBusiParamBillSubDaoResult" type="DcBusiParamBillMasterDao" extends="DcBusiParamBillMasterDaoResult"> |
||||
|
<collection property="dcBusiParamBillSubDaoList" notNullColumn="sub_id" javaType="java.util.List" resultMap="DcBusiParamBillSubDaoResult" /> |
||||
|
</resultMap> |
||||
|
|
||||
|
<resultMap type="DcBusiParamBillSubDao" id="DcBusiParamBillSubDaoResult"> |
||||
|
<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" /> |
||||
|
<result property="id" column="sub_id" /> |
||||
|
<result property="billNo" column="sub_bill_no" /> |
||||
|
<result property="companyName" column="sub_company_name" /> |
||||
|
<result property="companyCode" column="sub_company_code" /> |
||||
|
<result property="orgCode" column="sub_org_code" /> |
||||
|
<result property="orgName" column="sub_org_name" /> |
||||
|
<result property="assetCode" column="sub_asset_code" /> |
||||
|
<result property="assetName" column="sub_asset_name" /> |
||||
|
<result property="fieldType" column="sub_field_type" /> |
||||
|
<result property="paramName" column="sub_param_name" /> |
||||
|
<result property="paramCode" column="sub_param_code" /> |
||||
|
<result property="paramUint" column="sub_param_uint" /> |
||||
|
<result property="paramValue" column="sub_param_value" /> |
||||
|
</resultMap> |
||||
|
|
||||
|
<sql id="selectDcBusiParamBillMasterVo"> |
||||
|
select TENANT_ID, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, DELETE_BY, DELETE_TIME, id, bill_no, bill_income_date, bill_type, check_type, check_status from dc_busi_param_bill_master |
||||
|
</sql> |
||||
|
|
||||
|
<select id="selectDcBusiParamBillMasterDaoList" parameterType="DcBusiParamBillMasterDao" resultMap="DcBusiParamBillMasterDaoResult"> |
||||
|
<include refid="selectDcBusiParamBillMasterVo"/> |
||||
|
<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> |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectDcBusiParamBillMasterDaoById" parameterType="Long" resultMap="DcBusiParamBillMasterDaoDcBusiParamBillSubDaoResult"> |
||||
|
select a.TENANT_ID, a.REVISION, a.CREATED_BY, a.CREATED_TIME, a.UPDATED_BY, a.UPDATED_TIME, a.DELETE_BY, a.DELETE_TIME, a.id, a.bill_no, a.bill_income_date, a.bill_type, a.check_type, a.check_status, |
||||
|
b.TENANT_ID as sub_TENANT_ID, b.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, b.id as sub_id, b.bill_no as sub_bill_no, b.company_name as sub_company_name, b.company_code as sub_company_code, b.org_code as sub_org_code, b.org_name as sub_org_name, b.asset_code as sub_asset_code, b.asset_name as sub_asset_name, b.field_type as sub_field_type, b.param_name as sub_param_name, b.param_code as sub_param_code, b.param_uint as sub_param_uint, b.param_value as sub_param_value |
||||
|
from dc_busi_param_bill_master a |
||||
|
left join dc_busi_param_bill_sub b on b.bill_no = a.id |
||||
|
where a.id = #{id} |
||||
|
</select> |
||||
|
|
||||
|
<insert id="insertDcBusiParamBillMasterDao" parameterType="DcBusiParamBillMasterDao" useGeneratedKeys="true" keyProperty="id"> |
||||
|
insert into dc_busi_param_bill_master |
||||
|
<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="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> |
||||
|
</trim> |
||||
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
|
<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="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> |
||||
|
</trim> |
||||
|
</insert> |
||||
|
|
||||
|
<update id="updateDcBusiParamBillMasterDao" parameterType="DcBusiParamBillMasterDao"> |
||||
|
update dc_busi_param_bill_master |
||||
|
<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="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> |
||||
|
</trim> |
||||
|
where id = #{id} |
||||
|
</update> |
||||
|
|
||||
|
<delete id="deleteDcBusiParamBillMasterDaoById" parameterType="Long"> |
||||
|
delete from dc_busi_param_bill_master where id = #{id} |
||||
|
</delete> |
||||
|
|
||||
|
<delete id="deleteDcBusiParamBillMasterDaoByIds" parameterType="String"> |
||||
|
delete from dc_busi_param_bill_master where id in |
||||
|
<foreach item="id" collection="array" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</delete> |
||||
|
|
||||
|
<delete id="deleteDcBusiParamBillSubDaoByBillNos" parameterType="String"> |
||||
|
delete from dc_busi_param_bill_sub where bill_no in |
||||
|
<foreach item="billNo" collection="array" open="(" separator="," close=")"> |
||||
|
#{billNo} |
||||
|
</foreach> |
||||
|
</delete> |
||||
|
|
||||
|
<delete id="deleteDcBusiParamBillSubDaoByBillNo" parameterType="Long"> |
||||
|
delete from dc_busi_param_bill_sub where bill_no = #{billNo} |
||||
|
</delete> |
||||
|
|
||||
|
<insert id="batchDcBusiParamBillSubDao"> |
||||
|
insert into dc_busi_param_bill_sub( TENANT_ID, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, DELETE_BY, DELETE_TIME, id, bill_no, company_name, company_code, org_code, org_name, asset_code, asset_name, field_type, param_name, param_code, param_uint, param_value) values |
||||
|
<foreach item="item" index="index" collection="list" separator=","> |
||||
|
( #{item.tenantId}, #{item.REVISION}, #{item.createdBy}, #{item.createdTime}, #{item.updatedBy}, #{item.updatedTime}, #{item.deleteBy}, #{item.deleteTime}, #{item.id}, #{item.billNo}, #{item.companyName}, #{item.companyCode}, #{item.orgCode}, #{item.orgName}, #{item.assetCode}, #{item.assetName}, #{item.fieldType}, #{item.paramName}, #{item.paramCode}, #{item.paramUint}, #{item.paramValue}) |
||||
|
</foreach> |
||||
|
</insert> |
||||
|
</mapper> |
@ -0,0 +1,158 @@ |
|||||
|
<?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.DcBusiTargetDraftDayMapper"> |
||||
|
|
||||
|
<resultMap type="com.lzbi.draft.domain.DcBusiTargetDraftDayDao" id="DcBusiTargetDraftDayDaoResult"> |
||||
|
<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="companyName" column="company_name" /> |
||||
|
<result property="companyCode" column="company_code" /> |
||||
|
<result property="orgCode" column="org_code" /> |
||||
|
<result property="orgName" column="org_name" /> |
||||
|
<result property="assetCode" column="asset_code" /> |
||||
|
<result property="assetName" column="asset_name" /> |
||||
|
<result property="fieldType" column="field_type" /> |
||||
|
<result property="targetName" column="target_name" /> |
||||
|
<result property="targetCode" column="target_code" /> |
||||
|
<result property="targetUint" column="target_uint" /> |
||||
|
<result property="countDate" column="count_date" /> |
||||
|
<result property="valOriginal" column="val_original" /> |
||||
|
<result property="valAdjust" column="val_adjust" /> |
||||
|
<result property="valResult" column="val_result" /> |
||||
|
<result property="valPlan" column="val_plan" /> |
||||
|
</resultMap> |
||||
|
|
||||
|
<sql id="selectDcBusiTargetDraftDayVo"> |
||||
|
select TENANT_ID, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, DELETE_BY, DELETE_TIME, id, company_name, company_code, org_code, org_name, asset_code, asset_name, field_type, target_name, target_code, target_uint, count_date, val_original, val_adjust, val_result, val_plan from dc_busi_target_draft_day |
||||
|
</sql> |
||||
|
|
||||
|
<select id="selectDcBusiTargetDraftDayDaoList" parameterType="DcBusiTargetDraftDayDao" resultMap="DcBusiTargetDraftDayDaoResult"> |
||||
|
<include refid="selectDcBusiTargetDraftDayVo"/> |
||||
|
<where> |
||||
|
<if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if> |
||||
|
<if test="companyCode != null and companyCode != ''"> and company_code = #{companyCode}</if> |
||||
|
<if test="orgCode != null and orgCode != ''"> and org_code = #{orgCode}</if> |
||||
|
<if test="orgName != null and orgName != ''"> and org_name like concat('%', #{orgName}, '%')</if> |
||||
|
<if test="assetCode != null and assetCode != ''"> and asset_code = #{assetCode}</if> |
||||
|
<if test="assetName != null and assetName != ''"> and asset_name like concat('%', #{assetName}, '%')</if> |
||||
|
<if test="fieldType != null and fieldType != ''"> and field_type = #{fieldType}</if> |
||||
|
<if test="targetName != null and targetName != ''"> and target_name like concat('%', #{targetName}, '%')</if> |
||||
|
<if test="targetCode != null and targetCode != ''"> and target_code = #{targetCode}</if> |
||||
|
<if test="targetUint != null and targetUint != ''"> and target_uint = #{targetUint}</if> |
||||
|
<if test="countDate != null and countDate != ''"> and count_date = #{countDate}</if> |
||||
|
<if test="valOriginal != null "> and val_original = #{valOriginal}</if> |
||||
|
<if test="valAdjust != null "> and val_adjust = #{valAdjust}</if> |
||||
|
<if test="valResult != null "> and val_result = #{valResult}</if> |
||||
|
<if test="valPlan != null and valPlan != ''"> and val_plan = #{valPlan}</if> |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectDcBusiTargetDraftDayDaoById" parameterType="Long" resultMap="DcBusiTargetDraftDayDaoResult"> |
||||
|
<include refid="selectDcBusiTargetDraftDayVo"/> |
||||
|
where id = #{id} |
||||
|
</select> |
||||
|
|
||||
|
<insert id="insertDcBusiTargetDraftDayDao" parameterType="DcBusiTargetDraftDayDao" useGeneratedKeys="true" keyProperty="id"> |
||||
|
insert into dc_busi_target_draft_day |
||||
|
<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="companyName != null">company_name,</if> |
||||
|
<if test="companyCode != null">company_code,</if> |
||||
|
<if test="orgCode != null">org_code,</if> |
||||
|
<if test="orgName != null">org_name,</if> |
||||
|
<if test="assetCode != null">asset_code,</if> |
||||
|
<if test="assetName != null">asset_name,</if> |
||||
|
<if test="fieldType != null">field_type,</if> |
||||
|
<if test="targetName != null">target_name,</if> |
||||
|
<if test="targetCode != null">target_code,</if> |
||||
|
<if test="targetUint != null">target_uint,</if> |
||||
|
<if test="countDate != null">count_date,</if> |
||||
|
<if test="valOriginal != null">val_original,</if> |
||||
|
<if test="valAdjust != null">val_adjust,</if> |
||||
|
<if test="valResult != null">val_result,</if> |
||||
|
<if test="valPlan != null">val_plan,</if> |
||||
|
</trim> |
||||
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
|
<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="companyName != null">#{companyName},</if> |
||||
|
<if test="companyCode != null">#{companyCode},</if> |
||||
|
<if test="orgCode != null">#{orgCode},</if> |
||||
|
<if test="orgName != null">#{orgName},</if> |
||||
|
<if test="assetCode != null">#{assetCode},</if> |
||||
|
<if test="assetName != null">#{assetName},</if> |
||||
|
<if test="fieldType != null">#{fieldType},</if> |
||||
|
<if test="targetName != null">#{targetName},</if> |
||||
|
<if test="targetCode != null">#{targetCode},</if> |
||||
|
<if test="targetUint != null">#{targetUint},</if> |
||||
|
<if test="countDate != null">#{countDate},</if> |
||||
|
<if test="valOriginal != null">#{valOriginal},</if> |
||||
|
<if test="valAdjust != null">#{valAdjust},</if> |
||||
|
<if test="valResult != null">#{valResult},</if> |
||||
|
<if test="valPlan != null">#{valPlan},</if> |
||||
|
</trim> |
||||
|
</insert> |
||||
|
|
||||
|
<update id="updateDcBusiTargetDraftDayDao" parameterType="DcBusiTargetDraftDayDao"> |
||||
|
update dc_busi_target_draft_day |
||||
|
<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="companyName != null">company_name = #{companyName},</if> |
||||
|
<if test="companyCode != null">company_code = #{companyCode},</if> |
||||
|
<if test="orgCode != null">org_code = #{orgCode},</if> |
||||
|
<if test="orgName != null">org_name = #{orgName},</if> |
||||
|
<if test="assetCode != null">asset_code = #{assetCode},</if> |
||||
|
<if test="assetName != null">asset_name = #{assetName},</if> |
||||
|
<if test="fieldType != null">field_type = #{fieldType},</if> |
||||
|
<if test="targetName != null">target_name = #{targetName},</if> |
||||
|
<if test="targetCode != null">target_code = #{targetCode},</if> |
||||
|
<if test="targetUint != null">target_uint = #{targetUint},</if> |
||||
|
<if test="countDate != null">count_date = #{countDate},</if> |
||||
|
<if test="valOriginal != null">val_original = #{valOriginal},</if> |
||||
|
<if test="valAdjust != null">val_adjust = #{valAdjust},</if> |
||||
|
<if test="valResult != null">val_result = #{valResult},</if> |
||||
|
<if test="valPlan != null">val_plan = #{valPlan},</if> |
||||
|
</trim> |
||||
|
where id = #{id} |
||||
|
</update> |
||||
|
|
||||
|
<delete id="deleteDcBusiTargetDraftDayDaoById" parameterType="Long"> |
||||
|
delete from dc_busi_target_draft_day where id = #{id} |
||||
|
</delete> |
||||
|
|
||||
|
<delete id="deleteDcBusiTargetDraftDayDaoByIds" parameterType="String"> |
||||
|
delete from dc_busi_target_draft_day where id in |
||||
|
<foreach item="id" collection="array" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</delete> |
||||
|
</mapper> |
Loading…
Reference in new issue