diff --git a/src/main/java/net/mingsoft/cms/action/DutyStandbyAction.java b/src/main/java/net/mingsoft/cms/action/DutyStandbyAction.java index 661d5e76..537a2f50 100644 --- a/src/main/java/net/mingsoft/cms/action/DutyStandbyAction.java +++ b/src/main/java/net/mingsoft/cms/action/DutyStandbyAction.java @@ -27,7 +27,9 @@ 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.IDutyStandbyBiz; import net.mingsoft.cms.biz.IPhoneContactsBiz; @@ -56,7 +58,7 @@ import java.util.List; @Api(tags={"后端-值班备勤接口"}) @Controller("dutyStandbyAction") @RequestMapping("/${ms.manager.path}/cms/dutyStandby") -public class DutyStandbyAction extends BaseAction{ +public class DutyStandbyAction extends BaseFileAction { /** @@ -82,7 +84,6 @@ public class DutyStandbyAction extends BaseAction{ @RequestMapping(value ="/list",method = {RequestMethod.GET,RequestMethod.POST}) @ResponseBody public ResultData list(@ModelAttribute @ApiIgnore DutyStandbyEntity entity) { - BasicUtil.startPage(); entity.setSqlWhere(""); List list = dutyStandbyBiz.query(entity); return ResultData.build().success(new EUListBean(list,(int)BasicUtil.endPage(list).getTotal())); @@ -95,20 +96,24 @@ public class DutyStandbyAction extends BaseAction{ @ApiOperation(value = "导入接口") @PostMapping("/import") @ResponseBody - public ResultData importData(MultipartFile file){ - List excelList = ExcelUtil.read(file, DutyStandbyEntity.class); + public ResultData importData(@ApiIgnore UploadConfigBean bean) throws IOException { + List excelList = ExcelUtil.read(bean.getFile(), DutyStandbyEntity.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(DutyStandbyEntity entity : excelList){ //删除相同日期数据 dutyStandbyBiz.deleteByEntity(entity); //导入数据 + entity.setFilePath(filePath); entity.setCreateDate(new Date()); entity.setCreateBy(BasicUtil.getManager().getId()); dutyStandbyBiz.save(entity); } - + return ResultData.build().success(filePath); + }else{ + return ResultData.build().error("导入文件为空!"); } - return ResultData.build().success("导入成功!"); } /** @@ -121,4 +126,17 @@ public class DutyStandbyAction extends BaseAction{ ExcelUtil.export(response, "值班备勤导入模板", "值班备勤", list, DutyStandbyExcel.class); } + /** + * 导入接口 + * @param + */ + @PostMapping("/deleteByContentIds") + @ResponseBody + public ResultData deleteByContentIds(@RequestParam(value = "contentIds",required = false)List contentIds) throws IOException { + dutyStandbyBiz.deleteByContentIds(contentIds); + return ResultData.build().success("删除成功"); + } + + + } 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 d010606e..88ef439c 100644 --- a/src/main/java/net/mingsoft/cms/action/web/DutyStandbyAction.java +++ b/src/main/java/net/mingsoft/cms/action/web/DutyStandbyAction.java @@ -77,7 +77,6 @@ public class DutyStandbyAction extends BaseAction { @RequestMapping(value ="/list",method = {RequestMethod.GET,RequestMethod.POST}) @ResponseBody public ResultData list(@ModelAttribute @ApiIgnore DutyStandbyEntity entity) { - BasicUtil.startPage(); entity.setSqlWhere(""); List list = dutyStandbyBiz.query(entity); return ResultData.build().success(new EUListBean(list,(int)BasicUtil.endPage(list).getTotal())); diff --git a/src/main/java/net/mingsoft/cms/biz/ICmsSignBiz.java b/src/main/java/net/mingsoft/cms/biz/ICmsSignBiz.java new file mode 100644 index 00000000..fe95ce76 --- /dev/null +++ b/src/main/java/net/mingsoft/cms/biz/ICmsSignBiz.java @@ -0,0 +1,40 @@ +/** + * 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.CmsSignEntity; +import net.mingsoft.cms.entity.PhoneContactsEntity; + +import java.util.List; + + +/** + * 分类业务 + * @author 铭飞开发团队 + * 创建日期:2019-11-28 15:12:32
+ * 历史修订:
+ */ +public interface ICmsSignBiz extends IBaseBiz { + +} diff --git a/src/main/java/net/mingsoft/cms/biz/impl/DutyStandbyBizImpl.java b/src/main/java/net/mingsoft/cms/biz/impl/DutyStandbyBizImpl.java index 29589986..5fcdf6ae 100644 --- a/src/main/java/net/mingsoft/cms/biz/impl/DutyStandbyBizImpl.java +++ b/src/main/java/net/mingsoft/cms/biz/impl/DutyStandbyBizImpl.java @@ -36,6 +36,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.util.List; + /** * 分类管理持久化层 * @author 铭飞开发团队 @@ -63,4 +65,9 @@ public class DutyStandbyBizImpl extends BaseBizImpl contentIds) { + dutyStandbyDao.deleteByContentIds(contentIds); + } } diff --git a/src/main/java/net/mingsoft/cms/dao/ICmsSignDao.java b/src/main/java/net/mingsoft/cms/dao/ICmsSignDao.java new file mode 100644 index 00000000..7ce4af86 --- /dev/null +++ b/src/main/java/net/mingsoft/cms/dao/ICmsSignDao.java @@ -0,0 +1,41 @@ +/** + * 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.CmsSignEntity; +import net.mingsoft.cms.entity.PhoneContactsEntity; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** + * 分类持久层 + * @author 铭飞开发团队 + * 创建日期:2024-03-20 15:12:32
+ * 历史修订:
+ */ +@Component("cmsSignDao") +public interface ICmsSignDao extends IBaseDao { + +} diff --git a/src/main/java/net/mingsoft/cms/dao/ICmsSignDao.xml b/src/main/java/net/mingsoft/cms/dao/ICmsSignDao.xml new file mode 100644 index 00000000..edd3d28b --- /dev/null +++ b/src/main/java/net/mingsoft/cms/dao/ICmsSignDao.xml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + update cms_sign + + content_id=#{contentId}, + manager_name=#{managerName}, + create_by=#{createBy}, + create_date=#{createDate}, + update_by=#{updateBy}, + update_date=#{updateDate}, + del=#{del}, + + where id = #{id} + + + + + + + + + + + delete from cms_sign where id=#{id} + + + + + delete from cms_sign + + id in #{item} + + + + + + + + diff --git a/src/main/java/net/mingsoft/cms/entity/DutyStandbyEntity.java b/src/main/java/net/mingsoft/cms/entity/DutyStandbyEntity.java index 7b6f85c4..2191c4df 100644 --- a/src/main/java/net/mingsoft/cms/entity/DutyStandbyEntity.java +++ b/src/main/java/net/mingsoft/cms/entity/DutyStandbyEntity.java @@ -52,22 +52,16 @@ public class DutyStandbyEntity extends BaseEntity { private String monitor; /** - * 副带班长 + * 民警值班员 */ - @ExcelProperty("副带班长") - private String deputyMonitor; + @ExcelProperty("民警值班员") + private String policeDuty; /** - * 守机员 + * 辅警值班员 */ - @ExcelProperty("守机员") - private String operator; - - /** - * 值班人员 - */ - @ExcelProperty("值班人员") - private String dutyPerson; + @ExcelProperty("辅警值班员") + private String auxiliaryPoliceDuty; /** * 北岭值班人员 @@ -75,6 +69,16 @@ public class DutyStandbyEntity extends BaseEntity { @ExcelProperty("北岭值班人员") private String blDutyPerson; + /** + * 上传文件路径 + */ + private String filePath; + + /** + * 关联文章Id + */ + private String contentId; + @Override public String getId() { return id; @@ -101,28 +105,20 @@ public class DutyStandbyEntity extends BaseEntity { this.monitor = monitor; } - public String getDeputyMonitor() { - return deputyMonitor; - } - - public void setDeputyMonitor(String deputyMonitor) { - this.deputyMonitor = deputyMonitor; + public String getPoliceDuty() { + return policeDuty; } - public String getOperator() { - return operator; + public void setPoliceDuty(String policeDuty) { + this.policeDuty = policeDuty; } - public void setOperator(String operator) { - this.operator = operator; + public String getAuxiliaryPoliceDuty() { + return auxiliaryPoliceDuty; } - public String getDutyPerson() { - return dutyPerson; - } - - public void setDutyPerson(String dutyPerson) { - this.dutyPerson = dutyPerson; + public void setAuxiliaryPoliceDuty(String auxiliaryPoliceDuty) { + this.auxiliaryPoliceDuty = auxiliaryPoliceDuty; } public String getBlDutyPerson() { @@ -132,4 +128,20 @@ public class DutyStandbyEntity extends BaseEntity { public void setBlDutyPerson(String blDutyPerson) { this.blDutyPerson = blDutyPerson; } + + 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/webapp/WEB-INF/manager/cms/content/form.ftl b/src/main/webapp/WEB-INF/manager/cms/content/form.ftl index 4c6414cd..e928e6c0 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 @@ -176,23 +176,6 @@ - - - - - {{true? item.label : item.value}} - - -
- 选择否后前端将不显示,需要重新生成才有效果 -
-
-
-
- 主办单位: 山东省公安厅 承办单位:山东省公安厅 + 青岛市公安局交通警察支队车辆管理所 版权所有
- 鲁ICP备05003255 鲁公网安备 15010202150854  政府网站标识码:1500000000 -
- 联系地址:山东省青岛市城阳区流亭街道 未经授权严禁转载 联系电话:0532-1234567 + 联系地址:山东省青岛市城阳区惠安路6号 联系电话:0532-12123
@@ -49,7 +46,7 @@ var sdgaw = [] var sdjjw = [] var qdgaw = [] - axios.get('/cms/content/list.do?categoryId=1773193835922075650').then(res=>{ + axios.get('/cms/content/list.do?categoryId=1773193835922075650&pageSize=999').then(res=>{ if(res.data.code == 200 && res.data.result){ @@ -75,30 +72,27 @@ } for (var qggawi = 0; qggawi < qggaw.length; qggawi++) { - var qggawhtmls = "" + var qggawhtmls = "" $(".qggaw").after(qggawhtmls); } for (var qgjjwi = 0; qgjjwi < qgjjw.length; qgjjwi++) { - var qgjjwhtmls = "" + var qgjjwhtmls = "" $(".qgjjw").after(qgjjwhtmls); } for (var sdgawi = 0; sdgawi < sdgaw.length; sdgawi++) { - var sdgawhtmls = "" + var sdgawhtmls = "" $(".sdgaw").after(sdgawhtmls); } for (var sdjjwi = 0; sdjjwi < sdjjw.length; sdjjwi++) { - var sdjjwhtmls = "" + var sdjjwhtmls = "" $(".sdjjw").after(sdjjwhtmls); } for (var qdgawi = 0; qdgawi < qdgaw.length; qdgawi++) { - var qdgawhtmls = "" + var qdgawhtmls = "" $(".qdgaw").after(qdgawhtmls); } - - - -} - }) + } +}) \ No newline at end of file diff --git a/src/main/webapp/template/1/default/header.htm b/src/main/webapp/template/1/default/header.htm index 0ac04d78..1a5393bb 100644 --- a/src/main/webapp/template/1/default/header.htm +++ b/src/main/webapp/template/1/default/header.htm @@ -5,6 +5,7 @@ +
-
-