
27 changed files with 1238 additions and 19 deletions
@ -0,0 +1,91 @@ |
|||||
|
package com.yxt.anrui.oa.api; |
||||
|
|
||||
|
import com.yxt.anrui.oa.biz.addisposalassetapply.AdDisposalAssetApplyDetailVo; |
||||
|
import com.yxt.anrui.oa.biz.addisposalassetapply.AdDisposalAssetApplyDto; |
||||
|
import com.yxt.anrui.oa.biz.addisposalassetapply.AdDisposalAssetApplyService; |
||||
|
import com.yxt.anrui.oa.biz.addisposalassetapply.AdDisposalAssetApplyVo; |
||||
|
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.ApiOperation; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.cloud.openfeign.SpringQueryMap; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import javax.validation.Valid; |
||||
|
|
||||
|
@RestController |
||||
|
@RequestMapping("v1/AdDisposalAssetApply") |
||||
|
public class AdDisposalAssetApplyRest { |
||||
|
|
||||
|
|
||||
|
@Autowired |
||||
|
private AdDisposalAssetApplyService adDisposalAssetApplyService; |
||||
|
|
||||
|
@ApiOperation("初始化(新增或修改)") |
||||
|
@GetMapping({"/getInit", "/getInit/{sid}"}) |
||||
|
public ResultBean<AdDisposalAssetApplyVo> getInit( |
||||
|
@PathVariable(value = "sid", required = false) String sid, |
||||
|
@RequestParam(value = "userSid", required = false) String userSid, |
||||
|
@RequestParam(value = "orgPath", required = false) String orgPath) { |
||||
|
ResultBean<AdDisposalAssetApplyVo> rb = ResultBean.fireFail(); |
||||
|
if (sid == null || sid.isEmpty()) { |
||||
|
// 执行新增初始化
|
||||
|
if (userSid == null || orgPath == null) { |
||||
|
return rb.setMsg("userSid和orgPath不能为空"); |
||||
|
} |
||||
|
return adDisposalAssetApplyService.getSaveInit(userSid, orgPath); |
||||
|
} else { |
||||
|
// 执行修改初始化
|
||||
|
return adDisposalAssetApplyService.getUpdateInit(sid); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("新增或修改") |
||||
|
@PostMapping("/save") |
||||
|
public ResultBean save(@RequestBody AdDisposalAssetApplyDto dto) { |
||||
|
return adDisposalAssetApplyService.saveOrUpdateDto(dto); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("根据sid批量删除") |
||||
|
@DeleteMapping("/delBySids") |
||||
|
public ResultBean delBySids(@RequestBody String[] sids) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
adDisposalAssetApplyService.delAll(sids); |
||||
|
return rb.success(); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("详情") |
||||
|
@GetMapping("/details/{sid}") |
||||
|
ResultBean<AdDisposalAssetApplyDetailVo> details(@PathVariable("sid") String sid |
||||
|
, @RequestParam(value = "application", required = false) String application) { |
||||
|
return adDisposalAssetApplyService.details(sid,application); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("提交审批流程") |
||||
|
@PostMapping("/submit") |
||||
|
public ResultBean submit(@RequestBody @Valid AdDisposalAssetApplyDto dto) { |
||||
|
return adDisposalAssetApplyService.submit(dto); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "办理(同意)") |
||||
|
@PutMapping("/complete") |
||||
|
public ResultBean complete(@Valid @RequestBody CompleteDto dto) { |
||||
|
return adDisposalAssetApplyService.complete(dto); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "驳回任务") |
||||
|
@PutMapping(value = "/reject") |
||||
|
public ResultBean reject(@Valid @RequestBody TaskDto dto) { |
||||
|
return adDisposalAssetApplyService.reject(dto); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation("获取流程操作标题") |
||||
|
@GetMapping("/getFlowOperateTitle") |
||||
|
@ResponseBody |
||||
|
ResultBean<String> getFlowOperateTitle(@SpringQueryMap NodeQuery query) { |
||||
|
return adDisposalAssetApplyService.getFlowOperateTitle(query); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,67 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.oa.biz.addisposalassetapply; |
||||
|
|
||||
|
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_disposal_asset_apply") |
||||
|
public class AdDisposalAssetApply extends BaseEntity { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@ApiModelProperty("基础表单sid") |
||||
|
private String formSid; // 基础表单sid
|
||||
|
@ApiModelProperty("固定资产类别key") |
||||
|
private String assetTypeKey; // 固定资产类别key
|
||||
|
@ApiModelProperty("固定资产类别value") |
||||
|
private String assetTypeValue; // 固定资产类别value
|
||||
|
@ApiModelProperty("资产所属机构sid") |
||||
|
private String belongsDeptSid; // 资产所属机构sid
|
||||
|
@ApiModelProperty("资产所属机构") |
||||
|
private String belongsDept; // 资产所属机构
|
||||
|
@ApiModelProperty("资产所属公司Sid") |
||||
|
private String belongsCompanySid; // 资产所属公司Sid
|
||||
|
@ApiModelProperty("资产所属公司") |
||||
|
private String belongsCompany; // 资产所属公司
|
||||
|
@ApiModelProperty("是否有服务站机器设备(1是,0否)") |
||||
|
private String isStationKey; // 是否有服务站机器设备(1是,0否)
|
||||
|
@ApiModelProperty("是否有服务站机器设备(1是,0否)") |
||||
|
private String isStationValue; // 是否有服务站机器设备(1是,0否)
|
||||
|
@ApiModelProperty("处置情况说明") |
||||
|
private String disposalShows; // 处置情况说明
|
||||
|
@ApiModelProperty("资产净值合计") |
||||
|
private BigDecimal totalAmount; // 资产净值合计
|
||||
|
@ApiModelProperty("资产处置金额合计") |
||||
|
private BigDecimal disposalAmount; // 资产处置金额合计
|
||||
|
|
||||
|
} |
@ -0,0 +1,42 @@ |
|||||
|
package com.yxt.anrui.oa.biz.addisposalassetapply; |
||||
|
|
||||
|
import com.yxt.anrui.oa.biz.addisposalassetdetails.AdDisposalAssetListDetailsVo; |
||||
|
import com.yxt.anrui.oa.biz.oaform.OaFormCommonVo; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2025/1/21 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class AdDisposalAssetApplyDetailVo extends OaFormCommonVo { |
||||
|
|
||||
|
|
||||
|
|
||||
|
@ApiModelProperty("固定资产类别value") |
||||
|
private String assetTypeValue; // 固定资产类别value
|
||||
|
@ApiModelProperty("资产所属机构") |
||||
|
private String belongsDept; // 资产所属机构
|
||||
|
@ApiModelProperty("资产所属公司") |
||||
|
private String belongsCompany; // 资产所属公司
|
||||
|
@ApiModelProperty("是否有服务站机器设备(1是,0否)") |
||||
|
private String isStationValue; // 是否有服务站机器设备(1是,0否)
|
||||
|
@ApiModelProperty("处置情况说明") |
||||
|
private String disposalShows; // 处置情况说明
|
||||
|
@ApiModelProperty("资产净值合计") |
||||
|
private String totalAmount; // 资产净值合计
|
||||
|
@ApiModelProperty("资产处置金额合计") |
||||
|
private String disposalAmount; // 资产处置金额合计
|
||||
|
|
||||
|
@ApiModelProperty("图片") |
||||
|
private List<String> files = new ArrayList<>(); |
||||
|
@ApiModelProperty("附件") |
||||
|
private List<String> appes = new ArrayList<>(); |
||||
|
private List<AdDisposalAssetListDetailsVo> list = new ArrayList<>(); |
||||
|
|
||||
|
} |
@ -0,0 +1,87 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.oa.biz.addisposalassetapply; |
||||
|
|
||||
|
|
||||
|
import com.yxt.anrui.oa.biz.addisposalassetdetails.AdDisposalAssetDetailsDto; |
||||
|
import com.yxt.anrui.oa.biz.oaform.FormCommon; |
||||
|
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; |
||||
|
|
||||
|
/** |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "固定资产处置 数据传输对象", description = "固定资产处置 数据传输对象") |
||||
|
public class AdDisposalAssetApplyDto extends OaFormDto { |
||||
|
|
||||
|
|
||||
|
private FormCommon assetTypeObj; |
||||
|
@ApiModelProperty("固定资产类别key") |
||||
|
private String assetTypeKey; // 固定资产类别key
|
||||
|
@ApiModelProperty("固定资产类别value") |
||||
|
private String assetTypeValue; // 固定资产类别value
|
||||
|
|
||||
|
private FormCommon belongsDeptObj; |
||||
|
@ApiModelProperty("资产所属机构sid") |
||||
|
private String belongsDeptSid; // 资产所属机构sid
|
||||
|
@ApiModelProperty("资产所属机构") |
||||
|
private String belongsDept; // 资产所属机构
|
||||
|
|
||||
|
private FormCommon belongsCompanyObj; |
||||
|
@ApiModelProperty("资产所属公司Sid") |
||||
|
private String belongsCompanySid; // 资产所属公司Sid
|
||||
|
@ApiModelProperty("资产所属公司") |
||||
|
private String belongsCompany; // 资产所属公司
|
||||
|
|
||||
|
private FormCommon isStationObj; |
||||
|
@ApiModelProperty("是否有服务站机器设备(1是,0否)") |
||||
|
private String isStationKey; // 是否有服务站机器设备(1是,0否)
|
||||
|
@ApiModelProperty("是否有服务站机器设备(1是,0否)") |
||||
|
private String isStationValue; // 是否有服务站机器设备(1是,0否)
|
||||
|
|
||||
|
@ApiModelProperty("处置情况说明") |
||||
|
private String disposalShows; // 处置情况说明
|
||||
|
@ApiModelProperty("资产净值合计") |
||||
|
private String totalAmount; // 资产净值合计
|
||||
|
@ApiModelProperty("资产处置金额合计") |
||||
|
private String disposalAmount; // 资产处置金额合计
|
||||
|
|
||||
|
@ApiModelProperty("图片") |
||||
|
private List<String> files = new ArrayList<>(); |
||||
|
@ApiModelProperty("附件") |
||||
|
private List<String> appes = new ArrayList<>(); |
||||
|
|
||||
|
private List<AdDisposalAssetDetailsDto> list = new ArrayList<>(); |
||||
|
|
||||
|
} |
@ -0,0 +1,37 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.oa.biz.addisposalassetapply; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
@Mapper |
||||
|
public interface AdDisposalAssetApplyMapper extends BaseMapper<AdDisposalAssetApply> { |
||||
|
|
||||
|
int selectBySid(String join); |
||||
|
|
||||
|
AdDisposalAssetApplyDetailVo details(String sid); |
||||
|
} |
@ -0,0 +1,38 @@ |
|||||
|
<?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.addisposalassetapply.AdDisposalAssetApplyMapper"> |
||||
|
<!-- <where> ${ew.sqlSegment} </where>--> |
||||
|
<!-- ${ew.customSqlSegment} --> |
||||
|
|
||||
|
<select id="selectBySid" resultType="int"> |
||||
|
SELECT COUNT(*) |
||||
|
FROM ad_disposal_asset_apply ae |
||||
|
left join oa_form ofm on ae.formSid = ofm.sid |
||||
|
WHERE ofm.nodeState != '待提交' |
||||
|
and find_in_set(oa.sid, #{list}) |
||||
|
</select> |
||||
|
|
||||
|
<select id="details" resultMap="detailMap"> |
||||
|
select disposalShows, sid,assetTypeValue,belongsCompany,totalAmount,isStationValue,disposalAmount |
||||
|
from ad_disposal_asset_apply |
||||
|
where sid = #{sid} |
||||
|
</select> |
||||
|
|
||||
|
<resultMap id="detailMap" type="com.yxt.anrui.oa.biz.addisposalassetapply.AdDisposalAssetApplyDetailVo"> |
||||
|
<result column="disposalShows" property="disposalShows"/> |
||||
|
<result column="assetTypeValue" property="assetTypeValue"/> |
||||
|
<result column="belongsCompany" property="belongsCompany"/> |
||||
|
<result column="isStationValue" property="isStationValue"/> |
||||
|
<result column="disposalAmount" property="disposalAmount"/> |
||||
|
<result column="totalAmount" property="totalAmount"/> |
||||
|
<collection property="list" ofType="com.yxt.anrui.oa.biz.addisposalassetdetails.AdDisposalAssetListDetailsVo" |
||||
|
select="selectList" column="sid"> |
||||
|
</collection> |
||||
|
</resultMap> |
||||
|
|
||||
|
<select id="selectList" resultType="com.yxt.anrui.oa.biz.addisposalassetdetails.AdDisposalAssetListDetailsVo"> |
||||
|
select * |
||||
|
from ad_disposal_asset_details |
||||
|
where mainSid = #{sid} |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,341 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.oa.biz.addisposalassetapply; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import com.yxt.anrui.oa.biz.addisposalassetdetails.AdDisposalAssetDetailsDto; |
||||
|
import com.yxt.anrui.oa.biz.addisposalassetdetails.AdDisposalAssetDetailsService; |
||||
|
import com.yxt.anrui.oa.biz.addisposalassetdetails.AdDisposalAssetDetailsVo; |
||||
|
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.OrgVo; |
||||
|
import com.yxt.anrui.oa.feign.portal.sysorganization.SysOrganizationFeign; |
||||
|
import com.yxt.anrui.oa.feign.portal.sysorganization.SysOrganizationVo; |
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import com.yxt.common.core.result.ResultBean; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
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 AdDisposalAssetApplyService extends MybatisBaseService<AdDisposalAssetApplyMapper, AdDisposalAssetApply> { |
||||
|
|
||||
|
@Autowired |
||||
|
private OaAppendixService oaAppendixService; |
||||
|
@Autowired |
||||
|
private OaFormService oaFormService; |
||||
|
@Autowired |
||||
|
private AdDisposalAssetDetailsService adDisposalAssetDetailsService; |
||||
|
@Autowired |
||||
|
private SysOrganizationFeign sysOrganizationFeign; |
||||
|
|
||||
|
public ResultBean<AdDisposalAssetApplyVo> getSaveInit(String userSid, String orgPath) { |
||||
|
ResultBean<AdDisposalAssetApplyVo> rb = ResultBean.fireFail(); |
||||
|
AdDisposalAssetApplyVo applyVo = new AdDisposalAssetApplyVo(); |
||||
|
applyVo.setCreateBySid(userSid); |
||||
|
applyVo.setOrgSidPath(orgPath); |
||||
|
// 获取组织信息,根据orgSidPath字段调用外部服务
|
||||
|
OrgVo orgVo = sysOrganizationFeign.getOrgByPath(orgPath).getData(); |
||||
|
// 如果组织信息为空,返回失败信息
|
||||
|
if (orgVo == null) { |
||||
|
return rb.setMsg("未找到对应的组织信息"); |
||||
|
} |
||||
|
applyVo.setBelongsCompanySid(orgVo.getUseOrgSid()); |
||||
|
applyVo.setBelongsCompany(orgVo.getUseOrgName()); |
||||
|
return rb.success().setData(applyVo); |
||||
|
} |
||||
|
|
||||
|
public ResultBean<AdDisposalAssetApplyVo> getUpdateInit(String sid) { |
||||
|
ResultBean<AdDisposalAssetApplyVo> rb = ResultBean.fireFail(); |
||||
|
AdDisposalAssetApplyVo applyVo = new AdDisposalAssetApplyVo(); |
||||
|
AdDisposalAssetApply apply = fetchBySid(sid); |
||||
|
if (apply == null) { |
||||
|
return rb.setMsg("该申请不存在"); |
||||
|
} |
||||
|
OaForm oaForm = oaFormService.fetchBySid(sid); |
||||
|
applyVo.setTaskId(oaForm.getTaskId()); |
||||
|
applyVo.setProcInsId(oaForm.getProcInstId()); |
||||
|
//根据部门sid获取orgPath并赋值
|
||||
|
SysOrganizationVo organizationVo = sysOrganizationFeign.fetchBySid(oaForm.getDeptSid()).getData(); |
||||
|
String orgSidPath = organizationVo.getOrgSidPath(); |
||||
|
applyVo.setOrgSidPath(orgSidPath); |
||||
|
applyVo.setCreateBySid(oaForm.getCreateBySid()); |
||||
|
BeanUtil.copyProperties(apply, applyVo); |
||||
|
FormCommon assetTypeObj = FormCommon.of(apply.getAssetTypeKey(), apply.getAssetTypeValue()); |
||||
|
applyVo.setAssetTypeObj(assetTypeObj); |
||||
|
FormCommon blObj = FormCommon.of(apply.getBelongsCompanySid(), apply.getBelongsCompany()); |
||||
|
applyVo.setBelongsCompanyObj(blObj); |
||||
|
FormCommon isStationObj = FormCommon.of(apply.getIsStationKey(), apply.getIsStationValue()); |
||||
|
applyVo.setIsStationObj(isStationObj); |
||||
|
List<AdDisposalAssetDetailsVo> list = adDisposalAssetDetailsService.getUpdateInit(sid); |
||||
|
list.removeAll(Collections.singleton(null)); |
||||
|
if (!list.isEmpty()) { |
||||
|
list.stream().forEach(details -> { |
||||
|
FormCommon assetObj = new FormCommon(); |
||||
|
assetObj.setId(details.getInventorySid()); |
||||
|
assetObj.setDictValue(details.getGoodsID()); |
||||
|
Map<String, Object> extra = new HashMap<>(); |
||||
|
if (StringUtils.isNotBlank(details.getGoodsSpuName())) { |
||||
|
extra.put("goodsSpuName",details.getGoodsSpuName()); |
||||
|
} |
||||
|
if (StringUtils.isNotBlank(details.getGoodsSkuCode())) { |
||||
|
extra.put("goodsSkuCode",details.getGoodsSkuCode()); |
||||
|
} |
||||
|
assetObj.setExtra(extra); |
||||
|
details.setAssetObj(assetObj); |
||||
|
}); |
||||
|
} |
||||
|
List<String> files = oaAppendixService.selectByLinkSid(sid, "图片"); |
||||
|
applyVo.setFiles(files); |
||||
|
List<String> appes = oaAppendixService.selectByLinkSid(sid, "文件"); |
||||
|
applyVo.setAppes(appes); |
||||
|
applyVo.setList(list); |
||||
|
applyVo.setSid(sid); |
||||
|
return rb.success().setData(applyVo); |
||||
|
} |
||||
|
|
||||
|
public ResultBean<String> saveOrUpdateDto(AdDisposalAssetApplyDto dto) { |
||||
|
ResultBean<String> rb = ResultBean.fireFail(); |
||||
|
String sid = dto.getSid(); |
||||
|
List<String> files = dto.getFiles(); |
||||
|
List<String> appes = dto.getAppes(); |
||||
|
List<AdDisposalAssetDetailsDto> list = dto.getList(); |
||||
|
if (StringUtils.isBlank(sid)) { |
||||
|
// 新建操作
|
||||
|
AdDisposalAssetApply entity = new AdDisposalAssetApply(); |
||||
|
BeanUtil.copyProperties(dto, entity, "sid"); |
||||
|
|
||||
|
dto.setBillNo("GDZCCZSQ"); |
||||
|
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 { |
||||
|
// 更新操作
|
||||
|
AdDisposalAssetApply entity = fetchBySid(sid); |
||||
|
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
||||
|
baseMapper.updateById(entity); |
||||
|
} |
||||
|
adDisposalAssetDetailsService.saveDetails(list, sid); |
||||
|
// 处理附件
|
||||
|
saveFiles(sid, files, OaFileEnum.ADDISPOSALASSETAPPLY.getAttachType(), "图片"); |
||||
|
saveFiles(sid, appes, OaFileEnum.ADDISPOSALASSETAPPLY.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 delAll(String[] sids) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
//查询该sid中是否有流程不是待提交的
|
||||
|
int count = baseMapper.selectBySid(StringUtils.join(sids, ",")); |
||||
|
if (count > 0) { |
||||
|
return rb.setMsg("删除的数据中包含已提交或已办结审批的数据,删除失败"); |
||||
|
} |
||||
|
delBySids(sids); |
||||
|
return rb.success(); |
||||
|
} |
||||
|
|
||||
|
public ResultBean<AdDisposalAssetApplyDetailVo> details(String sid, String application) { |
||||
|
ResultBean<AdDisposalAssetApplyDetailVo> rb = ResultBean.fireFail(); |
||||
|
AdDisposalAssetApplyDetailVo detailVo = baseMapper.details(sid); |
||||
|
if (detailVo == null) { |
||||
|
return rb.setMsg("该申请不存在"); |
||||
|
} |
||||
|
List<String> files = oaAppendixService.selectByLinkSid(sid, "图片"); |
||||
|
List<String> appes = oaAppendixService.selectByLinkSid(sid, "文件"); |
||||
|
detailVo.setFiles(files); |
||||
|
detailVo.setAppes(appes); |
||||
|
//基础字段赋值
|
||||
|
BeanUtil.copyProperties(oaFormService.getDetails(sid), detailVo); |
||||
|
return rb.success().setData(detailVo); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 提交 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return |
||||
|
*/ |
||||
|
public ResultBean submit(AdDisposalAssetApplyDto dto) { |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
ResultBean<String> stringResultBean = saveOrUpdateDto(dto); |
||||
|
if (!stringResultBean.getSuccess()) { |
||||
|
return rb.setMsg(stringResultBean.getMsg()); |
||||
|
} |
||||
|
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); |
||||
|
AdDisposalAssetApply adExpatriatesApply = 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,87 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.oa.biz.addisposalassetapply; |
||||
|
|
||||
|
import com.yxt.anrui.oa.biz.addisposalassetdetails.AdDisposalAssetDetailsVo; |
||||
|
import com.yxt.anrui.oa.biz.oaform.FormCommon; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
@Data |
||||
|
public class AdDisposalAssetApplyVo { |
||||
|
|
||||
|
private String sid; |
||||
|
/* private String userSid; |
||||
|
private String orgPath;*/ |
||||
|
private String orgSidPath; |
||||
|
private String createBySid; |
||||
|
|
||||
|
private FormCommon assetTypeObj; |
||||
|
@ApiModelProperty("固定资产类别key") |
||||
|
private String assetTypeKey; // 固定资产类别key
|
||||
|
@ApiModelProperty("固定资产类别value") |
||||
|
private String assetTypeValue; // 固定资产类别value
|
||||
|
|
||||
|
private FormCommon belongsDeptObj; |
||||
|
@ApiModelProperty("资产所属机构sid") |
||||
|
private String belongsDeptSid; // 资产所属机构sid
|
||||
|
@ApiModelProperty("资产所属机构") |
||||
|
private String belongsDept; // 资产所属机构
|
||||
|
|
||||
|
private FormCommon belongsCompanyObj; |
||||
|
@ApiModelProperty("资产所属公司Sid") |
||||
|
private String belongsCompanySid; // 资产所属公司Sid
|
||||
|
@ApiModelProperty("资产所属公司") |
||||
|
private String belongsCompany; // 资产所属公司
|
||||
|
|
||||
|
private FormCommon isStationObj; |
||||
|
@ApiModelProperty("是否有服务站机器设备(1是,0否)") |
||||
|
private String isStationKey; // 是否有服务站机器设备(1是,0否)
|
||||
|
@ApiModelProperty("是否有服务站机器设备(1是,0否)") |
||||
|
private String isStationValue; // 是否有服务站机器设备(1是,0否)
|
||||
|
|
||||
|
@ApiModelProperty("处置情况说明") |
||||
|
private String disposalShows; // 处置情况说明
|
||||
|
@ApiModelProperty("资产净值合计") |
||||
|
private String totalAmount; // 资产净值合计
|
||||
|
@ApiModelProperty("资产处置金额合计") |
||||
|
private String disposalAmount; // 资产处置金额合计
|
||||
|
|
||||
|
@ApiModelProperty("图片") |
||||
|
private List<String> files = new ArrayList<>(); |
||||
|
@ApiModelProperty("附件") |
||||
|
private List<String> appes = new ArrayList<>(); |
||||
|
|
||||
|
private List<AdDisposalAssetDetailsVo> list = new ArrayList<>(); |
||||
|
|
||||
|
private String taskId; |
||||
|
@ApiModelProperty("流程实例id") |
||||
|
private String procInsId; |
||||
|
|
||||
|
} |
@ -0,0 +1,59 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.oa.biz.addisposalassetdetails; |
||||
|
|
||||
|
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_disposal_asset_details") |
||||
|
public class AdDisposalAssetDetails extends BaseEntity { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@ApiModelProperty("申请sid") |
||||
|
private String mainSid; // 申请sid
|
||||
|
@ApiModelProperty("库存sid") |
||||
|
private String inventorySid; // 库存sid
|
||||
|
@ApiModelProperty("固定资产ID") |
||||
|
private String goodsID; // 固定资产ID
|
||||
|
@ApiModelProperty("固定资产编号") |
||||
|
private String goodsSkuCode; // 固定资产编号
|
||||
|
@ApiModelProperty("固定资产名称") |
||||
|
private String goodsSpuName; // 固定资产名称
|
||||
|
@ApiModelProperty("固定资产净值") |
||||
|
private BigDecimal goodsWorth; // 固定资产净值
|
||||
|
@ApiModelProperty("固定资产处置金额") |
||||
|
private BigDecimal goodsDisposalAmount; // 固定资产处置金额
|
||||
|
@ApiModelProperty("固定资产处置情况说明") |
||||
|
private String goodsShows; // 固定资产处置情况说明
|
||||
|
|
||||
|
} |
@ -0,0 +1,69 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.oa.biz.addisposalassetdetails; |
||||
|
|
||||
|
|
||||
|
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; |
||||
|
|
||||
|
/** |
||||
|
* Project: yxt-oa(认定人员) <br/> |
||||
|
* File: AdExpatriatesDetailVo.java <br/> |
||||
|
* Class: com.yxt.anrui.oa.api.adexpatriatesdetail.AdExpatriatesDetailVo <br/> |
||||
|
* Description: 驻外人员认定列表 视图数据对象. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2025-01-20 15:35:08 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "固定资产处置列表 视图数据对象", description = "固定资产处置列表 视图数据对象") |
||||
|
public class AdDisposalAssetDetailsDto implements Vo { |
||||
|
|
||||
|
@ApiModelProperty("固定资产") |
||||
|
private FormCommon assetObj; |
||||
|
|
||||
|
@ApiModelProperty("库存sid") |
||||
|
private String inventorySid; // 库存sid
|
||||
|
@ApiModelProperty("固定资产ID") |
||||
|
private String goodsID; // 固定资产ID
|
||||
|
@ApiModelProperty("固定资产编号") |
||||
|
private String goodsSkuCode; // 固定资产编号
|
||||
|
@ApiModelProperty("固定资产名称") |
||||
|
private String goodsSpuName; // 固定资产名称
|
||||
|
@ApiModelProperty("固定资产净值") |
||||
|
private String goodsWorth; // 固定资产净值
|
||||
|
@ApiModelProperty("固定资产处置金额") |
||||
|
private String goodsDisposalAmount; // 固定资产处置金额
|
||||
|
@ApiModelProperty("固定资产处置情况说明") |
||||
|
private String goodsShows; // 固定资产处置情况说明
|
||||
|
} |
@ -0,0 +1,41 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.oa.biz.addisposalassetdetails; |
||||
|
|
||||
|
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 AdDisposalAssetDetailsMapper extends BaseMapper<AdDisposalAssetDetails> { |
||||
|
|
||||
|
@Select("select * from ad_disposal_asset_details where mainSid = #{mainSid}") |
||||
|
List<AdDisposalAssetDetails> selectByMainSid(String mainSid); |
||||
|
|
||||
|
List<AdDisposalAssetDetailsVo> getUpdateInit(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.addisposalassetdetails.AdDisposalAssetDetailsMapper"> |
||||
|
<select id="getUpdateInit" resultType="com.yxt.anrui.oa.biz.addisposalassetdetails.AdDisposalAssetDetailsVo"> |
||||
|
select * |
||||
|
from ad_disposal_asset_details |
||||
|
where mainSid = #{sid} |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,80 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.oa.biz.addisposalassetdetails; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import com.yxt.anrui.oa.biz.oaform.FormCommon; |
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.Collections; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
@Service |
||||
|
public class AdDisposalAssetDetailsService extends MybatisBaseService<AdDisposalAssetDetailsMapper, AdDisposalAssetDetails> { |
||||
|
|
||||
|
public void saveDetails(List<AdDisposalAssetDetailsDto> list, String sid) { |
||||
|
//根据sid查询明细并删除
|
||||
|
List<AdDisposalAssetDetails> 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 -> { |
||||
|
AdDisposalAssetDetails detail = new AdDisposalAssetDetails(); |
||||
|
BeanUtil.copyProperties(details, detail); |
||||
|
detail.setMainSid(sid); |
||||
|
FormCommon assetObj = details.getAssetObj(); |
||||
|
detail.setGoodsID(assetObj.getDictValue()); |
||||
|
detail.setInventorySid(assetObj.getId()); |
||||
|
Map<String, Object> extra = assetObj.getExtra(); |
||||
|
if (null != extra) { |
||||
|
for (Map.Entry <String,Object> entry : extra.entrySet()) { |
||||
|
if (StringUtils.isNotBlank((String)entry.getValue())) { |
||||
|
if (entry.getKey().equals("goodsSpuName")) { |
||||
|
detail.setGoodsSpuName((String)entry.getValue()); |
||||
|
} |
||||
|
if (entry.getKey().equals("goodsSkuCode")) { |
||||
|
detail.setGoodsSkuCode((String)entry.getValue()); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
baseMapper.insert(detail); |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public List<AdDisposalAssetDetailsVo> getUpdateInit(String sid) { |
||||
|
return baseMapper.getUpdateInit(sid); |
||||
|
} |
||||
|
} |
@ -0,0 +1,71 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.oa.biz.addisposalassetdetails; |
||||
|
|
||||
|
|
||||
|
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; |
||||
|
|
||||
|
/** |
||||
|
* Project: yxt-oa(认定人员) <br/> |
||||
|
* File: AdExpatriatesDetailVo.java <br/> |
||||
|
* Class: com.yxt.anrui.oa.api.adexpatriatesdetail.AdExpatriatesDetailVo <br/> |
||||
|
* Description: 驻外人员认定列表 视图数据对象. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2025-01-20 15:35:08 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "固定资产处置列表 视图数据对象", description = "固定资产处置列表 视图数据对象") |
||||
|
public class AdDisposalAssetDetailsVo implements Vo { |
||||
|
|
||||
|
private String sid; |
||||
|
|
||||
|
@ApiModelProperty("固定资产") |
||||
|
private FormCommon assetObj; |
||||
|
|
||||
|
@ApiModelProperty("库存sid") |
||||
|
private String inventorySid; // 库存sid
|
||||
|
@ApiModelProperty("固定资产ID") |
||||
|
private String goodsID; // 固定资产ID
|
||||
|
@ApiModelProperty("固定资产编号") |
||||
|
private String goodsSkuCode; // 固定资产编号
|
||||
|
@ApiModelProperty("固定资产名称") |
||||
|
private String goodsSpuName; // 固定资产名称
|
||||
|
@ApiModelProperty("固定资产净值") |
||||
|
private String goodsWorth; // 固定资产净值
|
||||
|
@ApiModelProperty("固定资产处置金额") |
||||
|
private String goodsDisposalAmount; // 固定资产处置金额
|
||||
|
@ApiModelProperty("固定资产处置情况说明") |
||||
|
private String goodsShows; // 固定资产处置情况说明
|
||||
|
} |
@ -0,0 +1,66 @@ |
|||||
|
/********************************************************* |
||||
|
********************************************************* |
||||
|
******************** ******************* |
||||
|
************* ************ |
||||
|
******* _oo0oo_ ******* |
||||
|
*** o8888888o *** |
||||
|
* 88" . "88 * |
||||
|
* (| -_- |) * |
||||
|
* 0\ = /0 * |
||||
|
* ___/`---'\___ * |
||||
|
* .' \\| |// '. *
|
||||
|
* / \\||| : |||// \ *
|
||||
|
* / _||||| -:- |||||- \ * |
||||
|
* | | \\\ - /// | | *
|
||||
|
* | \_| ''\---/'' |_/ | * |
||||
|
* \ .-\__ '-' ___/-. / * |
||||
|
* ___'. .' /--.--\ `. .'___ * |
||||
|
* ."" '< `.___\_<|>_/___.' >' "". * |
||||
|
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
||||
|
* \ \ `_. \_ __\ /__ _/ .-` / / * |
||||
|
* =====`-.____`.___ \_____/___.-`___.-'===== * |
||||
|
* `=---=' * |
||||
|
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
||||
|
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
||||
|
*********************************************************/ |
||||
|
package com.yxt.anrui.oa.biz.addisposalassetdetails; |
||||
|
|
||||
|
|
||||
|
import com.yxt.common.core.vo.Vo; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* Project: yxt-oa(认定人员) <br/> |
||||
|
* File: AdExpatriatesDetailVo.java <br/> |
||||
|
* Class: com.yxt.anrui.oa.api.adexpatriatesdetail.AdExpatriatesDetailVo <br/> |
||||
|
* Description: 驻外人员认定列表 视图数据对象. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2025-01-20 15:35:08 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "固定资产处置列表 视图数据对象", description = "固定资产处置列表 视图数据对象") |
||||
|
public class AdDisposalAssetListDetailsVo implements Vo { |
||||
|
|
||||
|
private String sid; |
||||
|
|
||||
|
@ApiModelProperty("固定资产ID") |
||||
|
private String goodsID; // 固定资产ID
|
||||
|
@ApiModelProperty("固定资产编号") |
||||
|
private String goodsSkuCode; // 固定资产编号
|
||||
|
@ApiModelProperty("固定资产名称") |
||||
|
private String goodsSpuName; // 固定资产名称
|
||||
|
@ApiModelProperty("固定资产净值") |
||||
|
private String goodsWorth; // 固定资产净值
|
||||
|
@ApiModelProperty("固定资产处置金额") |
||||
|
private String goodsDisposalAmount; // 固定资产处置金额
|
||||
|
@ApiModelProperty("固定资产处置情况说明") |
||||
|
private String goodsShows; // 固定资产处置情况说明
|
||||
|
|
||||
|
} |
Loading…
Reference in new issue