forked from integrated_whb/integrated_whb
生产安全事故档案模块开发
parent
5b3891263a
commit
2311b8333a
|
@ -157,4 +157,24 @@ public class TrafficSafetyAssessmentController extends BaseController {
|
|||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @return
|
||||
* @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()));//删除时间
|
||||
safetyAssessmentService.delete(pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -156,4 +156,24 @@ public class TrafficSafetyProductionController extends BaseController {
|
|||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @return
|
||||
* @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()));//删除时间
|
||||
safetyProductionService.delete(pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,180 @@
|
|||
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.TrafficSecurityAccidentInvestigationService;
|
||||
import com.zcloud.service.comprehensive.TrafficSecurityViolationRegistrationService;
|
||||
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("/accidentinvestigation")
|
||||
public class TrafficSecurityAccidentInvestigationController extends BaseController {
|
||||
@Autowired
|
||||
private TrafficSecurityAccidentInvestigationService accidentInvestigationService;
|
||||
@Autowired
|
||||
private Smb smb;
|
||||
|
||||
@RequestMapping(value = "/add")
|
||||
@ResponseBody
|
||||
public Object add(@RequestParam(value="FFILEONE",required=false) MultipartFile fileOne,
|
||||
@RequestParam(value="FFILETWO",required=false) MultipartFile fileTwo) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
|
||||
String accidentinvestigation_id = this.get32UUID();
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 创建人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); // 创建人姓名
|
||||
pd.put("ACCIDENTINVESTIGATION_ID", accidentinvestigation_id); // 主键
|
||||
pd.put("INCIDENTNUMBER", this.get32UUID()); // 事故编号
|
||||
pd.put("CERTIFICATIONNUMBER", this.get32UUID()); // 认定书编号
|
||||
pd.put("CREATETIME", DateUtil.date2Str(new Date())); // 添加时间
|
||||
pd.put("DEPARTMENT", Jurisdiction.getCORPINFO_ID()); // 部门
|
||||
pd.put("ISDELETE", "0");
|
||||
|
||||
String ffile = DateUtil.getDays();
|
||||
if (fileOne != null && StringUtils.isNotBlank(pd.getString("CREATORNAME"))){
|
||||
String suffixName = fileOne.getOriginalFilename().substring(fileOne.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() + fileOne.getOriginalFilename().substring(fileOne.getOriginalFilename().lastIndexOf("."));
|
||||
smb.sshSftp(fileOne, fileName, Const.FILEPATHFILE + pd.getString("TRANSPORTATIONCOMPANY") + "/" + ffile);
|
||||
pd.put("ACCIDENTREPORTRECORD", Const.FILEPATHFILE + pd.getString("TRANSPORTATIONCOMPANY") + "/" + ffile + "/" + fileName);
|
||||
pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME"));
|
||||
pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date()));
|
||||
}
|
||||
if (fileTwo != null && StringUtils.isNotBlank(pd.getString("CREATORNAME"))){
|
||||
String suffixName = fileTwo.getOriginalFilename().substring(fileTwo.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() + fileTwo.getOriginalFilename().substring(fileTwo.getOriginalFilename().lastIndexOf("."));
|
||||
smb.sshSftp(fileTwo, fileName, Const.FILEPATHFILE + pd.getString("TRANSPORTATIONCOMPANY") + "/" + ffile);
|
||||
pd.put("ACCIDENTANALYSISRECORD", Const.FILEPATHFILE + pd.getString("TRANSPORTATIONCOMPANY") + "/" + ffile + "/" + fileName);
|
||||
pd.put("ATTACHMENT_NAME",pd.getString("CREATORNAME"));
|
||||
pd.put("CONFIRM_MESSAGE_TIME",DateUtil.date2Str(new Date()));
|
||||
}
|
||||
|
||||
accidentInvestigationService.save(pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("pd", pd);
|
||||
return map;
|
||||
}
|
||||
|
||||
//列表
|
||||
@RequestMapping(value = "/listForAccidentInvestigation")
|
||||
@ResponseBody
|
||||
public Object listForAccidentInvestigation(Page page) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
String USER_ID = pd.getString("USER_ID");
|
||||
if (Tools.notEmpty(USER_ID))
|
||||
pd.put("USER_ID", USER_ID.trim());
|
||||
|
||||
String ACCIDENTDATE = pd.getString("ACCIDENTDATE"); // 运输车辆
|
||||
if (Tools.notEmpty(ACCIDENTDATE))
|
||||
pd.put("ACCIDENTDATE", ACCIDENTDATE.trim());
|
||||
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = accidentInvestigationService.listForAccidentInvestigation(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()));//删除时间
|
||||
accidentInvestigationService.delete(pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看详情
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/goEdit")
|
||||
@ResponseBody
|
||||
public Object goEdit() throws Exception {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
pd = accidentInvestigationService.findById(pd); // 根据ID读取
|
||||
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())); // 修改时间
|
||||
|
||||
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()));
|
||||
}
|
||||
|
||||
accidentInvestigationService.edit(pd);
|
||||
|
||||
map.put("result", errInfo);
|
||||
map.put("pd", pd);
|
||||
return map;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,181 @@
|
|||
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.TrafficSecurityManagementAgreementService;
|
||||
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("/managementagreement")
|
||||
public class TrafficSecurityManagementAgreementController extends BaseController {
|
||||
@Autowired
|
||||
private TrafficSecurityManagementAgreementService managementAgreementService;
|
||||
@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 managementagreementId = this.get32UUID();
|
||||
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 创建人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); // 创建人姓名
|
||||
pd.put("OPERATINGCOMPANY", Jurisdiction.getCORPINFO_ID()); // 经营企业
|
||||
pd.put("MANAGEMENTAGREEMENT_ID", managementagreementId); // 主键
|
||||
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()));
|
||||
}
|
||||
|
||||
managementAgreementService.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()); // 经营企业
|
||||
pd.put("ISDELETE", "0");
|
||||
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()));
|
||||
}
|
||||
|
||||
managementAgreementService.edit(pd);
|
||||
|
||||
map.put("result", errInfo);
|
||||
map.put("pd", pd);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
* @param page
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value = "/listForManagementAgreementlist")
|
||||
@ResponseBody
|
||||
public Object listForManagementAgreementlist(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());
|
||||
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = managementAgreementService.listForManagementAgreementlist(page);
|
||||
map.put("varList", varList);
|
||||
map.put("page", page);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
//详情
|
||||
@RequestMapping(value="/goEdit")
|
||||
@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 = managementAgreementService.findById(pd); //根据ID读取
|
||||
map.put("pd", pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @return
|
||||
* @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()));//删除时间
|
||||
managementAgreementService.delete(pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
}
|
|
@ -160,4 +160,24 @@ public class TrafficSecurityManagementStaffingController extends BaseController
|
|||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @return
|
||||
* @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()));//删除时间
|
||||
securityManagementStaffingService.delete(pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,163 @@
|
|||
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.TrafficSecurityViolationRegistrationService;
|
||||
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("/violationregistration")
|
||||
public class TrafficSecurityViolationRegistrationController extends BaseController {
|
||||
@Autowired
|
||||
private TrafficSecurityViolationRegistrationService violationRegistrationService;
|
||||
@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 registration_id = this.get32UUID();
|
||||
|
||||
pd.put("CREATOR", Jurisdiction.getUSER_ID()); // 创建人id
|
||||
pd.put("CREATORNAME", Jurisdiction.getName()); // 创建人姓名
|
||||
pd.put("REGISTRATION_ID", registration_id); // 主键
|
||||
pd.put("CREATETIME", DateUtil.date2Str(new Date())); // 添加时间
|
||||
pd.put("TRANSPORTATIONCOMPANY", Jurisdiction.getCORPINFO_ID()); // 运输企业
|
||||
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("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()));
|
||||
}
|
||||
|
||||
violationRegistrationService.save(pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("pd", pd);
|
||||
return map;
|
||||
}
|
||||
|
||||
//列表
|
||||
@RequestMapping(value = "/listForViolationRegistration")
|
||||
@ResponseBody
|
||||
public Object listForViolationRegistration(Page page) throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
String USER_ID = pd.getString("USER_ID"); // 运输企业
|
||||
if (Tools.notEmpty(USER_ID))
|
||||
pd.put("USER_ID", USER_ID.trim());
|
||||
|
||||
String PENALTYTIME = pd.getString("PENALTYTIME"); // 运输车辆
|
||||
if (Tools.notEmpty(PENALTYTIME))
|
||||
pd.put("PENALTYTIME", PENALTYTIME.trim());
|
||||
|
||||
page.setPd(pd);
|
||||
List<PageData> varList = violationRegistrationService.listForViolationRegistration(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()));//删除时间
|
||||
violationRegistrationService.delete(pd);
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看详情
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@RequestMapping(value="/goEdit")
|
||||
@ResponseBody
|
||||
public Object goEdit() throws Exception {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
String errInfo = "success";
|
||||
PageData pd = this.getPageData();
|
||||
pd = violationRegistrationService.findById(pd); // 根据ID读取
|
||||
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())); // 修改时间
|
||||
|
||||
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()));
|
||||
}
|
||||
|
||||
violationRegistrationService.edit(pd);
|
||||
|
||||
map.put("result", errInfo);
|
||||
map.put("pd", pd);
|
||||
return map;
|
||||
}
|
||||
}
|
|
@ -15,4 +15,6 @@ public interface TrafficSafetyAssessmentMapper {
|
|||
void edit(PageData pd);
|
||||
|
||||
PageData findById(PageData pd);
|
||||
|
||||
void delete(PageData pd);
|
||||
}
|
||||
|
|
|
@ -15,4 +15,6 @@ public interface TrafficSafetyProductionMapper {
|
|||
void edit(PageData pd);
|
||||
|
||||
PageData findById(PageData pd);
|
||||
|
||||
void delete(PageData pd);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
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 TrafficSecurityAccidentInvestigationMapper {
|
||||
void save(PageData pd);
|
||||
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
void edit(PageData pd);
|
||||
|
||||
PageData findById(PageData pd);
|
||||
|
||||
void delete(PageData pd);
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
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 TrafficSecurityManagementAgreementMapper {
|
||||
void save(PageData pd);
|
||||
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
void edit(PageData pd);
|
||||
|
||||
PageData findById(PageData pd);
|
||||
|
||||
void delete(PageData pd);
|
||||
}
|
|
@ -15,4 +15,6 @@ public interface TrafficSecurityManagementStaffingMapper {
|
|||
void edit(PageData pd);
|
||||
|
||||
PageData findById(PageData pd);
|
||||
|
||||
void delete(PageData pd);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
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 TrafficSecurityViolationRegistrationMapper {
|
||||
void save(PageData pd);
|
||||
|
||||
List<PageData> datalistPage(Page page);
|
||||
|
||||
void edit(PageData pd);
|
||||
|
||||
PageData findById(PageData pd);
|
||||
|
||||
void delete(PageData pd);
|
||||
}
|
|
@ -13,4 +13,6 @@ public interface TrafficSafetyAssessmentService {
|
|||
List<PageData> listForSafetyAssessment(Page page);
|
||||
|
||||
PageData findById(PageData pd);
|
||||
|
||||
void delete(PageData pd);
|
||||
}
|
||||
|
|
|
@ -13,4 +13,6 @@ public interface TrafficSafetyProductionService {
|
|||
List<PageData> listForSafetyProductionlist(Page page);
|
||||
|
||||
PageData findById(PageData pd);
|
||||
|
||||
void delete(PageData pd);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
package com.zcloud.service.comprehensive;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TrafficSecurityAccidentInvestigationService {
|
||||
void save(PageData pd);
|
||||
|
||||
List<PageData> listForAccidentInvestigation(Page page);
|
||||
|
||||
void delete(PageData pd);
|
||||
|
||||
PageData findById(PageData pd);
|
||||
|
||||
void edit(PageData pd);
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package com.zcloud.service.comprehensive;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TrafficSecurityManagementAgreementService {
|
||||
void save(PageData pd);
|
||||
|
||||
void edit(PageData pd);
|
||||
|
||||
List<PageData> listForManagementAgreementlist(Page page);
|
||||
|
||||
PageData findById(PageData pd);
|
||||
|
||||
void delete(PageData pd);
|
||||
}
|
|
@ -13,4 +13,6 @@ public interface TrafficSecurityManagementStaffingService {
|
|||
void edit(PageData pd);
|
||||
|
||||
PageData findById(PageData pd);
|
||||
|
||||
void delete(PageData pd);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
package com.zcloud.service.comprehensive;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TrafficSecurityViolationRegistrationService {
|
||||
void save(PageData pd);
|
||||
|
||||
List<PageData> listForViolationRegistration(Page page);
|
||||
|
||||
void delete(PageData pd);
|
||||
|
||||
PageData findById(PageData pd);
|
||||
|
||||
void edit(PageData pd);
|
||||
|
||||
}
|
|
@ -33,4 +33,9 @@ public class TrafficSafetyAssessmentServiceImpl implements TrafficSafetyAssessme
|
|||
public PageData findById(PageData pd) {
|
||||
return safetyAssessmentMapper.findById(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(PageData pd) {
|
||||
safetyAssessmentMapper.delete(pd);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,4 +32,9 @@ public class TrafficSafetyProductionServiceImpl implements TrafficSafetyProducti
|
|||
public PageData findById(PageData pd) {
|
||||
return speedProductionMapper.findById(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(PageData pd) {
|
||||
speedProductionMapper.delete(pd);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
package com.zcloud.service.comprehensive.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.comprehensive.TrafficSecurityAccidentInvestigationMapper;
|
||||
import com.zcloud.service.comprehensive.TrafficSecurityAccidentInvestigationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class TrafficSecurityAccidentInvestigationServiceImpl implements TrafficSecurityAccidentInvestigationService {
|
||||
|
||||
@Autowired
|
||||
private TrafficSecurityAccidentInvestigationMapper accidentInvestigationMapper;
|
||||
@Override
|
||||
public void save(PageData pd) {
|
||||
accidentInvestigationMapper.save(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listForAccidentInvestigation(Page page) {
|
||||
return accidentInvestigationMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(PageData pd) {
|
||||
accidentInvestigationMapper.delete(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData findById(PageData pd) {
|
||||
return accidentInvestigationMapper.findById(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(PageData pd) {
|
||||
accidentInvestigationMapper.edit(pd);
|
||||
}
|
||||
}
|
|
@ -1,15 +1,16 @@
|
|||
package com.zcloud.service.comprehensive;
|
||||
package com.zcloud.service.comprehensive.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.comprehensive.TrafficSecurityCommitmentMapper;
|
||||
import com.zcloud.service.comprehensive.TrafficSecurityCommitmentService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class TrafficSecurityCommitmentServiceImpl implements TrafficSecurityCommitmentService{
|
||||
public class TrafficSecurityCommitmentServiceImpl implements TrafficSecurityCommitmentService {
|
||||
@Autowired
|
||||
private TrafficSecurityCommitmentMapper securityCommitmentMapper;
|
||||
|
|
@ -1,15 +1,16 @@
|
|||
package com.zcloud.service.comprehensive;
|
||||
package com.zcloud.service.comprehensive.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.comprehensive.TrafficSecurityEmployeesDetailsMapper;
|
||||
import com.zcloud.service.comprehensive.TrafficSecurityEmployeesDetailsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class TrafficSecurityEmployeesDetailsImpl implements TrafficSecurityEmployeesDetailsService{
|
||||
public class TrafficSecurityEmployeesDetailsImpl implements TrafficSecurityEmployeesDetailsService {
|
||||
@Autowired
|
||||
private TrafficSecurityEmployeesDetailsMapper ecoDetailsMapper;
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
package com.zcloud.service.comprehensive.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.comprehensive.TrafficSecurityManagementAgreementMapper;
|
||||
import com.zcloud.service.comprehensive.TrafficSecurityManagementAgreementService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class TrafficSecurityManagementAgreementServiceImpl implements TrafficSecurityManagementAgreementService {
|
||||
@Autowired
|
||||
private TrafficSecurityManagementAgreementMapper managementAgreementMapper;
|
||||
@Override
|
||||
public void save(PageData pd) {
|
||||
managementAgreementMapper.save(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(PageData pd) {
|
||||
managementAgreementMapper.edit(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listForManagementAgreementlist(Page page) {
|
||||
return managementAgreementMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData findById(PageData pd) {
|
||||
return managementAgreementMapper.findById(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(PageData pd) {
|
||||
managementAgreementMapper.delete(pd);
|
||||
}
|
||||
}
|
|
@ -33,4 +33,9 @@ public class TrafficSecurityManagementStaffingServiceImpl implements TrafficSecu
|
|||
public PageData findById(PageData pd) {
|
||||
return securityManagementStaffingMapper.findById(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(PageData pd) {
|
||||
securityManagementStaffingMapper.delete(pd);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
package com.zcloud.service.comprehensive.impl;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.comprehensive.TrafficSecurityViolationRegistrationMapper;
|
||||
import com.zcloud.service.comprehensive.TrafficSecurityViolationRegistrationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class TrafficSecurityViolationRegistrationServiceImpl implements TrafficSecurityViolationRegistrationService {
|
||||
@Autowired
|
||||
private TrafficSecurityViolationRegistrationMapper verificationRegistrationMapper;
|
||||
@Override
|
||||
public void save(PageData pd) {
|
||||
verificationRegistrationMapper.save(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PageData> listForViolationRegistration(Page page) {
|
||||
return verificationRegistrationMapper.datalistPage(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(PageData pd) {
|
||||
verificationRegistrationMapper.delete(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageData findById(PageData pd) {
|
||||
return verificationRegistrationMapper.findById(pd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(PageData pd) {
|
||||
verificationRegistrationMapper.edit(pd);
|
||||
}
|
||||
}
|
|
@ -101,6 +101,18 @@
|
|||
SAFETYASSESSMENT_ID = #{SAFETYASSESSMENT_ID}
|
||||
</update>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1',
|
||||
DELETOR = #{DELETOR},
|
||||
DELETETIME = #{DELETETIME}
|
||||
where
|
||||
SAFETYASSESSMENT_ID = #{SAFETYASSESSMENT_ID}
|
||||
</delete>
|
||||
|
||||
<!--列表-->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
|
|
|
@ -101,6 +101,18 @@
|
|||
SAFETYPRODUCTION_ID = #{SAFETYPRODUCTION_ID}
|
||||
</update>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1',
|
||||
DELETOR = #{DELETOR},
|
||||
DELETETIME = #{DELETETIME}
|
||||
where
|
||||
SAFETYPRODUCTION_ID = #{SAFETYPRODUCTION_ID}
|
||||
</delete>
|
||||
|
||||
<!--列表-->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
|
|
|
@ -0,0 +1,359 @@
|
|||
<?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.TrafficSecurityAccidentInvestigationMapper">
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
BUS_TRAFFIC_ACCIDENT_INVESTIGATION
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.ACCIDENTINVESTIGATION_ID,
|
||||
f.ACCIDENTDATE,
|
||||
f.ACCIDENTLOCATION,
|
||||
f.INJUREDPART,
|
||||
f.CERTIFICATIONSTATUS,
|
||||
f.EDUCATIONSITUATION,
|
||||
f.ACCIDENTDESCRIPTION,
|
||||
f.ACCIDENTNATURE,
|
||||
f.USER_ID,
|
||||
f.CONFIRMATIONTIME,
|
||||
f.ACCIDENTANALYSIS,
|
||||
f.PUNISHMENTOPINION,
|
||||
f.RESPONSIBLEPERSON,
|
||||
f.SECONDARYRESPONSIBLEPERSON,
|
||||
f.PREVENTIVEMEASURES,
|
||||
f.COMPLETIONSTATUS,
|
||||
f.RECTIFICATIONRESPONSIBLEPERSON,
|
||||
f.RECTIFICATIONTIME,
|
||||
f.SUPERVISOROPINION,
|
||||
f.SUPERVISORLEADER,
|
||||
f.SUPERVISORCONFIRMATIONTIME,
|
||||
f.SAFETYSUPERVISIONOPINION,
|
||||
f.SAFETYSUPERVISIONDEPARTMENT,
|
||||
f.SAFETYSUPERVISIONCONFIRMATIONTIME,
|
||||
f.INSPECTOR,
|
||||
f.INSPECTORCONFIRMATIONTIME,
|
||||
f.CERTIFICATIONNUMBER,
|
||||
f.WORKINJURYIDENTIFICATIONLEVEL,
|
||||
f.ACCIDENTRECORDPERSON,
|
||||
f.REGISTRATIONDATE,
|
||||
f.ACCIDENTREPORTRECORD,
|
||||
f.ACCIDENTANALYSISRECORD,
|
||||
f.ACCIDENTNUMBER,
|
||||
f.ISDELETE,
|
||||
f.DELETOR,
|
||||
f.DELETORNAME,
|
||||
f.DELETETIME,
|
||||
f.CREATOR,
|
||||
f.CREATORNAME,
|
||||
f.CREATETIME,
|
||||
f.OPERATOR,
|
||||
f.OPERATORNAME,
|
||||
f.OPERATTIME,
|
||||
f.AGE,
|
||||
f.EDUCATIONALLEVEL,
|
||||
f.DEPARTMENT,
|
||||
f.JOBTYPE,
|
||||
f.PARTY,
|
||||
f.INCIDENTNUMBER,
|
||||
f.ENTRYDATE
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
ACCIDENTINVESTIGATION_ID,
|
||||
ACCIDENTDATE,
|
||||
ACCIDENTLOCATION,
|
||||
INJUREDPART,
|
||||
CERTIFICATIONSTATUS,
|
||||
EDUCATIONSITUATION,
|
||||
ACCIDENTDESCRIPTION,
|
||||
ACCIDENTNATURE,
|
||||
USER_ID,
|
||||
CONFIRMATIONTIME,
|
||||
ACCIDENTANALYSIS,
|
||||
PUNISHMENTOPINION,
|
||||
RESPONSIBLEPERSON,
|
||||
SECONDARYRESPONSIBLEPERSON,
|
||||
PREVENTIVEMEASURES,
|
||||
COMPLETIONSTATUS,
|
||||
RECTIFICATIONRESPONSIBLEPERSON,
|
||||
RECTIFICATIONTIME,
|
||||
SUPERVISOROPINION,
|
||||
SUPERVISORLEADER,
|
||||
SUPERVISORCONFIRMATIONTIME,
|
||||
SAFETYSUPERVISIONOPINION,
|
||||
SAFETYSUPERVISIONDEPARTMENT,
|
||||
SAFETYSUPERVISIONCONFIRMATIONTIME,
|
||||
INSPECTOR,
|
||||
INSPECTORCONFIRMATIONTIME,
|
||||
CERTIFICATIONNUMBER,
|
||||
WORKINJURYIDENTIFICATIONLEVEL,
|
||||
ACCIDENTRECORDPERSON,
|
||||
REGISTRATIONDATE,
|
||||
ACCIDENTREPORTRECORD,
|
||||
ACCIDENTANALYSISRECORD,
|
||||
ACCIDENTNUMBER,
|
||||
ISDELETE,
|
||||
DELETOR,
|
||||
DELETORNAME,
|
||||
DELETETIME,
|
||||
CREATOR,
|
||||
CREATORNAME,
|
||||
CREATETIME,
|
||||
OPERATOR,
|
||||
OPERATORNAME,
|
||||
OPERATTIME,
|
||||
AGE,
|
||||
EDUCATIONALLEVEL,
|
||||
DEPARTMENT,
|
||||
JOBTYPE,
|
||||
PARTY,
|
||||
INCIDENTNUMBER,
|
||||
ENTRYDATE
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{ACCIDENTINVESTIGATION_ID},
|
||||
#{ACCIDENTDATE},
|
||||
#{ACCIDENTLOCATION},
|
||||
#{INJUREDPART},
|
||||
#{CERTIFICATIONSTATUS},
|
||||
#{EDUCATIONSITUATION},
|
||||
#{ACCIDENTDESCRIPTION},
|
||||
#{ACCIDENTNATURE},
|
||||
#{USER_ID},
|
||||
#{CONFIRMATIONTIME},
|
||||
#{ACCIDENTANALYSIS},
|
||||
#{PUNISHMENTOPINION},
|
||||
#{RESPONSIBLEPERSON},
|
||||
#{SECONDARYRESPONSIBLEPERSON},
|
||||
#{PREVENTIVEMEASURES},
|
||||
#{COMPLETIONSTATUS},
|
||||
#{RECTIFICATIONRESPONSIBLEPERSON},
|
||||
#{RECTIFICATIONTIME},
|
||||
#{SUPERVISOROPINION},
|
||||
#{SUPERVISORLEADER},
|
||||
#{SUPERVISORCONFIRMATIONTIME},
|
||||
#{SAFETYSUPERVISIONOPINION},
|
||||
#{SAFETYSUPERVISIONDEPARTMENT},
|
||||
#{SAFETYSUPERVISIONCONFIRMATIONTIME},
|
||||
#{INSPECTOR},
|
||||
#{INSPECTORCONFIRMATIONTIME},
|
||||
#{CERTIFICATIONNUMBER},
|
||||
#{WORKINJURYIDENTIFICATIONLEVEL},
|
||||
#{ACCIDENTRECORDPERSON},
|
||||
#{REGISTRATIONDATE},
|
||||
#{ACCIDENTREPORTRECORD},
|
||||
#{ACCIDENTANALYSISRECORD},
|
||||
#{ACCIDENTNUMBER},
|
||||
#{ISDELETE},
|
||||
#{DELETOR},
|
||||
#{DELETORNAME},
|
||||
#{DELETETIME},
|
||||
#{CREATOR},
|
||||
#{CREATORNAME},
|
||||
#{CREATETIME},
|
||||
#{OPERATOR},
|
||||
#{OPERATORNAME},
|
||||
#{OPERATTIME},
|
||||
#{AGE},
|
||||
#{EDUCATIONALLEVEL},
|
||||
#{DEPARTMENT},
|
||||
#{JOBTYPE},
|
||||
#{PARTY},
|
||||
#{INCIDENTNUMBER},
|
||||
#{ENTRYDATE}
|
||||
</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>
|
||||
<if test="ACCIDENTDATE != null and ACCIDENTDATE != ''">
|
||||
ACCIDENTDATE = #{ACCIDENTDATE},
|
||||
</if>
|
||||
<if test="ACCIDENTLOCATION != null and ACCIDENTLOCATION != ''">
|
||||
ACCIDENTLOCATION = #{ACCIDENTLOCATION},
|
||||
</if>
|
||||
<if test="INJUREDPART != null and INJUREDPART != ''">
|
||||
INJUREDPART = #{INJUREDPART},
|
||||
</if>
|
||||
<if test="CERTIFICATIONSTATUS != null and CERTIFICATIONSTATUS != ''">
|
||||
CERTIFICATIONSTATUS = #{CERTIFICATIONSTATUS},
|
||||
</if>
|
||||
<if test="EDUCATIONSITUATION != null and EDUCATIONSITUATION != ''">
|
||||
EDUCATIONSITUATION = #{EDUCATIONSITUATION},
|
||||
</if>
|
||||
<if test="ACCIDENTDESCRIPTION != null and ACCIDENTDESCRIPTION != ''">
|
||||
ACCIDENTDESCRIPTION = #{ACCIDENTDESCRIPTION},
|
||||
</if>
|
||||
<if test="ACCIDENTNATURE != null and ACCIDENTNATURE != ''">
|
||||
ACCIDENTNATURE = #{ACCIDENTNATURE},
|
||||
</if>
|
||||
<if test="USER_ID != null and USER_ID != ''">
|
||||
USER_ID = #{USER_ID},
|
||||
</if>
|
||||
<if test="CONFIRMATIONTIME != null and CONFIRMATIONTIME != ''">
|
||||
CONFIRMATIONTIME = #{CONFIRMATIONTIME},
|
||||
</if>
|
||||
<if test="ACCIDENTANALYSIS != null and ACCIDENTANALYSIS != ''">
|
||||
ACCIDENTANALYSIS = #{ACCIDENTANALYSIS},
|
||||
</if>
|
||||
<if test="PUNISHMENTOPINION != null and PUNISHMENTOPINION != ''">
|
||||
PUNISHMENTOPINION = #{PUNISHMENTOPINION},
|
||||
</if>
|
||||
<if test="RESPONSIBLEPERSON != null and RESPONSIBLEPERSON != ''">
|
||||
RESPONSIBLEPERSON = #{RESPONSIBLEPERSON},
|
||||
</if>
|
||||
<if test="SECONDARYRESPONSIBLEPERSON != null and SECONDARYRESPONSIBLEPERSON != ''">
|
||||
SECONDARYRESPONSIBLEPERSON = #{SECONDARYRESPONSIBLEPERSON},
|
||||
</if>
|
||||
<if test="PREVENTIVEMEASURES != null and PREVENTIVEMEASURES != ''">
|
||||
PREVENTIVEMEASURES = #{PREVENTIVEMEASURES},
|
||||
</if>
|
||||
<if test="COMPLETIONSTATUS != null and COMPLETIONSTATUS != ''">
|
||||
COMPLETIONSTATUS = #{COMPLETIONSTATUS},
|
||||
</if>
|
||||
<if test="RECTIFICATIONRESPONSIBLEPERSON != null and RECTIFICATIONRESPONSIBLEPERSON != ''">
|
||||
RECTIFICATIONRESPONSIBLEPERSON = #{RECTIFICATIONRESPONSIBLEPERSON},
|
||||
</if>
|
||||
<if test="RECTIFICATIONTIME != null and RECTIFICATIONTIME != ''">
|
||||
RECTIFICATIONTIME = #{RECTIFICATIONTIME},
|
||||
</if>
|
||||
<if test="SUPERVISOROPINION != null and SUPERVISOROPINION != ''">
|
||||
SUPERVISOROPINION = #{SUPERVISOROPINION},
|
||||
</if>
|
||||
<if test="SUPERVISORLEADER != null and SUPERVISORLEADER != ''">
|
||||
SUPERVISORLEADER = #{SUPERVISORLEADER},
|
||||
</if>
|
||||
<if test="SUPERVISORCONFIRMATIONTIME != null and SUPERVISORCONFIRMATIONTIME != ''">
|
||||
SUPERVISORCONFIRMATIONTIME = #{SUPERVISORCONFIRMATIONTIME},
|
||||
</if>
|
||||
<if test="SAFETYSUPERVISIONOPINION != null and SAFETYSUPERVISIONOPINION != ''">
|
||||
SAFETYSUPERVISIONOPINION = #{SAFETYSUPERVISIONOPINION},
|
||||
</if>
|
||||
<if test="SAFETYSUPERVISIONDEPARTMENT != null and SAFETYSUPERVISIONDEPARTMENT != ''">
|
||||
SAFETYSUPERVISIONDEPARTMENT = #{SAFETYSUPERVISIONDEPARTMENT},
|
||||
</if>
|
||||
<if test="SAFETYSUPERVISIONCONFIRMATIONTIME != null and SAFETYSUPERVISIONCONFIRMATIONTIME != ''">
|
||||
SAFETYSUPERVISIONCONFIRMATIONTIME = #{SAFETYSUPERVISIONCONFIRMATIONTIME},
|
||||
</if>
|
||||
<if test="INSPECTOR != null and INSPECTOR != ''">
|
||||
INSPECTOR = #{INSPECTOR},
|
||||
</if>
|
||||
<if test="INSPECTORCONFIRMATIONTIME != null and INSPECTORCONFIRMATIONTIME != ''">
|
||||
INSPECTORCONFIRMATIONTIME = #{INSPECTORCONFIRMATIONTIME},
|
||||
</if>
|
||||
<if test="CERTIFICATIONNUMBER != null and CERTIFICATIONNUMBER != ''">
|
||||
CERTIFICATIONNUMBER = #{CERTIFICATIONNUMBER},
|
||||
</if>
|
||||
<if test="WORKINJURYIDENTIFICATIONLEVEL != null and WORKINJURYIDENTIFICATIONLEVEL != ''">
|
||||
WORKINJURYIDENTIFICATIONLEVEL = #{WORKINJURYIDENTIFICATIONLEVEL},
|
||||
</if>
|
||||
<if test="ACCIDENTRECORDPERSON != null and ACCIDENTRECORDPERSON != ''">
|
||||
ACCIDENTRECORDPERSON = #{ACCIDENTRECORDPERSON},
|
||||
</if>
|
||||
<if test="REGISTRATIONDATE != null and REGISTRATIONDATE != ''">
|
||||
REGISTRATIONDATE = #{REGISTRATIONDATE},
|
||||
</if>
|
||||
<if test="ACCIDENTREPORTRECORD != null and ACCIDENTREPORTRECORD != ''">
|
||||
ACCIDENTREPORTRECORD = #{ACCIDENTREPORTRECORD},
|
||||
</if>
|
||||
<if test="ACCIDENTANALYSISRECORD != null and ACCIDENTANALYSISRECORD != ''">
|
||||
ACCIDENTANALYSISRECORD = #{ACCIDENTANALYSISRECORD},
|
||||
</if>
|
||||
<if test="ACCIDENTNUMBER != null and ACCIDENTNUMBER != ''">
|
||||
ACCIDENTNUMBER = #{ACCIDENTNUMBER},
|
||||
</if>
|
||||
<if test="OPERATOR != null and OPERATOR != ''">
|
||||
OPERATOR = #{OPERATOR},
|
||||
</if>
|
||||
<if test="OPERATORNAME != null and OPERATORNAME != ''">
|
||||
OPERATORNAME = #{OPERATORNAME},
|
||||
</if>
|
||||
<if test="OPERATTIME != null and OPERATTIME != ''">
|
||||
OPERATTIME = #{OPERATTIME},
|
||||
</if>
|
||||
<if test="AGE != null and AGE != ''">
|
||||
AGE = #{AGE},
|
||||
</if>
|
||||
<if test="EDUCATIONALLEVEL != null and EDUCATIONALLEVEL != ''">
|
||||
EDUCATIONALLEVEL = #{EDUCATIONALLEVEL},
|
||||
</if>
|
||||
<if test="DEPARTMENT != null and DEPARTMENT != ''">
|
||||
DEPARTMENT = #{DEPARTMENT},
|
||||
</if>
|
||||
<if test="JOBTYPE != null and JOBTYPE != ''">
|
||||
JOBTYPE = #{JOBTYPE},
|
||||
</if>
|
||||
<if test="PARTY != null and PARTY != ''">
|
||||
PARTY = #{PARTY},
|
||||
</if>
|
||||
<if test="ENTRYDATE != null and ENTRYDATE != ''">
|
||||
ENTRYDATE = #{ENTRYDATE}
|
||||
</if>
|
||||
</set>
|
||||
where ACCIDENTINVESTIGATION_ID = #{ACCIDENTINVESTIGATION_ID}
|
||||
</update>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1',
|
||||
DELETOR = #{DELETOR},
|
||||
DELETETIME = #{DELETETIME}
|
||||
where
|
||||
ACCIDENTINVESTIGATION_ID = #{ACCIDENTINVESTIGATION_ID}
|
||||
</delete>
|
||||
|
||||
<!--列表-->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
f.*,
|
||||
i.CORP_NAME,
|
||||
u.NAME,
|
||||
u.PHONE
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join bus_corp_info i on f.DEPARTMENT = i.CORPINFO_ID
|
||||
left join sys_user u on f.USER_ID = u.USER_ID
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.USER_ID != null and pd.USER_ID != ''">
|
||||
and f.USER_ID = #{pd.USER_ID}
|
||||
</if>
|
||||
<if test="pd.PENALTYTIME != null and pd.PENALTYTIME != ''"><!-- 检索-处罚时间 -->
|
||||
and f.PENALTYTIME = #{pd.PENALTYTIME}
|
||||
</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.ACCIDENTINVESTIGATION_ID = #{ACCIDENTINVESTIGATION_ID}
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,146 @@
|
|||
<?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.TrafficSecurityManagementAgreementMapper">
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
BUS_TRAFFIC_MANAGEMENT_AGREEMENT
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.MANAGEMENTAGREEMENT_ID,
|
||||
f.MANAGEMENTAGREEMENTNAME,
|
||||
f.COMPLETIONSTATUS,
|
||||
f.VALIDSTATUS,
|
||||
f.OPERATINGCOMPANY,
|
||||
f.EXPIRYDATE,
|
||||
f.OPERATINGTYPE,
|
||||
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">
|
||||
MANAGEMENTAGREEMENT_ID,
|
||||
MANAGEMENTAGREEMENTNAME,
|
||||
COMPLETIONSTATUS,
|
||||
VALIDSTATUS,
|
||||
OPERATINGCOMPANY,
|
||||
EXPIRYDATE,
|
||||
OPERATINGTYPE,
|
||||
ATTACHMENT_ROUTE,
|
||||
ISDELETE,
|
||||
DELETOR,
|
||||
DELETORNAME,
|
||||
DELETETIME,
|
||||
CREATOR,
|
||||
CREATORNAME,
|
||||
CREATETIME,
|
||||
OPERATOR,
|
||||
OPERATORNAME,
|
||||
OPERATTIME
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{MANAGEMENTAGREEMENT_ID},
|
||||
#{MANAGEMENTAGREEMENTNAME},
|
||||
#{COMPLETIONSTATUS},
|
||||
#{VALIDSTATUS},
|
||||
#{OPERATINGCOMPANY},
|
||||
#{EXPIRYDATE},
|
||||
#{OPERATINGTYPE},
|
||||
#{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},
|
||||
EXPIRYDATE = #{EXPIRYDATE},
|
||||
ATTACHMENT_ROUTE=#{ATTACHMENT_ROUTE}
|
||||
where
|
||||
MANAGEMENTAGREEMENT_ID = #{MANAGEMENTAGREEMENT_ID}
|
||||
</update>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1',
|
||||
DELETOR = #{DELETOR},
|
||||
DELETETIME = #{DELETETIME}
|
||||
where
|
||||
MANAGEMENTAGREEMENT_ID = #{MANAGEMENTAGREEMENT_ID}
|
||||
</delete>
|
||||
|
||||
<!--列表-->
|
||||
<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.MANAGEMENTAGREEMENTNAME != null and pd.MANAGEMENTAGREEMENTNAME != ''"><!-- 关键词检索-制度名称 -->
|
||||
and f.MANAGEMENTAGREEMENTNAME LIKE CONCAT('%', #{pd.MANAGEMENTAGREEMENTNAME}, '%')
|
||||
</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>
|
||||
</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.MANAGEMENTAGREEMENT_ID = #{MANAGEMENTAGREEMENT_ID}
|
||||
</select>
|
||||
</mapper>
|
|
@ -103,6 +103,18 @@
|
|||
STAFFING_ID = #{STAFFING_ID}
|
||||
</update>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1',
|
||||
DELETOR = #{DELETOR},
|
||||
DELETETIME = #{DELETETIME}
|
||||
where
|
||||
STAFFING_ID = #{STAFFING_ID}
|
||||
</delete>
|
||||
|
||||
<!--列表-->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
|
|
|
@ -0,0 +1,158 @@
|
|||
<?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.TrafficSecurityViolationRegistrationMapper">
|
||||
<!--表名 -->
|
||||
<sql id="tableName">
|
||||
BUS_TRAFFIC_VIOLATION_REGISTRATION
|
||||
</sql>
|
||||
|
||||
<!--数据字典表名 -->
|
||||
<sql id="dicTableName">
|
||||
SYS_DICTIONARIES
|
||||
</sql>
|
||||
|
||||
<!-- 字段 -->
|
||||
<sql id="Field">
|
||||
f.REGISTRATION_ID,
|
||||
f.TRANSPORTVEHICLE,
|
||||
f.USER_ID,
|
||||
f.PENALTYMETHOD,
|
||||
f.PENALTYTIME,
|
||||
f.PENALTYEVENT,
|
||||
f.PENALTYMEASURES,
|
||||
f.PENALTYREGISTRANT,
|
||||
f.TRANSPORTATIONCOMPANY,
|
||||
f.ISDELETE,
|
||||
f.DELETOR,
|
||||
f.DELETORNAME,
|
||||
f.DELETETIME,
|
||||
f.CREATOR,
|
||||
f.CREATORNAME,
|
||||
f.CREATETIME,
|
||||
f.OPERATOR,
|
||||
f.OPERATORNAME,
|
||||
f.OPERATTIME,
|
||||
f.ATTACHMENT_ROUTE
|
||||
</sql>
|
||||
|
||||
<!-- 字段用于新增 -->
|
||||
<sql id="Field2">
|
||||
REGISTRATION_ID,
|
||||
TRANSPORTVEHICLE,
|
||||
USER_ID,
|
||||
PENALTYMETHOD,
|
||||
PENALTYTIME,
|
||||
PENALTYEVENT,
|
||||
PENALTYMEASURES,
|
||||
PENALTYREGISTRANT,
|
||||
TRANSPORTATIONCOMPANY,
|
||||
ISDELETE,
|
||||
DELETOR,
|
||||
DELETORNAME,
|
||||
DELETETIME,
|
||||
CREATOR,
|
||||
CREATORNAME,
|
||||
CREATETIME,
|
||||
OPERATOR,
|
||||
OPERATORNAME,
|
||||
OPERATTIME,
|
||||
ATTACHMENT_ROUTE
|
||||
</sql>
|
||||
|
||||
<!-- 字段值 -->
|
||||
<sql id="FieldValue">
|
||||
#{REGISTRATION_ID},
|
||||
#{TRANSPORTVEHICLE},
|
||||
#{USER_ID},
|
||||
#{PENALTYMETHOD},
|
||||
#{PENALTYTIME},
|
||||
#{PENALTYEVENT},
|
||||
#{PENALTYMEASURES},
|
||||
#{PENALTYREGISTRANT},
|
||||
#{TRANSPORTATIONCOMPANY},
|
||||
#{ISDELETE},
|
||||
#{DELETOR},
|
||||
#{DELETORNAME},
|
||||
#{DELETETIME},
|
||||
#{CREATOR},
|
||||
#{CREATORNAME},
|
||||
#{CREATETIME},
|
||||
#{OPERATOR},
|
||||
#{OPERATORNAME},
|
||||
#{OPERATTIME},
|
||||
#{ATTACHMENT_ROUTE}
|
||||
</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
|
||||
USER_ID = #{USER_ID},
|
||||
TRANSPORTVEHICLE = #{TRANSPORTVEHICLE},
|
||||
PENALTYMETHOD = #{PENALTYMETHOD},
|
||||
PENALTYTIME = #{PENALTYTIME},
|
||||
PENALTYEVENT = #{PENALTYEVENT},
|
||||
PENALTYMEASURES = #{PENALTYMEASURES},
|
||||
PENALTYREGISTRANT = #{PENALTYREGISTRANT},
|
||||
ATTACHMENT_ROUTE = #{ATTACHMENT_ROUTE},
|
||||
OPERATOR = #{OPERATOR},
|
||||
OPERATORNAME = #{OPERATORNAME},
|
||||
OPERATTIME = #{OPERATTIME}
|
||||
where
|
||||
REGISTRATION_ID = #{REGISTRATION_ID}
|
||||
</update>
|
||||
|
||||
<!-- 删除-->
|
||||
<delete id="delete" parameterType="pd">
|
||||
update
|
||||
<include refid="tableName"></include>
|
||||
set
|
||||
ISDELETE = '1',
|
||||
DELETOR = #{DELETOR},
|
||||
DELETETIME = #{DELETETIME}
|
||||
where
|
||||
REGISTRATION_ID = #{REGISTRATION_ID}
|
||||
</delete>
|
||||
|
||||
<!--列表-->
|
||||
<select id="datalistPage" parameterType="page" resultType="pd">
|
||||
select
|
||||
f.*,
|
||||
i.CORP_NAME,
|
||||
u.NAME,
|
||||
u.PHONE
|
||||
from
|
||||
<include refid="tableName"></include> f
|
||||
left join bus_corp_info i on f.TRANSPORTATIONCOMPANY = i.CORPINFO_ID
|
||||
left join sys_user u on f.USER_ID = u.USER_ID
|
||||
where f.ISDELETE = '0'
|
||||
<if test="pd.USER_ID != null and pd.USER_ID != ''">
|
||||
and f.USER_ID = #{pd.USER_ID}
|
||||
</if>
|
||||
<if test="pd.PENALTYTIME != null and pd.PENALTYTIME != ''"><!-- 检索-处罚时间 -->
|
||||
and f.PENALTYTIME = #{pd.PENALTYTIME}
|
||||
</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.REGISTRATION_ID = #{REGISTRATION_ID}
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -459,6 +459,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
u.PASSWORD,
|
||||
u.LAST_LOGIN,
|
||||
u.NAME,
|
||||
u.SEX,
|
||||
u.IP,
|
||||
u.EMAIL,
|
||||
u.NUMBER,
|
||||
|
|
Loading…
Reference in New Issue