forked from integrated_whb/integrated_whb
BUG优化
parent
78e0bccac5
commit
4daee83b45
|
@ -61,7 +61,15 @@ public class AppTrafficSecurityNoticeController extends BaseController {
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
String errInfo = "success";
|
String errInfo = "success";
|
||||||
PageData pd = this.getPageData();
|
PageData pd = this.getPageData();
|
||||||
pd.put("SIGNEDDATE",DateUtil.date2Str(new Date())); // 签收时间
|
PageData pageData = new PageData();
|
||||||
|
pageData.put("NOTIFICATION_ID", pd.getString("NOTIFICATION_ID"));
|
||||||
|
pageData.put("PERSON_ID", pd.getString("USER_ID"));
|
||||||
|
PageData securityNotice = securityReadDetail.listByUserIdOrNoticeId(pageData);
|
||||||
|
if(StringUtils.isEmpty(securityNotice.getString("SIGNEDDATE"))) {
|
||||||
|
pd.put("SIGNEDDATE",DateUtil.date2Str(new Date())); // 签收时间
|
||||||
|
}else{
|
||||||
|
pd.put("SIGNEDDATE",securityNotice.getString("SIGNEDDATE"));
|
||||||
|
}
|
||||||
pd.put("SIGNING", "1"); //设置签收情况
|
pd.put("SIGNING", "1"); //设置签收情况
|
||||||
if (pd.getString("REPLYCONTENT") != null && !pd.getString("REPLYCONTENT").isEmpty()) {
|
if (pd.getString("REPLYCONTENT") != null && !pd.getString("REPLYCONTENT").isEmpty()) {
|
||||||
pd.put("REPLYDATE", DateUtil.date2Str(new Date())); //设置回复时间
|
pd.put("REPLYDATE", DateUtil.date2Str(new Date())); //设置回复时间
|
||||||
|
|
|
@ -137,27 +137,27 @@ public class TrafficSecurityNoticeController extends BaseController {
|
||||||
long replyStatusNum = 0;
|
long replyStatusNum = 0;
|
||||||
long signedStatusNum = 0;
|
long signedStatusNum = 0;
|
||||||
for (PageData data : varList) {
|
for (PageData data : varList) {
|
||||||
pd.put("NOTIFICATION_ID", data.get("NOTIFICATION_ID"));
|
// pd.put("NOTIFICATION_ID", data.get("NOTIFICATION_ID"));
|
||||||
page.setPd(pd);
|
// page.setPd(pd);
|
||||||
List<PageData> readDetail = securityReadDetail.getAllReadDetail(page);
|
// List<PageData> readDetail = securityReadDetail.getAllReadDetail(page);
|
||||||
|
//
|
||||||
|
// long currentReplyStatusNum = readDetail.stream()
|
||||||
|
// .filter(d -> "1".equals(d.getString("REPLY")))
|
||||||
|
// .count();
|
||||||
|
// long currentSignedStatusNum = readDetail.stream()
|
||||||
|
// .filter(d -> "1".equals(d.getString("SIGNING")))
|
||||||
|
// .count();
|
||||||
|
// long currentTotalReadDetail = readDetail.size();
|
||||||
|
//
|
||||||
|
// replyStatusNum += currentReplyStatusNum;
|
||||||
|
// signedStatusNum += currentSignedStatusNum;
|
||||||
|
// data.put("REPLYSTATUSNUM", currentReplyStatusNum);
|
||||||
|
// data.put("SIGNEDSTATUSNUM", currentSignedStatusNum);
|
||||||
|
|
||||||
long currentReplyStatusNum = readDetail.stream()
|
// 获取 回复与签收 的总人数
|
||||||
.filter(d -> "1".equals(d.getString("REPLY")))
|
data.put("TOTALREADDETAIL", Tools.notEmpty(data.getString("PERSON_ID"))?data.getString("PERSON_ID").split(",").length : 0);
|
||||||
.count();
|
|
||||||
long currentSignedStatusNum = readDetail.stream()
|
|
||||||
.filter(d -> "1".equals(d.getString("SIGNING")))
|
|
||||||
.count();
|
|
||||||
long currentTotalReadDetail = readDetail.size();
|
|
||||||
|
|
||||||
replyStatusNum += currentReplyStatusNum;
|
|
||||||
signedStatusNum += currentSignedStatusNum;
|
|
||||||
|
|
||||||
data.put("TOTALREADDETAIL", currentTotalReadDetail);
|
|
||||||
data.put("REPLYSTATUSNUM", currentReplyStatusNum);
|
|
||||||
data.put("SIGNEDSTATUSNUM", currentSignedStatusNum);
|
|
||||||
}
|
}
|
||||||
map.put("REPLYSTATUSNUM", String.valueOf(replyStatusNum));
|
|
||||||
map.put("SIGNEDSTATUSNUM", String.valueOf(signedStatusNum));
|
|
||||||
map.put("varList", varList);
|
map.put("varList", varList);
|
||||||
map.put("page", page);
|
map.put("page", page);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
@ -167,7 +167,6 @@ public class TrafficSecurityNoticeController extends BaseController {
|
||||||
|
|
||||||
//详情
|
//详情
|
||||||
@RequestMapping(value="/goEdit")
|
@RequestMapping(value="/goEdit")
|
||||||
// @RequiresPermissions("traininginfo:edit")
|
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object goEdit() throws Exception{
|
public Object goEdit() throws Exception{
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
Map<String,Object> map = new HashMap<String,Object>();
|
||||||
|
@ -176,22 +175,24 @@ public class TrafficSecurityNoticeController extends BaseController {
|
||||||
pd = this.getPageData();
|
pd = this.getPageData();
|
||||||
pd = securityNoticeService.findById(pd);//根据ID读取
|
pd = securityNoticeService.findById(pd);//根据ID读取
|
||||||
String[] personIds = pd.getString("PERSON_ID").split(",");
|
String[] personIds = pd.getString("PERSON_ID").split(",");
|
||||||
List<PageData> names = new ArrayList<>();
|
|
||||||
List<PageData> readDetail = new ArrayList<>();
|
List<PageData> readDetail = new ArrayList<>();
|
||||||
|
List<PageData> names = new ArrayList<>();
|
||||||
for (String personId : personIds) {
|
for (String personId : personIds) {
|
||||||
PageData pageData = new PageData();
|
PageData pd2 = new PageData();
|
||||||
pageData.put("USER_ID",personId);
|
pd2.put("NOTIFICATION_ID", pd.getString("NOTIFICATION_ID"));
|
||||||
pageData.put("NOTIFICATION_ID",pd.getString("NOTIFICATION_ID"));
|
pd2.put("PERSON_ID",personId.trim());
|
||||||
PageData pageData1 = usersService.findById(pageData);
|
PageData pageData = trafficSecurityReadDetailService.listByUserIdOrNoticeId(pd2);
|
||||||
|
readDetail.add(pageData);
|
||||||
|
|
||||||
|
// 通过 用户id获取用户名
|
||||||
|
PageData user = new PageData();
|
||||||
|
user.put("USER_ID",personId.trim());
|
||||||
|
PageData pageData1 = usersService.findById(user);
|
||||||
names.add(pageData1);
|
names.add(pageData1);
|
||||||
Page page = new Page();
|
|
||||||
page.setPd(pageData);
|
|
||||||
readDetail = trafficSecurityReadDetailService.listByUserIdOrNoticeId(page);
|
|
||||||
}
|
}
|
||||||
pd.put("readDetail",readDetail);
|
pd.put("readDetail",readDetail);
|
||||||
|
pd.put("names",names);
|
||||||
map.put("pd", pd);
|
map.put("pd", pd);
|
||||||
//map.put("readDetail", readDetail);
|
|
||||||
map.put("names", names);
|
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
@ -250,7 +251,7 @@ public class TrafficSecurityNoticeController extends BaseController {
|
||||||
pd.put("REPLY", "0"); // 回复情况
|
pd.put("REPLY", "0"); // 回复情况
|
||||||
securityNoticeService.edit(pd);
|
securityNoticeService.edit(pd);
|
||||||
|
|
||||||
String[] personIds = pd.getString("PERSON_ID").split(",");
|
/*String[] personIds = pd.getString("PERSON_ID").split(",");
|
||||||
for (String personId : personIds) {
|
for (String personId : personIds) {
|
||||||
//pd.put("NOTIFICATION_ID", notificationId);
|
//pd.put("NOTIFICATION_ID", notificationId);
|
||||||
pd.put("PERSON_ID", personId.trim());
|
pd.put("PERSON_ID", personId.trim());
|
||||||
|
@ -258,7 +259,7 @@ public class TrafficSecurityNoticeController extends BaseController {
|
||||||
pd.put("REPLYSTATUS", "0"); // 主键
|
pd.put("REPLYSTATUS", "0"); // 主键
|
||||||
pd.put("SIGNEDSTATUS", "0"); // 主键
|
pd.put("SIGNEDSTATUS", "0"); // 主键
|
||||||
securityReadDetail.save(pd);
|
securityReadDetail.save(pd);
|
||||||
}
|
}*/
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
map.put("pd", pd);
|
map.put("pd", pd);
|
||||||
return map;
|
return map;
|
||||||
|
@ -336,8 +337,7 @@ public class TrafficSecurityNoticeController extends BaseController {
|
||||||
issue.put("REPLY", "0");
|
issue.put("REPLY", "0");
|
||||||
issue.put("SIGNING", "0");
|
issue.put("SIGNING", "0");
|
||||||
issue.put("CORPINFO_ID", securityNotice.getString("CORPINFO_ID"));
|
issue.put("CORPINFO_ID", securityNotice.getString("CORPINFO_ID"));
|
||||||
issue.put("PERSON_ID",personIds[i]);
|
issue.put("PERSON_ID",personIds[i].trim());
|
||||||
issue.put("PERSON", securityNotice.getString("PERSON_ID"));
|
|
||||||
issue.put("ISDELETE", "0");
|
issue.put("ISDELETE", "0");
|
||||||
issue.put("CREATOR", Jurisdiction.getUSER_ID());
|
issue.put("CREATOR", Jurisdiction.getUSER_ID());
|
||||||
issue.put("CREATORNAME", Jurisdiction.getUsername());
|
issue.put("CREATORNAME", Jurisdiction.getUsername());
|
||||||
|
|
|
@ -16,6 +16,6 @@ public interface TrafficSecurityReadDetailMapper {
|
||||||
void edit(PageData pd);
|
void edit(PageData pd);
|
||||||
|
|
||||||
void delete(PageData pd);
|
void delete(PageData pd);
|
||||||
|
PageData listByUserIdOrNoticeId(PageData pd);
|
||||||
|
|
||||||
List<PageData> listByUserIdOrNoticeId(Page page);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,5 +16,6 @@ public interface TrafficSecurityReadDetailService {
|
||||||
|
|
||||||
void delete(PageData pd);
|
void delete(PageData pd);
|
||||||
|
|
||||||
List<PageData> listByUserIdOrNoticeId(Page page);
|
PageData listByUserIdOrNoticeId(PageData pd);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,8 @@ public class TrafficSecurityReadDetailImpl implements TrafficSecurityReadDetailS
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<PageData> listByUserIdOrNoticeId(Page page) {
|
public PageData listByUserIdOrNoticeId(PageData pd) {
|
||||||
return securityReadDetailMapper.listByUserIdOrNoticeId(page);
|
return securityReadDetailMapper.listByUserIdOrNoticeId(pd);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,8 @@
|
||||||
f.VIDEO_ROUTE,
|
f.VIDEO_ROUTE,
|
||||||
f.VIDEO_NAME,
|
f.VIDEO_NAME,
|
||||||
f.REPLYSTATUS,
|
f.REPLYSTATUS,
|
||||||
f.POSTSTATUS
|
f.POSTSTATUS,
|
||||||
|
f.SIGNEDDATE
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 字段用于新增 -->
|
<!-- 字段用于新增 -->
|
||||||
|
@ -164,10 +165,14 @@
|
||||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||||
select
|
select
|
||||||
f.*,
|
f.*,
|
||||||
i.CORP_NAME
|
i.CORP_NAME,
|
||||||
|
count(r.READDETAIL_ID) PERSON_COUNT,
|
||||||
|
COUNT(case when r.REPLY = '1' then r.READDETAIL_ID END) COUNT_REPLY,
|
||||||
|
COUNT(case when r.SIGNING = '1' then r.READDETAIL_ID END) COUNT_SIGNING
|
||||||
from
|
from
|
||||||
<include refid="tableName"></include> f
|
<include refid="tableName"></include> f
|
||||||
left join bus_corp_info i on f.CORPINFO_ID = i.CORPINFO_ID
|
left join bus_corp_info i on f.CORPINFO_ID = i.CORPINFO_ID
|
||||||
|
left join bus_traffic_read_detail r on r.NOTIFICATION_ID = f.NOTIFICATION_ID and r.ISDELETE = '0'
|
||||||
where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID}
|
||||||
<if test="pd.TITLE != null and pd.TITLE != ''"><!-- 关键词检索-通知标题 -->
|
<if test="pd.TITLE != null and pd.TITLE != ''"><!-- 关键词检索-通知标题 -->
|
||||||
and f.TITLE like CONCAT ('%',#{pd.TITLE},'%')
|
and f.TITLE like CONCAT ('%',#{pd.TITLE},'%')
|
||||||
|
@ -184,6 +189,10 @@
|
||||||
<if test="pd.PRACTITIONER != null and pd.PRACTITIONER != ''"><!-- 关键词检索-从业人员 -->
|
<if test="pd.PRACTITIONER != null and pd.PRACTITIONER != ''"><!-- 关键词检索-从业人员 -->
|
||||||
and f.PRACTITIONER = #{pd.PRACTITIONER}
|
and f.PRACTITIONER = #{pd.PRACTITIONER}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="pd.RISKUNITNAME != null and pd.RISKUNITNAME != ''"><!-- 关键词检索-从业人员 -->
|
||||||
|
and f.LEVEL = #{pd.RISKUNITNAME}
|
||||||
|
</if>
|
||||||
|
group by f.NOTIFICATION_ID
|
||||||
ORDER BY f.CREATETIME DESC
|
ORDER BY f.CREATETIME DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
@ -138,6 +138,9 @@
|
||||||
<if test="pd.SIGNEDSTATUS != null and pd.SIGNEDSTATUS != ''"><!-- 关键词检索-签收状态 -->
|
<if test="pd.SIGNEDSTATUS != null and pd.SIGNEDSTATUS != ''"><!-- 关键词检索-签收状态 -->
|
||||||
and f.SIGNEDSTATUS = #{pd.SIGNEDSTATUS}
|
and f.SIGNEDSTATUS = #{pd.SIGNEDSTATUS}
|
||||||
</if>
|
</if>
|
||||||
|
<!--<if test="pd.RISKUNITNAME != null and pd.RISKUNITNAME != ''"><!– 关键词检索-签收状态 –>
|
||||||
|
and f.RISKUNITNAME = #{pd.RISKUNITNAME}
|
||||||
|
</if>-->
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
|
@ -193,32 +196,19 @@
|
||||||
|
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<select id="listByUserIdOrNoticeId" parameterType="page" resultType="pd">
|
<select id="listByUserIdOrNoticeId" parameterType="com.zcloud.entity.PageData" resultType="com.zcloud.entity.PageData">
|
||||||
SELECT
|
SELECT
|
||||||
c.*,
|
c.*,
|
||||||
u.NOTIFICATIONCONTENT,
|
su.NAME
|
||||||
u.VIDEO_ROUTE,
|
|
||||||
u.ATTACHMENT_ROUTE,
|
|
||||||
u.REPLYSTATUS,
|
|
||||||
u.CREATETIME,
|
|
||||||
su.NAME
|
|
||||||
FROM
|
FROM
|
||||||
bus_traffic_read_detail c
|
bus_traffic_read_detail c
|
||||||
INNER JOIN bus_traffic_comprehensivemanagement_securitynotice u ON c.NOTIFICATION_ID = u.NOTIFICATION_ID
|
LEFT JOIN sys_user su on c.PERSON_ID = su.USER_ID
|
||||||
INNER JOIN sys_user su on c.PERSON_ID = su.USER_ID
|
WHERE c.ISDELETE = 0
|
||||||
WHERE c.PERSON_ID = #{pd.USER_ID}
|
and
|
||||||
AND u.ISDELETE = 0
|
c.NOTIFICATION_ID = #{NOTIFICATION_ID}
|
||||||
<if test="pd.NOTIFICATION_ID != null and pd.NOTIFICATION_ID != ''"><!-- 关键词检索-通知标题 -->
|
and
|
||||||
and c.NOTIFICATION_ID = #{pd.NOTIFICATION_ID}
|
c.PERSON_ID = #{PERSON_ID}
|
||||||
</if>
|
ORDER BY c.CREATETIME DESC
|
||||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''">
|
|
||||||
AND (
|
|
||||||
c.SYNOPSIS LIKE CONCAT('%', #{pd.KEYWORDS}, '%')
|
|
||||||
OR
|
|
||||||
c.CONTENT LIKE CONCAT('%', #{pd.KEYWORDS}, '%')
|
|
||||||
)
|
|
||||||
</if>
|
|
||||||
ORDER BY u.CREATETIME DESC
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue