From 44c24fa00bad06a98ca48d484c373ddaad0a9e48 Mon Sep 17 00:00:00 2001 From: God <10745413@qq.com> Date: Thu, 11 Jul 2024 15:00:49 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B4=A2=E8=B5=94=E5=8E=82=E5=AE=B6=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../asserviceclaimanu/AsServiceClaimanu.java | 68 ++++++ .../AsServiceClaimanuDetailsVo.java | 71 ++++++ .../AsServiceClaimanuDto.java | 72 +++++++ .../AsServiceClaimanuQuery.java | 60 ++++++ .../AsServiceClaimanuVo.java | 64 ++++++ .../AsServiceClaimanuMapper.java | 70 ++++++ .../AsServiceClaimanuMapper.xml | 11 + .../AsServiceClaimanuRest.java | 91 ++++++++ .../AsServiceClaimanuService.java | 203 ++++++++++++++++++ 9 files changed, 710 insertions(+) create mode 100644 yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanu.java create mode 100644 yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanuDetailsVo.java create mode 100644 yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanuDto.java create mode 100644 yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanuQuery.java create mode 100644 yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanuVo.java create mode 100644 yxt-as/src/main/java/com/yxt/anrui/as/biz/asserviceclaimanu/AsServiceClaimanuMapper.java create mode 100644 yxt-as/src/main/java/com/yxt/anrui/as/biz/asserviceclaimanu/AsServiceClaimanuMapper.xml create mode 100644 yxt-as/src/main/java/com/yxt/anrui/as/biz/asserviceclaimanu/AsServiceClaimanuRest.java create mode 100644 yxt-as/src/main/java/com/yxt/anrui/as/biz/asserviceclaimanu/AsServiceClaimanuService.java diff --git a/yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanu.java b/yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanu.java new file mode 100644 index 0000000000..ae526cffe6 --- /dev/null +++ b/yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanu.java @@ -0,0 +1,68 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.as.api.asserviceclaimanu; + +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-as(索赔厂家管理)
+ * File: AsServiceClaimanu.java
+ * Class: com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanu
+ * Description: 索赔厂家管理.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-07-11 10:25:03
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "索赔厂家管理", description = "索赔厂家管理") +@TableName("as_service_claimanu") +public class AsServiceClaimanu extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("索赔厂家编号") + private String claiManuNo; // 索赔厂家编号 + @ApiModelProperty("索赔厂家名称") + private String claiManuName; // 索赔厂家名称 + @ApiModelProperty("排序") + private Integer sortNo; // 排序 + @ApiModelProperty("部门sid") + private String useOrgSid; // 部门sid + @ApiModelProperty("部门名称") + private String useOrgName; // 部门名称 + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} diff --git a/yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanuDetailsVo.java b/yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanuDetailsVo.java new file mode 100644 index 0000000000..dd82d3902f --- /dev/null +++ b/yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanuDetailsVo.java @@ -0,0 +1,71 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.as.api.asserviceclaimanu; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-as(索赔厂家管理)
+ * File: AsServiceClaimanuVo.java
+ * Class: com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanuVo
+ * Description: 索赔厂家管理 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-07-11 10:25:03
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "索赔厂家管理 视图数据详情", description = "索赔厂家管理 视图数据详情") +public class AsServiceClaimanuDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("索赔厂家编号") + private String claiManuNo; // 索赔厂家编号 + @ApiModelProperty("索赔厂家名称") + private String claiManuName; // 索赔厂家名称 + @ApiModelProperty("排序") + private Integer sortNo; // 排序 + @ApiModelProperty("部门sid") + private String useOrgSid; // 部门sid + @ApiModelProperty("部门名称") + private String useOrgName; // 部门名称 + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} \ No newline at end of file diff --git a/yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanuDto.java b/yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanuDto.java new file mode 100644 index 0000000000..ad72840ea6 --- /dev/null +++ b/yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanuDto.java @@ -0,0 +1,72 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.as.api.asserviceclaimanu; + + +import com.yxt.common.core.dto.Dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-as(索赔厂家管理)
+ * File: AsServiceClaimanuDto.java
+ * Class: com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanuDto
+ * Description: 索赔厂家管理 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-07-11 10:25:03
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "索赔厂家管理 数据传输对象", description = "索赔厂家管理 数据传输对象") +public class AsServiceClaimanuDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("索赔厂家编号") + private String claiManuNo; // 索赔厂家编号 + @ApiModelProperty("索赔厂家名称") + private String claiManuName; // 索赔厂家名称 + @ApiModelProperty("排序") + private Integer sortNo; // 排序 + @ApiModelProperty("部门sid") + private String useOrgSid; // 部门sid + @ApiModelProperty("部门名称") + private String useOrgName; // 部门名称 + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + @ApiModelProperty("组织全路径") + private String orgPath; +} \ No newline at end of file diff --git a/yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanuQuery.java b/yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanuQuery.java new file mode 100644 index 0000000000..dbb0bc8ae1 --- /dev/null +++ b/yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanuQuery.java @@ -0,0 +1,60 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.as.api.asserviceclaimanu; + + +import com.yxt.common.core.query.Query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-as(索赔厂家管理)
+ * File: AsServiceClaimanuQuery.java
+ * Class: com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanuQuery
+ * Description: 索赔厂家管理 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-07-11 10:25:03
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "索赔厂家管理 查询条件", description = "索赔厂家管理 查询条件") +public class AsServiceClaimanuQuery implements Query { + + @ApiModelProperty("索赔厂家名称") + private String claiManuName; + + private String userSid; + @ApiModelProperty("菜单url") + private String menuUrl; + @ApiModelProperty("组织全路径") + private String orgPath; +} diff --git a/yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanuVo.java b/yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanuVo.java new file mode 100644 index 0000000000..4c82a6b754 --- /dev/null +++ b/yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanuVo.java @@ -0,0 +1,64 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.as.api.asserviceclaimanu; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-as(索赔厂家管理)
+ * File: AsServiceClaimanuVo.java
+ * Class: com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanuVo
+ * Description: 索赔厂家管理 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-07-11 10:25:03
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "索赔厂家管理 视图数据对象", description = "索赔厂家管理 视图数据对象") +public class AsServiceClaimanuVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("索赔厂家编号") + private String claiManuNo; // 索赔厂家编号 + @ApiModelProperty("索赔厂家名称") + private String claiManuName; // 索赔厂家名称 + @ApiModelProperty("排序") + private Integer sortNo; // 排序 + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("门店") + private String useOrgName; +} diff --git a/yxt-as/src/main/java/com/yxt/anrui/as/biz/asserviceclaimanu/AsServiceClaimanuMapper.java b/yxt-as/src/main/java/com/yxt/anrui/as/biz/asserviceclaimanu/AsServiceClaimanuMapper.java new file mode 100644 index 0000000000..4ed665035b --- /dev/null +++ b/yxt-as/src/main/java/com/yxt/anrui/as/biz/asserviceclaimanu/AsServiceClaimanuMapper.java @@ -0,0 +1,70 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.as.biz.asserviceclaimanu; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanu; +import com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanuVo; +import org.apache.ibatis.annotations.Update; + +import java.util.List; + +/** + * Project: yxt-as(索赔厂家管理)
+ * File: AsServiceClaimanuMapper.java
+ * Class: com.yxt.anrui.as.biz.asserviceclaimanu.AsServiceClaimanuMapper
+ * Description: 索赔厂家管理.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-07-11 10:25:03
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface AsServiceClaimanuMapper extends BaseMapper { + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + @Update("update as_service_claimanu set isDelete = '1' where sid = #{sid}") + void updateIsDel(String sid); + + @Select("select * from as_service_claimanu where sid = #{sid} and isDelete = '0'") + AsServiceClaimanu fetchIsDeleteBySid(String sid); + + @Select("select count(*) from as_service_claimanu where claiManuNo = #{claiManuNo} and useOrgSid = #{useOrgSid} and isDelete = '0'") + int checkByCodeAndUseOrgSid(@Param("claiManuNo") String claiManuNo,@Param("useOrgSid") String useOrgSid); + + @Select("select count(*) from as_service_claimanu where claiManuNo = #{claiManuNo} and useOrgSid = #{useOrgSid} and sid != #{dtoSid} and isDelete = '0'") + int checkSidByCodeAndUseOrgSid(@Param("claiManuNo") String claiManuNo,@Param("useOrgSid") String useOrgSid,@Param("dtoSid") String dtoSid); +} \ No newline at end of file diff --git a/yxt-as/src/main/java/com/yxt/anrui/as/biz/asserviceclaimanu/AsServiceClaimanuMapper.xml b/yxt-as/src/main/java/com/yxt/anrui/as/biz/asserviceclaimanu/AsServiceClaimanuMapper.xml new file mode 100644 index 0000000000..a29bcede6b --- /dev/null +++ b/yxt-as/src/main/java/com/yxt/anrui/as/biz/asserviceclaimanu/AsServiceClaimanuMapper.xml @@ -0,0 +1,11 @@ + + + + + + + \ No newline at end of file diff --git a/yxt-as/src/main/java/com/yxt/anrui/as/biz/asserviceclaimanu/AsServiceClaimanuRest.java b/yxt-as/src/main/java/com/yxt/anrui/as/biz/asserviceclaimanu/AsServiceClaimanuRest.java new file mode 100644 index 0000000000..1716f3817a --- /dev/null +++ b/yxt-as/src/main/java/com/yxt/anrui/as/biz/asserviceclaimanu/AsServiceClaimanuRest.java @@ -0,0 +1,91 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.as.biz.asserviceclaimanu; + +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.*; + +import com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanuQuery; +import com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanuVo; +import com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanuDetailsVo; +import com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanuDto; + +/** + * Project: yxt-as(索赔厂家管理)
+ * File: AsServiceClaimanuFeignFallback.java
+ * Class: com.yxt.anrui.as.biz.asserviceclaimanu.AsServiceClaimanuRest
+ * Description: 索赔厂家管理.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-07-11 10:25:03
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "索赔厂家管理") +@RestController +@RequestMapping("v1/asserviceclaimanu") +public class AsServiceClaimanuRest { + + @Autowired + private AsServiceClaimanuService asServiceClaimanuService; + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = asServiceClaimanuService.listPageVo(pq); + return rb.success().setData(pv); + } + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody AsServiceClaimanuDto dto){ + return asServiceClaimanuService.saveOrUpdateDto(dto); + } + + @ApiOperation("根据sid批量删除") + @DeleteMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + asServiceClaimanuService.updateIsDel(sids); + return rb.success(); + } + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + AsServiceClaimanuDetailsVo vo = asServiceClaimanuService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } +} diff --git a/yxt-as/src/main/java/com/yxt/anrui/as/biz/asserviceclaimanu/AsServiceClaimanuService.java b/yxt-as/src/main/java/com/yxt/anrui/as/biz/asserviceclaimanu/AsServiceClaimanuService.java new file mode 100644 index 0000000000..403f5ec508 --- /dev/null +++ b/yxt-as/src/main/java/com/yxt/anrui/as/biz/asserviceclaimanu/AsServiceClaimanuService.java @@ -0,0 +1,203 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.as.biz.asserviceclaimanu; + +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.as.feign.portal.privilege.PrivilegeQuery; +import com.yxt.anrui.as.feign.portal.sysorganization.SysOrganizationFeign; +import com.yxt.anrui.as.feign.portal.sysorganization.SysOrganizationVo; +import com.yxt.anrui.as.feign.portal.sysstafforg.SysStaffOrgFeign; +import com.yxt.anrui.as.feign.portal.sysuser.SysUserFeign; +import org.apache.commons.lang3.StringUtils; +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 com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanu; +import com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanuQuery; +import com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanuVo; +import com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanuDetailsVo; +import com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanuDto; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Arrays; +import java.util.List; + +/** + * Project: yxt-as(索赔厂家管理)
+ * File: AsServiceClaimanuService.java
+ * Class: com.yxt.anrui.as.biz.asserviceclaimanu.AsServiceClaimanuService
+ * Description: 索赔厂家管理 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-07-11 10:25:03
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class AsServiceClaimanuService extends MybatisBaseService { + + @Autowired + private SysStaffOrgFeign sysStaffOrgFeign; + @Autowired + private SysOrganizationFeign sysOrganizationFeign; + @Autowired + private SysUserFeign sysUserFeign; + + public PagerVo listPageVo(PagerQuery pq) { + AsServiceClaimanuQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + //========================================数据授权开始 + if (StringUtils.isNotBlank(query.getMenuUrl())) { + PrivilegeQuery privilegeQuery = new PrivilegeQuery(); + privilegeQuery.setOrgPath(query.getOrgPath()); + privilegeQuery.setMenuUrl(query.getMenuUrl()); + privilegeQuery.setUserSid(query.getUserSid()); + ResultBean defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery); + if (StringUtils.isNotBlank(defaultIdReltBean.getData())) { + //数据权限ID(1集团、2事业部、3分公司、4部门、5个人) + String orgSidPath = query.getOrgPath(); + orgSidPath = orgSidPath + "/"; + int i1 = orgSidPath.indexOf("/"); + int i2 = orgSidPath.indexOf("/", i1 + 1); + int i3 = orgSidPath.indexOf("/", i2 + 1); + int i4 = orgSidPath.indexOf("/", i3 + 1); + String orgLevelKey = defaultIdReltBean.getData(); + if ("1".equals(orgLevelKey)) { + orgSidPath = orgSidPath.substring(0, i1); + qw.like("s.orgSidPath", orgSidPath); + } else if ("2".equals(orgLevelKey)) { + orgSidPath = orgSidPath.substring(0, i2); + qw.like("s.orgSidPath", orgSidPath); + } else if ("3".equals(orgLevelKey)) { + orgSidPath = orgSidPath.substring(0, i3); + qw.like("s.orgSidPath", orgSidPath); + } else if ("4".equals(orgLevelKey)) { + orgSidPath = orgSidPath.substring(0, i4); + qw.like("s.orgSidPath", orgSidPath); + } else if ("5".equals(orgLevelKey)) { + qw.eq("ac.createBySid", query.getUserSid()); + } else { + PagerVo p = new PagerVo<>(); + return p; + } + } else { + PagerVo p = new PagerVo<>(); + return p; + } + } + if (StringUtils.isNotBlank(query.getClaiManuName())) { + qw.like("ac.claiManuName", query.getClaiManuName()); + } + qw.orderByAsc("ac.sortNo"); + qw.eq("ac.isDelete", 0); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public ResultBean saveOrUpdateDto(AsServiceClaimanuDto dto){ + ResultBean rb = ResultBean.fireFail(); + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + String deptName = ""; + String deptSid = ""; + String createOrgSid = ""; + String orgPath = dto.getOrgPath(); + if (StringUtils.isNotBlank(orgPath)) { + List split = Arrays.asList(orgPath.split("/")); + if (split.size() > 1) { + //获取本级sid获取本级部门信息 + SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(split.get(split.size() - 1)).getData(); + deptName = sysOrganization.getName(); + deptSid = sysOrganization.getSid(); + } else { + SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(split.get(0)).getData(); + deptName = sysOrganization.getName(); + deptSid = sysOrganization.getSid(); + } + dto.setUseOrgSid(deptSid); + dto.setUseOrgName(deptName); + createOrgSid = sysStaffOrgFeign.getOrgSidByPath(orgPath).getData(); + //创建组织使用组织 + ResultBean organizationResultBean = sysOrganizationFeign.fetchBySid(createOrgSid); + if (organizationResultBean.getData() != null) { + dto.setCreateOrgSid(createOrgSid); + dto.setCreateOrgName(organizationResultBean.getData().getName()); + } + } + int i = baseMapper.checkByCodeAndUseOrgSid(dto.getClaiManuNo(), dto.getUseOrgSid()); + if (i > 0) { + return rb.setMsg("编码已存在"); + } + this.insertByDto(dto); + return rb.success(); + } + int i = baseMapper.checkSidByCodeAndUseOrgSid(dto.getClaiManuNo(), dto.getUseOrgSid(), dtoSid); + if (i > 0) { + return rb.setMsg("编码已存在"); + } + this.updateByDto(dto); + return rb.success(); + } + + public void insertByDto(AsServiceClaimanuDto dto){ + AsServiceClaimanu entity = new AsServiceClaimanu(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(AsServiceClaimanuDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + AsServiceClaimanu entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public AsServiceClaimanuDetailsVo fetchDetailsVoBySid(String sid){ + AsServiceClaimanu entity = baseMapper.fetchIsDeleteBySid(sid); + AsServiceClaimanuDetailsVo vo = new AsServiceClaimanuDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } + + public void updateIsDel(String[] sids) { + for (String sid : sids) { + baseMapper.updateIsDel(sid); + } + } +} \ No newline at end of file