
45 changed files with 2755 additions and 1571 deletions
File diff suppressed because it is too large
@ -1,18 +1,23 @@ |
|||||
<?xml version="1.0" encoding="UTF-8" ?> |
<?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"> |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="com.yxt.anrui.as.biz.astechtitle.AsTechTitleMapper"> |
<mapper namespace="com.yxt.anrui.as.biz.astechtitle.AsTechTitleMapper"> |
||||
<!-- <where> ${ew.sqlSegment} </where>--> |
<!-- <where> ${ew.sqlSegment} </where>--> |
||||
<!-- ${ew.customSqlSegment} --> |
<!-- ${ew.customSqlSegment} --> |
||||
<select id="selectPageVo" resultType="com.yxt.anrui.as.api.astechtitle.AsTechTitleVo"> |
<select id="selectPageVo" resultType="com.yxt.anrui.as.api.astechtitle.AsTechTitleVo"> |
||||
SELECT |
SELECT |
||||
att.*, |
att.* |
||||
attd.techName |
FROM |
||||
FROM |
as_tech_title att |
||||
as_tech_title att |
LEFT JOIN anrui_portal.sys_organization AS s |
||||
LEFT JOIN anrui_portal.sys_organization AS s |
ON att.useOrgSid = s.sid |
||||
ON att.useOrgSid = s.sid |
<where> |
||||
LEFT JOIN as_tech_title_detail attd |
${ew.sqlSegment} |
||||
ON att.sid = attd.titleSid |
</where> |
||||
<where> ${ew.sqlSegment} </where> |
</select> |
||||
</select> |
|
||||
|
<select id="selLikeTechSid" resultType="com.yxt.anrui.as.api.astechtitle.AsTechTitle"> |
||||
|
SELECT * |
||||
|
FROM as_tech_title |
||||
|
WHERE techSid LIKE CONCAT('%', #{techSid}, '%') |
||||
|
</select> |
||||
</mapper> |
</mapper> |
File diff suppressed because it is too large
@ -0,0 +1,105 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.oa.api; |
||||
|
|
||||
|
import com.yxt.anrui.oa.biz.adexpatriatesapply.AdExpatriatesApplyDto; |
||||
|
import com.yxt.anrui.oa.biz.adleasehostapply.*; |
||||
|
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/adleasehostapply") |
||||
|
public class AdLeasehostApplyRest { |
||||
|
|
||||
|
@Autowired |
||||
|
private AdLeasehostApplyService adLeasehostApplyService; |
||||
|
|
||||
|
@ApiOperation("初始化(新增或修改)") |
||||
|
@GetMapping({"/getInit", "/getInit/{sid}"}) |
||||
|
public ResultBean<AdLeasehostApplyVo> getInit( |
||||
|
@PathVariable(value = "sid", required = false) String sid, |
||||
|
@RequestParam(value = "userSid", required = false) String userSid, |
||||
|
@RequestParam(value = "orgPath", required = false) String orgPath) { |
||||
|
ResultBean<AdLeasehostApplyVo> rb = ResultBean.fireFail(); |
||||
|
if (sid == null || sid.isEmpty()) { |
||||
|
// 执行新增初始化
|
||||
|
if (userSid == null || orgPath == null) { |
||||
|
return rb.setMsg("userSid和orgPath不能为空"); |
||||
|
} |
||||
|
return adLeasehostApplyService.getSaveInit(userSid, orgPath); |
||||
|
} else { |
||||
|
// 执行修改初始化
|
||||
|
return adLeasehostApplyService.getUpdateInit(sid); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("新增或修改") |
||||
|
@PostMapping("/save") |
||||
|
public ResultBean save(@RequestBody AdLeasehostApplyDto dto) { |
||||
|
return adLeasehostApplyService.saveOrUpdateDto(dto); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("详情") |
||||
|
@GetMapping("/details/{sid}") |
||||
|
ResultBean<AdLeasehostApplyDetailsVo> details(@PathVariable("sid") String sid |
||||
|
, @RequestParam(value = "application", required = false) String application) { |
||||
|
return adLeasehostApplyService.details(sid,application); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("提交审批流程") |
||||
|
@PostMapping("/submit") |
||||
|
public ResultBean submit(@RequestBody AdLeasehostApplyDto dto) { |
||||
|
return adLeasehostApplyService.submit(dto); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "办理(同意)") |
||||
|
@PutMapping("/complete") |
||||
|
public ResultBean complete(@Valid @RequestBody CompleteDto dto) { |
||||
|
return adLeasehostApplyService.complete(dto); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "驳回任务") |
||||
|
@PutMapping(value = "/reject") |
||||
|
public ResultBean reject(@Valid @RequestBody TaskDto dto) { |
||||
|
return adLeasehostApplyService.reject(dto); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("获取流程操作标题") |
||||
|
@GetMapping("/getFlowOperateTitle") |
||||
|
@ResponseBody |
||||
|
ResultBean<String> getFlowOperateTitle(@SpringQueryMap NodeQuery query) { |
||||
|
return adLeasehostApplyService.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/adleasehostdetail") |
||||
|
public class AdLeasehostDetailRest { |
||||
|
|
||||
|
} |
@ -0,0 +1,58 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.oa.biz.adleasehostapply; |
||||
|
|
||||
|
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; |
||||
|
|
||||
|
/** |
||||
|
* Project: yxt-oa(宿舍租赁) <br/> |
||||
|
* File: AdLeasehostApply.java <br/> |
||||
|
* Class: com.yxt.anrui.oa.api.adleasehostapply.AdLeasehostApply <br/> |
||||
|
* Description: 宿舍租赁申请. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2025-02-17 14:11:50 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "宿舍租赁申请", description = "宿舍租赁申请") |
||||
|
@TableName("ad_leasehost_apply") |
||||
|
public class AdLeasehostApply extends BaseEntity { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@ApiModelProperty("基础表单sid") |
||||
|
private String formSid; // 基础表单sid
|
||||
|
@ApiModelProperty("关联审批sid列表,英文逗号分隔") |
||||
|
private String linkFormSids; // 关联审批sid列表,英文逗号分隔
|
||||
|
|
||||
|
} |
@ -0,0 +1,65 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.oa.biz.adleasehostapply; |
||||
|
|
||||
|
|
||||
|
import com.yxt.anrui.oa.biz.adexpatriatesdetail.AdExpatriatesListDetailVo; |
||||
|
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; |
||||
|
|
||||
|
/** |
||||
|
* Project: yxt-oa(宿舍租赁) <br/> |
||||
|
* File: AdLeasehostApplyVo.java <br/> |
||||
|
* Class: com.yxt.anrui.oa.api.adleasehostapply.AdLeasehostApplyVo <br/> |
||||
|
* Description: 宿舍租赁申请 视图数据对象. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2025-02-17 14:11:50 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "宿舍租赁申请 视图数据详情", description = "宿舍租赁申请 视图数据详情") |
||||
|
public class AdLeasehostApplyDetailsVo implements Vo { |
||||
|
|
||||
|
@ApiModelProperty("备注") |
||||
|
private String remarks; |
||||
|
|
||||
|
@ApiModelProperty("图片") |
||||
|
private List<String> files = new ArrayList<>(); |
||||
|
@ApiModelProperty("附件") |
||||
|
private List<String> appes = new ArrayList<>(); |
||||
|
|
||||
|
private List<AdExpatriatesListDetailVo> list = new ArrayList<>(); |
||||
|
} |
@ -0,0 +1,54 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.oa.biz.adleasehostapply; |
||||
|
|
||||
|
import com.yxt.anrui.oa.biz.adleasehostdetail.AdLeasehostDetailDto; |
||||
|
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 AdLeasehostApplyDto 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<AdLeasehostDetailDto> list = new ArrayList<>(); |
||||
|
} |
@ -0,0 +1,35 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.oa.biz.adleasehostapply; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
@Mapper |
||||
|
public interface AdLeasehostApplyMapper extends BaseMapper<AdLeasehostApply> { |
||||
|
|
||||
|
AdLeasehostApplyDetailsVo details(String sid); |
||||
|
} |
@ -0,0 +1,9 @@ |
|||||
|
<?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.adleasehostapply.AdLeasehostApplyMapper"> |
||||
|
<!-- <where> ${ew.sqlSegment} </where>--> |
||||
|
<!-- ${ew.customSqlSegment} --> |
||||
|
<select id="details" resultType="com.yxt.anrui.oa.biz.adleasehostapply.AdLeasehostApplyDetailsVo"> |
||||
|
|
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,307 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.oa.biz.adleasehostapply; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import com.yxt.anrui.oa.biz.adleasehostdetail.AdLeasehostDetailDto; |
||||
|
import com.yxt.anrui.oa.biz.adleasehostdetail.AdLeasehostDetailService; |
||||
|
import com.yxt.anrui.oa.biz.adleasehostdetail.AdLeasehostDetailVo; |
||||
|
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 AdLeasehostApplyService extends MybatisBaseService<AdLeasehostApplyMapper, AdLeasehostApply> { |
||||
|
|
||||
|
@Autowired |
||||
|
private OaAppendixService oaAppendixService; |
||||
|
@Autowired |
||||
|
private OaFormService oaFormService; |
||||
|
@Autowired |
||||
|
private AdLeasehostDetailService adLeasehostDetailService; |
||||
|
@Autowired |
||||
|
private SysOrganizationFeign sysOrganizationFeign; |
||||
|
|
||||
|
public ResultBean<AdLeasehostApplyVo> getSaveInit(String userSid, String orgPath) { |
||||
|
ResultBean<AdLeasehostApplyVo> rb = ResultBean.fireFail(); |
||||
|
AdLeasehostApplyVo adLeasehostApplyVo = new AdLeasehostApplyVo(); |
||||
|
adLeasehostApplyVo.setCreateBySid(userSid); |
||||
|
adLeasehostApplyVo.setOrgSidPath(orgPath); |
||||
|
return rb.success().setData(adLeasehostApplyVo); |
||||
|
} |
||||
|
|
||||
|
public ResultBean<AdLeasehostApplyVo> getUpdateInit(String sid) { |
||||
|
ResultBean<AdLeasehostApplyVo> rb = ResultBean.fireFail(); |
||||
|
AdLeasehostApplyVo adLeasehostApplyVo = new AdLeasehostApplyVo(); |
||||
|
AdLeasehostApply adLeasehostApply = fetchBySid(sid); |
||||
|
if (adLeasehostApply == null) { |
||||
|
return rb.setMsg("该申请不存在"); |
||||
|
} |
||||
|
// adExpatriatesApplyVo.setTestPage(adExpatriatesApply.getTestPage());
|
||||
|
OaForm oaForm = oaFormService.fetchBySid(sid); |
||||
|
adLeasehostApplyVo.setTaskId(oaForm.getTaskId()); |
||||
|
adLeasehostApplyVo.setProcInsId(oaForm.getProcInstId()); |
||||
|
//根据部门sid获取orgPath并赋值
|
||||
|
SysOrganizationVo organizationVo = sysOrganizationFeign.fetchBySid(oaForm.getDeptSid()).getData(); |
||||
|
String orgSidPath = organizationVo.getOrgSidPath(); |
||||
|
adLeasehostApplyVo.setOrgSidPath(orgSidPath); |
||||
|
adLeasehostApplyVo.setCreateBySid(oaForm.getCreateBySid()); |
||||
|
BeanUtil.copyProperties(adLeasehostApply, adLeasehostApplyVo); |
||||
|
List<AdLeasehostDetailVo> list = adLeasehostDetailService.getUpdateInit(sid); |
||||
|
list.removeAll(Collections.singleton(null)); |
||||
|
if (!list.isEmpty()) { |
||||
|
list.stream().forEach(details -> { |
||||
|
FormCommon housingTypeObj = FormCommon.of(details.getHousingTypeKey(), details.getHousingTypeValue()); |
||||
|
details.setHousingTypeObj(housingTypeObj); |
||||
|
}); |
||||
|
} |
||||
|
List<String> files = oaAppendixService.selectByLinkSid(sid, "图片"); |
||||
|
adLeasehostApplyVo.setFiles(files); |
||||
|
List<String> appes = oaAppendixService.selectByLinkSid(sid, "文件"); |
||||
|
adLeasehostApplyVo.setAppes(appes); |
||||
|
adLeasehostApplyVo.setList(list); |
||||
|
adLeasehostApplyVo.setSid(sid); |
||||
|
return rb.success().setData(adLeasehostApplyVo); |
||||
|
} |
||||
|
|
||||
|
public ResultBean<String> saveOrUpdateDto(AdLeasehostApplyDto dto) { |
||||
|
ResultBean<String> rb = ResultBean.fireFail(); |
||||
|
String sid = dto.getSid(); |
||||
|
List<String> files = dto.getFiles(); |
||||
|
List<String> appes = dto.getAppes(); |
||||
|
List<AdLeasehostDetailDto> list = dto.getList(); |
||||
|
if (StringUtils.isBlank(sid)) { |
||||
|
// 新建操作
|
||||
|
AdLeasehostApply entity = new AdLeasehostApply(); |
||||
|
BeanUtil.copyProperties(dto, entity, "sid"); |
||||
|
|
||||
|
dto.setBillNo("SSZLSQ"); |
||||
|
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 { |
||||
|
// 更新操作
|
||||
|
AdLeasehostApply entity = fetchBySid(sid); |
||||
|
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
||||
|
baseMapper.updateById(entity); |
||||
|
} |
||||
|
adLeasehostDetailService.saveDetails(list, sid); |
||||
|
// 处理附件
|
||||
|
saveFiles(sid, files, OaFileEnum.ADEXPATRIATESAPPLY.getAttachType(), "图片"); |
||||
|
saveFiles(sid, appes, OaFileEnum.ADEXPATRIATESAPPLY.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<AdLeasehostApplyDetailsVo> details(String sid, String application) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
AdLeasehostApplyDetailsVo adLeasehostApplyDetailsVo = baseMapper.details(sid); |
||||
|
if (adLeasehostApplyDetailsVo == null) { |
||||
|
return rb.setMsg("该申请不存在"); |
||||
|
} |
||||
|
List<String> files = oaAppendixService.selectByLinkSid(sid, "图片"); |
||||
|
List<String> appes = oaAppendixService.selectByLinkSid(sid, "文件"); |
||||
|
adLeasehostApplyDetailsVo.setFiles(files); |
||||
|
adLeasehostApplyDetailsVo.setAppes(appes); |
||||
|
//基础字段赋值
|
||||
|
BeanUtil.copyProperties(oaFormService.getDetails(sid), adLeasehostApplyDetailsVo); |
||||
|
return rb.success().setData(adLeasehostApplyDetailsVo); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 提交 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return |
||||
|
*/ |
||||
|
public ResultBean submit(AdLeasehostApplyDto 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); |
||||
|
AdLeasehostApply adLeasehostApply = 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,77 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.oa.biz.adleasehostapply; |
||||
|
|
||||
|
|
||||
|
import com.yxt.anrui.oa.biz.adexpatriatesdetail.AdExpatriatesDetailVo; |
||||
|
import com.yxt.anrui.oa.biz.adleasehostdetail.AdLeasehostDetailVo; |
||||
|
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; |
||||
|
|
||||
|
/** |
||||
|
* Project: yxt-oa(宿舍租赁) <br/> |
||||
|
* File: AdLeasehostApplyVo.java <br/> |
||||
|
* Class: com.yxt.anrui.oa.api.adleasehostapply.AdLeasehostApplyVo <br/> |
||||
|
* Description: 宿舍租赁申请 视图数据对象. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2025-02-17 14:11:50 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "宿舍租赁申请 视图数据对象", description = "宿舍租赁申请 视图数据对象") |
||||
|
public class AdLeasehostApplyVo 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<AdLeasehostDetailVo> list = new ArrayList<>(); |
||||
|
|
||||
|
private String taskId; |
||||
|
@ApiModelProperty("流程实例id") |
||||
|
private String procInsId; |
||||
|
|
||||
|
// private String testPage;
|
||||
|
} |
@ -0,0 +1,72 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.oa.biz.adleasehostdetail; |
||||
|
|
||||
|
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; |
||||
|
|
||||
|
/** |
||||
|
* Project: yxt-oa(宿舍租赁) <br/> |
||||
|
* File: AdLeasehostDetail.java <br/> |
||||
|
* Class: com.yxt.anrui.oa.api.adleasehostdetail.AdLeasehostDetail <br/> |
||||
|
* Description: 宿舍租赁列表. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2025-02-17 14:11:50 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "宿舍租赁列表", description = "宿舍租赁列表") |
||||
|
@TableName("ad_leasehost_detail") |
||||
|
public class AdLeasehostDetail extends BaseEntity { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@ApiModelProperty("申请sid") |
||||
|
private String mainSid; // 申请sid
|
||||
|
@ApiModelProperty("经办人") |
||||
|
private String operator; // 经办人
|
||||
|
@ApiModelProperty("宿舍使用人") |
||||
|
private String dormitoryUser; // 宿舍使用人
|
||||
|
@ApiModelProperty("房屋类型key") |
||||
|
private String housingTypeKey; // 房屋类型key
|
||||
|
@ApiModelProperty("房屋类型value") |
||||
|
private String housingTypeValue; // 房屋类型value
|
||||
|
@ApiModelProperty("房屋基本信息") |
||||
|
private String basicHousingInformation; // 房屋基本信息
|
||||
|
@ApiModelProperty("租房预计费用") |
||||
|
private BigDecimal estimatedRentalCost; // 租房预计费用
|
||||
|
@ApiModelProperty("租赁期限及租房押金、支付方式") |
||||
|
private String leaseTermAndDeposit; // 租赁期限及租房押金、支付方式
|
||||
|
|
||||
|
} |
@ -0,0 +1,56 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.oa.biz.adleasehostdetail; |
||||
|
|
||||
|
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 AdLeasehostDetailDto implements Dto { |
||||
|
|
||||
|
@ApiModelProperty("经办人") |
||||
|
private String operator; |
||||
|
@ApiModelProperty("宿舍使用人") |
||||
|
private String dormitoryUser; |
||||
|
@ApiModelProperty("房屋类型") |
||||
|
private FormCommon housingTypeObj; |
||||
|
private String housingTypeKey; |
||||
|
private String housingTypeValue; |
||||
|
@ApiModelProperty("房屋基本信息") |
||||
|
private String basicHousingInformation; |
||||
|
@ApiModelProperty("租房预计费用") |
||||
|
private BigDecimal estimatedRentalCost; |
||||
|
@ApiModelProperty("租赁期限及租房押金、支付方式") |
||||
|
private String leaseTermAndDeposit; |
||||
|
|
||||
|
} |
@ -0,0 +1,41 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.oa.biz.adleasehostdetail; |
||||
|
|
||||
|
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 AdLeasehostDetailMapper extends BaseMapper<AdLeasehostDetail> { |
||||
|
|
||||
|
List<AdLeasehostDetailVo> getUpdateInit(String sid); |
||||
|
|
||||
|
@Select("select * from ad_leasehost_detail where mainSid = #{mainSid}") |
||||
|
List<AdLeasehostDetail> selectByMainSid(String mainSid); |
||||
|
} |
@ -0,0 +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.adleasehostdetail.AdLeasehostDetailMapper"> |
||||
|
<!-- <where> ${ew.sqlSegment} </where>--> |
||||
|
<!-- ${ew.customSqlSegment} --> |
||||
|
<select id="getUpdateInit" resultType="com.yxt.anrui.oa.biz.adleasehostdetail.AdLeasehostDetailVo"> |
||||
|
select sid, |
||||
|
operator, |
||||
|
dormitoryUser, |
||||
|
housingTypeKey, |
||||
|
housingTypeValue, |
||||
|
basicHousingInformation, |
||||
|
estimatedRentalCost, |
||||
|
leaseTermAndDeposit |
||||
|
from ad_leasehost_detail |
||||
|
where mainSid = #{sid} |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,64 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.oa.biz.adleasehostdetail; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import com.yxt.anrui.oa.biz.adexpatriatesdetail.AdExpatriatesDetail; |
||||
|
import com.yxt.anrui.oa.biz.adexpatriatesdetail.AdExpatriatesDetailDto; |
||||
|
import com.yxt.anrui.oa.biz.adexpatriatesdetail.AdExpatriatesDetailVo; |
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.Collections; |
||||
|
import java.util.List; |
||||
|
|
||||
|
@Service |
||||
|
public class AdLeasehostDetailService extends MybatisBaseService<AdLeasehostDetailMapper, AdLeasehostDetail> { |
||||
|
|
||||
|
public void saveDetails(List<AdLeasehostDetailDto> list, String sid) { |
||||
|
//根据sid查询明细并删除
|
||||
|
List<AdLeasehostDetail> 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 -> { |
||||
|
AdLeasehostDetail adLeasehostDetail = new AdLeasehostDetail(); |
||||
|
BeanUtil.copyProperties(details, adLeasehostDetail); |
||||
|
adLeasehostDetail.setMainSid(sid); |
||||
|
baseMapper.insert(adLeasehostDetail); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public List<AdLeasehostDetailVo> getUpdateInit(String sid) { |
||||
|
return baseMapper.getUpdateInit(sid); |
||||
|
} |
||||
|
} |
@ -0,0 +1,72 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.oa.biz.adleasehostdetail; |
||||
|
|
||||
|
|
||||
|
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; |
||||
|
|
||||
|
/** |
||||
|
* Project: yxt-oa(宿舍租赁) <br/> |
||||
|
* File: AdLeasehostDetailVo.java <br/> |
||||
|
* Class: com.yxt.anrui.oa.api.adleasehostdetail.AdLeasehostDetailVo <br/> |
||||
|
* Description: 宿舍租赁列表 视图数据对象. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2025-02-17 14:11:50 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "宿舍租赁列表 视图数据对象", description = "宿舍租赁列表 视图数据对象") |
||||
|
public class AdLeasehostDetailVo implements Vo { |
||||
|
|
||||
|
private String sid; |
||||
|
|
||||
|
@ApiModelProperty("经办人") |
||||
|
private String operator; |
||||
|
@ApiModelProperty("宿舍使用人") |
||||
|
private String dormitoryUser; |
||||
|
@ApiModelProperty("房屋类型") |
||||
|
private FormCommon housingTypeObj; |
||||
|
private String housingTypeKey; |
||||
|
private String housingTypeValue; |
||||
|
@ApiModelProperty("房屋基本信息") |
||||
|
private String basicHousingInformation; |
||||
|
@ApiModelProperty("租房预计费用") |
||||
|
private BigDecimal estimatedRentalCost; |
||||
|
@ApiModelProperty("租赁期限及租房押金、支付方式") |
||||
|
private String leaseTermAndDeposit; |
||||
|
|
||||
|
} |
@ -0,0 +1,52 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.oa.biz.adleasehostdetail; |
||||
|
|
||||
|
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 AdLeasehostListDetailVo implements Vo { |
||||
|
|
||||
|
private String sid; |
||||
|
|
||||
|
@ApiModelProperty("经办人") |
||||
|
private String operator; |
||||
|
@ApiModelProperty("宿舍使用人") |
||||
|
private String dormitoryUser; |
||||
|
@ApiModelProperty("房屋类型") |
||||
|
private String housingTypeValue; |
||||
|
@ApiModelProperty("房屋基本信息") |
||||
|
private String basicHousingInformation; |
||||
|
@ApiModelProperty("租房预计费用") |
||||
|
private BigDecimal estimatedRentalCost; |
||||
|
@ApiModelProperty("租赁期限及租房押金、支付方式") |
||||
|
private String leaseTermAndDeposit; |
||||
|
} |
Loading…
Reference in new issue