9 changed files with 710 additions and 0 deletions
@ -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(索赔厂家管理) <br/> |
||||
|
* File: AsServiceClaimanu.java <br/> |
||||
|
* Class: com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanu <br/> |
||||
|
* Description: 索赔厂家管理. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2024-07-11 10:25:03 <br/> |
||||
|
* |
||||
|
* @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
|
||||
|
|
||||
|
} |
@ -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(索赔厂家管理) <br/> |
||||
|
* File: AsServiceClaimanuVo.java <br/> |
||||
|
* Class: com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanuVo <br/> |
||||
|
* Description: 索赔厂家管理 视图数据对象. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2024-07-11 10:25:03 <br/> |
||||
|
* |
||||
|
* @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
|
||||
|
|
||||
|
} |
@ -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(索赔厂家管理) <br/> |
||||
|
* File: AsServiceClaimanuDto.java <br/> |
||||
|
* Class: com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanuDto <br/> |
||||
|
* Description: 索赔厂家管理 数据传输对象. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2024-07-11 10:25:03 <br/> |
||||
|
* |
||||
|
* @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; |
||||
|
} |
@ -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(索赔厂家管理) <br/> |
||||
|
* File: AsServiceClaimanuQuery.java <br/> |
||||
|
* Class: com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanuQuery <br/> |
||||
|
* Description: 索赔厂家管理 查询条件. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2024-07-11 10:25:03 <br/> |
||||
|
* |
||||
|
* @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; |
||||
|
} |
@ -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(索赔厂家管理) <br/> |
||||
|
* File: AsServiceClaimanuVo.java <br/> |
||||
|
* Class: com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanuVo <br/> |
||||
|
* Description: 索赔厂家管理 视图数据对象. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2024-07-11 10:25:03 <br/> |
||||
|
* |
||||
|
* @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; |
||||
|
} |
@ -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(索赔厂家管理) <br/> |
||||
|
* File: AsServiceClaimanuMapper.java <br/> |
||||
|
* Class: com.yxt.anrui.as.biz.asserviceclaimanu.AsServiceClaimanuMapper <br/> |
||||
|
* Description: 索赔厂家管理. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2024-07-11 10:25:03 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface AsServiceClaimanuMapper extends BaseMapper<AsServiceClaimanu> { |
||||
|
|
||||
|
IPage<AsServiceClaimanuVo> selectPageVo(IPage<AsServiceClaimanu> page, @Param(Constants.WRAPPER) Wrapper<AsServiceClaimanu> 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); |
||||
|
} |
@ -0,0 +1,11 @@ |
|||||
|
<?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.as.biz.asserviceclaimanu.AsServiceClaimanuMapper"> |
||||
|
<!-- <where> ${ew.sqlSegment} </where>--> |
||||
|
<!-- ${ew.customSqlSegment} --> |
||||
|
<select id="selectPageVo" resultType="com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanuVo"> |
||||
|
SELECT * FROM as_service_claimanu ac |
||||
|
LEFT JOIN anrui_portal.sys_organization as s ON ac.useOrgSid = s.sid |
||||
|
<where> ${ew.sqlSegment} </where> |
||||
|
</select> |
||||
|
</mapper> |
@ -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(索赔厂家管理) <br/> |
||||
|
* File: AsServiceClaimanuFeignFallback.java <br/> |
||||
|
* Class: com.yxt.anrui.as.biz.asserviceclaimanu.AsServiceClaimanuRest <br/> |
||||
|
* Description: 索赔厂家管理. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2024-07-11 10:25:03 <br/> |
||||
|
* |
||||
|
* @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<PagerVo<AsServiceClaimanuVo>> listPage(@RequestBody PagerQuery<AsServiceClaimanuQuery> pq){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
PagerVo<AsServiceClaimanuVo> 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<AsServiceClaimanuDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid){ |
||||
|
ResultBean rb = ResultBean.fireFail(); |
||||
|
AsServiceClaimanuDetailsVo vo = asServiceClaimanuService.fetchDetailsVoBySid(sid); |
||||
|
return rb.success().setData(vo); |
||||
|
} |
||||
|
} |
@ -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(索赔厂家管理) <br/> |
||||
|
* File: AsServiceClaimanuService.java <br/> |
||||
|
* Class: com.yxt.anrui.as.biz.asserviceclaimanu.AsServiceClaimanuService <br/> |
||||
|
* Description: 索赔厂家管理 业务逻辑. <br/> |
||||
|
* Copyright: Copyright (c) 2011 <br/> |
||||
|
* Company: https://gitee.com/liuzp315 <br/>
|
||||
|
* Makedate: 2024-07-11 10:25:03 <br/> |
||||
|
* |
||||
|
* @author liupopo |
||||
|
* @version 1.0 |
||||
|
* @since 1.0 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class AsServiceClaimanuService extends MybatisBaseService<AsServiceClaimanuMapper, AsServiceClaimanu> { |
||||
|
|
||||
|
@Autowired |
||||
|
private SysStaffOrgFeign sysStaffOrgFeign; |
||||
|
@Autowired |
||||
|
private SysOrganizationFeign sysOrganizationFeign; |
||||
|
@Autowired |
||||
|
private SysUserFeign sysUserFeign; |
||||
|
|
||||
|
public PagerVo<AsServiceClaimanuVo> listPageVo(PagerQuery<AsServiceClaimanuQuery> pq) { |
||||
|
AsServiceClaimanuQuery query = pq.getParams(); |
||||
|
QueryWrapper<AsServiceClaimanu> 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<String> 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<AsServiceClaimanuVo> p = new PagerVo<>(); |
||||
|
return p; |
||||
|
} |
||||
|
} else { |
||||
|
PagerVo<AsServiceClaimanuVo> 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<AsServiceClaimanu> page = PagerUtil.queryToPage(pq); |
||||
|
IPage<AsServiceClaimanuVo> pagging = baseMapper.selectPageVo(page, qw); |
||||
|
PagerVo<AsServiceClaimanuVo> 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<String> 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<SysOrganizationVo> 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); |
||||
|
} |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue