feat:pg数据库适配

pg_adapter
wangxy 5 months ago
parent 587943b93f
commit 1d7fdd5ea3

@ -81,11 +81,11 @@ public class SysTrainnumController extends BaseController {
{ {
List<TdTrain> list = tdTrainService.selectTdTrainList(tdTrain); List<TdTrain> list = tdTrainService.selectTdTrainList(tdTrain);
list.forEach(tdTrain1 -> { list.forEach(tdTrain1 -> {
tdTrain1.setAREAID(sysAreaManager.getAreaName(tdTrain1.getAREAID())); tdTrain1.setAreaid(sysAreaManager.getAreaName(tdTrain1.getAreaid()));
tdTrain1.setFRAMEWORK(sysAreaManager.getAreaName(tdTrain1.getFRAMEWORK())); tdTrain1.setFramework(sysAreaManager.getAreaName(tdTrain1.getFramework()));
SysUser sysUser = sysUserService.selectUserById(Long.valueOf(tdTrain1.getUSERNAME())); SysUser sysUser = sysUserService.selectUserById(Long.valueOf(tdTrain1.getUsername()));
if(Objects.nonNull(sysUser)){ if(Objects.nonNull(sysUser)){
tdTrain1.setUSERNAME(sysUser.getUserName()); tdTrain1.setUsername(sysUser.getUserName());
} }
}); });
ExcelUtil<TdTrain> util = new ExcelUtil<TdTrain>(TdTrain.class); ExcelUtil<TdTrain> util = new ExcelUtil<TdTrain>(TdTrain.class);
@ -96,10 +96,10 @@ public class SysTrainnumController extends BaseController {
* *
*/ */
@RequiresPermissions("system:trainnum:detail") @RequiresPermissions("system:trainnum:detail")
@GetMapping("/detail/{ID}") @GetMapping("/detail/{id}")
public String detail(@PathVariable("ID") Long ID, ModelMap mmap) public String detail(@PathVariable("id") Long id, ModelMap mmap)
{ {
mmap.put("tdTrain", tdTrainService.selectTdTrainByID(ID)); mmap.put("tdTrain", tdTrainService.selectTdTrainByID(id));
SysUser user = getSysUser(); SysUser user = getSysUser();
mmap.put("user", user); mmap.put("user", user);
return prefix + "/detail"; return prefix + "/detail";

@ -74,8 +74,8 @@ public class TdTrainController extends BaseController
{ {
List<TdTrain> list = tdTrainService.selectTdTrainList(tdTrain); List<TdTrain> list = tdTrainService.selectTdTrainList(tdTrain);
list.forEach(tdTrain1 -> { list.forEach(tdTrain1 -> {
tdTrain1.setAREAID(sysAreaManager.getAreaName(tdTrain1.getAREAID())); tdTrain1.setAreaid(sysAreaManager.getAreaName(tdTrain1.getAreaid()));
tdTrain1.setFRAMEWORK(sysAreaManager.getAreaName(tdTrain1.getFRAMEWORK())); tdTrain1.setFramework(sysAreaManager.getAreaName(tdTrain1.getFramework()));
}); });
ExcelUtil<TdTrain> util = new ExcelUtil<TdTrain>(TdTrain.class); ExcelUtil<TdTrain> util = new ExcelUtil<TdTrain>(TdTrain.class);
return util.exportExcel(list, "涉密人员培训数据"); return util.exportExcel(list, "涉密人员培训数据");
@ -109,11 +109,11 @@ public class TdTrainController extends BaseController
* *
*/ */
@RequiresPermissions("system:train:edit") @RequiresPermissions("system:train:edit")
@GetMapping("/edit/{ID}") @GetMapping("/edit/{id}")
public String edit(@PathVariable("ID") Long ID, ModelMap mmap) public String edit(@PathVariable("id") Long id, ModelMap mmap)
{ {
TdTrain tdTrain = tdTrainService.selectTdTrainByID(ID); TdTrain tdTrain = tdTrainService.selectTdTrainByID(id);
mmap.put("tdTrain", tdTrain); mmap.put("tdTrain", tdTrain);
return prefix + "/edit"; return prefix + "/edit";
} }
@ -149,10 +149,10 @@ public class TdTrainController extends BaseController
* *
*/ */
@RequiresPermissions("system:train:detail") @RequiresPermissions("system:train:detail")
@GetMapping("/detail/{ID}") @GetMapping("/detail/{id}")
public String detail(@PathVariable("ID") Long ID, ModelMap mmap) public String detail(@PathVariable("id") Long id, ModelMap mmap)
{ {
mmap.put("tdTrain", tdTrainService.selectTdTrainByID(ID)); mmap.put("tdTrain", tdTrainService.selectTdTrainByID(id));
SysUser user = getSysUser(); SysUser user = getSysUser();
mmap.put("user", user); mmap.put("user", user);
return prefix + "/detail"; return prefix + "/detail";
@ -162,10 +162,10 @@ public class TdTrainController extends BaseController
* *
*/ */
@RequiresPermissions("system:train:examine") @RequiresPermissions("system:train:examine")
@GetMapping("/examine/{ID}") @GetMapping("/examine/{id}")
public String examine(@PathVariable("ID") Long ID, ModelMap mmap) public String examine(@PathVariable("id") Long id, ModelMap mmap)
{ {
TdTrain tdTrain = tdTrainService.selectTdTrainByID(ID); TdTrain tdTrain = tdTrainService.selectTdTrainByID(id);
SysUser user = getSysUser(); SysUser user = getSysUser();
mmap.put("tdTrain", tdTrain); mmap.put("tdTrain", tdTrain);
mmap.put("user", user); mmap.put("user", user);

@ -14,7 +14,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label is-required">所属地市:</label> <label class="col-sm-4 control-label is-required">所属地市:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select id="City" name="AREAID" required @change="getAreaList()" v-model="City" class="form-control m-b"> <select id="City" name="areaid" required @change="getAreaList()" v-model="City" class="form-control m-b">
<option value="">---请选择---</option> <option value="">---请选择---</option>
<option v-for="option in CityList" :value="option.id" :key="option.id"> <option v-for="option in CityList" :value="option.id" :key="option.id">
{{ option.name }} {{ option.name }}
@ -27,7 +27,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label is-required">所属区县:</label> <label class="col-sm-4 control-label is-required">所属区县:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select id="Area" name="FRAMEWORK" required v-model="Area" class="form-control m-b"> <select id="Area" name="framework" required v-model="Area" class="form-control m-b">
<option value="">---请选择---</option> <option value="">---请选择---</option>
<option v-for="option in AreaList" :value="option.id" :key="option.id"> <option v-for="option in AreaList" :value="option.id" :key="option.id">
{{ option.name }} {{ option.name }}
@ -66,7 +66,7 @@
<div class="form-group" v-if="trainSubject == '0'"> <div class="form-group" v-if="trainSubject == '0'">
<label class="col-sm-2 control-label is-required">人员姓名:</label> <label class="col-sm-2 control-label is-required">人员姓名:</label>
<div class="col-sm-10"> <div class="col-sm-10">
<select id="User" name="USERNAME" required class="form-control m-b"> <select id="User" name="username" required class="form-control m-b">
<option value="">---请选择---</option> <option value="">---请选择---</option>
<option v-for="option in userList" :value="option.userId" :key="option.userId"> <option v-for="option in userList" :value="option.userId" :key="option.userId">
{{ option.userName }} {{ option.userName }}
@ -77,13 +77,13 @@
<div class="form-group" v-if="trainSubject == '1'"> <div class="form-group" v-if="trainSubject == '1'">
<label class="col-sm-2 control-label is-required">人员姓名:</label> <label class="col-sm-2 control-label is-required">人员姓名:</label>
<div class="col-sm-10"> <div class="col-sm-10">
<textarea name="USERNAME" required placeholder="请输入人员姓名" class="form-control"></textarea> <textarea name="username" required placeholder="请输入人员姓名" class="form-control"></textarea>
</div> </div>
</div> </div>
<div class="form-group" v-if="trainSubject == '2'"> <div class="form-group" v-if="trainSubject == '2'">
<label class="col-sm-2 control-label is-required">人员姓名:</label> <label class="col-sm-2 control-label is-required">人员姓名:</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input name="USERNAME" readonly th:value="'全体人员'" placeholder="全体人员" class="form-control" type="text"> <input name="username" readonly th:value="'全体人员'" placeholder="全体人员" class="form-control" type="text">
</div> </div>
</div> </div>
</div> </div>

@ -8,14 +8,14 @@
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content" id="app"> <div class="wrapper wrapper-content animated fadeInRight ibox-content" id="app">
<form class="form-horizontal m" id="form-train-edit" th:object="${tdTrain}"> <form class="form-horizontal m" id="form-train-edit" th:object="${tdTrain}">
<input name="ID" th:field="*{ID}" type="hidden"> <input name="id" th:field="*{id}" type="hidden">
<!-- <input name="deptId" type="hidden" th:field="*{deptId}" id="treeId">--> <!-- <input name="deptId" type="hidden" th:field="*{deptId}" id="treeId">-->
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-6">
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label is- ">所属地市:</label> <label class="col-sm-4 control-label is- ">所属地市:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select id="City" name="AREAID" disabled @change="getAreaList()" v-model="City" class="form-control m-b"> <select id="City" name="areaid" disabled @change="getAreaList()" v-model="City" class="form-control m-b">
<option value="">---请选择---</option> <option value="">---请选择---</option>
<option v-for="option in CityList" :value="option.id" :key="option.id"> <option v-for="option in CityList" :value="option.id" :key="option.id">
{{ option.name }} {{ option.name }}
@ -28,7 +28,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label is- ">所属区县:</label> <label class="col-sm-4 control-label is- ">所属区县:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select id="Area" name="FRAMEWORK" disabled v-model="Area" class="form-control m-b"> <select id="Area" name="framework" disabled v-model="Area" class="form-control m-b">
<option value="">---请选择---</option> <option value="">---请选择---</option>
<option v-for="option in AreaList" :value="option.id" :key="option.id"> <option v-for="option in AreaList" :value="option.id" :key="option.id">
{{ option.name }} {{ option.name }}
@ -67,7 +67,7 @@
<div class="form-group" v-if="trainSubject == '0'"> <div class="form-group" v-if="trainSubject == '0'">
<label class="col-sm-2 control-label is- ">人员姓名:</label> <label class="col-sm-2 control-label is- ">人员姓名:</label>
<div class="col-sm-10"> <div class="col-sm-10">
<select id="User" disabled v-model="userName" name="USERNAME" class="form-control m-b"> <select id="User" disabled v-model="userName" name="username" class="form-control m-b">
<option value="">---请选择---</option> <option value="">---请选择---</option>
<option v-for="option in userList" :value="option.userId" :key="option.userId"> <option v-for="option in userList" :value="option.userId" :key="option.userId">
{{ option.userName }} {{ option.userName }}
@ -78,13 +78,13 @@
<div class="form-group" v-if="trainSubject == '1'"> <div class="form-group" v-if="trainSubject == '1'">
<label class="col-sm-2 control-label is- ">人员姓名:</label> <label class="col-sm-2 control-label is- ">人员姓名:</label>
<div class="col-sm-10"> <div class="col-sm-10">
<textarea name="USERNAME" disabled th:field="*{USERNAME}" placeholder="请输入人员姓名" class="form-control" type="text"></textarea> <textarea name="username" disabled th:field="*{username}" placeholder="请输入人员姓名" class="form-control" type="text"></textarea>
</div> </div>
</div> </div>
<div class="form-group" v-if="trainSubject == '2'"> <div class="form-group" v-if="trainSubject == '2'">
<label class="col-sm-2 control-label is- ">人员姓名:</label> <label class="col-sm-2 control-label is- ">人员姓名:</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input name="USERNAME" readonly th:value="'全体人员'" placeholder="全体人员" class="form-control" type="text"> <input name="username" readonly th:value="'全体人员'" placeholder="全体人员" class="form-control" type="text">
</div> </div>
</div> </div>
</div> </div>
@ -157,7 +157,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-2 control-label">培训评价:</label> <label class="col-sm-2 control-label">培训评价:</label>
<div class="col-sm-10"> <div class="col-sm-10">
<textarea name="TRAININFO" disabled class="form-control">[[*{TRAININFO}]]</textarea> <textarea name="traininfo" disabled class="form-control">[[*{traininfo}]]</textarea>
</div> </div>
</div> </div>
</div> </div>
@ -222,9 +222,9 @@
data: { data: {
CityList: [], CityList: [],
AreaList:[], AreaList:[],
City:[[${tdTrain.AREAID}]], City:[[${tdTrain.areaid}]],
Area:[[${tdTrain.FRAMEWORK}]], Area:[[${tdTrain.framework}]],
userName:[[${tdTrain.USERNAME}]], userName:[[${tdTrain.username}]],
userList:[], userList:[],
params:{ params:{
parentId:'', parentId:'',

@ -8,14 +8,14 @@
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content" id="app"> <div class="wrapper wrapper-content animated fadeInRight ibox-content" id="app">
<form class="form-horizontal m" id="form-train-edit" th:object="${tdTrain}"> <form class="form-horizontal m" id="form-train-edit" th:object="${tdTrain}">
<input name="ID" th:field="*{ID}" type="hidden"> <input name="id" th:field="*{id}" type="hidden">
<!-- <input name="deptId" type="hidden" th:field="*{deptId}" id="treeId">--> <!-- <input name="deptId" type="hidden" th:field="*{deptId}" id="treeId">-->
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-6">
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label is-required">所属地市:</label> <label class="col-sm-4 control-label is-required">所属地市:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select id="City" name="AREAID" required @change="getAreaList()" v-model="City" class="form-control m-b"> <select id="City" name="areaid" required @change="getAreaList()" v-model="City" class="form-control m-b">
<option value="">---请选择---</option> <option value="">---请选择---</option>
<option v-for="option in CityList" :value="option.id" :key="option.id"> <option v-for="option in CityList" :value="option.id" :key="option.id">
{{ option.name }} {{ option.name }}
@ -28,7 +28,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label is-required">所属区县:</label> <label class="col-sm-4 control-label is-required">所属区县:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select id="Area" name="FRAMEWORK" required v-model="Area" class="form-control m-b"> <select id="Area" name="framework" required v-model="Area" class="form-control m-b">
<option value="">---请选择---</option> <option value="">---请选择---</option>
<option v-for="option in AreaList" :value="option.id" :key="option.id"> <option v-for="option in AreaList" :value="option.id" :key="option.id">
{{ option.name }} {{ option.name }}
@ -67,7 +67,7 @@
<div class="form-group" v-if="trainSubject == '0'"> <div class="form-group" v-if="trainSubject == '0'">
<label class="col-sm-2 control-label is-required">人员姓名:</label> <label class="col-sm-2 control-label is-required">人员姓名:</label>
<div class="col-sm-10"> <div class="col-sm-10">
<select id="User" v-model="userName" name="USERNAME" required class="form-control m-b"> <select id="User" v-model="userName" name="username" required class="form-control m-b">
<option value="">---请选择---</option> <option value="">---请选择---</option>
<option v-for="option in userList" :value="option.userId" :key="option.userId"> <option v-for="option in userList" :value="option.userId" :key="option.userId">
{{ option.userName }} {{ option.userName }}
@ -78,7 +78,7 @@
<div class="form-group" v-if="trainSubject == '1'"> <div class="form-group" v-if="trainSubject == '1'">
<label class="col-sm-2 control-label is-required">人员姓名:</label> <label class="col-sm-2 control-label is-required">人员姓名:</label>
<div class="col-sm-10"> <div class="col-sm-10">
<textarea name="USERNAME" id="userSubjectName" th:field="*{USERNAME}" required placeholder="请输入人员姓名" class="form-control"></textarea> <textarea name="USERNAME" id="userSubjectName" th:field="*{username}" required placeholder="请输入人员姓名" class="form-control"></textarea>
</div> </div>
</div> </div>
<div class="form-group" v-if="trainSubject == '2'"> <div class="form-group" v-if="trainSubject == '2'">
@ -198,9 +198,9 @@
data: { data: {
CityList: [], CityList: [],
AreaList:[], AreaList:[],
City:[[${tdTrain.AREAID}]], City:[[${tdTrain.areaid}]],
Area:[[${tdTrain.FRAMEWORK}]], Area:[[${tdTrain.framework}]],
userName:[[${tdTrain.USERNAME}]], userName:[[${tdTrain.username}]],
userList:[], userList:[],
params:{ params:{
parentId:'', parentId:'',

@ -9,13 +9,13 @@
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content" id="app"> <div class="wrapper wrapper-content animated fadeInRight ibox-content" id="app">
<form class="form-horizontal m" id="form-train-examine" th:object="${tdTrain}"> <form class="form-horizontal m" id="form-train-examine" th:object="${tdTrain}">
<input name="ID" th:field="*{ID}" type="hidden"> <input name="id" th:field="*{id}" type="hidden">
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-6">
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label is- ">所属地市:</label> <label class="col-sm-4 control-label is- ">所属地市:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select id="City" name="AREAID" disabled @change="getAreaList()" v-model="City" class="form-control m-b"> <select id="City" name="areaid" disabled @change="getAreaList()" v-model="City" class="form-control m-b">
<option value="">---请选择---</option> <option value="">---请选择---</option>
<option v-for="option in CityList" :value="option.id" :key="option.id"> <option v-for="option in CityList" :value="option.id" :key="option.id">
{{ option.name }} {{ option.name }}
@ -28,7 +28,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label is- ">所属区县:</label> <label class="col-sm-4 control-label is- ">所属区县:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select id="Area" name="FRAMEWORK" disabled v-model="Area" class="form-control m-b"> <select id="Area" name="framework" disabled v-model="Area" class="form-control m-b">
<option value="">---请选择---</option> <option value="">---请选择---</option>
<option v-for="option in AreaList" :value="option.id" :key="option.id"> <option v-for="option in AreaList" :value="option.id" :key="option.id">
{{ option.name }} {{ option.name }}
@ -67,7 +67,7 @@
<div class="form-group" v-if="trainSubject == '0'"> <div class="form-group" v-if="trainSubject == '0'">
<label class="col-sm-2 control-label is- ">人员姓名:</label> <label class="col-sm-2 control-label is- ">人员姓名:</label>
<div class="col-sm-10"> <div class="col-sm-10">
<select id="User" disabled v-model="userName" name="USERNAME" class="form-control m-b"> <select id="User" disabled v-model="userName" name="username" class="form-control m-b">
<option value="">---请选择---</option> <option value="">---请选择---</option>
<option v-for="option in userList" :value="option.userId" :key="option.userId"> <option v-for="option in userList" :value="option.userId" :key="option.userId">
{{ option.userName }} {{ option.userName }}
@ -78,13 +78,13 @@
<div class="form-group" v-if="trainSubject == '1'"> <div class="form-group" v-if="trainSubject == '1'">
<label class="col-sm-2 control-label is- ">人员姓名:</label> <label class="col-sm-2 control-label is- ">人员姓名:</label>
<div class="col-sm-10"> <div class="col-sm-10">
<textarea name="USERNAME" disabled th:field="*{USERNAME}" placeholder="请输入人员姓名" class="form-control" type="text"></textarea> <textarea name="username" disabled th:field="*{username}" placeholder="请输入人员姓名" class="form-control" type="text"></textarea>
</div> </div>
</div> </div>
<div class="form-group" v-if="trainSubject == '2'"> <div class="form-group" v-if="trainSubject == '2'">
<label class="col-sm-2 control-label is- ">人员姓名:</label> <label class="col-sm-2 control-label is- ">人员姓名:</label>
<div class="col-sm-10"> <div class="col-sm-10">
<input name="USERNAME" readonly th:value="'全体人员'" placeholder="全体人员" class="form-control" type="text"> <input name="username" readonly th:value="'全体人员'" placeholder="全体人员" class="form-control" type="text">
</div> </div>
</div> </div>
</div> </div>
@ -151,7 +151,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-2 control-label is-required">培训评价:</label> <label class="col-sm-2 control-label is-required">培训评价:</label>
<div class="col-sm-10"> <div class="col-sm-10">
<textarea name="TRAININFO" required class="form-control">[[*{TRAININFO}]]</textarea> <textarea name="traininfo" required class="form-control">[[*{traininfo}]]</textarea>
</div> </div>
</div> </div>
</div> </div>
@ -223,9 +223,9 @@
data: { data: {
CityList: [], CityList: [],
AreaList:[], AreaList:[],
City:[[${tdTrain.AREAID}]], City:[[${tdTrain.areaid}]],
Area:[[${tdTrain.FRAMEWORK}]], Area:[[${tdTrain.framework}]],
userName:[[${tdTrain.USERNAME}]], userName:[[${tdTrain.username}]],
userList:[], userList:[],
params:{ params:{
parentId:'', parentId:'',

@ -16,7 +16,7 @@
</li> </li>
<li> <li>
<label>所属地区:</label> <label>所属地区:</label>
<select id="City" name="AREAID" @change="getAreaList()" v-model="City"> <select id="City" name="areaid" @change="getAreaList()" v-model="City">
<option value="">请选择</option> <option value="">请选择</option>
<option v-for="option in CityList" :value="option.id" :key="option.id"> <option v-for="option in CityList" :value="option.id" :key="option.id">
{{ option.name }} {{ option.name }}
@ -104,7 +104,7 @@
}, },
{ {
field: 'id', field: 'id',
title: 'ID', title: 'id',
visible: false visible: false
}, },
{ {

@ -18,11 +18,11 @@ public class TdTrain extends BaseEntity
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** ID */ /** ID */
private Long ID; private Long id;
/** 人员名称 */ /** 人员名称 */
@Excel(name = "人员名称") @Excel(name = "人员名称")
private String USERNAME; private String username;
/** 单位名称 */ /** 单位名称 */
@Excel(name = "单位名称") @Excel(name = "单位名称")
@ -71,11 +71,11 @@ public class TdTrain extends BaseEntity
/** 所属地市 */ /** 所属地市 */
@Excel(name = "所属地市") @Excel(name = "所属地市")
private String AREAID; private String areaid;
/** 所属区县 */ /** 所属区县 */
@Excel(name = "所属区县") @Excel(name = "所属区县")
private String FRAMEWORK; private String framework;
/** 培训人员 */ /** 培训人员 */
@Excel(name = "培训人员") @Excel(name = "培训人员")
@ -92,31 +92,61 @@ public class TdTrain extends BaseEntity
/** 部门 */ /** 部门 */
@Excel(name = "部门") @Excel(name = "部门")
private String PART; private String part;
/** 培训评价 */ /** 培训评价 */
@Excel(name = "培训评价") @Excel(name = "培训评价")
private String TRAININFO; private String traininfo;
public void setID(Long ID) public Long getId() {
{ return id;
this.ID = ID;
} }
public Long getID() public void setId(Long id) {
{ this.id = id;
return ID;
} }
public void setUSERNAME(String USERNAME)
{ public String getUsername() {
this.USERNAME = USERNAME; return username;
} }
public String getUSERNAME() public void setUsername(String username) {
{ this.username = username;
return USERNAME; }
public String getAreaid() {
return areaid;
}
public void setAreaid(String areaid) {
this.areaid = areaid;
}
public String getFramework() {
return framework;
}
public void setFramework(String framework) {
this.framework = framework;
}
public String getPart() {
return part;
}
public void setPart(String part) {
this.part = part;
}
public String getTraininfo() {
return traininfo;
}
public void setTraininfo(String traininfo) {
this.traininfo = traininfo;
} }
public void setDeptName(String deptName)
public void setDeptName(String deptName)
{ {
this.deptName = deptName; this.deptName = deptName;
} }
@ -215,24 +245,7 @@ public class TdTrain extends BaseEntity
{ {
return updateDate; return updateDate;
} }
public void setAREAID(String AREAID)
{
this.AREAID = AREAID;
}
public String getAREAID()
{
return AREAID;
}
public void setFRAMEWORK(String FRAMEWORK)
{
this.FRAMEWORK = FRAMEWORK;
}
public String getFRAMEWORK()
{
return FRAMEWORK;
}
public void setTrainName(String trainName) public void setTrainName(String trainName)
{ {
this.trainName = trainName; this.trainName = trainName;
@ -260,30 +273,13 @@ public class TdTrain extends BaseEntity
{ {
return trainTimeend; return trainTimeend;
} }
public void setPART(String PART)
{
this.PART = PART;
}
public String getPART()
{
return PART;
}
public void setTRAININFO(String TRAININFO)
{
this.TRAININFO = TRAININFO;
}
public String getTRAININFO()
{
return TRAININFO;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("ID", getID()) .append("id", getId())
.append("USERNAME", getUSERNAME()) .append("username", getUsername())
.append("deptName", getDeptName()) .append("deptName", getDeptName())
.append("trainType", getTrainType()) .append("trainType", getTrainType())
.append("trainSubject", getTrainSubject()) .append("trainSubject", getTrainSubject())
@ -295,13 +291,13 @@ public class TdTrain extends BaseEntity
.append("updateDepartid", getUpdateDepartid()) .append("updateDepartid", getUpdateDepartid())
.append("updateStaffid", getUpdateStaffid()) .append("updateStaffid", getUpdateStaffid())
.append("updateDate", getUpdateDate()) .append("updateDate", getUpdateDate())
.append("AREAID", getAREAID()) .append("areaid", getAreaid())
.append("FRAMEWORK", getFRAMEWORK()) .append("framework", getFramework())
.append("trainName", getTrainName()) .append("trainName", getTrainName())
.append("trainState", getTrainState()) .append("trainState", getTrainState())
.append("trainTimeend", getTrainTimeend()) .append("trainTimeend", getTrainTimeend())
.append("PART", getPART()) .append("part", getPart())
.append("TRAININFO", getTRAININFO()) .append("traininfo", getTraininfo())
.toString(); .toString();
} }
} }

@ -21,7 +21,7 @@ public interface TdTrainMapper extends BaseMapper<TdTrain>
* @param ID * @param ID
* @return * @return
*/ */
public TdTrain selectTdTrainByID(Long ID); public TdTrain selectTdTrainByID(Long id);
/** /**
* *
@ -58,10 +58,10 @@ public interface TdTrainMapper extends BaseMapper<TdTrain>
/** /**
* *
* *
* @param IDs * @param ids
* @return * @return
*/ */
public int deleteTdTrainByIDs(String[] IDs); public int deleteTdTrainByIDs(String[] ids);
public TrainCountDTO selectCountList(); public TrainCountDTO selectCountList();
} }

@ -21,7 +21,7 @@ public interface ITdTrainService extends IService<TdTrain>
* @param ID * @param ID
* @return * @return
*/ */
public TdTrain selectTdTrainByID(Long ID); public TdTrain selectTdTrainByID(Long id);
/** /**
* *
@ -50,10 +50,10 @@ public interface ITdTrainService extends IService<TdTrain>
/** /**
* *
* *
* @param IDs * @param ids
* @return * @return
*/ */
public int deleteTdTrainByIDs(String IDs); public int deleteTdTrainByIDs(String ids);
/** /**
* *

@ -35,9 +35,9 @@ public class TdTrainServiceImpl extends ServiceImpl<TdTrainMapper,TdTrain> imple
* @return * @return
*/ */
@Override @Override
public TdTrain selectTdTrainByID(Long ID) public TdTrain selectTdTrainByID(Long id)
{ {
return tdTrainMapper.selectTdTrainByID(ID); return tdTrainMapper.selectTdTrainByID(id);
} }
/** /**
@ -83,9 +83,9 @@ public class TdTrainServiceImpl extends ServiceImpl<TdTrainMapper,TdTrain> imple
* @return * @return
*/ */
@Override @Override
public int deleteTdTrainByIDs(String IDs) public int deleteTdTrainByIDs(String ids)
{ {
return tdTrainMapper.deleteTdTrainByIDs(Convert.toStrArray(IDs)); return tdTrainMapper.deleteTdTrainByIDs(Convert.toStrArray(ids));
} }
/** /**

@ -5,88 +5,88 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.ruoyi.system.mapper.TdTrainMapper"> <mapper namespace="com.ruoyi.system.mapper.TdTrainMapper">
<resultMap type="TdTrain" id="TdTrainResult"> <resultMap type="TdTrain" id="TdTrainResult">
<result property="ID" column="ID" /> <result property="id" column="id" />
<result property="USERNAME" column="USERNAME" /> <result property="username" column="username" />
<result property="deptName" column="DEPT_NAME" /> <result property="deptName" column="dept_name" />
<result property="trainType" column="TRAIN_TYPE" /> <result property="trainType" column="train_type" />
<result property="trainSubject" column="TRAIN_SUBJECT" /> <result property="trainSubject" column="train_subject" />
<result property="trainAddress" column="TRAIN_ADDRESS" /> <result property="trainAddress" column="train_address" />
<result property="trainDate" column="TRAIN_DATE" /> <result property="trainDate" column="train_date" />
<result property="createStaffid" column="CREATE_STAFFID" /> <result property="createStaffid" column="create_staffid" />
<result property="createDepartid" column="CREATE_DEPARTID" /> <result property="createDepartid" column="create_departid" />
<result property="createDate" column="CREATE_DATE" /> <result property="createDate" column="create_date" />
<result property="updateDepartid" column="UPDATE_DEPARTID" /> <result property="updateDepartid" column="update_departid" />
<result property="updateStaffid" column="UPDATE_STAFFID" /> <result property="updateStaffid" column="update_staffid" />
<result property="updateDate" column="UPDATE_DATE" /> <result property="updateDate" column="update_date" />
<result property="AREAID" column="AREAID" /> <result property="areaid" column="areaid" />
<result property="FRAMEWORK" column="FRAMEWORK" /> <result property="framework" column="framework" />
<result property="trainName" column="TRAIN_NAME" /> <result property="trainName" column="train_name" />
<result property="trainState" column="TRAIN_STATE" /> <result property="trainState" column="train_state" />
<result property="trainTimeend" column="TRAIN_TIMEEND" /> <result property="trainTimeend" column="train_timeend" />
<result property="PART" column="PART" /> <result property="part" column="part" />
<result property="TRAININFO" column="TRAININFO" /> <result property="traininfo" column="traininfo" />
</resultMap> </resultMap>
<sql id="selectTdTrainVo"> <sql id="selectTdTrainVo">
select ID, USERNAME, DEPT_NAME, TRAIN_TYPE, TRAIN_SUBJECT, TRAIN_ADDRESS, TRAIN_DATE, CREATE_STAFFID, CREATE_DEPARTID, CREATE_DATE, UPDATE_DEPARTID, UPDATE_STAFFID, UPDATE_DATE, AREAID, FRAMEWORK, TRAIN_NAME, TRAIN_STATE, TRAIN_TIMEEND, PART, TRAININFO from td_train select id, username, dept_name, train_type, train_subject, train_address, train_date, create_staffid, create_departid, create_date, update_departid, update_staffid, update_date, areaid, framework, train_name, train_state, train_timeend, part, traininfo from td_train
</sql> </sql>
<select id="selectTdTrainList" parameterType="TdTrain" resultMap="TdTrainResult"> <select id="selectTdTrainList" parameterType="TdTrain" resultMap="TdTrainResult">
<include refid="selectTdTrainVo"/> <include refid="selectTdTrainVo"/>
<where> <where>
<if test="USERNAME != null and USERNAME != ''"> and USERNAME like concat('%', #{USERNAME}, '%')</if> <if test="username != null and username != ''"> and username like concat('%', #{username}, '%')</if>
<if test="deptName != null and deptName != ''"> and DEPT_NAME like concat('%', #{deptName}, '%')</if> <if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if>
<if test="trainType != null and trainType != ''"> and TRAIN_TYPE = #{trainType}</if> <if test="trainType != null and trainType != ''"> and train_type = #{trainType}</if>
<if test="trainSubject != null and trainSubject != ''"> and TRAIN_SUBJECT = #{trainSubject}</if> <if test="trainSubject != null and trainSubject != ''"> and train_subject = #{trainSubject}</if>
<if test="trainAddress != null and trainAddress != ''"> and TRAIN_ADDRESS = #{trainAddress}</if> <if test="trainAddress != null and trainAddress != ''"> and train_address = #{trainAddress}</if>
<if test="trainDate != null "> and TRAIN_DATE = #{trainDate}</if> <if test="trainDate != null "> and train_date = #{trainDate}</if>
<if test="createStaffid != null and createStaffid != ''"> and CREATE_STAFFID = #{createStaffid}</if> <if test="createStaffid != null and createStaffid != ''"> and create_staffid = #{createStaffid}</if>
<if test="createDepartid != null and createDepartid != ''"> and CREATE_DEPARTID = #{createDepartid}</if> <if test="createDepartid != null and createDepartid != ''"> and create_departid = #{createDepartid}</if>
<if test="createDate != null "> and CREATE_DATE = #{createDate}</if> <if test="createDate != null "> and create_date = #{createDate}</if>
<if test="updateDepartid != null and updateDepartid != ''"> and UPDATE_DEPARTID = #{updateDepartid}</if> <if test="updateDepartid != null and updateDepartid != ''"> and update_departid = #{updateDepartid}</if>
<if test="updateStaffid != null and updateStaffid != ''"> and UPDATE_STAFFID = #{updateStaffid}</if> <if test="updateStaffid != null and updateStaffid != ''"> and update_staffid = #{updateStaffid}</if>
<if test="updateDate != null "> and UPDATE_DATE = #{updateDate}</if> <if test="updateDate != null "> and update_date = #{updateDate}</if>
<if test="AREAID != null and AREAID != ''"> and AREAID = #{AREAID}</if> <if test="areaid != null and areaid != ''"> and areaid = #{AREAID}</if>
<if test="FRAMEWORK != null and FRAMEWORK != ''"> and FRAMEWORK = #{FRAMEWORK}</if> <if test="framework != null and framework != ''"> and framework = #{framework}</if>
<if test="trainName != null and trainName != ''"> and TRAIN_NAME like concat('%', #{trainName}, '%')</if> <if test="trainName != null and trainName != ''"> and train_name like concat('%', #{trainName}, '%')</if>
<if test="trainState != null "> and TRAIN_STATE = #{trainState}</if> <if test="trainState != null "> and train_state = #{trainState}</if>
<if test="trainTimeend != null "> and TRAIN_TIMEEND = #{trainTimeend}</if> <if test="trainTimeend != null "> and train_timeend = #{trainTimeend}</if>
<if test="PART != null and PART != ''"> and PART = #{PART}</if> <if test="part != null and part != ''"> and part = #{PART}</if>
<if test="TRAININFO != null and TRAININFO != ''"> and TRAININFO = #{TRAININFO}</if> <if test="traininfo != null and traininfo != ''"> and traininfo = #{traininfo}</if>
</where> </where>
order by CREATE_DATE desc order by create_date desc
</select> </select>
<select id="selectTdTrainByID" parameterType="Long" resultMap="TdTrainResult"> <select id="selectTdTrainByID" parameterType="Long" resultMap="TdTrainResult">
<include refid="selectTdTrainVo"/> <include refid="selectTdTrainVo"/>
where ID = #{ID} where id = #{id}
</select> </select>
<insert id="insertTdTrain" parameterType="TdTrain" useGeneratedKeys="true" keyProperty="ID"> <insert id="insertTdTrain" parameterType="TdTrain" useGeneratedKeys="true" keyProperty="id">
insert into td_train insert into td_train
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="USERNAME != null">USERNAME,</if> <if test="username != null">username,</if>
<if test="deptName != null">DEPT_NAME,</if> <if test="deptName != null">dept_name,</if>
<if test="trainType != null">TRAIN_TYPE,</if> <if test="trainType != null">train_type,</if>
<if test="trainSubject != null">TRAIN_SUBJECT,</if> <if test="trainSubject != null">train_subject,</if>
<if test="trainAddress != null">TRAIN_ADDRESS,</if> <if test="trainAddress != null">train_address,</if>
<if test="trainDate != null">TRAIN_DATE,</if> <if test="trainDate != null">train_date,</if>
<if test="createStaffid != null">CREATE_STAFFID,</if> <if test="createStaffid != null">create_staffid,</if>
<if test="createDepartid != null">CREATE_DEPARTID,</if> <if test="createDepartid != null">create_departid,</if>
<if test="createDate != null">CREATE_DATE,</if> <if test="createDate != null">create_date,</if>
<if test="updateDepartid != null">UPDATE_DEPARTID,</if> <if test="updateDepartid != null">update_departid,</if>
<if test="updateStaffid != null">UPDATE_STAFFID,</if> <if test="updateStaffid != null">update_staffid,</if>
<if test="updateDate != null">UPDATE_DATE,</if> <if test="updateDate != null">update_date,</if>
<if test="AREAID != null and AREAID != ''">AREAID,</if> <if test="areaid != null and areaid != ''">areaid,</if>
<if test="FRAMEWORK != null">FRAMEWORK,</if> <if test="framework != null">framework,</if>
<if test="trainName != null">TRAIN_NAME,</if> <if test="trainName != null">train_name,</if>
<if test="trainState != null">TRAIN_STATE,</if> <if test="trainState != null">train_state,</if>
<if test="trainTimeend != null">TRAIN_TIMEEND,</if> <if test="trainTimeend != null">train_timeend,</if>
<if test="PART != null">PART,</if> <if test="part != null">part,</if>
<if test="TRAININFO != null">TRAININFO,</if> <if test="traininfo != null">traininfo,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="USERNAME != null">#{USERNAME},</if> <if test="username != null">#{username},</if>
<if test="deptName != null">#{deptName},</if> <if test="deptName != null">#{deptName},</if>
<if test="trainType != null">#{trainType},</if> <if test="trainType != null">#{trainType},</if>
<if test="trainSubject != null">#{trainSubject},</if> <if test="trainSubject != null">#{trainSubject},</if>
@ -98,50 +98,50 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateDepartid != null">#{updateDepartid},</if> <if test="updateDepartid != null">#{updateDepartid},</if>
<if test="updateStaffid != null">#{updateStaffid},</if> <if test="updateStaffid != null">#{updateStaffid},</if>
<if test="updateDate != null">#{updateDate},</if> <if test="updateDate != null">#{updateDate},</if>
<if test="AREAID != null and AREAID != ''">#{AREAID},</if> <if test="areaid != null and areaid != ''">#{areaid},</if>
<if test="FRAMEWORK != null">#{FRAMEWORK},</if> <if test="framework != null">#{framework},</if>
<if test="trainName != null">#{trainName},</if> <if test="trainName != null">#{trainName},</if>
<if test="trainState != null">#{trainState},</if> <if test="trainState != null">#{trainState},</if>
<if test="trainTimeend != null">#{trainTimeend},</if> <if test="trainTimeend != null">#{trainTimeend},</if>
<if test="PART != null">#{PART},</if> <if test="part != null">#{part},</if>
<if test="TRAININFO != null">#{TRAININFO},</if> <if test="traininfo != null">#{traininfo},</if>
</trim> </trim>
</insert> </insert>
<update id="updateTdTrain" parameterType="TdTrain"> <update id="updateTdTrain" parameterType="TdTrain">
update td_train update td_train
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="USERNAME != null">USERNAME = #{USERNAME},</if> <if test="username != null">username = #{username},</if>
<if test="deptName != null">DEPT_NAME = #{deptName},</if> <if test="deptName != null">dept_name = #{deptName},</if>
<if test="trainType != null">TRAIN_TYPE = #{trainType},</if> <if test="trainType != null">train_type = #{trainType},</if>
<if test="trainSubject != null">TRAIN_SUBJECT = #{trainSubject},</if> <if test="trainSubject != null">train_subject = #{trainSubject},</if>
<if test="trainAddress != null">TRAIN_ADDRESS = #{trainAddress},</if> <if test="trainAddress != null">train_address = #{trainAddress},</if>
<if test="trainDate != null">TRAIN_DATE = #{trainDate},</if> <if test="trainDate != null">train_date = #{trainDate},</if>
<if test="createStaffid != null">CREATE_STAFFID = #{createStaffid},</if> <if test="createStaffid != null">create_staffid = #{createStaffid},</if>
<if test="createDepartid != null">CREATE_DEPARTID = #{createDepartid},</if> <if test="createDepartid != null">create_departid = #{createDepartid},</if>
<if test="createDate != null">CREATE_DATE = #{createDate},</if> <if test="createDate != null">create_date = #{createDate},</if>
<if test="updateDepartid != null">UPDATE_DEPARTID = #{updateDepartid},</if> <if test="updateDepartid != null">update_departid = #{updateDepartid},</if>
<if test="updateStaffid != null">UPDATE_STAFFID = #{updateStaffid},</if> <if test="updateStaffid != null">update_staffid = #{updateStaffid},</if>
<if test="updateDate != null">UPDATE_DATE = #{updateDate},</if> <if test="updateDate != null">update_date = #{updateDate},</if>
<if test="AREAID != null and AREAID != ''">AREAID = #{AREAID},</if> <if test="areaid != null and areaid != ''">areaid = #{areaid},</if>
<if test="FRAMEWORK != null">FRAMEWORK = #{FRAMEWORK},</if> <if test="framework != null">framework = #{framework},</if>
<if test="trainName != null">TRAIN_NAME = #{trainName},</if> <if test="trainName != null">train_name = #{trainName},</if>
<if test="trainState != null">TRAIN_STATE = #{trainState},</if> <if test="trainState != null">train_state = #{trainState},</if>
<if test="trainTimeend != null">TRAIN_TIMEEND = #{trainTimeend},</if> <if test="trainTimeend != null">train_timeend = #{trainTimeend},</if>
<if test="PART != null">PART = #{PART},</if> <if test="part != null">part = #{part},</if>
<if test="TRAININFO != null">TRAININFO = #{TRAININFO},</if> <if test="traininfo != null">traininfo = #{traininfo},</if>
</trim> </trim>
where ID = #{ID} where id = #{id}
</update> </update>
<delete id="deleteTdTrainByID" parameterType="Long"> <delete id="deleteTdTrainByID" parameterType="Long">
delete from td_train where ID = #{ID} delete from td_train where id = #{id}
</delete> </delete>
<delete id="deleteTdTrainByIDs" parameterType="String"> <delete id="deleteTdTrainByIDs" parameterType="String">
delete from td_train where ID in delete from td_train where id in
<foreach item="ID" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{ID} #{id}
</foreach> </foreach>
</delete> </delete>

Loading…
Cancel
Save