diff --git a/src/main/java/com/zcloud/controller/eightwork/EightWorkVideoManagerController.java b/src/main/java/com/zcloud/controller/eightwork/EightWorkVideoManagerController.java new file mode 100644 index 0000000..3736e51 --- /dev/null +++ b/src/main/java/com/zcloud/controller/eightwork/EightWorkVideoManagerController.java @@ -0,0 +1,258 @@ +package com.zcloud.controller.eightWork; + +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.eightWork.EightWorkVideoManagerService; +import com.zcloud.service.video.VideoManagerService; +import com.zcloud.util.DateUtil; +import com.zcloud.util.Jurisdiction; +import com.zcloud.util.ObjectExcelView; +import com.zcloud.util.Tools; +import org.apache.shiro.authz.annotation.RequiresPermissions; +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 org.springframework.web.servlet.ModelAndView; + +import java.util.*; + +/** + * 说明:盲板作业 + * 作者:luoxiaobao + * 时间:2021-08-23 + * 官网:www.zcloudchina.com + */ +@Controller +@RequestMapping("/eightworkvideomanager") +public class EightWorkVideoManagerController extends BaseController { + + @Autowired + private EightWorkVideoManagerService eightworkvideomanagerService; + @Autowired + private VideoManagerService videomanagerService; + + + /**新增 + * @param + * @throws Exception + */ + @RequestMapping(value="/add") + @ResponseBody + public Object add() throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd.put("EIGHTWORKVIDEOMANAGER_ID", this.get32UUID()); //主键 + pd.put("CREATOR", Jurisdiction.getUsername()); //添加人 + pd.put("CREATTIME", DateUtil.date2Str(new Date())); //创建时间 + pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人 + pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + pd.put("ISDELETE", "0"); + eightworkvideomanagerService.save(pd); + map.put("result", errInfo); + return map; + } + + /**去修改页面获取数据 + * @param + * @throws Exception + */ + @RequestMapping(value="/goEdit") + @ResponseBody + public Object goEdit() throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd = eightworkvideomanagerService.findById(pd); //根据ID读取 + map.put("pd", pd); + map.put("result", errInfo); + return map; + } + + /**删除 + * @param out + * @throws Exception + */ + @RequestMapping(value="/delete") + @ResponseBody + public Object delete() throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + eightworkvideomanagerService.delete(pd); + map.put("result", errInfo); //返回结果 + return map; + } + + /**修改 + * @param + * @throws Exception + */ + @RequestMapping(value="/edit") + @ResponseBody + public Object edit() throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + eightworkvideomanagerService.edit(pd); + map.put("result", errInfo); + return map; + } + + /**列表 + * @param page + * @throws Exception + */ + @RequestMapping(value="/list") + @ResponseBody + @LogAnno(menuType= "高危作业管理",menuServer= "盲板作业管理",instructionsOperate = "盲板作业数据",instructionsType = "列表") + public Object list(Page page) throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件 + if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim()); + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID + pd.put("ISMAIN", Jurisdiction.getIS_MAIN()); + pd.put("ISSUPERVISE", Jurisdiction.getISSUPERVISE()); + pd.put("DEPARTMENT_ID", Jurisdiction.getDEPARTMENT_ID()); + String DEPTIDS = pd.getString("DEPTIDS"); + if(Tools.notEmpty(DEPTIDS)) { + String DEPT_IDS[] = DEPTIDS.split(","); + pd.put("DEPT_IDS", DEPT_IDS); + } + page.setPd(pd); + List varList = eightworkvideomanagerService.list(page); //列出eightworkvideomanager列表 + map.put("varList", varList); + map.put("page", page); + map.put("result", errInfo); + return map; + } + + /**批量删除 + * @param + * @throws Exception + */ + @RequestMapping(value="/deleteAll") + @ResponseBody + public Object deleteAll() throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + String DATA_IDS = pd.getString("DATA_IDS"); + if(Tools.notEmpty(DATA_IDS)){ + String ArrayDATA_IDS[] = DATA_IDS.split(","); + eightworkvideomanagerService.deleteAll(ArrayDATA_IDS); + errInfo = "success"; + }else{ + errInfo = "error"; + } + map.put("result", errInfo); //返回结果 + return map; + } + + /**导出到excel + * @param + * @throws Exception + */ + @RequestMapping(value="/excel") + @RequiresPermissions("toExcel") + public ModelAndView exportExcel() throws Exception{ + ModelAndView mv = new ModelAndView(); + PageData pd = new PageData(); + pd = this.getPageData(); + Map dataMap = new HashMap(); + List titles = new ArrayList(); + titles.add("设备管线名"); //1 + titles.add("所属企业"); //2 + titles.add("申请部门"); //3 + titles.add("申请人"); //4 + titles.add("删除标志"); //5 + titles.add("创建时间"); //6 + titles.add("添加人"); //7 + titles.add("修改时间"); //8 + titles.add("修改人"); //9 + titles.add("编号"); //10 + titles.add("申请单位负责人签字"); //11 + titles.add("申请单位负责人签字时间"); //12 + titles.add("介质"); //13 + titles.add("温度"); //14 + titles.add("施工单位"); //15 + titles.add("施工单位人"); //16 + titles.add("施工单位签字"); //17 + titles.add("施工单位签字时间"); //18 + titles.add("生产部门"); //19 + titles.add("生产部门人"); //20 + titles.add("生产部门签字"); //21 + titles.add("生产部门签字时间"); //22 + titles.add("安全部门"); //23 + titles.add("安全部门人"); //24 + titles.add("安全部门签字"); //25 + titles.add("安全部门签字时间"); //26 + titles.add("领导人部门"); //27 + titles.add("领导人"); //28 + titles.add("领导人签字"); //29 + titles.add("领导人签字时间"); //30 + titles.add("验收部门"); //31 + titles.add("验收人"); //32 + titles.add("验收签字"); //33 + titles.add("验收签字时间"); //34 + titles.add("状态"); //35 + dataMap.put("titles", titles); + List varOList = eightworkvideomanagerService.listAll(pd); + List varList = new ArrayList(); + for(int i=0;i datalistPage(Page page); + + + /**列表(全部) + * @param pd + * @throws Exception + */ + List listAll(PageData pd); + + /**通过id获取数据 + * @param pd + * @throws Exception + */ + PageData findById(PageData pd); + + /**批量删除 + * @param ArrayDATA_IDS + * @throws Exception + */ + void deleteAll(String[] ArrayDATA_IDS); + +} + diff --git a/src/main/java/com/zcloud/service/eightwork/EightWorkVideoManagerService.java b/src/main/java/com/zcloud/service/eightwork/EightWorkVideoManagerService.java new file mode 100644 index 0000000..5970e75 --- /dev/null +++ b/src/main/java/com/zcloud/service/eightwork/EightWorkVideoManagerService.java @@ -0,0 +1,67 @@ +package com.zcloud.service.eightWork; + +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; + +import java.util.List; + +/** + * 说明:盲板作业 + * 作者:luoxiaobao + * 时间:2021-08-23 + * 官网:www.zcloudchina.com + */ +public interface EightWorkVideoManagerService { + + /**新增 + * @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 pd + * @throws Exception + */ + public void editStatus(PageData pd)throws Exception; + + + /**列表 + * @param page + * @throws Exception + */ + public List list(Page page)throws Exception; + + /**列表(全部) + * @param pd + * @throws Exception + */ + public List listAll(PageData pd)throws Exception; + + /**通过id获取数据 + * @param pd + * @throws Exception + */ + public PageData findById(PageData pd)throws Exception; + + /**批量删除 + * @param ArrayDATA_IDS + * @throws Exception + */ + public void deleteAll(String[] ArrayDATA_IDS)throws Exception; + + +} + diff --git a/src/main/java/com/zcloud/service/eightwork/impl/EightWorkVideoManagerServiceImpl.java b/src/main/java/com/zcloud/service/eightwork/impl/EightWorkVideoManagerServiceImpl.java new file mode 100644 index 0000000..e94faf3 --- /dev/null +++ b/src/main/java/com/zcloud/service/eightwork/impl/EightWorkVideoManagerServiceImpl.java @@ -0,0 +1,93 @@ +package com.zcloud.service.eightWork.impl; + +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; +import com.zcloud.mapper.datasource.eightWork.EightWorkVideoManagerMapper; +import com.zcloud.service.eightWork.EightWorkVideoManagerService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +/** + * 说明:盲板作业 + * 作者:luoxiaobao + * 时间:2021-08-23 + * 官网:www.zcloudchina.com + */ +@Service +@Transactional //开启事物 +public class EightWorkVideoManagerServiceImpl implements EightWorkVideoManagerService { + + @Autowired + private EightWorkVideoManagerMapper eightworkvideomanagerMapper; + + /**新增 + * @param pd + * @throws Exception + */ + public void save(PageData pd)throws Exception{ + eightworkvideomanagerMapper.save(pd); + } + + /**删除 + * @param pd + * @throws Exception + */ + public void delete(PageData pd)throws Exception{ + eightworkvideomanagerMapper.delete(pd); + } + + /**修改 + * @param pd + * @throws Exception + */ + public void edit(PageData pd)throws Exception{ + eightworkvideomanagerMapper.edit(pd); + } + + /**修改 + * @param pd + * @throws Exception + */ + public void editStatus(PageData pd)throws Exception{ + eightworkvideomanagerMapper.editStatus(pd); + } + + /**列表 + * @param page + * @throws Exception + */ + public List list(Page page)throws Exception{ + return eightworkvideomanagerMapper.datalistPage(page); + } + + /**列表(全部) + * @param pd + * @throws Exception + */ + public List listAll(PageData pd)throws Exception{ + return eightworkvideomanagerMapper.listAll(pd); + } + + /**通过id获取数据 + * @param pd + * @throws Exception + */ + public PageData findById(PageData pd)throws Exception{ + return eightworkvideomanagerMapper.findById(pd); + } + + /**批量删除 + * @param ArrayDATA_IDS + * @throws Exception + */ + public void deleteAll(String[] ArrayDATA_IDS)throws Exception{ + eightworkvideomanagerMapper.deleteAll(ArrayDATA_IDS); + } + + + +} + diff --git a/src/main/resources/mybatis/datasource/eightwork/EightWorkVideoManagerMapper.xml b/src/main/resources/mybatis/datasource/eightwork/EightWorkVideoManagerMapper.xml new file mode 100644 index 0000000..dfa499c --- /dev/null +++ b/src/main/resources/mybatis/datasource/eightwork/EightWorkVideoManagerMapper.xml @@ -0,0 +1,205 @@ + + + + + + + BUS_EIGHTWORK_VIDEOMANAGER + + + + + SYS_DICTIONARIES + + + + + f.EIGHTWORKVIDEOMANAGER_ID, + f.CORPINFO_ID, + f.VIDEOMANAGER_ID, + f.CREATTIME, + f.CREATOR, + f.ISDELETE, + f.OPERATTIME, + f.OPERATOR, + f.LONGITUDE, + f.LATITUDE, + f.CHECK_NO + + + + + EIGHTWORKVIDEOMANAGER_ID, + CORPINFO_ID, + VIDEOMANAGER_ID, + CREATTIME, + CREATOR, + ISDELETE, + OPERATTIME, + OPERATOR, + LONGITUDE, + LATITUDE, + CHECK_NO + + + + + #{EIGHTWORKVIDEOMANAGER_ID}, + #{CORPINFO_ID}, + #{VIDEOMANAGER_ID}, + #{CREATTIME}, + #{CREATOR}, + #{ISDELETE}, + #{OPERATTIME}, + #{OPERATOR}, + #{LONGITUDE}, + #{LATITUDE}, + #{CHECK_NO} + + + + + insert into + + ( + + ) values ( + + ) + + + + + update + + set + ISDELETE = '1' + where + EIGHTWORKVIDEOMANAGER_ID = #{EIGHTWORKVIDEOMANAGER_ID} + + + + + update + + set + EIGHTWORKVIDEOMANAGER_ID = #{EIGHTWORKVIDEOMANAGER_ID}, + CORPINFO_ID = #{CORPINFO_ID}, + VIDEOMANAGER_ID = #{VIDEOMANAGER_ID}, + ISDELETE = #{ISDELETE}, + CREATTIME = #{CREATTIME}, + CREATOR = #{CREATOR}, + OPERATTIME = #{OPERATTIME}, + OPERATOR = #{OPERATOR}, + LONGITUDE = #{LONGITUDE}, + LATITUDE = #{LATITUDE}, + CHECK_NO = #{CHECK_NO} + + where + EIGHTWORKVIDEOMANAGER_ID = #{EIGHTWORKVIDEOMANAGER_ID} + + + + + update + + set + ISDELETE = '1' + where + CHECK_NO = #{CHECK_NO} + + + + + + + + + + + + + update + + set + ISDELETE = '1' + where + EIGHTWORKVIDEOMANAGER_ID in + + #{item} + + + + +