parent
1a9db07ae1
commit
b42220961c
27 changed files with 1803 additions and 710 deletions
@ -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<br/> |
||||
* 历史修订:<br/> |
||||
*/ |
||||
@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<DutyPoliceEntity> 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<DutyPoliceExcel> list = new ArrayList<>(); |
||||
ExcelUtil.export(response, "值日警官导入模板", "值日警官", list, DutyPoliceExcel.class); |
||||
} |
||||
|
||||
/** |
||||
* 导入接口 |
||||
* @param |
||||
*/ |
||||
@PostMapping("/deleteByContentIds") |
||||
@ResponseBody |
||||
public ResultData deleteByContentIds(@RequestParam(value = "contentIds",required = false)List<String> contentIds) throws IOException { |
||||
dutyPoliceBiz.deleteByContentIds(contentIds); |
||||
return ResultData.build().success("删除成功"); |
||||
} |
||||
|
||||
|
||||
|
||||
} |
||||
@ -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<br/> |
||||
* 历史修订:<br/> |
||||
*/ |
||||
@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<ManagerEntity> managerList = managerBiz.list(); |
||||
List<String> 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<CmsSignEntity> 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<CmsSignEntity> wrapper = new LambdaQueryWrapper<>(); |
||||
wrapper.eq(CmsSignEntity::getContentId,cmsSign.getContentId()); |
||||
List<CmsSignEntity> contentList = cmsSignBiz.list(wrapper); |
||||
return ResultData.build().success(contentList); |
||||
} |
||||
|
||||
} |
||||
@ -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<br/> |
||||
* 历史修订:<br/> |
||||
*/ |
||||
@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())); |
||||
} |
||||
|
||||
} |
||||
@ -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<br/> |
||||
* 历史修订:<br/> |
||||
*/ |
||||
public interface IDutyPoliceBiz extends IBaseBiz<DutyPoliceEntity> { |
||||
|
||||
void deleteByEntity(DutyPoliceEntity entity); |
||||
|
||||
void deleteByContentIds(List<String> contentIds); |
||||
|
||||
} |
||||
@ -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<br/> |
||||
* 历史修订:<br/> |
||||
*/ |
||||
@Service("dutyPoliceBizImpl") |
||||
@Transactional(rollbackFor = RuntimeException.class) |
||||
public class DutyPoliceBizImpl extends BaseBizImpl<IDutyPoliceDao, DutyPoliceEntity> 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<String> contentIds) { |
||||
dutyPoliceDao.deleteByContentIds(contentIds); |
||||
} |
||||
} |
||||
@ -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<br/> |
||||
* 历史修订:<br/> |
||||
*/ |
||||
@Component("dutyPoliceDao") |
||||
public interface IDutyPoliceDao extends IBaseDao<DutyPoliceEntity> { |
||||
|
||||
void deleteByEntity(DutyPoliceEntity entity); |
||||
|
||||
|
||||
void deleteByContentIds(@Param("contentIds") List<String> contentIds); |
||||
} |
||||
@ -0,0 +1,104 @@ |
||||
<?xml version="1.0" encoding="UTF-8" ?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
||||
<mapper namespace="net.mingsoft.cms.dao.IDutyPoliceDao"> |
||||
|
||||
<resultMap id="resultMap" type="net.mingsoft.cms.entity.DutyPoliceEntity"> |
||||
<id column="id" property="id" /><!--编号 --> |
||||
<result column="duty_date" property="dutyDate" /><!--值班日期 --> |
||||
<result column="leader_name" property="leaderName" /><!--值日警官领导岗 --> |
||||
<result column="dept_name" property="deptName" /><!--值日警官轮值科室 --> |
||||
<result column="create_by" property="createBy" /><!--创建人 --> |
||||
<result column="create_date" property="createDate" /><!--创建时间 --> |
||||
<result column="update_by" property="updateBy" /><!--修改人 --> |
||||
<result column="update_date" property="updateDate" /><!--修改时间 --> |
||||
<result column="del" property="del" /><!--删除标记 --> |
||||
</resultMap> |
||||
|
||||
|
||||
<!--更新--> |
||||
<update id="updateEntity" parameterType="net.mingsoft.cms.entity.DutyPoliceEntity"> |
||||
update duty_police |
||||
<set> |
||||
<if test="dutyDate != null and dutyDate != ''">duty_date=#{dutyDate},</if> |
||||
<if test="leaderName != null and leaderName != ''">leader_name=#{leaderName},</if> |
||||
<if test="deptName != null and deptName != ''">dept_name=#{deptName},</if> |
||||
<if test="createBy > 0">create_by=#{createBy},</if> |
||||
<if test="createDate != null">create_date=#{createDate},</if> |
||||
<if test="updateBy > 0">update_by=#{updateBy},</if> |
||||
<if test="updateDate != null">update_date=#{updateDate},</if> |
||||
<if test="del != null">del=#{del},</if> |
||||
</set> |
||||
where id = #{id} |
||||
</update> |
||||
|
||||
<!--根据id获取--> |
||||
<select id="getEntity" resultMap="resultMap" parameterType="int"> |
||||
select * from duty_police where id=#{id} |
||||
</select> |
||||
|
||||
<!--根据实体获取--> |
||||
<select id="getByEntity" resultMap="resultMap" parameterType="net.mingsoft.cms.entity.DutyPoliceEntity"> |
||||
select * from duty_police |
||||
<where> |
||||
<if test="dutyDate != null and dutyDate != ''">and duty_date=#{dutyDate}</if> |
||||
<if test="leaderName != null and leaderName != ''">and leader_name=#{leaderName}</if> |
||||
<if test="deptName != null and deptName != ''">and dept_name=#{deptName}</if> |
||||
<if test="createBy > 0"> and create_by=#{createBy} </if> |
||||
<if test="createDate != null"> and create_date=#{createDate} </if> |
||||
<if test="updateBy > 0"> and update_by=#{updateBy} </if> |
||||
<if test="updateDate != null"> and update_date=#{updateDate} </if> |
||||
<if test="del != null"> and del=#{del} </if> |
||||
</where> |
||||
</select> |
||||
|
||||
<!--删除--> |
||||
<delete id="deleteEntity" parameterType="int"> |
||||
delete from duty_police where id=#{id} |
||||
</delete> |
||||
|
||||
<delete id="deleteByEntity" parameterType="int"> |
||||
delete from duty_police |
||||
<where> |
||||
<if test="dutyDate != null and dutyDate != ''">and duty_date=#{dutyDate}</if> |
||||
</where> |
||||
</delete> |
||||
|
||||
<!--批量删除--> |
||||
<delete id="delete" > |
||||
delete from duty_police |
||||
<where> |
||||
id in <foreach collection="ids" item="item" index="index" |
||||
open="(" separator="," close=")">#{item}</foreach> |
||||
</where> |
||||
</delete> |
||||
<!--查询全部--> |
||||
<select id="queryAll" resultMap="resultMap"> |
||||
select * from duty_police order by id desc |
||||
</select> |
||||
<!--条件查询--> |
||||
<select id="query" resultMap="resultMap"> |
||||
select * from duty_police |
||||
<where> |
||||
<if test="dutyDate != null and dutyDate != ''">and duty_date=#{dutyDate}</if> |
||||
<if test="leaderName != null and leaderName != ''">and leader_name=#{leaderName}</if> |
||||
<if test="deptName != null and deptName != ''">and dept_name=#{deptName}</if> |
||||
<if test="contentId != null and contentId != ''">and content_id=#{contentId}</if> |
||||
<if test="filePath != null and filePath != ''">and file_path=#{filePath}</if> |
||||
<if test="createBy > 0"> and create_by=#{createBy} </if> |
||||
<if test="createDate != null"> and create_date=#{createDate} </if> |
||||
<if test="updateBy > 0"> and update_by=#{updateBy} </if> |
||||
<if test="updateDate != null"> and update_date=#{updateDate} </if> |
||||
<if test="del != null"> and del=#{del} </if> |
||||
<include refid="net.mingsoft.base.dao.IBaseDao.sqlWhere"></include> |
||||
</where> |
||||
</select> |
||||
|
||||
<delete id="deleteByContentIds" parameterType="String"> |
||||
delete from duty_police |
||||
<where> |
||||
content_id in <foreach collection="contentIds" item="item" index="index" |
||||
open="(" separator="," close=")">#{item}</foreach> |
||||
</where> |
||||
</delete> |
||||
|
||||
</mapper> |
||||
@ -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<br/> |
||||
* 历史修订:<br/> |
||||
*/ |
||||
@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; |
||||
} |
||||
} |
||||
@ -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<br/> |
||||
* 历史修订:<br/> |
||||
*/ |
||||
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; |
||||
} |
||||
} |
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue