forked from integrated_whb/integrated_whb
安全通知模块->列表,新增,删除,详情接口开发
parent
6bedb9fc10
commit
ba988ffb42
|
@ -0,0 +1,158 @@
|
|||
package com.zcloud.controller.comprehensive;
|
||||
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.service.comprehensive.SecurityNoticeService;
|
||||
import com.zcloud.service.comprehensive.SecurityReadDetailService;
|
||||
import com.zcloud.service.system.UsersService;
|
||||
import com.zcloud.util.DateUtil;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
import com.zcloud.util.Tools;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/securitynotice")
|
||||
public class SecurityNoticeController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private SecurityNoticeService securityNoticeService;
|
||||
@Autowired
|
||||
private SecurityReadDetailService securityReadDetail;
|
||||
|
||||
@Autowired
|
||||
private UsersService usersService;
|
||||
//新增
|
||||
@RequestMapping(value = "/add")
|
||||
@ResponseBody
|
||||
public Object add() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
|
||||
String notificationId = this.get32UUID();
|
||||
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 创建人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); // 创建人姓名
|
||||
pd.put("NOTIFICATION_ID", notificationId); // 主键
|
||||
pd.put("CREATETIME", DateUtil.date2Str(new Date())); // 添加时间
|
||||
pd.put("POSTSTATUS", "1"); // 发布状态
|
||||
pd.put("REPLYSTATUS", "0"); // 回复状态
|
||||
pd.put("SIGNEDSTATUS", "0"); // 签收状态
|
||||
pd.put("ISDELETE", "0");
|
||||
|
||||
List<PageData> notifications = securityNoticeService.getAllNotifications(pd);
|
||||
Map<String, Integer> statusCount = new HashMap<>();
|
||||
statusCount.put("total", notifications.size());
|
||||
statusCount.put("signed", (int) notifications.stream().filter(n -> "1".equals(n.getString("SIGNEDSTATUS"))).count());
|
||||
statusCount.put("replied", (int) notifications.stream().filter(n -> "1".equals(n.getString("REPLYSTATUS"))).count());
|
||||
pd.put("SIGNING", statusCount.get("signed") + "/" + statusCount.get("total") + "人"); // 签收情况
|
||||
pd.put("REPLY", statusCount.get("replied") + "/" + statusCount.get("total") + "人"); // 回复情况
|
||||
securityNoticeService.save(pd);
|
||||
|
||||
String[] persons = pd.getString("PERSON").split(",");
|
||||
for (String person : persons) {
|
||||
pd.put("NOTIFICATION_ID", notificationId);
|
||||
pd.put("PERSON", person.trim());
|
||||
securityReadDetail.save(pd);
|
||||
}
|
||||
map.put("result", errInfo);
|
||||
map.put("pd", pd);
|
||||
return map;
|
||||
}
|
||||
|
||||
//阅读情况
|
||||
@RequestMapping(value = "/getAllReadDetail")
|
||||
// @RequiresPermissions("hidden:list")
|
||||
@ResponseBody
|
||||
public Object getAllReadDetail(Page page) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
String PRACTITIONER = pd.getString("PRACTITIONER"); // 关键词检索条件
|
||||
if (Tools.notEmpty(PRACTITIONER))
|
||||
pd.put("PRACTITIONER", PRACTITIONER.trim());
|
||||
String PRACTITIONERTYPE = pd.getString("PRACTITIONERTYPE"); // 关键词检索条件
|
||||
if (Tools.notEmpty(PRACTITIONERTYPE))
|
||||
pd.put("PRACTITIONERTYPE", PRACTITIONERTYPE.trim());
|
||||
String SIGNEDSTATUS = pd.getString("SIGNEDSTATUS"); // 关键词检索条件
|
||||
if (Tools.notEmpty(SIGNEDSTATUS))
|
||||
pd.put("SIGNEDSTATUS", SIGNEDSTATUS.trim());
|
||||
String REPLYSTATUS = pd.getString("REPLYSTATUS"); // 关键词检索条件
|
||||
if (Tools.notEmpty(REPLYSTATUS))
|
||||
pd.put("REPLYSTATUS", REPLYSTATUS.trim());
|
||||
page.setPd(pd);
|
||||
List<PageData> notifications = securityReadDetail.getAllReadDetail(page);
|
||||
map.put("varList", notifications);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
//列表
|
||||
@RequestMapping(value = "/listForSecurityNotice")
|
||||
// @RequiresPermissions("hidden:list")
|
||||
@ResponseBody
|
||||
public Object listForSecurityNotice(Page page) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
String TITLE = pd.getString("TITLE"); // 关键词检索条件
|
||||
if (Tools.notEmpty(TITLE))
|
||||
pd.put("TITLE", TITLE.trim());
|
||||
|
||||
String REPLYSTATUS = pd.getString("REPLYSTATUS"); // 关键词检索条件
|
||||
if (Tools.notEmpty(REPLYSTATUS))
|
||||
pd.put("REPLYSTATUS", REPLYSTATUS.trim());
|
||||
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = securityNoticeService.listForSecurityNotice(page); // 列出Hidden列表
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
//详情
|
||||
@RequestMapping(value="/goEdit")
|
||||
// @RequiresPermissions("traininginfo:edit")
|
||||
@ResponseBody
|
||||
public Object goEdit() throws Exception{
|
||||
Map<String,Object> map = new HashMap<String,Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd = securityNoticeService.findById(pd); //根据ID读取
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/delete")
|
||||
// @RequiresPermissions("traininginfo:del")
|
||||
@ResponseBody
|
||||
public Object delete() throws Exception{
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
pd.put("DELETOR", Jurisdiction.getUSER_ID()); //删除人id
|
||||
pd.put("DELETORNAME", Jurisdiction.getUsername()); //删除人姓名
|
||||
pd.put("DELETETIME", DateUtil.date2Str(new Date())); //删除时间
|
||||
securityNoticeService.delete(pd);
|
||||
map.put("result", errInfo); //返回结果
|
||||
return map;
|
||||
}
|
||||
}
|
|
@ -245,7 +245,7 @@ public class LoginController extends BaseController {
|
|||
* 获取用户监管部门id
|
||||
* 等级(0--公司领导,1部门领导,3普通员工)
|
||||
*
|
||||
* @param userPd
|
||||
* @param
|
||||
* 监管部门
|
||||
*/
|
||||
private String superviseDepart(PageData dpd) throws Exception {
|
||||
|
|
|
@ -0,0 +1,138 @@
|
|||
package com.zcloud.entity.comprehensivemanagement;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class Notification {
|
||||
|
||||
/**
|
||||
* 通知ID
|
||||
*/
|
||||
private String NOTIFICATIONID;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
private String TITLE;
|
||||
|
||||
/**
|
||||
* 等级
|
||||
*/
|
||||
private String LEVEL;
|
||||
|
||||
/**
|
||||
* 回复
|
||||
*/
|
||||
private String REPLY;
|
||||
|
||||
/**
|
||||
* 签名
|
||||
*/
|
||||
private String SIGNING;
|
||||
|
||||
/**
|
||||
* 运输公司
|
||||
*/
|
||||
private String transportationcompany;
|
||||
|
||||
/**
|
||||
* 企业下发人
|
||||
*/
|
||||
private String PRESON;
|
||||
|
||||
/**
|
||||
* 通知内容
|
||||
*/
|
||||
private String NOTIFICATIONCONTENT;
|
||||
|
||||
/**
|
||||
* 回复状态
|
||||
*/
|
||||
private String REPLYSTATUS;
|
||||
|
||||
/**
|
||||
* 从业人员
|
||||
*/
|
||||
private String PRACTITIONER;
|
||||
|
||||
/**
|
||||
* 从业类型
|
||||
*/
|
||||
private String PRACTITIONERTYPE;
|
||||
|
||||
/**
|
||||
* 签收状态
|
||||
*/
|
||||
private String SIGNEDSTATUS;
|
||||
|
||||
/**
|
||||
* 签收时间
|
||||
*/
|
||||
private String SIGNEDDATE;
|
||||
|
||||
/**
|
||||
* 回复时间
|
||||
*/
|
||||
private String REPLYDATE;
|
||||
|
||||
/**
|
||||
* 回复内容
|
||||
*/
|
||||
private String REPLYCONTENT;
|
||||
|
||||
/**
|
||||
* 发布状态
|
||||
*/
|
||||
private String POSTSTATUS;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private String ISDELETE;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String CREATOR;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
private String CREATORNAME;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private String CREATETIME;
|
||||
|
||||
/**
|
||||
* 修改人id
|
||||
*/
|
||||
private String OPERATOR;
|
||||
|
||||
/**
|
||||
* 修改人姓名
|
||||
*/
|
||||
private String OPERATORNAME;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private String OPERATTIME;
|
||||
|
||||
/**
|
||||
* 删除人id
|
||||
*/
|
||||
private String DELETOR;
|
||||
|
||||
/**
|
||||
* 删除人姓名
|
||||
*/
|
||||
private String DELETORNAME;
|
||||
|
||||
/**
|
||||
* 删除时间
|
||||
*/
|
||||
private String DELETETIME;
|
||||
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
package com.zcloud.mapper.datasource.comprehensive;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface SecurityNoticeMapper {
|
||||
/**新增
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void save(PageData pd);
|
||||
|
||||
/**
|
||||
* 列表
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
PageData findById(PageData pd);
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
void delete(PageData pd);
|
||||
|
||||
|
||||
List<PageData> getAllNotifications(PageData pd);
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.zcloud.mapper.datasource.comprehensive;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface SecurityReadDetailMapper {
|
||||
void save(PageData pd);
|
||||
|
||||
List<PageData> datalistPage(Page page);
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package com.zcloud.service.comprehensive;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface SecurityNoticeService {
|
||||
|
||||
void save(PageData pd);
|
||||
|
||||
List<PageData> listForSecurityNotice(Page page)throws Exception;
|
||||
|
||||
PageData findById(PageData pd)throws Exception;
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception;
|
||||
|
||||
List<PageData> getAllNotifications(PageData pd);
|
||||
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.zcloud.service.comprehensive;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface SecurityReadDetailService {
|
||||
void save(PageData pd);
|
||||
|
||||
List<PageData> getAllReadDetail(Page page)throws Exception;
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
package com.zcloud.service.comprehensive.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.comprehensive.SecurityNoticeMapper;
|
||||
import com.zcloud.service.comprehensive.SecurityNoticeService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class SecurityNoticeServiceImpl implements SecurityNoticeService {
|
||||
@Resource
|
||||
private SecurityNoticeMapper securityNoticeMapper;
|
||||
@Override
|
||||
public void save(PageData pd) {
|
||||
securityNoticeMapper.save(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listForSecurityNotice(Page page) throws Exception {
|
||||
return securityNoticeMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
/**通过id获取数据
|
||||
* @param pd
|
||||
*/
|
||||
@Override
|
||||
public PageData findById(PageData pd)throws Exception {
|
||||
return securityNoticeMapper.findById(pd);
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void delete(PageData pd)throws Exception{
|
||||
securityNoticeMapper.delete(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getAllNotifications(PageData pd) {
|
||||
return securityNoticeMapper.getAllNotifications(pd);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package com.zcloud.service.comprehensive.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.comprehensive.SecurityReadDetailMapper;
|
||||
import com.zcloud.service.comprehensive.SecurityReadDetailService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class SecurityReadDetailImpl implements SecurityReadDetailService {
|
||||
@Autowired
|
||||
private SecurityReadDetailMapper securityReadDetailMapper;
|
||||
@Override
|
||||
public void save(PageData pd) {
|
||||
securityReadDetailMapper.save(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> getAllReadDetail(Page page) {
|
||||
return securityReadDetailMapper.datalistPage(page);
|
||||
}
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
spring.application.name=integrated_traffic
|
||||
server.port=8099
|
||||
server.port=8093
|
||||
|
||||
datasource.no1.driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
datasource.no1.url=jdbc:mysql://192.168.0.64:3306/qa-traffic-prevention?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8
|
||||
|
|
|
@ -0,0 +1,179 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.datasource.comprehensive.SecurityNoticeMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
BUS_TRAFFIC_COMPREHENSIVEMANAGEMENT_SECURITYNOTICE
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.NOTIFICATION_ID,
|
||||
f.TITLE,
|
||||
f.LEVEL,
|
||||
f.REPLY,
|
||||
f.SIGNING,
|
||||
f.TRANSPORTATIONCOMPANY,
|
||||
f.PERSON,
|
||||
f.NOTIFICATIONCONTENT,
|
||||
f.ISDELETE,
|
||||
f.DELETOR,
|
||||
f.DELETETIME,
|
||||
f.CREATOR,
|
||||
f.CREATORNAME,
|
||||
f.CREATETIME,
|
||||
f.OPERATOR,
|
||||
f.OPERATORNAME,
|
||||
f.OPERATTIME,
|
||||
f.PRACTITIONER,
|
||||
f.PRACTITIONERTYPE,
|
||||
f.SIGNEDSTATUS,
|
||||
f.SIGNEDDATE,
|
||||
f.REPLYDATE,
|
||||
f.REPLYCONTENT,
|
||||
f.POSTSTATUS
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
NOTIFICATION_ID,
|
||||
TITLE,
|
||||
LEVEL,
|
||||
REPLY,
|
||||
SIGNING,
|
||||
TRANSPORTATIONCOMPANY,
|
||||
PERSON,
|
||||
NOTIFICATIONCONTENT,
|
||||
ISDELETE,
|
||||
DELETOR,
|
||||
DELETETIME,
|
||||
CREATOR,
|
||||
CREATORNAME,
|
||||
CREATETIME,
|
||||
OPERATOR,
|
||||
OPERATORNAME,
|
||||
OPERATTIME,
|
||||
REPLYSTATUS,
|
||||
PRACTITIONER,
|
||||
PRACTITIONERTYPE,
|
||||
SIGNEDSTATUS,
|
||||
SIGNEDDATE,
|
||||
REPLYDATE,
|
||||
REPLYCONTENT,
|
||||
POSTSTATUS
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{NOTIFICATION_ID},
|
||||
#{TITLE},
|
||||
#{LEVEL},
|
||||
#{REPLY},
|
||||
#{SIGNING},
|
||||
#{TRANSPORTATIONCOMPANY},
|
||||
#{PERSON},
|
||||
#{NOTIFICATIONCONTENT},
|
||||
#{ISDELETE},
|
||||
#{DELETOR},
|
||||
#{DELETETIME},
|
||||
#{CREATOR},
|
||||
#{CREATORNAME},
|
||||
#{CREATETIME},
|
||||
#{OPERATOR},
|
||||
#{OPERATORNAME},
|
||||
#{OPERATTIME},
|
||||
#{REPLYSTATUS},
|
||||
#{PRACTITIONER},
|
||||
#{PRACTITIONERTYPE},
|
||||
#{SIGNEDSTATUS},
|
||||
#{SIGNEDDATE},
|
||||
#{REPLYDATE},
|
||||
#{REPLYCONTENT},
|
||||
#{POSTSTATUS}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1',
|
||||
DELETOR = #{DELETOR},
|
||||
DELETETIME = #{DELETETIME}
|
||||
where
|
||||
NOTIFICATION_ID = #{NOTIFICATION_ID}
|
||||
</delete>
|
||||
|
||||
<!--列表-->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.TITLE != null and pd.TITLE != ''"><!-- 关键词检索-通知标题 -->
|
||||
and f.TITLE = #{pd.TITLE}
|
||||
</if>
|
||||
<if test="pd.REPLYSTATUS != null and pd.REPLYSTATUS != ''"><!-- 关键词检索-回复情况 -->
|
||||
and f.REPLYSTATUS = #{pd.REPLYSTATUS}
|
||||
</if>
|
||||
<if test="pd.SIGNEDSTATUS != null and pd.SIGNEDSTATUS != ''"><!-- 关键词检索-签收情况 -->
|
||||
and f.SIGNEDSTATUS = #{pd.SIGNEDSTATUS}
|
||||
</if>
|
||||
<if test="pd.PRACTITIONERTYPE != null and pd.PRACTITIONERTYPE != ''"><!-- 关键词检索-从业类型 -->
|
||||
and f.PRACTITIONERTYPE = #{pd.PRACTITIONERTYPE}
|
||||
</if>
|
||||
<if test="pd.PRACTITIONER != null and pd.PRACTITIONER != ''"><!-- 关键词检索-从业人员 -->
|
||||
and f.PRACTITIONER = #{pd.PRACTITIONER}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="findById" resultType="com.zcloud.entity.PageData" parameterType="com.zcloud.entity.PageData">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.NOTIFICATION_ID = #{NOTIFICATION_ID}
|
||||
</select>
|
||||
|
||||
<select id="getAllNotifications" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>,
|
||||
d.NAME as practitionerTypeName
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join <include refid="dicTableName"></include> d on f.PRACTITIONERTYPE = d.DICTIONARIES_ID
|
||||
where f.ISDELETE = '0'
|
||||
<if test="PERSON != null and PERSON != ''"><!-- 关键词检索-从业人员 -->
|
||||
and f.PERSON = #{PERSON}
|
||||
</if>
|
||||
<if test="PRACTITIONERTYPE != null and PRACTITIONERTYPE != ''"><!-- 关键词检索-从业类型 -->
|
||||
and f.PRACTITIONERTYPE = #{PRACTITIONERTYPE}
|
||||
</if>
|
||||
<if test="REPLYSTATUS != null and REPLYSTATUS != ''"><!-- 关键词检索-回复情况 -->
|
||||
and f.REPLYSTATUS = #{REPLYSTATUS}
|
||||
</if>
|
||||
<if test="SIGNEDSTATUS != null and SIGNEDSTATUS != ''"><!-- 关键词检索-签收情况 -->
|
||||
and f.SIGNEDSTATUS = #{SIGNEDSTATUS}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,118 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.datasource.comprehensive.SecurityReadDetailMapper">
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
BUS_TRAFFIC_READ_DETAIL
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.NOTIFICATION_ID,
|
||||
f.TITLE,
|
||||
f.LEVEL,
|
||||
f.REPLYSTATUS,
|
||||
f.SIGNEDSTATUS,
|
||||
f.PERSON,
|
||||
f.REPLYDATE,
|
||||
f.REPLYCONTENT,
|
||||
f.SIGNEDDATE,
|
||||
f.ISDELETE,
|
||||
f.DELETOR,
|
||||
f.DELETORNAME,
|
||||
f.DELETETIME,
|
||||
f.CREATOR,
|
||||
f.CREATORNAME,
|
||||
f.CREATETIME,
|
||||
f.OPERATOR,
|
||||
f.OPERATORNAME,
|
||||
f.OPERATTIME,
|
||||
f.PRACTITIONERTYPE,
|
||||
f.TRANSPORTATIONCOMPANY
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
NOTIFICATION_ID,
|
||||
TITLE,
|
||||
LEVEL,
|
||||
REPLYSTATUS,
|
||||
PERSON,
|
||||
SIGNEDDATE,
|
||||
REPLYDATE,
|
||||
REPLYCONTENT,
|
||||
ISDELETE,
|
||||
DELETOR,
|
||||
DELETORNAME,
|
||||
DELETETIME,
|
||||
CREATOR,
|
||||
CREATORNAME,
|
||||
CREATETIME,
|
||||
OPERATOR,
|
||||
OPERATORNAME,
|
||||
OPERATTIME,
|
||||
PRACTITIONERTYPE,
|
||||
SIGNEDSTATUS
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{NOTIFICATION_ID},
|
||||
#{TITLE},
|
||||
#{LEVEL},
|
||||
#{REPLYSTATUS},
|
||||
#{PERSON},
|
||||
#{SIGNEDDATE},
|
||||
#{REPLYDATE},
|
||||
#{REPLYCONTENT},
|
||||
#{ISDELETE},
|
||||
#{DELETOR},
|
||||
#{DELETORNAME},
|
||||
#{DELETETIME},
|
||||
#{CREATOR},
|
||||
#{CREATORNAME},
|
||||
#{CREATETIME},
|
||||
#{OPERATOR},
|
||||
#{OPERATORNAME},
|
||||
#{OPERATTIME},
|
||||
#{PRACTITIONERTYPE},
|
||||
#{SIGNEDSTATUS}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>,
|
||||
d.NAME as practitionerTypeName
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join <include refid="dicTableName"></include> d on f.PRACTITIONERTYPE = d.DICTIONARIES_ID
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.PERSON != null and pd.PERSON != ''"><!-- 关键词检索-从业人员 -->
|
||||
and f.PERSON = #{pd.PERSON}
|
||||
</if>
|
||||
<if test="pd.PRACTITIONERTYPE != null and pd.PRACTITIONERTYPE != ''"><!-- 关键词检索-从业类型 -->
|
||||
and f.PRACTITIONERTYPE = #{pd.PRACTITIONERTYPE}
|
||||
</if>
|
||||
<if test="pd.REPLYSTATUS != null and pd.REPLYSTATUS != ''"><!-- 关键词检索-回复情况 -->
|
||||
and f.REPLYSTATUS = #{pd.REPLYSTATUS}
|
||||
</if>
|
||||
<if test="pd.SIGNEDSTATUS != null and pd.SIGNEDSTATUS != ''"><!-- 关键词检索-签收情况 -->
|
||||
and f.SIGNEDSTATUS = #{pd.SIGNEDSTATUS}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
|
@ -1,131 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zcloud.mapper.dsno2.mq.MqErrorMessageLogMapper">
|
||||
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
MQ_MESSAGE_ERROR_LOG
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.MESSAGE_LOG_ID,
|
||||
f.ERROR_MESSAGE,
|
||||
f.TIME,
|
||||
f.TYPE,
|
||||
f.SOURCE,
|
||||
f.MESSAGE_ERROR_LOG_ID
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
MESSAGE_LOG_ID,
|
||||
ERROR_MESSAGE,
|
||||
TIME,
|
||||
TYPE,
|
||||
SOURCE,
|
||||
MESSAGE_ERROR_LOG_ID
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{MESSAGE_LOG_ID},
|
||||
#{ERROR_MESSAGE},
|
||||
#{TIME},
|
||||
#{TYPE},
|
||||
#{SOURCE},
|
||||
#{MESSAGE_ERROR_LOG_ID}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
MESSAGE_ERROR_LOG_ID = #{MESSAGE_ERROR_LOG_ID}
|
||||
</delete>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
MESSAGE_LOG_ID = #{MESSAGE_LOG_ID},
|
||||
ERROR_MESSAGE = #{ERROR_MESSAGE},
|
||||
TIME = #{TIME},
|
||||
TYPE = #{TYPE},
|
||||
SOURCE = #{SOURCE},
|
||||
MESSAGE_ERROR_LOG_ID = MESSAGE_ERROR_LOG_ID
|
||||
where
|
||||
MESSAGE_ERROR_LOG_ID = #{MESSAGE_ERROR_LOG_ID}
|
||||
</update>
|
||||
|
||||
<!-- 通过ID获取数据 -->
|
||||
<select id="findById" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where
|
||||
f.MESSAGE_ERROR_LOG_ID = #{MESSAGE_ERROR_LOG_ID}
|
||||
</select>
|
||||
|
||||
<!-- 列表 -->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''"><!-- 关键词检索 -->
|
||||
and
|
||||
(
|
||||
<!-- 根据需求自己加检索条件
|
||||
字段1 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
or
|
||||
字段2 LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
|
||||
-->
|
||||
)
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 列表(全部) -->
|
||||
<select id="listAll" parameterType="pd" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
</select>
|
||||
|
||||
<!-- 批量删除 -->
|
||||
<delete id="deleteAll" parameterType="String">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1'
|
||||
where
|
||||
MESSAGE_ERROR_LOG_ID in
|
||||
<foreach item="item" index="index" collection="ArrayDATA_IDS" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue