diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/ApplyInfoListManager.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/ApplyInfoListManager.java index 13ff25cc..a2afcb92 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/ApplyInfoListManager.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/ApplyInfoListManager.java @@ -61,6 +61,11 @@ public class ApplyInfoListManager { } + public List<TdApplyInfoList> selectOndutyInfoListList(TdApplyInfoListDTO applyInfoListDTO) { + return applyInfoListService.selectOndutyInfoListList(applyInfoListDTO); + } + + @Transactional(rollbackFor = Exception.class) public boolean saveOrUpdate(TdApplyInfoListDTO applyInfoListDTO) { TdApplyInfoList applyInfoList = Convert.convert(TdApplyInfoList.class, applyInfoListDTO); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/onduty/OnDutyInfoListController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/onduty/OnDutyInfoListController.java new file mode 100644 index 00000000..cc933997 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/onduty/OnDutyInfoListController.java @@ -0,0 +1,72 @@ +package com.ruoyi.web.controller.system.onduty; + +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.system.domain.apply.TdApplyInfoList; +import com.ruoyi.system.domain.apply.dto.TdApplyInfoListDTO; +import com.ruoyi.web.controller.manager.ApplyInfoListManager; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; + +/** + * ClassName: ApplyInfoListController + * Package: com.ruoyi.web.controller.system.apply + * Description:人员在岗 + * + * @Author wangxy + * @Create 2025/5/14 11:32 + * @Version 1.0 + */ +@Controller +@RequestMapping("/system/onDutyList") +public class OnDutyInfoListController extends BaseController { + + + private String prefix = "system/newdev/onduty"; + + + @Resource + private ApplyInfoListManager applyInfoListManager; + + @RequiresPermissions("system:onduty:view") + @GetMapping() + public String ondutyList() { + return prefix + "/ondutyList"; + } + /** + * 人员列表 + */ + @RequiresPermissions("system:onduty:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(TdApplyInfoListDTO applyInfoListDTO) { + startPage(); + List<TdApplyInfoList> tdApplyInfoLists = applyInfoListManager.selectOndutyInfoListList(applyInfoListDTO); + return getDataTable(tdApplyInfoLists); + } + + /** + * 在岗 + */ + @RequiresPermissions("system:onduty:editDuty") + @GetMapping("/editDuty/{applyId}") + public String editDuty(@PathVariable("applyId") String applyId, ModelMap mmap) { + TdApplyInfoListDTO applyInfoList = applyInfoListManager.getTdApplyInfoList(applyId); + mmap.put("applyInfoList", applyInfoList); + return prefix + "/editDuty"; + } + + + + + + + + + +} diff --git a/ruoyi-admin/src/main/resources/templates/system/newdev/onduty/ondutyList.html b/ruoyi-admin/src/main/resources/templates/system/newdev/onduty/ondutyList.html new file mode 100644 index 00000000..e1e3fe75 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/newdev/onduty/ondutyList.html @@ -0,0 +1,114 @@ +<!DOCTYPE html> +<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> +<head> + <th:block th:include="include :: header('人员在岗列表')" /> +</head> +<body class="gray-bg"> +<div class="container-div" id="app"> + <div class="row"> + <div class="col-sm-12 search-collapse"> + <form id="formId"> + <div class="select-list"> + <ul> + <li> + <label style="width: 80px">姓名:</label> + <input type="text" name="name"/> + </li> + <li> + <label>性别:</label> + <input type="text" name="sex"/> + </li> + <li> + <label>身份证号:</label> + <input type="text" name="cerno"/> + </li> + <li> + <label>联系方式:</label> + <input type="text" name="phone"/> + </li> + <li> + <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> + </li> + </ul> + </div> + </form> + </div> + + <div class="btn-group-sm" id="toolbar" role="group"> + </div> + <div class="col-sm-12 select-table table-striped"> + <table id="bootstrap-table"></table> + </div> + </div> +</div> +<th:block th:include="include :: footer" /> +<script th:inline="javascript"> + var detailFlag = [[${@permission.hasPermi('system:onduty:editDuty')}]] + var prefix = ctx + "system/onDutyList"; + $(function() { + var options = { + url: prefix + "/list", + modalName: "调离岗位", + detailUrl:prefix + "/editDuty/{id}", + type: 0, + columns: [ + { + field: 'applyId', + title: 'id', + visible: false + }, + + { + field: 'name', + title: '姓名' + }, + { + field: 'sex', + title: '性别' + }, + { + field: 'nationality', + title: '民族', + }, + { + field: 'maritalStatus', + title: '婚姻状况', + }, + { + field: 'cerno', + title: '身份证号', + }, + { + field: 'phone', + title: '联系方式', + }, + { + field: 'smPost', + title: '已(拟)任涉密岗位', + }, + { + field: 'smGrade', + title: '涉密等级', + }, + { + field: 'createTime', + title: '创建时间', + sortable: true + }, + { + title: '操作', + align: 'center', + formatter: function(value, row, index) { + var actions = []; + actions.push('<a class="btn btn-info btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detailTab(\'' + row.applyId + '\')"><i class="fa fa-edit"></i>调离岗位</a> '); + return actions.join(''); + } + }] + }; + $.table.init(options); + }); + +</script> +</body> +</html> diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/apply/TdApplyInfoListMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/apply/TdApplyInfoListMapper.java index 74b43c84..127b2480 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/apply/TdApplyInfoListMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/apply/TdApplyInfoListMapper.java @@ -29,6 +29,11 @@ public interface TdApplyInfoListMapper extends BaseMapper<TdApplyInfoList> { + public List<TdApplyInfoList> selectOndutyInfoListList(TdApplyInfoListDTO applyInfoListDTO); + + + + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/apply/TdApplyInfoListService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/apply/TdApplyInfoListService.java index 1b9cbb50..814154ea 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/apply/TdApplyInfoListService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/apply/TdApplyInfoListService.java @@ -28,5 +28,10 @@ public interface TdApplyInfoListService extends IService<TdApplyInfoList> { + public List<TdApplyInfoList> selectOndutyInfoListList(TdApplyInfoListDTO applyInfoListDTO); + + + + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/apply/impl/TdApplyInfoListServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/apply/impl/TdApplyInfoListServiceImpl.java index 55ba4461..cc4031fb 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/apply/impl/TdApplyInfoListServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/apply/impl/TdApplyInfoListServiceImpl.java @@ -54,6 +54,12 @@ public class TdApplyInfoListServiceImpl extends ServiceImpl<TdApplyInfoListMappe public List<TdApplyInfoList> selectPersonList(TdApplyInfoListDTO applyInfoListDTO) { return applyInfoListMapper.selectPersonList(applyInfoListDTO); } + + @DataScope(deptAlias = "d") + @Override + public List<TdApplyInfoList> selectOndutyInfoListList(TdApplyInfoListDTO applyInfoListDTO) { + return applyInfoListMapper.selectOndutyInfoListList(applyInfoListDTO); + } } diff --git a/ruoyi-system/src/main/resources/mapper/system/apply/TdApplyInfoListMapper.xml b/ruoyi-system/src/main/resources/mapper/system/apply/TdApplyInfoListMapper.xml index 83ef0cf3..9465b2a8 100644 --- a/ruoyi-system/src/main/resources/mapper/system/apply/TdApplyInfoListMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/apply/TdApplyInfoListMapper.xml @@ -187,6 +187,33 @@ ORDER BY create_time DESC </select> + <select id="selectOndutyInfoListList" resultType="com.ruoyi.system.domain.apply.TdApplyInfoList"> + select <include refid="Base_Column_List"/> from td_apply_info_list d + <trim prefix="where" prefixOverrides="and|or"> + <if test="name!=null and name!=''"> + AND name = #{name} + </if> + <if test="nationa!=null and nationa!=''"> + AND nationa = #{nationa} + </if> + <if test="formerName!=null and formerName!=''"> + AND former_name = #{formerName} + </if> + <if test="cerno!=null and cerno!=''"> + AND cerno = #{cerno} + </if> + <if test="phone!=null and phone!=''"> + AND phone = #{phone} + </if> + <if test="smPost!=null and smPost!=''"> + AND sm_post = #{smPost} + </if> + AND apply_status in ('5') + <!-- 数据范围过滤 --> + ${params.dataScope} + </trim> + ORDER BY create_time DESC + </select> </mapper>