队伍表新增队伍性质字段,行政执法台账修改无权限操作bug修复,队伍模块修改功能bug修复,删除功能bug修复

main
15036302109 11 months ago
parent 72816f87c6
commit eaa83699f9

@ -96,9 +96,9 @@ public class EhsFloodDroughtTeamController extends BaseController {
@PutMapping
public AjaxResult edit(@RequestBody EhsFloodDroughtTeam ehsFloodDroughtTeam) {
// 更新防汛抗旱队伍信息
ehsFloodDroughtTeamService.updateById(ehsFloodDroughtTeam);
boolean result = ehsFloodDroughtTeamService.updateById(ehsFloodDroughtTeam);
// 更新防汛抗旱队伍中人员信息
boolean result = workerService.updateWorkerByTeamId(ehsFloodDroughtTeam);
workerService.updateWorkerByTeamId(ehsFloodDroughtTeam);
return toAjax(result);
}
@ -111,8 +111,8 @@ public class EhsFloodDroughtTeamController extends BaseController {
@Log(title = "防汛抗旱队伍管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
ehsFloodDroughtTeamService.removeByIds(Arrays.asList(ids));
boolean result = workerService.removeWorkerByTeamIds(Arrays.asList(ids));
boolean result = ehsFloodDroughtTeamService.removeByIds(Arrays.asList(ids));
workerService.removeWorkerByTeamIds(Arrays.asList(ids));
return toAjax(result);
}
@ -125,6 +125,7 @@ public class EhsFloodDroughtTeamController extends BaseController {
String[] header =
{"队伍名称#",
"队伍级别#",
"队伍性质(0-其他,1-政府,2-企业,3-社会)#",
"备注#"};
ExcelExp e1 = new ExcelExp("防汛抗旱队伍信息", header, ehsFloodDroughtTeams, EhsFloodDroughtTeam.class);
List<ExcelExp> mysheet = new ArrayList<>();

@ -81,6 +81,7 @@ public class EhsRescueTeamController extends BaseController {
String[] header =
{"队伍名称#",
"队伍级别#",
"队伍性质(0-其他,1-政府,2-企业,3-社会)#",
"备注#"};
ExcelExp e1 = new ExcelExp("应急救援队伍信息", header, ehsRescueTeamList, EhsRescueTeam.class);
List<ExcelExp> mysheet = new ArrayList<>();
@ -129,9 +130,9 @@ public class EhsRescueTeamController extends BaseController {
@PutMapping
public AjaxResult edit(@RequestBody EhsRescueTeam ehsRescueTeam) {
// 更新应急救援队伍信息
ehsRescueTeamService.updateById(ehsRescueTeam);
boolean result = ehsRescueTeamService.updateById(ehsRescueTeam);
// 更新应急救援队伍人员信息
boolean result = ehsRescueTeamWorkerService.updateWorkerByTeamId(ehsRescueTeam);
ehsRescueTeamWorkerService.updateWorkerByTeamId(ehsRescueTeam);
return toAjax(result);
}
@ -145,9 +146,9 @@ public class EhsRescueTeamController extends BaseController {
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
// 根据队伍ids删除队伍
ehsRescueTeamService.removeByIds(Arrays.asList(ids));
boolean result = ehsRescueTeamService.removeByIds(Arrays.asList(ids));
// 根据队伍ids删除队伍中的队员
boolean result = ehsRescueTeamWorkerService.removeWorkerByTeamIds(Arrays.asList(ids));
ehsRescueTeamWorkerService.removeWorkerByTeamIds(Arrays.asList(ids));
return toAjax(result);
}
}

@ -38,6 +38,12 @@ public class EhsFloodDroughtTeam extends BaseEntity
@Excel(name = "队伍级别")
private String teamLevel;
/**
*
*/
@Excel(name = "队伍性质(0-其他,1-政府,2-企业,3-社会)")
private Integer teamProperty;
/**
*
*/

@ -13,6 +13,10 @@ public class FloodDroughtTeamImportTemplate {
@Excel(name = "队伍级别",type = Excel.Type.ALL)
private String teamLevel;
/** 队伍性质 */
@Excel(name = "队伍性质(0-其他,1-政府,2-企业,3-社会)",type = Excel.Type.ALL)
private Integer teamProperty;
/** 备注 */
@Excel(name = "备注",type = Excel.Type.ALL)
private String remark;

@ -91,6 +91,7 @@ public class EhsFloodDroughtTeamServiceImpl extends ServiceImpl<EhsFloodDroughtT
// temp.setId(IdUtils.fastSimpleUUID());
temp.setTeamName(floodDroughtTeamTemplate.getTeamName()); //队伍名称
temp.setTeamLevel(floodDroughtTeamTemplate.getTeamLevel()); //队伍级别
temp.setTeamProperty(floodDroughtTeamTemplate.getTeamProperty());// 队伍性质
temp.setRemark(floodDroughtTeamTemplate.getRemark()); // 备注
try {

@ -43,6 +43,12 @@ public class EhsRescueTeam extends BaseEntity {
@Excel(name = "队伍级别")
private String teamLevel;
/**
*
*/
@Excel(name = "队伍性质(0-其他,1-政府,2-企业,3-社会)")
private Integer teamProperty;
/**
*
*/

@ -13,6 +13,10 @@ public class RescueTeamImportTemplate {
@Excel(name = "队伍级别",type = Excel.Type.ALL)
private String teamLevel;
/** 队伍性质 */
@Excel(name = "队伍性质(0-其他,1-政府,2-企业,3-社会)",type = Excel.Type.ALL)
private Integer teamProperty;
/** 备注 */
@Excel(name = "备注",type = Excel.Type.ALL)
private String remark;

@ -102,6 +102,7 @@ public class EhsRescueTeamServiceImpl extends ServiceImpl<EhsRescueTeamMapper, E
// temp.setId(IdUtils.fastSimpleUUID());
temp.setTeamName(rescueTeamTemplate.getTeamName()); //队伍名称
temp.setTeamLevel(rescueTeamTemplate.getTeamLevel()); //队伍级别
temp.setTeamProperty(rescueTeamTemplate.getTeamProperty());// 队伍性质
temp.setRemark(rescueTeamTemplate.getRemark()); // 备注
try {
//插入数据

@ -8,6 +8,7 @@
<result property="id" column="id"/>
<result property="teamName" column="team_name"/>
<result property="teamLevel" column="team_level"/>
<result property="teamProperty" column="team_property"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
@ -19,7 +20,7 @@
</resultMap>
<sql id="selectEhsFloodDroughtTeamVo">
select id, team_name, team_level, create_by, create_time, update_by, update_time, remark, dept_id, create_user_id, update_user_id from ehs_flood_drought_team
select id, team_name, team_level, team_property, create_by, create_time, update_by, update_time, remark, dept_id, create_user_id, update_user_id from ehs_flood_drought_team
</sql>
<select id="selectEhsFloodDroughtTeamList" parameterType="EhsFloodDroughtTeam"
@ -28,6 +29,7 @@
<where>
<if test="teamName != null and teamName != ''">and team_name like concat('%', #{teamName}, '%')</if>
<if test="teamLevel != null and teamLevel != ''">and team_level = #{teamLevel}</if>
<if test="teamProperty != null">and team_property = #{teamProperty}</if>
<if test="deptId != null ">and dept_id = #{deptId}</if>
</where>
</select>

@ -8,6 +8,7 @@
<result property="id" column="id"/>
<result property="teamName" column="team_name"/>
<result property="teamLevel" column="team_level"/>
<result property="teamProperty" column="team_property"/>
<!--<result property="rescueWorkerNum" column="rescue_worker_num" />-->
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
@ -20,7 +21,7 @@
</resultMap>
<sql id="selectEhsRescueTeamVo">
select id, team_name, team_level, create_by, create_time, update_by, update_time, remark, dept_id, create_user_id, update_user_id from ehs_rescue_team
select id, team_name, team_level, team_property, create_by, create_time, update_by, update_time, remark, dept_id, create_user_id, update_user_id from ehs_rescue_team
</sql>
<select id="selectEhsRescueTeamList" parameterType="EhsRescueTeam" resultMap="EhsRescueTeamResult">
@ -28,6 +29,7 @@
<where>
<if test="teamName != null and teamName != ''">and team_name like concat('%', #{teamName}, '%')</if>
<if test="teamLevel != null and teamLevel != ''">and team_level like concat('%', #{teamLevel}, '%')</if>
<if test="teamProperty != null">and team_property = #{teamProperty}</if>
<if test="deptId != null and deptId != ''">and dept_id = #{deptId}</if>
</where>
</select>

@ -20,10 +20,10 @@
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip">
<div class="el-upload__tip" slot="tip">
<!-- <div class="el-upload__tip" slot="tip">
<el-checkbox v-model="upload.updateSupport" />
是否更新已经存在的用户数据
</div>
</div>-->
<span>仅允许导入xlsxlsx格式文件</span>
<el-link
type="primary"

@ -27,6 +27,16 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="队伍性质" prop="teamProperty">
<el-select v-model="queryParams.teamProperty" placeholder="请选择队伍性质" clearable>
<el-option
v-for="dict in dict.type.team_property"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -98,6 +108,11 @@
</el-table-column>
<el-table-column label="队伍名称" align="center" prop="teamName" />
<el-table-column label="队伍级别" align="center" prop="teamLevel" />
<el-table-column label="队伍性质" align="center" prop="teamProperty">
<template slot-scope="scope">
<dict-tag :options="dict.type.team_property" :value="scope.row.teamProperty"/>
</template>
</el-table-column>
<el-table-column label="救援人员数量" align="center" prop="rescueWorkerNum" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@ -143,6 +158,16 @@
<el-form-item label="队伍级别" prop="teamLevel">
<el-input v-model="form.teamLevel" placeholder="请输入队伍级别" />
</el-form-item>
<el-form-item label="队伍性质" prop="teamProperty">
<el-select v-model="form.teamProperty" placeholder="请选择队伍性质">
<el-option
v-for="dict in dict.type.team_property"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
@ -178,6 +203,7 @@ import tdh from "../ehsFloodDroughtWorker/index.vue";
import {listAllDept } from "@/api/system/dept";
export default {
name: "EhsFloodDroughtTeam",
dicts: ['team_property'],
components: {
importUpload,
tdh,
@ -214,6 +240,7 @@ export default {
teamName: null,
teamLevel: null,
deptId: null,
teamProperty: null,
},
//
form: {},
@ -267,6 +294,7 @@ export default {
id: null,
teamName: null,
teamLevel: null,
teamProperty: null,
createBy: null,
createTime: null,
updateBy: null,

@ -28,6 +28,16 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="队伍性质" prop="teamProperty">
<el-select v-model="queryParams.teamProperty" placeholder="请选择队伍性质" clearable>
<el-option
v-for="dict in dict.type.team_property"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -100,6 +110,11 @@
</el-table-column>
<el-table-column label="队伍名称" align="center" prop="teamName" />
<el-table-column label="队伍级别" align="center" prop="teamLevel" />
<el-table-column label="队伍性质" align="center" prop="teamProperty">
<template slot-scope="scope">
<dict-tag :options="dict.type.team_property" :value="scope.row.teamProperty"/>
</template>
</el-table-column>
<el-table-column label="救援人员数量" align="center" prop="rescueWorkerNum" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@ -146,6 +161,16 @@
<el-form-item label="队伍级别" prop="teamLevel">
<el-input v-model="form.teamLevel" placeholder="请输入队伍级别" />
</el-form-item>
<el-form-item label="队伍性质" prop="teamProperty">
<el-select v-model="form.teamProperty" placeholder="请选择队伍性质">
<el-option
v-for="dict in dict.type.team_property"
:key="dict.value"
:label="dict.label"
:value="parseInt(dict.value)"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
@ -183,6 +208,7 @@ import tdh from "../ehsRescueTeamWorker/index.vue"
import {listAllDept } from "@/api/system/dept";
export default {
name: "EhsRescueTeam",
dicts: ['team_property'],
components: {
importUpload,
tdh,
@ -222,6 +248,7 @@ export default {
teamName: null,
teamLevel: null,
deptId: null,
teamProperty: null,
},
//
form: {},
@ -273,6 +300,7 @@ export default {
teamName: null,
teamLevel: null,
rescueWorkerNum: null,
teamProperty: null,
createBy: null,
createTime: null,
updateBy: null,

Loading…
Cancel
Save