parent
f2277de2ea
commit
423b46c741
25 changed files with 1347 additions and 298 deletions
@ -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<br/> |
||||
* 历史修订:<br/> |
||||
*/ |
||||
@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<DutyStandbyEntity> 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<DutyStandbyExcel> list = new ArrayList<>(); |
||||
ExcelUtil.export(response, "值班备勤导入模板", "值班备勤", list, DutyStandbyExcel.class); |
||||
} |
||||
|
||||
} |
||||
@ -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<br/> |
||||
* 历史修订:<br/> |
||||
*/ |
||||
@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())); |
||||
} |
||||
|
||||
} |
||||
@ -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<br/> |
||||
* 历史修订:<br/> |
||||
*/ |
||||
public interface IDutyStandbyBiz extends IBaseBiz<DutyStandbyEntity> { |
||||
|
||||
void deleteByEntity(DutyStandbyEntity entity); |
||||
|
||||
} |
||||
@ -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<br/> |
||||
* 历史修订:<br/> |
||||
*/ |
||||
@Service("dutyStandbyBizImpl") |
||||
@Transactional(rollbackFor = RuntimeException.class) |
||||
public class DutyStandbyBizImpl extends BaseBizImpl<IDutyStandbyDao, DutyStandbyEntity> implements IDutyStandbyBiz { |
||||
|
||||
|
||||
@Autowired |
||||
private IDutyStandbyDao dutyStandbyDao; |
||||
|
||||
|
||||
|
||||
@Override |
||||
protected IBaseDao getDao() { |
||||
return dutyStandbyDao; |
||||
} |
||||
|
||||
|
||||
@Override |
||||
@Transactional |
||||
public void deleteByEntity(DutyStandbyEntity entity) { |
||||
dutyStandbyDao.deleteByEntity(entity); |
||||
} |
||||
} |
||||
@ -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<br/> |
||||
* 历史修订:<br/> |
||||
*/ |
||||
@Component("dutyStandbyDao") |
||||
public interface IDutyStandbyDao extends IBaseDao<DutyStandbyEntity> { |
||||
|
||||
void deleteByEntity(DutyStandbyEntity entity); |
||||
} |
||||
@ -0,0 +1,106 @@ |
||||
<?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.IDutyStandbyDao"> |
||||
|
||||
<resultMap id="resultMap" type="net.mingsoft.cms.entity.DutyStandbyEntity"> |
||||
<id column="id" property="id" /><!--编号 --> |
||||
<result column="duty_date" property="dutyDate" /><!--值班日期 --> |
||||
<result column="monitor" property="monitor" /><!--带班长 --> |
||||
<result column="deputy_monitor" property="deputyMonitor" /><!--副带班长 --> |
||||
<result column="operator" property="operator" /><!--守机员 --> |
||||
<result column="duty_person" property="dutyPerson" /><!--值班人员 --> |
||||
<result column="bl_duty_person" property="blDutyPerson" /><!--北岭值班人员 --> |
||||
<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.DutyStandbyEntity"> |
||||
update duty_standby |
||||
<set> |
||||
<if test="dutyDate != null and dutyDate != ''">duty_date=#{dutyDate},</if> |
||||
<if test="monitor != null and monitor != ''">monitor=#{monitor},</if> |
||||
<if test="deputyMonitor != null and deputyMonitor != ''">deputy_monitor=#{deputyMonitor},</if> |
||||
<if test="operator != null and operator != ''">operator=#{operator},</if> |
||||
<if test="dutyPerson != null and dutyPerson != ''">duty_person=#{dutyPerson},</if> |
||||
<if test="blDutyPerson != null and blDutyPerson != ''">bl_duty_person=#{blDutyPerson},</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_standby where id=#{id} |
||||
</select> |
||||
|
||||
<!--根据实体获取--> |
||||
<select id="getByEntity" resultMap="resultMap" parameterType="net.mingsoft.cms.entity.DutyStandbyEntity"> |
||||
select * from duty_standby |
||||
<where> |
||||
<if test="dutyDate != null and dutyDate != ''">and duty_date=#{dutyDate}</if> |
||||
<if test="monitor != null and monitor != ''">and monitor=#{monitor}</if> |
||||
<if test="deputyMonitor != null and deputyMonitor != ''">and deputy_monitor=#{deputyMonitor}</if> |
||||
<if test="operator != null and operator != ''">and operator=#{operator}</if> |
||||
<if test="dutyPerson != null and dutyPerson != ''">and duty_person=#{dutyPerson}</if> |
||||
<if test="blDutyPerson != null and blDutyPerson != ''">and bl_duty_person=#{blDutyPerson}</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_standby where id=#{id} |
||||
</delete> |
||||
|
||||
<delete id="deleteByEntity" parameterType="int"> |
||||
delete from duty_standby |
||||
<where> |
||||
<if test="dutyDate != null and dutyDate != ''">and duty_date=#{dutyDate}</if> |
||||
</where> |
||||
</delete> |
||||
|
||||
<!--批量删除--> |
||||
<delete id="delete" > |
||||
delete from duty_standby |
||||
<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_standby order by id desc |
||||
</select> |
||||
<!--条件查询--> |
||||
<select id="query" resultMap="resultMap"> |
||||
select * from duty_standby |
||||
<where> |
||||
<if test="dutyDate != null and dutyDate != ''">and duty_date=#{dutyDate}</if> |
||||
<if test="monitor != null and monitor != ''">and monitor=#{monitor}</if> |
||||
<if test="deputyMonitor != null and deputyMonitor != ''">and deputy_monitor=#{deputyMonitor}</if> |
||||
<if test="operator != null and operator != ''">and operator=#{operator}</if> |
||||
<if test="dutyPerson != null and dutyPerson != ''">and duty_person=#{dutyPerson}</if> |
||||
<if test="blDutyPerson != null and blDutyPerson != ''">and bl_duty_person=#{blDutyPerson}</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> |
||||
|
||||
</mapper> |
||||
@ -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<br/> |
||||
* 历史修订:<br/> |
||||
*/ |
||||
@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; |
||||
} |
||||
} |
||||
@ -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<br/> |
||||
* 历史修订:<br/> |
||||
*/ |
||||
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; |
||||
} |
||||
} |
||||
@ -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<br/> |
||||
* 历史修订:<br/> |
||||
*/ |
||||
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; |
||||
} |
||||
} |
||||
@ -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<br/> |
||||
* 历史修订:<br/> |
||||
*/ |
||||
@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<PasZhEntity> 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<PasZhEntity> pasZhs,HttpServletResponse response, HttpServletRequest request) { |
||||
List<String> 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); |
||||
} |
||||
|
||||
|
||||
} |
||||
|
After Width: | Height: | Size: 12 KiB |
Loading…
Reference in new issue