From eef228aabb05b5449660294a268e01a3f2695c49 Mon Sep 17 00:00:00 2001 From: sunjianxi <839419401@qq.com> Date: Mon, 22 Apr 2024 11:07:03 +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 | 130 ++++ .../mingsoft/cms/action/ContentAction.java | 43 ++ .../mingsoft/cms/biz/impl/CmsSignBizImpl.java | 63 ++ .../mingsoft/cms/entity/CmsSignEntity.java | 91 +++ .../mingsoft/cms/entity/ContentEntity.java | 13 + .../manager/cms/content/check-main.ftl | 561 ++++++++++++++++++ .../WEB-INF/manager/cms/content/check.ftl | 157 +++++ .../template/1/default/chuhuijiyao-detail.htm | 102 +++- .../template/1/default/chuhuijiyao-list.htm | 51 +- .../webapp/template/1/default/css/css.css | 6 +- 10 files changed, 1194 insertions(+), 23 deletions(-) create mode 100644 src/main/java/net/mingsoft/cms/action/CmsSignAction.java create mode 100644 src/main/java/net/mingsoft/cms/biz/impl/CmsSignBizImpl.java create mode 100644 src/main/java/net/mingsoft/cms/entity/CmsSignEntity.java create mode 100644 src/main/webapp/WEB-INF/manager/cms/content/check-main.ftl create mode 100644 src/main/webapp/WEB-INF/manager/cms/content/check.ftl diff --git a/src/main/java/net/mingsoft/cms/action/CmsSignAction.java b/src/main/java/net/mingsoft/cms/action/CmsSignAction.java new file mode 100644 index 00000000..2bf14bb5 --- /dev/null +++ b/src/main/java/net/mingsoft/cms/action/CmsSignAction.java @@ -0,0 +1,130 @@ +/** + * 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 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.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.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.stream.Collectors; + +/** + * 分类管理控制层 + * @author 铭飞开发团队 + * 创建日期:2019-11-28 15:12:32
+ * 历史修订:
+ */ +@Api(tags={"后端-文章签收接口"}) +@Controller("cmsSignAction") +@RequestMapping("/${ms.manager.path}/cms/sign") +public class CmsSignAction extends BaseAction{ + + + /** + * 注入分类业务层 + */ + @Autowired + private ICmsSignBiz cmsSignBiz; + + @Autowired + private IManagerBiz managerBiz; + + + + /** + * 保存文章牵手 + * @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); + 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); + } + +} diff --git a/src/main/java/net/mingsoft/cms/action/ContentAction.java b/src/main/java/net/mingsoft/cms/action/ContentAction.java index 68f8a7b5..d82659cd 100755 --- a/src/main/java/net/mingsoft/cms/action/ContentAction.java +++ b/src/main/java/net/mingsoft/cms/action/ContentAction.java @@ -22,6 +22,7 @@ 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; @@ -36,8 +37,10 @@ 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.IDutyStandbyBiz; import net.mingsoft.cms.entity.CategoryEntity; import net.mingsoft.cms.entity.ContentEntity; +import net.mingsoft.cms.entity.DutyStandbyEntity; import net.mingsoft.mdiy.biz.IModelBiz; import net.mingsoft.mdiy.entity.ModelEntity; import org.apache.commons.lang3.StringUtils; @@ -80,6 +83,9 @@ public class ContentAction extends BaseAction { @Resource(name="mdiyModelBizImpl") private IModelBiz modelBiz; + @Autowired + private IDutyStandbyBiz dutyStandbyBiz; + /** * 返回主界面index */ @@ -89,6 +95,24 @@ public class ContentAction extends BaseAction { return "/cms/content/index"; } + /** + * 返回审核主界面index + */ + @ApiIgnore + @GetMapping("/check") + public String check(){ + return "/cms/content/check"; + } + + /** + * 返回审核主界面index + */ + @ApiIgnore + @GetMapping("/checkMain") + public String checkMain(){ + return "/cms/content/check-main"; + } + /** * 返回主界面main */ @@ -217,7 +241,16 @@ public class ContentAction extends BaseAction { if(StringUtil.isBlank(content.getContentDatetime())){ return ResultData.build().error(getResString("err.empty", this.getResString("content.datetime"))); } + contentBiz.save(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); + } + } return ResultData.build().success(content); } @@ -252,6 +285,8 @@ public class ContentAction extends BaseAction { } contentBiz.removeByIds(ids); + //如果是值班备勤,删除对应值班备勤数据 + dutyStandbyBiz.deleteByContentIds(ids); return ResultData.build().success(); } @@ -303,6 +338,14 @@ 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); + } + } return ResultData.build().success(content); } diff --git a/src/main/java/net/mingsoft/cms/biz/impl/CmsSignBizImpl.java b/src/main/java/net/mingsoft/cms/biz/impl/CmsSignBizImpl.java new file mode 100644 index 00000000..6b83b326 --- /dev/null +++ b/src/main/java/net/mingsoft/cms/biz/impl/CmsSignBizImpl.java @@ -0,0 +1,63 @@ +/** + * 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.ICmsSignBiz; +import net.mingsoft.cms.biz.IPhoneContactsBiz; +import net.mingsoft.cms.dao.ICmsSignDao; +import net.mingsoft.cms.dao.IPhoneContactsDao; +import net.mingsoft.cms.entity.CmsSignEntity; +import net.mingsoft.cms.entity.PhoneContactsEntity; +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("cmsSignBizImpl") +@Transactional(rollbackFor = RuntimeException.class) +public class CmsSignBizImpl extends BaseBizImpl implements ICmsSignBiz { + + + @Autowired + private ICmsSignDao cmsSignDao; + + + + @Override + protected IBaseDao getDao() { + // TODO Auto-generated method stub + return cmsSignDao; + } + +} diff --git a/src/main/java/net/mingsoft/cms/entity/CmsSignEntity.java b/src/main/java/net/mingsoft/cms/entity/CmsSignEntity.java new file mode 100644 index 00000000..c9571df1 --- /dev/null +++ b/src/main/java/net/mingsoft/cms/entity/CmsSignEntity.java @@ -0,0 +1,91 @@ +/** + * 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.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import net.mingsoft.base.entity.BaseEntity; + +/** +* 文章签收表 +* @author 铭飞开发团队 +* 创建日期:2024-03-20 15:12:32
+* 历史修订:
+*/ +@TableName("cms_sign") +public class CmsSignEntity extends BaseEntity { + +private static final long serialVersionUID = 1574925152617L; + + private String id; + + /** + * 关联文章Id + */ + private String contentId; + + /** + * 用户名 + */ + private String managerName; + + /** + * 是否签收 + */ + @TableField(exist = false) + private String isSign; + + @Override + public String getId() { + return id; + } + + @Override + public void setId(String id) { + this.id = id; + } + + public String getContentId() { + return contentId; + } + + public void setContentId(String contentId) { + this.contentId = contentId; + } + + public String getManagerName() { + return managerName; + } + + public void setManagerName(String managerName) { + this.managerName = managerName; + } + + public String getIsSign() { + return isSign; + } + + public void setIsSign(String isSign) { + this.isSign = isSign; + } +} diff --git a/src/main/java/net/mingsoft/cms/entity/ContentEntity.java b/src/main/java/net/mingsoft/cms/entity/ContentEntity.java index e3734886..c447b934 100755 --- a/src/main/java/net/mingsoft/cms/entity/ContentEntity.java +++ b/src/main/java/net/mingsoft/cms/entity/ContentEntity.java @@ -23,6 +23,7 @@ package net.mingsoft.cms.entity; import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; @@ -134,6 +135,10 @@ private static final long serialVersionUID = 1574925152617L; */ private Integer hasListHtml; + + @TableField(exist = false) + private String filePath; + public Integer getContentHit() { return contentHit; } @@ -362,6 +367,14 @@ private static final long serialVersionUID = 1574925152617L; this.hasListHtml = hasListHtml; } + public String getFilePath() { + return filePath; + } + + public void setFilePath(String filePath) { + this.filePath = filePath; + } + public String getUrl(){ // categoryPath 做占位符 return "/" + MSProperties.diy.htmlDir + "/" + BasicUtil.getApp().getAppDir() + "/categoryPath/" + id+".html"; diff --git a/src/main/webapp/WEB-INF/manager/cms/content/check-main.ftl b/src/main/webapp/WEB-INF/manager/cms/content/check-main.ftl new file mode 100644 index 00000000..09acf7ab --- /dev/null +++ b/src/main/webapp/WEB-INF/manager/cms/content/check-main.ftl @@ -0,0 +1,561 @@ + + + + 文章主体 + <#include "../../include/head-file.ftl"> + + +
+ + + + 通过 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + diff --git a/src/main/webapp/WEB-INF/manager/cms/content/check.ftl b/src/main/webapp/WEB-INF/manager/cms/content/check.ftl new file mode 100644 index 00000000..35bb8857 --- /dev/null +++ b/src/main/webapp/WEB-INF/manager/cms/content/check.ftl @@ -0,0 +1,157 @@ + + + + 文章 + <#include "../../include/head-file.ftl"> + + +
+ + +
+ + + + {{ data.categoryTitle }} + + + +
+ +
+
+ + + + diff --git a/src/main/webapp/template/1/default/chuhuijiyao-detail.htm b/src/main/webapp/template/1/default/chuhuijiyao-detail.htm index 66f4e78e..e959c250 100644 --- a/src/main/webapp/template/1/default/chuhuijiyao-detail.htm +++ b/src/main/webapp/template/1/default/chuhuijiyao-detail.htm @@ -23,6 +23,7 @@ +
<#include "header.htm" />

${field.typedescrip}

@@ -34,21 +35,93 @@

${field.typetitle}

-
${field.title}
+
${field.title}
发布时间:${field.date?string("yyyy-MM-dd")}              发布科室:${field.author}
-
${field.content}
+
${field.content}
+ <#if field.typetitle == '会议通知' || field.typetitle == '通知公告'> +
+ + <#if field.typetitle == '会议通知' || field.typetitle == '通知公告'> +
+
+ 已签收:{{signedStr}} +
+
+ 未签收:{{unSignedStr}} +
+
+ +
+
+ {ms:arclist tableName="MDIY_MODEL_NEWS"}
{/ms:arclist} +
+
+
@@ -72,6 +146,24 @@ <#include "footer.htm" /> +
- + \ No newline at end of file diff --git a/src/main/webapp/template/1/default/chuhuijiyao-list.htm b/src/main/webapp/template/1/default/chuhuijiyao-list.htm index 8c787d36..cd03d40c 100644 --- a/src/main/webapp/template/1/default/chuhuijiyao-list.htm +++ b/src/main/webapp/template/1/default/chuhuijiyao-list.htm @@ -26,41 +26,62 @@ <#include "header.htm" /> -

${field.typetitle}

-
<#include "footer.htm" /> - + \ No newline at end of file diff --git a/src/main/webapp/template/1/default/css/css.css b/src/main/webapp/template/1/default/css/css.css index 0878dc41..09efec07 100644 --- a/src/main/webapp/template/1/default/css/css.css +++ b/src/main/webapp/template/1/default/css/css.css @@ -286,11 +286,11 @@ } .about_x .show_t { line-height: 36px; - font-size: 24px; - color: #333; + font-size: 22px; + color: #333333 ; text-align: center; margin-bottom: 15px; - font-weight: normal; + font-weight: bold; } .about_x .con_line { height: 40px;