
9 changed files with 285 additions and 3 deletions
@ -0,0 +1,55 @@ |
|||
package com.yxt.anrui.oa.api; |
|||
|
|||
import com.yxt.anrui.oa.biz.oaform.*; |
|||
import com.yxt.anrui.oa.biz.oahireapply.OaHireApplyDetailsVo; |
|||
import com.yxt.anrui.oa.biz.oamendapply.OaMendApplyQuery; |
|||
import com.yxt.anrui.oa.biz.oamendapply.OaMendApplyVo; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
/** |
|||
* @description: 基础表单 |
|||
* @author: dimengzhe |
|||
* @date: 2025/1/7 |
|||
**/ |
|||
@RestController |
|||
@RequestMapping("v1/oaform") |
|||
public class OaFormRest { |
|||
|
|||
@Autowired |
|||
private OaFormService oaFormService; |
|||
|
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<OaFormVo>> listPage(@RequestBody PagerQuery<OaFormQuery> pq) { |
|||
ResultBean<PagerVo<OaFormVo>> rb = ResultBean.fireFail(); |
|||
PagerVo<OaFormVo> pv = oaFormService.listPageVo(pq); |
|||
return rb.success().setData(pv); |
|||
} |
|||
|
|||
@ApiOperation("新增或修改") |
|||
@PostMapping("/save") |
|||
ResultBean<String> save(@RequestBody OaFormDto dto) { |
|||
return oaFormService.saveOrUpdateForm(dto); |
|||
} |
|||
|
|||
@ApiOperation("根据SID获取一条记录") |
|||
@GetMapping("/fetchDetailsBySid/{sid}") |
|||
public ResultBean<OaFormDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid) { |
|||
return oaFormService.fetchDetailsBySid(sid); |
|||
} |
|||
|
|||
@ApiOperation("根据sid批量删除") |
|||
@DeleteMapping("/delBySids") |
|||
public ResultBean delBySids(@RequestBody String[] sids) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
oaFormService.delAll(sids); |
|||
return rb.success(); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,46 @@ |
|||
package com.yxt.anrui.oa.biz.oaform; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2025/1/7 |
|||
**/ |
|||
@Data |
|||
public class OaFormDetailsVo implements Vo { |
|||
private static final long serialVersionUID = -3614379397154106001L; |
|||
|
|||
private String sid; |
|||
|
|||
@ApiModelProperty("创建人") |
|||
private String createByName; |
|||
@ApiModelProperty("公司sid") |
|||
private String useOrgSid; |
|||
@ApiModelProperty("公司名称") |
|||
private String useOrgName; |
|||
@ApiModelProperty("部门sid") |
|||
private String deptSid; |
|||
@ApiModelProperty("部门名称") |
|||
private String deptName; |
|||
@ApiModelProperty("办结日期") |
|||
private String finishTime; |
|||
@ApiModelProperty("实例id") |
|||
private String procInstId; |
|||
@ApiModelProperty("流程定义id") |
|||
private String procDefId; |
|||
@ApiModelProperty("任务id") |
|||
private String taskId; |
|||
@ApiModelProperty("环节id") |
|||
private String nodeId; |
|||
@ApiModelProperty("流程状态") |
|||
private String nodeState; |
|||
@ApiModelProperty("创建组织sid") |
|||
private String createOrgSid; |
|||
@ApiModelProperty("创建组织") |
|||
private String createOrgName; |
|||
@ApiModelProperty("关联审批单") |
|||
private String linkFormSids; |
|||
} |
@ -0,0 +1,47 @@ |
|||
package com.yxt.anrui.oa.biz.oaform; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2025/1/7 |
|||
**/ |
|||
@Data |
|||
public class OaFormDto { |
|||
|
|||
private String sid; |
|||
|
|||
@ApiModelProperty("创建人") |
|||
private String createByName; |
|||
@ApiModelProperty("公司sid") |
|||
private String useOrgSid; |
|||
@ApiModelProperty("公司名称") |
|||
private String useOrgName; |
|||
@ApiModelProperty("部门sid") |
|||
private String deptSid; |
|||
@ApiModelProperty("部门名称") |
|||
private String deptName; |
|||
@ApiModelProperty("办结日期") |
|||
private String finishTime; |
|||
@ApiModelProperty("实例id") |
|||
private String procInstId; |
|||
@ApiModelProperty("流程定义id") |
|||
private String procDefId; |
|||
@ApiModelProperty("任务id") |
|||
private String taskId; |
|||
@ApiModelProperty("环节id") |
|||
private String nodeId; |
|||
@ApiModelProperty("流程状态") |
|||
private String nodeState; |
|||
@ApiModelProperty("创建组织sid") |
|||
private String createOrgSid; |
|||
@ApiModelProperty("创建组织") |
|||
private String createOrgName; |
|||
@ApiModelProperty("关联审批单") |
|||
private String linkFormSids; |
|||
} |
@ -1,4 +1,18 @@ |
|||
<?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="com.yxt.anrui.oa.biz.oaform.OaFormMapper"> |
|||
<select id="fetchDetailsBySid" resultType="com.yxt.anrui.oa.biz.oaform.OaFormDetailsVo"> |
|||
select * |
|||
from oa_form |
|||
where sid = #{sid} |
|||
</select> |
|||
|
|||
<select id="selectPageVo" resultType="com.yxt.anrui.oa.biz.oaform.OaFormVo"> |
|||
select * |
|||
from oa_form |
|||
<where> |
|||
1=1 and |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,16 @@ |
|||
package com.yxt.anrui.oa.biz.oaform; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2025/1/7 |
|||
**/ |
|||
@Data |
|||
public class OaFormQuery implements Query { |
|||
private static final long serialVersionUID = 2329171644870505548L; |
|||
|
|||
|
|||
} |
@ -0,0 +1,44 @@ |
|||
package com.yxt.anrui.oa.biz.oaform; |
|||
|
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: dimengzhe |
|||
* @date: 2025/1/7 |
|||
**/ |
|||
@Data |
|||
public class OaFormVo { |
|||
|
|||
private String sid; |
|||
|
|||
@ApiModelProperty("创建人") |
|||
private String createByName; |
|||
@ApiModelProperty("公司sid") |
|||
private String useOrgSid; |
|||
@ApiModelProperty("公司名称") |
|||
private String useOrgName; |
|||
@ApiModelProperty("部门sid") |
|||
private String deptSid; |
|||
@ApiModelProperty("部门名称") |
|||
private String deptName; |
|||
@ApiModelProperty("办结日期") |
|||
private String finishTime; |
|||
@ApiModelProperty("实例id") |
|||
private String procInstId; |
|||
@ApiModelProperty("流程定义id") |
|||
private String procDefId; |
|||
@ApiModelProperty("任务id") |
|||
private String taskId; |
|||
@ApiModelProperty("环节id") |
|||
private String nodeId; |
|||
@ApiModelProperty("流程状态") |
|||
private String nodeState; |
|||
@ApiModelProperty("创建组织sid") |
|||
private String createOrgSid; |
|||
@ApiModelProperty("创建组织") |
|||
private String createOrgName; |
|||
@ApiModelProperty("关联审批单") |
|||
private String linkFormSids; |
|||
} |
Loading…
Reference in new issue