diff --git a/src/main/java/net/mingsoft/cms/action/ContentAction.java b/src/main/java/net/mingsoft/cms/action/ContentAction.java index 890b3569..68f8a7b5 100755 --- a/src/main/java/net/mingsoft/cms/action/ContentAction.java +++ b/src/main/java/net/mingsoft/cms/action/ContentAction.java @@ -305,4 +305,14 @@ public class ContentAction extends BaseAction { contentBiz.saveOrUpdate(content); return ResultData.build().success(content); } + + @PostMapping("/pass") + @ResponseBody + public ResultData pass(@RequestBody List contents) { + for(ContentEntity entity :contents){ + entity.setContentDisplay("0"); + } + contentBiz.updateBatchById(contents); + 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 new file mode 100644 index 00000000..661d5e76 --- /dev/null +++ b/src/main/java/net/mingsoft/cms/action/DutyStandbyAction.java @@ -0,0 +1,124 @@ +/** + * 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.bean.EUListBean; +import net.mingsoft.basic.util.BasicUtil; +import net.mingsoft.cms.biz.IDutyStandbyBiz; +import net.mingsoft.cms.biz.IPhoneContactsBiz; +import net.mingsoft.cms.entity.DutyStandbyEntity; +import net.mingsoft.cms.entity.PhoneContactsEntity; +import net.mingsoft.cms.excel.DutyStandbyExcel; +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.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * 分类管理控制层 + * @author 铭飞开发团队 + * 创建日期:2019-11-28 15:12:32
+ * 历史修订:
+ */ +@Api(tags={"后端-值班备勤接口"}) +@Controller("dutyStandbyAction") +@RequestMapping("/${ms.manager.path}/cms/dutyStandby") +public class DutyStandbyAction extends BaseAction{ + + + /** + * 注入分类业务层 + */ + @Autowired + private IDutyStandbyBiz dutyStandbyBiz; + + /** + * 查询分类列表 + * @param entity 分类实体 + */ + @ApiOperation(value = "查询分类列表接口") + @ApiImplicitParams({ + @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 = "blDutyPerson", value = "北岭值班人员", required =false,paramType="query"), + }) + @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())); + } + + /** + * 导入接口 + * @param + */ + @ApiOperation(value = "导入接口") + @PostMapping("/import") + @ResponseBody + public ResultData importData(MultipartFile file){ + List excelList = ExcelUtil.read(file, DutyStandbyEntity.class); + if(excelList!=null){ + for(DutyStandbyEntity entity : excelList){ + //删除相同日期数据 + dutyStandbyBiz.deleteByEntity(entity); + //导入数据 + entity.setCreateDate(new Date()); + entity.setCreateBy(BasicUtil.getManager().getId()); + dutyStandbyBiz.save(entity); + } + + } + return ResultData.build().success("导入成功!"); + } + + /** + * 导出模板 + */ + @GetMapping("importTmplate") + @ApiOperation(value = "导入模板") + public void importTmplate(HttpServletResponse response) throws IOException { + List list = new ArrayList<>(); + ExcelUtil.export(response, "值班备勤导入模板", "值班备勤", list, DutyStandbyExcel.class); + } + +} diff --git a/src/main/java/net/mingsoft/cms/action/PhoneContactsAction.java b/src/main/java/net/mingsoft/cms/action/PhoneContactsAction.java index dd7fa261..94ca4059 100644 --- a/src/main/java/net/mingsoft/cms/action/PhoneContactsAction.java +++ b/src/main/java/net/mingsoft/cms/action/PhoneContactsAction.java @@ -30,7 +30,9 @@ import net.mingsoft.base.entity.ResultData; import net.mingsoft.basic.bean.EUListBean; 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; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -38,6 +40,9 @@ 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.Date; import java.util.List; @@ -99,4 +104,14 @@ public class PhoneContactsAction extends BaseAction{ return ResultData.build().success("导入成功!"); } + /** + * 导出模板 + */ + @GetMapping("importTmplate") + @ApiOperation(value = "导入模板") + public void importTmplate(HttpServletResponse response) throws IOException { + List list = new ArrayList<>(); + ExcelUtil.export(response, "通讯录导入模板", "通讯录", list, PhoneContactsExcel.class); + } + } diff --git a/src/main/java/net/mingsoft/cms/action/web/DutyStandbyAction.java b/src/main/java/net/mingsoft/cms/action/web/DutyStandbyAction.java new file mode 100644 index 00000000..d010606e --- /dev/null +++ b/src/main/java/net/mingsoft/cms/action/web/DutyStandbyAction.java @@ -0,0 +1,86 @@ +/** + * 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.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 springfox.documentation.annotations.ApiIgnore; + +import java.util.Date; +import java.util.List; + +/** + * 分类管理控制层 + * @author 铭飞开发团队 + * 创建日期:2019-11-28 15:12:32
+ * 历史修订:
+ */ +@Api(tags={"前端-值班备勤接口"}) +@Controller("WebdutyStandbyAction") +@RequestMapping("/cms/dutyStandby") +public class DutyStandbyAction extends BaseAction { + + + /** + * 注入分类业务层 + */ + @Autowired + private IDutyStandbyBiz dutyStandbyBiz; + + /** + * 查询分类列表 + * @param entity 分类实体 + */ + @ApiOperation(value = "查询分类列表接口") + @ApiImplicitParams({ + @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 = "blDutyPerson", value = "北岭值班人员", required =false,paramType="query"), + }) + @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/IDutyStandbyBiz.java b/src/main/java/net/mingsoft/cms/biz/IDutyStandbyBiz.java new file mode 100644 index 00000000..68c3b720 --- /dev/null +++ b/src/main/java/net/mingsoft/cms/biz/IDutyStandbyBiz.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.DutyStandbyEntity; +import net.mingsoft.cms.entity.PhoneContactsEntity; + + +/** + * 分类业务 + * @author 铭飞开发团队 + * 创建日期:2019-11-28 15:12:32
+ * 历史修订:
+ */ +public interface IDutyStandbyBiz extends IBaseBiz { + + void deleteByEntity(DutyStandbyEntity entity); + +} diff --git a/src/main/java/net/mingsoft/cms/biz/impl/DutyStandbyBizImpl.java b/src/main/java/net/mingsoft/cms/biz/impl/DutyStandbyBizImpl.java new file mode 100644 index 00000000..29589986 --- /dev/null +++ b/src/main/java/net/mingsoft/cms/biz/impl/DutyStandbyBizImpl.java @@ -0,0 +1,66 @@ +/** + * 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.IDutyStandbyBiz; +import net.mingsoft.cms.biz.IPhoneContactsBiz; +import net.mingsoft.cms.dao.IDutyStandbyDao; +import net.mingsoft.cms.dao.IPhoneContactsDao; +import net.mingsoft.cms.entity.DutyStandbyEntity; +import net.mingsoft.cms.entity.PhoneContactsEntity; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +/** + * 分类管理持久化层 + * @author 铭飞开发团队 + * 创建日期:2019-11-28 15:12:32
+ * 历史修订:
+ */ +@Service("dutyStandbyBizImpl") +@Transactional(rollbackFor = RuntimeException.class) +public class DutyStandbyBizImpl extends BaseBizImpl implements IDutyStandbyBiz { + + + @Autowired + private IDutyStandbyDao dutyStandbyDao; + + + + @Override + protected IBaseDao getDao() { + return dutyStandbyDao; + } + + + @Override + @Transactional + public void deleteByEntity(DutyStandbyEntity entity) { + dutyStandbyDao.deleteByEntity(entity); + } +} diff --git a/src/main/java/net/mingsoft/cms/dao/IDutyStandbyDao.java b/src/main/java/net/mingsoft/cms/dao/IDutyStandbyDao.java new file mode 100644 index 00000000..29ae3d82 --- /dev/null +++ b/src/main/java/net/mingsoft/cms/dao/IDutyStandbyDao.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.dao; + +import net.mingsoft.base.dao.IBaseDao; +import net.mingsoft.cms.entity.DutyStandbyEntity; +import net.mingsoft.cms.entity.PhoneContactsEntity; +import org.springframework.stereotype.Component; + +/** + * 分类持久层 + * @author 铭飞开发团队 + * 创建日期:2024-03-20 15:12:32
+ * 历史修订:
+ */ +@Component("dutyStandbyDao") +public interface IDutyStandbyDao extends IBaseDao { + + void deleteByEntity(DutyStandbyEntity entity); +} diff --git a/src/main/java/net/mingsoft/cms/dao/IDutyStandbyDao.xml b/src/main/java/net/mingsoft/cms/dao/IDutyStandbyDao.xml new file mode 100644 index 00000000..a2364604 --- /dev/null +++ b/src/main/java/net/mingsoft/cms/dao/IDutyStandbyDao.xml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + update duty_standby + + duty_date=#{dutyDate}, + monitor=#{monitor}, + deputy_monitor=#{deputyMonitor}, + operator=#{operator}, + duty_person=#{dutyPerson}, + bl_duty_person=#{blDutyPerson}, + create_by=#{createBy}, + create_date=#{createDate}, + update_by=#{updateBy}, + update_date=#{updateDate}, + del=#{del}, + + where id = #{id} + + + + + + + + + + + delete from duty_standby where id=#{id} + + + + delete from duty_standby + + and duty_date=#{dutyDate} + + + + + + delete from duty_standby + + 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 new file mode 100644 index 00000000..7b6f85c4 --- /dev/null +++ b/src/main/java/net/mingsoft/cms/entity/DutyStandbyEntity.java @@ -0,0 +1,135 @@ +/** + * 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_standby") +public class DutyStandbyEntity extends BaseEntity { + + + private static final long serialVersionUID = -202180033093209501L; + private String id; + + /** + * 值班日期 + */ + @ExcelProperty("值班日期") + private String dutyDate; + + /** + * 带班长 + */ + @ExcelProperty("带班长") + private String monitor; + + /** + * 副带班长 + */ + @ExcelProperty("副带班长") + private String deputyMonitor; + + /** + * 守机员 + */ + @ExcelProperty("守机员") + private String operator; + + /** + * 值班人员 + */ + @ExcelProperty("值班人员") + private String dutyPerson; + + /** + * 北岭值班人员 + */ + @ExcelProperty("北岭值班人员") + private String blDutyPerson; + + @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 getMonitor() { + return monitor; + } + + public void setMonitor(String monitor) { + this.monitor = monitor; + } + + public String getDeputyMonitor() { + return deputyMonitor; + } + + public void setDeputyMonitor(String deputyMonitor) { + this.deputyMonitor = deputyMonitor; + } + + public String getOperator() { + return operator; + } + + public void setOperator(String operator) { + this.operator = operator; + } + + public String getDutyPerson() { + return dutyPerson; + } + + public void setDutyPerson(String dutyPerson) { + this.dutyPerson = dutyPerson; + } + + public String getBlDutyPerson() { + return blDutyPerson; + } + + public void setBlDutyPerson(String blDutyPerson) { + this.blDutyPerson = blDutyPerson; + } +} diff --git a/src/main/java/net/mingsoft/cms/excel/DutyStandbyExcel.java b/src/main/java/net/mingsoft/cms/excel/DutyStandbyExcel.java new file mode 100644 index 00000000..a002556b --- /dev/null +++ b/src/main/java/net/mingsoft/cms/excel/DutyStandbyExcel.java @@ -0,0 +1,124 @@ +/** + * 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 com.baomidou.mybatisplus.annotation.TableName; +import net.mingsoft.base.entity.BaseEntity; + +import java.io.Serializable; + +/** +* 值班备勤表 +* @author 铭飞开发团队 +* 创建日期:2024-03-20 15:12:32
+* 历史修订:
+*/ +public class DutyStandbyExcel implements Serializable { + + + private static final long serialVersionUID = -8204345859257208121L; + /** + * 值班日期 + */ + @ExcelProperty("值班日期") + private String dutyDate; + + /** + * 带班长 + */ + @ExcelProperty("带班长") + private String monitor; + + /** + * 副带班长 + */ + @ExcelProperty("副带班长") + private String deputyMonitor; + + /** + * 守机员 + */ + @ExcelProperty("守机员") + private String operator; + + /** + * 值班人员 + */ + @ExcelProperty("值班人员") + private String dutyPerson; + + /** + * 北岭值班人员 + */ + @ExcelProperty("北岭值班人员") + private String blDutyPerson; + + public String getDutyDate() { + return dutyDate; + } + + public void setDutyDate(String dutyDate) { + this.dutyDate = dutyDate; + } + + public String getMonitor() { + return monitor; + } + + public void setMonitor(String monitor) { + this.monitor = monitor; + } + + public String getDeputyMonitor() { + return deputyMonitor; + } + + public void setDeputyMonitor(String deputyMonitor) { + this.deputyMonitor = deputyMonitor; + } + + public String getOperator() { + return operator; + } + + public void setOperator(String operator) { + this.operator = operator; + } + + public String getDutyPerson() { + return dutyPerson; + } + + public void setDutyPerson(String dutyPerson) { + this.dutyPerson = dutyPerson; + } + + public String getBlDutyPerson() { + return blDutyPerson; + } + + public void setBlDutyPerson(String blDutyPerson) { + this.blDutyPerson = blDutyPerson; + } +} diff --git a/src/main/java/net/mingsoft/cms/excel/PhoneContactsExcel.java b/src/main/java/net/mingsoft/cms/excel/PhoneContactsExcel.java new file mode 100644 index 00000000..6dbcd375 --- /dev/null +++ b/src/main/java/net/mingsoft/cms/excel/PhoneContactsExcel.java @@ -0,0 +1,67 @@ +/** + * 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 com.baomidou.mybatisplus.annotation.TableName; +import net.mingsoft.base.entity.BaseEntity; + +import java.io.Serializable; + +/** +* 通讯录表 +* @author 铭飞开发团队 +* 创建日期:2024-03-20 15:12:32
+* 历史修订:
+*/ +public class PhoneContactsExcel implements Serializable { + + private static final long serialVersionUID = 4727044013578081435L; + /** + * 姓名 + */ + @ExcelProperty("姓名") + private String name; + + /** + * 手机号 + */ + @ExcelProperty("手机号") + private String phone; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } +} diff --git a/src/main/java/net/mingsoft/statistics/action/PasZhAction.java b/src/main/java/net/mingsoft/statistics/action/PasZhAction.java index 92750b61..af28f487 100644 --- a/src/main/java/net/mingsoft/statistics/action/PasZhAction.java +++ b/src/main/java/net/mingsoft/statistics/action/PasZhAction.java @@ -53,7 +53,7 @@ import springfox.documentation.annotations.ApiIgnore; * 历史修订:
*/ @Api(tags = "后台-置灰接口") -@Controller("statisticsPasZhAction") +@Controller("pasZhAction") @RequestMapping("/${ms.manager.path}/statistics/pasZh") public class PasZhAction extends BaseAction{ diff --git a/src/main/java/net/mingsoft/statistics/action/web/PasZhAction.java b/src/main/java/net/mingsoft/statistics/action/web/PasZhAction.java new file mode 100644 index 00000000..dcb179a2 --- /dev/null +++ b/src/main/java/net/mingsoft/statistics/action/web/PasZhAction.java @@ -0,0 +1,171 @@ +package net.mingsoft.statistics.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.bean.EUListBean; +import net.mingsoft.basic.constant.e.BusinessTypeEnum; +import net.mingsoft.basic.util.BasicUtil; +import net.mingsoft.statistics.action.BaseAction; +import net.mingsoft.statistics.biz.IPasZhBiz; +import net.mingsoft.statistics.entity.PasZhEntity; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.stream.Collectors; + +/** +* 置灰管理控制层 +* @author D +* 创建日期:2024-3-28 16:50:04
+* 历史修订:
+*/ +@Api(tags = "前台-置灰接口") +@Controller("webPasZhAction") +@RequestMapping("/statistics/pasZh") +public class PasZhAction extends BaseAction { + + + /** + * 注入置灰业务层 + */ + @Autowired + private IPasZhBiz pasZhBiz; + + /** + * 返回主界面index + */ + @GetMapping("/index") + public String index(HttpServletResponse response,HttpServletRequest request) { + return "/statistics/pas-zh/index"; + } + + /** + * 查询置灰列表 + * @param pasZh 置灰实体 + */ + @ApiOperation(value = "查询置灰列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "yjzh", value = "一键置灰", paramType = "query"), + @ApiImplicitParam(name = "zhEndtime", value = "结束日期", paramType = "query"), + }) + @RequestMapping(value ="/list",method = {RequestMethod.GET,RequestMethod.POST}) + @ResponseBody + public ResultData list(@ModelAttribute @ApiIgnore PasZhEntity pasZh, HttpServletResponse response, HttpServletRequest request, @ApiIgnore ModelMap model, BindingResult result) { + BasicUtil.startPage(); + List pasZhList = null; + if ( pasZh.getSqlWhere() != null){ + pasZhList = pasZhBiz.query(pasZh); + } else { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(pasZh).orderByDesc(PasZhEntity::getCreateDate); + pasZhList = pasZhBiz.list(wrapper); + } + return ResultData.build().success(new EUListBean(pasZhList,(int)BasicUtil.endPage(pasZhList).getTotal())); + } + + /** + * 返回编辑界面pasZh的form + */ + @GetMapping("/form") + public String form(@ModelAttribute PasZhEntity pasZh,HttpServletResponse response,HttpServletRequest request,ModelMap model) { + return "/statistics/pas-zh/form"; + } + + + /** + * 获取置灰 + * @param pasZh 置灰实体 + */ + @ApiOperation(value = "获取置灰列表接口") + @ApiImplicitParam(name = "id", value = "主键ID", required =true,paramType="query") + @GetMapping("/get") + @ResponseBody + public ResultData get(@ModelAttribute @ApiIgnore PasZhEntity pasZh,HttpServletResponse response, HttpServletRequest request,@ApiIgnore ModelMap model) { + if (pasZh.getId()==null) { + return ResultData.build().error(); + } + PasZhEntity _pasZh = (PasZhEntity)pasZhBiz.getById(pasZh.getId()); + return ResultData.build().success(_pasZh); + } + + + /** + * 保存置灰 + * @param pasZh 置灰实体 + */ + @ApiOperation(value = "保存置灰列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "yjzh", value = "一键置灰", required =true, paramType = "query"), + @ApiImplicitParam(name = "zhEndtime", value = "结束日期", required =true, paramType = "query"), + }) + @PostMapping("/save") + @ResponseBody + @LogAnn(title = "保存置灰", businessType = BusinessTypeEnum.INSERT) + @RequiresPermissions("statistics:pasZh:save") + public ResultData save(@ModelAttribute @ApiIgnore PasZhEntity pasZh, HttpServletResponse response, HttpServletRequest request) { + //验证结束日期的值是否合法 + if (pasZh.getZhEndtime()==null) { + return ResultData.build().error(getResString("err.empty", this.getResString("zh.endtime"))); + } + pasZhBiz.save(pasZh); + return ResultData.build().success(pasZh); + } + + /** + * 删除置灰 + * + * @param pasZhs 置灰实体 + */ + @ApiOperation(value = "批量删除置灰列表接口") + @PostMapping("/delete") + @ResponseBody + @LogAnn(title = "删除置灰", businessType = BusinessTypeEnum.DELETE) + @RequiresPermissions("statistics:pasZh:del") + public ResultData delete(@RequestBody List pasZhs,HttpServletResponse response, HttpServletRequest request) { + List ids = (List)pasZhs.stream().map((p) -> {return p.getId();}).collect(Collectors.toList()); + return this.pasZhBiz.removeByIds(ids) ? ResultData.build().success() : ResultData.build().error(this.getResString("err.error", new String[]{this.getResString("id")})); + } + + /** + * 更新置灰列表 + * + * @param pasZh 置灰实体 + */ + @ApiOperation(value = "更新置灰列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "yjzh", value = "一键置灰", required =true, paramType = "query"), + @ApiImplicitParam(name = "zhEndtime", value = "结束日期", required =true, paramType = "query"), + }) + @PostMapping("/update") + @ResponseBody + @LogAnn(title = "更新置灰", businessType = BusinessTypeEnum.UPDATE) + @RequiresPermissions("statistics:pasZh:update") + public ResultData update(@ModelAttribute @ApiIgnore PasZhEntity pasZh, HttpServletResponse response, + HttpServletRequest request) { + //先查询数据是否存在 + PasZhEntity _pasZh = (PasZhEntity)pasZhBiz.getById(pasZh.getId()); + if(_pasZh == null) { + return ResultData.build().error(getResString("err.not.exist",pasZh.getId() )); + } + //验证结束日期的值是否合法 + if (pasZh.getZhEndtime()==null) { + return ResultData.build().error(getResString("err.empty", this.getResString("zh.endtime"))); + } + pasZhBiz.updateById(pasZh); + return ResultData.build().success(pasZh); + } + + +} \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/manager/statistics/pas-zh/form.ftl b/src/main/webapp/WEB-INF/manager/statistics/pas-zh/form.ftl index 3d5c8d41..afd3ecbe 100644 --- a/src/main/webapp/WEB-INF/manager/statistics/pas-zh/form.ftl +++ b/src/main/webapp/WEB-INF/manager/statistics/pas-zh/form.ftl @@ -79,15 +79,16 @@ placeholder="请选择结束日期" :readonly="false" save:function() { var that = this; - var url = ms.manager + "/cms/pasZh/save.do" + var url = ms.manager + "/statistics/pasZh/save.do" if (that.form.id > 0) { - url = ms.manager + "/cms/pasZh/update.do"; + url = ms.manager + "/statistics/pasZh/update.do"; } this.$refs.form.validate(function(valid) { if (valid) { that.saveDisabled = true; var form = JSON.parse(JSON.stringify(that.form)); + form.yjzh = form.yjzh ? 1 : 0 ms.http.post(url, form).then(function (res) { if (res.result) { that.$notify({ @@ -95,7 +96,7 @@ placeholder="请选择结束日期" :readonly="false" message: "保存成功", type: 'success' }); - // ms.util.openSystemUrl("/cms/pasZh/index.do"); + // ms.util.openSystemUrl("/statistics/pasZh/index.do"); } else { that.$notify({ title: "错误", @@ -119,17 +120,18 @@ placeholder="请选择结束日期" :readonly="false" get:function(id) { var that = this; this.loading = true - ms.http.get(ms.manager + "/cms/pasZh/get.do", {"id":id}).then(function (res) { + ms.http.get(ms.manager + "/statistics/pasZh/get.do", {"id":id}).then(function (res) { that.loading = false if(res.result&&res.data) { that.form = res.data; + that.form.yjzh = !!res.data.yjzh } }); }, update: function (row) { var that = this; - ms.http.post(ms.manager+"/cms/pasZh/update.do", row).then(function (data) { + ms.http.post(ms.manager+"/statistics/pasZh/update.do", row).then(function (data) { if (data.result) { that.$notify({ title: '成功', diff --git a/src/main/webapp/template/1/default/chuhuijiyao-list.htm b/src/main/webapp/template/1/default/chuhuijiyao-list.htm index 01a5b254..8c787d36 100644 --- a/src/main/webapp/template/1/default/chuhuijiyao-list.htm +++ b/src/main/webapp/template/1/default/chuhuijiyao-list.htm @@ -29,8 +29,8 @@

${field.typetitle}

    diff --git a/src/main/webapp/template/1/default/css/header.css b/src/main/webapp/template/1/default/css/header.css index 5eedabc9..e5f3f144 100644 --- a/src/main/webapp/template/1/default/css/header.css +++ b/src/main/webapp/template/1/default/css/header.css @@ -120,6 +120,11 @@ box-sizing: border-box; } +.hurl div a{ + cursor:pointer; + color:#1F3464 +} + .hurl div:last-child { border: 0; } @@ -237,6 +242,8 @@ cursor: pointer; outline: none; border:0; + font-size: 18px; + color: #999999; } .footer-bg .f-b-box { diff --git a/src/main/webapp/template/1/default/css/index.css b/src/main/webapp/template/1/default/css/index.css index 03fbeae8..dca4a658 100644 --- a/src/main/webapp/template/1/default/css/index.css +++ b/src/main/webapp/template/1/default/css/index.css @@ -568,6 +568,7 @@ html body { .slider_news .swiper-slide img { width: 100%; height: 100%; + object-fit: cover; } .slider_news .swiper-pagination { @@ -674,6 +675,7 @@ html body { align-items: center; justify-content: space-between; margin-bottom: 36px; + white-space:nowrap } .cg_news .center_news .right_news .right_ul_news li:hover .nwest { @@ -798,7 +800,7 @@ html body { width: 32%; height: 365px; margin-bottom: 30px; - background-color: rgba(255, 255, 255, 0.7); + background-color: rgba(255, 255, 255, 1); padding: 0 30px; box-sizing: border-box; } @@ -931,6 +933,7 @@ html body { .dt_search .dt_left .dt_con ul li img { width: 100%; height: 234px; + object-fit: cover; } .dt_search .dt_left .dt_con ul li .img_txt { @@ -1093,6 +1096,7 @@ html body { width: 172.6px; height: 110px; text-align: center; + flex:1 } .right_top_bottom_td_t { @@ -1197,9 +1201,12 @@ html body { font-size: 22px; display: flex; align-items: center; - justify-content: space-around; + // justify-content: space-around; + text-align: center; +} +.star_mask div { +width:50%; } - /*车管风采*/ .cgfc_box { width: 100%; @@ -1319,19 +1326,20 @@ html body { margin-left: 40px; } - .dateCard span { + .dateCard li { background: #004ebd; - padding: 0 3px; color: #fff; - margin-right: 1px; + margin-right: 2px; width: 28px; height: 28px; - line-height: 28px; - + line-height: 28px; text-align: center; font-weight: bold; } - + .dateCard div { + font-size:16px; + margin-right:2px; + } .qgs { font-size: 20px; diff --git a/src/main/webapp/template/1/default/css/public.css b/src/main/webapp/template/1/default/css/public.css index c1889ba9..ff141e9f 100644 --- a/src/main/webapp/template/1/default/css/public.css +++ b/src/main/webapp/template/1/default/css/public.css @@ -101,7 +101,7 @@ -webkit-line-clamp: 2; } .index-contentbox { - width: 1440px; + width: 1400px; margin: 0 auto; } diff --git a/src/main/webapp/template/1/default/css/style.css b/src/main/webapp/template/1/default/css/style.css index 0862b0b4..96f3e24b 100644 --- a/src/main/webapp/template/1/default/css/style.css +++ b/src/main/webapp/template/1/default/css/style.css @@ -36,7 +36,7 @@ em, cite, th { .wrap { clear: both; width: 96%; - max-width: 1300px; + max-width: 1400px; margin: 0 auto; text-align: left; zoom: 1; @@ -1498,5 +1498,12 @@ body .baidu_ditu { cursor:pointer; margin-top:50px } +.breadcrumb{ + font-size:20px; + margin-top:50px +} +.breadcrumb span:hover{ + color:#000 +} diff --git a/src/main/webapp/template/1/default/header.htm b/src/main/webapp/template/1/default/header.htm index 64f359be..0ac04d78 100644 --- a/src/main/webapp/template/1/default/header.htm +++ b/src/main/webapp/template/1/default/header.htm @@ -1,76 +1,77 @@ - - + + - +
- - - - + + \ No newline at end of file diff --git a/src/main/webapp/template/1/default/images/line.png b/src/main/webapp/template/1/default/images/line.png new file mode 100644 index 00000000..5510bc97 Binary files /dev/null and b/src/main/webapp/template/1/default/images/line.png differ diff --git a/src/main/webapp/template/1/default/index.htm b/src/main/webapp/template/1/default/index.htm index 333a9501..269472ae 100644 --- a/src/main/webapp/template/1/default/index.htm +++ b/src/main/webapp/template/1/default/index.htm @@ -34,6 +34,7 @@
+ aaaaa 车管要闻
@@ -69,7 +70,6 @@
国家档案局2019年度部门决算
--> - - +
@@ -381,11 +381,12 @@ {ms:arclist typeid=1773193652723265537}
- +
-
${field.title}
${field.shorttitle}
+
${field.title}
{/ms:arclist} @@ -404,11 +405,12 @@ {ms:arclist typeid=1773193652723265538}
- +
-
${field.title}
${field.shorttitle}
+
${field.title}
{/ms:arclist} @@ -554,16 +556,16 @@
今日值班
- - - - +
  • +
  • +
  • +
  • - - +
  • +
  • - - +
  • +
  • @@ -580,11 +582,11 @@
    北岭值班员
    -
    带班长
    -
    副带班长
    -
    守机员
    -
    值班人员
    -
    马魁15612345678
    +
    +
    +
    +
    +
    @@ -668,7 +670,7 @@
    - +
    @@ -703,7 +705,7 @@ {ms:data dataid=1773227655471837185}
    -
    日期
    带班长
    @@ -125,16 +125,19 @@ font-size: 22px; } - .dateCard span { + .dateCard li { background: #004ebd; - padding: 0 3px; color: #fff; - margin-right: 1px; + margin-right: 2px; width: 28px; height: 28px; text-align: center; font-weight: bold; } + .dateCard div { + font-size:16px; + margin-right:2px + } .tableHeader { display: flex; diff --git a/src/main/webapp/template/1/default/zhibanbeiqing-list.htm b/src/main/webapp/template/1/default/zhibanbeiqing-list.htm index 7a5a0d96..9039397d 100644 --- a/src/main/webapp/template/1/default/zhibanbeiqing-list.htm +++ b/src/main/webapp/template/1/default/zhibanbeiqing-list.htm @@ -19,6 +19,7 @@ + @@ -30,17 +31,17 @@

    ${field.typetitle}

    - - - - -
    - - -
    - - -
    +
  • +
  • +
  • +
  • +
    +
  • +
  • +
    +
  • +
  • +
    带班长
    @@ -50,11 +51,11 @@
    北岭值班员
    -
    汪新
    -
    蔡小年
    -
    杨大力
    -
    贾金龙
    -
    马魁156 1234 5678
    +
    +
    +
    +
    +
      {ms:arclist size=7 ispaging=true} @@ -100,6 +101,21 @@ } document.getElementById('z_day1').innerText = day[0]; document.getElementById('z_day2').innerText = day[1]; + + + //今日值班人员查询 + let dutyDate = moment().format('yyyy/M/D') + axios.get(`/ms/cms/dutyStandby/list.do +`,{params:{dutyDate}}).then(res=>{ + const { rows } = res.data.data + if(rows.length){ + $('.right_top_con_tr_monitor').text(rows[0].monitor) + $('.right_top_con_tr_deputyMonitor').text(rows[0].deputyMonitor) + $('.right_top_con_tr_operator').text(rows[0].operator) + $('.right_top_con_tr_dutyPerson').text(rows[0].dutyPerson) + $('.right_top_con_tr_blDutyPerson').text(rows[0].blDutyPerson) + } + })