diff --git a/rwk-admin/src/main/java/com/rwk/web/controller/ability/RwkMeetingController.java b/rwk-admin/src/main/java/com/rwk/web/controller/ability/RwkMeetingController.java index 09dfa12..5830b24 100644 --- a/rwk-admin/src/main/java/com/rwk/web/controller/ability/RwkMeetingController.java +++ b/rwk-admin/src/main/java/com/rwk/web/controller/ability/RwkMeetingController.java @@ -1,63 +1,155 @@ package com.rwk.web.controller.ability; -import com.rwk.common.core.controller.BaseController; -import com.rwk.common.core.page.TableDataInfo; +import java.util.List; +import com.rwk.common.utils.DateUtils; import com.rwk.system.domain.RwkStaffInformation; import com.rwk.system.service.IRwkStaffInformationService; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.*; - -import java.util.List; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import com.rwk.common.annotation.Log; +import com.rwk.common.enums.BusinessType; +import com.rwk.system.domain.RwkMeeting; +import com.rwk.system.service.IRwkMeetingService; +import com.rwk.common.core.controller.BaseController; +import com.rwk.common.core.domain.AjaxResult; +import com.rwk.common.utils.poi.ExcelUtil; +import com.rwk.common.core.page.TableDataInfo; +/** + * 教育培训Controller + * + * @author ruoyi + * @date 2024-12-05 + */ @Controller @RequestMapping("/system/meeting") -public class RwkMeetingController extends BaseController { +public class RwkMeetingController extends BaseController +{ private String prefix = "system/meeting"; + @Autowired + private IRwkMeetingService rwkMeetingService; + @Autowired private IRwkStaffInformationService rwkStaffInformationService; @RequiresPermissions("system:meeting:view") @GetMapping() - public String information() + public String meeting() { return prefix + "/meeting"; } /** - * 查询人员信息列表 + * 查询教育培训列表 */ @RequiresPermissions("system:meeting:list") @PostMapping("/list") @ResponseBody - public TableDataInfo list(RwkStaffInformation rwkStaffInformation) + public TableDataInfo list(RwkMeeting rwkMeeting) { startPage(); - List list = rwkStaffInformationService.selectRwkStaffInformationList(rwkStaffInformation); + List list = rwkMeetingService.selectRwkMeetingList(rwkMeeting); return getDataTable(list); } /** - * 修改人员信息 + * 查看培训活动详情 + */ + @GetMapping("/meetingView/{id}") + public String receiveView(@PathVariable("id") Long id, ModelMap mmap) + { + RwkMeeting rwkMeeting = rwkMeetingService.selectRwkMeetingById(id); + mmap.put("rwkMeeting", rwkMeeting); + return prefix + "/meetingView"; + } + + /** + * 新增教育培训 + */ + @GetMapping("/add") + public String add(ModelMap mmap) + { + getJoinPeople(mmap); + return prefix + "/add"; + } + + /** + * 新增保存教育培训 + */ + @RequiresPermissions("system:meeting:add") + @Log(title = "教育培训", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(RwkMeeting rwkMeeting) + { + rwkMeeting.setCreateTime(DateUtils.getNowDate()); + rwkMeeting.setCreateBy(getSysUser().getLoginName()); + return toAjax(rwkMeetingService.insertRwkMeeting(rwkMeeting)); + } + + /** + * 修改教育培训 */ @RequiresPermissions("system:meeting:edit") @GetMapping("/edit/{id}") public String edit(@PathVariable("id") Long id, ModelMap mmap) { + RwkMeeting rwkMeeting = rwkMeetingService.selectRwkMeetingById(id); + mmap.put("rwkMeeting", rwkMeeting); + getJoinPeople(mmap); return prefix + "/edit"; } /** - * 修改人员信息 + * 修改保存教育培训 */ - @RequiresPermissions("system:meeting:add") - @GetMapping("/add") - public String add() + @RequiresPermissions("system:meeting:edit") + @Log(title = "教育培训", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(RwkMeeting rwkMeeting) { - return prefix + "/add"; + return toAjax(rwkMeetingService.updateRwkMeeting(rwkMeeting)); } + /** + * 删除教育培训 + */ + @RequiresPermissions("system:meeting:remove") + @Log(title = "教育培训", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(rwkMeetingService.deleteRwkMeetingByIds(ids)); + } + + /** + * 导出教育培训列表 + */ + @RequiresPermissions("system:meeting:export") + @Log(title = "教育培训", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(RwkMeeting rwkMeeting) + { + List list = rwkMeetingService.selectRwkMeetingList(rwkMeeting); + ExcelUtil util = new ExcelUtil(RwkMeeting.class); + return util.exportExcel(list, "教育培训数据"); + } + + //获取参与人员方法 + private void getJoinPeople(ModelMap mmap){ + //获取参与人员 + List list = rwkStaffInformationService.selectRwkStaffInformationList(new RwkStaffInformation()); + mmap.put("userList", list); + } } diff --git a/rwk-admin/src/main/java/com/rwk/web/controller/ability/RwkMeetingStaffController.java b/rwk-admin/src/main/java/com/rwk/web/controller/ability/RwkMeetingStaffController.java new file mode 100644 index 0000000..e4dac09 --- /dev/null +++ b/rwk-admin/src/main/java/com/rwk/web/controller/ability/RwkMeetingStaffController.java @@ -0,0 +1,127 @@ +package com.rwk.web.controller.ability; + +import java.util.List; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import com.rwk.common.annotation.Log; +import com.rwk.common.enums.BusinessType; +import com.rwk.system.domain.RwkMeetingStaff; +import com.rwk.system.service.IRwkMeetingStaffService; +import com.rwk.common.core.controller.BaseController; +import com.rwk.common.core.domain.AjaxResult; +import com.rwk.common.utils.poi.ExcelUtil; +import com.rwk.common.core.page.TableDataInfo; + +/** + * 培训人员签到Controller + * + * @author ruoyi + * @date 2024-12-05 + */ +@Controller +@RequestMapping("/system/trainStaff") +public class RwkMeetingStaffController extends BaseController +{ + private String prefix = "system/trainStaff"; + + @Autowired + private IRwkMeetingStaffService rwkMeetingStaffService; + + @RequiresPermissions("system:trainStaff:view") + @GetMapping() + public String trainStaff() + { + return prefix + "/trainStaff"; + } + + /** + * 查询培训人员签到列表 + */ + @RequiresPermissions("system:trainStaff:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(RwkMeetingStaff rwkMeetingStaff) + { + startPage(); + List list = rwkMeetingStaffService.selectRwkMeetingStaffList(rwkMeetingStaff); + return getDataTable(list); + } + + /** + * 导出培训人员签到列表 + */ + @RequiresPermissions("system:trainStaff:export") + @Log(title = "培训人员签到", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(RwkMeetingStaff rwkMeetingStaff) + { + List list = rwkMeetingStaffService.selectRwkMeetingStaffList(rwkMeetingStaff); + ExcelUtil util = new ExcelUtil(RwkMeetingStaff.class); + return util.exportExcel(list, "培训人员签到数据"); + } + + /** + * 新增培训人员签到 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存培训人员签到 + */ + @RequiresPermissions("system:trainStaff:add") + @Log(title = "培训人员签到", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(RwkMeetingStaff rwkMeetingStaff) + { + return toAjax(rwkMeetingStaffService.insertRwkMeetingStaff(rwkMeetingStaff)); + } + + /** + * 修改培训人员签到 + */ + @RequiresPermissions("system:trainStaff:edit") + @GetMapping("/edit/{id}") + public String edit(@PathVariable("id") Long id, ModelMap mmap) + { + RwkMeetingStaff rwkMeetingStaff = rwkMeetingStaffService.selectRwkMeetingStaffById(id); + mmap.put("rwkMeetingStaff", rwkMeetingStaff); + return prefix + "/edit"; + } + + /** + * 修改保存培训人员签到 + */ + @RequiresPermissions("system:trainStaff:edit") + @Log(title = "培训人员签到", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(RwkMeetingStaff rwkMeetingStaff) + { + return toAjax(rwkMeetingStaffService.updateRwkMeetingStaff(rwkMeetingStaff)); + } + + /** + * 删除培训人员签到 + */ + @RequiresPermissions("system:trainStaff:remove") + @Log(title = "培训人员签到", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(rwkMeetingStaffService.deleteRwkMeetingStaffByIds(ids)); + } +} diff --git a/rwk-admin/src/main/java/com/rwk/web/controller/ability/RwkStaffInformationController.java b/rwk-admin/src/main/java/com/rwk/web/controller/ability/RwkStaffInformationController.java index 9944c95..6538531 100644 --- a/rwk-admin/src/main/java/com/rwk/web/controller/ability/RwkStaffInformationController.java +++ b/rwk-admin/src/main/java/com/rwk/web/controller/ability/RwkStaffInformationController.java @@ -4,7 +4,10 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; import com.rwk.common.utils.DateUtils; -import com.rwk.system.service.IRwkFamilyMemberService; +import com.rwk.system.domain.RwkMeeting; +import com.rwk.system.domain.RwkMeetingStaff; +import com.rwk.system.service.IRwkMeetingService; +import com.rwk.system.service.IRwkMeetingStaffService; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -38,8 +41,13 @@ public class RwkStaffInformationController extends BaseController @Autowired private IRwkStaffInformationService rwkStaffInformationService; + //人员培训记录表 @Autowired - private IRwkFamilyMemberService rwkFamilyMemberService; + private IRwkMeetingStaffService rwkMeetingStaffService; + + //会议内容表 + @Autowired + private IRwkMeetingService rwkMeetingService; @RequiresPermissions("system:information:view") @GetMapping() @@ -57,7 +65,7 @@ public class RwkStaffInformationController extends BaseController /** * 查看收文 */ - @GetMapping("informationView/{id}") + @GetMapping("/informationView/{id}") public String receiveView(@PathVariable("id") Long id, ModelMap mmap) { RwkStaffInformation rwkStaffInformation = rwkStaffInformationService.selectRwkStaffInformationById(id); @@ -68,6 +76,8 @@ public class RwkStaffInformationController extends BaseController mmap.put("resumeLines",resumeLines); mmap.put("trainingLines",trainingLines); mmap.put("achievementLines",achievementLines); + //获取当前人员的培训记录消息 + getTrainingRecord(rwkStaffInformation,mmap); return prefix + "/informationView"; } @@ -184,6 +194,7 @@ public class RwkStaffInformationController extends BaseController return success(mmap); } + //对数据换行符进行处理 private List> splitConversion(String string){ List> result = new ArrayList<>(); String[] lines = string.split("\r\n"); @@ -192,7 +203,9 @@ public class RwkStaffInformationController extends BaseController String[] parts = line.trim().split("\\s+"); List lineParts = new ArrayList<>(); for (String part : parts) { - lineParts.add(part.trim()); + if (!part.trim().isEmpty()) { + lineParts.add(part.trim()); + } } if (!lineParts.isEmpty()) { result.add(lineParts); @@ -200,4 +213,18 @@ public class RwkStaffInformationController extends BaseController } return result; } + + //获取当前人员的培训记录 + private void getTrainingRecord(RwkStaffInformation rwkStaffInformation,ModelMap mmap) { + RwkMeetingStaff rwkMeetingStaff = new RwkMeetingStaff(); + rwkMeetingStaff.setPersonnelId(rwkStaffInformation.getId().toString()); + rwkMeetingStaff.setIsSign(1L); + List rwkMeetingList = new ArrayList<>(); + List rwkMeetingStaffList = rwkMeetingStaffService.selectRwkMeetingStaffList(rwkMeetingStaff); + for (RwkMeetingStaff rwkMeetingStaff1 : rwkMeetingStaffList) { + RwkMeeting rwkMeeting = rwkMeetingService.selectRwkMeetingById(rwkMeetingStaff1.getMeetingId()); + rwkMeetingList.add(rwkMeeting); + } + mmap.put("rwkMeetingList", rwkMeetingList); + } } diff --git a/rwk-admin/src/main/resources/static/ruoyi/js/ry-ui.js b/rwk-admin/src/main/resources/static/ruoyi/js/ry-ui.js index 9dc648f..7a8fbf0 100644 --- a/rwk-admin/src/main/resources/static/ruoyi/js/ry-ui.js +++ b/rwk-admin/src/main/resources/static/ruoyi/js/ry-ui.js @@ -56,11 +56,11 @@ var table = { firstLoad: true, showFooter: false, search: false, - showSearch: true, + showSearch: false, showPageGo: false, - showRefresh: true, - showColumns: true, - showToggle: true, + showRefresh: false, + showColumns: false, + showToggle: false, showExport: false, showPrint: false, exportDataType: 'all', diff --git a/rwk-admin/src/main/resources/templates/main.html b/rwk-admin/src/main/resources/templates/main.html index eced24a..c788e42 100644 --- a/rwk-admin/src/main/resources/templates/main.html +++ b/rwk-admin/src/main/resources/templates/main.html @@ -54,7 +54,7 @@

近期培训活动

-
+
@@ -96,13 +96,13 @@

学历、学位情况

-
+
全日制教育
在职教育
-
-
+
+
@@ -156,12 +156,6 @@ {name:'数据3',value:310}, {name:'数据4',value:335} ]; - - - $(".cut").click(function () { - $('.cut').removeClass('active'); - $(this).addClass('active'); - }); var grid = {left: '10%', right: '6%', bottom: '3%', top:'6%'} //饼图1 pieChartMethod('pieChart1',array1,"职务层次情况",'60%',"",grid,"",true); diff --git a/rwk-admin/src/main/resources/templates/system/information/addressBook.html b/rwk-admin/src/main/resources/templates/system/information/addressBook.html index 2d227dd..1f610f8 100644 --- a/rwk-admin/src/main/resources/templates/system/information/addressBook.html +++ b/rwk-admin/src/main/resources/templates/system/information/addressBook.html @@ -156,11 +156,6 @@ height: 200, pagination:false, sidePagination: "client", - showFooter: false, - showSearch: false, - showRefresh: false, - showToggle: false, - showColumns: false, virtualScroll: true, data:[ {id:1,name:"姓名1",phone:"18756365787",email:"18756365787@163.c0m",subset:1}, diff --git a/rwk-admin/src/main/resources/templates/system/information/informationView.html b/rwk-admin/src/main/resources/templates/system/information/informationView.html index cfa6aea..b85fd03 100644 --- a/rwk-admin/src/main/resources/templates/system/information/informationView.html +++ b/rwk-admin/src/main/resources/templates/system/information/informationView.html @@ -252,7 +252,7 @@

简历

-
@@ -264,10 +264,15 @@

培训情况

-
+
+
+
+
+
培训时间:
+
@@ -275,7 +280,7 @@

主要成就

-
+
diff --git a/rwk-admin/src/main/resources/templates/system/meeting/add.html b/rwk-admin/src/main/resources/templates/system/meeting/add.html index 43b782a..a352c0d 100644 --- a/rwk-admin/src/main/resources/templates/system/meeting/add.html +++ b/rwk-admin/src/main/resources/templates/system/meeting/add.html @@ -2,10 +2,9 @@ - + -
@@ -16,15 +15,14 @@
- +

-
- +

@@ -33,7 +31,7 @@
- +
@@ -52,12 +50,9 @@
- - - +
@@ -70,15 +65,67 @@ var prefix = ctx + "system/meeting"; var editFlag = [[${@permission.hasPermi('system:meeting:edit')}]]; var removeFlag = [[${@permission.hasPermi('system:meeting:remove')}]]; + + // 左右互选控件 + $('.dual_select').bootstrapDualListbox({ + nonSelectedListLabel: '未邀请人员', + selectedListLabel: '已邀请人员', + preserveSelectionOnMove: 'moved', + moveOnSelect: false, // 出现一个剪头,表示可以一次选择一个 + filterTextClear: '搜索重置', + moveSelectedLabel: "添加", + moveAllLabel: '添加所有', + removeSelectedLabel: "移除", + removeAllLabel: '移除所有', + filterPlaceHolder:"模糊搜索", + infoTextEmpty : "无用户可选择", + infoTextFiltered:"搜索到 {0} 总共 {1}", + infoText: '共{0}个', + showFilterInputs: true,// 是否带搜索 + selectorMinimalHeight: 160 + }); + + function submitHandler() { + if ($.validate.form()) { + var userList = getSelectedItems("duallistbox_demo"); + if (userList.length === 0) { + $.modal.alertWarning("请至少选择一条记录"); + return; + } + var array = $('#form-meeting-add').serializeArray(); + var obj = {}; + array.forEach(function(item) { + obj[item.name] = item.value; + }); + userList.forEach(function (item,index){ + for (var key in item){ + obj["rwkMeetingStaffList["+index+"]."+key] = item[key]; + } + }) + $.operate.save(prefix + "/add", $.param(obj)); + } + } + + // 获取双重多选中的值 + function getSelectedItems(id) { + var selectedItems = []; + // 获取选中的选项 + $("#"+id+" option:selected").each(function() { + selectedItems.push({ + personnelName: $(this).text(), + isSign: 0, + personnelId: $(this).val(), + mobilePhone:$(this).attr("data_phone") + }); + }); + return selectedItems; + } + + //附件表格加载 $(function() { var options = { pagination:false, sidePagination: "client", - showFooter: false, - showSearch: false, - showRefresh: false, - showToggle: false, - showColumns: false, virtualScroll: true, showHeader:false, height:160, @@ -111,86 +158,7 @@ }] }; $.table.init(options); - - - // 左右互选控件 - var prefix = ctx + "flowable/copy"; - $('.dual_select').bootstrapDualListbox({ - nonSelectedListLabel: '未邀请人员', - selectedListLabel: '已邀请人员', - preserveSelectionOnMove: 'moved', - moveOnSelect: false, // 出现一个剪头,表示可以一次选择一个 - filterTextClear: '搜索重置', - moveSelectedLabel: "添加", - moveAllLabel: '添加所有', - removeSelectedLabel: "移除", - removeAllLabel: '移除所有', - filterPlaceHolder:"模糊搜索", - infoTextEmpty : "无用户可选择", - infoTextFiltered:"搜索到 {0} 总共 {1}", - infoText: '共{0}个', - showFilterInputs: true, // 是否带搜索 - selectorMinimalHeight: 160 - }); - - function submitHandler() { - var title=$("#title").val(); - var lcid=$("#id").val(); - var namelc=$("#name").val(); - var key=$("#key").val(); - var mj=$("#mj").val(); - var roomIds = $("#bootstrap-duallistbox-selected-list_duallistbox_demo").map(function(){ - return $(this).val(); - }).get().join(","); - // var name = $.table.selectColumns('userName'); - // var id = $.table.selectColumns('userType') - if (roomIds.length == 0) { - $.modal.alertWarning("请至少选择一条记录"); - return; - } - var data = {"name": roomIds,"title":title,"lcid":lcid,"namelc":namelc,"key":key,"mj":mj}; - $.operate.save(prefix + "/add",data); - - $.modal.close(); - page_Path(); - // parent.location.reload(); - $.operate.successCallback(result); - } - - // function submitHandler(){ - // - // var roomIds = $("#bootstrap-duallistbox-selected-list_duallistbox_demo").map(function(){ - // return $(this).val(); - // }).get().join(","); - // alert("选中--"+roomIds); - // // $.ajax({ - // // - // // }) - // } - // 刷新页面 - function page_Path(){ - var obj = new Object(); - obj._type = ""; // 页面刷新 - obj._pagePath =""; // 需要刷新的路径 - obj.denote = "backlog"; // 用于区别同页面不同方法 - ws.send(JSON.stringify(obj)) - if (ws) { - ws.send(JSON.stringify(obj)); - } else { - alert("未连接到服务器"); - } - } - function checkItem(){ - // var arrays = $.table.selectColumns("userId"); - var arrays = $.table.selectColumns("userCode"); - - alert(arrays); - } }); - - - - \ No newline at end of file diff --git a/rwk-admin/src/main/resources/templates/system/meeting/edit.html b/rwk-admin/src/main/resources/templates/system/meeting/edit.html index c4dfb46..4a1688b 100644 --- a/rwk-admin/src/main/resources/templates/system/meeting/edit.html +++ b/rwk-admin/src/main/resources/templates/system/meeting/edit.html @@ -1,153 +1,144 @@ - + + - + -
- - - - - - -
-
-

培训活动标题示例

+
+ + + +
+

-
-
-
-
-
-
-
-
-
+
+
+
+
+ +
+
+
+
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+
+ +
+
+
+
+
+
+ +
+
+
-
+ \ No newline at end of file diff --git a/rwk-admin/src/main/resources/templates/system/meeting/meeting.html b/rwk-admin/src/main/resources/templates/system/meeting/meeting.html index d42a3c7..1de72f9 100644 --- a/rwk-admin/src/main/resources/templates/system/meeting/meeting.html +++ b/rwk-admin/src/main/resources/templates/system/meeting/meeting.html @@ -1,22 +1,20 @@ - + -
-
  • - +
  • @@ -33,10 +31,10 @@
+ \ No newline at end of file diff --git a/rwk-admin/src/main/resources/templates/system/meeting/meetingView.html b/rwk-admin/src/main/resources/templates/system/meeting/meetingView.html new file mode 100644 index 0000000..61248f0 --- /dev/null +++ b/rwk-admin/src/main/resources/templates/system/meeting/meetingView.html @@ -0,0 +1,176 @@ + + + + + + + +
+ + + + + + + +
+

[[*{meetingName}]]

+
+
+
+
[[*{meetingContent}]]
+
培训时间:[[*{meetingDate}]]
+
+
+
+ +
+
+
+
+
+
+
+
+ + +
+ + + + + \ No newline at end of file diff --git a/rwk-system/src/main/java/com/rwk/system/domain/RwkMeeting.java b/rwk-system/src/main/java/com/rwk/system/domain/RwkMeeting.java new file mode 100644 index 0000000..05ab6c4 --- /dev/null +++ b/rwk-system/src/main/java/com/rwk/system/domain/RwkMeeting.java @@ -0,0 +1,136 @@ +package com.rwk.system.domain; + +import java.util.List; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.rwk.common.annotation.Excel; +import com.rwk.common.core.domain.BaseEntity; + +/** + * 教育培训对象 rwk_meeting + * + * @author ruoyi + * @date 2024-12-05 + */ +public class RwkMeeting extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键id */ + private Long id; + + /** 培训名称 */ + @Excel(name = "培训名称") + private String meetingName; + + /** 培训内容 */ + @Excel(name = "培训内容") + private String meetingContent; + + /** 培训时间 */ + @Excel(name = "培训时间") + private String meetingDate; + + /** 培训发起单位 */ + @Excel(name = "培训发起单位") + private String meetingByCompany; + + /** 培训人员签到信息 */ + private List rwkMeetingStaffList; + + private String startDate; + + private String endDate; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public void setMeetingName(String meetingName) + { + this.meetingName = meetingName; + } + + public String getMeetingName() + { + return meetingName; + } + + public void setMeetingContent(String meetingContent) + { + this.meetingContent = meetingContent; + } + + public String getMeetingContent() + { + return meetingContent; + } + + public void setMeetingDate(String meetingDate) + { + this.meetingDate = meetingDate; + } + + public String getMeetingDate() + { + return meetingDate; + } + + public void setMeetingByCompany(String meetingByCompany) + { + this.meetingByCompany = meetingByCompany; + } + + public String getMeetingByCompany() + { + return meetingByCompany; + } + + public List getRwkMeetingStaffList() + { + return rwkMeetingStaffList; + } + + public void setRwkMeetingStaffList(List rwkMeetingStaffList) + { + this.rwkMeetingStaffList = rwkMeetingStaffList; + } + + public String getStartDate() { + return startDate; + } + + public void setStartDate(String startDate) { + this.startDate = startDate; + } + + public String getEndDate() { + return endDate; + } + + public void setEndDate(String endDate) { + this.endDate = endDate; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("meetingName", getMeetingName()) + .append("meetingContent", getMeetingContent()) + .append("meetingDate", getMeetingDate()) + .append("meetingByCompany", getMeetingByCompany()) + .append("createTime", getCreateTime()) + .append("createBy", getCreateBy()) + .append("rwkMeetingStaffList", getRwkMeetingStaffList()) + .append("startDate", getStartDate()) + .append("endDate", getEndDate()) + .toString(); + } +} diff --git a/rwk-system/src/main/java/com/rwk/system/domain/RwkMeetingStaff.java b/rwk-system/src/main/java/com/rwk/system/domain/RwkMeetingStaff.java new file mode 100644 index 0000000..413e75b --- /dev/null +++ b/rwk-system/src/main/java/com/rwk/system/domain/RwkMeetingStaff.java @@ -0,0 +1,112 @@ +package com.rwk.system.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.rwk.common.annotation.Excel; +import com.rwk.common.core.domain.BaseEntity; + +/** + * 培训人员签到对象 rwk_meeting_staff + * + * @author ruoyi + * @date 2024-12-05 + */ +public class RwkMeetingStaff extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键id */ + private Long id; + + /** 教育培训会议标识 */ + @Excel(name = "教育培训会议标识") + private Long meetingId; + + /** 人员姓名 */ + @Excel(name = "人员姓名") + private String personnelName; + + /** 是否签到(1/0) */ + @Excel(name = "是否签到(1/0)") + private Long isSign; + + /** 人员ID */ + @Excel(name = "人员ID") + private String personnelId; + + /** 手机号码 */ + @Excel(name = "手机号码") + private String mobilePhone; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public void setMeetingId(Long meetingId) + { + this.meetingId = meetingId; + } + + public Long getMeetingId() + { + return meetingId; + } + + public void setPersonnelName(String personnelName) + { + this.personnelName = personnelName; + } + + public String getPersonnelName() + { + return personnelName; + } + + public void setIsSign(Long isSign) + { + this.isSign = isSign; + } + + public Long getIsSign() + { + return isSign; + } + + public void setPersonnelId(String personnelId) + { + this.personnelId = personnelId; + } + + public String getPersonnelId() + { + return personnelId; + } + + public void setMobilePhone(String mobilePhone) + { + this.mobilePhone = mobilePhone; + } + + public String getMobilePhone() + { + return mobilePhone; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("meetingId", getMeetingId()) + .append("personnelName", getPersonnelName()) + .append("isSign", getIsSign()) + .append("personnelId", getPersonnelId()) + .append("mobilePhone", getMobilePhone()) + .toString(); + } +} diff --git a/rwk-system/src/main/java/com/rwk/system/mapper/RwkMeetingMapper.java b/rwk-system/src/main/java/com/rwk/system/mapper/RwkMeetingMapper.java new file mode 100644 index 0000000..b018e6f --- /dev/null +++ b/rwk-system/src/main/java/com/rwk/system/mapper/RwkMeetingMapper.java @@ -0,0 +1,87 @@ +package com.rwk.system.mapper; + +import java.util.List; +import com.rwk.system.domain.RwkMeeting; +import com.rwk.system.domain.RwkMeetingStaff; + +/** + * 教育培训Mapper接口 + * + * @author ruoyi + * @date 2024-12-05 + */ +public interface RwkMeetingMapper +{ + /** + * 查询教育培训 + * + * @param id 教育培训主键 + * @return 教育培训 + */ + public RwkMeeting selectRwkMeetingById(Long id); + + /** + * 查询教育培训列表 + * + * @param rwkMeeting 教育培训 + * @return 教育培训集合 + */ + public List selectRwkMeetingList(RwkMeeting rwkMeeting); + + /** + * 新增教育培训 + * + * @param rwkMeeting 教育培训 + * @return 结果 + */ + public int insertRwkMeeting(RwkMeeting rwkMeeting); + + /** + * 修改教育培训 + * + * @param rwkMeeting 教育培训 + * @return 结果 + */ + public int updateRwkMeeting(RwkMeeting rwkMeeting); + + /** + * 删除教育培训 + * + * @param id 教育培训主键 + * @return 结果 + */ + public int deleteRwkMeetingById(Long id); + + /** + * 批量删除教育培训 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteRwkMeetingByIds(String[] ids); + + /** + * 批量删除培训人员签到 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteRwkMeetingStaffByMeetingIds(String[] ids); + + /** + * 批量新增培训人员签到 + * + * @param rwkMeetingStaffList 培训人员签到列表 + * @return 结果 + */ + public int batchRwkMeetingStaff(List rwkMeetingStaffList); + + + /** + * 通过教育培训主键删除培训人员签到信息 + * + * @param id 教育培训ID + * @return 结果 + */ + public int deleteRwkMeetingStaffByMeetingId(Long id); +} diff --git a/rwk-system/src/main/java/com/rwk/system/mapper/RwkMeetingStaffMapper.java b/rwk-system/src/main/java/com/rwk/system/mapper/RwkMeetingStaffMapper.java new file mode 100644 index 0000000..424bdd2 --- /dev/null +++ b/rwk-system/src/main/java/com/rwk/system/mapper/RwkMeetingStaffMapper.java @@ -0,0 +1,61 @@ +package com.rwk.system.mapper; + +import java.util.List; +import com.rwk.system.domain.RwkMeetingStaff; + +/** + * 培训人员签到Mapper接口 + * + * @author ruoyi + * @date 2024-12-05 + */ +public interface RwkMeetingStaffMapper +{ + /** + * 查询培训人员签到 + * + * @param id 培训人员签到主键 + * @return 培训人员签到 + */ + public RwkMeetingStaff selectRwkMeetingStaffById(Long id); + + /** + * 查询培训人员签到列表 + * + * @param rwkMeetingStaff 培训人员签到 + * @return 培训人员签到集合 + */ + public List selectRwkMeetingStaffList(RwkMeetingStaff rwkMeetingStaff); + + /** + * 新增培训人员签到 + * + * @param rwkMeetingStaff 培训人员签到 + * @return 结果 + */ + public int insertRwkMeetingStaff(RwkMeetingStaff rwkMeetingStaff); + + /** + * 修改培训人员签到 + * + * @param rwkMeetingStaff 培训人员签到 + * @return 结果 + */ + public int updateRwkMeetingStaff(RwkMeetingStaff rwkMeetingStaff); + + /** + * 删除培训人员签到 + * + * @param id 培训人员签到主键 + * @return 结果 + */ + public int deleteRwkMeetingStaffById(Long id); + + /** + * 批量删除培训人员签到 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteRwkMeetingStaffByIds(String[] ids); +} diff --git a/rwk-system/src/main/java/com/rwk/system/service/IRwkMeetingService.java b/rwk-system/src/main/java/com/rwk/system/service/IRwkMeetingService.java new file mode 100644 index 0000000..5526b3e --- /dev/null +++ b/rwk-system/src/main/java/com/rwk/system/service/IRwkMeetingService.java @@ -0,0 +1,61 @@ +package com.rwk.system.service; + +import java.util.List; +import com.rwk.system.domain.RwkMeeting; + +/** + * 教育培训Service接口 + * + * @author ruoyi + * @date 2024-12-05 + */ +public interface IRwkMeetingService +{ + /** + * 查询教育培训 + * + * @param id 教育培训主键 + * @return 教育培训 + */ + public RwkMeeting selectRwkMeetingById(Long id); + + /** + * 查询教育培训列表 + * + * @param rwkMeeting 教育培训 + * @return 教育培训集合 + */ + public List selectRwkMeetingList(RwkMeeting rwkMeeting); + + /** + * 新增教育培训 + * + * @param rwkMeeting 教育培训 + * @return 结果 + */ + public int insertRwkMeeting(RwkMeeting rwkMeeting); + + /** + * 修改教育培训 + * + * @param rwkMeeting 教育培训 + * @return 结果 + */ + public int updateRwkMeeting(RwkMeeting rwkMeeting); + + /** + * 批量删除教育培训 + * + * @param ids 需要删除的教育培训主键集合 + * @return 结果 + */ + public int deleteRwkMeetingByIds(String ids); + + /** + * 删除教育培训信息 + * + * @param id 教育培训主键 + * @return 结果 + */ + public int deleteRwkMeetingById(Long id); +} diff --git a/rwk-system/src/main/java/com/rwk/system/service/IRwkMeetingStaffService.java b/rwk-system/src/main/java/com/rwk/system/service/IRwkMeetingStaffService.java new file mode 100644 index 0000000..23afe94 --- /dev/null +++ b/rwk-system/src/main/java/com/rwk/system/service/IRwkMeetingStaffService.java @@ -0,0 +1,61 @@ +package com.rwk.system.service; + +import java.util.List; +import com.rwk.system.domain.RwkMeetingStaff; + +/** + * 培训人员签到Service接口 + * + * @author ruoyi + * @date 2024-12-05 + */ +public interface IRwkMeetingStaffService +{ + /** + * 查询培训人员签到 + * + * @param id 培训人员签到主键 + * @return 培训人员签到 + */ + public RwkMeetingStaff selectRwkMeetingStaffById(Long id); + + /** + * 查询培训人员签到列表 + * + * @param rwkMeetingStaff 培训人员签到 + * @return 培训人员签到集合 + */ + public List selectRwkMeetingStaffList(RwkMeetingStaff rwkMeetingStaff); + + /** + * 新增培训人员签到 + * + * @param rwkMeetingStaff 培训人员签到 + * @return 结果 + */ + public int insertRwkMeetingStaff(RwkMeetingStaff rwkMeetingStaff); + + /** + * 修改培训人员签到 + * + * @param rwkMeetingStaff 培训人员签到 + * @return 结果 + */ + public int updateRwkMeetingStaff(RwkMeetingStaff rwkMeetingStaff); + + /** + * 批量删除培训人员签到 + * + * @param ids 需要删除的培训人员签到主键集合 + * @return 结果 + */ + public int deleteRwkMeetingStaffByIds(String ids); + + /** + * 删除培训人员签到信息 + * + * @param id 培训人员签到主键 + * @return 结果 + */ + public int deleteRwkMeetingStaffById(Long id); +} diff --git a/rwk-system/src/main/java/com/rwk/system/service/impl/RwkMeetingServiceImpl.java b/rwk-system/src/main/java/com/rwk/system/service/impl/RwkMeetingServiceImpl.java new file mode 100644 index 0000000..4c8b4de --- /dev/null +++ b/rwk-system/src/main/java/com/rwk/system/service/impl/RwkMeetingServiceImpl.java @@ -0,0 +1,129 @@ +package com.rwk.system.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import java.util.ArrayList; +import com.rwk.common.utils.StringUtils; +import org.springframework.transaction.annotation.Transactional; +import com.rwk.system.domain.RwkMeetingStaff; +import com.rwk.system.mapper.RwkMeetingMapper; +import com.rwk.system.domain.RwkMeeting; +import com.rwk.system.service.IRwkMeetingService; +import com.rwk.common.core.text.Convert; + +/** + * 教育培训Service业务层处理 + * + * @author ruoyi + * @date 2024-12-05 + */ +@Service +public class RwkMeetingServiceImpl implements IRwkMeetingService +{ + @Autowired + private RwkMeetingMapper rwkMeetingMapper; + + /** + * 查询教育培训 + * + * @param id 教育培训主键 + * @return 教育培训 + */ + @Override + public RwkMeeting selectRwkMeetingById(Long id) + { + return rwkMeetingMapper.selectRwkMeetingById(id); + } + + /** + * 查询教育培训列表 + * + * @param rwkMeeting 教育培训 + * @return 教育培训 + */ + @Override + public List selectRwkMeetingList(RwkMeeting rwkMeeting) + { + return rwkMeetingMapper.selectRwkMeetingList(rwkMeeting); + } + + /** + * 新增教育培训 + * + * @param rwkMeeting 教育培训 + * @return 结果 + */ + @Transactional + @Override + public int insertRwkMeeting(RwkMeeting rwkMeeting) + { + int rows = rwkMeetingMapper.insertRwkMeeting(rwkMeeting); + insertRwkMeetingStaff(rwkMeeting); + return rows; + } + + /** + * 修改教育培训 + * + * @param rwkMeeting 教育培训 + * @return 结果 + */ + @Transactional + @Override + public int updateRwkMeeting(RwkMeeting rwkMeeting) + { + rwkMeetingMapper.deleteRwkMeetingStaffByMeetingId(rwkMeeting.getId()); + insertRwkMeetingStaff(rwkMeeting); + return rwkMeetingMapper.updateRwkMeeting(rwkMeeting); + } + + /** + * 批量删除教育培训 + * + * @param ids 需要删除的教育培训主键 + * @return 结果 + */ + @Transactional + @Override + public int deleteRwkMeetingByIds(String ids) + { + rwkMeetingMapper.deleteRwkMeetingStaffByMeetingIds(Convert.toStrArray(ids)); + return rwkMeetingMapper.deleteRwkMeetingByIds(Convert.toStrArray(ids)); + } + + /** + * 删除教育培训信息 + * + * @param id 教育培训主键 + * @return 结果 + */ + @Transactional + @Override + public int deleteRwkMeetingById(Long id) + { + rwkMeetingMapper.deleteRwkMeetingStaffByMeetingId(id); + return rwkMeetingMapper.deleteRwkMeetingById(id); + } + + /** + * 新增培训人员签到信息 + * + * @param rwkMeeting 教育培训对象 + */ + public void insertRwkMeetingStaff(RwkMeeting rwkMeeting) + { + List rwkMeetingStaffList = rwkMeeting.getRwkMeetingStaffList(); + Long id = rwkMeeting.getId(); + if (StringUtils.isNotNull(rwkMeetingStaffList)) { + List list = new ArrayList<>(); + for (RwkMeetingStaff rwkMeetingStaff : rwkMeetingStaffList) { + rwkMeetingStaff.setMeetingId(id); + list.add(rwkMeetingStaff); + } + if (!list.isEmpty()) { + rwkMeetingMapper.batchRwkMeetingStaff(list); + } + } + } +} diff --git a/rwk-system/src/main/java/com/rwk/system/service/impl/RwkMeetingStaffServiceImpl.java b/rwk-system/src/main/java/com/rwk/system/service/impl/RwkMeetingStaffServiceImpl.java new file mode 100644 index 0000000..3ff39e7 --- /dev/null +++ b/rwk-system/src/main/java/com/rwk/system/service/impl/RwkMeetingStaffServiceImpl.java @@ -0,0 +1,94 @@ +package com.rwk.system.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.rwk.system.mapper.RwkMeetingStaffMapper; +import com.rwk.system.domain.RwkMeetingStaff; +import com.rwk.system.service.IRwkMeetingStaffService; +import com.rwk.common.core.text.Convert; + +/** + * 培训人员签到Service业务层处理 + * + * @author ruoyi + * @date 2024-12-05 + */ +@Service +public class RwkMeetingStaffServiceImpl implements IRwkMeetingStaffService +{ + @Autowired + private RwkMeetingStaffMapper rwkMeetingStaffMapper; + + /** + * 查询培训人员签到 + * + * @param id 培训人员签到主键 + * @return 培训人员签到 + */ + @Override + public RwkMeetingStaff selectRwkMeetingStaffById(Long id) + { + return rwkMeetingStaffMapper.selectRwkMeetingStaffById(id); + } + + /** + * 查询培训人员签到列表 + * + * @param rwkMeetingStaff 培训人员签到 + * @return 培训人员签到 + */ + @Override + public List selectRwkMeetingStaffList(RwkMeetingStaff rwkMeetingStaff) + { + return rwkMeetingStaffMapper.selectRwkMeetingStaffList(rwkMeetingStaff); + } + + /** + * 新增培训人员签到 + * + * @param rwkMeetingStaff 培训人员签到 + * @return 结果 + */ + @Override + public int insertRwkMeetingStaff(RwkMeetingStaff rwkMeetingStaff) + { + return rwkMeetingStaffMapper.insertRwkMeetingStaff(rwkMeetingStaff); + } + + /** + * 修改培训人员签到 + * + * @param rwkMeetingStaff 培训人员签到 + * @return 结果 + */ + @Override + public int updateRwkMeetingStaff(RwkMeetingStaff rwkMeetingStaff) + { + return rwkMeetingStaffMapper.updateRwkMeetingStaff(rwkMeetingStaff); + } + + /** + * 批量删除培训人员签到 + * + * @param ids 需要删除的培训人员签到主键 + * @return 结果 + */ + @Override + public int deleteRwkMeetingStaffByIds(String ids) + { + return rwkMeetingStaffMapper.deleteRwkMeetingStaffByIds(Convert.toStrArray(ids)); + } + + /** + * 删除培训人员签到信息 + * + * @param id 培训人员签到主键 + * @return 结果 + */ + @Override + public int deleteRwkMeetingStaffById(Long id) + { + return rwkMeetingStaffMapper.deleteRwkMeetingStaffById(id); + } +} diff --git a/rwk-system/src/main/resources/mapper/system/RwkMeetingMapper.xml b/rwk-system/src/main/resources/mapper/system/RwkMeetingMapper.xml new file mode 100644 index 0000000..cd205f5 --- /dev/null +++ b/rwk-system/src/main/resources/mapper/system/RwkMeetingMapper.xml @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, meeting_name, meeting_content, meeting_date, meeting_by_company, create_time, create_by from rwk_meeting + + + + + + + + + + insert into rwk_meeting + + id, + meeting_name, + meeting_content, + meeting_date, + meeting_by_company, + create_time, + create_by, + + + #{id}, + #{meetingName}, + #{meetingContent}, + #{meetingDate}, + #{meetingByCompany}, + #{createTime}, + #{createBy}, + + + + + update rwk_meeting + + meeting_name = #{meetingName}, + meeting_content = #{meetingContent}, + meeting_date = #{meetingDate}, + meeting_by_company = #{meetingByCompany}, + create_time = #{createTime}, + create_by = #{createBy}, + + where id = #{id} + + + + delete from rwk_meeting where id = #{id} + + + + delete from rwk_meeting where id in + + #{id} + + + + + delete from rwk_meeting_staff where meeting_id in + + #{meetingId} + + + + + delete from rwk_meeting_staff where meeting_id = #{meetingId} + + + + insert into rwk_meeting_staff( meeting_id, personnel_name, is_sign, personnel_id, mobile_phone) values + + ( #{item.meetingId}, #{item.personnelName}, #{item.isSign}, #{item.personnelId}, #{item.mobilePhone}) + + + + \ No newline at end of file diff --git a/rwk-system/src/main/resources/mapper/system/RwkMeetingStaffMapper.xml b/rwk-system/src/main/resources/mapper/system/RwkMeetingStaffMapper.xml new file mode 100644 index 0000000..1f97970 --- /dev/null +++ b/rwk-system/src/main/resources/mapper/system/RwkMeetingStaffMapper.xml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + select id, meeting_id, personnel_name, is_sign, personnel_id, mobile_phone from rwk_meeting_staff + + + + + + + + insert into rwk_meeting_staff + + meeting_id, + personnel_name, + is_sign, + personnel_id, + mobile_phone, + + + #{meetingId}, + #{personnelName}, + #{isSign}, + #{personnelId}, + #{mobilePhone}, + + + + + update rwk_meeting_staff + + meeting_id = #{meetingId}, + personnel_name = #{personnelName}, + is_sign = #{isSign}, + personnel_id = #{personnelId}, + mobile_phone = #{mobilePhone}, + + where id = #{id} + + + + delete from rwk_meeting_staff where id = #{id} + + + + delete from rwk_meeting_staff where id in + + #{id} + + + + \ No newline at end of file