diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsFloodDroughtTeamController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsFloodDroughtTeamController.java index 8bb293c..02f2b38 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsFloodDroughtTeamController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsFloodDroughtTeamController.java @@ -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 mysheet = new ArrayList<>(); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsRescueTeamController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsRescueTeamController.java index 82707db..e28fe99 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsRescueTeamController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/ehs/EhsRescueTeamController.java @@ -81,6 +81,7 @@ public class EhsRescueTeamController extends BaseController { String[] header = {"队伍名称#", "队伍级别#", + "队伍性质(0-其他,1-政府,2-企业,3-社会)#", "备注#"}; ExcelExp e1 = new ExcelExp("应急救援队伍信息", header, ehsRescueTeamList, EhsRescueTeam.class); List 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); } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsFloodDroughtTeam/domain/EhsFloodDroughtTeam.java b/ruoyi-system/src/main/java/com/ruoyi/ehsFloodDroughtTeam/domain/EhsFloodDroughtTeam.java index 7a342f6..c74a153 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/ehsFloodDroughtTeam/domain/EhsFloodDroughtTeam.java +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsFloodDroughtTeam/domain/EhsFloodDroughtTeam.java @@ -38,6 +38,12 @@ public class EhsFloodDroughtTeam extends BaseEntity @Excel(name = "队伍级别") private String teamLevel; + /** + * 队伍性质 + */ + @Excel(name = "队伍性质(0-其他,1-政府,2-企业,3-社会)") + private Integer teamProperty; + /** * 救援人员数量 */ diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsFloodDroughtTeam/domain/FloodDroughtTeamImportTemplate.java b/ruoyi-system/src/main/java/com/ruoyi/ehsFloodDroughtTeam/domain/FloodDroughtTeamImportTemplate.java index a0d8d70..9a2e767 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/ehsFloodDroughtTeam/domain/FloodDroughtTeamImportTemplate.java +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsFloodDroughtTeam/domain/FloodDroughtTeamImportTemplate.java @@ -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; diff --git a/ruoyi-system/src/main/java/com/ruoyi/ehsFloodDroughtTeam/service/impl/EhsFloodDroughtTeamServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/ehsFloodDroughtTeam/service/impl/EhsFloodDroughtTeamServiceImpl.java index c30b35d..99bf6e1 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/ehsFloodDroughtTeam/service/impl/EhsFloodDroughtTeamServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/ehsFloodDroughtTeam/service/impl/EhsFloodDroughtTeamServiceImpl.java @@ -91,6 +91,7 @@ public class EhsFloodDroughtTeamServiceImpl extends ServiceImpl + @@ -19,7 +20,7 @@ - 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 diff --git a/ruoyi-system/src/main/resources/mapper/ehs/EhsRescueTeamMapper.xml b/ruoyi-system/src/main/resources/mapper/ehs/EhsRescueTeamMapper.xml index 5ccb208..ecaed70 100644 --- a/ruoyi-system/src/main/resources/mapper/ehs/EhsRescueTeamMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/ehs/EhsRescueTeamMapper.xml @@ -8,6 +8,7 @@ + @@ -20,7 +21,7 @@ - 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 diff --git a/ruoyi-ui/src/components/upload/upload.vue b/ruoyi-ui/src/components/upload/upload.vue index b505e95..a13b169 100644 --- a/ruoyi-ui/src/components/upload/upload.vue +++ b/ruoyi-ui/src/components/upload/upload.vue @@ -20,10 +20,10 @@
将文件拖到此处,或点击上传
-
+ 仅允许导入xls、xlsx格式文件。 + + + + + 搜索 重置 @@ -98,6 +108,11 @@ + + + @@ -143,6 +158,16 @@ + + + + + @@ -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, diff --git a/ruoyi-ui/src/views/ehs/ehsRescueTeam/index.vue b/ruoyi-ui/src/views/ehs/ehsRescueTeam/index.vue index 872920e..42c4067 100644 --- a/ruoyi-ui/src/views/ehs/ehsRescueTeam/index.vue +++ b/ruoyi-ui/src/views/ehs/ehsRescueTeam/index.vue @@ -28,6 +28,16 @@ @keyup.enter.native="handleQuery" /> + + + + + 搜索 重置 @@ -100,6 +110,11 @@ + + + @@ -146,6 +161,16 @@ + + + + + @@ -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,