对比新文件 |
| | |
| | | package com.gkhy.safePlatform.emergency.controller; |
| | | |
| | | import com.gkhy.safePlatform.commons.co.ContextCacheUser; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.utils.PageUtils; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.emergency.model.dto.req.WorkApproveReqDTO; |
| | | import com.gkhy.safePlatform.emergency.model.dto.resp.WorkApproveDetailRespDTO; |
| | | import com.gkhy.safePlatform.emergency.model.dto.resp.WorkApprovePageRespDTO; |
| | | import com.gkhy.safePlatform.emergency.query.WorkApproveQuery; |
| | | import com.gkhy.safePlatform.emergency.service.WorkApproveService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.core.Authentication; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping("/WorkApprove") |
| | | public class WorkApproveController { |
| | | |
| | | @Autowired |
| | | private WorkApproveService workApproveService; |
| | | |
| | | /** |
| | | * 应急预案列表 |
| | | */ |
| | | @RequestMapping(value = "/page/list" ,method = RequestMethod.POST) |
| | | private ResultVO<List<WorkApprovePageRespDTO>> list (@RequestBody PageQuery<WorkApproveQuery> pageQuery){ |
| | | PageUtils.checkCheck(pageQuery.getPageIndex(), pageQuery.getPageSize()); |
| | | return workApproveService.selectWorkApproveList(pageQuery); |
| | | } |
| | | |
| | | /** |
| | | * 应急预案新增 |
| | | */ |
| | | @RequestMapping(value = "/add",method = RequestMethod.POST) |
| | | public ResultVO addWorkApprove(Authentication authentication, @RequestBody WorkApproveReqDTO WorkApproveReqDTO) { |
| | | ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); |
| | | return workApproveService.addWorkApprove(currentUser.getUid(), WorkApproveReqDTO); |
| | | } |
| | | |
| | | /** |
| | | * 应急预案详情 |
| | | */ |
| | | @RequestMapping(value = "//{id}",method = RequestMethod.GET) |
| | | public ResultVO<WorkApproveDetailRespDTO> getWorkApproveById(@PathVariable("id")Long id){ |
| | | return workApproveService.getWorkApproveById(id); |
| | | } |
| | | |
| | | /** |
| | | * 应急预案修改 |
| | | */ |
| | | @RequestMapping(value = "/update",method = RequestMethod.POST) |
| | | public ResultVO updateWorkApprove(Authentication authentication, @RequestBody WorkApproveReqDTO WorkApproveReqDTO) { |
| | | ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); |
| | | return workApproveService.updateWorkApprove(currentUser.getUid(), WorkApproveReqDTO); |
| | | } |
| | | |
| | | /** |
| | | * 应急预案删除/批量删除 |
| | | */ |
| | | @RequestMapping(value = "/batchDelete/{ids}",method = RequestMethod.GET) |
| | | public ResultVO batchDeleteWorkApprove(@PathVariable("ids")String ids){ |
| | | return workApproveService.batchDeleteWorkApprove(ids); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.emergency.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @TableName("work_approve") |
| | | public class WorkApproveInfo { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | private Boolean delFlag; |
| | | |
| | | private Date gmtCreate; |
| | | |
| | | private Date gmtModitify; |
| | | |
| | | private Long createUid; |
| | | |
| | | private Long updateUid; |
| | | |
| | | //流程名称 |
| | | private String workName; |
| | | //流程标题 |
| | | private String title; |
| | | //提交人ID/外键 |
| | | private Long submitPersonId; |
| | | //审批人ID/外键 |
| | | private Long approvePersonId; |
| | | //审批状态 1:未审批 2:审批中 3:审批完成 |
| | | private Integer approveStatus; |
| | | //审批意见 |
| | | private Boolean approveResult; |
| | | //审批意见 |
| | | private String approveMemo; |
| | | //关联业务类型 1:目标检查 2:目标上报 |
| | | private Integer relateType; |
| | | //关联的审批对象表ID |
| | | private Long relateId; |
| | | //关联业务说明 |
| | | private String relateDesc; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Boolean getDelFlag() { |
| | | return delFlag; |
| | | } |
| | | |
| | | public void setDelFlag(Boolean delFlag) { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | public Date getGmtCreate() { |
| | | return gmtCreate; |
| | | } |
| | | |
| | | public void setGmtCreate(Date gmtCreate) { |
| | | this.gmtCreate = gmtCreate; |
| | | } |
| | | |
| | | public Date getGmtModitify() { |
| | | return gmtModitify; |
| | | } |
| | | |
| | | public void setGmtModitify(Date gmtModitify) { |
| | | this.gmtModitify = gmtModitify; |
| | | } |
| | | |
| | | public Long getCreateUid() { |
| | | return createUid; |
| | | } |
| | | |
| | | public void setCreateUid(Long createUid) { |
| | | this.createUid = createUid; |
| | | } |
| | | |
| | | public Long getUpdateUid() { |
| | | return updateUid; |
| | | } |
| | | |
| | | public void setUpdateUid(Long updateUid) { |
| | | this.updateUid = updateUid; |
| | | } |
| | | |
| | | public String getWorkName() { |
| | | return workName; |
| | | } |
| | | |
| | | public void setWorkName(String workName) { |
| | | this.workName = workName; |
| | | } |
| | | |
| | | public String getTitle() { |
| | | return title; |
| | | } |
| | | |
| | | public void setTitle(String title) { |
| | | this.title = title; |
| | | } |
| | | |
| | | public Long getSubmitPersonId() { |
| | | return submitPersonId; |
| | | } |
| | | |
| | | public void setSubmitPersonId(Long submitPersonId) { |
| | | this.submitPersonId = submitPersonId; |
| | | } |
| | | |
| | | public Long getApprovePersonId() { |
| | | return approvePersonId; |
| | | } |
| | | |
| | | public void setApprovePersonId(Long approvePersonId) { |
| | | this.approvePersonId = approvePersonId; |
| | | } |
| | | |
| | | public Integer getApproveStatus() { |
| | | return approveStatus; |
| | | } |
| | | |
| | | public void setApproveStatus(Integer approveStatus) { |
| | | this.approveStatus = approveStatus; |
| | | } |
| | | |
| | | public Boolean getApproveResult() { |
| | | return approveResult; |
| | | } |
| | | |
| | | public void setApproveResult(Boolean approveResult) { |
| | | this.approveResult = approveResult; |
| | | } |
| | | |
| | | public String getApproveMemo() { |
| | | return approveMemo; |
| | | } |
| | | |
| | | public void setApproveMemo(String approveMemo) { |
| | | this.approveMemo = approveMemo; |
| | | } |
| | | |
| | | public Integer getRelateType() { |
| | | return relateType; |
| | | } |
| | | |
| | | public void setRelateType(Integer relateType) { |
| | | this.relateType = relateType; |
| | | } |
| | | |
| | | public Long getRelateId() { |
| | | return relateId; |
| | | } |
| | | |
| | | public void setRelateId(Long relateId) { |
| | | this.relateId = relateId; |
| | | } |
| | | |
| | | public String getRelateDesc() { |
| | | return relateDesc; |
| | | } |
| | | |
| | | public void setRelateDesc(String relateDesc) { |
| | | this.relateDesc = relateDesc; |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.emergency.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @TableName("work_approve") |
| | | public class WorkApproveInfoDetailDO { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | private Date gmtCreate; |
| | | |
| | | //流程名称 |
| | | private String workName; |
| | | //流程标题 |
| | | private String title; |
| | | //提交人ID/外键 |
| | | private Long submitPersonId; |
| | | //审批人ID/外键 |
| | | private Long approvePersonId; |
| | | //审批状态 1:未审批 2:审批中 3:审批完成 |
| | | private Integer approveStatus; |
| | | //审批意见 |
| | | private Boolean approveResult; |
| | | //审批意见 |
| | | private String approveMemo; |
| | | //关联业务类型 1:目标检查 2:目标上报 |
| | | private Integer relateType; |
| | | //关联的审批对象表ID |
| | | private Long relateId; |
| | | //关联业务说明 |
| | | private String relateDesc; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Date getGmtCreate() { |
| | | return gmtCreate; |
| | | } |
| | | |
| | | public void setGmtCreate(Date gmtCreate) { |
| | | this.gmtCreate = gmtCreate; |
| | | } |
| | | |
| | | public String getWorkName() { |
| | | return workName; |
| | | } |
| | | |
| | | public void setWorkName(String workName) { |
| | | this.workName = workName; |
| | | } |
| | | |
| | | public String getTitle() { |
| | | return title; |
| | | } |
| | | |
| | | public void setTitle(String title) { |
| | | this.title = title; |
| | | } |
| | | |
| | | public Long getSubmitPersonId() { |
| | | return submitPersonId; |
| | | } |
| | | |
| | | public void setSubmitPersonId(Long submitPersonId) { |
| | | this.submitPersonId = submitPersonId; |
| | | } |
| | | |
| | | public Long getApprovePersonId() { |
| | | return approvePersonId; |
| | | } |
| | | |
| | | public void setApprovePersonId(Long approvePersonId) { |
| | | this.approvePersonId = approvePersonId; |
| | | } |
| | | |
| | | public Integer getApproveStatus() { |
| | | return approveStatus; |
| | | } |
| | | |
| | | public void setApproveStatus(Integer approveStatus) { |
| | | this.approveStatus = approveStatus; |
| | | } |
| | | |
| | | public Boolean getApproveResult() { |
| | | return approveResult; |
| | | } |
| | | |
| | | public void setApproveResult(Boolean approveResult) { |
| | | this.approveResult = approveResult; |
| | | } |
| | | |
| | | public String getApproveMemo() { |
| | | return approveMemo; |
| | | } |
| | | |
| | | public void setApproveMemo(String approveMemo) { |
| | | this.approveMemo = approveMemo; |
| | | } |
| | | |
| | | public Integer getRelateType() { |
| | | return relateType; |
| | | } |
| | | |
| | | public void setRelateType(Integer relateType) { |
| | | this.relateType = relateType; |
| | | } |
| | | |
| | | public Long getRelateId() { |
| | | return relateId; |
| | | } |
| | | |
| | | public void setRelateId(Long relateId) { |
| | | this.relateId = relateId; |
| | | } |
| | | |
| | | public String getRelateDesc() { |
| | | return relateDesc; |
| | | } |
| | | |
| | | public void setRelateDesc(String relateDesc) { |
| | | this.relateDesc = relateDesc; |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.emergency.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @TableName("work_approve") |
| | | public class WorkApproveInfoPageDO { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | private Date gmtCreate; |
| | | |
| | | //流程名称 |
| | | private String workName; |
| | | //流程标题 |
| | | private String title; |
| | | //提交人ID/外键 |
| | | private Long submitPersonId; |
| | | //审批人ID/外键 |
| | | private Long approvePersonId; |
| | | //审批状态 1:未审批 2:审批中 3:审批完成 |
| | | private Integer approveStatus; |
| | | //审批意见 |
| | | private Boolean approveResult; |
| | | //审批意见 |
| | | private String approveMemo; |
| | | //关联业务类型 1:目标检查 2:目标上报 |
| | | private Integer relateType; |
| | | //关联的审批对象表ID |
| | | private Long relateId; |
| | | //关联业务说明 |
| | | private String relateDesc; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Date getGmtCreate() { |
| | | return gmtCreate; |
| | | } |
| | | |
| | | public void setGmtCreate(Date gmtCreate) { |
| | | this.gmtCreate = gmtCreate; |
| | | } |
| | | |
| | | public String getWorkName() { |
| | | return workName; |
| | | } |
| | | |
| | | public void setWorkName(String workName) { |
| | | this.workName = workName; |
| | | } |
| | | |
| | | public String getTitle() { |
| | | return title; |
| | | } |
| | | |
| | | public void setTitle(String title) { |
| | | this.title = title; |
| | | } |
| | | |
| | | public Long getSubmitPersonId() { |
| | | return submitPersonId; |
| | | } |
| | | |
| | | public void setSubmitPersonId(Long submitPersonId) { |
| | | this.submitPersonId = submitPersonId; |
| | | } |
| | | |
| | | public Long getApprovePersonId() { |
| | | return approvePersonId; |
| | | } |
| | | |
| | | public void setApprovePersonId(Long approvePersonId) { |
| | | this.approvePersonId = approvePersonId; |
| | | } |
| | | |
| | | public Integer getApproveStatus() { |
| | | return approveStatus; |
| | | } |
| | | |
| | | public void setApproveStatus(Integer approveStatus) { |
| | | this.approveStatus = approveStatus; |
| | | } |
| | | |
| | | public Boolean getApproveResult() { |
| | | return approveResult; |
| | | } |
| | | |
| | | public void setApproveResult(Boolean approveResult) { |
| | | this.approveResult = approveResult; |
| | | } |
| | | |
| | | public String getApproveMemo() { |
| | | return approveMemo; |
| | | } |
| | | |
| | | public void setApproveMemo(String approveMemo) { |
| | | this.approveMemo = approveMemo; |
| | | } |
| | | |
| | | public Integer getRelateType() { |
| | | return relateType; |
| | | } |
| | | |
| | | public void setRelateType(Integer relateType) { |
| | | this.relateType = relateType; |
| | | } |
| | | |
| | | public Long getRelateId() { |
| | | return relateId; |
| | | } |
| | | |
| | | public void setRelateId(Long relateId) { |
| | | this.relateId = relateId; |
| | | } |
| | | |
| | | public String getRelateDesc() { |
| | | return relateDesc; |
| | | } |
| | | |
| | | public void setRelateDesc(String relateDesc) { |
| | | this.relateDesc = relateDesc; |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.emergency.enums; |
| | | |
| | | public enum ApproveStatus { |
| | | |
| | | NOT_APPROVE(1), |
| | | UNDER_APPROVE(2), |
| | | COMPLETED_APPROVE(3); |
| | | |
| | | private Integer status; |
| | | |
| | | |
| | | public Integer getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(Integer status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | |
| | | ApproveStatus(Integer status) { |
| | | this.status = status; |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.emergency.model.dto.req; |
| | | |
| | | public class WorkApproveReqDTO { |
| | | |
| | | private Long id; |
| | | |
| | | //流程名称 |
| | | private String workName; |
| | | //流程标题 |
| | | private String title; |
| | | //提交人ID/外键 |
| | | private Long submitPersonId; |
| | | //审批人ID/外键 |
| | | private Long approvePersonId; |
| | | //审批状态 1:未审批 2:审批中 3:审批完成 |
| | | private Integer approveStatus; |
| | | //审批意见 |
| | | private Boolean approveResult; |
| | | //审批意见 |
| | | private String approveMemo; |
| | | //关联业务类型 1:目标检查 2:目标上报 |
| | | private Integer relateType; |
| | | //关联的审批对象表ID |
| | | private Long relateId; |
| | | //关联业务说明 |
| | | private String relateDesc; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | |
| | | public String getWorkName() { |
| | | return workName; |
| | | } |
| | | |
| | | public void setWorkName(String workName) { |
| | | this.workName = workName; |
| | | } |
| | | |
| | | public String getTitle() { |
| | | return title; |
| | | } |
| | | |
| | | public void setTitle(String title) { |
| | | this.title = title; |
| | | } |
| | | |
| | | public Long getSubmitPersonId() { |
| | | return submitPersonId; |
| | | } |
| | | |
| | | public void setSubmitPersonId(Long submitPersonId) { |
| | | this.submitPersonId = submitPersonId; |
| | | } |
| | | |
| | | public Long getApprovePersonId() { |
| | | return approvePersonId; |
| | | } |
| | | |
| | | public void setApprovePersonId(Long approvePersonId) { |
| | | this.approvePersonId = approvePersonId; |
| | | } |
| | | |
| | | public Integer getApproveStatus() { |
| | | return approveStatus; |
| | | } |
| | | |
| | | public void setApproveStatus(Integer approveStatus) { |
| | | this.approveStatus = approveStatus; |
| | | } |
| | | |
| | | public Boolean getApproveResult() { |
| | | return approveResult; |
| | | } |
| | | |
| | | public void setApproveResult(Boolean approveResult) { |
| | | this.approveResult = approveResult; |
| | | } |
| | | |
| | | public String getApproveMemo() { |
| | | return approveMemo; |
| | | } |
| | | |
| | | public void setApproveMemo(String approveMemo) { |
| | | this.approveMemo = approveMemo; |
| | | } |
| | | |
| | | public Integer getRelateType() { |
| | | return relateType; |
| | | } |
| | | |
| | | public void setRelateType(Integer relateType) { |
| | | this.relateType = relateType; |
| | | } |
| | | |
| | | public Long getRelateId() { |
| | | return relateId; |
| | | } |
| | | |
| | | public void setRelateId(Long relateId) { |
| | | this.relateId = relateId; |
| | | } |
| | | |
| | | public String getRelateDesc() { |
| | | return relateDesc; |
| | | } |
| | | |
| | | public void setRelateDesc(String relateDesc) { |
| | | this.relateDesc = relateDesc; |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.emergency.model.dto.resp; |
| | | |
| | | public class WorkApproveDetailRespDTO { |
| | | |
| | | private Long id; |
| | | |
| | | //流程名称 |
| | | private String workName; |
| | | //流程标题 |
| | | private String title; |
| | | //提交人ID/外键 |
| | | private Long submitPersonId; |
| | | //审批人ID/外键 |
| | | private Long approvePersonId; |
| | | //审批状态 1:未审批 2:审批中 3:审批完成 |
| | | private Integer approveStatus; |
| | | //审批意见 |
| | | private Boolean approveResult; |
| | | //审批意见 |
| | | private String approveMemo; |
| | | //关联业务类型 1:目标检查 2:目标上报 |
| | | private Integer relateType; |
| | | //关联的审批对象表ID |
| | | private Long relateId; |
| | | //关联业务说明 |
| | | private String relateDesc; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | |
| | | public String getWorkName() { |
| | | return workName; |
| | | } |
| | | |
| | | public void setWorkName(String workName) { |
| | | this.workName = workName; |
| | | } |
| | | |
| | | public String getTitle() { |
| | | return title; |
| | | } |
| | | |
| | | public void setTitle(String title) { |
| | | this.title = title; |
| | | } |
| | | |
| | | public Long getSubmitPersonId() { |
| | | return submitPersonId; |
| | | } |
| | | |
| | | public void setSubmitPersonId(Long submitPersonId) { |
| | | this.submitPersonId = submitPersonId; |
| | | } |
| | | |
| | | public Long getApprovePersonId() { |
| | | return approvePersonId; |
| | | } |
| | | |
| | | public void setApprovePersonId(Long approvePersonId) { |
| | | this.approvePersonId = approvePersonId; |
| | | } |
| | | |
| | | public Integer getApproveStatus() { |
| | | return approveStatus; |
| | | } |
| | | |
| | | public void setApproveStatus(Integer approveStatus) { |
| | | this.approveStatus = approveStatus; |
| | | } |
| | | |
| | | public Boolean getApproveResult() { |
| | | return approveResult; |
| | | } |
| | | |
| | | public void setApproveResult(Boolean approveResult) { |
| | | this.approveResult = approveResult; |
| | | } |
| | | |
| | | public String getApproveMemo() { |
| | | return approveMemo; |
| | | } |
| | | |
| | | public void setApproveMemo(String approveMemo) { |
| | | this.approveMemo = approveMemo; |
| | | } |
| | | |
| | | public Integer getRelateType() { |
| | | return relateType; |
| | | } |
| | | |
| | | public void setRelateType(Integer relateType) { |
| | | this.relateType = relateType; |
| | | } |
| | | |
| | | public Long getRelateId() { |
| | | return relateId; |
| | | } |
| | | |
| | | public void setRelateId(Long relateId) { |
| | | this.relateId = relateId; |
| | | } |
| | | |
| | | public String getRelateDesc() { |
| | | return relateDesc; |
| | | } |
| | | |
| | | public void setRelateDesc(String relateDesc) { |
| | | this.relateDesc = relateDesc; |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.emergency.model.dto.resp; |
| | | |
| | | public class WorkApprovePageRespDTO { |
| | | |
| | | private Long id; |
| | | |
| | | //流程名称 |
| | | private String workName; |
| | | //流程标题 |
| | | private String title; |
| | | //提交人ID/外键 |
| | | private Long submitPersonId; |
| | | //审批人ID/外键 |
| | | private Long approvePersonId; |
| | | //审批状态 1:未审批 2:审批中 3:审批完成 |
| | | private Integer approveStatus; |
| | | //审批意见 |
| | | private Boolean approveResult; |
| | | //审批意见 |
| | | private String approveMemo; |
| | | //关联业务类型 1:目标检查 2:目标上报 |
| | | private Integer relateType; |
| | | //关联的审批对象表ID |
| | | private Long relateId; |
| | | //关联业务说明 |
| | | private String relateDesc; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | |
| | | public String getWorkName() { |
| | | return workName; |
| | | } |
| | | |
| | | public void setWorkName(String workName) { |
| | | this.workName = workName; |
| | | } |
| | | |
| | | public String getTitle() { |
| | | return title; |
| | | } |
| | | |
| | | public void setTitle(String title) { |
| | | this.title = title; |
| | | } |
| | | |
| | | public Long getSubmitPersonId() { |
| | | return submitPersonId; |
| | | } |
| | | |
| | | public void setSubmitPersonId(Long submitPersonId) { |
| | | this.submitPersonId = submitPersonId; |
| | | } |
| | | |
| | | public Long getApprovePersonId() { |
| | | return approvePersonId; |
| | | } |
| | | |
| | | public void setApprovePersonId(Long approvePersonId) { |
| | | this.approvePersonId = approvePersonId; |
| | | } |
| | | |
| | | public Integer getApproveStatus() { |
| | | return approveStatus; |
| | | } |
| | | |
| | | public void setApproveStatus(Integer approveStatus) { |
| | | this.approveStatus = approveStatus; |
| | | } |
| | | |
| | | public Boolean getApproveResult() { |
| | | return approveResult; |
| | | } |
| | | |
| | | public void setApproveResult(Boolean approveResult) { |
| | | this.approveResult = approveResult; |
| | | } |
| | | |
| | | public String getApproveMemo() { |
| | | return approveMemo; |
| | | } |
| | | |
| | | public void setApproveMemo(String approveMemo) { |
| | | this.approveMemo = approveMemo; |
| | | } |
| | | |
| | | public Integer getRelateType() { |
| | | return relateType; |
| | | } |
| | | |
| | | public void setRelateType(Integer relateType) { |
| | | this.relateType = relateType; |
| | | } |
| | | |
| | | public Long getRelateId() { |
| | | return relateId; |
| | | } |
| | | |
| | | public void setRelateId(Long relateId) { |
| | | this.relateId = relateId; |
| | | } |
| | | |
| | | public String getRelateDesc() { |
| | | return relateDesc; |
| | | } |
| | | |
| | | public void setRelateDesc(String relateDesc) { |
| | | this.relateDesc = relateDesc; |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.emergency.query; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | public class WorkApproveQuery { |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date gmtCreate; |
| | | |
| | | public Date getGmtCreate() { |
| | | return gmtCreate; |
| | | } |
| | | |
| | | public void setGmtCreate(Date gmtCreate) { |
| | | this.gmtCreate = gmtCreate; |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.emergency.query.db; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | public class WorkApproveDBQuery { |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date gmtCreate; |
| | | |
| | | public Date getGmtCreate() { |
| | | return gmtCreate; |
| | | } |
| | | |
| | | public void setGmtCreate(Date gmtCreate) { |
| | | this.gmtCreate = gmtCreate; |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.emergency.repository; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.gkhy.safePlatform.emergency.entity.WorkApproveInfo; |
| | | import com.gkhy.safePlatform.emergency.entity.WorkApproveInfoDetailDO; |
| | | import com.gkhy.safePlatform.emergency.entity.WorkApproveInfoPageDO; |
| | | import com.gkhy.safePlatform.emergency.query.db.WorkApproveDBQuery; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Repository |
| | | public interface WorkApproveInfoRepository extends BaseMapper<WorkApproveInfo> { |
| | | |
| | | List<WorkApproveInfoPageDO> selectWorkApproveList(Page<WorkApproveInfoPageDO> page, @Param("query") WorkApproveDBQuery workApproveDBQuery); |
| | | |
| | | void addWorkApprove(WorkApproveInfo workApproveInfo); |
| | | |
| | | WorkApproveInfoDetailDO selectWorkApproveById(@Param("id") Long id); |
| | | |
| | | void updateWorkApprove(WorkApproveInfo WorkApproveInfo); |
| | | |
| | | void deleteWorkApproveById(@Param("id") Long id); |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.emergency.service; |
| | | |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.commons.vo.SearchResultVO; |
| | | import com.gkhy.safePlatform.emergency.model.dto.req.WorkApproveReqDTO; |
| | | import com.gkhy.safePlatform.emergency.model.dto.resp.WorkApproveDetailRespDTO; |
| | | import com.gkhy.safePlatform.emergency.model.dto.resp.WorkApprovePageRespDTO; |
| | | import com.gkhy.safePlatform.emergency.query.WorkApproveQuery; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface WorkApproveService { |
| | | |
| | | SearchResultVO<List<WorkApprovePageRespDTO>> selectWorkApproveList(PageQuery<WorkApproveQuery> query); |
| | | |
| | | ResultVO addWorkApprove(Long valueOf, WorkApproveReqDTO WorkApproveReqDTO); |
| | | |
| | | ResultVO<WorkApproveDetailRespDTO> getWorkApproveById(Long id); |
| | | |
| | | ResultVO updateWorkApprove(Long uid, WorkApproveReqDTO WorkApproveReqDTO); |
| | | |
| | | ResultVO batchDeleteWorkApprove(String ids); |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.emergency.service.baseService; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.gkhy.safePlatform.emergency.entity.WorkApproveInfo; |
| | | import com.gkhy.safePlatform.emergency.entity.WorkApproveInfoDetailDO; |
| | | import com.gkhy.safePlatform.emergency.entity.WorkApproveInfoPageDO; |
| | | import com.gkhy.safePlatform.emergency.query.db.WorkApproveDBQuery; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | public interface WorkApproveInfoService extends IService<WorkApproveInfo> { |
| | | |
| | | List<WorkApproveInfoPageDO> selectWorkApproveList(Page<WorkApproveInfoPageDO> page, WorkApproveDBQuery workApproveDBQuery); |
| | | |
| | | void addWorkApprove(WorkApproveInfo WorkApproveInfo); |
| | | |
| | | WorkApproveInfoDetailDO selectWorkApproveById(Long id); |
| | | |
| | | void updateWorkApprove(WorkApproveInfo WorkApproveInfo); |
| | | |
| | | void deleteWorkApproveById(Long teamId); |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.emergency.service.baseService.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.safePlatform.emergency.entity.WorkApproveInfo; |
| | | import com.gkhy.safePlatform.emergency.entity.WorkApproveInfoDetailDO; |
| | | import com.gkhy.safePlatform.emergency.entity.WorkApproveInfoPageDO; |
| | | import com.gkhy.safePlatform.emergency.query.db.WorkApproveDBQuery; |
| | | import com.gkhy.safePlatform.emergency.repository.WorkApproveInfoRepository; |
| | | import com.gkhy.safePlatform.emergency.service.baseService.WorkApproveInfoService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Service("workApproveInfoService") |
| | | public class WorkApproveServiceImpl extends ServiceImpl<WorkApproveInfoRepository, WorkApproveInfo> implements WorkApproveInfoService { |
| | | |
| | | @Autowired |
| | | private WorkApproveInfoRepository WorkApproveInfoRepository; |
| | | |
| | | @Override |
| | | public List<WorkApproveInfoPageDO> selectWorkApproveList(Page<WorkApproveInfoPageDO> page, WorkApproveDBQuery WorkApproveDBQuery) { |
| | | return WorkApproveInfoRepository.selectWorkApproveList(page,WorkApproveDBQuery); |
| | | } |
| | | |
| | | @Override |
| | | public void addWorkApprove(WorkApproveInfo WorkApproveInfo) { |
| | | WorkApproveInfoRepository.addWorkApprove(WorkApproveInfo); |
| | | } |
| | | |
| | | @Override |
| | | public WorkApproveInfoDetailDO selectWorkApproveById(Long id) { |
| | | return WorkApproveInfoRepository.selectWorkApproveById(id); |
| | | } |
| | | |
| | | @Override |
| | | public void updateWorkApprove(WorkApproveInfo WorkApproveInfo) { |
| | | WorkApproveInfoRepository.updateWorkApprove(WorkApproveInfo); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteWorkApproveById(Long teamId) { |
| | | WorkApproveInfoRepository.deleteWorkApproveById(teamId); |
| | | } |
| | | |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.emergency.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | import com.gkhy.safePlatform.commons.utils.StringUtils; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.commons.vo.SearchResultVO; |
| | | import com.gkhy.safePlatform.emergency.entity.*; |
| | | import com.gkhy.safePlatform.emergency.enums.ApproveStatus; |
| | | import com.gkhy.safePlatform.emergency.enums.EmergencyResultCodes; |
| | | import com.gkhy.safePlatform.emergency.excepiton.EmergencyException; |
| | | import com.gkhy.safePlatform.emergency.model.dto.req.WorkApproveReqDTO; |
| | | import com.gkhy.safePlatform.emergency.model.dto.resp.WorkApproveDetailRespDTO; |
| | | import com.gkhy.safePlatform.emergency.model.dto.resp.WorkApprovePageRespDTO; |
| | | import com.gkhy.safePlatform.emergency.query.WorkApproveQuery; |
| | | import com.gkhy.safePlatform.emergency.query.db.WorkApproveDBQuery; |
| | | import com.gkhy.safePlatform.emergency.service.WorkApproveService; |
| | | import com.gkhy.safePlatform.emergency.service.baseService.WorkApproveInfoService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Service("workApproveService") |
| | | public class WorkApproveServiceImpl implements WorkApproveService { |
| | | |
| | | @Autowired |
| | | private WorkApproveInfoService workApproveInfoService; |
| | | |
| | | @Override |
| | | public SearchResultVO<List<WorkApprovePageRespDTO>> selectWorkApproveList(PageQuery<WorkApproveQuery> query) { |
| | | Long pageIndex = query.getPageIndex(); |
| | | Long pageSize = query.getPageSize(); |
| | | Page<WorkApproveInfoPageDO> page = new Page<>(pageIndex, pageSize); |
| | | |
| | | WorkApproveDBQuery WorkApproveDBQuery = new WorkApproveDBQuery(); |
| | | if (query.getSearchParams() != null) { |
| | | BeanUtils.copyProperties(query.getSearchParams(), WorkApproveDBQuery); |
| | | } |
| | | |
| | | List<WorkApproveInfoPageDO> WorkApproveInfoPageDOList = workApproveInfoService.selectWorkApproveList(page, WorkApproveDBQuery); |
| | | List<WorkApprovePageRespDTO> respList = BeanCopyUtils.copyBeanList(WorkApproveInfoPageDOList, WorkApprovePageRespDTO.class); |
| | | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | | ); |
| | | } |
| | | |
| | | @Override |
| | | public ResultVO addWorkApprove(Long uid, WorkApproveReqDTO WorkApproveReqDTO) { |
| | | |
| | | Date nowDate = new Date(); |
| | | //1.新增应急队伍 |
| | | WorkApproveInfo WorkApproveInfo = new WorkApproveInfo(); |
| | | BeanUtils.copyProperties(WorkApproveReqDTO, WorkApproveInfo); |
| | | WorkApproveInfo.setDelFlag(false); |
| | | WorkApproveInfo.setCreateUid(uid); |
| | | WorkApproveInfo.setGmtCreate(nowDate); |
| | | WorkApproveInfo.setApproveStatus(ApproveStatus.NOT_APPROVE.getStatus()); |
| | | workApproveInfoService.addWorkApprove(WorkApproveInfo); |
| | | return new ResultVO(ResultCodes.OK); |
| | | } |
| | | |
| | | @Override |
| | | public ResultVO<WorkApproveDetailRespDTO> getWorkApproveById(Long id) { |
| | | |
| | | WorkApproveInfoDetailDO WorkApproveInfoDetailDO = workApproveInfoService.selectWorkApproveById(id); |
| | | WorkApproveDetailRespDTO workApproveDetailRespDTO = new WorkApproveDetailRespDTO(); |
| | | BeanUtils.copyProperties(WorkApproveInfoDetailDO, workApproveDetailRespDTO); |
| | | |
| | | return new ResultVO<>(ResultCodes.OK, workApproveDetailRespDTO); |
| | | } |
| | | |
| | | @Override |
| | | public ResultVO updateWorkApprove(Long uid, WorkApproveReqDTO WorkApproveReqDTO) { |
| | | Date nowDate = new Date(); |
| | | //查询是否存在 |
| | | WorkApproveInfoDetailDO WorkApproveInfoDetailDO = workApproveInfoService.selectWorkApproveById(WorkApproveReqDTO.getId()); |
| | | if (WorkApproveInfoDetailDO == null) { |
| | | throw new EmergencyException(EmergencyResultCodes.TEAM_NOT_EXIST); |
| | | } else { |
| | | WorkApproveInfo WorkApproveInfo = new WorkApproveInfo(); |
| | | BeanUtils.copyProperties(WorkApproveReqDTO, WorkApproveInfo); |
| | | WorkApproveInfo.setUpdateUid(uid); |
| | | WorkApproveInfo.setGmtModitify(nowDate); |
| | | workApproveInfoService.updateWorkApprove(WorkApproveInfo); |
| | | return new ResultVO(ResultCodes.OK); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public ResultVO batchDeleteWorkApprove(String ids) { |
| | | if (!StringUtils.isBlank(ids)) { |
| | | String[] idArr = ids.split(","); |
| | | for (String id : idArr) { |
| | | deleteWorkApprove(Long.valueOf(id)); |
| | | } |
| | | } |
| | | return new ResultVO(ResultCodes.OK); |
| | | } |
| | | |
| | | |
| | | private void deleteWorkApprove(Long id) { |
| | | workApproveInfoService.deleteWorkApproveById(id); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | this.updateTime = updateTime; |
| | | } |
| | | |
| | | |
| | | // @TableLogic |
| | | // @JsonIgnore |
| | | // private Integer isDel; |
| | |
| | | |
| | | package com.gkhy.safePlatform.equipment.excepiton; |
| | | |
| | | import com.gkhy.safePlatform.equipment.enums.EquipmentResultCodes; |
| | | |
| | | public class EquipmentException extends RuntimeException { |
| | | private String code; |
| | | private String message; |
| | | |
| | | public EquipmentException(EquipmentResultCodes error) { |
| | | super(error.getDesc()); |
| | | this.code = error.getCode(); |
| | | this.message = error.getDesc(); |
| | | } |
| | | |
| | | public EquipmentException(String code, String message) { |
| | | super(message); |
| | | this.code = code; |
| | | this.message = message; |
| | | } |
| | | |
| | | public String getCode() { |
| | | return this.code; |
| | | } |
| | | |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public String getMessage() { |
| | | return this.message; |
| | | } |
| | | |
| | | public void setMessage(String message) { |
| | | this.message = message; |
| | | } |
| | | } |
| | | |
| | |
| | | private String name; |
| | | //单位部门外键 |
| | | private Long departmentId; |
| | | //所属部门名称 |
| | | private String departmentName; |
| | | //具体位置 |
| | | private String position; |
| | | //负责人姓名 |
| | |
| | | |
| | | private Date updateTime; |
| | | |
| | | public String getDepartmentName() { |
| | | return departmentName; |
| | | } |
| | | |
| | | public void setDepartmentName(String departmentName) { |
| | | this.departmentName = departmentName; |
| | | } |
| | | |
| | | //设备保养 |
| | | private List<EquipmentTakecareDetail> takecareDetailList = new ArrayList<>(); |
| | |
| | | QueryHelpPlus.getPredicate(KeypointEquipmentInfo.class, pageQuery.getSearchParams())); |
| | | List<KeypointEquipmentInfoDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), KeypointEquipmentInfoDto.class); |
| | | |
| | | // TODO:获取所属部门名称 |
| | | |
| | | //获取额外信息 |
| | | respList.forEach(f->{ |
| | | //设备保养 |
| | |
| | | package com.gkhy.safePlatform.targetDuty.controller; |
| | | import java.util.Date; |
| | | |
| | | import java.io.IOException; |
| | | import java.net.URLEncoder; |
| | | import java.util.*; |
| | | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetDutySummary; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetMng; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.TargetDutySummaryExcel; |
| | | import com.gkhy.safePlatform.targetDuty.service.TargetDutySummaryService; |
| | | import com.gkhy.safePlatform.targetDuty.utils.DateUtils; |
| | | import com.gkhy.safePlatform.targetDuty.utils.poihelper.ExcelUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.utils.PageUtils; |
| | |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetDutySummaryQueryCriteria; |
| | | |
| | | import java.sql.Timestamp; |
| | | import java.util.Arrays; |
| | | import java.util.stream.Collectors; |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * (TargetDutySummary)表控制层 |
| | |
| | | */ |
| | | @Resource |
| | | private TargetDutySummaryService targetDutySummaryService; |
| | | |
| | | @Autowired |
| | | public HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | public HttpServletResponse response; |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | | /** |
| | | * 导出一览数据 |
| | | * |
| | | */ |
| | | @GetMapping(value = "/exportData") |
| | | public void exportData(TargetDutySummaryQueryCriteria queryCriteria) throws IOException { |
| | | Map<String,String> map = new LinkedHashMap<>(); |
| | | map.put("1","责任部门"); |
| | | map.put("2","安全目标指标"); |
| | | map.put("3","考核指标"); |
| | | map.put("4","1月"); |
| | | map.put("5","2月"); |
| | | map.put("6","3月"); |
| | | map.put("7","4月"); |
| | | map.put("8","5月"); |
| | | map.put("9","6月"); |
| | | map.put("10","7月"); |
| | | map.put("11","8月"); |
| | | map.put("12","9月"); |
| | | map.put("13","10月"); |
| | | map.put("14","11月"); |
| | | map.put("15","12月"); |
| | | map.put("16","考核结果"); |
| | | |
| | | String key = DateUtils.date2String(new Date(), DateUtils.PATTERN_ALLTIME_NOSIGN) ; |
| | | String fileName = URLEncoder.encode("目标汇总"+key+".xls", "UTF-8"); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
| | | |
| | | |
| | | List<TargetDutySummaryExcel> respList = BeanCopyUtils.copyBeanList(targetDutySummaryService.queryAll(queryCriteria), TargetDutySummaryExcel.class); |
| | | |
| | | ExcelUtil.exportExcel(map,respList , response.getOutputStream(),DateUtils.PATTERN_STANDARD); |
| | | response.getOutputStream().close(); |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | TargetDutySummary mng = new TargetDutySummary(); |
| | | mng.setYear("2020"); |
| | |
| | | mng.setExamineResult(1); |
| | | |
| | | mng.setYiYue("1"); |
| | | mng.setFebruary("2"); |
| | | mng.setErYue("3"); |
| | | mng.setSanYue("4"); |
| | | mng.setSiYue("5"); |
| | |
| | | dto.setExamineList(this.targetExamineService.queryAll(criteria)); |
| | | dto.setId(targetMng.getId()); |
| | | dto.setIndexNum(targetMng.getIndexNum()); |
| | | dto.setName(targetMng.getqName()); |
| | | dto.setqName(targetMng.getqName()); |
| | | dto.setValue(targetMng.getValue()); |
| | | dto.setYear(targetMng.getYear()); |
| | | return new ResultVO<>(ResultCodes.OK,dto); |
| | |
| | | package com.gkhy.safePlatform.targetDuty.controller; |
| | | import java.util.Date; |
| | | import java.sql.Timestamp; |
| | | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetDivideDetail; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetMng; |
| | | import com.gkhy.safePlatform.targetDuty.service.TargetDivideDetailService; |
| | | import com.gkhy.safePlatform.targetDuty.service.TargetMngService; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | import com.gkhy.safePlatform.commons.utils.PageUtils; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetDivideDetail; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetMng; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetMngImportExcel; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetMngQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.TargetMngExcel; |
| | | import com.gkhy.safePlatform.targetDuty.service.TargetDivideDetailService; |
| | | import com.gkhy.safePlatform.targetDuty.service.TargetMngService; |
| | | import com.gkhy.safePlatform.targetDuty.utils.DateUtils; |
| | | import com.gkhy.safePlatform.targetDuty.utils.poihelper.ExcelLogs; |
| | | import com.gkhy.safePlatform.targetDuty.utils.poihelper.ExcelUtil; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.Serializable; |
| | | import java.net.URLEncoder; |
| | | import java.sql.Timestamp; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * 目标指标(TargetMng)表控制层 |
| | |
| | | private TargetMngService targetMngService; |
| | | @Resource |
| | | private TargetDivideDetailService targetDivideDetailService; |
| | | @Autowired |
| | | public HttpServletRequest request; |
| | | |
| | | @Autowired |
| | | public HttpServletResponse response; |
| | | |
| | | |
| | | /** |
| | |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | | /** |
| | | * 下载模板 |
| | | * |
| | | */ |
| | | @GetMapping(value = "/exportTemplate") |
| | | public void exportTemplate() throws IOException { |
| | | Map<String,String> map = new LinkedHashMap<>(); |
| | | map.put("1","安全目标指标"); |
| | | map.put("2","目标指标编号"); |
| | | map.put("3","指标类型 1:年指标 2:月指标"); |
| | | map.put("4","年度"); |
| | | map.put("5","指标值"); |
| | | map.put("6","指标级别 1:公司级 2:部门分厂级 3:工段班组级"); |
| | | map.put("7","完成期限(yyyy-MM-dd HH:mm:ss)"); |
| | | map.put("8","备注信息"); |
| | | |
| | | // /** |
| | | // * 导出 |
| | | // * @param response / |
| | | // * @throws IOException / |
| | | // */ |
| | | // public void download(HttpServletResponse response) throws IOException { |
| | | // List<Map<String, Object>> list = new ArrayList<>(); |
| | | // for (OnlineUser user : all) { |
| | | // Map<String, Object> map = new LinkedHashMap<>(); |
| | | // map.put("用户名", user.getUserName()); |
| | | // map.put("用户昵称", user.getNickName()); |
| | | // map.put("登录IP", user.getIp()); |
| | | // map.put("登录地点", user.getAddress()); |
| | | // map.put("浏览器", user.getBrowser()); |
| | | // map.put("登录日期", user.getLoginTime()); |
| | | // list.add(map); |
| | | // } |
| | | // FileUtil.downloadExcel(list, response); |
| | | // } |
| | | String fileName = URLEncoder.encode("目标设置数据导入模板.xls", "UTF-8"); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
| | | |
| | | ExcelUtil.exportExcel(map,new ArrayList<>() , response.getOutputStream()); |
| | | response.getOutputStream().close(); |
| | | } |
| | | |
| | | /** |
| | | * 导出一览数据 |
| | | * |
| | | */ |
| | | @GetMapping(value = "/exportData") |
| | | public void exportData(TargetMngQueryCriteria queryCriteria) throws IOException { |
| | | Map<String,String> map = new LinkedHashMap<>(); |
| | | map.put("1","安全目标指标"); |
| | | map.put("2","目标指标编号"); |
| | | map.put("3","年度"); |
| | | map.put("4","指标值"); |
| | | map.put("5","指标级别"); |
| | | map.put("6","指标类型"); |
| | | map.put("7","完成期限"); |
| | | map.put("8","状态"); |
| | | map.put("9","备注信息"); |
| | | |
| | | String key = DateUtils.date2String(new Date(), DateUtils.PATTERN_ALLTIME_NOSIGN) ; |
| | | String fileName = URLEncoder.encode("目标设置"+key+".xls", "UTF-8"); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xlsx"); |
| | | response.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
| | | |
| | | |
| | | List<TargetMngExcel> respList = BeanCopyUtils.copyBeanList(targetMngService.queryAll(queryCriteria), TargetMngExcel.class); |
| | | |
| | | ExcelUtil.exportExcel(map,respList , response.getOutputStream(),DateUtils.PATTERN_STANDARD); |
| | | response.getOutputStream().close(); |
| | | } |
| | | |
| | | /** |
| | | * 导入数据 |
| | | * |
| | | */ |
| | | @RequestMapping(value = "/importData") |
| | | public ResultVO importData(MultipartFile file) throws IOException { |
| | | String contentType = file.getContentType(); |
| | | if(!"application/vnd.ms-excel".equals(contentType) |
| | | && !"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet".equals(contentType)) { |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL, "上传的excel格式错误"); |
| | | } |
| | | |
| | | Collection<TargetMngImportExcel> importExcel = ExcelUtil.importExcel(TargetMngImportExcel.class, file.getInputStream(), "yyyy-MM-dd HH:mm:ss", new ExcelLogs() , 0); |
| | | |
| | | if (CollectionUtils.isEmpty(importExcel)) { |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | | List<TargetMng> respList = BeanCopyUtils.copyBeanList((List<TargetMngImportExcel>)importExcel, TargetMng.class); |
| | | |
| | | targetMngService.saveBatch(respList); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | TargetMng mng = new TargetMng(); |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.gkhy.safePlatform.targetDuty.entity.WorkApprove; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.ExcApprove; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.SubmitApprove; |
| | | import com.gkhy.safePlatform.targetDuty.service.WorkApproveService; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.utils.PageUtils; |
| | |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 审批 |
| | | * |
| | | * @param excApprove 实体对象 |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping(value = "/excApprove") |
| | | public ResultVO excApprove(@RequestBody ExcApprove excApprove) { |
| | | if(excApprove.getId() == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | workApproveService.excApprove(excApprove); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | |
| | | * 奖惩记录(RewardPunishmentDetail)表实体类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-21 10:15:45 |
| | | * @since 2022-07-27 15:37:45 |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | @TableName("reward_punishment_detail") |
| | |
| | | this.id = id; |
| | | } |
| | | |
| | | //奖惩类型 1:奖励 2:惩罚 |
| | | //奖惩标准/外键 |
| | | private Long rewardPunishmentStandardId; |
| | | |
| | | public Long getRewardPunishmentStandardId() { |
| | |
| | | * (TargetDutySummary)表实体类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-21 15:51:57 |
| | | * @since 2022-07-27 15:33:30 |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | @TableName("target_duty_summary") |
| | |
| | | |
| | | public void setYiYue(String yiYue) { |
| | | this.yiYue = yiYue; |
| | | } |
| | | |
| | | private String february; |
| | | |
| | | public String getFebruary() { |
| | | return february; |
| | | } |
| | | |
| | | public void setFebruary(String february) { |
| | | this.february = february; |
| | | } |
| | | |
| | | private String erYue; |
| | |
| | | * 工作流审批表(WorkApprove)表实体类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-22 15:37:13 |
| | | * @since 2022-07-27 10:18:25 |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | @TableName("work_approve") |
| | |
| | | |
| | | public class RewardPunishmentDetailQueryCriteria { |
| | | |
| | | //员工(多个用逗号隔开) |
| | | //员工 |
| | | @Query() |
| | | private String personId; |
| | | //员工(多个用逗号隔开) |
| | | //员工 |
| | | public String getPersonId() { |
| | | return personId; |
| | | } |
| | |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | public class SubmitApprove extends BaseDomain { |
| | | |
| | | //流程标题 |
| | | private String title; |
| | | |
| | |
| | | |
| | | //打分明细 |
| | | private List<CurrentExamineDto> currentExamineDtoList = new ArrayList<>(); |
| | | //考核部门名称/外键(可能有多个,用逗号隔开) |
| | | private String examineDepartmentName; |
| | | //被考核部门名称/外键 |
| | | private String beExaminedDepartmentName; |
| | | |
| | | public String getBeExaminedDepartmentName() { |
| | | return beExaminedDepartmentName; |
| | | } |
| | | |
| | | public void setBeExaminedDepartmentName(String beExaminedDepartmentName) { |
| | | this.beExaminedDepartmentName = beExaminedDepartmentName; |
| | | } |
| | | |
| | | public String getExamineDepartmentName() { |
| | | return examineDepartmentName; |
| | | } |
| | | |
| | | public void setExamineDepartmentName(String examineDepartmentName) { |
| | | this.examineDepartmentName = examineDepartmentName; |
| | | } |
| | | |
| | | public List<CurrentExamineDto> getCurrentExamineDtoList() { |
| | | return currentExamineDtoList; |
| | |
| | | private String acceptanceNumber; |
| | | //备注信息 |
| | | private String memo; |
| | | |
| | | //设定人/外键 |
| | | private Long setPersonId; |
| | | |
| | | //设定部门ID/外键 |
| | | private Long setPersonDepartmentId; |
| | | //设定部门名称/外键 |
| | | private String setPersonDepartmentName; |
| | | |
| | | private Timestamp setTimem; |
| | | |
| | |
| | | |
| | | private List<ExamineItem> examineItemList; |
| | | |
| | | public String getSetPersonDepartmentName() { |
| | | return setPersonDepartmentName; |
| | | } |
| | | |
| | | public void setSetPersonDepartmentName(String setPersonDepartmentName) { |
| | | this.setPersonDepartmentName = setPersonDepartmentName; |
| | | } |
| | | |
| | | public List<ExamineItem> getExamineItemList() { |
| | | return examineItemList; |
| | |
| | | package com.gkhy.safePlatform.targetDuty.model.dto.resp; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | import java.sql.Timestamp; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | public class RewardPunishmentDetailDto implements Serializable { |
| | | |
| | | private Long id; |
| | | //奖惩类型 1:奖励 2:惩罚 |
| | | //奖惩标准/外键 |
| | | private Long rewardPunishmentStandardId; |
| | | //员工(多个用逗号隔开) |
| | | private String personId; |
| | | //备注信息 |
| | | private String memo; |
| | | //被奖惩者 |
| | | private String personName; |
| | | |
| | | //奖惩类型 1:奖励 2:惩罚 |
| | | private Integer standardType; |
| | | |
| | | private Timestamp createTime; |
| | | |
| | | private Timestamp updateTime; |
| | | public Integer getStandardType() { |
| | | return standardType; |
| | | } |
| | | |
| | | public void setStandardType(Integer standardType) { |
| | | this.standardType = standardType; |
| | | } |
| | | //奖惩内容 |
| | | private String content; |
| | | |
| | | public String getContent() { |
| | | return content; |
| | | } |
| | | |
| | | public void setContent(String content) { |
| | | this.content = content; |
| | | } |
| | | //奖惩名称 |
| | | private String qName; |
| | | |
| | | public String getqName() { |
| | | return qName; |
| | | } |
| | | |
| | | public void setqName(String qName) { |
| | | this.qName = qName; |
| | | } |
| | | |
| | | //依据 |
| | | private String reason; |
| | | |
| | | public String getReason() { |
| | | return reason; |
| | | } |
| | | |
| | | public void setReason(String reason) { |
| | | this.reason = reason; |
| | | } |
| | | |
| | | public Long getId() { |
| | | return id; |
| | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | //奖惩类型 1:奖励 2:惩罚 |
| | | |
| | | public Long getRewardPunishmentStandardId() { |
| | | return rewardPunishmentStandardId; |
| | | } |
| | |
| | | public void setRewardPunishmentStandardId(Long rewardPunishmentStandardId) { |
| | | this.rewardPunishmentStandardId = rewardPunishmentStandardId; |
| | | } |
| | | //员工(多个用逗号隔开) |
| | | |
| | | public String getPersonId() { |
| | | return personId; |
| | | } |
| | |
| | | public void setPersonId(String personId) { |
| | | this.personId = personId; |
| | | } |
| | | //备注信息 |
| | | public String getMemo() { |
| | | return memo; |
| | | |
| | | public String getPersonName() { |
| | | return personName; |
| | | } |
| | | |
| | | public void setMemo(String memo) { |
| | | this.memo = memo; |
| | | public void setPersonName(String personName) { |
| | | this.personName = personName; |
| | | } |
| | | |
| | | public Timestamp getCreateTime() { |
| | |
| | | |
| | | public void setCreateTime(Timestamp createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public Timestamp getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(Timestamp updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | } |
| | |
| | | |
| | | private Timestamp updateTime; |
| | | |
| | | //责任部门名 |
| | | private String departmentName; |
| | | |
| | | public String getDepartmentName() { |
| | | return departmentName; |
| | | } |
| | | |
| | | public void setDepartmentName(String departmentName) { |
| | | this.departmentName = departmentName; |
| | | } |
| | | |
| | | public Long getId() { |
| | | return id; |
| | |
| | | public class TargetExamineDto implements Serializable { |
| | | private Long id; |
| | | //安全目标指标 |
| | | private String name; |
| | | private String qName; |
| | | //目标指标编号 |
| | | private String indexNum; |
| | | //年度 |
| | |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | public String getqName() { |
| | | return qName; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | public void setqName(String qName) { |
| | | this.qName = qName; |
| | | } |
| | | |
| | | public String getIndexNum() { |
| | |
| | | package com.gkhy.safePlatform.targetDuty.repository; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.gkhy.safePlatform.targetDuty.entity.RewardPunishmentDetail; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.RewardPunishmentDetailDto; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | /** |
| | |
| | | @Repository |
| | | public interface RewardPunishmentDetailRepository extends BaseMapper<RewardPunishmentDetail> { |
| | | |
| | | @Select("<script> select a.id,a.person_id,a.create_time ,b.standard_type ,b.content ,b.q_name ,b.reason " + |
| | | "from reward_punishment_detail a left join reward_punishment_standard b on a.reward_punishment_standard_id=b.id where 1=1 " + |
| | | "<if test =\"personId !='' and personId !=null\">and a.person_id =#{personId}</if> </script> ") |
| | | IPage<RewardPunishmentDetailDto> queryAll(IPage<RewardPunishmentDetailDto> page, @Param("personId") String personId); |
| | | } |
| | |
| | | import com.gkhy.safePlatform.targetDuty.entity.WorkApprove; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.ExcApprove; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.SubmitApprove; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.WorkApproveQueryCriteria; |
| | | |
| | |
| | | List<WorkApprove> queryAll(WorkApproveQueryCriteria criteria); |
| | | |
| | | void submitApprove(SubmitApprove submitApprove); |
| | | |
| | | void excApprove(ExcApprove excApprove); |
| | | } |
| | |
| | | page = baseMapper.selectPage(page, |
| | | QueryHelpPlus.getPredicate(ExamineMng.class, pageQuery.getSearchParams())); |
| | | List<ExamineMngDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), ExamineMngDto.class); |
| | | // TODO:获取考核部门名称 |
| | | |
| | | // TODO:获取被考核部门名称 |
| | | |
| | | return new SearchResultVO<>( |
| | | true, |
| | |
| | | QueryHelpPlus.getPredicate(ExamineTemplate.class, pageQuery.getSearchParams())); |
| | | List<ExamineTemplateDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), ExamineTemplateDto.class); |
| | | |
| | | // TODO:获取设定人部门名称 |
| | | |
| | | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | |
| | | public ResultVO queryAll(PageQuery<RewardPunishmentDetailQueryCriteria> pageQuery) { |
| | | Long pageIndex = pageQuery.getPageIndex(); |
| | | Long pageSize = pageQuery.getPageSize(); |
| | | IPage<RewardPunishmentDetail> page = new Page<>(pageIndex, pageSize); |
| | | IPage<RewardPunishmentDetailDto> page = new Page<>(pageIndex, pageSize); |
| | | |
| | | page = baseMapper.selectPage(page, |
| | | QueryHelpPlus.getPredicate(RewardPunishmentDetail.class, pageQuery.getSearchParams())); |
| | | List<RewardPunishmentDetailDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), RewardPunishmentDetailDto.class); |
| | | page = baseMapper.queryAll(page, |
| | | pageQuery.getSearchParams().getPersonId()); |
| | | // List<RewardPunishmentDetailDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), RewardPunishmentDetailDto.class); |
| | | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | page.getTotal(), |
| | | respList, |
| | | page.getRecords(), |
| | | ResultCodes.OK |
| | | ); |
| | | } |
| | |
| | | QueryHelpPlus.getPredicate(TargetDutySummary.class, pageQuery.getSearchParams())); |
| | | List<TargetDutySummaryDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), TargetDutySummaryDto.class); |
| | | |
| | | // TODO:获取责任部门名称 |
| | | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.ExcApprove; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.SubmitApprove; |
| | | import com.gkhy.safePlatform.targetDuty.repository.WorkApproveRepository; |
| | | import com.gkhy.safePlatform.targetDuty.entity.WorkApprove; |
| | |
| | | @Override |
| | | public void submitApprove(SubmitApprove submitApprove) { |
| | | WorkApprove workApprove = BeanCopyUtils.copyBean(submitApprove, WorkApprove.class); |
| | | // workApprove.setWorkName(); |
| | | workApprove.setWorkName(submitApprove.getTitle()); |
| | | // workApprove.setApprovePersonId(); |
| | | this.save(workApprove); |
| | | } |
| | | |
| | | @Override |
| | | public void excApprove(ExcApprove excApprove) { |
| | | WorkApprove workApprove = BeanCopyUtils.copyBean(excApprove, WorkApprove.class); |
| | | workApprove.setApproveStatus(3); |
| | | this.updateById(workApprove); |
| | | } |
| | | } |