From b42220961cfdfd2189641078e7b68d2ae5a93be7 Mon Sep 17 00:00:00 2001 From: sunjianxi <839419401@qq.com> Date: Fri, 26 Apr 2024 11:12:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mingsoft/cms/action/CmsSignAction.java | 76 +- .../mingsoft/cms/action/ContentAction.java | 43 +- .../mingsoft/cms/action/DutyPoliceAction.java | 137 ++++ .../cms/action/DutyStandbyAction.java | 5 +- .../cms/action/PhoneContactsAction.java | 5 - .../cms/action/web/CmsSignAction.java | 151 ++++ .../cms/action/web/DutyPoliceAction.java | 84 +++ .../cms/action/web/DutyStandbyAction.java | 13 +- .../cms/action/web/PhoneContactsAction.java | 9 +- .../net/mingsoft/cms/biz/ICmsSignBiz.java | 2 +- .../net/mingsoft/cms/biz/IDutyPoliceBiz.java | 44 ++ .../mingsoft/cms/biz/impl/CmsSignBizImpl.java | 4 + .../cms/biz/impl/DutyPoliceBizImpl.java | 73 ++ .../net/mingsoft/cms/dao/ICmsSignDao.java | 3 +- .../java/net/mingsoft/cms/dao/ICmsSignDao.xml | 8 + .../net/mingsoft/cms/dao/IDutyPoliceDao.java | 46 ++ .../net/mingsoft/cms/dao/IDutyPoliceDao.xml | 104 +++ .../mingsoft/cms/entity/CmsSignEntity.java | 1 - .../mingsoft/cms/entity/DutyPoliceEntity.java | 119 ++++ .../mingsoft/cms/excel/DutyPoliceExcel.java | 81 +++ .../WEB-INF/manager/cms/content/form.ftl | 115 ++- .../template/1/default/chuhuijiyao-detail.htm | 267 +++---- .../webapp/template/1/default/css/header.css | 6 +- src/main/webapp/template/1/default/index.htm | 664 +++++++++--------- .../webapp/template/1/default/tongxunlu.htm | 6 +- .../1/default/zhibanbeiqing-detail.htm | 6 +- .../template/1/default/zhibanbeiqing-list.htm | 441 +++++++----- 27 files changed, 1803 insertions(+), 710 deletions(-) create mode 100644 src/main/java/net/mingsoft/cms/action/DutyPoliceAction.java create mode 100644 src/main/java/net/mingsoft/cms/action/web/CmsSignAction.java create mode 100644 src/main/java/net/mingsoft/cms/action/web/DutyPoliceAction.java create mode 100644 src/main/java/net/mingsoft/cms/biz/IDutyPoliceBiz.java create mode 100644 src/main/java/net/mingsoft/cms/biz/impl/DutyPoliceBizImpl.java create mode 100644 src/main/java/net/mingsoft/cms/dao/IDutyPoliceDao.java create mode 100644 src/main/java/net/mingsoft/cms/dao/IDutyPoliceDao.xml create mode 100644 src/main/java/net/mingsoft/cms/entity/DutyPoliceEntity.java create mode 100644 src/main/java/net/mingsoft/cms/excel/DutyPoliceExcel.java diff --git a/src/main/java/net/mingsoft/cms/action/CmsSignAction.java b/src/main/java/net/mingsoft/cms/action/CmsSignAction.java index 2bf14bb5..8758a354 100644 --- a/src/main/java/net/mingsoft/cms/action/CmsSignAction.java +++ b/src/main/java/net/mingsoft/cms/action/CmsSignAction.java @@ -66,13 +66,52 @@ public class CmsSignAction extends BaseAction{ @Autowired private IManagerBiz managerBiz; + /** + * 获取账号 + * @param + */ + @ApiOperation(value = "获取账号列表接口") + @GetMapping ("/getManagerList") + @ResponseBody + public ResultData getManagerList() { + //查询所有部门用户 + List managerList = managerBiz.list(); + List managers = managerList.stream().filter(manager -> !manager.getManagerName().equals("msopen")).map(ManagerEntity::getManagerNickName).collect(Collectors.toList()); + return ResultData.build().success(managers); + } + + /** + * 保存需签收科室 + * @param + */ + @ApiOperation(value = "保存需签收科室接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "cmsSigns", value = "需签收科室列表", required =true,paramType="query"), + }) + @PostMapping("/saveList") + @ResponseBody + @LogAnn(title = "保存需签收科室", businessType = BusinessTypeEnum.INSERT) + public ResultData saveList(@RequestBody List cmsSigns) { + //把之前选的删掉 + String contentId = cmsSigns.get(0).getContentId(); + cmsSignBiz.deleteByContentId(contentId); + //循环插入新的 + for(CmsSignEntity cmsSign : cmsSigns){ + cmsSign.setIsSign("0"); + cmsSign.setCreateDate(new Date()); + cmsSign.setCreateBy(BasicUtil.getManager().getId()); + cmsSignBiz.save(cmsSign); + } + return ResultData.build().success("保存成功!"); + } + /** - * 保存文章牵手 + * 保存文章签收 * @param cmsSign 文章实体 */ - @ApiOperation(value = "保存文章列表接口") + @ApiOperation(value = "保存文章签收接口") @ApiImplicitParams({ @ApiImplicitParam(name = "contentId", value = "文章关联id", required =true,paramType="query"), @ApiImplicitParam(name = "managerName", value = "用户名", required =false,paramType="query"), @@ -81,9 +120,14 @@ public class CmsSignAction extends BaseAction{ @ResponseBody @LogAnn(title = "保存文章签收", businessType = BusinessTypeEnum.INSERT) public ResultData save(@ModelAttribute @ApiIgnore CmsSignEntity cmsSign) { - cmsSign.setCreateDate(new Date()); - cmsSign.setCreateBy(BasicUtil.getManager().getId()); - cmsSignBiz.save(cmsSign); + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(CmsSignEntity::getContentId,cmsSign.getContentId()); + wrapper.eq(CmsSignEntity::getManagerName,cmsSign.getManagerName()); + cmsSign = cmsSignBiz.getOne(wrapper); + cmsSign.setIsSign("1"); + cmsSign.setUpdateDate(new Date()); + cmsSign.setUpdateBy(BasicUtil.getManager().getId()); + cmsSignBiz.updateById(cmsSign); return ResultData.build().success("保存成功!"); } @@ -102,29 +146,11 @@ public class CmsSignAction extends BaseAction{ @RequestMapping(value = "/list",method = {RequestMethod.GET,RequestMethod.POST}) @ResponseBody public ResultData list(@ModelAttribute @ApiIgnore CmsSignEntity cmsSign) { - //查询已经签收的部门用户 + //查询签收列表 LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); wrapper.eq(CmsSignEntity::getContentId,cmsSign.getContentId()); List contentList = cmsSignBiz.list(wrapper); - List singList = contentList.stream().map(CmsSignEntity::getManagerName).collect(Collectors.toList()); - //查询所有部门用户 - List managerList = managerBiz.list(); - List managers = managerList.stream().map(ManagerEntity::getManagerNickName).collect(Collectors.toList()); - List list = new ArrayList<>(); - for(String manager : managers){ - if(manager.equals("msopen")){ - continue; - } - CmsSignEntity entity = new CmsSignEntity(); - entity.setManagerName(manager); - if(singList.contains(manager)){ - entity.setIsSign("1"); - }else{ - entity.setIsSign("0"); - } - list.add(entity); - } - return ResultData.build().success(list); + return ResultData.build().success(contentList); } } diff --git a/src/main/java/net/mingsoft/cms/action/ContentAction.java b/src/main/java/net/mingsoft/cms/action/ContentAction.java index d82659cd..461974c4 100755 --- a/src/main/java/net/mingsoft/cms/action/ContentAction.java +++ b/src/main/java/net/mingsoft/cms/action/ContentAction.java @@ -37,9 +37,11 @@ import net.mingsoft.basic.util.StringUtil; import net.mingsoft.cms.bean.ContentBean; import net.mingsoft.cms.biz.ICategoryBiz; import net.mingsoft.cms.biz.IContentBiz; +import net.mingsoft.cms.biz.IDutyPoliceBiz; import net.mingsoft.cms.biz.IDutyStandbyBiz; import net.mingsoft.cms.entity.CategoryEntity; import net.mingsoft.cms.entity.ContentEntity; +import net.mingsoft.cms.entity.DutyPoliceEntity; import net.mingsoft.cms.entity.DutyStandbyEntity; import net.mingsoft.mdiy.biz.IModelBiz; import net.mingsoft.mdiy.entity.ModelEntity; @@ -86,6 +88,9 @@ public class ContentAction extends BaseAction { @Autowired private IDutyStandbyBiz dutyStandbyBiz; + @Autowired + private IDutyPoliceBiz dutyPoliceBiz; + /** * 返回主界面index */ @@ -243,14 +248,24 @@ public class ContentAction extends BaseAction { } contentBiz.save(content); + //获取栏目实体 + CategoryEntity categoryEntity = categoryBiz.getById(content.getCategoryId()); //值班备勤需要将文章Id存到值班备勤表中 - if("1773193604170002434".equals(content.getCategoryId())){ + if("值班备勤".equals(categoryEntity.getCategoryTitle())){ List dutyStandbyEntityList = dutyStandbyBiz.list(new LambdaQueryWrapper().eq(DutyStandbyEntity::getFilePath,content.getFilePath())); for(DutyStandbyEntity dutyStandbyEntity : dutyStandbyEntityList){ dutyStandbyEntity.setContentId(content.getId()); dutyStandbyBiz.updateById(dutyStandbyEntity); } } + //值日警官需要将文章Id存到值日警官表中 + if("值日警官".equals(categoryEntity.getCategoryTitle())){ + List dutyPoliceEntityList = dutyPoliceBiz.list(new LambdaQueryWrapper().eq(DutyPoliceEntity::getFilePath,content.getFilePath())); + for(DutyPoliceEntity dutyPoliceEntity : dutyPoliceEntityList){ + dutyPoliceEntity.setContentId(content.getId()); + dutyPoliceBiz.updateById(dutyPoliceEntity); + } + } return ResultData.build().success(content); } @@ -287,6 +302,8 @@ public class ContentAction extends BaseAction { contentBiz.removeByIds(ids); //如果是值班备勤,删除对应值班备勤数据 dutyStandbyBiz.deleteByContentIds(ids); + //如果是值日警官,删除对应值日警官数据 + dutyPoliceBiz.deleteByContentIds(ids); return ResultData.build().success(); } @@ -338,14 +355,24 @@ public class ContentAction extends BaseAction { return ResultData.build().error(getResString("err.empty", this.getResString("content.datetime"))); } contentBiz.saveOrUpdate(content); - //值班备勤需要将文章Id存到值班备勤表中 - if("1773193604170002434".equals(content.getCategoryId())){ - List dutyStandbyEntityList = dutyStandbyBiz.list(new LambdaQueryWrapper().eq(DutyStandbyEntity::getFilePath,content.getFilePath())); - for(DutyStandbyEntity dutyStandbyEntity : dutyStandbyEntityList){ - dutyStandbyEntity.setContentId(content.getId()); - dutyStandbyBiz.updateById(dutyStandbyEntity); - } + //获取栏目实体 + CategoryEntity categoryEntity = categoryBiz.getById(content.getCategoryId()); + //值班备勤需要将文章Id存到值班备勤表中 + if("值班备勤".equals(categoryEntity.getCategoryTitle())){ + List dutyStandbyEntityList = dutyStandbyBiz.list(new LambdaQueryWrapper().eq(DutyStandbyEntity::getFilePath,content.getFilePath())); + for(DutyStandbyEntity dutyStandbyEntity : dutyStandbyEntityList){ + dutyStandbyEntity.setContentId(content.getId()); + dutyStandbyBiz.updateById(dutyStandbyEntity); + } + } + //值日警官需要将文章Id存到值日警官表中 + if("值日警官".equals(categoryEntity.getCategoryTitle())){ + List dutyPoliceEntityList = dutyPoliceBiz.list(new LambdaQueryWrapper().eq(DutyPoliceEntity::getFilePath,content.getFilePath())); + for(DutyPoliceEntity dutyPoliceEntity : dutyPoliceEntityList){ + dutyPoliceEntity.setContentId(content.getId()); + dutyPoliceBiz.updateById(dutyPoliceEntity); } + } return ResultData.build().success(content); } diff --git a/src/main/java/net/mingsoft/cms/action/DutyPoliceAction.java b/src/main/java/net/mingsoft/cms/action/DutyPoliceAction.java new file mode 100644 index 00000000..e46b9e58 --- /dev/null +++ b/src/main/java/net/mingsoft/cms/action/DutyPoliceAction.java @@ -0,0 +1,137 @@ +/** + * The MIT License (MIT) + * Copyright (c) 2012-present 铭软科技(mingsoft.net) + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +package net.mingsoft.cms.action; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import net.mingsoft.base.entity.ResultData; +import net.mingsoft.basic.action.BaseFileAction; +import net.mingsoft.basic.bean.EUListBean; +import net.mingsoft.basic.bean.UploadConfigBean; +import net.mingsoft.basic.util.BasicUtil; +import net.mingsoft.cms.biz.IDutyPoliceBiz; +import net.mingsoft.cms.entity.DutyPoliceEntity; +import net.mingsoft.cms.excel.DutyPoliceExcel; +import net.mingsoft.excel.util.ExcelUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * 分类管理控制层 + * @author 铭飞开发团队 + * 创建日期:2019-11-28 15:12:32
+ * 历史修订:
+ */ +@Api(tags={"后端-值日警官接口"}) +@Controller("dutyPoliceAction") +@RequestMapping("/${ms.manager.path}/cms/dutyPolice") +public class DutyPoliceAction extends BaseFileAction { + + + /** + * 注入分类业务层 + */ + @Autowired + private IDutyPoliceBiz dutyPoliceBiz; + + /** + * 查询分类列表 + * @param entity 分类实体 + */ + @ApiOperation(value = "查询分类列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "id", value = "id", required =false,paramType="query"), + @ApiImplicitParam(name = "dutyDate", value = "值班日期", required =false,paramType="query"), + @ApiImplicitParam(name = "leaderName", value = "值日警官领导岗", required =false,paramType="query"), + @ApiImplicitParam(name = "deptName", value = "值日警官轮值科室", required =false,paramType="query"), + @ApiImplicitParam(name = "blDutyPerson", value = "北岭值班人员", required =false,paramType="query"), + }) + @RequestMapping(value ="/list",method = {RequestMethod.GET,RequestMethod.POST}) + @ResponseBody + public ResultData list(@ModelAttribute @ApiIgnore DutyPoliceEntity entity) { + entity.setSqlWhere(""); + List list = dutyPoliceBiz.query(entity); + return ResultData.build().success(new EUListBean(list,(int)BasicUtil.endPage(list).getTotal())); + } + + /** + * 导入接口 + * @param + */ + @ApiOperation(value = "导入接口") + @PostMapping("/import") + @ResponseBody + public ResultData importData(@ApiIgnore UploadConfigBean bean) throws IOException { + List excelList = ExcelUtil.read(bean.getFile(), DutyPoliceEntity.class); + if(excelList!=null){ + UploadConfigBean config = new UploadConfigBean(bean.getUploadPath(),bean.getFile(),null,false,bean.isRename()); + String filePath = this.upload(config).get("data").toString(); + for(DutyPoliceEntity entity : excelList){ + //删除相同日期数据 + dutyPoliceBiz.deleteByEntity(entity); + //导入数据 + entity.setFilePath(filePath); + entity.setCreateDate(new Date()); + entity.setCreateBy(BasicUtil.getManager().getId()); + dutyPoliceBiz.save(entity); + } + return ResultData.build().success(filePath); + }else{ + return ResultData.build().error("导入文件为空!"); + } + } + + /** + * 导出模板 + */ + @GetMapping("importTmplate") + @ApiOperation(value = "导入模板") + public void importTmplate(HttpServletResponse response) throws IOException { + List list = new ArrayList<>(); + ExcelUtil.export(response, "值日警官导入模板", "值日警官", list, DutyPoliceExcel.class); + } + + /** + * 导入接口 + * @param + */ + @PostMapping("/deleteByContentIds") + @ResponseBody + public ResultData deleteByContentIds(@RequestParam(value = "contentIds",required = false)List contentIds) throws IOException { + dutyPoliceBiz.deleteByContentIds(contentIds); + return ResultData.build().success("删除成功"); + } + + + +} diff --git a/src/main/java/net/mingsoft/cms/action/DutyStandbyAction.java b/src/main/java/net/mingsoft/cms/action/DutyStandbyAction.java index 537a2f50..26938a4b 100644 --- a/src/main/java/net/mingsoft/cms/action/DutyStandbyAction.java +++ b/src/main/java/net/mingsoft/cms/action/DutyStandbyAction.java @@ -76,9 +76,8 @@ public class DutyStandbyAction extends BaseFileAction { @ApiImplicitParam(name = "id", value = "id", required =false,paramType="query"), @ApiImplicitParam(name = "dutyDate", value = "值班日期", required =false,paramType="query"), @ApiImplicitParam(name = "monitor", value = "带班长", required =false,paramType="query"), - @ApiImplicitParam(name = "deputyMonitor", value = "副带班长", required =false,paramType="query"), - @ApiImplicitParam(name = "operator", value = "守机员", required =false,paramType="query"), - @ApiImplicitParam(name = "dutyPerson", value = "值班人员", required =false,paramType="query"), + @ApiImplicitParam(name = "policeDuty", value = "民警值班员", required =false,paramType="query"), + @ApiImplicitParam(name = "auxiliaryPoliceDuty", value = "辅警值班员", required =false,paramType="query"), @ApiImplicitParam(name = "blDutyPerson", value = "北岭值班人员", required =false,paramType="query"), }) @RequestMapping(value ="/list",method = {RequestMethod.GET,RequestMethod.POST}) diff --git a/src/main/java/net/mingsoft/cms/action/PhoneContactsAction.java b/src/main/java/net/mingsoft/cms/action/PhoneContactsAction.java index a9f292de..d0c9d6d2 100644 --- a/src/main/java/net/mingsoft/cms/action/PhoneContactsAction.java +++ b/src/main/java/net/mingsoft/cms/action/PhoneContactsAction.java @@ -22,7 +22,6 @@ package net.mingsoft.cms.action; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; @@ -33,7 +32,6 @@ import net.mingsoft.basic.bean.EUListBean; import net.mingsoft.basic.bean.UploadConfigBean; import net.mingsoft.basic.util.BasicUtil; import net.mingsoft.cms.biz.IPhoneContactsBiz; -import net.mingsoft.cms.entity.DutyStandbyEntity; import net.mingsoft.cms.entity.PhoneContactsEntity; import net.mingsoft.cms.excel.PhoneContactsExcel; import net.mingsoft.excel.util.ExcelUtil; @@ -43,16 +41,13 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; import springfox.documentation.annotations.ApiIgnore; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.ArrayList; -import java.util.Collection; import java.util.Date; import java.util.List; -import java.util.stream.Collectors; /** * 分类管理控制层 diff --git a/src/main/java/net/mingsoft/cms/action/web/CmsSignAction.java b/src/main/java/net/mingsoft/cms/action/web/CmsSignAction.java new file mode 100644 index 00000000..d223911b --- /dev/null +++ b/src/main/java/net/mingsoft/cms/action/web/CmsSignAction.java @@ -0,0 +1,151 @@ +/** + * The MIT License (MIT) + * Copyright (c) 2012-present 铭软科技(mingsoft.net) + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +package net.mingsoft.cms.action.web; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import net.mingsoft.base.entity.ResultData; +import net.mingsoft.basic.annotation.LogAnn; +import net.mingsoft.basic.biz.IManagerBiz; +import net.mingsoft.basic.constant.e.BusinessTypeEnum; +import net.mingsoft.basic.entity.ManagerEntity; +import net.mingsoft.basic.util.BasicUtil; +import net.mingsoft.cms.action.BaseAction; +import net.mingsoft.cms.biz.ICmsSignBiz; +import net.mingsoft.cms.entity.CmsSignEntity; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.Date; +import java.util.List; +import java.util.stream.Collectors; + +/** + * 分类管理控制层 + * @author 铭飞开发团队 + * 创建日期:2019-11-28 15:12:32
+ * 历史修订:
+ */ +@Api(tags={"前端端-文章签收接口"}) +@Controller("webCmsSignAction") +@RequestMapping("/cms/sign") +public class CmsSignAction extends BaseAction { + + + /** + * 注入分类业务层 + */ + @Autowired + private ICmsSignBiz cmsSignBiz; + + @Autowired + private IManagerBiz managerBiz; + + /** + * 获取账号 + * @param + */ + @ApiOperation(value = "获取账号列表接口") + @GetMapping ("/getManagerList") + @ResponseBody + public ResultData getManagerList() { + //查询所有部门用户 + List managerList = managerBiz.list(); + List managers = managerList.stream().filter(manager -> !manager.getManagerName().equals("msopen")).map(ManagerEntity::getManagerNickName).collect(Collectors.toList()); + return ResultData.build().success(managers); + } + + /** + * 保存需签收科室 + * @param + */ + @ApiOperation(value = "保存需签收科室接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "cmsSigns", value = "需签收科室列表", required =true,paramType="query"), + }) + @PostMapping("/saveList") + @ResponseBody + @LogAnn(title = "保存需签收科室", businessType = BusinessTypeEnum.INSERT) + public ResultData saveList(@RequestBody List cmsSigns) { + //把之前选的删掉 + String contentId = cmsSigns.get(0).getContentId(); + cmsSignBiz.deleteByContentId(contentId); + //循环插入新的 + for(CmsSignEntity cmsSign : cmsSigns){ + cmsSign.setIsSign("0"); + cmsSign.setCreateDate(new Date()); + cmsSign.setCreateBy(BasicUtil.getManager().getId()); + cmsSignBiz.save(cmsSign); + } + return ResultData.build().success("保存成功!"); + } + + + + /** + * 保存文章签收 + * @param cmsSign 文章实体 + */ + @ApiOperation(value = "保存文章签收接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "contentId", value = "文章关联id", required =true,paramType="query"), + @ApiImplicitParam(name = "managerName", value = "用户名", required =false,paramType="query"), + }) + @PostMapping("/save") + @ResponseBody + @LogAnn(title = "保存文章签收", businessType = BusinessTypeEnum.INSERT) + public ResultData save(@ModelAttribute @ApiIgnore CmsSignEntity cmsSign) { + cmsSign.setCreateDate(new Date()); + cmsSign.setCreateBy(BasicUtil.getManager().getId()); + cmsSignBiz.save(cmsSign); + return ResultData.build().success("保存成功!"); + } + + /** + * 查询签收列表接口 + * @param cmsSign + * @return + */ + @ApiOperation(value = "查询签收列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "id", value = "文章id", required =false,paramType="query"), + @ApiImplicitParam(name = "contentId", value = "关联文章id", required =false,paramType="query"), + @ApiImplicitParam(name = "managerName", value = "用户名", required =false,paramType="query"), + @ApiImplicitParam(name = "isSign", value = "是否签收", required =false,paramType="query"), + }) + @RequestMapping(value = "/list",method = {RequestMethod.GET,RequestMethod.POST}) + @ResponseBody + public ResultData list(@ModelAttribute @ApiIgnore CmsSignEntity cmsSign) { + //查询签收列表 + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(CmsSignEntity::getContentId,cmsSign.getContentId()); + List contentList = cmsSignBiz.list(wrapper); + return ResultData.build().success(contentList); + } + +} diff --git a/src/main/java/net/mingsoft/cms/action/web/DutyPoliceAction.java b/src/main/java/net/mingsoft/cms/action/web/DutyPoliceAction.java new file mode 100644 index 00000000..ed2518fe --- /dev/null +++ b/src/main/java/net/mingsoft/cms/action/web/DutyPoliceAction.java @@ -0,0 +1,84 @@ +/** + * The MIT License (MIT) + * Copyright (c) 2012-present 铭软科技(mingsoft.net) + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +package net.mingsoft.cms.action.web; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import net.mingsoft.base.entity.ResultData; +import net.mingsoft.basic.bean.EUListBean; +import net.mingsoft.basic.util.BasicUtil; +import net.mingsoft.cms.action.BaseAction; +import net.mingsoft.cms.biz.IDutyPoliceBiz; +import net.mingsoft.cms.biz.IDutyStandbyBiz; +import net.mingsoft.cms.entity.DutyPoliceEntity; +import net.mingsoft.cms.entity.DutyStandbyEntity; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; + +/** + * 分类管理控制层 + * @author 铭飞开发团队 + * 创建日期:2019-11-28 15:12:32
+ * 历史修订:
+ */ +@Api(tags={"前端-值日警官接口"}) +@Controller("WebdutyPoliceAction") +@RequestMapping("/cms/dutyPolice") +public class DutyPoliceAction extends BaseAction { + + + /** + * 注入分类业务层 + */ + @Autowired + private IDutyPoliceBiz dutyPoliceBiz; + + /** + * 查询分类列表 + * @param entity 分类实体 + */ + @ApiOperation(value = "查询分类列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "id", value = "id", required =false,paramType="query"), + @ApiImplicitParam(name = "dutyDate", value = "值班日期", required =false,paramType="query"), + @ApiImplicitParam(name = "leaderName", value = "值日警官领导岗", required =false,paramType="query"), + @ApiImplicitParam(name = "deptName", value = "值日警官轮值科室", required =false,paramType="query"), + }) + @RequestMapping(value ="/list",method = {RequestMethod.GET,RequestMethod.POST}) + @ResponseBody + public ResultData list(@ModelAttribute @ApiIgnore DutyPoliceEntity entity) { + entity.setSqlWhere(""); + List list = dutyPoliceBiz.query(entity); + return ResultData.build().success(new EUListBean(list,(int)BasicUtil.endPage(list).getTotal())); + } + +} diff --git a/src/main/java/net/mingsoft/cms/action/web/DutyStandbyAction.java b/src/main/java/net/mingsoft/cms/action/web/DutyStandbyAction.java index 88ef439c..99bbc2d9 100644 --- a/src/main/java/net/mingsoft/cms/action/web/DutyStandbyAction.java +++ b/src/main/java/net/mingsoft/cms/action/web/DutyStandbyAction.java @@ -32,14 +32,14 @@ import net.mingsoft.basic.util.BasicUtil; import net.mingsoft.cms.action.BaseAction; import net.mingsoft.cms.biz.IDutyStandbyBiz; import net.mingsoft.cms.entity.DutyStandbyEntity; -import net.mingsoft.excel.util.ExcelUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; import springfox.documentation.annotations.ApiIgnore; -import java.util.Date; import java.util.List; /** @@ -69,9 +69,8 @@ public class DutyStandbyAction extends BaseAction { @ApiImplicitParam(name = "id", value = "id", required =false,paramType="query"), @ApiImplicitParam(name = "dutyDate", value = "值班日期", required =false,paramType="query"), @ApiImplicitParam(name = "monitor", value = "带班长", required =false,paramType="query"), - @ApiImplicitParam(name = "deputyMonitor", value = "副带班长", required =false,paramType="query"), - @ApiImplicitParam(name = "operator", value = "守机员", required =false,paramType="query"), - @ApiImplicitParam(name = "dutyPerson", value = "值班人员", required =false,paramType="query"), + @ApiImplicitParam(name = "policeDuty", value = "民警值班员", required =false,paramType="query"), + @ApiImplicitParam(name = "auxiliaryPoliceDuty", value = "辅警值班员", required =false,paramType="query"), @ApiImplicitParam(name = "blDutyPerson", value = "北岭值班人员", required =false,paramType="query"), }) @RequestMapping(value ="/list",method = {RequestMethod.GET,RequestMethod.POST}) diff --git a/src/main/java/net/mingsoft/cms/action/web/PhoneContactsAction.java b/src/main/java/net/mingsoft/cms/action/web/PhoneContactsAction.java index bf17360c..c4b6a80d 100644 --- a/src/main/java/net/mingsoft/cms/action/web/PhoneContactsAction.java +++ b/src/main/java/net/mingsoft/cms/action/web/PhoneContactsAction.java @@ -27,21 +27,14 @@ import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import net.mingsoft.base.entity.ResultData; -import net.mingsoft.basic.bean.EUListBean; import net.mingsoft.basic.util.BasicUtil; -import net.mingsoft.cms.biz.ICategoryBiz; import net.mingsoft.cms.biz.IPhoneContactsBiz; -import net.mingsoft.cms.entity.CategoryEntity; import net.mingsoft.cms.entity.PhoneContactsEntity; -import net.mingsoft.excel.util.ExcelUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; import springfox.documentation.annotations.ApiIgnore; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; import java.util.List; /** @@ -72,7 +65,7 @@ public class PhoneContactsAction extends net.mingsoft.cms.action.BaseAction{ @ApiImplicitParam(name = "name", value = "姓名", required =false,paramType="query"), @ApiImplicitParam(name = "phone", value = "手机号", required =false,paramType="query"), }) - @PostMapping(value="/list") + @RequestMapping(value ="/list",method = {RequestMethod.GET,RequestMethod.POST}) @ResponseBody public ResultData list(@ModelAttribute @ApiIgnore PhoneContactsEntity entity) { BasicUtil.startPage(); diff --git a/src/main/java/net/mingsoft/cms/biz/ICmsSignBiz.java b/src/main/java/net/mingsoft/cms/biz/ICmsSignBiz.java index fe95ce76..cafcba6c 100644 --- a/src/main/java/net/mingsoft/cms/biz/ICmsSignBiz.java +++ b/src/main/java/net/mingsoft/cms/biz/ICmsSignBiz.java @@ -36,5 +36,5 @@ import java.util.List; * 历史修订:
*/ public interface ICmsSignBiz extends IBaseBiz { - + void deleteByContentId(String contentId); } diff --git a/src/main/java/net/mingsoft/cms/biz/IDutyPoliceBiz.java b/src/main/java/net/mingsoft/cms/biz/IDutyPoliceBiz.java new file mode 100644 index 00000000..1e20a468 --- /dev/null +++ b/src/main/java/net/mingsoft/cms/biz/IDutyPoliceBiz.java @@ -0,0 +1,44 @@ +/** + * The MIT License (MIT) + * Copyright (c) 2012-present 铭软科技(mingsoft.net) + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +package net.mingsoft.cms.biz; + +import net.mingsoft.base.biz.IBaseBiz; +import net.mingsoft.cms.entity.DutyPoliceEntity; +import net.mingsoft.cms.entity.DutyStandbyEntity; + +import java.util.List; + + +/** + * 分类业务 + * @author 铭飞开发团队 + * 创建日期:2019-11-28 15:12:32
+ * 历史修订:
+ */ +public interface IDutyPoliceBiz extends IBaseBiz { + + void deleteByEntity(DutyPoliceEntity entity); + + void deleteByContentIds(List contentIds); + +} diff --git a/src/main/java/net/mingsoft/cms/biz/impl/CmsSignBizImpl.java b/src/main/java/net/mingsoft/cms/biz/impl/CmsSignBizImpl.java index 6b83b326..44e587dd 100644 --- a/src/main/java/net/mingsoft/cms/biz/impl/CmsSignBizImpl.java +++ b/src/main/java/net/mingsoft/cms/biz/impl/CmsSignBizImpl.java @@ -60,4 +60,8 @@ public class CmsSignBizImpl extends BaseBizImpl impl return cmsSignDao; } + @Override + public void deleteByContentId(String contentId) { + baseMapper.deleteByContentId(contentId); + } } diff --git a/src/main/java/net/mingsoft/cms/biz/impl/DutyPoliceBizImpl.java b/src/main/java/net/mingsoft/cms/biz/impl/DutyPoliceBizImpl.java new file mode 100644 index 00000000..02c79e48 --- /dev/null +++ b/src/main/java/net/mingsoft/cms/biz/impl/DutyPoliceBizImpl.java @@ -0,0 +1,73 @@ +/** + * The MIT License (MIT) + * Copyright (c) 2012-present 铭软科技(mingsoft.net) + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + + + +package net.mingsoft.cms.biz.impl; + +import net.mingsoft.base.biz.impl.BaseBizImpl; +import net.mingsoft.base.dao.IBaseDao; +import net.mingsoft.cms.biz.IDutyPoliceBiz; +import net.mingsoft.cms.biz.IDutyStandbyBiz; +import net.mingsoft.cms.dao.IDutyPoliceDao; +import net.mingsoft.cms.dao.IDutyStandbyDao; +import net.mingsoft.cms.entity.DutyPoliceEntity; +import net.mingsoft.cms.entity.DutyStandbyEntity; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +/** + * 分类管理持久化层 + * @author 铭飞开发团队 + * 创建日期:2019-11-28 15:12:32
+ * 历史修订:
+ */ +@Service("dutyPoliceBizImpl") +@Transactional(rollbackFor = RuntimeException.class) +public class DutyPoliceBizImpl extends BaseBizImpl implements IDutyPoliceBiz { + + + @Autowired + private IDutyPoliceDao dutyPoliceDao; + + + + @Override + protected IBaseDao getDao() { + return dutyPoliceDao; + } + + + @Override + @Transactional + public void deleteByEntity(DutyPoliceEntity entity) { + dutyPoliceDao.deleteByEntity(entity); + } + + @Override + public void deleteByContentIds(List contentIds) { + dutyPoliceDao.deleteByContentIds(contentIds); + } +} diff --git a/src/main/java/net/mingsoft/cms/dao/ICmsSignDao.java b/src/main/java/net/mingsoft/cms/dao/ICmsSignDao.java index 7ce4af86..0a22659d 100644 --- a/src/main/java/net/mingsoft/cms/dao/ICmsSignDao.java +++ b/src/main/java/net/mingsoft/cms/dao/ICmsSignDao.java @@ -25,6 +25,7 @@ package net.mingsoft.cms.dao; import net.mingsoft.base.dao.IBaseDao; import net.mingsoft.cms.entity.CmsSignEntity; import net.mingsoft.cms.entity.PhoneContactsEntity; +import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Component; import java.util.List; @@ -37,5 +38,5 @@ import java.util.List; */ @Component("cmsSignDao") public interface ICmsSignDao extends IBaseDao { - + void deleteByContentId(@Param("contentId") String contentId); } diff --git a/src/main/java/net/mingsoft/cms/dao/ICmsSignDao.xml b/src/main/java/net/mingsoft/cms/dao/ICmsSignDao.xml index edd3d28b..cd251286 100644 --- a/src/main/java/net/mingsoft/cms/dao/ICmsSignDao.xml +++ b/src/main/java/net/mingsoft/cms/dao/ICmsSignDao.xml @@ -6,6 +6,7 @@ + @@ -20,6 +21,7 @@ content_id=#{contentId}, manager_name=#{managerName}, + is_sign=#{isSign}, create_by=#{createBy}, create_date=#{createDate}, update_by=#{updateBy}, @@ -40,6 +42,7 @@ and content_id=#{contentId} and manager_name=#{managerName} + and is_sign=#{isSign} and create_by=#{createBy} and create_date=#{createDate} and update_by=#{updateBy} @@ -71,6 +74,7 @@ and content_id=#{contentId} and manager_name=#{managerName} + and is_sign=#{isSign} and create_by=#{createBy} and create_date=#{createDate} and update_by=#{updateBy} @@ -80,4 +84,8 @@ + + delete from cms_sign where content_id = #{contentId} + + diff --git a/src/main/java/net/mingsoft/cms/dao/IDutyPoliceDao.java b/src/main/java/net/mingsoft/cms/dao/IDutyPoliceDao.java new file mode 100644 index 00000000..bf84f056 --- /dev/null +++ b/src/main/java/net/mingsoft/cms/dao/IDutyPoliceDao.java @@ -0,0 +1,46 @@ +/** + * The MIT License (MIT) + * Copyright (c) 2012-present 铭软科技(mingsoft.net) + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +package net.mingsoft.cms.dao; + +import net.mingsoft.base.dao.IBaseDao; +import net.mingsoft.cms.entity.DutyPoliceEntity; +import net.mingsoft.cms.entity.DutyStandbyEntity; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** + * 分类持久层 + * @author 铭飞开发团队 + * 创建日期:2024-03-20 15:12:32
+ * 历史修订:
+ */ +@Component("dutyPoliceDao") +public interface IDutyPoliceDao extends IBaseDao { + + void deleteByEntity(DutyPoliceEntity entity); + + + void deleteByContentIds(@Param("contentIds") List contentIds); +} diff --git a/src/main/java/net/mingsoft/cms/dao/IDutyPoliceDao.xml b/src/main/java/net/mingsoft/cms/dao/IDutyPoliceDao.xml new file mode 100644 index 00000000..807255f0 --- /dev/null +++ b/src/main/java/net/mingsoft/cms/dao/IDutyPoliceDao.xml @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + update duty_police + + duty_date=#{dutyDate}, + leader_name=#{leaderName}, + dept_name=#{deptName}, + create_by=#{createBy}, + create_date=#{createDate}, + update_by=#{updateBy}, + update_date=#{updateDate}, + del=#{del}, + + where id = #{id} + + + + + + + + + + + delete from duty_police where id=#{id} + + + + delete from duty_police + + and duty_date=#{dutyDate} + + + + + + delete from duty_police + + id in #{item} + + + + + + + + + delete from duty_police + + content_id in #{item} + + + + diff --git a/src/main/java/net/mingsoft/cms/entity/CmsSignEntity.java b/src/main/java/net/mingsoft/cms/entity/CmsSignEntity.java index c9571df1..f2adefd0 100644 --- a/src/main/java/net/mingsoft/cms/entity/CmsSignEntity.java +++ b/src/main/java/net/mingsoft/cms/entity/CmsSignEntity.java @@ -52,7 +52,6 @@ private static final long serialVersionUID = 1574925152617L; /** * 是否签收 */ - @TableField(exist = false) private String isSign; @Override diff --git a/src/main/java/net/mingsoft/cms/entity/DutyPoliceEntity.java b/src/main/java/net/mingsoft/cms/entity/DutyPoliceEntity.java new file mode 100644 index 00000000..e60fddbe --- /dev/null +++ b/src/main/java/net/mingsoft/cms/entity/DutyPoliceEntity.java @@ -0,0 +1,119 @@ +/** + * The MIT License (MIT) + * Copyright (c) 2012-present 铭软科技(mingsoft.net) + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +package net.mingsoft.cms.entity; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.baomidou.mybatisplus.annotation.TableName; +import net.mingsoft.base.entity.BaseEntity; + +/** +* 值日警官表 +* @author 铭飞开发团队 +* 创建日期:2024-03-20 15:12:32
+* 历史修订:
+*/ +@TableName("duty_police") +public class DutyPoliceEntity extends BaseEntity { + + + private static final long serialVersionUID = -202180033093209501L; + private String id; + + /** + * 值班日期 + */ + @ExcelProperty("值班日期") + private String dutyDate; + + /** + * 带班长 + */ + @ExcelProperty("值日警官领导岗") + private String leaderName; + + /** + * 民警值班员 + */ + @ExcelProperty("值日警官轮值科室") + private String deptName; + + /** + * 上传文件路径 + */ + private String filePath; + + /** + * 关联文章Id + */ + private String contentId; + + @Override + public String getId() { + return id; + } + + @Override + public void setId(String id) { + this.id = id; + } + + public String getDutyDate() { + return dutyDate; + } + + public void setDutyDate(String dutyDate) { + this.dutyDate = dutyDate; + } + + public String getLeaderName() { + return leaderName; + } + + public void setLeaderName(String leaderName) { + this.leaderName = leaderName; + } + + public String getDeptName() { + return deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } + + public String getFilePath() { + return filePath; + } + + public void setFilePath(String filePath) { + this.filePath = filePath; + } + + public String getContentId() { + return contentId; + } + + public void setContentId(String contentId) { + this.contentId = contentId; + } +} diff --git a/src/main/java/net/mingsoft/cms/excel/DutyPoliceExcel.java b/src/main/java/net/mingsoft/cms/excel/DutyPoliceExcel.java new file mode 100644 index 00000000..be2e8139 --- /dev/null +++ b/src/main/java/net/mingsoft/cms/excel/DutyPoliceExcel.java @@ -0,0 +1,81 @@ +/** + * The MIT License (MIT) + * Copyright (c) 2012-present 铭软科技(mingsoft.net) + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +package net.mingsoft.cms.excel; + +import com.alibaba.excel.annotation.ExcelProperty; + +import java.io.Serializable; + +/** +* 值班备勤表 +* @author 铭飞开发团队 +* 创建日期:2024-03-20 15:12:32
+* 历史修订:
+*/ +public class DutyPoliceExcel implements Serializable { + + + private static final long serialVersionUID = -8204345859257208121L; + /** + * 值班日期 + */ + @ExcelProperty("值班日期") + private String dutyDate; + + /** + * 值日警官领导岗 + */ + @ExcelProperty("值日警官领导岗") + private String leaderName; + + /** + * 值日警官轮值科室 + */ + @ExcelProperty("值日警官轮值科室") + private String deptName; + + + public String getDutyDate() { + return dutyDate; + } + + public void setDutyDate(String dutyDate) { + this.dutyDate = dutyDate; + } + + public String getLeaderName() { + return leaderName; + } + + public void setLeaderName(String leaderName) { + this.leaderName = leaderName; + } + + public String getDeptName() { + return deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } +} diff --git a/src/main/webapp/WEB-INF/manager/cms/content/form.ftl b/src/main/webapp/WEB-INF/manager/cms/content/form.ftl index e928e6c0..c9b99c42 100644 --- a/src/main/webapp/WEB-INF/manager/cms/content/form.ftl +++ b/src/main/webapp/WEB-INF/manager/cms/content/form.ftl @@ -22,7 +22,7 @@ 返回 - 删除1 + 删除 @@ -188,6 +188,24 @@ + + + + + +
+ 标签:${'$'}{field.tags} + 通过自定义字典可扩展数据;字典类型:文章标签 +
+
+
- - + - + placeholder="请选择下发科室" + @change="e=>handleOfficeChange(e)" + > + -
- 标签:${'$'}{field.tags} - 通过自定义字典可扩展数据;字典类型:文章标签 -
@@ -343,9 +359,12 @@ //文章外链接 contentOutLink: '', contentDatetime: ms.util.date.fmt(Date.now(),"yyyy-MM-dd hh:mm:ss"), + //下发科室 + signOfficeList:[], }, categoryType: '1', contentTypeOptions: [], + signOfficeOptions: [], contentTagsOptions: [], categoryIdOptions: [], contentDisplayOptions: [{ @@ -388,6 +407,11 @@ } }, methods: { + handleOfficeChange: function (e) { + var that = this + that.form.signOfficeList = e + this.form.signOfficeList = e + }, save: function () { var _this = this; var that = this; //自定义模型需要验证 @@ -414,7 +438,7 @@ that.form.contentImg = []; } - this.$refs.form[0].validate(function (valid) { + this.$refs.form[0].validate(function (valid,data) { if (valid) { that.saveDisabled = true; //判断 @@ -458,6 +482,17 @@ window.model.form.linkId = data.data.id; window.model.save(); } + + if(that.form.signOfficeList && that.form.signOfficeList.length){ + let newArr = [] + that.form.signOfficeList.map(i=>newArr.push({managerName:i,contentId:data.data.id})) + ms.http.post(ms.manager + "/cms/sign/saveList.do", newArr,{ + headers: { + 'Content-Type': 'application/json' + } + }) + } + that.$notify({ title: '成功', message: '保存成功', @@ -584,21 +619,45 @@ } else { res.data.contentImg = []; } + //查询当前文章的科室 + if(ms.util.getParameter("id")){ + ms.http.get(ms.manager + "/cms/sign/list.do",{ + "contentId": ms.util.getParameter("id") + }).then(res2=>{ + if(res2.result){ + res.data.signOfficeList = res2.data.map(i=>i.managerName); + } + that.form = res.data; + var category = that.categoryIdOptions.filter(function (f) { + return f['id'] == that.form.categoryId; + }); - that.form = res.data; - var category = that.categoryIdOptions.filter(function (f) { - return f['id'] == that.form.categoryId; - }); + if (category.length > 0) { + that.categoryType = category[0].categoryType + if (category[0].categoryType == '2' || category[0].categoryType == '3') { + that.returnIsShow = false; + } + } + that.changeModel(); + }) + }else{ + that.form = res.data; + var category = that.categoryIdOptions.filter(function (f) { + return f['id'] == that.form.categoryId; + }); - if (category.length > 0) { - that.categoryType = category[0].categoryType - if (category[0].categoryType == '2' || category[0].categoryType == '3') { - that.returnIsShow = false; + if (category.length > 0) { + that.categoryType = category[0].categoryType + if (category[0].categoryType == '2' || category[0].categoryType == '3') { + that.returnIsShow = false; + } } + that.changeModel(); } - that.changeModel(); + } }); + }, //根据封面获取当前文章 getFromFengMian: function (categoryId) { @@ -809,7 +868,19 @@ created: function () { this.contentCategoryIdOptionsGet(); this.contentTypeOptionsGet(); - this.contentTagsOptionsGet(); + this.contentTagsOptionsGet() + + }, + mounted: function () { + //查询所有科室 + ms.http.get(ms.manager + "/cms/sign/getManagerList.do").then(res=>{ + if(res.result){ + this.signOfficeOptions = res.data; + } + }) + }, + beforeDestroy: function () { + localStorage.removeItem('filePath') } }); diff --git a/src/main/webapp/template/1/default/chuhuijiyao-detail.htm b/src/main/webapp/template/1/default/chuhuijiyao-detail.htm index e959c250..03ff007d 100644 --- a/src/main/webapp/template/1/default/chuhuijiyao-detail.htm +++ b/src/main/webapp/template/1/default/chuhuijiyao-detail.htm @@ -23,147 +23,160 @@ -
- <#include "header.htm" /> -
-

${field.typedescrip}

-
- - + -
-
- -

${field.typetitle}

-
-
${field.title}
-
- 发布时间:${field.date?string("yyyy-MM-dd")}              发布科室:${field.author} -
-
-
${field.content}
-
- <#if field.typetitle == '会议通知' || field.typetitle == '通知公告'> -
- - <#if field.typetitle == '会议通知' || field.typetitle == '通知公告'> -
-
- 已签收:{{signedStr}} -
-
- 未签收:{{unSignedStr}} -
-
- +
+ - - {ms:arclist tableName="MDIY_MODEL_NEWS"} -
- {/ms:arclist} -
-
- - + + +
+
+ + <#include "footer.htm" /> +
-
- - <#include "footer.htm" /> - -
- + + \ No newline at end of file diff --git a/src/main/webapp/template/1/default/css/header.css b/src/main/webapp/template/1/default/css/header.css index a7ed2e4c..7a8ffb52 100644 --- a/src/main/webapp/template/1/default/css/header.css +++ b/src/main/webapp/template/1/default/css/header.css @@ -1,8 +1,8 @@ .header_box { width:1920px; - height: 600px; - background: url(../images/banner.png); - background-size: 1920px 600px; + height: 500px; + background: url(../images/banner.jpg); + background-size: 1920px 500px; background-repeat: no-repeat; } diff --git a/src/main/webapp/template/1/default/index.htm b/src/main/webapp/template/1/default/index.htm index 36ac84b3..ccfe137c 100644 --- a/src/main/webapp/template/1/default/index.htm +++ b/src/main/webapp/template/1/default/index.htm @@ -1,32 +1,35 @@ + - - - - - {ms:global.name/} - - - - - - - - - - - - - - - - + + + + + {ms:global.name/} + + + + + + + + + + + + + + + + + -<#include "header.htm" /> - -
+ <#include "header.htm" /> + +
@@ -39,29 +42,29 @@
-
- 更多>> -
+
+ 更多>> +
- {ms:arclist typeid=1765306882908344322 flag="h"} + {ms:arclist typeid=1765306882908344322 flag="h"} - {/ms:arclist} + {/ms:arclist}
@@ -170,9 +180,11 @@
  • -
    NEW
    -
    {@ms:len field.title 12 /}
    -
    +
    NEW
    +
    {@ms:len field.title 12 /}
    +
    {@ms:len field.title 16 /}
    @@ -180,8 +192,6 @@
  • {/ms:arclist} - -
    @@ -198,22 +208,23 @@
    @@ -223,27 +234,28 @@
    领导批示
    - +
    更多>>
    @@ -260,20 +272,21 @@ @@ -295,7 +308,8 @@
    NEW
    -
    {@ms:len field.title 12 /}
    +
    + {@ms:len field.title 12 /}
    {@ms:len field.title 16 /}
    @@ -303,7 +317,7 @@ ${field.date?string("MM-dd")} - {/ms:arclist} + {/ms:arclist}
    @@ -319,59 +333,60 @@
    - - + +
    - -
    - {ms:arclist typeid=1779824029474848769 } - +
    @@ -720,13 +735,13 @@
    -{ms:arclist typeid=1773542134583328769 } + {ms:arclist typeid=1773542134583328769 }
    -
    - -
    -
    +
    + +
    +
    {/ms:arclist}
    @@ -752,29 +767,29 @@ }, }) - +
    - {ms:arclist size=1 typeid="1779682837839847426"} -
    + {ms:arclist size=1 typeid="1779682837839847426"} + - {/ms:arclist} - -<#include "footer.htm" /> - - - + + + - + + \ No newline at end of file diff --git a/src/main/webapp/template/1/default/tongxunlu.htm b/src/main/webapp/template/1/default/tongxunlu.htm index 02e69d69..4f15ff49 100644 --- a/src/main/webapp/template/1/default/tongxunlu.htm +++ b/src/main/webapp/template/1/default/tongxunlu.htm @@ -78,8 +78,8 @@ methods:{ handleSelectDept(item){ this.dept = item - axios.get(`/ms/cms/phoneContacts/list.do`,{params:{deptName:item}}).then(res=>{ - this.phoneContactsList = res.data.data.rows + axios.get(`/cms/phoneContacts/list.do`,{params:{deptName:item}}).then(res=>{ + this.phoneContactsList = res.data.data }) }, pickUp(){ @@ -88,7 +88,7 @@ }, mounted(){ //查部门 - axios.get(`/ms/cms/phoneContacts/getDept.do + axios.get(`/cms/phoneContacts/getDept.do `).then(res=>{ this.deptList = res.data.data this.handleSelectDept(this.deptList[0]) diff --git a/src/main/webapp/template/1/default/zhibanbeiqing-detail.htm b/src/main/webapp/template/1/default/zhibanbeiqing-detail.htm index 6ecd2645..c6bdd094 100644 --- a/src/main/webapp/template/1/default/zhibanbeiqing-detail.htm +++ b/src/main/webapp/template/1/default/zhibanbeiqing-detail.htm @@ -33,7 +33,7 @@
    首页>${field.typetitle} + href='/html/web/zhibanbeiqin/index.html'>值班备勤

    ${field.typetitle}

    @@ -102,9 +102,7 @@ mounted(){ this.date = moment().format('YYYY/M/D') let contentId = document.getElementsByClassName('chuhuijiyao_title')[0].getAttribute('fieldid') - - axios.get(`/ms/cms/dutyStandby/list.do`, { params: { contentId } }).then(res => { - console.log(res, 'resresresresresresresres') + axios.get(`/cms/dutyStandby/list.do`, { params: { contentId } }).then(res => { this.dutyStandbyList = res.data.data.rows }) } diff --git a/src/main/webapp/template/1/default/zhibanbeiqing-list.htm b/src/main/webapp/template/1/default/zhibanbeiqing-list.htm index ce1f4937..12148f99 100644 --- a/src/main/webapp/template/1/default/zhibanbeiqing-list.htm +++ b/src/main/webapp/template/1/default/zhibanbeiqing-list.htm @@ -2,199 +2,300 @@ - - - - - ${field.typetitle} - - - - - - - - - - - - + + + + + ${field.typetitle} + + + + + + + + + + + + - <#include "header.htm" /> -
    -
    - 首页>${field.typetitle} -
    -

    ${field.typetitle}

    -
    -
  • -
  • -
  • -
  • -
    -
  • -
  • -
    -
  • -
  • -
    + <#include "header.htm" /> +
    +
    + 首页>${field.typetitle} +
    +

    ${field.typetitle}

    +
    +
  • +
  • +
  • +
  • +
    +
  • +
  • +
    +
  • +
  • +
    +
    +
    +
    +
    +
    {{item||'/'}}
    -
    +
    +
    +
    +
    带班长
    -
    民警值班员
    -
    辅警值班员
    -
    北岭值班员
    +
    民警值班员
    +
    辅警值班员
    +
    北岭值班员
    +
    +
    +
    +
    +
    +
    +
    -
    -
    -
    -
    -
    + +
    +
    +
    +
    +
    值日警官领导岗
    +
    值日警官轮值科室
    +
    +
    +
    +
    +
    -
    - - <#include "footer.htm" /> - - + - - \ No newline at end of file