From eb60f6ffec3e1427531df8ff02adab72ba0a5db4 Mon Sep 17 00:00:00 2001 From: liuwu <975499773@qq.com> Date: Wed, 30 Aug 2023 09:14:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B5=E9=9D=A2=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=EF=BC=8C=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=BE=AE=E4=BF=A1=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/mapper/TAmentPartyAffairsMapper.java | 2 + .../service/ITAmentPartyAffairsService.java | 2 + .../impl/TAmentPartyAffairsServiceImpl.java | 5 + .../java/com/cyx/wechat/WechatController.java | 137 +++++++++++ .../base/advanceddept/advanceddept.html | 52 ++-- .../base/advancedparty/advancedparty.html | 8 +- .../templates/base/affairs/affairs.html | 8 - .../resources/templates/base/affairs/day.html | 8 - .../templates/base/affairs/partystyle.html | 12 +- .../templates/base/affairs/warn.html | 226 ++++++++++-------- .../templates/base/affairs/year.html | 8 - .../templates/base/branch/branch.html | 41 ++-- .../resources/templates/base/dept/dept.html | 5 + .../templates/base/personnel/add.html | 156 ++++++------ .../templates/base/personnel/personnel.html | 18 +- .../core/controller/BaseController.java | 5 + .../cyx/common/core/domain/BaseEntity.java | 19 ++ .../java/com/cyx/common/utils/PageUtils.java | 11 + .../mapper/base/TAmentPartyAffairsMapper.xml | 56 +++++ 19 files changed, 499 insertions(+), 280 deletions(-) create mode 100644 cyx-admin/src/main/java/com/cyx/wechat/WechatController.java diff --git a/cyx-admin/src/main/java/com/cyx/web/base/mapper/TAmentPartyAffairsMapper.java b/cyx-admin/src/main/java/com/cyx/web/base/mapper/TAmentPartyAffairsMapper.java index 63d0989..fef587e 100644 --- a/cyx-admin/src/main/java/com/cyx/web/base/mapper/TAmentPartyAffairsMapper.java +++ b/cyx-admin/src/main/java/com/cyx/web/base/mapper/TAmentPartyAffairsMapper.java @@ -78,4 +78,6 @@ public interface TAmentPartyAffairsMapper List selectTAmentPartyAffairsListAll(TAmentPartyAffairs tAmentPartyAffairs); List warnList(TAmentPartyAffairs tAmentPartyAffairs); + + List approveList(TAmentPartyAffairs tAmentPartyAffairs); } diff --git a/cyx-admin/src/main/java/com/cyx/web/base/service/ITAmentPartyAffairsService.java b/cyx-admin/src/main/java/com/cyx/web/base/service/ITAmentPartyAffairsService.java index 9231e97..7935679 100644 --- a/cyx-admin/src/main/java/com/cyx/web/base/service/ITAmentPartyAffairsService.java +++ b/cyx-admin/src/main/java/com/cyx/web/base/service/ITAmentPartyAffairsService.java @@ -78,4 +78,6 @@ public interface ITAmentPartyAffairsService List selectTAmentPartyAffairsListAll(TAmentPartyAffairs tAmentPartyAffairs); List warnList(TAmentPartyAffairs tAmentPartyAffairs); + + List approveList(TAmentPartyAffairs tAmentPartyAffairs); } diff --git a/cyx-admin/src/main/java/com/cyx/web/base/service/impl/TAmentPartyAffairsServiceImpl.java b/cyx-admin/src/main/java/com/cyx/web/base/service/impl/TAmentPartyAffairsServiceImpl.java index 3a3d0e7..2c980b2 100644 --- a/cyx-admin/src/main/java/com/cyx/web/base/service/impl/TAmentPartyAffairsServiceImpl.java +++ b/cyx-admin/src/main/java/com/cyx/web/base/service/impl/TAmentPartyAffairsServiceImpl.java @@ -57,6 +57,11 @@ public class TAmentPartyAffairsServiceImpl implements ITAmentPartyAffairsService return tAmentPartyAffairsMapper.warnList(tAmentPartyAffairs); } + @Override + public List approveList(TAmentPartyAffairs tAmentPartyAffairs){ + return tAmentPartyAffairsMapper.approveList(tAmentPartyAffairs); + } + /** * 新增党务 * diff --git a/cyx-admin/src/main/java/com/cyx/wechat/WechatController.java b/cyx-admin/src/main/java/com/cyx/wechat/WechatController.java new file mode 100644 index 0000000..758f562 --- /dev/null +++ b/cyx-admin/src/main/java/com/cyx/wechat/WechatController.java @@ -0,0 +1,137 @@ +package com.cyx.wechat; + +import com.cyx.common.annotation.Log; +import com.cyx.common.core.controller.BaseController; +import com.cyx.common.core.domain.AjaxResult; +import com.cyx.common.core.domain.entity.SysUser; +import com.cyx.common.core.page.TableDataInfo; +import com.cyx.common.enums.BusinessType; +import com.cyx.web.base.domain.*; +import com.cyx.web.base.service.*; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import javax.annotation.Resource; +import java.util.Date; +import java.util.List; +import java.util.Map; + +@Controller +@RequestMapping("/wx/index") +public class WechatController extends BaseController { + @Resource + private ITAmentPartyAffairsService partyAffairsService; + @Autowired + private ITAmentCommitHisService commitHisService; + @Autowired + private ITAmentReviewedHisService reviewedHisService; + + /** + * 任务预警 + */ + @RequiresPermissions("base:affairs:list") + @PostMapping("/queryList") + @ResponseBody + public TableDataInfo queryList(TAmentPartyAffairs tAmentPartyAffairs) + { + startPage(tAmentPartyAffairs.getPageNum(),tAmentPartyAffairs.getPageSize()); + List list = partyAffairsService.selectTAmentPartyAffairsList(tAmentPartyAffairs); + return getDataTable(list); + } + + /** + * 提交附件 + */ + @RequiresPermissions("base:affairs:edit") + @Log(title = "党务", businessType = BusinessType.UPDATE) + @PostMapping("/commit") + @ResponseBody + public AjaxResult commit(TAmentPartyAffairs tAmentPartyAffairs) + { + TAmentCommitHis his = new TAmentCommitHis(); + his.setPer(tAmentPartyAffairs.getHeader()); + his.setDept(tAmentPartyAffairs.getDeptName()); + his.setTarget(tAmentPartyAffairs.getShotName()); + his.setCommitTime(new Date()); + his.setDept(tAmentPartyAffairs.getDeptName()); + his.setRemark(tAmentPartyAffairs.getRemark()); + his.setFiles(tAmentPartyAffairs.getFiles()); + tAmentPartyAffairs.setStatus("2"); + commitHisService.insertTAmentCommitHis(his); + tAmentPartyAffairs.setCommitId(his.getId()); + return toAjax(partyAffairsService.updateTAmentPartyAffairs(tAmentPartyAffairs)); + } + + /** + * 审核 + */ + @RequiresPermissions("base:affairs:edit") + @Log(title = "党务", businessType = BusinessType.UPDATE) + @GetMapping("/reviewedSave") + @ResponseBody + public AjaxResult reviewedSave(TAmentPartyAffairs tAmentPartyAffairs) + { + TAmentPartyAffairs one = partyAffairsService.selectTAmentPartyAffairsById(tAmentPartyAffairs.getId()); + TAmentReviewedHis his = new TAmentReviewedHis(); + his.setPer(tAmentPartyAffairs.getReviewer()); + his.setReviewedTime(new Date()); + int before = 0; + if (null != one && null != one.getNowScore()){ + before = Integer.parseInt(one.getNowScore()); + } + int reviewScore = Integer.parseInt(tAmentPartyAffairs.getNowScore()); + his.setScore(tAmentPartyAffairs.getNowScore()); + his.setRemark(tAmentPartyAffairs.getRemark()); + reviewedHisService.insertTAmentReviewedHis(his); + tAmentPartyAffairs.setReviewedId(his.getId()); + tAmentPartyAffairs.setStatus("4"); + tAmentPartyAffairs.setNowScore(String.valueOf(reviewScore+before)); + return toAjax(partyAffairsService.updateTAmentPartyAffairs(tAmentPartyAffairs)); + } + + /** + * 驳回 + * @param tAmentPartyAffairs + * @return + */ + @GetMapping("/reback") + @ResponseBody + public AjaxResult reback(TAmentPartyAffairs tAmentPartyAffairs) + { + tAmentPartyAffairs.setStatus("3"); + return toAjax(partyAffairsService.updateTAmentPartyAffairs(tAmentPartyAffairs)); + } + + /** + * 任务预警 + */ + @RequiresPermissions("base:affairs:list") + @PostMapping("/warnList") + @ResponseBody + public TableDataInfo warnList(TAmentPartyAffairs tAmentPartyAffairs) + { + startPage(tAmentPartyAffairs.getPageNum(),tAmentPartyAffairs.getPageSize()); + tAmentPartyAffairs.setStatus("1"); + List list = partyAffairsService.warnList(tAmentPartyAffairs); + return getDataTable(list); + } + + /** + * 审批预警 + */ + @RequiresPermissions("base:affairs:list") + @PostMapping("/approveList") + @ResponseBody + public TableDataInfo approveList(TAmentPartyAffairs tAmentPartyAffairs) + { + startPage(tAmentPartyAffairs.getPageNum(),tAmentPartyAffairs.getPageSize()); + tAmentPartyAffairs.setStatus("2"); + List list = partyAffairsService.approveList(tAmentPartyAffairs); + return getDataTable(list); + } +} \ No newline at end of file diff --git a/cyx-admin/src/main/resources/templates/base/advanceddept/advanceddept.html b/cyx-admin/src/main/resources/templates/base/advanceddept/advanceddept.html index 5d11d17..1f7ee55 100644 --- a/cyx-admin/src/main/resources/templates/base/advanceddept/advanceddept.html +++ b/cyx-admin/src/main/resources/templates/base/advanceddept/advanceddept.html @@ -78,31 +78,7 @@ }, { field: 'dept', - title: '部门' - }, - { - field: 'commit', - title: '评选人' - }, - { - field: 'time', - title: '评选时间' - }, - { - field: 'confirm', - title: '审核人' - }, - { - field: 'show', - title: '是否显示' - }, - { - field: 'events', - title: '主要事迹附件上传' - }, - { - field: 'remark', - title: '备注' + title: '先进部门' }, { field: 'score', @@ -110,12 +86,36 @@ }, { field: 'process', - title: '完成进度' + title: '指标完成进度' }, { field: 'sort', title: '综合排名' }, + // { + // field: 'commit', + // title: '评选人' + // }, + { + field: 'time', + title: '评选时间' + }, + // { + // field: 'confirm', + // title: '审核人' + // }, + { + field: 'show', + title: '是否显示' + }, + // { + // field: 'events', + // title: '主要事迹附件上传' + // }, + { + field: 'remark', + title: '备注' + }, { title: '操作', align: 'center', diff --git a/cyx-admin/src/main/resources/templates/base/advancedparty/advancedparty.html b/cyx-admin/src/main/resources/templates/base/advancedparty/advancedparty.html index 9f20dcc..823a89c 100644 --- a/cyx-admin/src/main/resources/templates/base/advancedparty/advancedparty.html +++ b/cyx-admin/src/main/resources/templates/base/advancedparty/advancedparty.html @@ -92,10 +92,10 @@ field: 'show', title: '是否显示' }, - { - field: 'events', - title: '主要事迹附件上传' - }, + // { + // field: 'events', + // title: '主要事迹附件上传' + // }, { field: 'remark', title: '备注' diff --git a/cyx-admin/src/main/resources/templates/base/affairs/affairs.html b/cyx-admin/src/main/resources/templates/base/affairs/affairs.html index 6c2ae79..56575ad 100644 --- a/cyx-admin/src/main/resources/templates/base/affairs/affairs.html +++ b/cyx-admin/src/main/resources/templates/base/affairs/affairs.html @@ -164,18 +164,10 @@ field: 'finishDate', title: '完成截止时间' }, - { - field: 'oprator', - title: '操作人员' - }, { field: 'deptName', title: '部门' }, - { - field: 'branch', - title: '支部' - }, { field: 'remark', title: '备注' diff --git a/cyx-admin/src/main/resources/templates/base/affairs/day.html b/cyx-admin/src/main/resources/templates/base/affairs/day.html index 6a1365a..f218e89 100644 --- a/cyx-admin/src/main/resources/templates/base/affairs/day.html +++ b/cyx-admin/src/main/resources/templates/base/affairs/day.html @@ -168,18 +168,10 @@ field: 'finishDate', title: '完成截止时间' }, - { - field: 'oprator', - title: '操作人员' - }, { field: 'deptName', title: '部门' }, - { - field: 'branch', - title: '支部' - }, { field: 'remark', title: '备注' diff --git a/cyx-admin/src/main/resources/templates/base/affairs/partystyle.html b/cyx-admin/src/main/resources/templates/base/affairs/partystyle.html index 8576cd6..05bade4 100644 --- a/cyx-admin/src/main/resources/templates/base/affairs/partystyle.html +++ b/cyx-admin/src/main/resources/templates/base/affairs/partystyle.html @@ -144,6 +144,10 @@ field: 'score', title: '总分值' }, + { + field: 'nowScore', + title: '当前得分' + }, { field: 'method', title: '考核要求', @@ -165,18 +169,10 @@ field: 'finishDate', title: '完成截止时间' }, - { - field: 'oprator', - title: '操作人员' - }, { field: 'deptName', title: '部门' }, - { - field: 'branch', - title: '支部' - }, { field: 'remark', title: '备注' diff --git a/cyx-admin/src/main/resources/templates/base/affairs/warn.html b/cyx-admin/src/main/resources/templates/base/affairs/warn.html index 1c4bddb..8eecb16 100644 --- a/cyx-admin/src/main/resources/templates/base/affairs/warn.html +++ b/cyx-admin/src/main/resources/templates/base/affairs/warn.html @@ -10,43 +10,26 @@
    - - - - -
  • - - + +
  • - - - - - - - - - - - - - - - - - - - - - - +
  • + + - - - - - +
  • +
  • + + + +
  • +
  • + + +
  •  搜索  重置 @@ -81,6 +64,36 @@ var removeFlag = [[${@permission.hasPermi('base:affairs:remove')}]]; var prefix = ctx + "base/affairs"; + $(document).ready(function () { + $.ajax({ + type: "post", + url: ctx + "base/personnel/personnelList", + data: { + }, + success: function(data) { + var opt = ''; + data.data.forEach(d=>{ + opt += ''; + }) + $("#reviewed")[0].innerHTML=opt; + } + }); + + $.ajax({ + type: "post", + url: ctx + "base/personnel/deptList", + data: { + }, + success: function(data) { + var opt = ''; + data.data.forEach(d=>{ + opt += ''; + }) + $("#deptId")[0].innerHTML=opt; + } + }); + }) + $(function() { var options = { url: prefix + "/warnList", @@ -97,84 +110,50 @@ title: '自增ID', visible: false }, - // { - // field: 'type', - // title: '作用于附件' - // }, - // { - // field: 'unit', - // title: '单位名称' - // }, + { + field: 'header', + title: '提交人' + }, { field: 'type', - title: '类型' + title: '考核类型' }, { field: 'target', - title: '目标项' + title: '指标' }, { - field: 'demand', - title: '目标要求', - width:200, - align: 'center', - formatter: function(value, row, index) { - return $.table.tooltip(value); - } - }, - { - field: 'detailed', - title: '评分细则', - width:200, - align: 'center', - formatter: function(value, row, index) { - return $.table.tooltip(value); - } - }, - { - field: 'score', - title: '达标分' - }, - { - field: 'nowScore', - title: '当前得分' - }, - { - field: 'method', - title: '考核方式', - width:200, - align: 'center', - formatter: function(value, row, index) { - return $.table.tooltip(value); - } - }, - { - field: 'header', - title: '负责人' - }, - { - field: 'reviewer', - title: '审核人' + field: 'commitTime', + title: '提交时间' }, { field: 'finishDate', - title: '完成截止时间' - }, - { - field: 'oprator', - title: '操作人员' + title: '截止时间' }, { field: 'deptName', title: '部门' }, { - field: 'branch', - title: '支部' + field: 'reviewer', + title: '审批人' }, { - field: 'remark', - title: '备注' + field: 'status', + title: '审批状态', + formatter: function(value, row, index) { + var actions = []; + if (row.status === '1'){ + actions.push('待提交 '); + }else if (row.status === '2'){ + actions.push('待审核 '); + }else if (row.status === '3'){ + actions.push('已驳回 '); + }else if (row.status === '4'){ + actions.push('已完成 '); + } + return actions.join(''); + } }, { title: '操作', @@ -189,11 +168,11 @@ actions.push('已驳回 '); actions.push('重新上传附件 '); } - // actions.push('查看详情 '); - - // actions.push('编辑 '); - // actions.push('删除'); - return actions.join(''); + if (row.files && row.status !=='3'){ + actions.push('查看图片 '); + actions.push('下载附件 '); + } + return actions.join(''); } }] }; @@ -226,8 +205,57 @@ } }) }) + + $("#bootstrap-table").on("click",".viewFiles0828",function () { + let _files = $(this)[0].dataset.files.split(','); + let _type = $(this)[0].dataset.type; + let _dataImg = []; + let _downData = []; + _files.forEach((item,index) => { + if(item.indexOf(".jpg")>-1 || item.indexOf(".png")>-1){ + _dataImg.push({ + "alt": "", + "pid": index, //图片id + "src": window.location.origin+item, //原图地址 + "thumb": window.location.origin+item //缩略图地址 + }) + }else if(item.indexOf(".docx")> -1 || item.indexOf(".doc") > -1 || item.indexOf(".xlsx") > -1 || item.indexOf(".xls") > -1 || item.indexOf(".pdf") > -1){ + _downData.push(item); + } + }) + if(_type === '1'){ //查看图片 + let json = { + "title": "查看图片", //相册标题 + "id": 123, //相册id + "start": 0, //初始显示的图片序号,默认0 + "data": _dataImg + }; + layer.photos({ + photos: json, + closeBtn: 0, //右上角按钮,可通过配置1和2来展示,如果不显示,则closeBtn: 0 + anim: 5 //0-6的选择,指定弹出图片动画类型,默认随机(请注意,3.0之前的版本用shift参数) + }); + }else{ //下载附件 + if(_downData.length === 0){ + $.modal.msgError('暂无文件!') + return false; + } + _downData.forEach(item => { + let _lastNum = item.lastIndexOf('/')+1; + let _title = item.substr(_lastNum,item.length-1); + const a = document.createElement('a'); + a.style.display = 'none'; + a.download = _title; + a.href = window.location.origin+item; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + }) + } + }); }); + \ No newline at end of file diff --git a/cyx-admin/src/main/resources/templates/base/affairs/year.html b/cyx-admin/src/main/resources/templates/base/affairs/year.html index 1e5b03c..69aa4ed 100644 --- a/cyx-admin/src/main/resources/templates/base/affairs/year.html +++ b/cyx-admin/src/main/resources/templates/base/affairs/year.html @@ -144,18 +144,10 @@ field: 'finishDate', title: '完成截止时间' }, - { - field: 'oprator', - title: '操作人员' - }, { field: 'deptName', title: '部门' }, - { - field: 'branch', - title: '支部' - }, { field: 'remark', title: '备注' diff --git a/cyx-admin/src/main/resources/templates/base/branch/branch.html b/cyx-admin/src/main/resources/templates/base/branch/branch.html index e0db114..c716842 100644 --- a/cyx-admin/src/main/resources/templates/base/branch/branch.html +++ b/cyx-admin/src/main/resources/templates/base/branch/branch.html @@ -63,42 +63,29 @@ columns: [{ checkbox: true }, - { - field: 'branchId', - title: '支部id', - visible: false - }, - { - field: 'parentId', - title: '父支部id' - }, - { - field: 'ancestors', - title: '祖级列表' - }, { field: 'branchName', title: '支部名称' }, { field: 'orderNum', - title: '显示顺序' - }, - { - field: 'leader', - title: '负责人' - }, - { - field: 'phone', - title: '联系电话' - }, - { - field: 'email', - title: '邮箱' + title: '排序' }, { field: 'status', - title: '支部状态' + title: '状态' + }, + { + field: 'createTime', + title: '创建时间' + }, + { + field: 'createBy', + title: '创建人' + }, + { + field: 'persons ', + title: '支部人数' }, { title: '操作', diff --git a/cyx-admin/src/main/resources/templates/base/dept/dept.html b/cyx-admin/src/main/resources/templates/base/dept/dept.html index 9fdaec4..18e5ba6 100644 --- a/cyx-admin/src/main/resources/templates/base/dept/dept.html +++ b/cyx-admin/src/main/resources/templates/base/dept/dept.html @@ -89,6 +89,11 @@ title: '创建时间', align: "left" }, + { + field: 'createBy', + title: '创建人', + align: "left" + }, { title: '操作', align: 'left', diff --git a/cyx-admin/src/main/resources/templates/base/personnel/add.html b/cyx-admin/src/main/resources/templates/base/personnel/add.html index f13dec2..b7cf2df 100644 --- a/cyx-admin/src/main/resources/templates/base/personnel/add.html +++ b/cyx-admin/src/main/resources/templates/base/personnel/add.html @@ -7,106 +7,96 @@
    -
    - -
    - +
    +
    + +
    + +
    -
    -
    - -
    - +
    + +
    + +
    -
    -
    - -
    - +
    + +
    + +
    -
    -
    - -
    - +
    + +
    + +
    -
    -
    - -
    - +
    + +
    + +
    -
    -
    - -
    - +
    + +
    + +
    -
    -
    - -
    - +
    + +
    + +
    -
    -
    - -
    - +
    + +
    + +
    -
    -
    - -
    - +
    + +
    + +
    -
    -
    - -
    - +
    + +
    + +
    -
    -
    - -
    -
    +
    + +
    -
    -
    -
    - -
    - -
    -
    -
    - -
    -
    + + + + + + +
    + +
    -
    -
    -
    - -
    - +
    + +
    + +
    -
    -
    - -
    - -
    -
    -
    - -
    - +
    + +
    + +
    diff --git a/cyx-admin/src/main/resources/templates/base/personnel/personnel.html b/cyx-admin/src/main/resources/templates/base/personnel/personnel.html index 8d2ab0a..a2916c1 100644 --- a/cyx-admin/src/main/resources/templates/base/personnel/personnel.html +++ b/cyx-admin/src/main/resources/templates/base/personnel/personnel.html @@ -70,15 +70,15 @@ }, { field: 'unit', - title: '单位名称' + title: '单位' }, { field: 'name', - title: '人员姓名' + title: '姓名' }, { field: 'sex', - title: '人员性别' + title: '性别' }, { field: 'nation', @@ -86,11 +86,11 @@ }, { field: 'deptId', - title: '部门ID' + title: '部门' }, { field: 'mphone', - title: '手机号码' + title: '手机号' }, { field: 'email', @@ -116,10 +116,10 @@ field: 'workDate', title: '参加工作时间' }, - { - field: 'branchId', - title: '支部ID' - }, + // { + // field: 'branchId', + // title: '支部ID' + // }, { field: 'partyDate', title: '入党时间' diff --git a/cyx-common/src/main/java/com/cyx/common/core/controller/BaseController.java b/cyx-common/src/main/java/com/cyx/common/core/controller/BaseController.java index 3e43674..e7fb530 100644 --- a/cyx-common/src/main/java/com/cyx/common/core/controller/BaseController.java +++ b/cyx-common/src/main/java/com/cyx/common/core/controller/BaseController.java @@ -59,6 +59,11 @@ public class BaseController PageUtils.startPage(); } + protected void startPage(Integer pageNum,Integer pageSize) + { + PageUtils.startPage(pageNum,pageSize); + } + /** * 设置请求排序数据 */ diff --git a/cyx-common/src/main/java/com/cyx/common/core/domain/BaseEntity.java b/cyx-common/src/main/java/com/cyx/common/core/domain/BaseEntity.java index fc987c6..6f8c11e 100644 --- a/cyx-common/src/main/java/com/cyx/common/core/domain/BaseEntity.java +++ b/cyx-common/src/main/java/com/cyx/common/core/domain/BaseEntity.java @@ -21,6 +21,25 @@ public class BaseEntity implements Serializable @JsonIgnore private String searchValue; + private Integer pageNum; + private Integer pageSize; + + public Integer getPageNum() { + return pageNum; + } + + public void setPageNum(Integer pageNum) { + this.pageNum = pageNum; + } + + public Integer getPageSize() { + return pageSize; + } + + public void setPageSize(Integer pageSize) { + this.pageSize = pageSize; + } + /** 创建者 */ private String createBy; diff --git a/cyx-common/src/main/java/com/cyx/common/utils/PageUtils.java b/cyx-common/src/main/java/com/cyx/common/utils/PageUtils.java index 9eb7132..fa64c65 100644 --- a/cyx-common/src/main/java/com/cyx/common/utils/PageUtils.java +++ b/cyx-common/src/main/java/com/cyx/common/utils/PageUtils.java @@ -25,6 +25,17 @@ public class PageUtils extends PageHelper PageHelper.startPage(pageNum, pageSize, orderBy).setReasonable(reasonable); } + /** + * 设置请求分页数据 + */ + public static void startPage(Integer pageNum,Integer pageSize) + { + PageDomain pageDomain = TableSupport.buildPageRequest(); + String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy()); + Boolean reasonable = pageDomain.getReasonable(); + PageHelper.startPage(pageNum, pageSize, orderBy).setReasonable(reasonable); + } + /** * 清理分页的线程变量 */ diff --git a/cyx-system/src/main/resources/mapper/base/TAmentPartyAffairsMapper.xml b/cyx-system/src/main/resources/mapper/base/TAmentPartyAffairsMapper.xml index b5cdfe9..9631d39 100644 --- a/cyx-system/src/main/resources/mapper/base/TAmentPartyAffairsMapper.xml +++ b/cyx-system/src/main/resources/mapper/base/TAmentPartyAffairsMapper.xml @@ -108,6 +108,62 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" LEFT JOIN t_ament_branch e ON a.branch_id = e.branch_id LEFT JOIN sys_dept f ON a.dept_id = f.dept_id where (now() > a.finish_date or datediff(a.finish_date,now()) <=3) + and a.type = #{type} + and a.unit = #{unit} + + AND a.target like concat('%', #{target}, '%') + + + AND a.demand like concat('%', #{demand}, '%') + + and a.detailed = #{detailed} + and a.score = #{score} + and a.method = #{method} + and a.head = #{head} + and a.reviewed = #{reviewed} + and a.finish_date = #{finishDate} + and a.per_id = #{perId} + and a.dept_id = #{deptId} + and a.branch_id = #{branchId} + + +