forked from integrated_whb/integrated_whb
安全例会模块优化
parent
14e7e11f2a
commit
8316b09a48
|
@ -0,0 +1,141 @@
|
|||
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.TrafficSafetyMeetingRecipienService;
|
||||
import com.zcloud.service.comprehensive.TrafficSafetyMeetingService;
|
||||
import com.zcloud.util.*;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
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.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/app/safetymeeting")
|
||||
public class AppTrafficSafetyMeetingController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private TrafficSafetyMeetingService trafficSafetyMeetingService;
|
||||
@Autowired
|
||||
private TrafficSafetyMeetingRecipienService meetingRecipienService;
|
||||
@Autowired
|
||||
private Smb smb;
|
||||
//列表
|
||||
@RequestMapping(value = "/listForSafetyMeeting")
|
||||
@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 MEETING_TITLE = pd.getString("MEETING_TITLE"); // 关键词检索条件
|
||||
if (Tools.notEmpty(MEETING_TITLE))
|
||||
pd.put("MEETING_TITLE", MEETING_TITLE.trim());
|
||||
|
||||
String MEETING_TYPE = pd.getString("MEETING_TYPE"); // 关键词检索条件
|
||||
if (Tools.notEmpty(MEETING_TYPE))
|
||||
pd.put("MEETING_TYPE", MEETING_TYPE.trim());
|
||||
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = trafficSafetyMeetingService.listForSafetyMeeting(page);
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**删除
|
||||
* @param
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/delete")
|
||||
@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()));//删除时间
|
||||
trafficSafetyMeetingService.delete(pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
//详情
|
||||
@RequestMapping(value="/goEdit")
|
||||
@ResponseBody
|
||||
public Object goEdit() throws Exception {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
pd = trafficSafetyMeetingService.findById(pd); // 根据ID读取
|
||||
if (pd == null) {
|
||||
map.put("pd", pd); // 这里pd是null
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
List<PageData> varList = trafficSafetyMeetingService.listForSafetyMeetingRecipient(pd);
|
||||
int realPersonNum = 0;
|
||||
for (PageData pageData : varList) {
|
||||
if ("1".equals(pageData.getString("ATTENDANCE_STATUS"))) {
|
||||
realPersonNum++;
|
||||
}
|
||||
}
|
||||
pd.put("totalPersonNum", varList.size());
|
||||
pd.put("realPersonNum", realPersonNum);
|
||||
pd.put("recipientsList", varList);
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
//修改
|
||||
@RequestMapping(value = "/edit")
|
||||
@ResponseBody
|
||||
public Object edit(@RequestParam(value="FFILE",required=false) MultipartFile file) 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("OPERATORNAME", Jurisdiction.getName()); // 修改人姓名
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||
pd.put("TRANSPORTATIONCOMPANY", Jurisdiction.getCORPINFO_ID()); // 经营企业
|
||||
String ffile = DateUtil.getDays();
|
||||
|
||||
if (file != null && StringUtils.isNotBlank(pd.getString("OPERATORNAME"))){
|
||||
pd.put("COMPLETIONSTATUS", "1");
|
||||
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("TRANSPORTATIONCOMPANY") + "/" + ffile);
|
||||
pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("TRANSPORTATIONCOMPANY") + "/" + ffile + "/" + fileName);
|
||||
pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME"));
|
||||
pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date()));
|
||||
}
|
||||
|
||||
meetingRecipienService.edit(pd);
|
||||
|
||||
map.put("result", errInfo);
|
||||
map.put("pd", pd);
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
|
@ -29,13 +29,13 @@ public class TrafficSafetyMeetingController extends BaseController {
|
|||
|
||||
@RequestMapping(value = "/add")
|
||||
@ResponseBody
|
||||
public Object add(@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception {
|
||||
public Object add(@RequestParam(value="FFILE",required=false) MultipartFile file,@RequestParam(value="VVIDEO",required=false) MultipartFile videoFile) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
|
||||
String safety_meeting_id = this.get32UUID();
|
||||
|
||||
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 创建人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); // 创建人姓名
|
||||
pd.put("SAFETY_MEETING_ID", safety_meeting_id); // 主键
|
||||
|
@ -48,18 +48,33 @@ public class TrafficSafetyMeetingController extends BaseController {
|
|||
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) && !"mp4".equals(suffixName)) {
|
||||
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("CONFIRM_MESSAGE_SIGN_ROUTE", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
|
||||
pd.put("CONFIRM_MESSAGE",pd.getString("CREATORNAME"));
|
||||
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("TRANSPORTATIONCOMPANY") + "/" + ffile);
|
||||
pd.put("CONFIRM_MESSAGE_SIGN_ROUTE", Const.FILEPATHFILE + pd.getString("TRANSPORTATIONCOMPANY") + "/" + 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("TRANSPORTATIONCOMPANY") + "/" + ffile);
|
||||
pd.put("VIDEO_SIGN_ROUTE", Const.FILEPATHFILE + pd.getString("TRANSPORTATIONCOMPANY") + "/" + ffile + "/" + videoFileName);
|
||||
pd.put("VIDEO_NAME",pd.getString("CREATORNAME"));
|
||||
}
|
||||
String meetingDate = pd.getString("MEETING_DATE");
|
||||
String[] dates = meetingDate.split(",");
|
||||
if (dates.length == 2){
|
||||
|
@ -67,6 +82,19 @@ public class TrafficSafetyMeetingController extends BaseController {
|
|||
pd.put("MEETING_DATE_END", dates[1].trim());
|
||||
}
|
||||
trafficSafetyMeetingService.save(pd);
|
||||
|
||||
String[] personIds = pd.getString("PERSON_ID").split(",");
|
||||
for (String personId : personIds) {
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 创建人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); // 创建人姓名
|
||||
pd.put("CREATETIME", DateUtil.date2Str(new Date())); // 添加时间
|
||||
pd.put("SAFETY_MEETING_ID", safety_meeting_id);
|
||||
pd.put("PRACTITIONER", personId.trim());
|
||||
pd.put("PERSON_ID", personId.trim());
|
||||
pd.put("SAFETY_MEETING_RECIPIENT_ID", this.get32UUID()); // 主键
|
||||
pd.put("ATTENDANCE_STATUS", "0"); // 参会状态
|
||||
trafficSafetyMeasureetingRecipienService.save(pd);
|
||||
}
|
||||
map.put("result", errInfo);
|
||||
map.put("pd", pd);
|
||||
return map;
|
||||
|
@ -194,8 +222,8 @@ public class TrafficSafetyMeetingController extends BaseController {
|
|||
if (Tools.notEmpty(REPLYSTATUS))
|
||||
pd.put("REPLYSTATUS", REPLYSTATUS.trim());
|
||||
page.setPd(pd);
|
||||
List<PageData> notifications = trafficSafetyMeasureetingRecipienService.getAllRecipient(page);
|
||||
map.put("varList", notifications);
|
||||
List<PageData> varList = trafficSafetyMeasureetingRecipienService.getAllRecipient(page);
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
|
|
|
@ -31,7 +31,7 @@ public class TrafficSecurityCustomerManagementController extends BaseController
|
|||
//新增
|
||||
@RequestMapping(value = "/add")
|
||||
@ResponseBody
|
||||
public Object add(@RequestParam(value="fileList",required=false) MultipartFile file, @RequestParam(value="videoList",required=false) MultipartFile videoFile) throws Exception {
|
||||
public Object add() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
|
|
|
@ -0,0 +1,143 @@
|
|||
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.TrafficSecurityManagementStaffingService;
|
||||
import com.zcloud.util.*;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
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.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/staffing")
|
||||
public class TrafficSecurityManagementStaffingController extends BaseController {
|
||||
@Autowired
|
||||
private TrafficSecurityManagementStaffingService securityManagementStaffingService;
|
||||
@Autowired
|
||||
private Smb smb;
|
||||
//新增
|
||||
@RequestMapping(value = "/add")
|
||||
@ResponseBody
|
||||
public Object add(@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
String staffingId = this.get32UUID();
|
||||
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 创建人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); // 创建人姓名
|
||||
pd.put("OPERATINGCOMPANY", Jurisdiction.getCORPINFO_ID()); // 经营企业
|
||||
pd.put("STAFFING_ID", staffingId); // 主键
|
||||
pd.put("CREATETIME", DateUtil.date2Str(new Date())); // 添加时间
|
||||
pd.put("COMPLETIONSTATUS", "0");
|
||||
pd.put("ISDELETE", "0");
|
||||
|
||||
if (DateUtil.compareDate(DateUtil.getDay(), pd.getString("EXPIRYDATE"))) {
|
||||
pd.put("VALIDSTATUS", "0");
|
||||
} else {
|
||||
pd.put("VALIDSTATUS", "1");
|
||||
}
|
||||
String ffile = DateUtil.getDays();
|
||||
|
||||
if (file != null && StringUtils.isNotBlank(pd.getString("CREATORNAME"))){
|
||||
pd.put("COMPLETIONSTATUS", "1");
|
||||
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("OPERATINGCOMPANY") + "/" + ffile);
|
||||
pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile + "/" + fileName);
|
||||
pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME"));
|
||||
pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date()));
|
||||
}
|
||||
|
||||
securityManagementStaffingService.save(pd);
|
||||
|
||||
map.put("result", errInfo);
|
||||
map.put("pd", pd);
|
||||
return map;
|
||||
}
|
||||
|
||||
//修改
|
||||
@RequestMapping(value = "/edit")
|
||||
@ResponseBody
|
||||
public Object edit(@RequestParam(value="FFILE",required=false) MultipartFile file) 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("OPERATORNAME", Jurisdiction.getName()); // 修改人姓名
|
||||
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
|
||||
pd.put("OPERATINGCOMPANY", Jurisdiction.getCORPINFO_ID()); // 经营企业
|
||||
String ffile = DateUtil.getDays();
|
||||
|
||||
if (file != null && StringUtils.isNotBlank(pd.getString("OPERATORNAME"))){
|
||||
pd.put("COMPLETIONSTATUS", "1");
|
||||
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("OPERATINGCOMPANY") + "/" + ffile);
|
||||
pd.put("ATTACHMENT_ROUTE", Const.FILEPATHFILE + pd.getString("OPERATINGCOMPANY") + "/" + ffile + "/" + fileName);
|
||||
pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME"));
|
||||
pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date()));
|
||||
}
|
||||
|
||||
securityManagementStaffingService.edit(pd);
|
||||
|
||||
map.put("result", errInfo);
|
||||
map.put("pd", pd);
|
||||
return map;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/listForSecurityStaffing")
|
||||
@ResponseBody
|
||||
public Object listForSecurityWaybillRegistra(Page page) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
String SYSTEMNAME = pd.getString("SYSTEMNAME"); // 关键词检索条件
|
||||
if (Tools.notEmpty(SYSTEMNAME))
|
||||
pd.put("SYSTEMNAME", SYSTEMNAME.trim());
|
||||
|
||||
String COMPLETIONSTATUS = pd.getString("COMPLETIONSTATUS"); // 关键词检索条件
|
||||
if (Tools.notEmpty(COMPLETIONSTATUS))
|
||||
pd.put("COMPLETIONSTATUS", COMPLETIONSTATUS.trim());
|
||||
|
||||
String VALIDSTATUS = pd.getString("VALIDSTATUS"); // 关键词检索条件
|
||||
if (Tools.notEmpty(VALIDSTATUS))
|
||||
pd.put("VALIDSTATUS", VALIDSTATUS.trim());
|
||||
|
||||
String OPERATIONTYPE = pd.getString("OPERATIONTYPE"); // 关键词检索条件
|
||||
if (Tools.notEmpty(OPERATIONTYPE))
|
||||
pd.put("OPERATIONTYPE", OPERATIONTYPE.trim());
|
||||
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = securityManagementStaffingService.listForSecurityStaffing(page);
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
}
|
|
@ -46,6 +46,7 @@ public class TrafficSecurityPractitionerManagementController extends BaseControl
|
|||
|
||||
pd.put("EMPLOYEESDETAILS_ID", employeesdetails_id);
|
||||
|
||||
|
||||
detailsService.save(pd);
|
||||
|
||||
map.put("result", errInfo);
|
||||
|
|
|
@ -29,4 +29,5 @@ public interface TrafficSafetyMeetingMapper {
|
|||
|
||||
|
||||
void save(PageData pd);
|
||||
|
||||
}
|
||||
|
|
|
@ -21,4 +21,8 @@ public interface TrafficSafetyMeetingRecipientMapper {
|
|||
* @return
|
||||
*/
|
||||
List<PageData> listForSafetyMeetingRecipient(PageData pd);
|
||||
|
||||
void edit(PageData pd);
|
||||
|
||||
void save(PageData pd);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
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 TrafficSecurityManagementStaffingMapper {
|
||||
void save(PageData pd);
|
||||
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
void edit(PageData pd);
|
||||
}
|
|
@ -7,4 +7,8 @@ import java.util.List;
|
|||
|
||||
public interface TrafficSafetyMeetingRecipienService {
|
||||
List<PageData> getAllRecipient(Page page);
|
||||
|
||||
void edit(PageData pd);
|
||||
|
||||
void save(PageData pd);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
package com.zcloud.service.comprehensive;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TrafficSecurityManagementStaffingService {
|
||||
void save(PageData pd);
|
||||
|
||||
List<PageData> listForSecurityStaffing(Page page);
|
||||
|
||||
void edit(PageData pd);
|
||||
|
||||
}
|
|
@ -18,4 +18,14 @@ public class TrafficSafetyMeetingRecipienServiceImpl implements TrafficSafetyMee
|
|||
public List<PageData> getAllRecipient(Page page) {
|
||||
return trafficSafetyMeetingRecordMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(PageData pd) {
|
||||
trafficSafetyMeetingRecordMapper.edit(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save(PageData pd) {
|
||||
trafficSafetyMeetingRecordMapper.save(pd);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,4 +53,5 @@ public class TrafficSafetyMeetingServiceImpl implements TrafficSafetyMeetingServ
|
|||
public void save(PageData pd) {
|
||||
trafficSafetyMeetingMapper.save(pd);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
package com.zcloud.service.comprehensive.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.comprehensive.TrafficSecurityManagementStaffingMapper;
|
||||
import com.zcloud.service.comprehensive.TrafficSecurityManagementStaffingService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class TrafficSecurityManagementStaffingServiceImpl implements TrafficSecurityManagementStaffingService {
|
||||
|
||||
@Autowired
|
||||
private TrafficSecurityManagementStaffingMapper securityManagementStaffingMapper;
|
||||
@Override
|
||||
public void save(PageData pd) {
|
||||
securityManagementStaffingMapper.save(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listForSecurityStaffing(Page page) {
|
||||
return securityManagementStaffingMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(PageData pd) {
|
||||
securityManagementStaffingMapper.edit(pd);
|
||||
}
|
||||
}
|
|
@ -18,7 +18,6 @@
|
|||
f.MEETING_TITLE,
|
||||
f.MEETING_TYPE,
|
||||
f.MEETING_DATE_START,
|
||||
f.MEETING_DATE_END,
|
||||
f.MEETING_ADDRESS,
|
||||
f.HOST_PERSON,
|
||||
f.MEETING_PERSONS,
|
||||
|
@ -36,10 +35,14 @@
|
|||
f.OPERATORNAME,
|
||||
f.OPERATTIME,
|
||||
f.TRANSPORTATIONCOMPANY,
|
||||
f.RECORDER,
|
||||
f.MEETING_STATUS,
|
||||
f.MEETING_DATE_END,
|
||||
f.PRACTITIONER_TYPE,
|
||||
f.CONFIRM_MESSAGE_SIGN_ROUTE,
|
||||
f.RECORDER
|
||||
f.VIDEO_SIGN_ROUTE,
|
||||
f.LIVEPHOTOS,
|
||||
f.SIGNATUREPHOTOS
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
|
@ -48,7 +51,6 @@
|
|||
MEETING_TITLE,
|
||||
MEETING_TYPE,
|
||||
MEETING_DATE_START,
|
||||
MEETING_DATE_END,
|
||||
MEETING_ADDRESS,
|
||||
HOST_PERSON,
|
||||
MEETING_PERSONS,
|
||||
|
@ -66,10 +68,14 @@
|
|||
OPERATORNAME,
|
||||
OPERATTIME,
|
||||
TRANSPORTATIONCOMPANY,
|
||||
RECORDER,
|
||||
MEETING_STATUS,
|
||||
MEETING_DATE_END,
|
||||
PRACTITIONER_TYPE,
|
||||
CONFIRM_MESSAGE_SIGN_ROUTE,
|
||||
RECORDER
|
||||
VIDEO_SIGN_ROUTE,
|
||||
LIVEPHOTOS,
|
||||
SIGNATUREPHOTOS
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
|
@ -78,7 +84,6 @@
|
|||
#{MEETING_TITLE},
|
||||
#{MEETING_TYPE},
|
||||
#{MEETING_DATE_START},
|
||||
#{MEETING_DATE_END},
|
||||
#{MEETING_ADDRESS},
|
||||
#{HOST_PERSON},
|
||||
#{MEETING_PERSONS},
|
||||
|
@ -96,11 +101,16 @@
|
|||
#{OPERATORNAME},
|
||||
#{OPERATTIME},
|
||||
#{TRANSPORTATIONCOMPANY},
|
||||
#{RECORDER},
|
||||
#{MEETING_STATUS},
|
||||
#{MEETING_DATE_END},
|
||||
#{PRACTITIONER_TYPE},
|
||||
#{CONFIRM_MESSAGE_SIGN_ROUTE},
|
||||
#{RECORDER}
|
||||
#{VIDEO_SIGN_ROUTE},
|
||||
#{LIVEPHOTOS},
|
||||
#{SIGNATUREPHOTOS}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
|
@ -127,9 +137,11 @@
|
|||
<!--列表-->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
f.*,
|
||||
i.CORP_NAME
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join bus_corp_info i on f.TRANSPORTATIONCOMPANY = i.CORPINFO_ID
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.MEETING_TITLE != null and pd.MEETING_TITLE != ''"><!-- 关键词检索-会议标题 -->
|
||||
and f.MEETING_TITLE = #{pd.MEETING_TITLE}
|
||||
|
@ -139,30 +151,15 @@
|
|||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="findById" resultType="com.zcloud.entity.PageData" parameterType="com.zcloud.entity.PageData">
|
||||
select
|
||||
<include refid="Field"></include>,
|
||||
GROUP_CONCAT(
|
||||
CONCAT_WS(',',
|
||||
r.PRACTITIONER,
|
||||
r.CONTACT_PHONE,
|
||||
r.HOME_ADDRESS,
|
||||
r.AVATAR,
|
||||
r.SIGNATUREPICTURE -- 移除了这里的逗号
|
||||
)
|
||||
SEPARATOR ';'
|
||||
) as recipientsInfo
|
||||
f.*,
|
||||
i.CORP_NAME
|
||||
from
|
||||
<include refid="tableName"/> f
|
||||
left join bus_traffic_safety_meeting_recipient r on f.SAFETY_MEETING_ID = r.SAFETY_MEETING_ID
|
||||
where f.SAFETY_MEETING_ID = #{SAFETY_MEETING_ID}
|
||||
and r.ATTENDANCE_STATUS = '1'
|
||||
group by f.SAFETY_MEETING_ID
|
||||
<include refid="tableName"></include> f
|
||||
left join bus_corp_info i on f.TRANSPORTATIONCOMPANY = i.CORPINFO_ID
|
||||
where
|
||||
f.SAFETY_MEETING_ID = #{SAFETY_MEETING_ID}
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -15,44 +15,78 @@
|
|||
<sql id="Field">
|
||||
f.SAFETY_MEETING_RECIPIENT_ID,
|
||||
f.SAFETY_MEETING_ID,
|
||||
f.AVATAR,
|
||||
f.PRACTITIONER,
|
||||
f.PRACTITIONER_TYPE,
|
||||
f.CONTACT_PHONE,
|
||||
f.ATTENDANCE_STATUS,
|
||||
f.HOME_ADDRESS,
|
||||
f.IDENTITY_NUMBER,
|
||||
f.ISDELETE,
|
||||
f.DELETOR,
|
||||
f.DELETORNAME,
|
||||
f.DELETETIME,
|
||||
f.CREATOR,
|
||||
f.CREATORNAME,
|
||||
f.CREATETIME,
|
||||
f.OPERATOR,
|
||||
f.OPERATORNAME,
|
||||
f.OPERATTIME,
|
||||
f.SIGNATUREPICTURE,
|
||||
f.AVATAR,
|
||||
f.IDENTITY_NUMBER
|
||||
f.LIVEPHOTOS
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
SAFETY_MEETING_RECIPIENT_ID,
|
||||
SAFETY_MEETING_ID,
|
||||
AVATAR,
|
||||
PRACTITIONER,
|
||||
PRACTITIONER_TYPE,
|
||||
CONTACT_PHONE,
|
||||
ATTENDANCE_STATUS,
|
||||
HOME_ADDRESS,
|
||||
IDENTITY_NUMBER,
|
||||
ISDELETE,
|
||||
DELETOR,
|
||||
DELETORNAME,
|
||||
DELETETIME,
|
||||
CREATOR,
|
||||
CREATORNAME,
|
||||
CREATETIME,
|
||||
OPERATOR,
|
||||
OPERATORNAME,
|
||||
OPERATTIME,
|
||||
SIGNATUREPICTURE,
|
||||
AVATAR,
|
||||
IDENTITY_NUMBER
|
||||
LIVEPHOTOS
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{SAFETY_MEETING_RECIPIENT_ID},
|
||||
#{SAFETY_MEETING_ID},
|
||||
#{AVATAR},
|
||||
#{PRACTITIONER},
|
||||
#{PRACTITIONER_TYPE},
|
||||
#{CONTACT_PHONE},
|
||||
#{ATTENDANCE_STATUS},
|
||||
#{HOME_ADDRESS},
|
||||
#{IDENTITY_NUMBER},
|
||||
#{ISDELETE},
|
||||
#{DELETOR},
|
||||
#{DELETORNAME},
|
||||
#{DELETETIME},
|
||||
#{CREATOR},
|
||||
#{CREATORNAME},
|
||||
#{CREATETIME},
|
||||
#{OPERATOR},
|
||||
#{OPERATORNAME},
|
||||
#{OPERATTIME},
|
||||
#{SIGNATUREPICTURE},
|
||||
#{AVATAR},
|
||||
#{IDENTITY_NUMBER}
|
||||
#{LIVEPHOTOS}
|
||||
</sql>
|
||||
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
|
@ -64,32 +98,41 @@
|
|||
)
|
||||
</insert>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
OPERATOR = #{OPERATOR},
|
||||
OPERATORNAME = #{OPERATORNAME},
|
||||
OPERATTIME = #{OPERATTIME},
|
||||
SIGNATUREPICTURE = #{SIGNATUREPICTURE},
|
||||
LIVEPHOTOS = #{LIVEPHOTOS},
|
||||
ATTENDANCE_STATUS = #{ATTENDANCE_STATUS}
|
||||
where
|
||||
SAFETY_MEETING_RECIPIENT_ID = #{SAFETY_MEETING_RECIPIENT_ID}
|
||||
</update>
|
||||
|
||||
<!--列表-->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>,
|
||||
d.NAME as practitionerTypeName
|
||||
u.NAME as userName <!-- 添加用户名称字段,别名为userName -->
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join <include refid="dicTableName"></include> d on f.PRACTITIONER_TYPE = d.PARENT_ID
|
||||
join sys_user u on f.PRACTITIONER = u.USER_ID <!-- 关联 sys_user 表 -->
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.SAFETY_MEETING_ID != null and pd.SAFETY_MEETING_ID != ''"><!-- 关键词检索-从业人员 -->
|
||||
and f.SAFETY_MEETING_ID = #{pd.SAFETY_MEETING_ID}
|
||||
</if>
|
||||
<if test="pd.PRACTITIONER != null and pd.PRACTITIONER != ''"><!-- 关键词检索-从业人员 -->
|
||||
and f.PRACTITIONER = #{pd.PRACTITIONER}
|
||||
</if>
|
||||
<if test="pd.PRACTITIONER_TYPE != null and pd.PRACTITIONER_TYPE != ''"><!-- 关键词检索-从业类型 -->
|
||||
and f.PRACTITIONER_TYPE = #{pd.PRACTITIONER_TYPE}
|
||||
</if>
|
||||
<if test="pd.CONTACT_PHONE != null and pd.CONTACT_PHONE != ''"><!-- 关键词检索-联系电话 -->
|
||||
and f.CONTACT_PHONE = #{pd.CONTACT_PHONE}
|
||||
</if>
|
||||
<if test="pd.ATTENDANCE_STATUS != null and pd.ATTENDANCE_STATUS != ''"><!-- 关键词检索-参会状态 -->
|
||||
and f.ATTENDANCE_STATUS = #{pd.ATTENDANCE_STATUS}
|
||||
</if>
|
||||
<if test="pd.IDENTITY_NUMBER != null and pd.IDENTITY_NUMBER != ''"><!-- 关键词检索-身份证号 -->
|
||||
and f.IDENTITY_NUMBER = #{pd.IDENTITY_NUMBER}
|
||||
<if test="pd.SAFETY_MEETING_ID != null and pd.SAFETY_MEETING_ID != ''">
|
||||
and f.SAFETY_MEETING_ID = #{pd.SAFETY_MEETING_ID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
|
|
@ -0,0 +1,126 @@
|
|||
<?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.TrafficSecurityManagementStaffingMapper">
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
BUS_TRAFFIC_MANAGEMENT_STAFFING
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.STAFFING_ID,
|
||||
f.SYSTEMNAME,
|
||||
f.COMPLETIONSTATUS,
|
||||
f.VALIDSTATUS,
|
||||
f.OPERATINGCOMPANY,
|
||||
f.OPERATIONTYPE,
|
||||
f.EXPIRYDATE,
|
||||
f.ATTACHMENT_ROUTE,
|
||||
f.ISDELETE,
|
||||
f.DELETOR,
|
||||
f.DELETORNAME,
|
||||
f.DELETETIME,
|
||||
f.CREATOR,
|
||||
f.CREATORNAME,
|
||||
f.CREATETIME,
|
||||
f.OPERATOR,
|
||||
f.OPERATORNAME,
|
||||
f.OPERATTIME
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
STAFFING_ID,
|
||||
SYSTEMNAME,
|
||||
COMPLETIONSTATUS,
|
||||
VALIDSTATUS,
|
||||
OPERATINGCOMPANY,
|
||||
OPERATIONTYPE,
|
||||
EXPIRYDATE,
|
||||
ATTACHMENT_ROUTE,
|
||||
ISDELETE,
|
||||
DELETOR,
|
||||
DELETORNAME,
|
||||
DELETETIME,
|
||||
CREATOR,
|
||||
CREATORNAME,
|
||||
CREATETIME,
|
||||
OPERATOR,
|
||||
OPERATORNAME,
|
||||
OPERATTIME
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{STAFFING_ID},
|
||||
#{SYSTEMNAME},
|
||||
#{COMPLETIONSTATUS},
|
||||
#{VALIDSTATUS},
|
||||
#{OPERATINGCOMPANY},
|
||||
#{OPERATIONTYPE},
|
||||
#{EXPIRYDATE},
|
||||
#{ATTACHMENT_ROUTE},
|
||||
#{ISDELETE},
|
||||
#{DELETOR},
|
||||
#{DELETORNAME},
|
||||
#{DELETETIME},
|
||||
#{CREATOR},
|
||||
#{CREATORNAME},
|
||||
#{CREATETIME},
|
||||
#{OPERATOR},
|
||||
#{OPERATORNAME},
|
||||
#{OPERATTIME}
|
||||
</sql>
|
||||
|
||||
<!-- 新增-->
|
||||
<insert id="save" parameterType="pd">
|
||||
insert into
|
||||
<include refid="tableName"></include>
|
||||
(
|
||||
<include refid="Field2"></include>
|
||||
) values (
|
||||
<include refid="FieldValue"></include>
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 修改 -->
|
||||
<update id="edit" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
OPERATOR = #{OPERATOR},
|
||||
OPERATORNAME = #{OPERATORNAME},
|
||||
OPERATTIME = #{OPERATTIME},
|
||||
ATTACHMENT_ROUTE=#{ATTACHMENT_ROUTE}
|
||||
where
|
||||
STAFFING_ID = #{STAFFING_ID}
|
||||
</update>
|
||||
|
||||
<!--列表-->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
f.*,
|
||||
i.CORP_NAME
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join bus_corp_info i on f.OPERATINGCOMPANY = i.CORPINFO_ID
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.SYSTEMNAME != null and pd.SYSTEMNAME != ''"><!-- 关键词检索-制度名称 -->
|
||||
and f.SYSTEMNAME = #{pd.SYSTEMNAME}
|
||||
</if>
|
||||
<if test="pd.COMPLETIONSTATUS != null and pd.COMPLETIONSTATUS != ''"><!-- 关键词检索-完成状态 -->
|
||||
and f.COMPLETIONSTATUS = #{pd.COMPLETIONSTATUS}
|
||||
</if>
|
||||
<if test="pd.VALIDSTATUS != null and pd.VALIDSTATUS != ''"><!-- 关键词检索-有效状态 -->
|
||||
and f.VALIDSTATUS = #{pd.VALIDSTATUS}
|
||||
</if>
|
||||
<if test="pd.OPERATIONTYPE != null and pd.OPERATIONTYPE != ''"><!-- 关键词检索-经营类型 -->
|
||||
and f.OPERATIONTYPE = #{pd.OPERATIONTYPE}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -128,9 +128,11 @@
|
|||
<!--列表-->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
<include refid="Field"></include>
|
||||
f.*,
|
||||
i.CORP_NAME
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join bus_corp_info i on f.TRANSPORTATIONCOMPANY = i.CORPINFO_ID
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.TITLE != null and pd.TITLE != ''"><!-- 关键词检索-通知标题 -->
|
||||
and f.TITLE = #{pd.TITLE}
|
||||
|
|
Loading…
Reference in New Issue