Merge remote-tracking branch 'origin/master'

This commit is contained in:
duxp 2023-09-20 11:21:49 +08:00
commit d0838394c4
4 changed files with 50 additions and 1 deletions

View File

@ -2,6 +2,7 @@ package com.cyx.web.base.controller;
import java.io.*;
import java.nio.file.Files;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Map;
@ -290,6 +291,11 @@ public class TAmentPartyAffairsController extends BaseController
public TableDataInfo finishedstaticList(TAmentPartyAffairs tAmentPartyAffairs)
{
startPage();
List<String> dates = Arrays.asList(tAmentPartyAffairs.getSelectDate().split(" - "));
if (dates.size()>1){
tAmentPartyAffairs.setStart(dates.get(0));
tAmentPartyAffairs.setEnd(dates.get(1));
}
List<Map<String,Object>> list = tAmentPartyAffairsService.finishedstaticList(tAmentPartyAffairs);
return getDataTable(list);
}

View File

@ -21,6 +21,25 @@ public class TAmentPartyAffairs extends BaseEntity
/** 自增ID */
private Long id;
private String start;
private String end;
public String getStart() {
return start;
}
public void setStart(String start) {
this.start = start;
}
public String getEnd() {
return end;
}
public void setEnd(String end) {
this.end = end;
}
private Integer pageNum;
private Integer pageSize;
@ -34,6 +53,16 @@ public class TAmentPartyAffairs extends BaseEntity
private String shotName;
private String selectDate;
public String getSelectDate() {
return selectDate;
}
public void setSelectDate(String selectDate) {
this.selectDate = selectDate;
}
private String zhiwu;
public String getZhiwu() {

View File

@ -37,6 +37,10 @@
<option th:each="item : ${shotList}" th:text="${item.shotName}" th:value="${item.shotName}"></option>
</select>
</li>
<li>
<label>截止日期:</label>
<input type="text" name="selectDate" id="laydate-demo-4" placeholder="yyyy-MM-dd - yyyy-MM-dd">
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
@ -75,6 +79,15 @@
}else {
$("#type0831").val('')
}
layui.use('laydate', function() {
var laydate = layui.laydate;
laydate.render({
elem: '#laydate-demo-4',
range: true
});
})
$(function() {
var options = {
url: prefix + "/finishedstaticList",

View File

@ -113,7 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN t_ament_personnel d ON a.head = d.id
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()) &lt;=3)
where (now() > a.finish_date or datediff(a.finish_date,now()) &lt;=3 or a.status = 2)
<if test="type != null and type != ''"> and a.type = #{type}</if>
<if test="unit != null and unit != ''"> and a.unit = #{unit}</if>
<if test="target != null and target != ''">
@ -355,6 +355,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="type != null and type != ''"> and a.type = #{type}</if>
<if test="deptId != null and deptId != ''"> and a.dept_id = #{deptId}</if>
<if test="shotName != null and shotName != ''"> and a.shot_name = #{shotName}</if>
<if test="start != null and start != '' and end != null and end != ''"> and a.finish_date between #{start} and #{end}</if>
GROUP BY
a.type,
a.shot_name