过户管理

报废管理
企业安全生产值班记录
生产设备设施台账
劳动防护用品发放记录
消防设备设施台账
上报事件处理台账
dev
xiepeng 2024-03-19 14:02:24 +08:00
parent 51f5ad594b
commit 05ff67e6fd
43 changed files with 4445 additions and 14 deletions
src/main
java/com/zcloud
mapper/datasource
resources/mybatis/datasource

View File

@ -4,6 +4,7 @@ import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.service.assignedManage.AssignedManageService;
import com.zcloud.service.system.ImgFilesService;
import com.zcloud.service.taxationManage.TaxationManageService;
import com.zcloud.util.*;
import org.springframework.beans.factory.annotation.Autowired;
@ -28,6 +29,9 @@ public class AssignedManageController extends BaseController {
@Autowired
private Smb smb;
@Autowired
private ImgFilesService imgfilesService;
/**
* @param
* @throws Exception
@ -120,6 +124,14 @@ public class AssignedManageController extends BaseController {
pd = this.getPageData();
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
pd = assignedManageService.findById(pd);
pd.put("FOREIGN_KEY", pd.getString("ASSIGNED_ID"));
pd.put("TYPE",120);
List<PageData> nowVehicleOperationCertificateImgs = imgfilesService.listAll(pd);//车头照片
pd.put("TYPE",121);
List<PageData> nowDrivinglicenseImg = imgfilesService.listAll(pd);//行驶证照片
map.put("nowVehicleOperationCertificateImgs", nowVehicleOperationCertificateImgs);
map.put("nowDrivinglicenseImg", nowDrivinglicenseImg);
map.put("pd", pd);
map.put("result", errInfo);
return map;

View File

@ -0,0 +1,138 @@
package com.zcloud.controller.enterpriseSafetyProduction;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.service.enterpriseSafetyProduction.EnterpriseSafetyProductionService;
import com.zcloud.service.freighttrailer.FreightTrailerService;
import com.zcloud.service.operatingvehicles.OperatingVehiclesService;
import com.zcloud.service.scrapManage.ScrapManageService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.Smb;
import com.zcloud.util.Tools;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("/enterprisesafetyproduction")
public class EnterpriseSafetyProductionController extends BaseController {
@Autowired
private EnterpriseSafetyProductionService enterpriseSafetyProductionService;
@Autowired
private Smb smb;
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/add")
@ResponseBody
public Object add() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("SAFETYPRODUCTION_ID", this.get32UUID());
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
pd.put("ISDELETE", "0"); //是否删除(0:有效 1删除)
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
enterpriseSafetyProductionService.save(pd);
map.put("pd", pd);
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());
pd.put("DELETORNAME", Jurisdiction.getUsername());
pd.put("DELETTIME", DateUtil.date2Str(new Date()));
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
enterpriseSafetyProductionService.delete(pd);
map.put("result", errInfo); //返回结果
return map;
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/edit")
@ResponseBody
public Object edit() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("ISDELETE", "0"); //是否删除(0:有效 1删除)
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
enterpriseSafetyProductionService.edit(pd);
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
*/
@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.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
pd = enterpriseSafetyProductionService.findById(pd);
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
@RequestMapping(value="/list")
@ResponseBody
public Object list(Page page) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
page.setPd(pd);
List<PageData> varList = enterpriseSafetyProductionService.list(page); //列出MajorDangerSource列表
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
}

View File

@ -0,0 +1,144 @@
package com.zcloud.controller.equipmentFacility;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.service.enterpriseSafetyProduction.EnterpriseSafetyProductionService;
import com.zcloud.service.equipmentFacility.EquipmentFacilityService;
import com.zcloud.service.system.ImgFilesService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.Smb;
import com.zcloud.util.Tools;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("/equipmentfacilitycontroller")
public class EquipmentFacilityController extends BaseController {
@Autowired
private EquipmentFacilityService equipmentFacilityService;
@Autowired
private Smb smb;
@Autowired
private ImgFilesService imgfilesService;
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/add")
@ResponseBody
public Object add() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("PRODUCTIONFACILITY_ID", this.get32UUID()); //车船税主键
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
pd.put("ISDELETE", "0"); //是否删除(0:有效 1删除)
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
equipmentFacilityService.save(pd);
map.put("pd", pd);
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());
pd.put("DELETORNAME", Jurisdiction.getUsername());
pd.put("DELETTIME", DateUtil.date2Str(new Date()));
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
equipmentFacilityService.delete(pd);
map.put("result", errInfo); //返回结果
return map;
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/edit")
@ResponseBody
public Object edit() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("ISDELETE", "0"); //是否删除(0:有效 1删除)
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
equipmentFacilityService.edit(pd);
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
*/
@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.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
pd = equipmentFacilityService.findById(pd);
pd.put("FOREIGN_KEY", pd.getString("PRODUCTIONFACILITY_ID"));
pd.put("TYPE",150);
List<PageData> equipmentFacility = imgfilesService.listAll(pd); //设备设施
map.put("equipmentFacility", equipmentFacility);
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
@RequestMapping(value="/list")
@ResponseBody
public Object list(Page page) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
page.setPd(pd);
List<PageData> varList = equipmentFacilityService.list(page); //列出MajorDangerSource列表
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
}

View File

@ -0,0 +1,144 @@
package com.zcloud.controller.firefightingEquipmentFacility;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.service.enterpriseSafetyProduction.EnterpriseSafetyProductionService;
import com.zcloud.service.firefightingEquipmentFacility.FirefightingEquipmentFacilityService;
import com.zcloud.service.system.ImgFilesService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.Smb;
import com.zcloud.util.Tools;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("/firefightingequipmentfacility")
public class FirefightingEquipmentFacilityController extends BaseController {
@Autowired
private FirefightingEquipmentFacilityService firefightingEquipmentFacilityService;
@Autowired
private Smb smb;
@Autowired
private ImgFilesService imgfilesService;
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/add")
@ResponseBody
public Object add() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("FIREFIGHTINGFACILITY_ID", this.get32UUID());
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
pd.put("ISDELETE", "0"); //是否删除(0:有效 1删除)
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
firefightingEquipmentFacilityService.save(pd);
map.put("pd", pd);
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());
pd.put("DELETORNAME", Jurisdiction.getUsername());
pd.put("DELETTIME", DateUtil.date2Str(new Date()));
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
firefightingEquipmentFacilityService.delete(pd);
map.put("result", errInfo); //返回结果
return map;
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/edit")
@ResponseBody
public Object edit() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("ISDELETE", "0"); //是否删除(0:有效 1删除)
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
firefightingEquipmentFacilityService.edit(pd);
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
*/
@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.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
pd = firefightingEquipmentFacilityService.findById(pd);
pd.put("FOREIGN_KEY", pd.getString("FIREFIGHTINGFACILITY_ID"));
pd.put("TYPE",120);
List<PageData> firefightingequipmentImg = imgfilesService.listAll(pd); //设备设施
map.put("firefightingequipmentImg", firefightingequipmentImg);
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
@RequestMapping(value="/list")
@ResponseBody
public Object list(Page page) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
page.setPd(pd);
List<PageData> varList = firefightingEquipmentFacilityService.list(page); //列出MajorDangerSource列表
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
}

View File

@ -0,0 +1,156 @@
package com.zcloud.controller.firefightingMaintain;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.service.firefightingMaintain.FirefightingMaintainService;
import com.zcloud.service.maintain.MaintainService;
import com.zcloud.service.system.ImgFilesService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.Smb;
import com.zcloud.util.Tools;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("/firefightingmaintain")
public class FirefightingMaintainController extends BaseController {
@Autowired
private FirefightingMaintainService firefightingMaintainService;
@Autowired
private Smb smb;
@Autowired
private ImgFilesService imgfilesService;
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/add")
@ResponseBody
public Object add() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("FIREFIGHTINGMAINTAIN_ID", this.get32UUID());
pd.put("ISDELETE", "0"); //是否删除(0:有效 1删除)
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
firefightingMaintainService.save(pd);
map.put("pd", pd);
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());
pd.put("DELETORNAME", Jurisdiction.getUsername());
pd.put("DELETTIME", DateUtil.date2Str(new Date()));
firefightingMaintainService.delete(pd);
map.put("result", errInfo); //返回结果
return map;
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/edit")
@ResponseBody
public Object edit() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("ISDELETE", "0"); //是否删除(0:有效 1删除)
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
firefightingMaintainService.edit(pd);
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
*/
@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 = firefightingMaintainService.findById(pd);
pd.put("FOREIGN_KEY", pd.getString("FIREFIGHTINGMAINTAIN_ID"));
pd.put("TYPE",120);
List<PageData> firefightingmaintainImg = imgfilesService.listAll(pd); //设备设施
map.put("firefightingmaintainImg", firefightingmaintainImg);
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
@RequestMapping(value="/list")
@ResponseBody
public Object list(Page page) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
page.setPd(pd);
List<PageData> varList = firefightingMaintainService.list(page); //列出MajorDangerSource列表
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
@RequestMapping(value="/findByFirefightingId")
@ResponseBody
public Object getRisByUnitId(Page page) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("FIREFIGHTINGFACILITY_ID", pd.getString("FIREFIGHTINGFACILITY_ID"));
page.setPd(pd);
List<PageData> varList = firefightingMaintainService.findByProductionEquipmentFacilityId(page); //列出RiskUnit列表
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
}

View File

@ -0,0 +1,136 @@
package com.zcloud.controller.labourEntrenchThing;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.service.enterpriseSafetyProduction.EnterpriseSafetyProductionService;
import com.zcloud.service.labourEntrenchThing.LabourEntrenchThingService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.Smb;
import com.zcloud.util.Tools;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("/labourentrenchthing")
public class LabourEntrenchThingController extends BaseController {
@Autowired
private LabourEntrenchThingService labourEntrenchThingService;
@Autowired
private Smb smb;
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/add")
@ResponseBody
public Object add() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("PROTECTIVEEQUIPMENT_ID", this.get32UUID());
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
pd.put("ISDELETE", "0"); //是否删除(0:有效 1删除)
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
labourEntrenchThingService.save(pd);
map.put("pd", pd);
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());
pd.put("DELETORNAME", Jurisdiction.getUsername());
pd.put("DELETTIME", DateUtil.date2Str(new Date()));
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
labourEntrenchThingService.delete(pd);
map.put("result", errInfo); //返回结果
return map;
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/edit")
@ResponseBody
public Object edit() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("ISDELETE", "0"); //是否删除(0:有效 1删除)
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
labourEntrenchThingService.edit(pd);
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
*/
@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.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
pd = labourEntrenchThingService.findById(pd);
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
@RequestMapping(value="/list")
@ResponseBody
public Object list(Page page) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
page.setPd(pd);
List<PageData> varList = labourEntrenchThingService.list(page); //列出MajorDangerSource列表
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
}

View File

@ -0,0 +1,158 @@
package com.zcloud.controller.maintain;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.logs.LogAnno;
import com.zcloud.service.enterpriseSafetyProduction.EnterpriseSafetyProductionService;
import com.zcloud.service.maintain.MaintainService;
import com.zcloud.service.system.ImgFilesService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.Smb;
import com.zcloud.util.Tools;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping("/maintain")
public class MaintainController extends BaseController {
@Autowired
private MaintainService maintainService;
@Autowired
private Smb smb;
@Autowired
private ImgFilesService imgfilesService;
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/add")
@ResponseBody
public Object add() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("MAINTAIN_ID", this.get32UUID());
pd.put("ISDELETE", "0"); //是否删除(0:有效 1删除)
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
maintainService.save(pd);
map.put("pd", pd);
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());
pd.put("DELETORNAME", Jurisdiction.getUsername());
pd.put("DELETTIME", DateUtil.date2Str(new Date()));
maintainService.delete(pd);
map.put("result", errInfo); //返回结果
return map;
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/edit")
@ResponseBody
public Object edit() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("ISDELETE", "0"); //是否删除(0:有效 1删除)
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间
maintainService.edit(pd);
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
/**
* @param
* @throws Exception
*/
@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 = maintainService.findById(pd);
pd.put("FOREIGN_KEY", pd.getString("MAINTAIN_ID"));
pd.put("TYPE",120);
List<PageData> maintainImg = imgfilesService.listAll(pd); //设备设施
map.put("maintainImg", maintainImg);
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
@RequestMapping(value="/list")
@ResponseBody
public Object list(Page page) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件
if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim());
page.setPd(pd);
List<PageData> varList = maintainService.list(page); //列出MajorDangerSource列表
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
@RequestMapping(value="/findByProductionEquipmentFacilityId")
@ResponseBody
public Object getRisByUnitId(Page page) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("PRODUCTIONFACILITY_ID", pd.getString("PRODUCTIONFACILITY_ID"));
page.setPd(pd);
List<PageData> varList = maintainService.findByProductionEquipmentFacilityId(page); //列出RiskUnit列表
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
}

View File

@ -6,6 +6,7 @@ import com.zcloud.entity.PageData;
import com.zcloud.logs.LogAnno;
import com.zcloud.service.operatingvehicles.OperatingVehiclesService;
import com.zcloud.service.scrapManage.ScrapManageService;
import com.zcloud.service.system.ImgFilesService;
import com.zcloud.util.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -29,6 +30,9 @@ public class OperatingVehiclesController extends BaseController {
@Autowired
private Smb smb;
@Autowired
private ImgFilesService imgfilesService;
@Autowired
private ScrapManageService scrapManageService;
@ -202,7 +206,18 @@ public class OperatingVehiclesController extends BaseController {
pd = this.getPageData();
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
pd = operatingVehiclesService.findById(pd);
pd.put("FOREIGN_KEY", pd.getString("OPERATING_ID"));
pd.put("TYPE",130);
List<PageData> headstockphoto = imgfilesService.listAll(pd);//车头照片
pd.put("TYPE",131);
List<PageData> drivinglicensephoto = imgfilesService.listAll(pd);//行驶证照片
pd.put("TYPE",132);
List<PageData> operatingcertificatephoto = imgfilesService.listAll(pd);//运营证照片
map.put("pd", pd);
map.put("headstockphoto", headstockphoto);
map.put("drivinglicensephoto", drivinglicensephoto);
map.put("operatingcertificatephoto", operatingcertificatephoto);
map.put("result", errInfo);
return map;
}
@ -245,25 +260,33 @@ public class OperatingVehiclesController extends BaseController {
PageData pd = new PageData();
pd = this.getPageData();
pd.put("CORPINFO_ID",Jurisdiction.getCORPINFO_ID());
pd.put("FOREIGN_KEY", pd.getString("OPERATING_ID"));
pd.put("TYPE",130);
List<PageData> headstockphoto = imgfilesService.listAll(pd);//车头照片
pd.put("TYPE",131);
List<PageData> drivinglicensephoto = imgfilesService.listAll(pd);//行驶证照片
pd.put("TYPE",132);
List<PageData> operatingcertificatephoto = imgfilesService.listAll(pd);//运营证照片
map.put("pd", pd);
map.put("headstockphoto", headstockphoto);
map.put("drivinglicensephoto", drivinglicensephoto);
map.put("operatingcertificatephoto", operatingcertificatephoto);
pd = operatingVehiclesService.findById(pd);
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
/*@RequestMapping(value = "/list")
@RequestMapping(value = "/corpList")
@ResponseBody
public Object list(Page page) throws Exception {
public Object corpList() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
page.setPd(pd);
List<PageData> varList = operatingVehiclesService.list(page); //列出Question列表
map.put("varList", varList);
map.put("page", page);
String corpId = Jurisdiction.getCORPINFO_ID();
List<PageData> list = operatingVehiclesService.corpList(corpId); //列出Question列表
map.put("list", list);
map.put("result", errInfo);
return map;
}*/
}
}

View File

@ -0,0 +1,156 @@
package com.zcloud.controller.reportedIncident;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.logs.LogAnno;
import com.zcloud.service.freighttrailer.FreightTrailerService;
import com.zcloud.service.reportedIncident.ReportedIncidentService;
import com.zcloud.service.scrapManage.ScrapManageService;
import com.zcloud.service.system.ImgFilesService;
import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction;
import com.zcloud.util.Tools;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* -
*/
@Controller
@RequestMapping("/reportedincident")
public class ReportedIncidentController extends BaseController {
@Autowired
private ReportedIncidentService reportedIncidentService;
@Autowired
private ImgFilesService imgfilesService;
@Autowired
private ScrapManageService scrapManageService;
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/add")
@ResponseBody
public Object add() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("REPORTEDINCIDENT_ID", this.get32UUID()); //主键
pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id
pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人
pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间
pd.put("ISDELETE", "0"); //是否删除(0:有效 1删除)
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
reportedIncidentService.save(pd);
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/delete")
// @RequiresPermissions( value = {"question:del" , "courseware:del"}, logical = Logical.OR)
@ResponseBody
@LogAnno(menuType = "基础信息管理", menuServer = "货运挂车", instructionsOperate = "货运挂车", instructionsType = "删除")
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("DELETEOR", Jurisdiction.getUSER_ID()); //删除人id
pd.put("DELETEORNAME", Jurisdiction.getUsername()); //删除人
pd.put("DELETTIME", DateUtil.date2Str(new Date())); //删除时间
reportedIncidentService.delete(pd);
map.put("result", errInfo); //返回结果
return map;
}
/**
*
*
* @param
* @throws Exception
*/
@RequestMapping(value = "/edit")
// @RequiresPermissions( value = {"question:edit" , "courseware:edit"}, logical = Logical.OR)
@ResponseBody
@LogAnno(menuType = "基础信息管理", menuServer = "货运挂车", instructionsOperate = "货运挂车", instructionsType = "修改")
public Object edit() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id
pd.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人
pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
reportedIncidentService.edit(pd);
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
/**
*
*
* @param page
* @throws Exception
*/
@RequestMapping(value = "/list")
// @RequiresPermissions( value = {"question:list" , "courseware:list"}, logical = Logical.OR)
@ResponseBody
@LogAnno(menuType = "基础信息管理", menuServer = "货运挂车", instructionsOperate = "货运挂车", instructionsType = "列表")
public Object list(Page page) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID
page.setPd(pd);
List<PageData> varList = reportedIncidentService.list(page); //列出Question列表
map.put("varList", varList);
map.put("page", page);
map.put("result", errInfo);
return map;
}
/**
*
*
* @param
* @throws Exception
*/
@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.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
pd = reportedIncidentService.findById(pd);
map.put("pd", pd);
map.put("result", errInfo);
return map;
}
}

View File

@ -72,6 +72,7 @@ public class TaxationManageController extends BaseController {
smb.sshSftp(drivinglicenseFile, fileName, Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
pd.put("DRIVINGLICENSE_PHOTO", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
}
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
taxationManageService.save(pd);
map.put("pd", pd);
map.put("result", errInfo);

View File

@ -0,0 +1,35 @@
package com.zcloud.mapper.datasource.enterpriseSafetyProduction;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
public interface EnterpriseSafetyProductionMapper {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd);
/**
* @param pd
* @throws Exception
*/
void delete(PageData pd);
/**
* @param pd
* @throws Exception
*/
void edit(PageData pd);
/**id
* @param pd
* @throws Exception
*/
PageData findById(PageData pd);
List<PageData> datalistPage(Page page);
}

View File

@ -0,0 +1,35 @@
package com.zcloud.mapper.datasource.equipmentFacility;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
public interface EquipmentFacilityMapper {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd);
/**
* @param pd
* @throws Exception
*/
void delete(PageData pd);
/**
* @param pd
* @throws Exception
*/
void edit(PageData pd);
/**id
* @param pd
* @throws Exception
*/
PageData findById(PageData pd);
List<PageData> datalistPage(Page page);
}

View File

@ -0,0 +1,37 @@
package com.zcloud.mapper.datasource.firedifhtingMaintain;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
public interface FirefightingMaintainMapper {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd);
/**
* @param pd
* @throws Exception
*/
void delete(PageData pd);
/**
* @param pd
* @throws Exception
*/
void edit(PageData pd);
/**id
* @param pd
* @throws Exception
*/
PageData findById(PageData pd);
List<PageData> datalistPage(Page page);
List<PageData> findByProductionEquipmentFacilityId(Page page);
}

View File

@ -0,0 +1,35 @@
package com.zcloud.mapper.datasource.firefightingEquipmentFacility;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
public interface FirefightingEquipmentFacilityMapper {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd);
/**
* @param pd
* @throws Exception
*/
void delete(PageData pd);
/**
* @param pd
* @throws Exception
*/
void edit(PageData pd);
/**id
* @param pd
* @throws Exception
*/
PageData findById(PageData pd);
List<PageData> datalistPage(Page page);
}

View File

@ -0,0 +1,35 @@
package com.zcloud.mapper.datasource.labourEntrenchThing;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
public interface LabourEntrenchThingMapper {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd);
/**
* @param pd
* @throws Exception
*/
void delete(PageData pd);
/**
* @param pd
* @throws Exception
*/
void edit(PageData pd);
/**id
* @param pd
* @throws Exception
*/
PageData findById(PageData pd);
List<PageData> datalistPage(Page page);
}

View File

@ -0,0 +1,37 @@
package com.zcloud.mapper.datasource.maintain;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
public interface MaintainMapper {
/**
* @param pd
* @throws Exception
*/
void save(PageData pd);
/**
* @param pd
* @throws Exception
*/
void delete(PageData pd);
/**
* @param pd
* @throws Exception
*/
void edit(PageData pd);
/**id
* @param pd
* @throws Exception
*/
PageData findById(PageData pd);
List<PageData> datalistPage(Page page);
List<PageData> findByProductionEquipmentFacilityId(Page page);
}

View File

@ -35,4 +35,6 @@ public interface OperatingVehiclesMapper {
List<PageData> datalistPage(Page page);
List<PageData> operationVehicleList(String corpId);
List<PageData> corpList(String corpId);
}

View File

@ -0,0 +1,78 @@
package com.zcloud.mapper.datasource.reportedIncident;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
* -
*/
public interface ReportedIncidentMapper {
/**
*
*
* @param pd
* @throws Exception
*/
void save(PageData pd);
/**
*
*
* @param pd
* @throws Exception
*/
void delete(PageData pd);
/**
*
*
* @param pd
* @throws Exception
*/
void edit(PageData pd);
/**
*
*
* @param page
* @throws Exception
*/
List<PageData> datalistPage(Page page);
/**
* id
*
* @param pd
* @throws Exception
*/
PageData findById(PageData pd);
/**
*
*
* @param
* @throws Exception
*/
List<PageData> corpList(String corpId);
/**
*
*
* @param
* @throws Exception
*/
List<PageData> trailerList(String corpId);
/**
*
*
* @param
* @throws Exception
*/
List<PageData> vehicleList(PageData pd);
}

View File

@ -0,0 +1,35 @@
package com.zcloud.service.enterpriseSafetyProduction;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
public interface EnterpriseSafetyProductionService {
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception;
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception;
public List<PageData> list(Page page);
}

View File

@ -0,0 +1,46 @@
package com.zcloud.service.enterpriseSafetyProduction.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.enterpriseSafetyProduction.EnterpriseSafetyProductionMapper;
import com.zcloud.mapper.datasource.scrapManage.ScrapManageMapper;
import com.zcloud.service.enterpriseSafetyProduction.EnterpriseSafetyProductionService;
import com.zcloud.service.scrapManage.ScrapManageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Service
@Transactional //开启事物
public class EnterpriseSafetyProductionServiceImpl implements EnterpriseSafetyProductionService {
@Autowired
private EnterpriseSafetyProductionMapper enterpriseSafetyProductionMapper;
@Override
public void save(PageData pd) throws Exception {
enterpriseSafetyProductionMapper.save(pd);
}
@Override
public void delete(PageData pd) throws Exception {
enterpriseSafetyProductionMapper.delete(pd);
}
@Override
public void edit(PageData pd) throws Exception {
enterpriseSafetyProductionMapper.edit(pd);
}
@Override
public PageData findById(PageData pd) throws Exception {
return enterpriseSafetyProductionMapper.findById(pd);
}
@Override
public List<PageData> list(Page page) {
return enterpriseSafetyProductionMapper.datalistPage(page);
}
}

View File

@ -0,0 +1,35 @@
package com.zcloud.service.equipmentFacility;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
public interface EquipmentFacilityService {
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception;
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception;
public List<PageData> list(Page page);
}

View File

@ -0,0 +1,46 @@
package com.zcloud.service.equipmentFacility.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.enterpriseSafetyProduction.EnterpriseSafetyProductionMapper;
import com.zcloud.mapper.datasource.equipmentFacility.EquipmentFacilityMapper;
import com.zcloud.service.enterpriseSafetyProduction.EnterpriseSafetyProductionService;
import com.zcloud.service.equipmentFacility.EquipmentFacilityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Service
@Transactional //开启事物
public class EquipmentFacilityServiceImpl implements EquipmentFacilityService {
@Autowired
private EquipmentFacilityMapper equipmentFacilityMapper;
@Override
public void save(PageData pd) throws Exception {
equipmentFacilityMapper.save(pd);
}
@Override
public void delete(PageData pd) throws Exception {
equipmentFacilityMapper.delete(pd);
}
@Override
public void edit(PageData pd) throws Exception {
equipmentFacilityMapper.edit(pd);
}
@Override
public PageData findById(PageData pd) throws Exception {
return equipmentFacilityMapper.findById(pd);
}
@Override
public List<PageData> list(Page page) {
return equipmentFacilityMapper.datalistPage(page);
}
}

View File

@ -0,0 +1,35 @@
package com.zcloud.service.firefightingEquipmentFacility;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
public interface FirefightingEquipmentFacilityService {
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception;
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception;
public List<PageData> list(Page page);
}

View File

@ -0,0 +1,44 @@
package com.zcloud.service.firefightingEquipmentFacility.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.firefightingEquipmentFacility.FirefightingEquipmentFacilityMapper;
import com.zcloud.service.firefightingEquipmentFacility.FirefightingEquipmentFacilityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Service
@Transactional //开启事物
public class FirefightingEquipmentFacilityServiceImpl implements FirefightingEquipmentFacilityService {
@Autowired
private FirefightingEquipmentFacilityMapper firefightingEquipmentFacilityMapper;
@Override
public void save(PageData pd) throws Exception {
firefightingEquipmentFacilityMapper.save(pd);
}
@Override
public void delete(PageData pd) throws Exception {
firefightingEquipmentFacilityMapper.delete(pd);
}
@Override
public void edit(PageData pd) throws Exception {
firefightingEquipmentFacilityMapper.edit(pd);
}
@Override
public PageData findById(PageData pd) throws Exception {
return firefightingEquipmentFacilityMapper.findById(pd);
}
@Override
public List<PageData> list(Page page) {
return firefightingEquipmentFacilityMapper.datalistPage(page);
}
}

View File

@ -0,0 +1,37 @@
package com.zcloud.service.firefightingMaintain;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
public interface FirefightingMaintainService {
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception;
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception;
public List<PageData> list(Page page);
public List<PageData> findByProductionEquipmentFacilityId(Page page);
}

View File

@ -0,0 +1,51 @@
package com.zcloud.service.firefightingMaintain.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.firedifhtingMaintain.FirefightingMaintainMapper;
import com.zcloud.mapper.datasource.maintain.MaintainMapper;
import com.zcloud.service.firefightingMaintain.FirefightingMaintainService;
import com.zcloud.service.maintain.MaintainService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Service
@Transactional //开启事物
public class FirefightingMaintainServiceImpl implements FirefightingMaintainService {
@Autowired
private FirefightingMaintainMapper firefightingMaintainMapper;
@Override
public void save(PageData pd) throws Exception {
firefightingMaintainMapper.save(pd);
}
@Override
public void delete(PageData pd) throws Exception {
firefightingMaintainMapper.delete(pd);
}
@Override
public void edit(PageData pd) throws Exception {
firefightingMaintainMapper.edit(pd);
}
@Override
public PageData findById(PageData pd) throws Exception {
return firefightingMaintainMapper.findById(pd);
}
@Override
public List<PageData> list(Page page) {
return firefightingMaintainMapper.datalistPage(page);
}
@Override
public List<PageData> findByProductionEquipmentFacilityId(Page page) {
return firefightingMaintainMapper.findByProductionEquipmentFacilityId(page);
}
}

View File

@ -0,0 +1,35 @@
package com.zcloud.service.labourEntrenchThing;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
public interface LabourEntrenchThingService {
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception;
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception;
public List<PageData> list(Page page);
}

View File

@ -0,0 +1,46 @@
package com.zcloud.service.labourEntrenchThing.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.enterpriseSafetyProduction.EnterpriseSafetyProductionMapper;
import com.zcloud.mapper.datasource.labourEntrenchThing.LabourEntrenchThingMapper;
import com.zcloud.service.enterpriseSafetyProduction.EnterpriseSafetyProductionService;
import com.zcloud.service.labourEntrenchThing.LabourEntrenchThingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Service
@Transactional //开启事物
public class LabourEntrenchThingServiceImpl implements LabourEntrenchThingService {
@Autowired
private LabourEntrenchThingMapper labourEntrenchThingMapper;
@Override
public void save(PageData pd) throws Exception {
labourEntrenchThingMapper.save(pd);
}
@Override
public void delete(PageData pd) throws Exception {
labourEntrenchThingMapper.delete(pd);
}
@Override
public void edit(PageData pd) throws Exception {
labourEntrenchThingMapper.edit(pd);
}
@Override
public PageData findById(PageData pd) throws Exception {
return labourEntrenchThingMapper.findById(pd);
}
@Override
public List<PageData> list(Page page) {
return labourEntrenchThingMapper.datalistPage(page);
}
}

View File

@ -0,0 +1,37 @@
package com.zcloud.service.maintain;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
public interface MaintainService {
/**
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception;
/**
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception;
/**id
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception;
public List<PageData> list(Page page);
public List<PageData> findByProductionEquipmentFacilityId(Page page);
}

View File

@ -0,0 +1,51 @@
package com.zcloud.service.maintain.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.enterpriseSafetyProduction.EnterpriseSafetyProductionMapper;
import com.zcloud.mapper.datasource.maintain.MaintainMapper;
import com.zcloud.service.enterpriseSafetyProduction.EnterpriseSafetyProductionService;
import com.zcloud.service.maintain.MaintainService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Service
@Transactional //开启事物
public class MaintainServiceImpl implements MaintainService {
@Autowired
private MaintainMapper maintainMapper;
@Override
public void save(PageData pd) throws Exception {
maintainMapper.save(pd);
}
@Override
public void delete(PageData pd) throws Exception {
maintainMapper.delete(pd);
}
@Override
public void edit(PageData pd) throws Exception {
maintainMapper.edit(pd);
}
@Override
public PageData findById(PageData pd) throws Exception {
return maintainMapper.findById(pd);
}
@Override
public List<PageData> list(Page page) {
return maintainMapper.datalistPage(page);
}
@Override
public List<PageData> findByProductionEquipmentFacilityId(Page page) {
return maintainMapper.findByProductionEquipmentFacilityId(page);
}
}

View File

@ -36,4 +36,5 @@ public interface OperatingVehiclesService {
List<PageData> operationVehicleList(String corpId);
List<PageData> corpList(String corpId);
}

View File

@ -46,4 +46,9 @@ public class OperatingVehiclesServiceImpl implements OperatingVehiclesService {
public List<PageData> operationVehicleList(String corpId) {
return operatingVehiclesMapper.operationVehicleList(corpId);
}
@Override
public List<PageData> corpList(String corpId) {
return operatingVehiclesMapper.corpList(corpId);
}
}

View File

@ -0,0 +1,79 @@
package com.zcloud.service.reportedIncident;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import java.util.List;
/**
* -
*/
public interface ReportedIncidentService {
/**
*
*
* @param pd
* @throws Exception
*/
public void save(PageData pd) throws Exception;
/**
*
*
* @param pd
* @throws Exception
*/
public void delete(PageData pd) throws Exception;
/**
*
*
* @param pd
* @throws Exception
*/
public void edit(PageData pd) throws Exception;
/**
*
*
* @param page
* @throws Exception
*/
public List<PageData> list(Page page) throws Exception;
/**
* id
*
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd) throws Exception;
/**
*
*
* @param
* @throws Exception
*/
public List<PageData> corpList(String corpId) throws Exception;
/**
*
*
* @param
* @throws Exception
*/
public List<PageData> trailerList(String corpId) throws Exception;
/**
*
*
* @param
* @throws Exception
*/
public List<PageData> vehicleList(PageData pd) throws Exception;
}

View File

@ -0,0 +1,109 @@
package com.zcloud.service.reportedIncident.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.freighttrailer.FreightTrailerMapper;
import com.zcloud.mapper.datasource.reportedIncident.ReportedIncidentMapper;
import com.zcloud.service.freighttrailer.FreightTrailerService;
import com.zcloud.service.reportedIncident.ReportedIncidentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* -
*/
@Service
@Transactional
public class ReportedIncidentServiceImpl implements ReportedIncidentService {
@Autowired
private ReportedIncidentMapper reportedIncidentMapper;
/**
*
*
* @param pd
* @throws Exception
*/
public void save(PageData pd) throws Exception {
reportedIncidentMapper.save(pd);
}
/**
*
*e
* @param pd
* @throws Exception
*/
public void delete(PageData pd) throws Exception {
reportedIncidentMapper.delete(pd);
}
/**
*
*
* @param pd
* @throws Exception
*/
public void edit(PageData pd) throws Exception {
reportedIncidentMapper.edit(pd);
}
/**
*
*
* @param page
* @throws Exception
*/
public List<PageData> list(Page page) throws Exception {
return reportedIncidentMapper.datalistPage(page);
}
/**
* id
*
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd) throws Exception {
return reportedIncidentMapper.findById(pd);
}
/**
*
*
* @param
* @throws Exception
*/
public List<PageData> corpList(String corpId) throws Exception {
return reportedIncidentMapper.corpList(corpId);
}
/**
*
*
* @param
* @throws Exception
*/
public List<PageData> trailerList(String corpId) throws Exception {
return reportedIncidentMapper.trailerList(corpId);
}
/**
*
*
* @param
* @throws Exception
*/
public List<PageData> vehicleList(PageData pd) throws Exception {
return reportedIncidentMapper.vehicleList(pd);
}
}

View File

@ -0,0 +1,356 @@
<?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.enterpriseSafetyProduction.EnterpriseSafetyProductionMapper">
<!--表名 -->
<sql id="tableName">
BUS_TRAFFIC_SAFETY_PRODUCTION_SHIFT
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
SYS_DICTIONARIES
</sql>
<!-- 字段 -->
<sql id="Field">
f.SAFETYPRODUCTION_ID,
f.CORPINFO_ID,
f.WATCHKEEPER,
f.WATCHLEAD,
f.WATCH_DATE,
f.WATCH_TELEPHONE,
f.WATCH_PHONE,
f.REGISTRANT,
f.WATCH_CONDITION,
f.MANAGING_ENTERPRISE,
f.MANAGING_TYPE,
f.ISDELETE,
f.CREATOR,
f.CREATORNAME,
f.CREATTIME,
f.OPERATOR,
f.OPERATORNAME,
f.OPERATTIME,
f.DELETOR,
f.DELETORNAME,
f.DELETTIME
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
SAFETYPRODUCTION_ID,
CORPINFO_ID,
WATCHKEEPER,
WATCHLEAD,
WATCH_DATE,
WATCH_TELEPHONE,
WATCH_PHONE,
REGISTRANT,
WATCH_CONDITION,
MANAGING_ENTERPRISE,
MANAGING_TYPE,
ISDELETE,
CREATOR,
CREATORNAME,
CREATTIME,
OPERATOR,
OPERATORNAME,
OPERATTIME,
DELETOR,
DELETORNAME,
DELETTIME
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{SAFETYPRODUCTION_ID},
#{CORPINFO_ID},
#{WATCHKEEPER},
#{WATCHLEAD},
#{WATCH_DATE},
#{WATCH_TELEPHONE},
#{WATCH_PHONE},
#{REGISTRANT},
#{WATCH_CONDITION},
#{MANAGING_ENTERPRISE},
#{MANAGING_TYPE},
#{ISDELETE},
#{CREATOR},
#{CREATORNAME},
#{CREATTIME},
#{OPERATOR},
#{OPERATORNAME},
#{OPERATTIME},
#{DELETOR},
#{DELETORNAME},
#{DELETTIME}
</sql>
<!-- 新增-->
<insert id="save" parameterType="pd">
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
) values (
<include refid="FieldValue"></include>
)
</insert>
<!-- 删除-->
<delete id="delete" parameterType="pd">
update
<include refid="tableName"></include>
set
ISDELETE = '1'
where
SAFETYPRODUCTION_ID = #{SAFETYPRODUCTION_ID}
and
CORPINFO_ID = #{CORPINFO_ID}
</delete>
<!-- 修改 -->
<update id="edit" parameterType="pd">
update
<include refid="tableName"></include>
set
SAFETYPRODUCTION_ID = #{SAFETYPRODUCTION_ID},
CORPINFO_ID = #{CORPINFO_ID},
WATCHKEEPER = #{WATCHKEEPER},
WATCHLEAD = #{WATCHLEAD},
WATCH_DATE = #{WATCH_DATE},
WATCH_TELEPHONE = #{WATCH_TELEPHONE},
WATCH_PHONE = #{WATCH_PHONE},
REGISTRANT = #{REGISTRANT},
WATCH_CONDITION = #{WATCH_CONDITION},
MANAGING_ENTERPRISE = #{MANAGING_ENTERPRISE},
MANAGING_TYPE = #{MANAGING_TYPE},
ISDELETE = #{ISDELETE},
CREATOR = #{CREATOR},
CREATORNAME = #{CREATORNAME},
CREATTIME = #{CREATTIME},
OPERATOR = #{OPERATOR},
OPERATORNAME = #{OPERATORNAME},
OPERATTIME = #{OPERATTIME},
DELETOR = #{DELETOR},
DELETORNAME = #{DELETORNAME},
DELETTIME = #{DELETTIME}
where
SAFETYPRODUCTION_ID = #{SAFETYPRODUCTION_ID}
</update>
<!-- 通过ID获取数据 -->
<select id="findById" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where
f.SAFETYPRODUCTION_ID = #{SAFETYPRODUCTION_ID} and
f.ISDELETE = '0' AND
f.CORPINFO_ID = #{CORPINFO_ID}
</select>
<!-- 列表 -->
<!--<select id="datalistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
left join sys_user u on u.USER_ID = f.USER_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_user ru on ru.USER_ID = f.REVIEW_USER_ID
left join oa_department rd on rd.DEPARTMENT_ID = ru.DEPARTMENT_ID
where (f.ISDELETE = '0' or (f.ISDELETE = '1' and f.REVIEW_STATUS = '-1'))
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''">&lt;!&ndash; 关键词检索 &ndash;&gt;
and
(
u.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
)
</if>
<if test="pd.REVIEW_STATUS != null and pd.REVIEW_STATUS != ''">&lt;!&ndash; 关键词检索 &ndash;&gt;
<choose>
<when test="pd.REVIEW_STATUS == 0">
and f.REVIEW_STATUS = '0'
</when>
<when test="pd.REVIEW_STATUS == 1">
and f.REVIEW_STATUS = '1'
</when>
<when test="pd.REVIEW_STATUS == 2">
and f.REVIEW_STATUS = '2'
</when>
<when test="pd.REVIEW_STATUS == -1">
and f.ISDELETE = '0' and f.REVIEW_STATUS = '-1'
</when>
<when test="pd.REVIEW_STATUS == 3">
and f.CREATOR = f.OPERATOR and f.ISDELETE = '1' and f.REVIEW_STATUS = '-1'
</when>
<when test="pd.REVIEW_STATUS == 4">
and f.CREATOR != f.OPERATOR and f.ISDELETE = '1' and f.REVIEW_STATUS = '-1'
</when>
</choose>
</if>
<if test="pd.REVIEW_USER_NAME != null and pd.REVIEW_USER_NAME != ''">&lt;!&ndash; 关键词检索 &ndash;&gt;
and ru.NAME LIKE CONCAT(CONCAT('%', #{pd.REVIEW_USER_NAME}),'%')
</if>
<if test="pd.DEPT_DOWN_ARR != null and pd.DEPT_DOWN_ARR.size() > 0">
AND d.DEPARTMENT_ID IN
<foreach item="item" collection="pd.DEPT_DOWN_ARR" open="(" separator="," close=")">
'${item}'
</foreach>
</if>
&lt;!&ndash; <if test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID != ''">关键词检索
and d.DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
</if>
&ndash;&gt;
<choose>
<when test='pd.ISMAIN != null and pd.ISMAIN != "" and pd.ISMAIN == "1"'>
<if test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
and
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</if>
</when>
<otherwise>
<choose>
<when test='pd.ISSUPERVISE != null and pd.ISSUPERVISE != "" and pd.ISSUPERVISE == "1"'>
<choose>
<when test='pd.ISLEADER != null and pd.ISLEADER != "" and pd.ISLEADER == "1"'>
<choose>
<when test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
and
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</when>
<otherwise>
and
((d.DEPARTMENT_ID in (
select
SUB_DEPARTMENT_ID
from
oa_supervision_department osd
where
osd.SUP_DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
and osd.ISDELETE = '0'
and osd.CORPINFO_ID = #{pd.CORPINFO_ID}
)) or (
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPARTMENT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
))
</otherwise>
</choose>
</when>
<when test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
or f.REVIEW_USER_ID = #{pd.USER_ID}
and
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</when>
<otherwise>
and
d.DEPARTMENT_ID in (
select
SUB_DEPARTMENT_ID
from
oa_supervision_department osd
where
osd.SUP_DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
and osd.ISDELETE = '0'
and osd.CORPINFO_ID = #{pd.CORPINFO_ID})
or f.REVIEW_USER_ID = #{pd.USER_ID}
</otherwise>
</choose>
</when>
<when test='pd.ISLEADER != null and pd.ISLEADER != "" and pd.ISLEADER == "1"'>
<choose>
<when test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
and
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</when>
<otherwise>
and
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPARTMENT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</otherwise>
</choose>
</when>
<when test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID != ''">
and d.DEPARTMENT_ID=#{pd.DEPARTMENT_ID}
and f.REVIEW_USER_ID = #{pd.USER_ID}
</when>
<otherwise>
</otherwise>
</choose>
</otherwise>
</choose>
<choose>
<when test="pd.STARTTIME != null and pd.STARTTIME != '' and pd.ENDTIME != null and pd.ENDTIME != ''">
and DATE_FORMAT(#{pd.STARTTIME},'%Y-%m-%d %H:%i:%s') &lt;= DATE_FORMAT(f.STARTTIME,'%Y-%m-%d %H:%i:%s')
and DATE_FORMAT(#{pd.ENDTIME},'%Y-%m-%d %H:%i:%s') &gt;= DATE_FORMAT(f.ENDTIME,'%Y-%m-%d %H:%i:%s')
</when>
<otherwise>
<if test="pd.STARTTIME != null and pd.STARTTIME != ''">
and DATE_FORMAT(#{pd.STARTTIME},'%Y-%m-%d %H:%i:%s') &lt;= DATE_FORMAT(f.ENDTIME,'%Y-%m-%d %H:%i:%s')
</if>
<if test="pd.ENDTIME != null and pd.ENDTIME != ''">
and DATE_FORMAT(#{pd.ENDTIME},'%Y-%m-%d %H:%i:%s') &gt;= DATE_FORMAT(f.STARTTIME,'%Y-%m-%d %H:%i:%s')
</if>
</otherwise>
</choose>
order by f.OPERATTIME desc
</select>-->
<!-- 列表(全部) -->
<select id="datalistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where f.ISDELETE = '0'
<if test="pd.WATCHKEEPER != null and pd.WATCHKEEPER != ''"><!-- 关键词检索 -->
and f.WATCHKEEPER LIKE CONCAT(CONCAT('%', #{pd.WATCHKEEPER}),'%')
</if>
<if test="pd.WATCHLEAD != null and pd.WATCHLEAD != ''"><!-- 关键词检索 -->
and f.WATCHLEAD LIKE CONCAT(CONCAT('%', #{pd.WATCHLEAD}),'%')
</if>
<if test="pd.WATCH_DATE != null and pd.WATCH_DATE != ''"><!-- 关键词检索 -->
and f.WATCH_DATE LIKE CONCAT(CONCAT('%', #{pd.WATCH_DATE}),'%')
</if>
</select>
<select id="listAll" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where f.SCRAP_ID = #{pd.SAFETYPRODUCTION_ID}
and
f.ISDELETE = '0'
</select>
</mapper>

View File

@ -0,0 +1,366 @@
<?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.equipmentFacility.EquipmentFacilityMapper">
<!--表名 -->
<sql id="tableName">
BUS_TRAFFIC_PRODUCTION_FACILITY
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
SYS_DICTIONARIES
</sql>
<!-- 字段 -->
<sql id="Field">
f.PRODUCTIONFACILITY_ID,
f.CORPINFO_ID,
f.FACILITY_NAME,
f.FACILITY_NUMBER,
f.FACILITY_LOCALTION,
f.CONDUCT_ENTERPRISE,
f.FACILITY_UNIT,
f.FACILITY_COUNT,
f.CONDUCT_TYPE,
f.FACILITY_PRINCIPAL,
f.REGISTRATION_TIME,
f.EQUIPMENT_FACILITY,
f.FACILITY_REMARK,
f.ISDELETE,
f.CREATOR,
f.CREATORNAME,
f.CREATTIME,
f.OPERATOR,
f.OPERATORNAME,
f.OPERATTIME,
f.DELETOR,
f.DELETORNAME,
f.DELETTIME
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
PRODUCTIONFACILITY_ID,
CORPINFO_ID,
FACILITY_NAME,
FACILITY_NUMBER,
FACILITY_LOCALTION,
CONDUCT_ENTERPRISE,
FACILITY_UNIT,
FACILITY_COUNT,
CONDUCT_TYPE,
FACILITY_PRINCIPAL,
REGISTRATION_TIME,
EQUIPMENT_FACILITY,
FACILITY_REMARK,
ISDELETE,
CREATOR,
CREATORNAME,
CREATTIME,
OPERATOR,
OPERATORNAME,
OPERATTIME,
DELETOR,
DELETORNAME,
DELETTIME
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{PRODUCTIONFACILITY_ID},
#{CORPINFO_ID},
#{FACILITY_NAME},
#{FACILITY_NUMBER},
#{FACILITY_LOCALTION},
#{CONDUCT_ENTERPRISE},
#{FACILITY_UNIT},
#{FACILITY_COUNT},
#{CONDUCT_TYPE},
#{FACILITY_PRINCIPAL},
#{REGISTRATION_TIME},
#{EQUIPMENT_FACILITY},
#{FACILITY_REMARK},
#{ISDELETE},
#{CREATOR},
#{CREATORNAME},
#{CREATTIME},
#{OPERATOR},
#{OPERATORNAME},
#{OPERATTIME},
#{DELETOR},
#{DELETORNAME},
#{DELETTIME}
</sql>
<!-- 新增-->
<insert id="save" parameterType="pd">
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
) values (
<include refid="FieldValue"></include>
)
</insert>
<!-- 删除-->
<delete id="delete" parameterType="pd">
update
<include refid="tableName"></include>
set
ISDELETE = '1'
where
PRODUCTIONFACILITY_ID = #{PRODUCTIONFACILITY_ID}
and
CORPINFO_ID = #{CORPINFO_ID}
</delete>
<!-- 修改 -->
<update id="edit" parameterType="pd">
update
<include refid="tableName"></include>
set
PRODUCTIONFACILITY_ID = #{PRODUCTIONFACILITY_ID},
CORPINFO_ID = #{CORPINFO_ID},
FACILITY_NAME = #{FACILITY_NAME},
FACILITY_NUMBER = #{FACILITY_NUMBER},
FACILITY_LOCALTION = #{FACILITY_LOCALTION},
CONDUCT_ENTERPRISE = #{CONDUCT_ENTERPRISE},
FACILITY_UNIT = #{FACILITY_UNIT},
FACILITY_COUNT = #{FACILITY_COUNT},
CONDUCT_TYPE = #{CONDUCT_TYPE},
FACILITY_PRINCIPAL = #{FACILITY_PRINCIPAL},
REGISTRATION_TIME = #{REGISTRATION_TIME},
EQUIPMENT_FACILITY = #{EQUIPMENT_FACILITY},
FACILITY_REMARK = #{FACILITY_REMARK},
ISDELETE = #{ISDELETE},
CREATOR = #{CREATOR},
CREATORNAME = #{CREATORNAME},
CREATTIME = #{CREATTIME},
OPERATOR = #{OPERATOR},
OPERATORNAME = #{OPERATORNAME},
OPERATTIME = #{OPERATTIME},
DELETOR = #{DELETOR},
DELETORNAME = #{DELETORNAME},
DELETTIME = #{DELETTIME}
where
PRODUCTIONFACILITY_ID = #{PRODUCTIONFACILITY_ID}
</update>
<!-- 通过ID获取数据 -->
<select id="findById" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where
f.PRODUCTIONFACILITY_ID = #{PRODUCTIONFACILITY_ID}
AND
f.ISDELETE = '0'
AND
f.CORPINFO_ID = #{CORPINFO_ID}
</select>
<!-- 列表 -->
<!--<select id="datalistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
left join sys_user u on u.USER_ID = f.USER_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_user ru on ru.USER_ID = f.REVIEW_USER_ID
left join oa_department rd on rd.DEPARTMENT_ID = ru.DEPARTMENT_ID
where (f.ISDELETE = '0' or (f.ISDELETE = '1' and f.REVIEW_STATUS = '-1'))
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''">&lt;!&ndash; 关键词检索 &ndash;&gt;
and
(
u.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
)
</if>
<if test="pd.REVIEW_STATUS != null and pd.REVIEW_STATUS != ''">&lt;!&ndash; 关键词检索 &ndash;&gt;
<choose>
<when test="pd.REVIEW_STATUS == 0">
and f.REVIEW_STATUS = '0'
</when>
<when test="pd.REVIEW_STATUS == 1">
and f.REVIEW_STATUS = '1'
</when>
<when test="pd.REVIEW_STATUS == 2">
and f.REVIEW_STATUS = '2'
</when>
<when test="pd.REVIEW_STATUS == -1">
and f.ISDELETE = '0' and f.REVIEW_STATUS = '-1'
</when>
<when test="pd.REVIEW_STATUS == 3">
and f.CREATOR = f.OPERATOR and f.ISDELETE = '1' and f.REVIEW_STATUS = '-1'
</when>
<when test="pd.REVIEW_STATUS == 4">
and f.CREATOR != f.OPERATOR and f.ISDELETE = '1' and f.REVIEW_STATUS = '-1'
</when>
</choose>
</if>
<if test="pd.REVIEW_USER_NAME != null and pd.REVIEW_USER_NAME != ''">&lt;!&ndash; 关键词检索 &ndash;&gt;
and ru.NAME LIKE CONCAT(CONCAT('%', #{pd.REVIEW_USER_NAME}),'%')
</if>
<if test="pd.DEPT_DOWN_ARR != null and pd.DEPT_DOWN_ARR.size() > 0">
AND d.DEPARTMENT_ID IN
<foreach item="item" collection="pd.DEPT_DOWN_ARR" open="(" separator="," close=")">
'${item}'
</foreach>
</if>
&lt;!&ndash; <if test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID != ''">关键词检索
and d.DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
</if>
&ndash;&gt;
<choose>
<when test='pd.ISMAIN != null and pd.ISMAIN != "" and pd.ISMAIN == "1"'>
<if test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
and
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</if>
</when>
<otherwise>
<choose>
<when test='pd.ISSUPERVISE != null and pd.ISSUPERVISE != "" and pd.ISSUPERVISE == "1"'>
<choose>
<when test='pd.ISLEADER != null and pd.ISLEADER != "" and pd.ISLEADER == "1"'>
<choose>
<when test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
and
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</when>
<otherwise>
and
((d.DEPARTMENT_ID in (
select
SUB_DEPARTMENT_ID
from
oa_supervision_department osd
where
osd.SUP_DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
and osd.ISDELETE = '0'
and osd.CORPINFO_ID = #{pd.CORPINFO_ID}
)) or (
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPARTMENT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
))
</otherwise>
</choose>
</when>
<when test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
or f.REVIEW_USER_ID = #{pd.USER_ID}
and
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</when>
<otherwise>
and
d.DEPARTMENT_ID in (
select
SUB_DEPARTMENT_ID
from
oa_supervision_department osd
where
osd.SUP_DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
and osd.ISDELETE = '0'
and osd.CORPINFO_ID = #{pd.CORPINFO_ID})
or f.REVIEW_USER_ID = #{pd.USER_ID}
</otherwise>
</choose>
</when>
<when test='pd.ISLEADER != null and pd.ISLEADER != "" and pd.ISLEADER == "1"'>
<choose>
<when test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
and
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</when>
<otherwise>
and
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPARTMENT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</otherwise>
</choose>
</when>
<when test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID != ''">
and d.DEPARTMENT_ID=#{pd.DEPARTMENT_ID}
and f.REVIEW_USER_ID = #{pd.USER_ID}
</when>
<otherwise>
</otherwise>
</choose>
</otherwise>
</choose>
<choose>
<when test="pd.STARTTIME != null and pd.STARTTIME != '' and pd.ENDTIME != null and pd.ENDTIME != ''">
and DATE_FORMAT(#{pd.STARTTIME},'%Y-%m-%d %H:%i:%s') &lt;= DATE_FORMAT(f.STARTTIME,'%Y-%m-%d %H:%i:%s')
and DATE_FORMAT(#{pd.ENDTIME},'%Y-%m-%d %H:%i:%s') &gt;= DATE_FORMAT(f.ENDTIME,'%Y-%m-%d %H:%i:%s')
</when>
<otherwise>
<if test="pd.STARTTIME != null and pd.STARTTIME != ''">
and DATE_FORMAT(#{pd.STARTTIME},'%Y-%m-%d %H:%i:%s') &lt;= DATE_FORMAT(f.ENDTIME,'%Y-%m-%d %H:%i:%s')
</if>
<if test="pd.ENDTIME != null and pd.ENDTIME != ''">
and DATE_FORMAT(#{pd.ENDTIME},'%Y-%m-%d %H:%i:%s') &gt;= DATE_FORMAT(f.STARTTIME,'%Y-%m-%d %H:%i:%s')
</if>
</otherwise>
</choose>
order by f.OPERATTIME desc
</select>-->
<!-- 列表(全部) -->
<select id="datalistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where f.ISDELETE = '0'
<if test="pd.FACILITY_NAME != null and pd.FACILITY_NAME != ''"><!-- 关键词检索 -->
and f.FACILITY_NAME LIKE CONCAT(CONCAT('%', #{pd.FACILITY_NAME}),'%')
</if>
<if test="pd.FACILITY_NUMBER != null and pd.FACILITY_NUMBER != ''"><!-- 关键词检索 -->
and f.FACILITY_NUMBER LIKE CONCAT(CONCAT('%', #{pd.FACILITY_NUMBER}),'%')
</if>
<if test="pd.FACILITY_LOCALTION != null and pd.FACILITY_LOCALTION != ''"><!-- 关键词检索 -->
and f.FACILITY_LOCALTION LIKE CONCAT(CONCAT('%', #{pd.FACILITY_LOCALTION}),'%')
</if>
</select>
<select id="listAll" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where f.PRODUCTIONFACILITY_ID = #{pd.PRODUCTIONFACILITY_ID}
and
f.ISDELETE = '0'
</select>
</mapper>

View File

@ -0,0 +1,366 @@
<?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.firefightingEquipmentFacility.FirefightingEquipmentFacilityMapper">
<!--表名 -->
<sql id="tableName">
BUS_TRAFFIC_FIREFIGHTING_FACILITY
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
SYS_DICTIONARIES
</sql>
<!-- 字段 -->
<sql id="Field">
f.FIREFIGHTINGFACILITY_ID,
f.CORPINFO_ID,
f.FACILITY_NAME,
f.FACILITY_NUMBER,
f.FACILITY_LOCALTION,
f.MANAGING_ENTERPRISE,
f.FACILITY_UNIT,
f.FACILITY_COUNT,
f.MANAGING_TYPE,
f.FACILITY_PRINCIPAL,
f.REGISTRATION_TIME,
f.EQUIPMENT_FACILITY,
f.REMARK,
f.ISDELETE,
f.CREATOR,
f.CREATORNAME,
f.CREATTIME,
f.OPERATOR,
f.OPERATORNAME,
f.OPERATTIME,
f.DELETOR,
f.DELETORNAME,
f.DELETTIME
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
FIREFIGHTINGFACILITY_ID,
CORPINFO_ID,
FACILITY_NAME,
FACILITY_NUMBER,
FACILITY_LOCALTION,
MANAGING_ENTERPRISE,
FACILITY_UNIT,
FACILITY_COUNT,
MANAGING_TYPE,
FACILITY_PRINCIPAL,
REGISTRATION_TIME,
EQUIPMENT_FACILITY,
REMARK,
ISDELETE,
CREATOR,
CREATORNAME,
CREATTIME,
OPERATOR,
OPERATORNAME,
OPERATTIME,
DELETOR,
DELETORNAME,
DELETTIME
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{FIREFIGHTINGFACILITY_ID},
#{CORPINFO_ID},
#{FACILITY_NAME},
#{FACILITY_NUMBER},
#{FACILITY_LOCALTION},
#{MANAGING_ENTERPRISE},
#{FACILITY_UNIT},
#{FACILITY_COUNT},
#{MANAGING_TYPE},
#{FACILITY_PRINCIPAL},
#{REGISTRATION_TIME},
#{EQUIPMENT_FACILITY},
#{REMARK},
#{ISDELETE},
#{CREATOR},
#{CREATORNAME},
#{CREATTIME},
#{OPERATOR},
#{OPERATORNAME},
#{OPERATTIME},
#{DELETOR},
#{DELETORNAME},
#{DELETTIME}
</sql>
<!-- 新增-->
<insert id="save" parameterType="pd">
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
) values (
<include refid="FieldValue"></include>
)
</insert>
<!-- 删除-->
<delete id="delete" parameterType="pd">
update
<include refid="tableName"></include>
set
ISDELETE = '1'
where
FIREFIGHTINGFACILITY_ID = #{FIREFIGHTINGFACILITY_ID}
and
CORPINFO_ID = #{CORPINFO_ID}
</delete>
<!-- 修改 -->
<update id="edit" parameterType="pd">
update
<include refid="tableName"></include>
set
FIREFIGHTINGFACILITY_ID = #{FIREFIGHTINGFACILITY_ID},
CORPINFO_ID = #{CORPINFO_ID},
FACILITY_NAME = #{FACILITY_NAME},
FACILITY_NUMBER = #{FACILITY_NUMBER},
FACILITY_LOCALTION = #{FACILITY_LOCALTION},
MANAGING_ENTERPRISE = #{MANAGING_ENTERPRISE},
FACILITY_UNIT = #{FACILITY_UNIT},
FACILITY_COUNT = #{FACILITY_COUNT},
MANAGING_TYPE = #{MANAGING_TYPE},
FACILITY_PRINCIPAL = #{FACILITY_PRINCIPAL},
REGISTRATION_TIME = #{REGISTRATION_TIME},
EQUIPMENT_FACILITY = #{EQUIPMENT_FACILITY},
REMARK = #{REMARK},
ISDELETE = #{ISDELETE},
CREATOR = #{CREATOR},
CREATORNAME = #{CREATORNAME},
CREATTIME = #{CREATTIME},
OPERATOR = #{OPERATOR},
OPERATORNAME = #{OPERATORNAME},
OPERATTIME = #{OPERATTIME},
DELETOR = #{DELETOR},
DELETORNAME = #{DELETORNAME},
DELETTIME = #{DELETTIME}
where
FIREFIGHTINGFACILITY_ID = #{FIREFIGHTINGFACILITY_ID}
</update>
<!-- 通过ID获取数据 -->
<select id="findById" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where
f.FIREFIGHTINGFACILITY_ID = #{FIREFIGHTINGFACILITY_ID}
AND
f.ISDELETE = '0'
AND
f.CORPINFO_ID = #{CORPINFO_ID}
</select>
<!-- 列表 -->
<!--<select id="datalistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
left join sys_user u on u.USER_ID = f.USER_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_user ru on ru.USER_ID = f.REVIEW_USER_ID
left join oa_department rd on rd.DEPARTMENT_ID = ru.DEPARTMENT_ID
where (f.ISDELETE = '0' or (f.ISDELETE = '1' and f.REVIEW_STATUS = '-1'))
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''">&lt;!&ndash; 关键词检索 &ndash;&gt;
and
(
u.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
)
</if>
<if test="pd.REVIEW_STATUS != null and pd.REVIEW_STATUS != ''">&lt;!&ndash; 关键词检索 &ndash;&gt;
<choose>
<when test="pd.REVIEW_STATUS == 0">
and f.REVIEW_STATUS = '0'
</when>
<when test="pd.REVIEW_STATUS == 1">
and f.REVIEW_STATUS = '1'
</when>
<when test="pd.REVIEW_STATUS == 2">
and f.REVIEW_STATUS = '2'
</when>
<when test="pd.REVIEW_STATUS == -1">
and f.ISDELETE = '0' and f.REVIEW_STATUS = '-1'
</when>
<when test="pd.REVIEW_STATUS == 3">
and f.CREATOR = f.OPERATOR and f.ISDELETE = '1' and f.REVIEW_STATUS = '-1'
</when>
<when test="pd.REVIEW_STATUS == 4">
and f.CREATOR != f.OPERATOR and f.ISDELETE = '1' and f.REVIEW_STATUS = '-1'
</when>
</choose>
</if>
<if test="pd.REVIEW_USER_NAME != null and pd.REVIEW_USER_NAME != ''">&lt;!&ndash; 关键词检索 &ndash;&gt;
and ru.NAME LIKE CONCAT(CONCAT('%', #{pd.REVIEW_USER_NAME}),'%')
</if>
<if test="pd.DEPT_DOWN_ARR != null and pd.DEPT_DOWN_ARR.size() > 0">
AND d.DEPARTMENT_ID IN
<foreach item="item" collection="pd.DEPT_DOWN_ARR" open="(" separator="," close=")">
'${item}'
</foreach>
</if>
&lt;!&ndash; <if test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID != ''">关键词检索
and d.DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
</if>
&ndash;&gt;
<choose>
<when test='pd.ISMAIN != null and pd.ISMAIN != "" and pd.ISMAIN == "1"'>
<if test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
and
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</if>
</when>
<otherwise>
<choose>
<when test='pd.ISSUPERVISE != null and pd.ISSUPERVISE != "" and pd.ISSUPERVISE == "1"'>
<choose>
<when test='pd.ISLEADER != null and pd.ISLEADER != "" and pd.ISLEADER == "1"'>
<choose>
<when test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
and
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</when>
<otherwise>
and
((d.DEPARTMENT_ID in (
select
SUB_DEPARTMENT_ID
from
oa_supervision_department osd
where
osd.SUP_DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
and osd.ISDELETE = '0'
and osd.CORPINFO_ID = #{pd.CORPINFO_ID}
)) or (
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPARTMENT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
))
</otherwise>
</choose>
</when>
<when test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
or f.REVIEW_USER_ID = #{pd.USER_ID}
and
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</when>
<otherwise>
and
d.DEPARTMENT_ID in (
select
SUB_DEPARTMENT_ID
from
oa_supervision_department osd
where
osd.SUP_DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
and osd.ISDELETE = '0'
and osd.CORPINFO_ID = #{pd.CORPINFO_ID})
or f.REVIEW_USER_ID = #{pd.USER_ID}
</otherwise>
</choose>
</when>
<when test='pd.ISLEADER != null and pd.ISLEADER != "" and pd.ISLEADER == "1"'>
<choose>
<when test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
and
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</when>
<otherwise>
and
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPARTMENT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</otherwise>
</choose>
</when>
<when test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID != ''">
and d.DEPARTMENT_ID=#{pd.DEPARTMENT_ID}
and f.REVIEW_USER_ID = #{pd.USER_ID}
</when>
<otherwise>
</otherwise>
</choose>
</otherwise>
</choose>
<choose>
<when test="pd.STARTTIME != null and pd.STARTTIME != '' and pd.ENDTIME != null and pd.ENDTIME != ''">
and DATE_FORMAT(#{pd.STARTTIME},'%Y-%m-%d %H:%i:%s') &lt;= DATE_FORMAT(f.STARTTIME,'%Y-%m-%d %H:%i:%s')
and DATE_FORMAT(#{pd.ENDTIME},'%Y-%m-%d %H:%i:%s') &gt;= DATE_FORMAT(f.ENDTIME,'%Y-%m-%d %H:%i:%s')
</when>
<otherwise>
<if test="pd.STARTTIME != null and pd.STARTTIME != ''">
and DATE_FORMAT(#{pd.STARTTIME},'%Y-%m-%d %H:%i:%s') &lt;= DATE_FORMAT(f.ENDTIME,'%Y-%m-%d %H:%i:%s')
</if>
<if test="pd.ENDTIME != null and pd.ENDTIME != ''">
and DATE_FORMAT(#{pd.ENDTIME},'%Y-%m-%d %H:%i:%s') &gt;= DATE_FORMAT(f.STARTTIME,'%Y-%m-%d %H:%i:%s')
</if>
</otherwise>
</choose>
order by f.OPERATTIME desc
</select>-->
<!-- 列表(全部) -->
<select id="datalistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where f.ISDELETE = '0'
<if test="pd.FACILITY_NAME != null and pd.FACILITY_NAME != ''"><!-- 关键词检索 -->
and f.FACILITY_NAME LIKE CONCAT(CONCAT('%', #{pd.FACILITY_NAME}),'%')
</if>
<if test="pd.FACILITY_NUMBER != null and pd.FACILITY_NUMBER != ''"><!-- 关键词检索 -->
and f.FACILITY_NUMBER LIKE CONCAT(CONCAT('%', #{pd.FACILITY_NUMBER}),'%')
</if>
<if test="pd.FACILITY_LOCALTION != null and pd.FACILITY_LOCALTION != ''"><!-- 关键词检索 -->
and f.FACILITY_LOCALTION LIKE CONCAT(CONCAT('%', #{pd.FACILITY_LOCALTION}),'%')
</if>
</select>
<select id="listAll" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where f.FIREFIGHTINGFACILITY_ID = #{pd.FIREFIGHTINGFACILITY_ID}
and
f.ISDELETE = '0'
</select>
</mapper>

View File

@ -0,0 +1,351 @@
<?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.firedifhtingMaintain.FirefightingMaintainMapper">
<!--表名 -->
<sql id="tableName">
BUS_TRAFFIC_FIREFIGHTING_MAINTAIN
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
SYS_DICTIONARIES
</sql>
<!-- 字段 -->
<sql id="Field">
f.FIREFIGHTINGMAINTAIN_ID,
f.FIREFIGHTINGFACILITY_ID,
f.MAINTAIN_DATE,
f.MAINTAIN_CONDITION,
f.MAINTAIN_PERSON,
f.REMARK,
f.MAINTAIN_IMG,
f.ISDELETE,
f.CREATOR,
f.CREATORNAME,
f.CREATTIME,
f.OPERATOR,
f.OPERATORNAME,
f.OPERATTIME,
f.DELETOR,
f.DELETORNAME,
f.DELETTIME
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
FIREFIGHTINGMAINTAIN_ID,
FIREFIGHTINGFACILITY_ID,
MAINTAIN_DATE,
MAINTAIN_CONDITION,
MAINTAIN_PERSON,
REMARK,
MAINTAIN_IMG,
ISDELETE,
CREATOR,
CREATORNAME,
CREATTIME,
OPERATOR,
OPERATORNAME,
OPERATTIME,
DELETOR,
DELETORNAME,
DELETTIME
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{FIREFIGHTINGMAINTAIN_ID},
#{FIREFIGHTINGFACILITY_ID},
#{MAINTAIN_DATE},
#{MAINTAIN_CONDITION},
#{MAINTAIN_PERSON},
#{REMARK},
#{MAINTAIN_IMG},
#{ISDELETE},
#{CREATOR},
#{CREATORNAME},
#{CREATTIME},
#{OPERATOR},
#{OPERATORNAME},
#{OPERATTIME},
#{DELETOR},
#{DELETORNAME},
#{DELETTIME}
</sql>
<!-- 新增-->
<insert id="save" parameterType="pd">
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
) values (
<include refid="FieldValue"></include>
)
</insert>
<!-- 删除-->
<delete id="delete" parameterType="pd">
update
<include refid="tableName"></include> f
set
f.ISDELETE = '1' ,
f.DELETOR = #{DELETOR},
f.DELETORNAME = #{DELETORNAME},
f.DELETTIME = #{DELETTIME}
where
f.FIREFIGHTINGMAINTAIN_ID = #{FIREFIGHTINGMAINTAIN_ID}
</delete>
<!-- 修改 -->
<update id="edit" parameterType="pd">
update
<include refid="tableName"></include>
set
FIREFIGHTINGMAINTAIN_ID = #{FIREFIGHTINGMAINTAIN_ID},
FIREFIGHTINGFACILITY_ID = #{FIREFIGHTINGFACILITY_ID},
MAINTAIN_DATE = #{MAINTAIN_DATE},
MAINTAIN_CONDITION = #{MAINTAIN_CONDITION},
MAINTAIN_PERSON = #{MAINTAIN_PERSON},
REMARK = #{REMARK},
MAINTAIN_IMG = #{MAINTAIN_IMG},
ISDELETE = #{ISDELETE},
CREATOR = #{CREATOR},
CREATORNAME = #{CREATORNAME},
CREATTIME = #{CREATTIME},
OPERATOR = #{OPERATOR},
OPERATORNAME = #{OPERATORNAME},
OPERATTIME = #{OPERATTIME},
DELETOR = #{DELETOR},
DELETORNAME = #{DELETORNAME},
DELETTIME = #{DELETTIME}
where
FIREFIGHTINGMAINTAIN_ID = #{FIREFIGHTINGMAINTAIN_ID}
</update>
<!-- 通过ID获取数据 -->
<select id="findById" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where
f.FIREFIGHTINGMAINTAIN_ID = #{FIREFIGHTINGMAINTAIN_ID} and
f.ISDELETE = '0'
</select>
<!-- 列表 -->
<!--<select id="datalistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
left join sys_user u on u.USER_ID = f.USER_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_user ru on ru.USER_ID = f.REVIEW_USER_ID
left join oa_department rd on rd.DEPARTMENT_ID = ru.DEPARTMENT_ID
where (f.ISDELETE = '0' or (f.ISDELETE = '1' and f.REVIEW_STATUS = '-1'))
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''">&lt;!&ndash; 关键词检索 &ndash;&gt;
and
(
u.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
)
</if>
<if test="pd.REVIEW_STATUS != null and pd.REVIEW_STATUS != ''">&lt;!&ndash; 关键词检索 &ndash;&gt;
<choose>
<when test="pd.REVIEW_STATUS == 0">
and f.REVIEW_STATUS = '0'
</when>
<when test="pd.REVIEW_STATUS == 1">
and f.REVIEW_STATUS = '1'
</when>
<when test="pd.REVIEW_STATUS == 2">
and f.REVIEW_STATUS = '2'
</when>
<when test="pd.REVIEW_STATUS == -1">
and f.ISDELETE = '0' and f.REVIEW_STATUS = '-1'
</when>
<when test="pd.REVIEW_STATUS == 3">
and f.CREATOR = f.OPERATOR and f.ISDELETE = '1' and f.REVIEW_STATUS = '-1'
</when>
<when test="pd.REVIEW_STATUS == 4">
and f.CREATOR != f.OPERATOR and f.ISDELETE = '1' and f.REVIEW_STATUS = '-1'
</when>
</choose>
</if>
<if test="pd.REVIEW_USER_NAME != null and pd.REVIEW_USER_NAME != ''">&lt;!&ndash; 关键词检索 &ndash;&gt;
and ru.NAME LIKE CONCAT(CONCAT('%', #{pd.REVIEW_USER_NAME}),'%')
</if>
<if test="pd.DEPT_DOWN_ARR != null and pd.DEPT_DOWN_ARR.size() > 0">
AND d.DEPARTMENT_ID IN
<foreach item="item" collection="pd.DEPT_DOWN_ARR" open="(" separator="," close=")">
'${item}'
</foreach>
</if>
&lt;!&ndash; <if test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID != ''">关键词检索
and d.DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
</if>
&ndash;&gt;
<choose>
<when test='pd.ISMAIN != null and pd.ISMAIN != "" and pd.ISMAIN == "1"'>
<if test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
and
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</if>
</when>
<otherwise>
<choose>
<when test='pd.ISSUPERVISE != null and pd.ISSUPERVISE != "" and pd.ISSUPERVISE == "1"'>
<choose>
<when test='pd.ISLEADER != null and pd.ISLEADER != "" and pd.ISLEADER == "1"'>
<choose>
<when test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
and
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</when>
<otherwise>
and
((d.DEPARTMENT_ID in (
select
SUB_DEPARTMENT_ID
from
oa_supervision_department osd
where
osd.SUP_DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
and osd.ISDELETE = '0'
and osd.CORPINFO_ID = #{pd.CORPINFO_ID}
)) or (
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPARTMENT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
))
</otherwise>
</choose>
</when>
<when test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
or f.REVIEW_USER_ID = #{pd.USER_ID}
and
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</when>
<otherwise>
and
d.DEPARTMENT_ID in (
select
SUB_DEPARTMENT_ID
from
oa_supervision_department osd
where
osd.SUP_DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
and osd.ISDELETE = '0'
and osd.CORPINFO_ID = #{pd.CORPINFO_ID})
or f.REVIEW_USER_ID = #{pd.USER_ID}
</otherwise>
</choose>
</when>
<when test='pd.ISLEADER != null and pd.ISLEADER != "" and pd.ISLEADER == "1"'>
<choose>
<when test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
and
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</when>
<otherwise>
and
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPARTMENT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</otherwise>
</choose>
</when>
<when test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID != ''">
and d.DEPARTMENT_ID=#{pd.DEPARTMENT_ID}
and f.REVIEW_USER_ID = #{pd.USER_ID}
</when>
<otherwise>
</otherwise>
</choose>
</otherwise>
</choose>
<choose>
<when test="pd.STARTTIME != null and pd.STARTTIME != '' and pd.ENDTIME != null and pd.ENDTIME != ''">
and DATE_FORMAT(#{pd.STARTTIME},'%Y-%m-%d %H:%i:%s') &lt;= DATE_FORMAT(f.STARTTIME,'%Y-%m-%d %H:%i:%s')
and DATE_FORMAT(#{pd.ENDTIME},'%Y-%m-%d %H:%i:%s') &gt;= DATE_FORMAT(f.ENDTIME,'%Y-%m-%d %H:%i:%s')
</when>
<otherwise>
<if test="pd.STARTTIME != null and pd.STARTTIME != ''">
and DATE_FORMAT(#{pd.STARTTIME},'%Y-%m-%d %H:%i:%s') &lt;= DATE_FORMAT(f.ENDTIME,'%Y-%m-%d %H:%i:%s')
</if>
<if test="pd.ENDTIME != null and pd.ENDTIME != ''">
and DATE_FORMAT(#{pd.ENDTIME},'%Y-%m-%d %H:%i:%s') &gt;= DATE_FORMAT(f.STARTTIME,'%Y-%m-%d %H:%i:%s')
</if>
</otherwise>
</choose>
order by f.OPERATTIME desc
</select>-->
<!-- 列表(全部) -->
<select id="datalistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where f.ISDELETE = '0'
<if test="pd.FACILITY_NAME != null and pd.FACILITY_NAME != ''"><!-- 关键词检索 -->
and f.FACILITY_NAME LIKE CONCAT(CONCAT('%', #{pd.FACILITY_NAME}),'%')
</if>
<if test="pd.FACILITY_NUMBER != null and pd.FACILITY_NUMBER != ''"><!-- 关键词检索 -->
and f.FACILITY_NUMBER LIKE CONCAT(CONCAT('%', #{pd.FACILITY_NUMBER}),'%')
</if>
<if test="pd.FACILITY_LOCALTION != null and pd.FACILITY_LOCALTION != ''"><!-- 关键词检索 -->
and f.FACILITY_LOCALTION LIKE CONCAT(CONCAT('%', #{pd.FACILITY_LOCALTION}),'%')
</if>
</select>
<select id="listAll" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where f.FIREFIGHTINGMAINTAIN_ID = #{pd.FIREFIGHTINGMAINTAIN_ID}
and
f.ISDELETE = '0'
</select>
<select id="findByProductionEquipmentFacilityId" parameterType="page" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where
f.ISDELETE = '0'
AND
f.FIREFIGHTINGFACILITY_ID = #{pd.FIREFIGHTINGFACILITY_ID}
</select>
</mapper>

View File

@ -0,0 +1,372 @@
<?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.labourEntrenchThing.LabourEntrenchThingMapper">
<!--表名 -->
<sql id="tableName">
BUS_TRAFFIC_LABOUR_ENTRENCH_THING
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
SYS_DICTIONARIES
</sql>
<!-- 字段 -->
<sql id="Field">
f.PROTECTIVEEQUIPMENT_ID,
f.CORPINFO_ID,
f.PERSON_NAME,
f.MANAGING_ENTERPRISE,
f.GLOVE,
f.MASK,
f.OVERALL,
f.FOOTWARE,
f.WINTER_COAT,
f.RAINCOAT,
f.GOGGLES,
f.AID_KIT,
f.HELMET,
f.SUPPLIES,
f.MANAGING_TYPE,
f.ISDELETE,
f.CREATOR,
f.CREATORNAME,
f.CREATTIME,
f.OPERATOR,
f.OPERATORNAME,
f.OPERATTIME,
f.DELETOR,
f.DELETORNAME,
f.DELETTIME
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
PROTECTIVEEQUIPMENT_ID,
CORPINFO_ID,
PERSON_NAME,
MANAGING_ENTERPRISE,
GLOVE,
MASK,
OVERALL,
FOOTWARE,
WINTER_COAT,
RAINCOAT,
GOGGLES,
AID_KIT,
HELMET,
SUPPLIES,
MANAGING_TYPE,
ISDELETE,
CREATOR,
CREATORNAME,
CREATTIME,
OPERATOR,
OPERATORNAME,
OPERATTIME,
DELETOR,
DELETORNAME,
DELETTIME
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{PROTECTIVEEQUIPMENT_ID},
#{CORPINFO_ID},
#{PERSON_NAME},
#{MANAGING_ENTERPRISE},
#{GLOVE},
#{MASK},
#{OVERALL},
#{FOOTWARE},
#{WINTER_COAT},
#{RAINCOAT},
#{GOGGLES},
#{AID_KIT},
#{HELMET},
#{SUPPLIES},
#{MANAGING_TYPE},
#{ISDELETE},
#{CREATOR},
#{CREATORNAME},
#{CREATTIME},
#{OPERATOR},
#{OPERATORNAME},
#{OPERATTIME},
#{DELETOR},
#{DELETORNAME},
#{DELETTIME}
</sql>
<!-- 新增-->
<insert id="save" parameterType="pd">
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
) values (
<include refid="FieldValue"></include>
)
</insert>
<!-- 删除-->
<delete id="delete" parameterType="pd">
update
<include refid="tableName"></include>
set
ISDELETE = '1'
where
PROTECTIVEEQUIPMENT_ID = #{PROTECTIVEEQUIPMENT_ID}
</delete>
<!-- 修改 -->
<update id="edit" parameterType="pd">
update
<include refid="tableName"></include>
set
PROTECTIVEEQUIPMENT_ID = #{PROTECTIVEEQUIPMENT_ID},
CORPINFO_ID = #{CORPINFO_ID},
PERSON_NAME = #{PERSON_NAME},
MANAGING_ENTERPRISE = #{MANAGING_ENTERPRISE},
GLOVE = #{GLOVE},
MASK = #{MASK},
OVERALL = #{OVERALL},
FOOTWARE = #{FOOTWARE},
WINTER_COAT = #{WINTER_COAT},
RAINCOAT = #{RAINCOAT},
GOGGLES = #{GOGGLES},
AID_KIT = #{AID_KIT},
HELMET = #{HELMET},
SUPPLIES = #{SUPPLIES},
MANAGING_TYPE = #{MANAGING_TYPE},
ISDELETE = #{ISDELETE},
CREATOR = #{CREATOR},
CREATORNAME = #{CREATORNAME},
CREATTIME = #{CREATTIME},
OPERATOR = #{OPERATOR},
OPERATORNAME = #{OPERATORNAME},
OPERATTIME = #{OPERATTIME},
DELETOR = #{DELETOR},
DELETORNAME = #{DELETORNAME},
DELETTIME = #{DELETTIME}
where
PROTECTIVEEQUIPMENT_ID = #{PROTECTIVEEQUIPMENT_ID}
</update>
<!-- 通过ID获取数据 -->
<select id="findById" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where
f.PROTECTIVEEQUIPMENT_ID = #{PROTECTIVEEQUIPMENT_ID}
and
f.ISDELETE = '0'
and
f.CORPINFO_ID = #{CORPINFO_ID}
</select>
<!-- 列表 -->
<!--<select id="datalistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
left join sys_user u on u.USER_ID = f.USER_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_user ru on ru.USER_ID = f.REVIEW_USER_ID
left join oa_department rd on rd.DEPARTMENT_ID = ru.DEPARTMENT_ID
where (f.ISDELETE = '0' or (f.ISDELETE = '1' and f.REVIEW_STATUS = '-1'))
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''">&lt;!&ndash; 关键词检索 &ndash;&gt;
and
(
u.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
)
</if>
<if test="pd.REVIEW_STATUS != null and pd.REVIEW_STATUS != ''">&lt;!&ndash; 关键词检索 &ndash;&gt;
<choose>
<when test="pd.REVIEW_STATUS == 0">
and f.REVIEW_STATUS = '0'
</when>
<when test="pd.REVIEW_STATUS == 1">
and f.REVIEW_STATUS = '1'
</when>
<when test="pd.REVIEW_STATUS == 2">
and f.REVIEW_STATUS = '2'
</when>
<when test="pd.REVIEW_STATUS == -1">
and f.ISDELETE = '0' and f.REVIEW_STATUS = '-1'
</when>
<when test="pd.REVIEW_STATUS == 3">
and f.CREATOR = f.OPERATOR and f.ISDELETE = '1' and f.REVIEW_STATUS = '-1'
</when>
<when test="pd.REVIEW_STATUS == 4">
and f.CREATOR != f.OPERATOR and f.ISDELETE = '1' and f.REVIEW_STATUS = '-1'
</when>
</choose>
</if>
<if test="pd.REVIEW_USER_NAME != null and pd.REVIEW_USER_NAME != ''">&lt;!&ndash; 关键词检索 &ndash;&gt;
and ru.NAME LIKE CONCAT(CONCAT('%', #{pd.REVIEW_USER_NAME}),'%')
</if>
<if test="pd.DEPT_DOWN_ARR != null and pd.DEPT_DOWN_ARR.size() > 0">
AND d.DEPARTMENT_ID IN
<foreach item="item" collection="pd.DEPT_DOWN_ARR" open="(" separator="," close=")">
'${item}'
</foreach>
</if>
&lt;!&ndash; <if test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID != ''">关键词检索
and d.DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
</if>
&ndash;&gt;
<choose>
<when test='pd.ISMAIN != null and pd.ISMAIN != "" and pd.ISMAIN == "1"'>
<if test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
and
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</if>
</when>
<otherwise>
<choose>
<when test='pd.ISSUPERVISE != null and pd.ISSUPERVISE != "" and pd.ISSUPERVISE == "1"'>
<choose>
<when test='pd.ISLEADER != null and pd.ISLEADER != "" and pd.ISLEADER == "1"'>
<choose>
<when test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
and
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</when>
<otherwise>
and
((d.DEPARTMENT_ID in (
select
SUB_DEPARTMENT_ID
from
oa_supervision_department osd
where
osd.SUP_DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
and osd.ISDELETE = '0'
and osd.CORPINFO_ID = #{pd.CORPINFO_ID}
)) or (
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPARTMENT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
))
</otherwise>
</choose>
</when>
<when test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
or f.REVIEW_USER_ID = #{pd.USER_ID}
and
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</when>
<otherwise>
and
d.DEPARTMENT_ID in (
select
SUB_DEPARTMENT_ID
from
oa_supervision_department osd
where
osd.SUP_DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
and osd.ISDELETE = '0'
and osd.CORPINFO_ID = #{pd.CORPINFO_ID})
or f.REVIEW_USER_ID = #{pd.USER_ID}
</otherwise>
</choose>
</when>
<when test='pd.ISLEADER != null and pd.ISLEADER != "" and pd.ISLEADER == "1"'>
<choose>
<when test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
and
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</when>
<otherwise>
and
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPARTMENT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</otherwise>
</choose>
</when>
<when test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID != ''">
and d.DEPARTMENT_ID=#{pd.DEPARTMENT_ID}
and f.REVIEW_USER_ID = #{pd.USER_ID}
</when>
<otherwise>
</otherwise>
</choose>
</otherwise>
</choose>
<choose>
<when test="pd.STARTTIME != null and pd.STARTTIME != '' and pd.ENDTIME != null and pd.ENDTIME != ''">
and DATE_FORMAT(#{pd.STARTTIME},'%Y-%m-%d %H:%i:%s') &lt;= DATE_FORMAT(f.STARTTIME,'%Y-%m-%d %H:%i:%s')
and DATE_FORMAT(#{pd.ENDTIME},'%Y-%m-%d %H:%i:%s') &gt;= DATE_FORMAT(f.ENDTIME,'%Y-%m-%d %H:%i:%s')
</when>
<otherwise>
<if test="pd.STARTTIME != null and pd.STARTTIME != ''">
and DATE_FORMAT(#{pd.STARTTIME},'%Y-%m-%d %H:%i:%s') &lt;= DATE_FORMAT(f.ENDTIME,'%Y-%m-%d %H:%i:%s')
</if>
<if test="pd.ENDTIME != null and pd.ENDTIME != ''">
and DATE_FORMAT(#{pd.ENDTIME},'%Y-%m-%d %H:%i:%s') &gt;= DATE_FORMAT(f.STARTTIME,'%Y-%m-%d %H:%i:%s')
</if>
</otherwise>
</choose>
order by f.OPERATTIME desc
</select>-->
<!-- 列表(全部) -->
<select id="datalistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where f.ISDELETE = '0'
<if test="pd.PERSON_NAME != null and pd.PERSON_NAME != ''"><!-- 关键词检索 -->
and f.PERSON_NAME LIKE CONCAT(CONCAT('%', #{pd.PERSON_NAME}),'%')
</if>
</select>
<select id="listAll" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where f.PROTECTIVEEQUIPMENT_ID = '0'
</select>
<select id="operationvehicleList" parameterType="page" resultType="pd">
select
*
from
<include refid="tableName"></include> f
where f.CORPINFO_ID = #{corpId}
</select>
</mapper>

View File

@ -0,0 +1,351 @@
<?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.maintain.MaintainMapper">
<!--表名 -->
<sql id="tableName">
BUS_TRAFFIC_MAINTAIN
</sql>
<!--数据字典表名 -->
<sql id="dicTableName">
SYS_DICTIONARIES
</sql>
<!-- 字段 -->
<sql id="Field">
f.MAINTAIN_ID,
f.PRODUCTIONFACILITY_ID,
f.MAINTAIN_DATE,
f.MAINTAIN_CONDITION,
f.MAINTAIN_PERSON,
f.REMARK,
f.MAINTAIN_IMG,
f.ISDELETE,
f.CREATOR,
f.CREATORNAME,
f.CREATTIME,
f.OPERATOR,
f.OPERATORNAME,
f.OPERATTIME,
f.DELETOR,
f.DELETORNAME,
f.DELETTIME
</sql>
<!-- 字段用于新增 -->
<sql id="Field2">
MAINTAIN_ID,
PRODUCTIONFACILITY_ID,
MAINTAIN_DATE,
MAINTAIN_CONDITION,
MAINTAIN_PERSON,
REMARK,
MAINTAIN_IMG,
ISDELETE,
CREATOR,
CREATORNAME,
CREATTIME,
OPERATOR,
OPERATORNAME,
OPERATTIME,
DELETOR,
DELETORNAME,
DELETTIME
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{MAINTAIN_ID},
#{PRODUCTIONFACILITY_ID},
#{MAINTAIN_DATE},
#{MAINTAIN_CONDITION},
#{MAINTAIN_PERSON},
#{REMARK},
#{MAINTAIN_IMG},
#{ISDELETE},
#{CREATOR},
#{CREATORNAME},
#{CREATTIME},
#{OPERATOR},
#{OPERATORNAME},
#{OPERATTIME},
#{DELETOR},
#{DELETORNAME},
#{DELETTIME}
</sql>
<!-- 新增-->
<insert id="save" parameterType="pd">
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
) values (
<include refid="FieldValue"></include>
)
</insert>
<!-- 删除-->
<delete id="delete" parameterType="pd">
update
<include refid="tableName"></include> f
set
f.ISDELETE = '1' ,
f.DELETOR = #{DELETOR},
f.DELETORNAME = #{DELETORNAME},
f.DELETTIME = #{DELETTIME}
where
f.MAINTAIN_ID = #{MAINTAIN_ID}
</delete>
<!-- 修改 -->
<update id="edit" parameterType="pd">
update
<include refid="tableName"></include>
set
MAINTAIN_ID = #{MAINTAIN_ID},
PRODUCTIONFACILITY_ID = #{PRODUCTIONFACILITY_ID},
MAINTAIN_DATE = #{MAINTAIN_DATE},
MAINTAIN_CONDITION = #{MAINTAIN_CONDITION},
MAINTAIN_PERSON = #{MAINTAIN_PERSON},
REMARK = #{REMARK},
MAINTAIN_IMG = #{MAINTAIN_IMG},
ISDELETE = #{ISDELETE},
CREATOR = #{CREATOR},
CREATORNAME = #{CREATORNAME},
CREATTIME = #{CREATTIME},
OPERATOR = #{OPERATOR},
OPERATORNAME = #{OPERATORNAME},
OPERATTIME = #{OPERATTIME},
DELETOR = #{DELETOR},
DELETORNAME = #{DELETORNAME},
DELETTIME = #{DELETTIME}
where
MAINTAIN_ID = #{MAINTAIN_ID}
</update>
<!-- 通过ID获取数据 -->
<select id="findById" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where
f.MAINTAIN_ID = #{MAINTAIN_ID} and
f.ISDELETE = '0'
</select>
<!-- 列表 -->
<!--<select id="datalistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
left join sys_user u on u.USER_ID = f.USER_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_user ru on ru.USER_ID = f.REVIEW_USER_ID
left join oa_department rd on rd.DEPARTMENT_ID = ru.DEPARTMENT_ID
where (f.ISDELETE = '0' or (f.ISDELETE = '1' and f.REVIEW_STATUS = '-1'))
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
<if test="pd.KEYWORDS != null and pd.KEYWORDS != ''">&lt;!&ndash; 关键词检索 &ndash;&gt;
and
(
u.NAME LIKE CONCAT(CONCAT('%', #{pd.KEYWORDS}),'%')
)
</if>
<if test="pd.REVIEW_STATUS != null and pd.REVIEW_STATUS != ''">&lt;!&ndash; 关键词检索 &ndash;&gt;
<choose>
<when test="pd.REVIEW_STATUS == 0">
and f.REVIEW_STATUS = '0'
</when>
<when test="pd.REVIEW_STATUS == 1">
and f.REVIEW_STATUS = '1'
</when>
<when test="pd.REVIEW_STATUS == 2">
and f.REVIEW_STATUS = '2'
</when>
<when test="pd.REVIEW_STATUS == -1">
and f.ISDELETE = '0' and f.REVIEW_STATUS = '-1'
</when>
<when test="pd.REVIEW_STATUS == 3">
and f.CREATOR = f.OPERATOR and f.ISDELETE = '1' and f.REVIEW_STATUS = '-1'
</when>
<when test="pd.REVIEW_STATUS == 4">
and f.CREATOR != f.OPERATOR and f.ISDELETE = '1' and f.REVIEW_STATUS = '-1'
</when>
</choose>
</if>
<if test="pd.REVIEW_USER_NAME != null and pd.REVIEW_USER_NAME != ''">&lt;!&ndash; 关键词检索 &ndash;&gt;
and ru.NAME LIKE CONCAT(CONCAT('%', #{pd.REVIEW_USER_NAME}),'%')
</if>
<if test="pd.DEPT_DOWN_ARR != null and pd.DEPT_DOWN_ARR.size() > 0">
AND d.DEPARTMENT_ID IN
<foreach item="item" collection="pd.DEPT_DOWN_ARR" open="(" separator="," close=")">
'${item}'
</foreach>
</if>
&lt;!&ndash; <if test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID != ''">关键词检索
and d.DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
</if>
&ndash;&gt;
<choose>
<when test='pd.ISMAIN != null and pd.ISMAIN != "" and pd.ISMAIN == "1"'>
<if test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
and
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</if>
</when>
<otherwise>
<choose>
<when test='pd.ISSUPERVISE != null and pd.ISSUPERVISE != "" and pd.ISSUPERVISE == "1"'>
<choose>
<when test='pd.ISLEADER != null and pd.ISLEADER != "" and pd.ISLEADER == "1"'>
<choose>
<when test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
and
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</when>
<otherwise>
and
((d.DEPARTMENT_ID in (
select
SUB_DEPARTMENT_ID
from
oa_supervision_department osd
where
osd.SUP_DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
and osd.ISDELETE = '0'
and osd.CORPINFO_ID = #{pd.CORPINFO_ID}
)) or (
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPARTMENT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
))
</otherwise>
</choose>
</when>
<when test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
or f.REVIEW_USER_ID = #{pd.USER_ID}
and
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</when>
<otherwise>
and
d.DEPARTMENT_ID in (
select
SUB_DEPARTMENT_ID
from
oa_supervision_department osd
where
osd.SUP_DEPARTMENT_ID = #{pd.DEPARTMENT_ID}
and osd.ISDELETE = '0'
and osd.CORPINFO_ID = #{pd.CORPINFO_ID})
or f.REVIEW_USER_ID = #{pd.USER_ID}
</otherwise>
</choose>
</when>
<when test='pd.ISLEADER != null and pd.ISLEADER != "" and pd.ISLEADER == "1"'>
<choose>
<when test="pd.DEPT_IDS != null and pd.DEPT_IDS != ''">
and
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</when>
<otherwise>
and
d.DEPARTMENT_ID in
<foreach item="item" index="index"
collection="pd.DEPARTMENT_IDS" open="(" separator="," close=")">
'${item}'
</foreach>
</otherwise>
</choose>
</when>
<when test="pd.DEPARTMENT_ID != null and pd.DEPARTMENT_ID != ''">
and d.DEPARTMENT_ID=#{pd.DEPARTMENT_ID}
and f.REVIEW_USER_ID = #{pd.USER_ID}
</when>
<otherwise>
</otherwise>
</choose>
</otherwise>
</choose>
<choose>
<when test="pd.STARTTIME != null and pd.STARTTIME != '' and pd.ENDTIME != null and pd.ENDTIME != ''">
and DATE_FORMAT(#{pd.STARTTIME},'%Y-%m-%d %H:%i:%s') &lt;= DATE_FORMAT(f.STARTTIME,'%Y-%m-%d %H:%i:%s')
and DATE_FORMAT(#{pd.ENDTIME},'%Y-%m-%d %H:%i:%s') &gt;= DATE_FORMAT(f.ENDTIME,'%Y-%m-%d %H:%i:%s')
</when>
<otherwise>
<if test="pd.STARTTIME != null and pd.STARTTIME != ''">
and DATE_FORMAT(#{pd.STARTTIME},'%Y-%m-%d %H:%i:%s') &lt;= DATE_FORMAT(f.ENDTIME,'%Y-%m-%d %H:%i:%s')
</if>
<if test="pd.ENDTIME != null and pd.ENDTIME != ''">
and DATE_FORMAT(#{pd.ENDTIME},'%Y-%m-%d %H:%i:%s') &gt;= DATE_FORMAT(f.STARTTIME,'%Y-%m-%d %H:%i:%s')
</if>
</otherwise>
</choose>
order by f.OPERATTIME desc
</select>-->
<!-- 列表(全部) -->
<select id="datalistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where f.ISDELETE = '0'
<if test="pd.FACILITY_NAME != null and pd.FACILITY_NAME != ''"><!-- 关键词检索 -->
and f.FACILITY_NAME LIKE CONCAT(CONCAT('%', #{pd.FACILITY_NAME}),'%')
</if>
<if test="pd.FACILITY_NUMBER != null and pd.FACILITY_NUMBER != ''"><!-- 关键词检索 -->
and f.FACILITY_NUMBER LIKE CONCAT(CONCAT('%', #{pd.FACILITY_NUMBER}),'%')
</if>
<if test="pd.FACILITY_LOCALTION != null and pd.FACILITY_LOCALTION != ''"><!-- 关键词检索 -->
and f.FACILITY_LOCALTION LIKE CONCAT(CONCAT('%', #{pd.FACILITY_LOCALTION}),'%')
</if>
</select>
<select id="listAll" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where f.MAINTAIN_ID = #{pd.MAINTAIN_ID}
and
f.ISDELETE = '0'
</select>
<select id="findByProductionEquipmentFacilityId" parameterType="page" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where
f.ISDELETE = '0'
AND
f.PRODUCTIONFACILITY_ID = #{pd.PRODUCTIONFACILITY_ID}
</select>
</mapper>

View File

@ -511,5 +511,14 @@
and f.ISDELETE = '0'
</select>
<!-- 所属企业列表 -->
<select id="corpList" parameterType="page" resultType="pd">
select
*
from
bus_corp_info f
where f.ISDELETE = '0' and f.CORPINFO_ID = #{corpId}
</select>
</mapper>

View File

@ -0,0 +1,202 @@
<?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.reportedIncident.ReportedIncidentMapper">
<!--表名 -->
<sql id="tableName">
BUS_TRAFFIC_REPORTED_INCIDENT
</sql>
<sql id="Field">
f.REPORTEDINCIDENT_ID,
f.CORPINFO_ID,
f.REPORTPERSON,
f.DISPOSE_RESULT,
f.DISPOSE_STATUS,
f.REPORTED_DATE,
f.REPORTED_CONTENT,
f.REPORTED_TIME,
f.DISPOSE_DATE,
f.MANAGING_ENTERPRISE,
f.MANAGING_TYPE,
f.ISDELETE,
f.CREATOR,
f.CREATORNAME,
f.CREATTIME,
f.OPERATOR,
f.OPERATORNAME,
f.OPERATTIME,
f.DELETOR,
f.DELETORNAME,
f.DELETTIME
</sql>
<!-- 字段 -->
<sql id="Field2">
REPORTEDINCIDENT_ID,
CORPINFO_ID,
REPORTPERSON,
DISPOSE_RESULT,
DISPOSE_STATUS,
REPORTED_DATE,
REPORTED_CONTENT,
REPORTED_TIME,
DISPOSE_DATE,
MANAGING_ENTERPRISE,
MANAGING_TYPE,
ISDELETE,
CREATOR,
CREATORNAME,
CREATTIME,
OPERATOR,
OPERATORNAME,
OPERATTIME,
DELETOR,
DELETORNAME,
DELETTIME
</sql>
<!-- 字段值 -->
<sql id="FieldValue">
#{REPORTEDINCIDENT_ID},
#{CORPINFO_ID},
#{REPORTPERSON},
#{DISPOSE_RESULT},
#{DISPOSE_STATUS},
#{REPORTED_DATE},
#{REPORTED_CONTENT},
#{REPORTED_TIME},
#{DISPOSE_DATE},
#{MANAGING_ENTERPRISE},
#{MANAGING_TYPE},
#{ISDELETE},
#{CREATOR},
#{CREATORNAME},
#{CREATTIME},
#{OPERATOR},
#{OPERATORNAME},
#{OPERATTIME},
#{DELETOR},
#{DELETORNAME},
#{DELETTIME}
</sql>
<!-- 新增-->
<insert id="save" parameterType="pd">
insert into
<include refid="tableName"></include>
(
<include refid="Field2"></include>
) values (
<include refid="FieldValue"></include>
)
</insert>
<!-- 删除-->
<delete id="delete" parameterType="pd">
update
<include refid="tableName"></include>
set
ISDELETE = '1',
DELETOR = #{DELETOR},
DELETORNAME = #{DELETORNAME},
DELETTIME = #{DELETTIME}
where
REPORTEDINCIDENT_ID = #{REPORTEDINCIDENT_ID}
</delete>
<!-- 修改 -->
<update id="edit" parameterType="pd">
update
<include refid="tableName"></include>
set
REPORTEDINCIDENT_ID = #{REPORTEDINCIDENT_ID},
CORPINFO_ID = #{CORPINFO_ID},
REPORTPERSON = #{REPORTPERSON},
DISPOSE_RESULT = #{DISPOSE_RESULT},
DISPOSE_STATUS = #{DISPOSE_STATUS},
REPORTED_DATE = #{REPORTED_DATE},
REPORTED_CONTENT = #{REPORTED_CONTENT},
REPORTED_TIME = #{REPORTED_TIME},
DISPOSE_DATE = #{DISPOSE_DATE},
MANAGING_ENTERPRISE = #{MANAGING_ENTERPRISE},
MANAGING_TYPE = #{MANAGING_TYPE},
ISDELETE = #{ISDELETE},
CREATOR = #{CREATOR},
CREATORNAME = #{CREATORNAME},
CREATTIME = #{CREATTIME},
OPERATOR = #{OPERATOR},
OPERATORNAME = #{OPERATORNAME},
OPERATTIME = #{OPERATTIME},
DELETOR = #{DELETOR},
DELETORNAME = #{DELETORNAME},
DELETTIME = #{DELETTIME}
where
REPORTEDINCIDENT_ID = #{REPORTEDINCIDENT_ID}
</update>
<!-- 通过ID获取数据 -->
<select id="findById" parameterType="pd" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where
f.REPORTEDINCIDENT_ID = #{REPORTEDINCIDENT_ID} and
f.ISDELETE = '0' AND
f.CORPINFO_ID = #{CORPINFO_ID}
</select>
<!-- 列表 -->
<!-- 列表(全部) -->
<select id="datalistPage" parameterType="page" resultType="pd">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
where f.ISDELETE = '0'
<if test="pd.REPORTPERSON != null and pd.REPORTPERSON != ''"><!-- 关键词检索 -->
and f.REPORTPERSON LIKE CONCAT(CONCAT('%', #{pd.REPORTPERSON}),'%')
</if>
<if test="pd.DISPOSE_STATUS != null and pd.DISPOSE_STATUS != ''"><!-- 关键词检索 -->
and f.DISPOSE_STATUS = #{pd.DISPOSE_STATUS}
</if>
<if test="pd.REPORTED_DATE != null and pd.REPORTED_DATE != ''"><!-- 关键词检索 -->
and f.REPORTED_DATE = #{pd.REPORTED_DATE}
</if>
</select>
<!-- 所属企业列表 -->
<select id="corpList" parameterType="page" resultType="pd">
select
*
from
bus_corp_info f
where f.ISDELETE = '0' and f.CORPINFO_ID = #{corpId}
</select>
<!-- 货运挂车列表ALL -->
<select id="trailerList" parameterType="page" resultType="pd">
select
*
from
<include refid="tableName"></include> f
where f.ISDELETE = '0' and f.CORPINFO_ID = #{corpId}
</select>
<!-- 货运挂车列表ALL -->
<select id="vehicleList" parameterType="page" resultType="pd">
select
*
from
v_traffic f
where f.CORPINFO_ID = #{CORPINFO_ID}
<if test="TRAFFIC_TYPE != null and TRAFFIC_TYPE != ''">
and f.TRAFFIC_TYPE = #{TRAFFIC_TYPE}
</if>
<if test="ID != null and ID != ''">
and f.ID = #{ID}
</if>
</select>
</mapper>

View File

@ -53,7 +53,8 @@
f.OPERATTIME,
f.DELETOR,
f.DELETORNAME,
f.DELETTIME
f.DELETTIME,
f.FREIGHTTRAILER_ID
</sql>
<!-- 字段用于新增 -->
@ -97,7 +98,8 @@
OPERATTIME,
DELETOR,
DELETORNAME,
DELETTIME
DELETTIME,
FREIGHTTRAILER_ID
</sql>
<!-- 字段值 -->
@ -141,7 +143,8 @@
#{OPERATTIME},
#{DELETOR},
#{DELETORNAME},
#{DELETTIME}
#{DELETTIME},
#{FREIGHTTRAILER_ID}
</sql>
<!-- 新增-->
@ -209,7 +212,8 @@
OPERATTIME = #{OPERATTIME},
DELETOR = #{DELETOR},
DELETORNAME = #{DELETORNAME},
DELETTIME = #{DELETTIME}
DELETTIME = #{DELETTIME},
FREIGHTTRAILER_ID = #{FREIGHTTRAILER_ID}
where
TAXATION_ID = #{TAXATION_ID}
</update>