forked from integrated_whb/integrated_whb
				
			BUG优化
							parent
							
								
									292883e482
								
							
						
					
					
						commit
						9a53d54817
					
				|  | @ -108,7 +108,7 @@ public class AppTrafficSecurityNoticeController extends BaseController { | ||||||
|          * 1.获取关系信息 |          * 1.获取关系信息 | ||||||
|          * 2.根据关系信息找到公告信息 |          * 2.根据关系信息找到公告信息 | ||||||
|          */ |          */ | ||||||
|         pd.put("USER_ID", pd.getString("loginUserId")); | //        pd.put("USER_ID", pd.getString("loginUserId"));
 | ||||||
|         page.setPd(pd); |         page.setPd(pd); | ||||||
|         List<PageData> varList = trafficSecurityReadDetailService.listByUserId(page); |         List<PageData> varList = trafficSecurityReadDetailService.listByUserId(page); | ||||||
|         map.put("varList", varList); |         map.put("varList", varList); | ||||||
|  |  | ||||||
|  | @ -30,6 +30,12 @@ public class TrafficSecurityNoticeController extends BaseController { | ||||||
|     @Autowired |     @Autowired | ||||||
|     private Smb smb; |     private Smb smb; | ||||||
| 
 | 
 | ||||||
|  |     @Autowired | ||||||
|  |     private UsersService usersService; | ||||||
|  | 
 | ||||||
|  |     @Autowired | ||||||
|  |     private TrafficSecurityReadDetailService trafficSecurityReadDetailService; | ||||||
|  | 
 | ||||||
|     //新增
 |     //新增
 | ||||||
|     @RequestMapping(value = "/add") |     @RequestMapping(value = "/add") | ||||||
|     @ResponseBody |     @ResponseBody | ||||||
|  | @ -46,7 +52,7 @@ public class TrafficSecurityNoticeController extends BaseController { | ||||||
|         pd.put("TRANSPORTATIONCOMPANY", Jurisdiction.getCORPINFO_ID()); // 运输企业
 |         pd.put("TRANSPORTATIONCOMPANY", Jurisdiction.getCORPINFO_ID()); // 运输企业
 | ||||||
|         pd.put("NOTIFICATION_ID", notificationId); // 主键
 |         pd.put("NOTIFICATION_ID", notificationId); // 主键
 | ||||||
|         pd.put("CREATETIME", DateUtil.date2Str(new Date())); // 添加时间
 |         pd.put("CREATETIME", DateUtil.date2Str(new Date())); // 添加时间
 | ||||||
|         pd.put("POSTSTATUS", "1"); // 发布状态
 |         pd.put("POSTSTATUS", "0"); // 发布状态
 | ||||||
|         pd.put("SIGNEDSTATUS", "0"); // 签收状态
 |         pd.put("SIGNEDSTATUS", "0"); // 签收状态
 | ||||||
|         pd.put("ISDELETE", "0"); |         pd.put("ISDELETE", "0"); | ||||||
| 
 | 
 | ||||||
|  | @ -85,15 +91,6 @@ public class TrafficSecurityNoticeController extends BaseController { | ||||||
|         pd.put("REPLY", "0"); // 回复情况
 |         pd.put("REPLY", "0"); // 回复情况
 | ||||||
|         securityNoticeService.save(pd); |         securityNoticeService.save(pd); | ||||||
| 
 | 
 | ||||||
|         String[] personIds = pd.getString("PERSON_ID").split(","); |  | ||||||
|         for (String personId : personIds) { |  | ||||||
|             pd.put("NOTIFICATION_ID", notificationId); |  | ||||||
|             pd.put("PERSON_ID", personId.trim()); |  | ||||||
|             pd.put("READDETAIL_ID", this.get32UUID()); // 主键
 |  | ||||||
|             pd.put("REPLYSTATUS", "0"); // 主键
 |  | ||||||
|             pd.put("SIGNEDSTATUS", "0"); // 主键
 |  | ||||||
|             securityReadDetail.save(pd); |  | ||||||
|         } |  | ||||||
|         map.put("result", errInfo); |         map.put("result", errInfo); | ||||||
|         map.put("pd", pd); |         map.put("pd", pd); | ||||||
|         return map; |         return map; | ||||||
|  | @ -187,11 +184,95 @@ public class TrafficSecurityNoticeController extends BaseController { | ||||||
|         PageData pd = new PageData(); |         PageData pd = new PageData(); | ||||||
|         pd = this.getPageData(); |         pd = this.getPageData(); | ||||||
|         pd = securityNoticeService.findById(pd);//根据ID读取
 |         pd = securityNoticeService.findById(pd);//根据ID读取
 | ||||||
|  |         String[] personIds = pd.getString("PERSON_ID").split(","); | ||||||
|  |         List<PageData> names = new ArrayList<>(); | ||||||
|  |         List<PageData> readDetail = new ArrayList<>(); | ||||||
|  |         for (String personId : personIds) { | ||||||
|  |             PageData pageData = new PageData(); | ||||||
|  |             pageData.put("USER_ID",personId); | ||||||
|  |             pageData.put("NOTIFICATION_ID",pd.getString("NOTIFICATION_ID")); | ||||||
|  |             PageData pageData1 = usersService.findById(pageData); | ||||||
|  |             names.add(pageData1); | ||||||
|  |             Page page = new Page(); | ||||||
|  |             page.setPd(pageData); | ||||||
|  |             readDetail = trafficSecurityReadDetailService.listByUserIdOrNoticeId(page); | ||||||
|  |         } | ||||||
|  |         pd.put("readDetail",readDetail); | ||||||
|         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; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     @RequestMapping(value = "/edit") | ||||||
|  |     @ResponseBody | ||||||
|  |     public Object edit( | ||||||
|  |             @RequestParam(value="fileList",required=false) MultipartFile file, | ||||||
|  |             @RequestParam(value="videoList",required=false) MultipartFile videoFile) | ||||||
|  |             throws Exception { | ||||||
|  |         Map<String, Object> map = new HashMap<String, Object>(); | ||||||
|  |         String errInfo = "success"; | ||||||
|  |         PageData pd = this.getPageData(); | ||||||
|  | 
 | ||||||
|  |         pd.put("OPERATOR", Jurisdiction.getUSER_ID()); // 创建人id
 | ||||||
|  |         pd.put("CORPINFO_ID", Jurisdiction.getPOST_ID()); // 创建人id
 | ||||||
|  |         pd.put("OPERATORNAME", Jurisdiction.getName()); // 创建人姓名
 | ||||||
|  |         pd.put("TRANSPORTATIONCOMPANY", Jurisdiction.getCORPINFO_ID()); // 运输企业
 | ||||||
|  |         pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 添加时间
 | ||||||
|  |         pd.put("POSTSTATUS", "0"); // 发布状态
 | ||||||
|  |         pd.put("SIGNEDSTATUS", "0"); // 签收状态
 | ||||||
|  |         pd.put("ISDELETE", "0"); | ||||||
|  | 
 | ||||||
|  |         String ffile = DateUtil.getDays(); | ||||||
|  |         if (file != null && StringUtils.isNotBlank(pd.getString("CREATORNAME"))){ | ||||||
|  |             String suffixName = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1).toLowerCase(); | ||||||
|  |             if (!"pdf".equals(suffixName) && !"jpg".equals(suffixName) && !"jpeg".equals(suffixName) && !"png".equals(suffixName)) { | ||||||
|  |                 errInfo = "fail"; | ||||||
|  |                 map.put("result", errInfo); | ||||||
|  |                 map.put("msg", "文件格式不正确!"); | ||||||
|  |                 return map; | ||||||
|  |             } | ||||||
|  |             String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")); | ||||||
|  |             smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile); | ||||||
|  |             pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); | ||||||
|  |             pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME")); | ||||||
|  |             pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date())); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         // 处理 videoFile
 | ||||||
|  |         if (videoFile != null && StringUtils.isNotBlank(pd.getString("CREATORNAME"))) { | ||||||
|  |             String videoSuffixName = videoFile.getOriginalFilename().substring(videoFile.getOriginalFilename().lastIndexOf(".") + 1).toLowerCase(); | ||||||
|  |             if (!"mp4".equals(videoSuffixName)) { | ||||||
|  |                 errInfo = "fail"; | ||||||
|  |                 map.put("result", errInfo); | ||||||
|  |                 map.put("msg", "视频文件格式不正确!"); | ||||||
|  |                 return map; | ||||||
|  |             } | ||||||
|  |             String videoFileName = this.get32UUID() + videoFile.getOriginalFilename().substring(videoFile.getOriginalFilename().lastIndexOf(".")); | ||||||
|  |             smb.sshSftp(videoFile, videoFileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile); | ||||||
|  |             pd.put("VIDEO_ROUTE", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + videoFileName); | ||||||
|  |             pd.put("VIDEO_NAME",pd.getString("CREATORNAME")); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         pd.put("SIGNING", "0"); // 签收情况
 | ||||||
|  |         pd.put("REPLY", "0"); // 回复情况
 | ||||||
|  |         securityNoticeService.edit(pd); | ||||||
|  | 
 | ||||||
|  |         String[] personIds = pd.getString("PERSON_ID").split(","); | ||||||
|  |         for (String personId : personIds) { | ||||||
|  |             //pd.put("NOTIFICATION_ID", notificationId);
 | ||||||
|  |             pd.put("PERSON_ID", personId.trim()); | ||||||
|  |             pd.put("READDETAIL_ID", this.get32UUID()); // 主键
 | ||||||
|  |             pd.put("REPLYSTATUS", "0"); // 主键
 | ||||||
|  |             pd.put("SIGNEDSTATUS", "0"); // 主键
 | ||||||
|  |             securityReadDetail.save(pd); | ||||||
|  |         } | ||||||
|  |         map.put("result", errInfo); | ||||||
|  |         map.put("pd", pd); | ||||||
|  |         return map; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     /**删除 |     /**删除 | ||||||
|      * @param |      * @param | ||||||
|      * @throws Exception |      * @throws Exception | ||||||
|  | @ -241,4 +322,40 @@ public class TrafficSecurityNoticeController extends BaseController { | ||||||
|         map.put("result", errInfo);//返回结果
 |         map.put("result", errInfo);//返回结果
 | ||||||
|         return map; |         return map; | ||||||
|     } |     } | ||||||
|  | 
 | ||||||
|  |     @RequestMapping(value="/issueSecurityNotice") | ||||||
|  |     @ResponseBody | ||||||
|  |     public Object issueSecurityNotice() throws Exception{ | ||||||
|  |         Map<String,Object> map = new HashMap<String,Object>(); | ||||||
|  |         String errInfo = "success"; | ||||||
|  |         PageData pd = new PageData(); | ||||||
|  |         pd = this.getPageData(); | ||||||
|  |         // 修改安全通知发布状态
 | ||||||
|  |         securityNoticeService.issueSecurityNotice(pd); | ||||||
|  |         // 查询此条通知的信息,获取 推送的ID
 | ||||||
|  |         PageData securityNotice = securityNoticeService.findById(pd); | ||||||
|  |         // 把此条通知的ID 和 推送人的ID 存入到 发部表
 | ||||||
|  |         String[] personIds = securityNotice.getString("PERSON_ID").split(","); | ||||||
|  |         for (int i = 0; i < personIds.length; i++) { | ||||||
|  |             PageData issue = new PageData(); | ||||||
|  |             issue.put("READDETAIL_ID", this.get32UUID()); | ||||||
|  |             issue.put("NOTIFICATION_ID",securityNotice.getString("NOTIFICATION_ID")); | ||||||
|  |             issue.put("TITLE",securityNotice.getString("TITLE")); | ||||||
|  |             issue.put("LEVEL",securityNotice.getString("LEVEL")); | ||||||
|  |             issue.put("REPLY", "0"); | ||||||
|  |             issue.put("SIGNING", "0"); | ||||||
|  |             issue.put("TRANSPORTATIONCOMPANY", securityNotice.getString("TRANSPORTATIONCOMPANY")); | ||||||
|  |             issue.put("PERSON_ID",personIds[i]); | ||||||
|  |             issue.put("PERSON", securityNotice.getString("PERSON_ID")); | ||||||
|  |             issue.put("ISDELETE", "0"); | ||||||
|  |             issue.put("CREATOR", Jurisdiction.getUSER_ID()); | ||||||
|  |             issue.put("CREATORNAME", Jurisdiction.getUsername()); | ||||||
|  |             issue.put("CREATETIME",DateUtil.date2Str(new Date())); | ||||||
|  |             // 编写发布的 insert
 | ||||||
|  |             trafficSecurityReadDetailService.save(issue); | ||||||
|  |         } | ||||||
|  |         map.put("pd", pd); | ||||||
|  |         map.put("result", errInfo); | ||||||
|  |         return map; | ||||||
|  |     } | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -4,6 +4,7 @@ import com.zcloud.controller.base.BaseController; | ||||||
| import com.zcloud.entity.Page; | import com.zcloud.entity.Page; | ||||||
| import com.zcloud.entity.PageData; | import com.zcloud.entity.PageData; | ||||||
| import com.zcloud.service.comprehensive.TrafficSecurityViolationRegistrationService; | import com.zcloud.service.comprehensive.TrafficSecurityViolationRegistrationService; | ||||||
|  | import com.zcloud.service.system.UsersService; | ||||||
| import com.zcloud.util.*; | import com.zcloud.util.*; | ||||||
| import org.apache.commons.lang.StringUtils; | import org.apache.commons.lang.StringUtils; | ||||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||||
|  | @ -23,6 +24,9 @@ import java.util.Map; | ||||||
| public class TrafficSecurityViolationRegistrationController extends BaseController { | public class TrafficSecurityViolationRegistrationController extends BaseController { | ||||||
|     @Autowired |     @Autowired | ||||||
|     private TrafficSecurityViolationRegistrationService violationRegistrationService; |     private TrafficSecurityViolationRegistrationService violationRegistrationService; | ||||||
|  | 
 | ||||||
|  |     @Autowired | ||||||
|  |     private UsersService usersService; | ||||||
|     @Autowired |     @Autowired | ||||||
|     private Smb smb; |     private Smb smb; | ||||||
| 
 | 
 | ||||||
|  | @ -74,8 +78,11 @@ public class TrafficSecurityViolationRegistrationController extends BaseControll | ||||||
|         pd = this.getPageData(); |         pd = this.getPageData(); | ||||||
| 
 | 
 | ||||||
|         String USER_ID = pd.getString("USER_ID"); // 运输企业
 |         String USER_ID = pd.getString("USER_ID"); // 运输企业
 | ||||||
|         if (Tools.notEmpty(USER_ID)) |         if (Tools.notEmpty(USER_ID)){ | ||||||
|  | 
 | ||||||
|             pd.put("USER_ID", USER_ID.trim()); |             pd.put("USER_ID", USER_ID.trim()); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
|         String PENALTYTIME = pd.getString("PENALTYTIME"); // 运输车辆
 |         String PENALTYTIME = pd.getString("PENALTYTIME"); // 运输车辆
 | ||||||
|         if (Tools.notEmpty(PENALTYTIME)) |         if (Tools.notEmpty(PENALTYTIME)) | ||||||
|  |  | ||||||
|  | @ -37,4 +37,8 @@ public interface TrafficSecurityNoticeMapper { | ||||||
|     List<PageData> getAllNotifications(PageData pd); |     List<PageData> getAllNotifications(PageData pd); | ||||||
| 
 | 
 | ||||||
|     int getRedPoint(PageData pd); |     int getRedPoint(PageData pd); | ||||||
|  | 
 | ||||||
|  |     void edit(PageData pd); | ||||||
|  | 
 | ||||||
|  |     void issueSecurityNotice(PageData pd); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -16,4 +16,6 @@ public interface TrafficSecurityReadDetailMapper { | ||||||
|     void edit(PageData pd); |     void edit(PageData pd); | ||||||
| 
 | 
 | ||||||
|     void delete(PageData pd); |     void delete(PageData pd); | ||||||
|  | 
 | ||||||
|  |     List<PageData> listByUserIdOrNoticeId(Page page); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -299,4 +299,6 @@ public interface UsersMapper { | ||||||
| 	PageData getUserByUserId(PageData pd); | 	PageData getUserByUserId(PageData pd); | ||||||
| 
 | 
 | ||||||
| 	List<PageData> getPractitionerSelectList(PageData pd); | 	List<PageData> getPractitionerSelectList(PageData pd); | ||||||
|  | 
 | ||||||
|  |     List<PageData> listUserByIds(String[] personIds); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -22,4 +22,8 @@ public interface TrafficSecurityNoticeService { | ||||||
|     List<PageData> getAllNotifications(PageData pd); |     List<PageData> getAllNotifications(PageData pd); | ||||||
| 
 | 
 | ||||||
|     public int getRedPoint(PageData pd) throws Exception; |     public int getRedPoint(PageData pd) throws Exception; | ||||||
|  | 
 | ||||||
|  |     public void edit(PageData pd); | ||||||
|  | 
 | ||||||
|  |     public void issueSecurityNotice(PageData pd); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -15,4 +15,6 @@ public interface TrafficSecurityReadDetailService { | ||||||
|     void edit(PageData pd); |     void edit(PageData pd); | ||||||
| 
 | 
 | ||||||
|     void delete(PageData pd); |     void delete(PageData pd); | ||||||
|  | 
 | ||||||
|  |     List<PageData> listByUserIdOrNoticeId(Page page); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -49,4 +49,13 @@ public class TrafficSecurityNoticeServiceImpl implements TrafficSecurityNoticeSe | ||||||
|         return securityNoticeMapper.getRedPoint(pd); |         return securityNoticeMapper.getRedPoint(pd); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     @Override | ||||||
|  |     public void edit(PageData pd) { | ||||||
|  |         securityNoticeMapper.edit(pd); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     @Override | ||||||
|  |     public void issueSecurityNotice(PageData pd) { | ||||||
|  |         securityNoticeMapper.issueSecurityNotice(pd); | ||||||
|  |     } | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -38,4 +38,9 @@ public class TrafficSecurityReadDetailImpl implements TrafficSecurityReadDetailS | ||||||
|     public void delete(PageData pd) { |     public void delete(PageData pd) { | ||||||
|         securityReadDetailMapper.delete(pd); |         securityReadDetailMapper.delete(pd); | ||||||
|     } |     } | ||||||
|  | 
 | ||||||
|  |     @Override | ||||||
|  |     public List<PageData> listByUserIdOrNoticeId(Page page) { | ||||||
|  |         return securityReadDetailMapper.listByUserIdOrNoticeId(page); | ||||||
|  |     } | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -373,4 +373,5 @@ public interface UsersService { | ||||||
| 
 | 
 | ||||||
| 	List<PageData> getPractitionerSelectList(PageData pd) throws Exception; | 	List<PageData> getPractitionerSelectList(PageData pd) throws Exception; | ||||||
| 
 | 
 | ||||||
|  |     List<PageData> listUserByIds(String[] personIds); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -1345,5 +1345,8 @@ public class UsersServiceImpl implements UsersService { | ||||||
|         return usersMapper.getPractitionerSelectList(pd); |         return usersMapper.getPractitionerSelectList(pd); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| 
 |     @Override | ||||||
|  |     public List<PageData> listUserByIds(String[] personIds) { | ||||||
|  |         return usersMapper.listUserByIds(personIds); | ||||||
|  |     } | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -125,6 +125,41 @@ | ||||||
| 		NOTIFICATION_ID = #{NOTIFICATION_ID} | 		NOTIFICATION_ID = #{NOTIFICATION_ID} | ||||||
| 	</delete> | 	</delete> | ||||||
| 
 | 
 | ||||||
|  | 	<!-- 修改 --> | ||||||
|  | 	<update id="edit" parameterType="pd"> | ||||||
|  | 		update | ||||||
|  | 		<include refid="tableName"/> f | ||||||
|  | 		set | ||||||
|  | 		NOTIFICATION_ID = #{NOTIFICATION_ID}, | ||||||
|  | 		TITLE = #{TITLE}, | ||||||
|  | 		LEVEL = #{LEVEL}, | ||||||
|  | 		REPLY = #{REPLY}, | ||||||
|  | 		SIGNING = #{SIGNING}, | ||||||
|  | 		TRANSPORTATIONCOMPANY = #{TRANSPORTATIONCOMPANY}, | ||||||
|  | 		PERSON_ID = #{PERSON_ID}, | ||||||
|  | 		PERSON = #{PERSON}, | ||||||
|  | 		NOTIFICATIONCONTENT = #{NOTIFICATIONCONTENT}, | ||||||
|  | 		ISDELETE = #{ISDELETE}, | ||||||
|  | 		DELETOR = #{DELETOR}, | ||||||
|  | 		DELETETIME = #{DELETETIME}, | ||||||
|  | 		CREATOR = #{CREATOR}, | ||||||
|  | 		CREATORNAME = #{CREATORNAME}, | ||||||
|  | 		CREATETIME = #{CREATETIME}, | ||||||
|  | 		OPERATOR = #{OPERATOR}, | ||||||
|  | 		OPERATORNAME = #{OPERATORNAME}, | ||||||
|  | 		OPERATTIME = #{OPERATTIME}, | ||||||
|  | 		REPLYSTATUS = #{REPLYSTATUS}, | ||||||
|  | 		PRACTITIONER = #{PRACTITIONER}, | ||||||
|  | 		PRACTITIONERTYPE = #{PRACTITIONERTYPE}, | ||||||
|  | 		ATTACHMENT_ROUTE = #{ATTACHMENT_ROUTE}, | ||||||
|  | 		ATTACHMENT_NAME = #{ATTACHMENT_NAME}, | ||||||
|  | 		VIDEO_ROUTE = #{VIDEO_ROUTE}, | ||||||
|  | 		VIDEO_NAME = #{VIDEO_NAME}, | ||||||
|  | 		POSTSTATUS = #{POSTSTATUS} | ||||||
|  | 		where | ||||||
|  | 		f.NOTIFICATION_ID = #{NOTIFICATION_ID} | ||||||
|  | 	</update> | ||||||
|  | 
 | ||||||
| 	<!--列表--> | 	<!--列表--> | ||||||
| 	<select id="datalistPage" parameterType="page" resultType="pd"> | 	<select id="datalistPage" parameterType="page" resultType="pd"> | ||||||
| 		select | 		select | ||||||
|  | @ -194,4 +229,14 @@ | ||||||
| 
 | 
 | ||||||
| 	</select> | 	</select> | ||||||
| 
 | 
 | ||||||
|  | 	<!-- 修改发布状态 --> | ||||||
|  | 	<update id="issueSecurityNotice" parameterType="pd"> | ||||||
|  | 		update | ||||||
|  | 		<include refid="tableName"/> f | ||||||
|  | 		set | ||||||
|  | 		POSTSTATUS = '1' | ||||||
|  | 		where | ||||||
|  | 		f.NOTIFICATION_ID = #{NOTIFICATION_ID} | ||||||
|  | 	</update> | ||||||
|  | 
 | ||||||
| </mapper> | </mapper> | ||||||
|  |  | ||||||
|  | @ -192,5 +192,35 @@ | ||||||
|     </update> |     </update> | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  |     <!-- 列表 --> | ||||||
|  |     <select id="listByUserIdOrNoticeId" parameterType="page" resultType="pd"> | ||||||
|  |         SELECT | ||||||
|  |         c.*, | ||||||
|  |         u.NOTIFICATIONCONTENT, | ||||||
|  |         u.VIDEO_ROUTE, | ||||||
|  |         u.ATTACHMENT_ROUTE, | ||||||
|  |         u.REPLYSTATUS, | ||||||
|  |         u.CREATETIME, | ||||||
|  |         su.NAME | ||||||
|  |         FROM | ||||||
|  |         bus_traffic_read_detail c | ||||||
|  |         INNER JOIN bus_traffic_comprehensivemanagement_securitynotice u ON c.NOTIFICATION_ID = u.NOTIFICATION_ID | ||||||
|  |         INNER JOIN sys_user su on c.PERSON_ID = su.USER_ID | ||||||
|  |         WHERE c.PERSON_ID = #{pd.USER_ID} | ||||||
|  |         AND u.ISDELETE = 0 | ||||||
|  |         <if test="pd.NOTIFICATION_ID != null and pd.NOTIFICATION_ID != ''"><!-- 关键词检索-通知标题 --> | ||||||
|  |             and c.NOTIFICATION_ID = #{pd.NOTIFICATION_ID} | ||||||
|  |         </if> | ||||||
|  |         <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> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| </mapper> | </mapper> | ||||||
|  |  | ||||||
|  | @ -139,7 +139,7 @@ | ||||||
|         left join sys_user u on f.USER_ID = u.USER_ID |         left join sys_user u on f.USER_ID = u.USER_ID | ||||||
|         where f.ISDELETE = '0' |         where f.ISDELETE = '0' | ||||||
|         <if test="pd.USER_ID != null and pd.USER_ID != ''"> |         <if test="pd.USER_ID != null and pd.USER_ID != ''"> | ||||||
|             and f.USER_ID = #{pd.USER_ID} |             and u.NAME LIKE CONCAT(CONCAT('%', #{pd.USER_ID}),'%') | ||||||
|         </if> |         </if> | ||||||
|         <if test="pd.PENALTYTIME != null and pd.PENALTYTIME != ''"><!-- 检索-处罚时间 --> |         <if test="pd.PENALTYTIME != null and pd.PENALTYTIME != ''"><!-- 检索-处罚时间 --> | ||||||
|             and f.PENALTYTIME = #{pd.PENALTYTIME} |             and f.PENALTYTIME = #{pd.PENALTYTIME} | ||||||
|  | @ -148,9 +148,11 @@ | ||||||
| 
 | 
 | ||||||
|     <select id="findById" resultType="com.zcloud.entity.PageData" parameterType="com.zcloud.entity.PageData"> |     <select id="findById" resultType="com.zcloud.entity.PageData" parameterType="com.zcloud.entity.PageData"> | ||||||
|         select |         select | ||||||
|         <include refid="Field"></include> |         <include refid="Field"></include>, | ||||||
|  |         u.NAME | ||||||
|         from |         from | ||||||
|         <include refid="tableName"></include> f |         <include refid="tableName"></include> f | ||||||
|  |         left join sys_user u on f.USER_ID = u.USER_ID | ||||||
|         where |         where | ||||||
|         f.REGISTRATION_ID = #{REGISTRATION_ID} |         f.REGISTRATION_ID = #{REGISTRATION_ID} | ||||||
|     </select> |     </select> | ||||||
|  |  | ||||||
|  | @ -1078,11 +1078,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||||||
| 		left join SYS_ROLE r on u.ROLE_ID = r.ROLE_ID | 		left join SYS_ROLE r on u.ROLE_ID = r.ROLE_ID | ||||||
| 		left join OA_DEPARTMENT d on d.DEPARTMENT_ID=u.DEPARTMENT_ID | 		left join OA_DEPARTMENT d on d.DEPARTMENT_ID=u.DEPARTMENT_ID | ||||||
| 		left join SYS_POST p on p.POST_ID=u.POST_ID | 		left join SYS_POST p on p.POST_ID=u.POST_ID | ||||||
| 		where | 		c | ||||||
| 			USER_ID in |  | ||||||
| 		<foreach item="item" index="index" collection="array" open="(" separator="," close=")"> |  | ||||||
|                  #{item} |  | ||||||
| 		</foreach> |  | ||||||
| 		order by  d.LEVEL  asc ,d.DEP_ORDER  asc ,d.DEPARTMENT_ID asc, u.SORT asc,u.LAST_LOGIN desc | 		order by  d.LEVEL  asc ,d.DEP_ORDER  asc ,d.DEPARTMENT_ID asc, u.SORT asc,u.LAST_LOGIN desc | ||||||
| 	</select> | 	</select> | ||||||
| 
 | 
 | ||||||
|  | @ -1867,4 +1863,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||||||
| 		and d.BIANMA LIKE CONCAT(CONCAT('%', #{BIANMA}),'%') | 		and d.BIANMA LIKE CONCAT(CONCAT('%', #{BIANMA}),'%') | ||||||
| 	</select> | 	</select> | ||||||
| 
 | 
 | ||||||
|  | 	<select id="listUserByIds" parameterType="String" resultType="pd" > | ||||||
|  | 		select | ||||||
|  | 		<include refid="Field2"></include> | ||||||
|  | 		from | ||||||
|  | 		<include refid="tableName"></include> f | ||||||
|  | 		where | ||||||
|  | 		USER_ID in | ||||||
|  | 		<foreach item="item" index="index" collection="array" open="(" separator="," close=")"> | ||||||
|  | 			#{item} | ||||||
|  | 		</foreach> | ||||||
|  | 	</select> | ||||||
|  | 
 | ||||||
| </mapper> | </mapper> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue