
16 changed files with 903 additions and 0 deletions
@ -0,0 +1,53 @@ |
|||
package com.yxt.anrui.oa.api; |
|||
|
|||
import com.yxt.anrui.oa.biz.adfixedassetledger.AdFixedAssetLedgerDto; |
|||
import com.yxt.anrui.oa.biz.adfixedassetledger.AdFixedAssetLedgerQuery; |
|||
import com.yxt.anrui.oa.biz.adfixedassetledger.AdFixedAssetLedgerService; |
|||
import com.yxt.anrui.oa.biz.adfixedassetledger.AdFixedAssetLedgerVo; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
@Api(tags = "固定资产台账管理") |
|||
@RestController |
|||
@RequestMapping("v1/adfixedassetledger") |
|||
public class AdFixedAssetLedgerRest { |
|||
|
|||
@Autowired |
|||
private AdFixedAssetLedgerService adFixedAssetLedgerService; |
|||
|
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<AdFixedAssetLedgerVo>> listPage(@RequestBody PagerQuery<AdFixedAssetLedgerQuery> pq) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
PagerVo<AdFixedAssetLedgerVo> pv = adFixedAssetLedgerService.listPageVo(pq); |
|||
return rb.success().setData(pv); |
|||
} |
|||
|
|||
@ApiOperation("新增或修改") |
|||
@PostMapping("/save") |
|||
public ResultBean save(@RequestBody AdFixedAssetLedgerDto dto) { |
|||
return adFixedAssetLedgerService.saveOrUpdateDto(dto); |
|||
} |
|||
|
|||
@ApiOperation("根据sid批量删除") |
|||
@DeleteMapping("/delBySids") |
|||
public ResultBean delBySids(@RequestBody String[] sids) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
adFixedAssetLedgerService.delBySids(sids); |
|||
return rb.success(); |
|||
} |
|||
|
|||
@ApiOperation("根据SID获取一条记录") |
|||
@GetMapping("/fetchDetailsBySid/{sid}") |
|||
public ResultBean<AdFixedAssetLedgerVo> fetchDetailsBySid(@PathVariable("sid") String sid) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
AdFixedAssetLedgerVo vo = adFixedAssetLedgerService.fetchDetailsVoBySid(sid); |
|||
return rb.success().setData(vo); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,53 @@ |
|||
package com.yxt.anrui.oa.api; |
|||
|
|||
import com.yxt.anrui.oa.biz.adfixedasset.AdFixedAssetDto; |
|||
import com.yxt.anrui.oa.biz.adfixedasset.AdFixedAssetQuery; |
|||
import com.yxt.anrui.oa.biz.adfixedasset.AdFixedAssetService; |
|||
import com.yxt.anrui.oa.biz.adfixedasset.AdFixedAssetVo; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
@Api(tags = "固定资产管理") |
|||
@RestController |
|||
@RequestMapping("v1/adfixedasset") |
|||
public class AdFixedAssetRest { |
|||
|
|||
@Autowired |
|||
private AdFixedAssetService adFixedAssetService; |
|||
|
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<AdFixedAssetVo>> listPage(@RequestBody PagerQuery<AdFixedAssetQuery> pq) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
PagerVo<AdFixedAssetVo> pv = adFixedAssetService.listPageVo(pq); |
|||
return rb.success().setData(pv); |
|||
} |
|||
|
|||
@ApiOperation("新增或修改") |
|||
@PostMapping("/save") |
|||
public ResultBean save(@RequestBody AdFixedAssetDto dto) { |
|||
return adFixedAssetService.saveOrUpdateDto(dto); |
|||
} |
|||
|
|||
@ApiOperation("根据sid批量删除") |
|||
@DeleteMapping("/delBySids") |
|||
public ResultBean delBySids(@RequestBody String[] sids) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
adFixedAssetService.delBySids(sids); |
|||
return rb.success(); |
|||
} |
|||
|
|||
@ApiOperation("根据SID获取一条记录") |
|||
@GetMapping("/fetchDetailsBySid/{sid}") |
|||
public ResultBean<AdFixedAssetVo> fetchDetailsBySid(@PathVariable("sid") String sid) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
AdFixedAssetVo vo = adFixedAssetService.fetchDetailsVoBySid(sid); |
|||
return rb.success().setData(vo); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,54 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adfixedasset; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
@ApiModel(value = "固定资产表", description = "固定资产表") |
|||
@TableName("ad_fixed_asset") |
|||
public class AdFixedAsset extends BaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@ApiModelProperty("固定资产名称") |
|||
private String assetName; // 固定资产名称
|
|||
@ApiModelProperty("编号") |
|||
private String assetNumber; // 编号
|
|||
@ApiModelProperty("单位") |
|||
private String unit; // 单位
|
|||
@ApiModelProperty("规格") |
|||
private String specification; // 规格
|
|||
@ApiModelProperty("固定资产类别key") |
|||
private String assetTypeKey; // 固定资产类别key
|
|||
@ApiModelProperty("固定资产类别") |
|||
private String assetTypeValue; // 固定资产类别
|
|||
|
|||
|
|||
} |
@ -0,0 +1,58 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adfixedasset; |
|||
|
|||
|
|||
import com.yxt.anrui.oa.biz.oaform.OaFormDto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "固定资产表 数据传输对象", description = "固定资产表 数据传输对象") |
|||
public class AdFixedAssetDto extends OaFormDto { |
|||
|
|||
private String sid; // sid
|
|||
@ApiModelProperty("固定资产名称") |
|||
private String assetName; // 固定资产名称
|
|||
@ApiModelProperty("编号") |
|||
private String assetNumber; // 编号
|
|||
@ApiModelProperty("单位") |
|||
private String unit; // 单位
|
|||
@ApiModelProperty("规格") |
|||
private String specification; // 规格
|
|||
@ApiModelProperty("固定资产类别key") |
|||
private String assetTypeKey; // 固定资产类别key
|
|||
@ApiModelProperty("固定资产类别") |
|||
private String assetTypeValue; // 固定资产类别
|
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
} |
@ -0,0 +1,44 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adfixedasset; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
/** |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Mapper |
|||
public interface AdFixedAssetMapper extends BaseMapper<AdFixedAsset> { |
|||
|
|||
IPage<AdFixedAssetVo> selectPageVo(IPage<AdFixedAsset> page, @Param(Constants.WRAPPER) Wrapper<AdFixedAsset> qw); |
|||
} |
@ -0,0 +1,12 @@ |
|||
<?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.adfixedasset.AdFixedAssetMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.anrui.oa.biz.adfixedasset.AdFixedAssetVo"> |
|||
SELECT * from ad_fixed_asset |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,63 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adfixedasset; |
|||
|
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: oa(驻外人员认定申请) <br/> |
|||
* File: AdExpatriatesApplyQuery.java <br/> |
|||
* Class: com.yxt.anrui.oa.api.adexpatriatesapply.AdExpatriatesApplyQuery <br/> |
|||
* Description: 驻外人员认定申请 查询条件. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2025-01-16 15:22:53 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "驻外人员认定申请 查询条件", description = "驻外人员认定申请 查询条件") |
|||
public class AdFixedAssetQuery implements Query { |
|||
|
|||
@ApiModelProperty("固定资产名称") |
|||
private String assetName; // 固定资产名称
|
|||
@ApiModelProperty("编号") |
|||
private String assetNumber; // 编号
|
|||
@ApiModelProperty("单位") |
|||
private String unit; // 单位
|
|||
@ApiModelProperty("规格") |
|||
private String specification; // 规格
|
|||
@ApiModelProperty("固定资产类别key") |
|||
private String assetTypeKey; // 固定资产类别key
|
|||
@ApiModelProperty("固定资产类别") |
|||
private String assetTypeValue; // 固定资产类别
|
|||
} |
@ -0,0 +1,94 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adfixedasset; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.anrui.oa.biz.oaappendix.OaAppendixService; |
|||
import com.yxt.anrui.oa.biz.oaform.OaFormService; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
@Service |
|||
public class AdFixedAssetService extends MybatisBaseService<AdFixedAssetMapper, AdFixedAsset> { |
|||
|
|||
@Autowired |
|||
private OaAppendixService oaAppendixService; |
|||
@Autowired |
|||
private OaFormService oaFormService; |
|||
|
|||
public PagerVo<AdFixedAssetVo> listPageVo(PagerQuery<AdFixedAssetQuery> pq) { |
|||
AdFixedAssetQuery query = pq.getParams(); |
|||
QueryWrapper<AdFixedAsset> qw = new QueryWrapper<>(); |
|||
if (query != null) { |
|||
if (StringUtils.isNotBlank(query.getAssetName())) { |
|||
qw.like("assetName", query.getAssetName()); |
|||
} |
|||
if (StringUtils.isNotBlank(query.getAssetNumber())) { |
|||
qw.like("assetNumber", query.getAssetNumber()); |
|||
} |
|||
} |
|||
IPage<AdFixedAsset> page = PagerUtil.queryToPage(pq); |
|||
IPage<AdFixedAssetVo> pagging = baseMapper.selectPageVo(page, qw); |
|||
PagerVo<AdFixedAssetVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
|
|||
public ResultBean<String> saveOrUpdateDto(AdFixedAssetDto dto) { |
|||
ResultBean<String> rb = ResultBean.fireFail(); |
|||
String sid = dto.getSid(); |
|||
if (StringUtils.isBlank(sid)) { |
|||
// 新建操作
|
|||
AdFixedAsset entity = new AdFixedAsset(); |
|||
BeanUtil.copyProperties(dto, entity, "sid"); |
|||
baseMapper.insert(entity); |
|||
sid = entity.getSid(); |
|||
} else { |
|||
// 更新操作
|
|||
AdFixedAsset entity = fetchBySid(sid); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.updateById(entity); |
|||
} |
|||
return rb.success().setData(sid); |
|||
} |
|||
|
|||
|
|||
public AdFixedAssetVo fetchDetailsVoBySid(String sid) { |
|||
AdFixedAsset entity = fetchBySid(sid); |
|||
AdFixedAssetVo vo = new AdFixedAssetVo(); |
|||
BeanUtil.copyProperties(entity, vo); |
|||
return vo; |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,59 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adfixedasset; |
|||
|
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "驻外人员认定申请 视图数据对象", description = "驻外人员认定申请 视图数据对象") |
|||
public class AdFixedAssetVo implements Vo { |
|||
|
|||
private String sid; |
|||
|
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
@ApiModelProperty("固定资产名称") |
|||
private String assetName; // 固定资产名称
|
|||
@ApiModelProperty("编号") |
|||
private String assetNumber; // 编号
|
|||
@ApiModelProperty("单位") |
|||
private String unit; // 单位
|
|||
@ApiModelProperty("规格") |
|||
private String specification; // 规格
|
|||
@ApiModelProperty("固定资产类别key") |
|||
private String assetTypeKey; // 固定资产类别key
|
|||
@ApiModelProperty("固定资产类别") |
|||
private String assetTypeValue; // 固定资产类别
|
|||
} |
@ -0,0 +1,62 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adfixedassetledger; |
|||
|
|||
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_fixed_asset_ledger") |
|||
public class AdFixedAssetLedger extends BaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@ApiModelProperty("固定资产名称") |
|||
private String assetName; // 固定资产名称
|
|||
@ApiModelProperty("编号") |
|||
private String assetNumber; // 编号
|
|||
@ApiModelProperty("单位") |
|||
private String unit; // 单位
|
|||
@ApiModelProperty("规格") |
|||
private String specification; // 规格
|
|||
@ApiModelProperty("固定资产类别key") |
|||
private String assetTypeKey; // 固定资产类别key
|
|||
@ApiModelProperty("固定资产类别") |
|||
private String assetTypeValue; // 固定资产类别
|
|||
@ApiModelProperty("使用组织sid") |
|||
private String useOrgSid; // 使用组织sid
|
|||
@ApiModelProperty("创建组织sid") |
|||
private String createOrgSid; // 使用组织sid
|
|||
@ApiModelProperty("数量") |
|||
private BigDecimal num; // 数量
|
|||
@ApiModelProperty("采购单价") |
|||
private BigDecimal price; // 采购单价
|
|||
} |
@ -0,0 +1,66 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adfixedassetledger; |
|||
|
|||
|
|||
import com.yxt.anrui.oa.biz.oaform.OaFormDto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "固定资产台账 数据传输对象", description = "固定资产台账 数据传输对象") |
|||
public class AdFixedAssetLedgerDto extends OaFormDto { |
|||
|
|||
private String sid; // sid
|
|||
@ApiModelProperty("固定资产名称") |
|||
private String assetName; // 固定资产名称
|
|||
@ApiModelProperty("编号") |
|||
private String assetNumber; // 编号
|
|||
@ApiModelProperty("单位") |
|||
private String unit; // 单位
|
|||
@ApiModelProperty("规格") |
|||
private String specification; // 规格
|
|||
@ApiModelProperty("固定资产类别key") |
|||
private String assetTypeKey; // 固定资产类别key
|
|||
@ApiModelProperty("固定资产类别") |
|||
private String assetTypeValue; // 固定资产类别
|
|||
@ApiModelProperty("使用组织sid") |
|||
private String useOrgSid; // 使用组织sid
|
|||
@ApiModelProperty("创建组织sid") |
|||
private String createOrgSid; // 使用组织sid
|
|||
@ApiModelProperty("数量") |
|||
private String num; // 数量
|
|||
@ApiModelProperty("采购单价") |
|||
private String price; // 采购单价
|
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
} |
@ -0,0 +1,44 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adfixedassetledger; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
/** |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Mapper |
|||
public interface AdFixedAssetLedgerMapper extends BaseMapper<AdFixedAssetLedger> { |
|||
|
|||
IPage<AdFixedAssetLedgerVo> selectPageVo(IPage<AdFixedAssetLedger> page, @Param(Constants.WRAPPER) Wrapper<AdFixedAssetLedger> qw); |
|||
} |
@ -0,0 +1,12 @@ |
|||
<?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.adfixedassetledger.AdFixedAssetLedgerMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.anrui.oa.biz.adfixedassetledger.AdFixedAssetLedgerVo"> |
|||
SELECT * from ad_fixed_asset_ledger |
|||
<where> |
|||
${ew.sqlSegment} |
|||
</where> |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,67 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adfixedassetledger; |
|||
|
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: oa(驻外人员认定申请) <br/> |
|||
* File: AdExpatriatesApplyQuery.java <br/> |
|||
* Class: com.yxt.anrui.oa.api.adexpatriatesapply.AdExpatriatesApplyQuery <br/> |
|||
* Description: 驻外人员认定申请 查询条件. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2025-01-16 15:22:53 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "驻外人员认定申请 查询条件", description = "驻外人员认定申请 查询条件") |
|||
public class AdFixedAssetLedgerQuery implements Query { |
|||
|
|||
@ApiModelProperty("固定资产名称") |
|||
private String assetName; // 固定资产名称
|
|||
@ApiModelProperty("编号") |
|||
private String assetNumber; // 编号
|
|||
@ApiModelProperty("单位") |
|||
private String unit; // 单位
|
|||
@ApiModelProperty("规格") |
|||
private String specification; // 规格
|
|||
@ApiModelProperty("固定资产类别key") |
|||
private String assetTypeKey; // 固定资产类别key
|
|||
@ApiModelProperty("固定资产类别") |
|||
private String assetTypeValue; // 固定资产类别
|
|||
@ApiModelProperty("使用组织sid") |
|||
private String useOrgSid; // 使用组织sid
|
|||
@ApiModelProperty("创建组织sid") |
|||
private String createOrgSid; // 使用组织sid
|
|||
} |
@ -0,0 +1,94 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adfixedassetledger; |
|||
|
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.yxt.anrui.oa.biz.oaappendix.OaAppendixService; |
|||
import com.yxt.anrui.oa.biz.oaform.OaFormService; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.base.utils.PagerUtil; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
@Service |
|||
public class AdFixedAssetLedgerService extends MybatisBaseService<AdFixedAssetLedgerMapper, AdFixedAssetLedger> { |
|||
|
|||
@Autowired |
|||
private OaAppendixService oaAppendixService; |
|||
@Autowired |
|||
private OaFormService oaFormService; |
|||
|
|||
public PagerVo<AdFixedAssetLedgerVo> listPageVo(PagerQuery<AdFixedAssetLedgerQuery> pq) { |
|||
AdFixedAssetLedgerQuery query = pq.getParams(); |
|||
QueryWrapper<AdFixedAssetLedger> qw = new QueryWrapper<>(); |
|||
if (query != null) { |
|||
if (StringUtils.isNotBlank(query.getAssetName())) { |
|||
qw.like("assetName", query.getAssetName()); |
|||
} |
|||
if (StringUtils.isNotBlank(query.getAssetNumber())) { |
|||
qw.like("assetNumber", query.getAssetNumber()); |
|||
} |
|||
} |
|||
IPage<AdFixedAssetLedger> page = PagerUtil.queryToPage(pq); |
|||
IPage<AdFixedAssetLedgerVo> pagging = baseMapper.selectPageVo(page, qw); |
|||
PagerVo<AdFixedAssetLedgerVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
|
|||
public ResultBean<String> saveOrUpdateDto(AdFixedAssetLedgerDto dto) { |
|||
ResultBean<String> rb = ResultBean.fireFail(); |
|||
String sid = dto.getSid(); |
|||
if (StringUtils.isBlank(sid)) { |
|||
// 新建操作
|
|||
AdFixedAssetLedger entity = new AdFixedAssetLedger(); |
|||
BeanUtil.copyProperties(dto, entity, "sid"); |
|||
baseMapper.insert(entity); |
|||
sid = entity.getSid(); |
|||
} else { |
|||
// 更新操作
|
|||
AdFixedAssetLedger entity = fetchBySid(sid); |
|||
BeanUtil.copyProperties(dto, entity, "id", "sid"); |
|||
baseMapper.updateById(entity); |
|||
} |
|||
return rb.success().setData(sid); |
|||
} |
|||
|
|||
|
|||
public AdFixedAssetLedgerVo fetchDetailsVoBySid(String sid) { |
|||
AdFixedAssetLedger entity = fetchBySid(sid); |
|||
AdFixedAssetLedgerVo vo = new AdFixedAssetLedgerVo(); |
|||
BeanUtil.copyProperties(entity, vo); |
|||
return vo; |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,68 @@ |
|||
/********************************************************* |
|||
********************************************************* |
|||
******************** ******************* |
|||
************* ************ |
|||
******* _oo0oo_ ******* |
|||
*** o8888888o *** |
|||
* 88" . "88 * |
|||
* (| -_- |) * |
|||
* 0\ = /0 * |
|||
* ___/`---'\___ * |
|||
* .' \\| |// '. *
|
|||
* / \\||| : |||// \ *
|
|||
* / _||||| -:- |||||- \ * |
|||
* | | \\\ - /// | | *
|
|||
* | \_| ''\---/'' |_/ | * |
|||
* \ .-\__ '-' ___/-. / * |
|||
* ___'. .' /--.--\ `. .'___ * |
|||
* ."" '< `.___\_<|>_/___.' >' "". * |
|||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | * |
|||
* \ \ `_. \_ __\ /__ _/ .-` / / * |
|||
* =====`-.____`.___ \_____/___.-`___.-'===== * |
|||
* `=---=' * |
|||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * |
|||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__********* |
|||
*********************************************************/ |
|||
package com.yxt.anrui.oa.biz.adfixedassetledger; |
|||
|
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "固定资产台账 视图数据对象", description = "固定资产台账 视图数据对象") |
|||
public class AdFixedAssetLedgerVo implements Vo { |
|||
|
|||
private String sid; |
|||
|
|||
@ApiModelProperty("备注") |
|||
private String remarks; |
|||
@ApiModelProperty("固定资产名称") |
|||
private String assetName; // 固定资产名称
|
|||
@ApiModelProperty("编号") |
|||
private String assetNumber; // 编号
|
|||
@ApiModelProperty("单位") |
|||
private String unit; // 单位
|
|||
@ApiModelProperty("规格") |
|||
private String specification; // 规格
|
|||
@ApiModelProperty("固定资产类别key") |
|||
private String assetTypeKey; // 固定资产类别key
|
|||
@ApiModelProperty("固定资产类别") |
|||
private String assetTypeValue; // 固定资产类别
|
|||
@ApiModelProperty("使用组织sid") |
|||
private String useOrgSid; // 使用组织sid
|
|||
@ApiModelProperty("创建组织sid") |
|||
private String createOrgSid; // 使用组织sid
|
|||
@ApiModelProperty("数量") |
|||
private String num; // 数量
|
|||
@ApiModelProperty("采购单价") |
|||
private String price; // 采购单价
|
|||
} |
Loading…
Reference in new issue