37 changed files with 616 additions and 209 deletions
@ -1,13 +0,0 @@ |
|||
package com.supervise.rms.api.customersupplier; |
|||
|
|||
import io.swagger.annotations.Api; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
|
|||
@Api(tags = "风险表") |
|||
@FeignClient( |
|||
contextId = "yxt-supervise-CustomerSupplier", |
|||
name = "yxt-supervise", |
|||
path = "v1/risk", |
|||
fallback = CustomerSupplierFeignFallback.class) |
|||
public interface CustomerSupplierFeign { |
|||
} |
@ -1,7 +0,0 @@ |
|||
package com.supervise.rms.api.customersupplier; |
|||
|
|||
import org.springframework.stereotype.Component; |
|||
|
|||
@Component |
|||
public class CustomerSupplierFeignFallback implements CustomerSupplierFeign { |
|||
} |
@ -1,25 +0,0 @@ |
|||
package com.supervise.rms.api.customersupplierindex; |
|||
|
|||
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("risk") |
|||
public class CustomerSupplierIndex extends BaseEntity { |
|||
@ApiModelProperty("风险指标Sid") |
|||
private String riskIndicatorsSid; |
|||
@ApiModelProperty("风险处理状态0.待处理1.处理中2.完成") |
|||
private Integer riskTreatmentStatus; |
|||
@ApiModelProperty("风险消除程度0.未消除1.已消除") |
|||
private Integer riskEliminationDegree; |
|||
@ApiModelProperty("客户Sid") |
|||
private String customerSid; |
|||
@ApiModelProperty("风险处于位置1.供应商2.一类仓3.门店仓") |
|||
private Integer riskInPositionNum; |
|||
@ApiModelProperty("风险处于位置Sid") |
|||
private String riskInPositionSid; |
|||
} |
@ -1,22 +0,0 @@ |
|||
package com.supervise.rms.api.customersupplierindex; |
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class CustomerSupplierIndexDto implements Dto { |
|||
private String sid; |
|||
@ApiModelProperty("风险指标Sid") |
|||
private String riskIndicatorsSid; |
|||
@ApiModelProperty("风险处理状态0.待处理1.处理中2.完成") |
|||
private Integer riskTreatmentStatus; |
|||
@ApiModelProperty("风险消除程度0.未消除1.已消除") |
|||
private Integer riskEliminationDegree; |
|||
@ApiModelProperty("客户Sid") |
|||
private String customerSid; |
|||
@ApiModelProperty("风险处于位置1.供应商2.一类仓3.门店仓") |
|||
private Integer riskInPositionNum; |
|||
@ApiModelProperty("风险处于位置Sid") |
|||
private String riskInPositionSid; |
|||
} |
@ -1,13 +0,0 @@ |
|||
package com.supervise.rms.api.customersupplierindex; |
|||
|
|||
import io.swagger.annotations.Api; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
|
|||
@Api(tags = "风险表") |
|||
@FeignClient( |
|||
contextId = "yxt-supervise-CustomerSupplierIndex", |
|||
name = "yxt-supervise", |
|||
path = "v1/risk", |
|||
fallback = CustomerSupplierIndexFeignFallback.class) |
|||
public interface CustomerSupplierIndexFeign { |
|||
} |
@ -1,7 +0,0 @@ |
|||
package com.supervise.rms.api.customersupplierindex; |
|||
|
|||
import org.springframework.stereotype.Component; |
|||
|
|||
@Component |
|||
public class CustomerSupplierIndexFeignFallback implements CustomerSupplierIndexFeign { |
|||
} |
@ -1,22 +0,0 @@ |
|||
package com.supervise.rms.api.customersupplierindex; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class CustomerSupplierIndexVo implements Vo { |
|||
private String sid; |
|||
@ApiModelProperty("风险指标Sid") |
|||
private String riskIndicatorsSid; |
|||
@ApiModelProperty("风险处理状态0.待处理1.处理中2.完成") |
|||
private Integer riskTreatmentStatus; |
|||
@ApiModelProperty("风险消除程度0.未消除1.已消除") |
|||
private Integer riskEliminationDegree; |
|||
@ApiModelProperty("客户Sid") |
|||
private String customerSid; |
|||
@ApiModelProperty("风险处于位置1.供应商2.一类仓3.门店仓") |
|||
private Integer riskInPositionNum; |
|||
@ApiModelProperty("风险处于位置Sid") |
|||
private String riskInPositionSid; |
|||
} |
@ -0,0 +1,57 @@ |
|||
package com.supervise.rms.api.supplier; |
|||
|
|||
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_supervise(宇信通监管) <br/> |
|||
* File: SupplierInfo.java <br/> |
|||
* Class: com.supervise.api.supplierinfo.SupplierInfo <br/> |
|||
* Description: 供应商信息. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-11-11 11:40:30 <br/> |
|||
* |
|||
* @author dongjianzhao |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "风险表", description = "风险表") |
|||
@TableName("supplier") |
|||
public class Supplier extends BaseEntity { |
|||
@ApiModelProperty("名称") |
|||
private String name; // 名称
|
|||
@ApiModelProperty("统一编码") |
|||
private String codeUnified; // 统一编码
|
|||
@ApiModelProperty("联系人") |
|||
private String contacts; // 联系人
|
|||
@ApiModelProperty("电话") |
|||
private String telephone; // 电话
|
|||
@ApiModelProperty("地址") |
|||
private String address; // 地址
|
|||
@ApiModelProperty("银行帐户") |
|||
private String bankAccount; // 银行帐户
|
|||
@ApiModelProperty("帐号") |
|||
private String bankAccountNumber; // 帐号
|
|||
@ApiModelProperty("开户行名称") |
|||
private String bankName; // 开户行名称
|
|||
@ApiModelProperty("法人") |
|||
private String legalRepresentative; // 法人
|
|||
@ApiModelProperty("营业执照号") |
|||
private String businessLicenseNo; // 营业执照号
|
|||
@ApiModelProperty("监管审核状态0待审核1为通过2为拒绝") |
|||
private Integer purchaseRequisition; // 监管审核状态0待审核1为通过2为拒绝
|
|||
@ApiModelProperty("监管审批意见") |
|||
private String purchaseRemarks; // 监管审批意见
|
|||
@ApiModelProperty("银行0未审核,1审核通过,2审核不通过") |
|||
private Integer bankState; // 银行0未审核,1审核通过,2审核不通过
|
|||
@ApiModelProperty("银行审批意见") |
|||
private String bankRemarks; // 银行审批意见
|
|||
@ApiModelProperty("锁定状态1.锁定2.未锁定 ") |
|||
private Integer lockingStatus; |
|||
@ApiModelProperty("锁定原因") |
|||
private String lockingReason; |
|||
} |
@ -0,0 +1,59 @@ |
|||
package com.supervise.rms.api.supplier; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: supervise(supervise) <br/> |
|||
* File: SupplierBankInfoVo.java <br/> |
|||
* Class: com.yxt.supervise.portal.api.supplierbankinfo.SupplierBankInfoVo <br/> |
|||
* Description: 供应商信息 视图数据对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-12-12 22:02:22 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "供应商信息 视图数据详情", description = "供应商信息 视图数据详情") |
|||
public class SupplierDetailsVo implements Vo { |
|||
|
|||
@ApiModelProperty("名称") |
|||
private String name; // 名称
|
|||
@ApiModelProperty("统一编码") |
|||
private String codeUnified; // 统一编码
|
|||
@ApiModelProperty("联系人") |
|||
private String contacts; // 联系人
|
|||
@ApiModelProperty("电话") |
|||
private String telephone; // 电话
|
|||
@ApiModelProperty("地址") |
|||
private String address; // 地址
|
|||
@ApiModelProperty("银行帐户") |
|||
private String bankAccount; // 银行帐户
|
|||
@ApiModelProperty("帐号") |
|||
private String bankAccountNumber; // 帐号
|
|||
@ApiModelProperty("开户行名称") |
|||
private String bankName; // 开户行名称
|
|||
@ApiModelProperty("法人") |
|||
private String legalRepresentative; // 法人
|
|||
@ApiModelProperty("营业执照号") |
|||
private String businessLicenseNo; // 营业执照号
|
|||
@ApiModelProperty("监管审核状态0待审核1为通过2为拒绝") |
|||
private Integer purchaseRequisition; // 监管审核状态0待审核1为通过2为拒绝
|
|||
@ApiModelProperty("监管审批意见") |
|||
private String purchaseRemarks; // 监管审批意见
|
|||
@ApiModelProperty("银行0未审核,1审核通过,2审核不通过") |
|||
private Integer bankState; // 银行0未审核,1审核通过,2审核不通过
|
|||
@ApiModelProperty("银行审批意见") |
|||
private String bankRemarks; // 银行审批意见
|
|||
@ApiModelProperty("营业执照附件") |
|||
private String[] businessLicenseFiles; // 营业执照附件
|
|||
@ApiModelProperty("合同照片") |
|||
private String[] contractFiles; // 合同照片
|
|||
// @ApiModelProperty("合同信息")
|
|||
// private SupplierContractInfoDto supplierContractInfoDto; // 合同信息
|
|||
} |
@ -0,0 +1,42 @@ |
|||
package com.supervise.rms.api.supplier; |
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class SupplierDto implements Dto { |
|||
private String sid; |
|||
@ApiModelProperty("名称") |
|||
private String name; // 名称
|
|||
@ApiModelProperty("统一编码") |
|||
private String codeUnified; // 统一编码
|
|||
@ApiModelProperty("联系人") |
|||
private String contacts; // 联系人
|
|||
@ApiModelProperty("电话") |
|||
private String telephone; // 电话
|
|||
@ApiModelProperty("地址") |
|||
private String address; // 地址
|
|||
@ApiModelProperty("银行帐户") |
|||
private String bankAccount; // 银行帐户
|
|||
@ApiModelProperty("帐号") |
|||
private String bankAccountNumber; // 帐号
|
|||
@ApiModelProperty("开户行名称") |
|||
private String bankName; // 开户行名称
|
|||
@ApiModelProperty("法人") |
|||
private String legalRepresentative; // 法人
|
|||
@ApiModelProperty("营业执照号") |
|||
private String businessLicenseNo; // 营业执照号
|
|||
@ApiModelProperty("监管审核状态0待审核1为通过2为拒绝") |
|||
private Integer purchaseRequisition; // 监管审核状态0待审核1为通过2为拒绝
|
|||
@ApiModelProperty("监管审批意见") |
|||
private String purchaseRemarks; // 监管审批意见
|
|||
@ApiModelProperty("银行0未审核,1审核通过,2审核不通过") |
|||
private Integer bankState; // 银行0未审核,1审核通过,2审核不通过
|
|||
@ApiModelProperty("银行审批意见") |
|||
private String bankRemarks; // 银行审批意见
|
|||
@ApiModelProperty("锁定状态1.锁定2.未锁定 ") |
|||
private Integer lockingStatus; |
|||
@ApiModelProperty("锁定原因") |
|||
private String lockingReason; |
|||
} |
@ -0,0 +1,32 @@ |
|||
package com.supervise.rms.api.supplier; |
|||
|
|||
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.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
|
|||
@Api(tags = "供应商表") |
|||
@FeignClient( |
|||
contextId = "yxt-supervise-Supplier", |
|||
name = "yxt-supervise", |
|||
path = "v1/risk", |
|||
fallback = SupplierFeignFallback.class) |
|||
public interface SupplierFeign { |
|||
@ApiOperation("保存供应商") |
|||
@PostMapping("/saveSupplier") |
|||
ResultBean saveSupplier(SupplierDto supplierDto); |
|||
|
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
ResultBean<PagerVo<SupplierVo>> listPage(@RequestBody PagerQuery<SupplierQuery> pq); |
|||
|
|||
@ApiOperation("根据SID获取一条记录") |
|||
@GetMapping("/fetchDetailsBySid/{sid}") |
|||
ResultBean<SupplierDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid); |
|||
} |
@ -0,0 +1,7 @@ |
|||
package com.supervise.rms.api.supplier; |
|||
|
|||
import org.springframework.stereotype.Component; |
|||
|
|||
@Component |
|||
public class SupplierFeignFallback implements SupplierFeign { |
|||
} |
@ -0,0 +1,51 @@ |
|||
package com.supervise.rms.api.supplier; |
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
/** |
|||
* Project: supervise(supervise) <br/> |
|||
* File: SupplierBankInfoQuery.java <br/> |
|||
* Class: com.yxt.supervise.portal.api.supplierbankinfo.SupplierBankInfoQuery <br/> |
|||
* Description: 供应商信息 查询条件. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-12-12 22:02:22 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Data |
|||
@ApiModel(value = "供应商信息 查询条件", description = "供应商信息 查询条件") |
|||
public class SupplierQuery implements Query { |
|||
@ApiModelProperty("名称") |
|||
private String name; // 名称
|
|||
@ApiModelProperty("统一编码") |
|||
private String codeUnified; // 统一编码
|
|||
@ApiModelProperty("联系人") |
|||
private String contacts; // 联系人
|
|||
@ApiModelProperty("电话") |
|||
private String telephone; // 电话
|
|||
@ApiModelProperty("地址") |
|||
private String address; // 地址
|
|||
@ApiModelProperty("银行帐户") |
|||
private String bankAccount; // 银行帐户
|
|||
@ApiModelProperty("帐号") |
|||
private String bankAccountNumber; // 帐号
|
|||
@ApiModelProperty("开户行名称") |
|||
private String bankName; // 开户行名称
|
|||
@ApiModelProperty("法人") |
|||
private String legalRepresentative; // 法人
|
|||
@ApiModelProperty("营业执照号") |
|||
private String businessLicenseNo; // 营业执照号
|
|||
@ApiModelProperty("监管审核状态0待审核1为通过2为拒绝") |
|||
private Integer purchaseRequisition; // 监管审核状态0待审核1为通过2为拒绝
|
|||
@ApiModelProperty("监管审批意见") |
|||
private String purchaseRemarks; // 监管审批意见
|
|||
@ApiModelProperty("银行0未审核,1审核通过,2审核不通过") |
|||
private Integer bankState; // 银行0未审核,1审核通过,2审核不通过
|
|||
@ApiModelProperty("银行审批意见") |
|||
private String bankRemarks; // 银行审批意见
|
|||
} |
@ -0,0 +1,42 @@ |
|||
package com.supervise.rms.api.supplier; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class SupplierVo implements Vo { |
|||
private String sid; |
|||
@ApiModelProperty("名称") |
|||
private String name; // 名称
|
|||
@ApiModelProperty("统一编码") |
|||
private String codeUnified; // 统一编码
|
|||
@ApiModelProperty("联系人") |
|||
private String contacts; // 联系人
|
|||
@ApiModelProperty("电话") |
|||
private String telephone; // 电话
|
|||
@ApiModelProperty("地址") |
|||
private String address; // 地址
|
|||
@ApiModelProperty("银行帐户") |
|||
private String bankAccount; // 银行帐户
|
|||
@ApiModelProperty("帐号") |
|||
private String bankAccountNumber; // 帐号
|
|||
@ApiModelProperty("开户行名称") |
|||
private String bankName; // 开户行名称
|
|||
@ApiModelProperty("法人") |
|||
private String legalRepresentative; // 法人
|
|||
@ApiModelProperty("营业执照号") |
|||
private String businessLicenseNo; // 营业执照号
|
|||
@ApiModelProperty("监管审核状态0待审核1为通过2为拒绝") |
|||
private Integer purchaseRequisition; // 监管审核状态0待审核1为通过2为拒绝
|
|||
@ApiModelProperty("监管审批意见") |
|||
private String purchaseRemarks; // 监管审批意见
|
|||
@ApiModelProperty("银行0未审核,1审核通过,2审核不通过") |
|||
private Integer bankState; // 银行0未审核,1审核通过,2审核不通过
|
|||
@ApiModelProperty("银行审批意见") |
|||
private String bankRemarks; // 银行审批意见
|
|||
@ApiModelProperty("锁定状态1.锁定2.未锁定 ") |
|||
private Integer lockingStatus; |
|||
@ApiModelProperty("锁定原因") |
|||
private String lockingReason; |
|||
} |
@ -1,11 +1,11 @@ |
|||
package com.supervise.rms.api.customersupplier; |
|||
package com.supervise.rms.api.supplierindex; |
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class CustomerSupplierDto implements Dto { |
|||
public class SupplierIndexDto implements Dto { |
|||
private String sid; |
|||
@ApiModelProperty("风险指标Sid") |
|||
private String riskIndicatorsSid; |
@ -0,0 +1,13 @@ |
|||
package com.supervise.rms.api.supplierindex; |
|||
|
|||
import io.swagger.annotations.Api; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
|
|||
@Api(tags = "风险表") |
|||
@FeignClient( |
|||
contextId = "yxt-supervise-SupplierIndex", |
|||
name = "yxt-supervise", |
|||
path = "v1/risk", |
|||
fallback = SupplierIndexFeignFallback.class) |
|||
public interface SupplierIndexFeign { |
|||
} |
@ -0,0 +1,7 @@ |
|||
package com.supervise.rms.api.supplierindex; |
|||
|
|||
import org.springframework.stereotype.Component; |
|||
|
|||
@Component |
|||
public class SupplierIndexFeignFallback implements SupplierIndexFeign { |
|||
} |
@ -1,11 +1,11 @@ |
|||
package com.supervise.rms.api.customersupplier; |
|||
package com.supervise.rms.api.supplierindex; |
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class CustomerSupplierVo implements Vo { |
|||
public class SupplierIndexVo implements Vo { |
|||
private String sid; |
|||
@ApiModelProperty("风险指标Sid") |
|||
private String riskIndicatorsSid; |
@ -1,4 +0,0 @@ |
|||
package com.supervise.rms.biz.customersupplier; |
|||
|
|||
public class CustomerSupplierRest { |
|||
} |
@ -1,20 +0,0 @@ |
|||
package com.supervise.rms.biz.customersupplier; |
|||
|
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* Project: yxt-supervise(宇信通监管) <br/> |
|||
* File: RestrictedBrandService.java <br/> |
|||
* Class: com.yxt.supervise.rms.biz.auditingsupplier.CustomerSupplierService <br/> |
|||
* Description: 供应商审核 业务逻辑. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-11-22 21:47:10 <br/> |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Service |
|||
public class CustomerSupplierService { |
|||
|
|||
} |
@ -1,11 +0,0 @@ |
|||
package com.supervise.rms.biz.customersupplierindex; |
|||
|
|||
import com.supervise.rms.api.risk.Risk; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
@Service |
|||
public class CustomerSupplierIndexService extends MybatisBaseService<CustomerSupplierIndexMapper, Risk> { |
|||
|
|||
|
|||
} |
@ -0,0 +1,37 @@ |
|||
package com.supervise.rms.biz.supplier; |
|||
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 com.supervise.rms.api.risk.Risk; |
|||
import com.supervise.rms.api.supplier.Supplier; |
|||
import com.supervise.rms.api.supplier.SupplierVo; |
|||
import org.apache.ibatis.annotations.*; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
@Mapper |
|||
public interface SupplierMapper extends BaseMapper<Supplier> { |
|||
|
|||
|
|||
IPage<SupplierVo> selectPageVo(IPage<Supplier> page, @Param(Constants.WRAPPER) Wrapper<Supplier> qw); |
|||
|
|||
List<SupplierVo> selectListAllVo(@Param(Constants.WRAPPER) Wrapper<Supplier> qw); |
|||
|
|||
@Select("select * from supplier_bank_info") |
|||
List<SupplierVo> selectListVo(); |
|||
int delBySids(@Param("list") String[] split); |
|||
@Delete("delete from supplier_files where mainSid=#{mainSid} and type=#{type}") |
|||
void deleteSupplierFiles(@Param("mainSid")String sid, @Param("type") String type); |
|||
|
|||
void insertSupplierFiles(List<Map<String, String>> maps); |
|||
@Select("select * from supplier_bank_info where sid=#{sid}") |
|||
Supplier selectBySid(@Param("sid")String sid); |
|||
@Select("select GROUP_CONCAT(url) url from supplier_files where mainSid=#{mainSid} and type=#{type}") |
|||
String selectSupplierFiles(@Param("mainSid")String mainSid, @Param("type") String type); |
|||
@Select("select * from supplier_bank_info where codeUnified=#{codeUnified}") |
|||
Supplier selectByCode(@Param("codeUnified") String codeUnified); |
|||
@Insert("insert INTO supplier_index(code, name,PSid) values (#{code},#{name},#{sid})") |
|||
void insertSUpplierIndex( @Param("code")String code,@Param("name") String name,@Param("sid")String sid); |
|||
} |
@ -0,0 +1,28 @@ |
|||
<?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.supervise.rms.biz.supplier.SupplierMapper"> |
|||
<select id="selectPageVo" resultType="com.supervise.rms.api.supplier.SupplierVo"> |
|||
SELECT * FROM supplier <where> ${ew.sqlSegment} </where> |
|||
</select> |
|||
|
|||
<select id="selectListAllVo" resultType="com.supervise.rms.api.supplier.SupplierVo"> |
|||
SELECT * FROM supplier <where> ${ew.sqlSegment} </where> |
|||
</select> |
|||
<delete id="delBySids" > |
|||
delete from supplier where sid in |
|||
<foreach collection="list" item="item" index="index" open="(" separator="," close=")"> |
|||
#{item} |
|||
</foreach> |
|||
</delete> |
|||
<insert id="insertSupplierFiles"> |
|||
insert into supplier_files ( sid, url, mainSid, type) values |
|||
<foreach collection="list" item="item" index="index" separator=","> |
|||
( |
|||
#{item.sid,jdbcType=VARCHAR}, |
|||
#{item.url,jdbcType=VARCHAR}, |
|||
#{item.mainSid,jdbcType=VARCHAR}, |
|||
#{item.type,jdbcType=VARCHAR} |
|||
) |
|||
</foreach> |
|||
</insert> |
|||
</mapper> |
@ -0,0 +1,45 @@ |
|||
package com.supervise.rms.biz.supplier; |
|||
|
|||
import com.supervise.rms.api.supplier.*; |
|||
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("com.supervise.rms.biz.supplier.SupplierRest") |
|||
@RequestMapping("v1/supplier") |
|||
public class SupplierRest implements SupplierFeign { |
|||
@Autowired |
|||
private SupplierService supplierService; |
|||
|
|||
@Override |
|||
@ApiOperation("保存供应商") |
|||
@PostMapping("/saveSupplier") |
|||
public ResultBean saveSupplier(SupplierDto supplierDto) { |
|||
return supplierService.saveSupplier(supplierDto); |
|||
} |
|||
|
|||
@Override |
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<SupplierVo>> listPage(@RequestBody PagerQuery<SupplierQuery> pq){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
PagerVo<SupplierVo> pv = supplierService.listPageVo(pq); |
|||
return rb.success().setData(pv); |
|||
} |
|||
|
|||
@Override |
|||
@ApiOperation("根据SID获取一条记录") |
|||
@GetMapping("/fetchDetailsBySid/{sid}") |
|||
public ResultBean<SupplierDetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
SupplierDetailsVo vo = supplierService.fetchDetailsVoBySid(sid); |
|||
// SupplierContractInfoDto supplierContractInfo=supplierContractInfoService.fetchByMainSid(sid);
|
|||
// vo.setSupplierContractInfoDto(supplierContractInfo);
|
|||
return rb.success().setData(vo); |
|||
} |
|||
} |
@ -0,0 +1,111 @@ |
|||
package com.supervise.rms.biz.supplier; |
|||
import cn.hutool.core.bean.BeanUtil; |
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.supervise.rms.api.supplier.*; |
|||
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.BeanUtils; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* Project: yxt-supervise(宇信通监管) <br/> |
|||
* File: RestrictedBrandService.java <br/> |
|||
* Class: com.yxt.supervise.rms.biz.auditingsupplier.SupplierService <br/> |
|||
* Description: 供应商 业务逻辑. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2022-11-22 21:47:10 <br/> |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Service |
|||
public class SupplierService extends MybatisBaseService<SupplierMapper, Supplier> { |
|||
|
|||
public ResultBean saveSupplier(SupplierDto supplierDto) { |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
String sid = supplierDto.getSid(); |
|||
if(StringUtils.isBlank(sid)){ |
|||
//新增
|
|||
Supplier supplier = new Supplier(); |
|||
BeanUtils.copyProperties(supplierDto, supplier,"sid"); |
|||
boolean isSave = save(supplier); |
|||
if(!isSave){ |
|||
return rb.setMsg("保存失败"); |
|||
} |
|||
sid = supplier.getSid(); |
|||
}else{ |
|||
//更新
|
|||
Supplier supplier = fetchBySid(supplierDto.getSid()); |
|||
if(supplier == null){ |
|||
return rb.setMsg("该条记录不存在"); |
|||
} |
|||
BeanUtils.copyProperties(supplierDto, supplier); |
|||
boolean isUpdate = updateById(supplier); |
|||
if(!isUpdate){ |
|||
return rb.setMsg("更新失败"); |
|||
} |
|||
} |
|||
return rb.success().setData(sid).setMsg("保存成功"); |
|||
} |
|||
|
|||
private QueryWrapper<Supplier> createQueryWrapper(SupplierQuery query) { |
|||
// todo: 这里根据具体业务调整查询条件
|
|||
// 多字段Like示例:qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
|
|||
QueryWrapper<Supplier> qw = new QueryWrapper<>(); |
|||
|
|||
if (StringUtils.isNotBlank(query.getCodeUnified())) { |
|||
qw.like("codeUnified", query.getCodeUnified()); |
|||
} |
|||
if (StringUtils.isNotBlank(query.getName())) { |
|||
qw.like("name", query.getName()); |
|||
} |
|||
if (StringUtils.isNotBlank(query.getContacts())) { |
|||
qw.like("contacts", query.getContacts()); |
|||
} |
|||
if (StringUtils.isNotBlank(query.getLegalRepresentative())) { |
|||
qw.like("legalRepresentative", query.getLegalRepresentative()); |
|||
} |
|||
if (StringUtils.isNotBlank(query.getBusinessLicenseNo())) { |
|||
qw.like("businessLicenseNo", query.getBusinessLicenseNo()); |
|||
}if (StringUtils.isNotBlank(query.getBankAccountNumber())) { |
|||
qw.like("bankAccountNumber", query.getBankAccountNumber()); |
|||
} |
|||
return qw; |
|||
} |
|||
|
|||
public PagerVo<SupplierVo> listPageVo(PagerQuery<SupplierQuery> pq) { |
|||
SupplierQuery query = pq.getParams(); |
|||
QueryWrapper<Supplier> qw = createQueryWrapper(query); |
|||
IPage<Supplier> page = PagerUtil.queryToPage(pq); |
|||
IPage<SupplierVo> pagging = baseMapper.selectPageVo(page, qw); |
|||
PagerVo<SupplierVo> p = PagerUtil.pageToVo(pagging, null); |
|||
return p; |
|||
} |
|||
|
|||
public SupplierDetailsVo fetchDetailsVoBySid(String sid){ |
|||
Supplier entity = baseMapper.selectBySid(sid); |
|||
SupplierDetailsVo vo = new SupplierDetailsVo(); |
|||
BeanUtil.copyProperties(entity, vo); |
|||
String s1=baseMapper.selectSupplierFiles(sid,"1"); |
|||
if(StringUtils.isNotBlank(s1)){ |
|||
vo.setBusinessLicenseFiles(s1.split(",")); |
|||
}else{ |
|||
vo.setBusinessLicenseFiles(new String[]{}); |
|||
} |
|||
|
|||
String s2=baseMapper.selectSupplierFiles(sid,"2"); |
|||
if(StringUtils.isNotBlank(s2)){ |
|||
vo.setContractFiles(s2.split(",")); |
|||
}else{ |
|||
vo.setContractFiles(new String[]{}); |
|||
} |
|||
return vo; |
|||
} |
|||
|
|||
} |
@ -1,5 +1,6 @@ |
|||
<?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.supervise.rms.biz.risk.RiskMapper"> |
|||
<mapper namespace="com.supervise.rms.biz.supplierindex.SupplierIndexMapper"> |
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,11 @@ |
|||
package com.supervise.rms.biz.supplierindex; |
|||
|
|||
import com.supervise.rms.api.risk.Risk; |
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
@Service |
|||
public class SupplierIndexService extends MybatisBaseService<SupplierIndexMapper, Risk> { |
|||
|
|||
|
|||
} |
Loading…
Reference in new issue