45 changed files with 2217 additions and 16 deletions
@ -0,0 +1,104 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.api; |
|||
|
|||
import com.yxt.anrui.oa.biz.adseatapply.*; |
|||
import com.yxt.anrui.oa.biz.oaform.flowable.CompleteDto; |
|||
import com.yxt.anrui.oa.biz.oaform.flowable.NodeQuery; |
|||
import com.yxt.anrui.oa.biz.oaform.flowable.TaskDto; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.cloud.openfeign.SpringQueryMap; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import javax.validation.Valid; |
|||
|
|||
@Api(tags = "乘坐交通工具特殊座席事前申请") |
|||
@RestController |
|||
@RequestMapping("v1/byVehicleapply") |
|||
public class AdSeatApplyRest { |
|||
|
|||
@Autowired |
|||
private AdSeatApplyService adSeatApplyService; |
|||
|
|||
@ApiOperation("初始化(新增或修改)") |
|||
@GetMapping({"/getInit", "/getInit/{sid}"}) |
|||
public ResultBean<AdSeatApplyVo> getInit( |
|||
@PathVariable(value = "sid", required = false) String sid, |
|||
@RequestParam(value = "userSid", required = false) String userSid, |
|||
@RequestParam(value = "orgPath", required = false) String orgPath) { |
|||
ResultBean<AdSeatApplyVo> rb = ResultBean.fireFail(); |
|||
if (sid == null || sid.isEmpty()) { |
|||
// 执行新增初始化
|
|||
if (userSid == null || orgPath == null) { |
|||
return rb.setMsg("userSid和orgPath不能为空"); |
|||
} |
|||
return adSeatApplyService.getSaveInit(userSid, orgPath); |
|||
} else { |
|||
// 执行修改初始化
|
|||
return adSeatApplyService.getUpdateInit(sid); |
|||
} |
|||
} |
|||
|
|||
@ApiOperation("新增或修改") |
|||
@PostMapping("/save") |
|||
public ResultBean save(@RequestBody AdSeatApplyDto dto) { |
|||
return adSeatApplyService.saveOrUpdateDto(dto); |
|||
} |
|||
|
|||
@ApiOperation("详情") |
|||
@GetMapping("/details/{sid}") |
|||
ResultBean<AdSeatApplyDetailsVo> details(@PathVariable("sid") String sid |
|||
, @RequestParam(value = "application", required = false) String application) { |
|||
return adSeatApplyService.details(sid,application); |
|||
} |
|||
|
|||
@ApiOperation("提交审批流程") |
|||
@PostMapping("/submit") |
|||
public ResultBean submit(@RequestBody AdSeatApplyDto dto) { |
|||
return adSeatApplyService.submit(dto); |
|||
} |
|||
|
|||
@ApiOperation(value = "办理(同意)") |
|||
@PutMapping("/complete") |
|||
public ResultBean complete(@Valid @RequestBody CompleteDto dto) { |
|||
return adSeatApplyService.complete(dto); |
|||
} |
|||
|
|||
@ApiOperation(value = "驳回任务") |
|||
@PutMapping(value = "/reject") |
|||
public ResultBean reject(@Valid @RequestBody TaskDto dto) { |
|||
return adSeatApplyService.reject(dto); |
|||
} |
|||
|
|||
@ApiOperation("获取流程操作标题") |
|||
@GetMapping("/getFlowOperateTitle") |
|||
@ResponseBody |
|||
ResultBean<String> getFlowOperateTitle(@SpringQueryMap NodeQuery query) { |
|||
return adSeatApplyService.getFlowOperateTitle(query); |
|||
} |
|||
} |
@ -0,0 +1,40 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.api; |
|||
|
|||
import com.yxt.anrui.oa.biz.adseatdetail.*; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
@Api(tags = "乘坐交通工具特殊座席事前列表") |
|||
@RestController |
|||
public class AdSeatDetailRest { |
|||
|
|||
} |
@ -0,0 +1,104 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.api; |
|||
|
|||
import com.yxt.anrui.oa.biz.adteamapply.*; |
|||
import com.yxt.anrui.oa.biz.oaform.flowable.CompleteDto; |
|||
import com.yxt.anrui.oa.biz.oaform.flowable.NodeQuery; |
|||
import com.yxt.anrui.oa.biz.oaform.flowable.TaskDto; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.cloud.openfeign.SpringQueryMap; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import javax.validation.Valid; |
|||
|
|||
@Api(tags = "团建申请") |
|||
@RestController |
|||
@RequestMapping("v1/leagueConstructionapply") |
|||
public class AdTeamApplyRest { |
|||
|
|||
@Autowired |
|||
private AdTeamApplyService adTeamApplyService; |
|||
|
|||
@ApiOperation("初始化(新增或修改)") |
|||
@GetMapping({"/getInit", "/getInit/{sid}"}) |
|||
public ResultBean<AdTeamApplyVo> getInit( |
|||
@PathVariable(value = "sid", required = false) String sid, |
|||
@RequestParam(value = "userSid", required = false) String userSid, |
|||
@RequestParam(value = "orgPath", required = false) String orgPath) { |
|||
ResultBean<AdTeamApplyVo> rb = ResultBean.fireFail(); |
|||
if (sid == null || sid.isEmpty()) { |
|||
// 执行新增初始化
|
|||
if (userSid == null || orgPath == null) { |
|||
return rb.setMsg("userSid和orgPath不能为空"); |
|||
} |
|||
return adTeamApplyService.getSaveInit(userSid, orgPath); |
|||
} else { |
|||
// 执行修改初始化
|
|||
return adTeamApplyService.getUpdateInit(sid); |
|||
} |
|||
} |
|||
|
|||
@ApiOperation("新增或修改") |
|||
@PostMapping("/save") |
|||
public ResultBean save(@RequestBody AdTeamApplyDto dto) { |
|||
return adTeamApplyService.saveOrUpdateDto(dto); |
|||
} |
|||
|
|||
@ApiOperation("详情") |
|||
@GetMapping("/details/{sid}") |
|||
ResultBean<AdTeamApplyDetailsVo> details(@PathVariable("sid") String sid |
|||
, @RequestParam(value = "application", required = false) String application) { |
|||
return adTeamApplyService.details(sid,application); |
|||
} |
|||
|
|||
@ApiOperation("提交审批流程") |
|||
@PostMapping("/submit") |
|||
public ResultBean submit(@RequestBody AdTeamApplyDto dto) { |
|||
return adTeamApplyService.submit(dto); |
|||
} |
|||
|
|||
@ApiOperation(value = "办理(同意)") |
|||
@PutMapping("/complete") |
|||
public ResultBean complete(@Valid @RequestBody CompleteDto dto) { |
|||
return adTeamApplyService.complete(dto); |
|||
} |
|||
|
|||
@ApiOperation(value = "驳回任务") |
|||
@PutMapping(value = "/reject") |
|||
public ResultBean reject(@Valid @RequestBody TaskDto dto) { |
|||
return adTeamApplyService.reject(dto); |
|||
} |
|||
|
|||
@ApiOperation("获取流程操作标题") |
|||
@GetMapping("/getFlowOperateTitle") |
|||
@ResponseBody |
|||
ResultBean<String> getFlowOperateTitle(@SpringQueryMap NodeQuery query) { |
|||
return adTeamApplyService.getFlowOperateTitle(query); |
|||
} |
|||
} |
@ -0,0 +1,36 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.api; |
|||
|
|||
import io.swagger.annotations.Api; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
@Api(tags = "团建列表") |
|||
@RestController |
|||
@RequestMapping("v1/adteamdetail") |
|||
public class AdTeamDetailRest { |
|||
|
|||
} |
@ -0,0 +1,44 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adseatapply; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
@ApiModel(value = "乘坐交通工具特殊座席事前申请", description = "乘坐交通工具特殊座席事前申请") |
|||
@TableName("ad_seat_apply") |
|||
public class AdSeatApply extends BaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@ApiModelProperty("基础表单sid") |
|||
private String formSid; // 基础表单sid
|
|||
@ApiModelProperty("关联审批sid列表,英文逗号分隔") |
|||
private String linkFormSids; // 关联审批sid列表,英文逗号分隔
|
|||
} |
@ -0,0 +1,49 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adseatapply; |
|||
|
|||
import com.yxt.anrui.oa.biz.adseatdetail.AdSeatListDetailVo; |
|||
import com.yxt.anrui.oa.biz.oaform.OaFormCommonVo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
@Data |
|||
@ApiModel(value = "乘坐交通工具特殊座席事前申请 视图数据详情", description = "乘坐交通工具特殊座席事前申请 视图数据详情") |
|||
public class AdSeatApplyDetailsVo extends OaFormCommonVo { |
|||
|
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
|
|||
@ApiModelProperty("图片") |
|||
private List<String> files = new ArrayList<>(); |
|||
@ApiModelProperty("附件") |
|||
private List<String> appes = new ArrayList<>(); |
|||
|
|||
private List<AdSeatListDetailVo> list = new ArrayList<>(); |
|||
} |
@ -0,0 +1,52 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adseatapply; |
|||
|
|||
import com.yxt.anrui.oa.biz.adseatdetail.AdSeatDetailDto; |
|||
import com.yxt.anrui.oa.biz.oaform.OaFormDto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
@Data |
|||
@ApiModel(value = "乘坐交通工具特殊座席事前申请 数据传输对象", description = "乘坐交通工具特殊座席事前申请 数据传输对象") |
|||
public class AdSeatApplyDto extends OaFormDto { |
|||
|
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
@ApiModelProperty("基础表单sid") |
|||
private String formSid; |
|||
@ApiModelProperty("关联审批单") |
|||
private String linkFormSids; |
|||
@ApiModelProperty("图片") |
|||
private List<String> files = new ArrayList<>(); |
|||
@ApiModelProperty("文件") |
|||
private List<String> appes = new ArrayList<>(); |
|||
|
|||
private List<AdSeatDetailDto> list = new ArrayList<>(); |
|||
} |
@ -0,0 +1,35 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adseatapply; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
@Mapper |
|||
public interface AdSeatApplyMapper extends BaseMapper<AdSeatApply> { |
|||
|
|||
AdSeatApplyDetailsVo details(String sid); |
|||
} |
@ -0,0 +1,28 @@ |
|||
<?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.adseatapply.AdSeatApplyMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="details" resultMap="detailMap"> |
|||
select remarks, sid |
|||
from ad_seat_apply |
|||
where sid = #{sid} |
|||
</select> |
|||
|
|||
<resultMap id="detailMap" type="com.yxt.anrui.oa.biz.adseatapply.AdSeatApplyDetailsVo"> |
|||
<result column="remarks" property="remarks"/> |
|||
<collection property="list" ofType="com.yxt.anrui.oa.biz.adseatdetail.AdSeatListDetailVo" |
|||
select="selectList" column="sid"> |
|||
</collection> |
|||
</resultMap> |
|||
|
|||
<select id="selectList" resultType="com.yxt.anrui.oa.biz.adseatdetail.AdSeatListDetailVo"> |
|||
select sid, |
|||
specialSeat, |
|||
cause, |
|||
expectCost, |
|||
costRemarks |
|||
from ad_seat_detail |
|||
where mainSid = #{sid} |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,304 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adseatapply; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.yxt.anrui.oa.biz.adsalecarpulapply.AdSalecarpulApply; |
|||
import com.yxt.anrui.oa.biz.adseatdetail.AdSeatDetailDto; |
|||
import com.yxt.anrui.oa.biz.adseatdetail.AdSeatDetailService; |
|||
import com.yxt.anrui.oa.biz.adseatdetail.AdSeatDetailVo; |
|||
import com.yxt.anrui.oa.biz.oaappendix.OaAppendixService; |
|||
import com.yxt.anrui.oa.biz.oaform.OaForm; |
|||
import com.yxt.anrui.oa.biz.oaform.OaFormRuleEnum; |
|||
import com.yxt.anrui.oa.biz.oaform.OaFormService; |
|||
import com.yxt.anrui.oa.biz.oaform.OaFormUrlEnum; |
|||
import com.yxt.anrui.oa.biz.oaform.flowable.*; |
|||
import com.yxt.anrui.oa.feign.file.OaFileEnum; |
|||
import com.yxt.anrui.oa.feign.flowable.flow.ProcDefEnum; |
|||
import com.yxt.anrui.oa.feign.portal.sysorganization.SysOrganizationFeign; |
|||
import com.yxt.anrui.oa.feign.portal.sysorganization.SysOrganizationVo; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import java.util.Collections; |
|||
import java.util.HashMap; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
@Service |
|||
public class AdSeatApplyService extends MybatisBaseService<AdSeatApplyMapper, AdSeatApply> { |
|||
|
|||
@Autowired |
|||
private OaAppendixService oaAppendixService; |
|||
@Autowired |
|||
private OaFormService oaFormService; |
|||
@Autowired |
|||
private AdSeatDetailService adSeatDetailService; |
|||
@Autowired |
|||
private SysOrganizationFeign sysOrganizationFeign; |
|||
|
|||
public ResultBean<AdSeatApplyVo> getSaveInit(String userSid, String orgPath) { |
|||
ResultBean<AdSeatApplyVo> rb = ResultBean.fireFail(); |
|||
AdSeatApplyVo adSeatApplyVo = new AdSeatApplyVo(); |
|||
adSeatApplyVo.setCreateBySid(userSid); |
|||
adSeatApplyVo.setOrgSidPath(orgPath); |
|||
return rb.success().setData(adSeatApplyVo); |
|||
} |
|||
|
|||
public ResultBean<AdSeatApplyVo> getUpdateInit(String sid) { |
|||
ResultBean<AdSeatApplyVo> rb = ResultBean.fireFail(); |
|||
AdSeatApplyVo adSeatApplyVo = new AdSeatApplyVo(); |
|||
AdSeatApply adSeatApply = fetchBySid(sid); |
|||
if (adSeatApply == null) { |
|||
return rb.setMsg("该申请不存在"); |
|||
} |
|||
// adExpatriatesApplyVo.setTestPage(adExpatriatesApply.getTestPage());
|
|||
OaForm oaForm = oaFormService.fetchBySid(sid); |
|||
adSeatApplyVo.setTaskId(oaForm.getTaskId()); |
|||
adSeatApplyVo.setProcInsId(oaForm.getProcInstId()); |
|||
//根据部门sid获取orgPath并赋值
|
|||
SysOrganizationVo organizationVo = sysOrganizationFeign.fetchBySid(oaForm.getDeptSid()).getData(); |
|||
String orgSidPath = organizationVo.getOrgSidPath(); |
|||
adSeatApplyVo.setOrgSidPath(orgSidPath); |
|||
adSeatApplyVo.setCreateBySid(oaForm.getCreateBySid()); |
|||
BeanUtil.copyProperties(adSeatApply, adSeatApplyVo); |
|||
List<AdSeatDetailVo> list = adSeatDetailService.getUpdateInit(sid); |
|||
List<String> files = oaAppendixService.selectByLinkSid(sid, "图片"); |
|||
adSeatApplyVo.setFiles(files); |
|||
List<String> appes = oaAppendixService.selectByLinkSid(sid, "文件"); |
|||
adSeatApplyVo.setAppes(appes); |
|||
adSeatApplyVo.setList(list); |
|||
adSeatApplyVo.setSid(sid); |
|||
return rb.success().setData(adSeatApplyVo); |
|||
} |
|||
|
|||
public ResultBean<String> saveOrUpdateDto(AdSeatApplyDto dto) { |
|||
ResultBean<String> rb = ResultBean.fireFail(); |
|||
String sid = dto.getSid(); |
|||
List<String> files = dto.getFiles(); |
|||
List<String> appes = dto.getAppes(); |
|||
List<AdSeatDetailDto> list = dto.getList(); |
|||
if (StringUtils.isBlank(sid)) { |
|||
// 新建操作
|
|||
AdSeatApply entity = new AdSeatApply(); |
|||
BeanUtil.copyProperties(dto, entity, "sid"); |
|||
|
|||
dto.setBillNo("CZJTGJTSZXSQ"); |
|||
dto.setSid(entity.getSid()); |
|||
ResultBean<String> resultBean = oaFormService.saveOaForm(dto); |
|||
|
|||
if (!resultBean.getSuccess()) { |
|||
return rb; |
|||
} |
|||
|
|||
entity.setFormSid(resultBean.getData()); |
|||
baseMapper.insert(entity); |
|||
sid = entity.getSid(); |
|||
} else { |
|||
// 更新操作
|
|||
AdSeatApply entity = fetchBySid(sid); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.updateById(entity); |
|||
} |
|||
adSeatDetailService.saveDetails(list, sid); |
|||
// 处理附件
|
|||
saveFiles(sid, files, OaFileEnum.ADSEATAPPLY.getAttachType(), "图片"); |
|||
saveFiles(sid, appes, OaFileEnum.ADSEATAPPLY.getAttachType(), "文件"); |
|||
return rb.success().setData(sid); |
|||
} |
|||
|
|||
// 保存文件
|
|||
private void saveFiles(String sid, List<String> files, String attachType, String fileType) { |
|||
files.removeAll(Collections.singleton(null)); |
|||
oaAppendixService.saveFile(sid, files, attachType, fileType); |
|||
} |
|||
|
|||
public ResultBean<AdSeatApplyDetailsVo> details(String sid, String application) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
AdSeatApplyDetailsVo adSeatApplyDetailsVo = baseMapper.details(sid); |
|||
if (adSeatApplyDetailsVo == null) { |
|||
return rb.setMsg("该申请不存在"); |
|||
} |
|||
List<String> files = oaAppendixService.selectByLinkSid(sid, "图片"); |
|||
List<String> appes = oaAppendixService.selectByLinkSid(sid, "文件"); |
|||
adSeatApplyDetailsVo.setFiles(files); |
|||
adSeatApplyDetailsVo.setAppes(appes); |
|||
//基础字段赋值
|
|||
BeanUtil.copyProperties(oaFormService.getDetails(sid), adSeatApplyDetailsVo); |
|||
return rb.success().setData(adSeatApplyDetailsVo); |
|||
} |
|||
|
|||
/** |
|||
* 提交 |
|||
* |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
public ResultBean submit(AdSeatApplyDto dto) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
ResultBean<String> stringResultBean = saveOrUpdateDto(dto); |
|||
if (!stringResultBean.getSuccess()) { |
|||
return rb.setMsg(stringResultBean.getData()); |
|||
} |
|||
String businessSid = stringResultBean.getData(); |
|||
|
|||
SubmitDto submitDto = new SubmitDto(); |
|||
submitDto.setUserSid(dto.getCreateBySid()); |
|||
submitDto.setBusinessSid(businessSid); |
|||
|
|||
Map<String, Object> formVariables = new HashMap<>(); |
|||
formVariables = getMap(formVariables, businessSid); |
|||
submitDto.setFormVariables(formVariables); |
|||
submitDto.setProcDefId(ProcDefEnum.HIHIREAPPLY.getProDefId()); |
|||
submitDto.setNextTaskId(dto.getTaskId()); |
|||
submitDto.setRule(OaFormRuleEnum.DIRECTLY_UNDER.getRule()); |
|||
return oaFormService.submit(submitDto); |
|||
} |
|||
|
|||
/** |
|||
* 办理(同意) |
|||
* |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
public ResultBean complete(CompleteDto dto) { |
|||
Map<String, Object> formVariables = dto.getFormVariables(); |
|||
formVariables = getMap(formVariables, dto.getBusinessSid()); |
|||
dto.setFormVariables(formVariables); |
|||
BusinessVariablesDto businessVariablesDto = new BusinessVariablesDto(); |
|||
BeanUtil.copyProperties(dto, businessVariablesDto); |
|||
return oaFormService.complete(businessVariablesDto); |
|||
} |
|||
|
|||
/** |
|||
* 驳回 |
|||
* |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
public ResultBean reject(TaskDto dto) { |
|||
Map<String, Object> formVariables = dto.getFormVariables(); |
|||
formVariables = getMap(formVariables, dto.getBusinessSid()); |
|||
dto.setFormVariables(formVariables); |
|||
return oaFormService.reject(dto); |
|||
} |
|||
|
|||
public ResultBean<String> getFlowOperateTitle(NodeQuery query) { |
|||
// 默认失败返回
|
|||
ResultBean<String> rb = ResultBean.fireFail(); |
|||
|
|||
// 获取next值和formVariables
|
|||
int next = query.getNext(); |
|||
|
|||
// 获取并更新formVariables
|
|||
Map<String, Object> formVariables = getMap(query.getFormVariables(), query.getBusinessSid()); |
|||
query.setFormVariables(formVariables); |
|||
|
|||
// 校验next参数是否有效(只允许0或1)
|
|||
if (next != 0 && next != 1) { |
|||
return rb.setMsg("参数错误:next"); // 如果next不是0或1,返回错误信息
|
|||
} |
|||
|
|||
// 获取节点名称
|
|||
String data = getNodeName(query, next); |
|||
|
|||
// 如果data为null,表示未获取到有效的节点信息
|
|||
if (data == null) { |
|||
return rb.setMsg("没有获取到节点信息"); // 返回错误消息
|
|||
} |
|||
|
|||
// 返回成功的结果和获取到的节点名称
|
|||
return rb.success().setData(data); |
|||
} |
|||
|
|||
/** |
|||
* 网关参数组成 |
|||
* |
|||
* @param formVariables |
|||
* @param sid |
|||
* @return |
|||
*/ |
|||
public Map<String, Object> getMap(Map<String, Object> formVariables, String sid) { |
|||
Map<String, Object> appMap = new HashMap<>(); |
|||
appMap.put("sid", sid); |
|||
/*appMap.put("editUrl", "approval/#/pages/EditOnboradingApplyActivity?sid=" + sid); |
|||
appMap.put("detailUrl", "approval/#/pages/DetailOnboradingApplyActivity?sid=" + sid); |
|||
appMap.put("flowOperateUrl", "oa/v1/HrHireApply/getFlowOperateTitle"); |
|||
appMap.put("agreeUrl", "oa/v1/HrHireApply/complete"); |
|||
appMap.put("stopUrl", "oa/v1/oaform/breakProcess"); |
|||
appMap.put("rejectUrl", "oa/v1/HrHireApply/reject"); |
|||
appMap.put("recallUrl", "oa/v1/oaform/revokeProcess"); |
|||
appMap.put("signUrl", "oa/v1/oaform/delegate"); |
|||
appMap.put("transferUrl", "oa/v1/oaform/assignTask");*/ |
|||
appMap.put(OaFormUrlEnum.HRHIREAPPLY_EDIT.getType(), OaFormUrlEnum.HRHIREAPPLY_EDIT.getUrl() + "?sid=" + sid); |
|||
appMap.put(OaFormUrlEnum.HRHIREAPPLY_DETAIL.getType(), OaFormUrlEnum.HRHIREAPPLY_DETAIL.getUrl() + "?sid=" + sid); |
|||
appMap.put(OaFormUrlEnum.HRHIREAPPLY_FLOWOPERATEURL.getType(), OaFormUrlEnum.HRHIREAPPLY_FLOWOPERATEURL.getUrl()); |
|||
appMap.put(OaFormUrlEnum.HRHIREAPPLY_AGREEURL.getType(), OaFormUrlEnum.HRHIREAPPLY_AGREEURL.getUrl()); |
|||
appMap.put(OaFormUrlEnum.STOPURL.getType(), OaFormUrlEnum.STOPURL.getUrl()); |
|||
appMap.put(OaFormUrlEnum.HRHIREAPPLY_REJECTURL.getType(), OaFormUrlEnum.HRHIREAPPLY_REJECTURL.getUrl()); |
|||
appMap.put(OaFormUrlEnum.RECALLURL.getType(), OaFormUrlEnum.RECALLURL.getUrl()); |
|||
appMap.put(OaFormUrlEnum.SIGNURL.getType(), OaFormUrlEnum.SIGNURL.getUrl()); |
|||
appMap.put(OaFormUrlEnum.TRANSFERURL.getType(), OaFormUrlEnum.TRANSFERURL.getUrl()); |
|||
formVariables.put("app", appMap); |
|||
//根据组织查询是否是分公司
|
|||
OaForm oaForm = oaFormService.fetchBySid(sid); |
|||
AdSeatApply adSeatApply = fetchBySid(sid); |
|||
SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(oaForm.getUseOrgSid()).getData(); |
|||
//是否是分公司
|
|||
formVariables.put("isTrue", sysOrganization.getIsDept() == 0); |
|||
return formVariables; |
|||
} |
|||
|
|||
/** |
|||
* 根据next的值获取前一个节点或下一个节点的名称。 |
|||
* |
|||
* @param query 包含查询所需参数的NodeQuery对象 |
|||
* @param next 参数,0表示上一环节,1表示下一环节 |
|||
* @return 节点名称,如果失败则返回null |
|||
*/ |
|||
private String getNodeName(NodeQuery query, int next) { |
|||
// 根据next值选择相应的服务方法获取节点信息
|
|||
ResultBean<List<NodeVo>> resultBean = (next == 0) |
|||
? oaFormService.getPreviousNodesForReject(query) // 获取上一环节的节点
|
|||
: oaFormService.getNextNodesForSubmit(query); // 获取下一环节的节点
|
|||
// 如果服务调用成功
|
|||
if (resultBean.getSuccess()) { |
|||
// 清除结果列表中的null值,避免空节点
|
|||
resultBean.getData().removeAll(Collections.singleton(null)); |
|||
// 如果结果列表非空,返回第一个节点的名称
|
|||
if (!resultBean.getData().isEmpty()) { |
|||
return resultBean.getData().get(0).getName(); |
|||
} |
|||
} else { |
|||
// 如果服务调用失败,返回null
|
|||
return null; |
|||
} |
|||
// 如果结果为空,返回null
|
|||
return null; |
|||
} |
|||
} |
@ -0,0 +1,60 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adseatapply; |
|||
|
|||
import com.yxt.anrui.oa.biz.adseatdetail.AdSeatDetailVo; |
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
@Data |
|||
@ApiModel(value = "乘坐交通工具特殊座席事前申请 视图数据对象", description = "乘坐交通工具特殊座席事前申请 视图数据对象") |
|||
public class AdSeatApplyVo implements Vo { |
|||
|
|||
private String sid; |
|||
/* private String userSid; |
|||
private String orgPath;*/ |
|||
private String orgSidPath; |
|||
private String createBySid; |
|||
|
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
@ApiModelProperty("图片") |
|||
private List<String> files = new ArrayList<>(); |
|||
@ApiModelProperty("附件") |
|||
private List<String> appes = new ArrayList<>(); |
|||
|
|||
private List<AdSeatDetailVo> list = new ArrayList<>(); |
|||
|
|||
private String taskId; |
|||
@ApiModelProperty("流程实例id") |
|||
private String procInsId; |
|||
|
|||
// private String testPage;
|
|||
} |
@ -0,0 +1,52 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adseatdetail; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
import java.math.BigDecimal; |
|||
|
|||
@Data |
|||
@ApiModel(value = "乘坐交通工具特殊座席事前列表", description = "乘坐交通工具特殊座席事前列表") |
|||
@TableName("ad_seat_detail") |
|||
public class AdSeatDetail extends BaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@ApiModelProperty("申请sid") |
|||
private String mainSid; // 申请sid
|
|||
@ApiModelProperty("申请交通工具特殊座席") |
|||
private String specialSeat; // 申请交通工具特殊座席
|
|||
@ApiModelProperty("申请事由及详情") |
|||
private String cause; // 申请事由及详情
|
|||
@ApiModelProperty("预计费用") |
|||
private BigDecimal expectCost; // 预计费用
|
|||
@ApiModelProperty("费用明细") |
|||
private String costRemarks; // 费用明细
|
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adseatdetail; |
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
import java.math.BigDecimal; |
|||
|
|||
@Data |
|||
@ApiModel(value = "乘坐交通工具特殊座席事前列表 数据传输对象", description = "乘坐交通工具特殊座席事前列表 数据传输对象") |
|||
public class AdSeatDetailDto implements Dto { |
|||
|
|||
@ApiModelProperty("申请交通工具特殊座席") |
|||
private String specialSeat; |
|||
@ApiModelProperty("申请事由及详情") |
|||
private String cause; |
|||
@ApiModelProperty("预计费用") |
|||
private BigDecimal expectCost; |
|||
@ApiModelProperty("费用明细") |
|||
private String costRemarks; |
|||
|
|||
} |
@ -0,0 +1,40 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adseatdetail; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Select; |
|||
import java.util.List; |
|||
|
|||
@Mapper |
|||
public interface AdSeatDetailMapper extends BaseMapper<AdSeatDetail> { |
|||
|
|||
List<AdSeatDetailVo> getUpdateInit(String sid); |
|||
|
|||
@Select("select * from ad_seat_detail where mainSid = #{mainSid}") |
|||
List<AdSeatDetail> selectByMainSid(String mainSid); |
|||
} |
@ -0,0 +1,15 @@ |
|||
<?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.adseatdetail.AdSeatDetailMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="getUpdateInit" resultType="com.yxt.anrui.oa.biz.adseatdetail.AdSeatDetailVo"> |
|||
select sid, |
|||
specialSeat, |
|||
cause, |
|||
expectCost, |
|||
costRemarks |
|||
from ad_seat_detail |
|||
where mainSid = #{sid} |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,60 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adseatdetail; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import org.springframework.stereotype.Service; |
|||
import java.util.Collections; |
|||
import java.util.List; |
|||
|
|||
@Service |
|||
public class AdSeatDetailService extends MybatisBaseService<AdSeatDetailMapper, AdSeatDetail> { |
|||
|
|||
public void saveDetails(List<AdSeatDetailDto> list, String sid) { |
|||
//根据sid查询明细并删除
|
|||
List<AdSeatDetail> list2 = baseMapper.selectByMainSid(sid); |
|||
list2.removeAll(Collections.singleton(null)); |
|||
if (!list2.isEmpty()) { |
|||
list2.stream().forEach(v -> { |
|||
deleteBySid(v.getSid()); |
|||
}); |
|||
} |
|||
list.removeAll(Collections.singleton(null)); |
|||
if (!list.isEmpty()) { |
|||
list.stream().forEach(details -> { |
|||
AdSeatDetail adSeatDetail = new AdSeatDetail(); |
|||
BeanUtil.copyProperties(details, adSeatDetail); |
|||
adSeatDetail.setMainSid(sid); |
|||
baseMapper.insert(adSeatDetail); |
|||
}); |
|||
} |
|||
} |
|||
|
|||
public List<AdSeatDetailVo> getUpdateInit(String sid) { |
|||
return baseMapper.getUpdateInit(sid); |
|||
} |
|||
} |
@ -0,0 +1,48 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adseatdetail; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
import java.math.BigDecimal; |
|||
|
|||
@Data |
|||
@ApiModel(value = "乘坐交通工具特殊座席事前列表 视图数据对象", description = "乘坐交通工具特殊座席事前列表 视图数据对象") |
|||
public class AdSeatDetailVo implements Vo { |
|||
|
|||
private String sid; |
|||
|
|||
@ApiModelProperty("申请交通工具特殊座席") |
|||
private String specialSeat; |
|||
@ApiModelProperty("申请事由及详情") |
|||
private String cause; |
|||
@ApiModelProperty("预计费用") |
|||
private BigDecimal expectCost; |
|||
@ApiModelProperty("费用明细") |
|||
private String costRemarks; |
|||
} |
@ -0,0 +1,48 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adseatdetail; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
import java.math.BigDecimal; |
|||
|
|||
@Data |
|||
@ApiModel(value = "乘坐交通工具特殊座席事前列表 视图数据对象", description = "乘坐交通工具特殊座席事前列表 视图数据对象") |
|||
public class AdSeatListDetailVo implements Vo { |
|||
|
|||
private String sid; |
|||
|
|||
@ApiModelProperty("申请交通工具特殊座席") |
|||
private String specialSeat; |
|||
@ApiModelProperty("申请事由及详情") |
|||
private String cause; |
|||
@ApiModelProperty("预计费用") |
|||
private BigDecimal expectCost; |
|||
@ApiModelProperty("费用明细") |
|||
private String costRemarks; |
|||
} |
@ -0,0 +1,45 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adteamapply; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
@ApiModel(value = "团建申请", description = "团建申请") |
|||
@TableName("ad_team_apply") |
|||
public class AdTeamApply extends BaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@ApiModelProperty("基础表单sid") |
|||
private String formSid; // 基础表单sid
|
|||
@ApiModelProperty("关联审批sid列表,英文逗号分隔") |
|||
private String linkFormSids; // 关联审批sid列表,英文逗号分隔
|
|||
|
|||
} |
@ -0,0 +1,49 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adteamapply; |
|||
|
|||
import com.yxt.anrui.oa.biz.adteamdetail.AdTeamListDetailVo; |
|||
import com.yxt.anrui.oa.biz.oaform.OaFormCommonVo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
@Data |
|||
@ApiModel(value = "团建申请 视图数据详情", description = "团建申请 视图数据详情") |
|||
public class AdTeamApplyDetailsVo extends OaFormCommonVo { |
|||
|
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
|
|||
@ApiModelProperty("图片") |
|||
private List<String> files = new ArrayList<>(); |
|||
@ApiModelProperty("附件") |
|||
private List<String> appes = new ArrayList<>(); |
|||
|
|||
private List<AdTeamListDetailVo> list = new ArrayList<>(); |
|||
} |
@ -0,0 +1,52 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adteamapply; |
|||
|
|||
import com.yxt.anrui.oa.biz.adteamdetail.AdTeamDetailDto; |
|||
import com.yxt.anrui.oa.biz.oaform.OaFormDto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
@Data |
|||
@ApiModel(value = "团建申请 数据传输对象", description = "团建申请 数据传输对象") |
|||
public class AdTeamApplyDto extends OaFormDto { |
|||
|
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
@ApiModelProperty("基础表单sid") |
|||
private String formSid; |
|||
@ApiModelProperty("关联审批单") |
|||
private String linkFormSids; |
|||
@ApiModelProperty("图片") |
|||
private List<String> files = new ArrayList<>(); |
|||
@ApiModelProperty("文件") |
|||
private List<String> appes = new ArrayList<>(); |
|||
|
|||
private List<AdTeamDetailDto> list = new ArrayList<>(); |
|||
} |
@ -0,0 +1,35 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adteamapply; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
@Mapper |
|||
public interface AdTeamApplyMapper extends BaseMapper<AdTeamApply> { |
|||
|
|||
AdTeamApplyDetailsVo details(String sid); |
|||
} |
@ -0,0 +1,32 @@ |
|||
<?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.adteamapply.AdTeamApplyMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="details" resultMap="detailMap"> |
|||
select remarks, sid |
|||
from ad_team_apply |
|||
where sid = #{sid} |
|||
</select> |
|||
|
|||
<resultMap id="detailMap" type="com.yxt.anrui.oa.biz.adteamapply.AdTeamApplyDetailsVo"> |
|||
<result column="remarks" property="remarks"/> |
|||
<collection property="list" ofType="com.yxt.anrui.oa.biz.adteamdetail.AdTeamListDetailVo" |
|||
select="selectList" column="sid"> |
|||
</collection> |
|||
</resultMap> |
|||
|
|||
<select id="selectList" resultType="com.yxt.anrui.oa.biz.adteamdetail.AdTeamListDetailVo"> |
|||
select sid, |
|||
deptName as deptValue, |
|||
leagueConstructionDate, |
|||
leagueConstructionNum, |
|||
leagueConstructionStandard, |
|||
isUseCanteenValue, |
|||
isGetADrinkValue, |
|||
expectCost, |
|||
costRemarks |
|||
from ad_team_detail |
|||
where mainSid = #{sid} |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,310 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adteamapply; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.yxt.anrui.oa.biz.adteamdetail.AdTeamDetailDto; |
|||
import com.yxt.anrui.oa.biz.adteamdetail.AdTeamDetailService; |
|||
import com.yxt.anrui.oa.biz.adteamdetail.AdTeamDetailVo; |
|||
import com.yxt.anrui.oa.biz.oaappendix.OaAppendixService; |
|||
import com.yxt.anrui.oa.biz.oaform.*; |
|||
import com.yxt.anrui.oa.biz.oaform.flowable.*; |
|||
import com.yxt.anrui.oa.feign.file.OaFileEnum; |
|||
import com.yxt.anrui.oa.feign.flowable.flow.ProcDefEnum; |
|||
import com.yxt.anrui.oa.feign.portal.sysorganization.SysOrganizationFeign; |
|||
import com.yxt.anrui.oa.feign.portal.sysorganization.SysOrganizationVo; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import java.util.Collections; |
|||
import java.util.HashMap; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
@Service |
|||
public class AdTeamApplyService extends MybatisBaseService<AdTeamApplyMapper, AdTeamApply> { |
|||
@Autowired |
|||
private OaAppendixService oaAppendixService; |
|||
@Autowired |
|||
private OaFormService oaFormService; |
|||
@Autowired |
|||
private AdTeamDetailService adTeamDetailService; |
|||
@Autowired |
|||
private SysOrganizationFeign sysOrganizationFeign; |
|||
|
|||
public ResultBean<AdTeamApplyVo> getSaveInit(String userSid, String orgPath) { |
|||
ResultBean<AdTeamApplyVo> rb = ResultBean.fireFail(); |
|||
AdTeamApplyVo adTeamApplyVo = new AdTeamApplyVo(); |
|||
adTeamApplyVo.setCreateBySid(userSid); |
|||
adTeamApplyVo.setOrgSidPath(orgPath); |
|||
return rb.success().setData(adTeamApplyVo); |
|||
} |
|||
|
|||
public ResultBean<AdTeamApplyVo> getUpdateInit(String sid) { |
|||
ResultBean<AdTeamApplyVo> rb = ResultBean.fireFail(); |
|||
AdTeamApplyVo adTeamApplyVo = new AdTeamApplyVo(); |
|||
AdTeamApply adTeamApply = fetchBySid(sid); |
|||
if (adTeamApplyVo == null) { |
|||
return rb.setMsg("该申请不存在"); |
|||
} |
|||
// adExpatriatesApplyVo.setTestPage(adExpatriatesApply.getTestPage());
|
|||
OaForm oaForm = oaFormService.fetchBySid(sid); |
|||
adTeamApplyVo.setTaskId(oaForm.getTaskId()); |
|||
adTeamApplyVo.setProcInsId(oaForm.getProcInstId()); |
|||
//根据部门sid获取orgPath并赋值
|
|||
SysOrganizationVo organizationVo = sysOrganizationFeign.fetchBySid(oaForm.getDeptSid()).getData(); |
|||
String orgSidPath = organizationVo.getOrgSidPath(); |
|||
adTeamApplyVo.setOrgSidPath(orgSidPath); |
|||
adTeamApplyVo.setCreateBySid(oaForm.getCreateBySid()); |
|||
BeanUtil.copyProperties(adTeamApply, adTeamApplyVo); |
|||
List<AdTeamDetailVo> list = adTeamDetailService.getUpdateInit(sid); |
|||
list.removeAll(Collections.singleton(null)); |
|||
if (!list.isEmpty()) { |
|||
list.stream().forEach(details -> { |
|||
FormCommon deptObj = FormCommon.of(details.getDeptKey(), details.getDeptValue()); |
|||
details.setDeptObj(deptObj); |
|||
FormCommon isUseCanteenObj = FormCommon.of(details.getIsUseCanteenKey(), details.getIsUseCanteenValue()); |
|||
details.setIsUseCanteenObj(isUseCanteenObj); |
|||
FormCommon isGetADrinkObj = FormCommon.of(details.getIsGetADrinkKey(), details.getIsGetADrinkValue()); |
|||
details.setIsGetADrinkObj(isGetADrinkObj); |
|||
}); |
|||
} |
|||
List<String> files = oaAppendixService.selectByLinkSid(sid, "图片"); |
|||
adTeamApplyVo.setFiles(files); |
|||
List<String> appes = oaAppendixService.selectByLinkSid(sid, "文件"); |
|||
adTeamApplyVo.setAppes(appes); |
|||
adTeamApplyVo.setList(list); |
|||
adTeamApplyVo.setSid(sid); |
|||
return rb.success().setData(adTeamApplyVo); |
|||
} |
|||
|
|||
public ResultBean<String> saveOrUpdateDto(AdTeamApplyDto dto) { |
|||
ResultBean<String> rb = ResultBean.fireFail(); |
|||
String sid = dto.getSid(); |
|||
List<String> files = dto.getFiles(); |
|||
List<String> appes = dto.getAppes(); |
|||
List<AdTeamDetailDto> list = dto.getList(); |
|||
if (StringUtils.isBlank(sid)) { |
|||
// 新建操作
|
|||
AdTeamApply entity = new AdTeamApply(); |
|||
BeanUtil.copyProperties(dto, entity, "sid"); |
|||
|
|||
dto.setBillNo("TJSQ"); |
|||
dto.setSid(entity.getSid()); |
|||
ResultBean<String> resultBean = oaFormService.saveOaForm(dto); |
|||
|
|||
if (!resultBean.getSuccess()) { |
|||
return rb; |
|||
} |
|||
|
|||
entity.setFormSid(resultBean.getData()); |
|||
baseMapper.insert(entity); |
|||
sid = entity.getSid(); |
|||
} else { |
|||
// 更新操作
|
|||
AdTeamApply entity = fetchBySid(sid); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.updateById(entity); |
|||
} |
|||
adTeamDetailService.saveDetails(list, sid); |
|||
// 处理附件
|
|||
saveFiles(sid, files, OaFileEnum.ADTEAMAPPLY.getAttachType(), "图片"); |
|||
saveFiles(sid, appes, OaFileEnum.ADTEAMAPPLY.getAttachType(), "文件"); |
|||
return rb.success().setData(sid); |
|||
} |
|||
|
|||
// 保存文件
|
|||
private void saveFiles(String sid, List<String> files, String attachType, String fileType) { |
|||
files.removeAll(Collections.singleton(null)); |
|||
oaAppendixService.saveFile(sid, files, attachType, fileType); |
|||
} |
|||
|
|||
public ResultBean<AdTeamApplyDetailsVo> details(String sid, String application) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
AdTeamApplyDetailsVo adTeamApplyDetailsVo = baseMapper.details(sid); |
|||
if (adTeamApplyDetailsVo == null) { |
|||
return rb.setMsg("该申请不存在"); |
|||
} |
|||
List<String> files = oaAppendixService.selectByLinkSid(sid, "图片"); |
|||
List<String> appes = oaAppendixService.selectByLinkSid(sid, "文件"); |
|||
adTeamApplyDetailsVo.setFiles(files); |
|||
adTeamApplyDetailsVo.setAppes(appes); |
|||
//基础字段赋值
|
|||
BeanUtil.copyProperties(oaFormService.getDetails(sid), adTeamApplyDetailsVo); |
|||
return rb.success().setData(adTeamApplyDetailsVo); |
|||
} |
|||
|
|||
/** |
|||
* 提交 |
|||
* |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
public ResultBean submit(AdTeamApplyDto dto) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
ResultBean<String> stringResultBean = saveOrUpdateDto(dto); |
|||
if (!stringResultBean.getSuccess()) { |
|||
return rb.setMsg(stringResultBean.getData()); |
|||
} |
|||
String businessSid = stringResultBean.getData(); |
|||
|
|||
SubmitDto submitDto = new SubmitDto(); |
|||
submitDto.setUserSid(dto.getCreateBySid()); |
|||
submitDto.setBusinessSid(businessSid); |
|||
|
|||
Map<String, Object> formVariables = new HashMap<>(); |
|||
formVariables = getMap(formVariables, businessSid); |
|||
submitDto.setFormVariables(formVariables); |
|||
submitDto.setProcDefId(ProcDefEnum.HIHIREAPPLY.getProDefId()); |
|||
submitDto.setNextTaskId(dto.getTaskId()); |
|||
submitDto.setRule(OaFormRuleEnum.DIRECTLY_UNDER.getRule()); |
|||
return oaFormService.submit(submitDto); |
|||
} |
|||
|
|||
/** |
|||
* 办理(同意) |
|||
* |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
public ResultBean complete(CompleteDto dto) { |
|||
Map<String, Object> formVariables = dto.getFormVariables(); |
|||
formVariables = getMap(formVariables, dto.getBusinessSid()); |
|||
dto.setFormVariables(formVariables); |
|||
BusinessVariablesDto businessVariablesDto = new BusinessVariablesDto(); |
|||
BeanUtil.copyProperties(dto, businessVariablesDto); |
|||
return oaFormService.complete(businessVariablesDto); |
|||
} |
|||
|
|||
/** |
|||
* 驳回 |
|||
* |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
public ResultBean reject(TaskDto dto) { |
|||
Map<String, Object> formVariables = dto.getFormVariables(); |
|||
formVariables = getMap(formVariables, dto.getBusinessSid()); |
|||
dto.setFormVariables(formVariables); |
|||
return oaFormService.reject(dto); |
|||
} |
|||
|
|||
public ResultBean<String> getFlowOperateTitle(NodeQuery query) { |
|||
// 默认失败返回
|
|||
ResultBean<String> rb = ResultBean.fireFail(); |
|||
|
|||
// 获取next值和formVariables
|
|||
int next = query.getNext(); |
|||
|
|||
// 获取并更新formVariables
|
|||
Map<String, Object> formVariables = getMap(query.getFormVariables(), query.getBusinessSid()); |
|||
query.setFormVariables(formVariables); |
|||
|
|||
// 校验next参数是否有效(只允许0或1)
|
|||
if (next != 0 && next != 1) { |
|||
return rb.setMsg("参数错误:next"); // 如果next不是0或1,返回错误信息
|
|||
} |
|||
|
|||
// 获取节点名称
|
|||
String data = getNodeName(query, next); |
|||
|
|||
// 如果data为null,表示未获取到有效的节点信息
|
|||
if (data == null) { |
|||
return rb.setMsg("没有获取到节点信息"); // 返回错误消息
|
|||
} |
|||
|
|||
// 返回成功的结果和获取到的节点名称
|
|||
return rb.success().setData(data); |
|||
} |
|||
|
|||
/** |
|||
* 网关参数组成 |
|||
* |
|||
* @param formVariables |
|||
* @param sid |
|||
* @return |
|||
*/ |
|||
public Map<String, Object> getMap(Map<String, Object> formVariables, String sid) { |
|||
Map<String, Object> appMap = new HashMap<>(); |
|||
appMap.put("sid", sid); |
|||
/*appMap.put("editUrl", "approval/#/pages/EditOnboradingApplyActivity?sid=" + sid); |
|||
appMap.put("detailUrl", "approval/#/pages/DetailOnboradingApplyActivity?sid=" + sid); |
|||
appMap.put("flowOperateUrl", "oa/v1/HrHireApply/getFlowOperateTitle"); |
|||
appMap.put("agreeUrl", "oa/v1/HrHireApply/complete"); |
|||
appMap.put("stopUrl", "oa/v1/oaform/breakProcess"); |
|||
appMap.put("rejectUrl", "oa/v1/HrHireApply/reject"); |
|||
appMap.put("recallUrl", "oa/v1/oaform/revokeProcess"); |
|||
appMap.put("signUrl", "oa/v1/oaform/delegate"); |
|||
appMap.put("transferUrl", "oa/v1/oaform/assignTask");*/ |
|||
appMap.put(OaFormUrlEnum.HRHIREAPPLY_EDIT.getType(), OaFormUrlEnum.HRHIREAPPLY_EDIT.getUrl() + "?sid=" + sid); |
|||
appMap.put(OaFormUrlEnum.HRHIREAPPLY_DETAIL.getType(), OaFormUrlEnum.HRHIREAPPLY_DETAIL.getUrl() + "?sid=" + sid); |
|||
appMap.put(OaFormUrlEnum.HRHIREAPPLY_FLOWOPERATEURL.getType(), OaFormUrlEnum.HRHIREAPPLY_FLOWOPERATEURL.getUrl()); |
|||
appMap.put(OaFormUrlEnum.HRHIREAPPLY_AGREEURL.getType(), OaFormUrlEnum.HRHIREAPPLY_AGREEURL.getUrl()); |
|||
appMap.put(OaFormUrlEnum.STOPURL.getType(), OaFormUrlEnum.STOPURL.getUrl()); |
|||
appMap.put(OaFormUrlEnum.HRHIREAPPLY_REJECTURL.getType(), OaFormUrlEnum.HRHIREAPPLY_REJECTURL.getUrl()); |
|||
appMap.put(OaFormUrlEnum.RECALLURL.getType(), OaFormUrlEnum.RECALLURL.getUrl()); |
|||
appMap.put(OaFormUrlEnum.SIGNURL.getType(), OaFormUrlEnum.SIGNURL.getUrl()); |
|||
appMap.put(OaFormUrlEnum.TRANSFERURL.getType(), OaFormUrlEnum.TRANSFERURL.getUrl()); |
|||
formVariables.put("app", appMap); |
|||
//根据组织查询是否是分公司
|
|||
OaForm oaForm = oaFormService.fetchBySid(sid); |
|||
AdTeamApply adTeamApply = fetchBySid(sid); |
|||
SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(oaForm.getUseOrgSid()).getData(); |
|||
//是否是分公司
|
|||
formVariables.put("isTrue", sysOrganization.getIsDept() == 0); |
|||
return formVariables; |
|||
} |
|||
|
|||
/** |
|||
* 根据next的值获取前一个节点或下一个节点的名称。 |
|||
* |
|||
* @param query 包含查询所需参数的NodeQuery对象 |
|||
* @param next 参数,0表示上一环节,1表示下一环节 |
|||
* @return 节点名称,如果失败则返回null |
|||
*/ |
|||
private String getNodeName(NodeQuery query, int next) { |
|||
// 根据next值选择相应的服务方法获取节点信息
|
|||
ResultBean<List<NodeVo>> resultBean = (next == 0) |
|||
? oaFormService.getPreviousNodesForReject(query) // 获取上一环节的节点
|
|||
: oaFormService.getNextNodesForSubmit(query); // 获取下一环节的节点
|
|||
// 如果服务调用成功
|
|||
if (resultBean.getSuccess()) { |
|||
// 清除结果列表中的null值,避免空节点
|
|||
resultBean.getData().removeAll(Collections.singleton(null)); |
|||
// 如果结果列表非空,返回第一个节点的名称
|
|||
if (!resultBean.getData().isEmpty()) { |
|||
return resultBean.getData().get(0).getName(); |
|||
} |
|||
} else { |
|||
// 如果服务调用失败,返回null
|
|||
return null; |
|||
} |
|||
// 如果结果为空,返回null
|
|||
return null; |
|||
} |
|||
} |
@ -0,0 +1,60 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adteamapply; |
|||
|
|||
import com.yxt.anrui.oa.biz.adteamdetail.AdTeamDetailVo; |
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
@Data |
|||
@ApiModel(value = "团建申请 视图数据对象", description = "团建申请 视图数据对象") |
|||
public class AdTeamApplyVo implements Vo { |
|||
|
|||
private String sid; |
|||
/* private String userSid; |
|||
private String orgPath;*/ |
|||
private String orgSidPath; |
|||
private String createBySid; |
|||
|
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
@ApiModelProperty("图片") |
|||
private List<String> files = new ArrayList<>(); |
|||
@ApiModelProperty("附件") |
|||
private List<String> appes = new ArrayList<>(); |
|||
|
|||
private List<AdTeamDetailVo> list = new ArrayList<>(); |
|||
|
|||
private String taskId; |
|||
@ApiModelProperty("流程实例id") |
|||
private String procInsId; |
|||
|
|||
// private String testPage;
|
|||
} |
@ -0,0 +1,66 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adteamdetail; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
import java.math.BigDecimal; |
|||
|
|||
@Data |
|||
@ApiModel(value = "团建列表", description = "团建列表") |
|||
@TableName("ad_team_detail") |
|||
public class AdTeamDetail extends BaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@ApiModelProperty("申请sid") |
|||
private String mainSid; // 申请sid
|
|||
@ApiModelProperty("部门sid") |
|||
private String deptSid; // 部门sid
|
|||
@ApiModelProperty("部门名称") |
|||
private String deptName; // 部门名称
|
|||
@ApiModelProperty("团建时间") |
|||
private String leagueConstructionDate; // 团建时间
|
|||
@ApiModelProperty("团建人数") |
|||
private String leagueConstructionNum; // 团建人数
|
|||
@ApiModelProperty("团建标准") |
|||
private String leagueConstructionStandard; // 团建标准
|
|||
@ApiModelProperty("是否使用食堂key") |
|||
private String isUseCanteenKey; // 是否使用食堂key
|
|||
@ApiModelProperty("是否使用食堂value") |
|||
private String isUseCanteenValue; // 是否使用食堂value
|
|||
@ApiModelProperty("是否领酒水key") |
|||
private String isGetADrinkKey; // 是否领酒水key
|
|||
@ApiModelProperty("是否领酒水value") |
|||
private String isGetADrinkValue; // 是否领酒水value
|
|||
@ApiModelProperty("预计费用") |
|||
private BigDecimal expectCost; // 预计费用
|
|||
@ApiModelProperty("费用明细") |
|||
private String costRemarks; // 费用明细
|
|||
|
|||
} |
@ -0,0 +1,62 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adteamdetail; |
|||
|
|||
import com.yxt.anrui.oa.biz.oaform.FormCommon; |
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
import java.math.BigDecimal; |
|||
|
|||
@Data |
|||
@ApiModel(value = "团建列表 数据传输对象", description = "团建列表 数据传输对象") |
|||
public class AdTeamDetailDto implements Dto { |
|||
|
|||
@ApiModelProperty("部门") |
|||
private FormCommon deptObj; |
|||
private String deptKey; |
|||
private String deptValue; |
|||
@ApiModelProperty("团建时间") |
|||
private String leagueConstructionDate; |
|||
@ApiModelProperty("团建人数") |
|||
private String leagueConstructionNum; |
|||
@ApiModelProperty("团建标准") |
|||
private String leagueConstructionStandard; |
|||
@ApiModelProperty("是否使用食堂") |
|||
private FormCommon isUseCanteenObj; |
|||
private String isUseCanteenKey; |
|||
private String isUseCanteenValue; |
|||
@ApiModelProperty("是否领酒水") |
|||
private FormCommon isGetADrinkObj; |
|||
private String isGetADrinkKey; |
|||
private String isGetADrinkValue; |
|||
@ApiModelProperty("预计费用") |
|||
private BigDecimal expectCost; |
|||
@ApiModelProperty("费用明细") |
|||
private String costRemarks; |
|||
|
|||
} |
@ -0,0 +1,40 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adteamdetail; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Select; |
|||
import java.util.List; |
|||
|
|||
@Mapper |
|||
public interface AdTeamDetailMapper extends BaseMapper<AdTeamDetail> { |
|||
|
|||
List<AdTeamDetailVo> getUpdateInit(String sid); |
|||
|
|||
@Select("select * from ad_team_detail where mainSid = #{mainSid}") |
|||
List<AdTeamDetail> selectByMainSid(String mainSid); |
|||
} |
@ -0,0 +1,22 @@ |
|||
<?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.adteamdetail.AdTeamDetailMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="getUpdateInit" resultType="com.yxt.anrui.oa.biz.adteamdetail.AdTeamDetailVo"> |
|||
select sid, |
|||
deptSid as deptKey, |
|||
deptName as deptValue, |
|||
leagueConstructionDate, |
|||
leagueConstructionNum, |
|||
leagueConstructionStandard, |
|||
isUseCanteenKey, |
|||
isUseCanteenValue, |
|||
isGetADrinkKey, |
|||
isGetADrinkValue, |
|||
expectCost, |
|||
costRemarks |
|||
from ad_team_detail |
|||
where mainSid = #{sid} |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,62 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adteamdetail; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import org.springframework.stereotype.Service; |
|||
import java.util.Collections; |
|||
import java.util.List; |
|||
|
|||
@Service |
|||
public class AdTeamDetailService extends MybatisBaseService<AdTeamDetailMapper, AdTeamDetail> { |
|||
|
|||
public void saveDetails(List<AdTeamDetailDto> list, String sid) { |
|||
//根据sid查询明细并删除
|
|||
List<AdTeamDetail> list2 = baseMapper.selectByMainSid(sid); |
|||
list2.removeAll(Collections.singleton(null)); |
|||
if (!list2.isEmpty()) { |
|||
list2.stream().forEach(v -> { |
|||
deleteBySid(v.getSid()); |
|||
}); |
|||
} |
|||
list.removeAll(Collections.singleton(null)); |
|||
if (!list.isEmpty()) { |
|||
list.stream().forEach(details -> { |
|||
AdTeamDetail adTeamDetail = new AdTeamDetail(); |
|||
BeanUtil.copyProperties(details, adTeamDetail); |
|||
adTeamDetail.setDeptSid(details.getDeptKey()); |
|||
adTeamDetail.setDeptName(details.getDeptValue()); |
|||
adTeamDetail.setMainSid(sid); |
|||
baseMapper.insert(adTeamDetail); |
|||
}); |
|||
} |
|||
} |
|||
|
|||
public List<AdTeamDetailVo> getUpdateInit(String sid) { |
|||
return baseMapper.getUpdateInit(sid); |
|||
} |
|||
} |
@ -0,0 +1,64 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adteamdetail; |
|||
|
|||
import com.yxt.anrui.oa.biz.oaform.FormCommon; |
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
import java.math.BigDecimal; |
|||
|
|||
@Data |
|||
@ApiModel(value = "团建列表 视图数据对象", description = "团建列表 视图数据对象") |
|||
public class AdTeamDetailVo implements Vo { |
|||
|
|||
private String sid; |
|||
|
|||
@ApiModelProperty("部门") |
|||
private FormCommon deptObj; |
|||
private String deptKey; |
|||
private String deptValue; |
|||
@ApiModelProperty("团建时间") |
|||
private String leagueConstructionDate; |
|||
@ApiModelProperty("团建人数") |
|||
private String leagueConstructionNum; |
|||
@ApiModelProperty("团建标准") |
|||
private String leagueConstructionStandard; |
|||
@ApiModelProperty("是否使用食堂") |
|||
private FormCommon isUseCanteenObj; |
|||
private String isUseCanteenKey; |
|||
private String isUseCanteenValue; |
|||
@ApiModelProperty("是否领酒水") |
|||
private FormCommon isGetADrinkObj; |
|||
private String isGetADrinkKey; |
|||
private String isGetADrinkValue; |
|||
@ApiModelProperty("预计费用") |
|||
private BigDecimal expectCost; |
|||
@ApiModelProperty("费用明细") |
|||
private String costRemarks; |
|||
|
|||
} |
@ -0,0 +1,57 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adteamdetail; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
import java.math.BigDecimal; |
|||
|
|||
@Data |
|||
@ApiModel(value = "团建列表 视图数据对象", description = "团建列表 视图数据对象") |
|||
public class AdTeamListDetailVo implements Vo { |
|||
|
|||
private String sid; |
|||
|
|||
@ApiModelProperty("部门") |
|||
private String deptValue; |
|||
@ApiModelProperty("团建时间") |
|||
private String leagueConstructionDate; |
|||
@ApiModelProperty("团建人数") |
|||
private String leagueConstructionNum; |
|||
@ApiModelProperty("团建标准") |
|||
private String leagueConstructionStandard; |
|||
@ApiModelProperty("是否使用食堂") |
|||
private String isUseCanteenValue; |
|||
@ApiModelProperty("是否领酒水") |
|||
private String isGetADrinkValue; |
|||
@ApiModelProperty("预计费用") |
|||
private BigDecimal expectCost; |
|||
@ApiModelProperty("费用明细") |
|||
private String costRemarks; |
|||
|
|||
} |
Loading…
Reference in new issue