修改页面和接口

This commit is contained in:
liuwu 2023-10-09 11:00:01 +08:00
parent 9973553975
commit bcd1b5fd82
7 changed files with 111 additions and 22 deletions

View File

@ -71,9 +71,9 @@ public class TAmentPartyAffairsController extends BaseController
{
startPage();
if (!getLoginName().equals("admin")){
tAmentPartyAffairs.setPerId(getSysUser().getUserId());
tAmentPartyAffairs.setHead(getSysUser().getUserId()+"");
}
List<TAmentPartyAffairs> list = tAmentPartyAffairsService.warnList(tAmentPartyAffairs);
List<TAmentPartyAffairs> list = tAmentPartyAffairsService.allList(tAmentPartyAffairs);
return getDataTable(list);
}
@ -210,11 +210,11 @@ public class TAmentPartyAffairsController extends BaseController
TAmentReviewedHis his = new TAmentReviewedHis();
his.setPer(tAmentPartyAffairs.getReviewer());
his.setReviewedTime(new Date());
int before = 0;
double before = 0;
if (null != one && null != one.getNowScore()){
before = Integer.parseInt(one.getNowScore());
before = Double.parseDouble(one.getNowScore());
}
int reviewScore = Integer.parseInt(tAmentPartyAffairs.getNowScore());
double reviewScore = Double.parseDouble(tAmentPartyAffairs.getNowScore());
his.setScore(tAmentPartyAffairs.getNowScore());
his.setRemark(tAmentPartyAffairs.getRemark());
reviewedHisService.insertTAmentReviewedHis(his);

View File

@ -89,4 +89,6 @@ public interface TAmentPartyAffairsMapper
List<Map<String, Object>> zhiwuTree(TAmentPartyAffairs tAmentPartyAffairs);
List<Map<String, Object>> shotList(TAmentPartyAffairs tAmentPartyAffairs);
List<TAmentPartyAffairs> allList(TAmentPartyAffairs tAmentPartyAffairs);
}

View File

@ -89,4 +89,6 @@ public interface ITAmentPartyAffairsService
List<Map<String, Object>> zhiwuTree(TAmentPartyAffairs tAmentPartyAffairs);
List<Map<String, Object>> shotList(TAmentPartyAffairs tAmentPartyAffairs);
List<TAmentPartyAffairs> allList(TAmentPartyAffairs tAmentPartyAffairs);
}

View File

@ -165,4 +165,9 @@ public class TAmentPartyAffairsServiceImpl implements ITAmentPartyAffairsService
public List<Map<String, Object>> shotList(TAmentPartyAffairs tAmentPartyAffairs){
return tAmentPartyAffairsMapper.shotList(tAmentPartyAffairs);
}
@Override
public List<TAmentPartyAffairs> allList(TAmentPartyAffairs tAmentPartyAffairs){
return tAmentPartyAffairsMapper.allList(tAmentPartyAffairs);
}
}

View File

@ -196,11 +196,11 @@ public class WechatController extends BaseController {
TAmentReviewedHis his = new TAmentReviewedHis();
his.setPer(tAmentPartyAffairs.getReviewer());
his.setReviewedTime(new Date());
int before = 0;
double before = 0;
if (null != one && null != one.getNowScore()){
before = Integer.parseInt(one.getNowScore());
before = Double.parseDouble(one.getNowScore());
}
int reviewScore = Integer.parseInt(tAmentPartyAffairs.getNowScore());
double reviewScore = Double.parseDouble(tAmentPartyAffairs.getNowScore());
his.setScore(tAmentPartyAffairs.getNowScore());
his.setRemark(tAmentPartyAffairs.getRemark());
reviewedHisService.insertTAmentReviewedHis(his);

View File

@ -62,13 +62,13 @@
<div class="form-group col-sm-12 col-md-12">
<label class="col-sm-2 col-md-2 control-label">目标要求</label>
<div class="col-sm-10 col-md-10">
<input id="demand" readonly type="text" class="form-control" name="demand">
<input id="demand" readonly type="text" class="form-control">
</div>
</div>
<div class="form-group col-sm-12 col-md-12">
<label class="col-sm-2 col-md-2 control-label">工作任务</label>
<div class="col-sm-10 col-md-10">
<textarea id="detailed" readonly class="form-control" name="detailed"></textarea>
<textarea id="detailed" readonly class="form-control"></textarea>
</div>
</div>
<div class="form-group col-sm-12 col-md-12">

View File

@ -96,6 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN sys_dept f ON a.dept_id = f.dept_id
</select>
<!--待办预警-->
<select id="warnList" parameterType="TAmentPartyAffairs" resultMap="TAmentPartyAffairsResult">
SELECT
a.*,
@ -114,15 +115,29 @@ 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 or a.status = 2)
and (
a.unit is null and((now() > a.finish_date or datediff(a.finish_date,now()) &lt;=3 or a.status = 2)) or
a.unit IS NOT NULL
AND (weekday(NOW())+ 1 = 5 OR
0 &lt;= DATEDIFF(LAST_DAY( NOW()), now())&lt;= 3 OR
0 &lt;= DATEDIFF(LAST_DAY( MAKEDATE( EXTRACT( YEAR FROM CURDATE()), 1 ) + INTERVAL QUARTER ( CURDATE())* 3-1 MONTH ),NOW()) &lt;= 3
)
)
where 1=1
<if test="status != null and status == 1">
and a.status = 1
and ((
(a.unit is null or a.unit = '') and((now() > a.finish_date or datediff(a.finish_date,now()) &lt;=3 )) or
(a.unit IS NOT NULL and a.unit &lt;&gt; ''
AND ((weekday(NOW())+ 1 = 5 and a.unit = 1) OR
(DATEDIFF(LAST_DAY( NOW()), now())&lt;= 3 and a.unit = 2) OR
(DATEDIFF(LAST_DAY( MAKEDATE( EXTRACT( YEAR FROM CURDATE()), 1 ) + INTERVAL QUARTER ( CURDATE())* 3-1 MONTH ),NOW()) &lt;= 3 and a.unit=3)
))
))
</if>
<if test="status != null and status == 2">
and a.status = 1
and ((
(a.unit is null or a.unit = '') and((now() > a.finish_date or datediff(a.finish_date,now()) &lt;=3 )) or
(a.unit IS NOT NULL and a.unit &lt;&gt; ''
AND ((weekday(NOW())+ 1 = 5 and a.unit = 1) OR
(DATEDIFF(LAST_DAY( NOW()), now())&lt;= 3 and a.unit = 2) OR
(DATEDIFF(LAST_DAY( MAKEDATE( EXTRACT( YEAR FROM CURDATE()), 1 ) + INTERVAL QUARTER ( CURDATE())* 3-1 MONTH ),NOW()) &lt;= 3 and a.unit=3)
))
) or a.status = 2)
</if>
<if test="type != null and type != ''"> and a.type = #{type}</if>
<if test="target != null and target != ''">
AND a.target like concat('%', #{target}, '%')
@ -133,15 +148,80 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="detailed != null and detailed != ''"> and a.detailed = #{detailed}</if>
<if test="score != null and score != ''"> and a.score = #{score}</if>
<if test="method != null and method != ''"> and a.method = #{method}</if>
<if test="head != null and head != ''"> and a.head = #{head}</if>
<if test="head != null and head != ''">
AND a.head = #{head}
</if>
<if test="reviewed != null and reviewed != ''"> and a.reviewed = #{reviewed}</if>
<if test="finishDate != null "> and a.finish_date = #{finishDate}</if>
<if test="perId != null "> and a.per_id = #{perId}</if>
<if test="deptId != null "> and a.dept_id = #{deptId}</if>
<if test="branchId != null "> and a.branch_id = #{branchId}</if>
order by finish_date,id
</select>
<select id="allList" parameterType="TAmentPartyAffairs" resultMap="TAmentPartyAffairsResult">
SELECT
a.*,
ROUND( a.now_score / a.score * 100 ) percent,
a.shot_name shotName,
a.now_score nowScore,
b.`name` oprator,
c.`name` reviewer,
d.`name` header,
e.branch_name branch,
f.dept_name deptName
FROM
t_ament_party_affairs a
LEFT JOIN t_ament_personnel b ON a.per_id = b.id
LEFT JOIN t_ament_personnel c ON a.reviewed = c.id
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
1 = 1
<if test="type != null and type != ''"> and a.type = #{type}</if>
<if test="target != null and target != ''">
AND a.target like concat('%', #{target}, '%')
</if>
<if test="demand != null and demand != ''">
AND a.demand like concat('%', #{demand}, '%')
</if>
<if test="detailed != null and detailed != ''"> and a.detailed = #{detailed}</if>
<if test="score != null and score != ''"> and a.score = #{score}</if>
<if test="method != null and method != ''"> and a.method = #{method}</if>
<if test="head != null and head != ''"> and a.head = #{head} or a.reviewed = #{head}</if>
<if test="reviewed != null and reviewed != ''"> and a.reviewed = #{reviewed}</if>
<if test="finishDate != null "> and a.finish_date = #{finishDate}</if>
<if test="deptId != null "> and a.dept_id = #{deptId}</if>
<if test="branchId != null "> and a.branch_id = #{branchId}</if>
AND ((
now() &gt; a.finish_date
AND a.STATUS = 1
OR datediff(
a.finish_date,
now()) &lt;= 3
AND ( a.unit IS NULL OR a.unit = '' AND a.STATUS = 1 )
)
OR (
a.unit IS NOT NULL
AND a.unit &lt;&gt; ''
AND ( weekday( NOW())+ 1 = 5 AND a.unit = 1 )
OR ( DATEDIFF( LAST_DAY( NOW()), now())&lt;= 3 AND a.unit = 2 )
OR (
DATEDIFF(
LAST_DAY( MAKEDATE( EXTRACT( YEAR FROM CURDATE()), 1 ) + INTERVAL QUARTER ( CURDATE())* 3-1 MONTH ),
NOW()) &lt;= 3
AND a.unit = 3
)
AND a.STATUS = 1
)
OR ( a.`status` = 2 ))
ORDER BY
finish_date
<if test="status != null "> and a.status = #{status}</if>
</select>
<select id="deptTree" parameterType="TAmentPartyAffairs" resultType="map">
SELECT
f.id,
@ -236,7 +316,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 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 != ''">