天眼查询,供应商与企业信息详情等接口完善
parent
e578197c7d
commit
61a8006c10
@ -0,0 +1,153 @@
|
||||
package com.glxp.udidl.admin.controller.tyapi;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.glxp.udidl.admin.entity.tyapi.TyCompanyDetailEntity;
|
||||
import com.glxp.udidl.admin.entity.tyapi.TyCompanySearchEntity;
|
||||
import com.glxp.udidl.admin.entity.tyapi.TySupplierEntity;
|
||||
import com.glxp.udidl.admin.req.tyapi.TyBaseInfoRequest;
|
||||
import com.glxp.udidl.admin.req.tyapi.TyImportSupRequest;
|
||||
import com.glxp.udidl.admin.res.BaseResponse;
|
||||
import com.glxp.udidl.admin.res.tyapi.TyBatchDlResponse;
|
||||
import com.glxp.udidl.admin.res.tyapi.TyContactResponse;
|
||||
import com.glxp.udidl.admin.service.tyapi.TyCompanyDetailService;
|
||||
import com.glxp.udidl.admin.service.tyapi.TyCompanySearchService;
|
||||
import com.glxp.udidl.admin.service.tyapi.TyContactInfoService;
|
||||
import com.glxp.udidl.admin.service.tyapi.TySupplierService;
|
||||
import com.glxp.udidl.admin.util.ResultVOUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Api(tags = "天眼查API下载接口")
|
||||
@RestController
|
||||
public class TyDownloadController {
|
||||
|
||||
|
||||
@Resource
|
||||
TyCompanySearchService tyCompanySearchService;
|
||||
@Resource
|
||||
TySupplierService tySupplierService;
|
||||
@Resource
|
||||
TyCompanyDetailService tyCompanyDetailService;
|
||||
@Resource
|
||||
TyContactInfoService tyContactInfoService;
|
||||
|
||||
|
||||
@ApiOperation(value = "天眼查批量下载供应商列表接口")
|
||||
@PostMapping("/udidl/ty/company/batch/dl/supplier")
|
||||
public BaseResponse imports(@RequestBody TyImportSupRequest tyImportSupRequest) {
|
||||
|
||||
List<String> hospList = new ArrayList<>();
|
||||
if (StrUtil.isNotEmpty(tyImportSupRequest.getHospitals())) {
|
||||
String[] hospAarray = tyImportSupRequest.getHospitals().split(",");
|
||||
CollUtil.toList(hospAarray);
|
||||
} else if (CollUtil.isNotEmpty(tyImportSupRequest.getHospNames())) {
|
||||
hospList.addAll(tyImportSupRequest.getHospNames());
|
||||
} else if (CollUtil.isNotEmpty(tyImportSupRequest.getHospCertCodes())) {
|
||||
hospList.addAll(tyImportSupRequest.getHospCertCodes());
|
||||
}
|
||||
TyBatchDlResponse tyBatchDlResponse = new TyBatchDlResponse();
|
||||
List<TySupplierEntity> mTySupplierEntities = new ArrayList<>();
|
||||
for (int i = 0; i < hospList.size(); i++) {
|
||||
List<TySupplierEntity> tySupplierEntities = null;
|
||||
if (CollUtil.isNotEmpty(tyImportSupRequest.getHospCertCodes())) {
|
||||
tySupplierService.downloadByCode(hospList.get(i), null);
|
||||
tySupplierEntities = tySupplierService.list(new QueryWrapper<TySupplierEntity>().eq("creditCodeFk", hospList.get(i)));
|
||||
} else {
|
||||
tySupplierService.downloadByName(hospList.get(i), null);
|
||||
tySupplierEntities = tySupplierService.list(new QueryWrapper<TySupplierEntity>().eq("hospName", hospList.get(i)));
|
||||
}
|
||||
if (CollUtil.isNotEmpty(tySupplierEntities)) {
|
||||
mTySupplierEntities.addAll(tySupplierEntities);
|
||||
}
|
||||
}
|
||||
tyBatchDlResponse.setTySupplierEntities(mTySupplierEntities);
|
||||
return ResultVOUtils.success(tyBatchDlResponse);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "天眼查批量下载供应商列表接口")
|
||||
@PostMapping("/udidl/ty/company/batch/dl/rel/supplier")
|
||||
public BaseResponse importRels(@RequestBody TyImportSupRequest tyImportSupRequest) {
|
||||
if (StrUtil.isEmpty(tyImportSupRequest.getHospitals())) {
|
||||
return ResultVOUtils.error(500, "医院名称列表不能为空");
|
||||
}
|
||||
List<String> hospList = new ArrayList<>();
|
||||
String[] hospAarray = tyImportSupRequest.getHospitals().split(",");
|
||||
if (hospAarray != null)
|
||||
hospList = CollUtil.toList(hospAarray);
|
||||
TyBatchDlResponse tyBatchDlResponse = new TyBatchDlResponse();
|
||||
List<TyCompanyDetailEntity> mTyCompanyDetailEntities = new ArrayList<>();
|
||||
List<TyContactResponse> mTyContactResponses = new ArrayList<>();
|
||||
List<TySupplierEntity> mTySupplierEntities = new ArrayList<>();
|
||||
for (int i = 0; i < hospList.size(); i++) {
|
||||
tySupplierService.downloadByName(hospList.get(i), null);
|
||||
List<TySupplierEntity> tySupplierEntities = tySupplierService.list(new QueryWrapper<TySupplierEntity>().eq("hospName", hospAarray[i]));
|
||||
if (CollUtil.isNotEmpty(tySupplierEntities)) {
|
||||
mTySupplierEntities.addAll(tySupplierEntities);
|
||||
for (TySupplierEntity tySupplierEntity : tySupplierEntities) {
|
||||
TyCompanyDetailEntity tyCompanyDetailEntity = tyCompanyDetailService.downloadByName(tySupplierEntity.getSupplier_name());
|
||||
if (tyCompanyDetailEntity != null)
|
||||
mTyCompanyDetailEntities.add(tyCompanyDetailEntity);
|
||||
List<TyContactResponse> tyContactResponses = tyContactInfoService.download(tySupplierEntity.getSupplier_name());
|
||||
if (CollUtil.isNotEmpty(tyContactResponses)) {
|
||||
mTyContactResponses.addAll(tyContactResponses);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
tyBatchDlResponse.setTyContactResponses(mTyContactResponses);
|
||||
tyBatchDlResponse.setTyCompanyDetailEntities(mTyCompanyDetailEntities);
|
||||
tyBatchDlResponse.setTySupplierEntities(mTySupplierEntities);
|
||||
return ResultVOUtils.success(tyBatchDlResponse);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "天眼查下载企业详细信息接口")
|
||||
@GetMapping("/udidl/ty/company/dl/getBaseInfo")
|
||||
public BaseResponse getCompanyInfo(TyBaseInfoRequest tyBaseInfoRequest) {
|
||||
if (StrUtil.isEmpty(tyBaseInfoRequest.getName()) && StrUtil.isEmpty(tyBaseInfoRequest.getCreditCode())) {
|
||||
return ResultVOUtils.error(500, "请输入企业名称或统一社会信用代码");
|
||||
}
|
||||
String keyWord = "";
|
||||
TyCompanyDetailEntity tyCompanyDetailEntity;
|
||||
if (StrUtil.isNotEmpty(tyBaseInfoRequest.getCreditCode())) {
|
||||
tyCompanyDetailEntity = tyCompanyDetailService.downloadByCode(tyBaseInfoRequest.getCreditCode());
|
||||
} else
|
||||
tyCompanyDetailEntity = tyCompanyDetailService.downloadByCode(tyBaseInfoRequest.getName());
|
||||
|
||||
return ResultVOUtils.success(tyCompanyDetailEntity);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "天眼查批量下载企业详细信息接口")
|
||||
@GetMapping("/udidl/ty/company/batch/dl/getBaseInfo")
|
||||
public BaseResponse batchGetCompanyInfo(TyBaseInfoRequest tyBaseInfoRequest) {
|
||||
if (StrUtil.isEmpty(tyBaseInfoRequest.getName()) && StrUtil.isEmpty(tyBaseInfoRequest.getCreditCode())) {
|
||||
return ResultVOUtils.error(500, "请输入企业名称或统一社会信用代码");
|
||||
}
|
||||
List<TyCompanyDetailEntity> tyCompanyDetailEntities = new ArrayList<>();
|
||||
|
||||
if (CollUtil.isNotEmpty(tyBaseInfoRequest.getSupCodes())) {
|
||||
for (String supCode : tyBaseInfoRequest.getSupCodes()) {
|
||||
TyCompanyDetailEntity tyCompanyDetailEntity = tyCompanyDetailService.downloadByCode(supCode);
|
||||
tyCompanyDetailEntities.add(tyCompanyDetailEntity);
|
||||
}
|
||||
} else {
|
||||
for (String supName : tyBaseInfoRequest.getSupNames()) {
|
||||
TyCompanyDetailEntity tyCompanyDetailEntity = tyCompanyDetailService.downloadByName(supName);
|
||||
tyCompanyDetailEntities.add(tyCompanyDetailEntity);
|
||||
}
|
||||
}
|
||||
return ResultVOUtils.success(tyCompanyDetailEntities);
|
||||
}
|
||||
|
||||
}
|
@ -1,12 +1,21 @@
|
||||
package com.glxp.udidl.admin.req.tyapi;
|
||||
|
||||
import com.glxp.udidl.admin.req.ListPageRequest;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class TyBaseInfoRequest {
|
||||
public class TyBaseInfoRequest extends ListPageRequest {
|
||||
|
||||
//企业名称
|
||||
private String name;
|
||||
//统一社会信用代码
|
||||
private String creditCode;
|
||||
|
||||
|
||||
private List<String> supNames;
|
||||
private List<String> supCodes;
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,65 +1,92 @@
|
||||
<?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.glxp.udidl.admin.dao.tyapi.TyCompanyDetailMapper">
|
||||
<resultMap id="BaseResultMap" type="com.glxp.udidl.admin.entity.tyapi.TyCompanyDetailEntity">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table ty_company_detail-->
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="historyNames" jdbcType="VARCHAR" property="historyNames" />
|
||||
<result column="cancelDate" jdbcType="VARCHAR" property="cancelDate" />
|
||||
<result column="regStatus" jdbcType="VARCHAR" property="regStatus" />
|
||||
<result column="regCapital" jdbcType="VARCHAR" property="regCapital" />
|
||||
<result column="city" jdbcType="VARCHAR" property="city" />
|
||||
<result column="staffNumRange" jdbcType="VARCHAR" property="staffNumRange" />
|
||||
<result column="bondNum" jdbcType="VARCHAR" property="bondNum" />
|
||||
<result column="historyNameList" jdbcType="VARCHAR" property="historyNameList" />
|
||||
<result column="industry" jdbcType="VARCHAR" property="industry" />
|
||||
<result column="bondName" jdbcType="VARCHAR" property="bondName" />
|
||||
<result column="revokeDate" jdbcType="VARCHAR" property="revokeDate" />
|
||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
||||
<result column="updateTimes" jdbcType="VARCHAR" property="updateTimes" />
|
||||
<result column="legalPersonName" jdbcType="VARCHAR" property="legalPersonName" />
|
||||
<result column="revokeReason" jdbcType="VARCHAR" property="revokeReason" />
|
||||
<result column="regNumber" jdbcType="VARCHAR" property="regNumber" />
|
||||
<result column="creditCode" jdbcType="VARCHAR" property="creditCode" />
|
||||
<result column="property3" jdbcType="VARCHAR" property="property3" />
|
||||
<result column="usedBondName" jdbcType="VARCHAR" property="usedBondName" />
|
||||
<result column="approvedTime" jdbcType="VARCHAR" property="approvedTime" />
|
||||
<result column="fromTime" jdbcType="VARCHAR" property="fromTime" />
|
||||
<result column="socialStaffNum" jdbcType="VARCHAR" property="socialStaffNum" />
|
||||
<result column="actualCapitalCurrency" jdbcType="VARCHAR" property="actualCapitalCurrency" />
|
||||
<result column="alias" jdbcType="VARCHAR" property="alias" />
|
||||
<result column="companyOrgType" jdbcType="VARCHAR" property="companyOrgType" />
|
||||
<result column="cancelReason" jdbcType="VARCHAR" property="cancelReason" />
|
||||
<result column="orgNumber" jdbcType="VARCHAR" property="orgNumber" />
|
||||
<result column="email" jdbcType="VARCHAR" property="email" />
|
||||
<result column="toTime" jdbcType="VARCHAR" property="toTime" />
|
||||
<result column="actualCapital" jdbcType="VARCHAR" property="actualCapital" />
|
||||
<result column="estiblishTime" jdbcType="VARCHAR" property="estiblishTime" />
|
||||
<result column="regInstitute" jdbcType="VARCHAR" property="regInstitute" />
|
||||
<result column="businessScope" jdbcType="VARCHAR" property="businessScope" />
|
||||
<result column="taxNumber" jdbcType="VARCHAR" property="taxNumber" />
|
||||
<result column="regLocation" jdbcType="VARCHAR" property="regLocation" />
|
||||
<result column="regCapitalCurrency" jdbcType="VARCHAR" property="regCapitalCurrency" />
|
||||
<result column="tags" jdbcType="VARCHAR" property="tags" />
|
||||
<result column="websiteList" jdbcType="VARCHAR" property="websiteList" />
|
||||
<result column="phoneNumber" jdbcType="VARCHAR" property="phoneNumber" />
|
||||
<result column="district" jdbcType="VARCHAR" property="district" />
|
||||
<result column="bondType" jdbcType="VARCHAR" property="bondType" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="percentileScore" jdbcType="VARCHAR" property="percentileScore" />
|
||||
<result column="industryAll" jdbcType="VARCHAR" property="industryAll" />
|
||||
<result column="isMicroEnt" jdbcType="VARCHAR" property="isMicroEnt" />
|
||||
<result column="base" jdbcType="VARCHAR" property="base" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, historyNames, cancelDate, regStatus, regCapital, city, staffNumRange, bondNum,
|
||||
historyNameList, industry, bondName, revokeDate, `type`, updateTimes, legalPersonName,
|
||||
revokeReason, regNumber, creditCode, property3, usedBondName, approvedTime, fromTime,
|
||||
socialStaffNum, actualCapitalCurrency, `alias`, companyOrgType, cancelReason, orgNumber,
|
||||
email, toTime, actualCapital, estiblishTime, regInstitute, businessScope, taxNumber,
|
||||
regLocation, regCapitalCurrency, tags, websiteList, phoneNumber, district, bondType,
|
||||
`name`, percentileScore, industryAll, isMicroEnt, base
|
||||
</sql>
|
||||
<resultMap id="BaseResultMap" type="com.glxp.udidl.admin.entity.tyapi.TyCompanyDetailEntity">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table ty_company_detail-->
|
||||
<id column="id" jdbcType="VARCHAR" property="id"/>
|
||||
<result column="historyNames" jdbcType="VARCHAR" property="historyNames"/>
|
||||
<result column="cancelDate" jdbcType="VARCHAR" property="cancelDate"/>
|
||||
<result column="regStatus" jdbcType="VARCHAR" property="regStatus"/>
|
||||
<result column="regCapital" jdbcType="VARCHAR" property="regCapital"/>
|
||||
<result column="city" jdbcType="VARCHAR" property="city"/>
|
||||
<result column="staffNumRange" jdbcType="VARCHAR" property="staffNumRange"/>
|
||||
<result column="bondNum" jdbcType="VARCHAR" property="bondNum"/>
|
||||
<result column="historyNameList" jdbcType="VARCHAR" property="historyNameList"/>
|
||||
<result column="industry" jdbcType="VARCHAR" property="industry"/>
|
||||
<result column="bondName" jdbcType="VARCHAR" property="bondName"/>
|
||||
<result column="revokeDate" jdbcType="VARCHAR" property="revokeDate"/>
|
||||
<result column="type" jdbcType="VARCHAR" property="type"/>
|
||||
<result column="updateTimes" jdbcType="VARCHAR" property="updateTimes"/>
|
||||
<result column="legalPersonName" jdbcType="VARCHAR" property="legalPersonName"/>
|
||||
<result column="revokeReason" jdbcType="VARCHAR" property="revokeReason"/>
|
||||
<result column="regNumber" jdbcType="VARCHAR" property="regNumber"/>
|
||||
<result column="creditCode" jdbcType="VARCHAR" property="creditCode"/>
|
||||
<result column="property3" jdbcType="VARCHAR" property="property3"/>
|
||||
<result column="usedBondName" jdbcType="VARCHAR" property="usedBondName"/>
|
||||
<result column="approvedTime" jdbcType="VARCHAR" property="approvedTime"/>
|
||||
<result column="fromTime" jdbcType="VARCHAR" property="fromTime"/>
|
||||
<result column="socialStaffNum" jdbcType="VARCHAR" property="socialStaffNum"/>
|
||||
<result column="actualCapitalCurrency" jdbcType="VARCHAR" property="actualCapitalCurrency"/>
|
||||
<result column="alias" jdbcType="VARCHAR" property="alias"/>
|
||||
<result column="companyOrgType" jdbcType="VARCHAR" property="companyOrgType"/>
|
||||
<result column="cancelReason" jdbcType="VARCHAR" property="cancelReason"/>
|
||||
<result column="orgNumber" jdbcType="VARCHAR" property="orgNumber"/>
|
||||
<result column="email" jdbcType="VARCHAR" property="email"/>
|
||||
<result column="toTime" jdbcType="VARCHAR" property="toTime"/>
|
||||
<result column="actualCapital" jdbcType="VARCHAR" property="actualCapital"/>
|
||||
<result column="estiblishTime" jdbcType="VARCHAR" property="estiblishTime"/>
|
||||
<result column="regInstitute" jdbcType="VARCHAR" property="regInstitute"/>
|
||||
<result column="businessScope" jdbcType="VARCHAR" property="businessScope"/>
|
||||
<result column="taxNumber" jdbcType="VARCHAR" property="taxNumber"/>
|
||||
<result column="regLocation" jdbcType="VARCHAR" property="regLocation"/>
|
||||
<result column="regCapitalCurrency" jdbcType="VARCHAR" property="regCapitalCurrency"/>
|
||||
<result column="tags" jdbcType="VARCHAR" property="tags"/>
|
||||
<result column="websiteList" jdbcType="VARCHAR" property="websiteList"/>
|
||||
<result column="phoneNumber" jdbcType="VARCHAR" property="phoneNumber"/>
|
||||
<result column="district" jdbcType="VARCHAR" property="district"/>
|
||||
<result column="bondType" jdbcType="VARCHAR" property="bondType"/>
|
||||
<result column="name" jdbcType="VARCHAR" property="name"/>
|
||||
<result column="percentileScore" jdbcType="VARCHAR" property="percentileScore"/>
|
||||
<result column="industryAll" jdbcType="VARCHAR" property="industryAll"/>
|
||||
<result column="isMicroEnt" jdbcType="VARCHAR" property="isMicroEnt"/>
|
||||
<result column="base" jdbcType="VARCHAR" property="base"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, historyNames, cancelDate, regStatus, regCapital, city, staffNumRange, bondNum,
|
||||
historyNameList, industry, bondName, revokeDate, `type`, updateTimes, legalPersonName,
|
||||
revokeReason, regNumber, creditCode, property3, usedBondName, approvedTime, fromTime,
|
||||
socialStaffNum, actualCapitalCurrency, `alias`, companyOrgType, cancelReason, orgNumber,
|
||||
email, toTime, actualCapital, estiblishTime, regInstitute, businessScope, taxNumber,
|
||||
regLocation, regCapitalCurrency, tags, websiteList, phoneNumber, district, bondType,
|
||||
`name`, percentileScore, industryAll, isMicroEnt, base
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="filterList" parameterType="com.glxp.udidl.admin.req.tyapi.TyBaseInfoRequest"
|
||||
resultType="com.glxp.udidl.admin.entity.tyapi.TyCompanyDetailEntity">
|
||||
select ty_company_detail.*
|
||||
from ty_company_detail
|
||||
<where>
|
||||
<if test="name != '' and name != null">
|
||||
and name like concat('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="creditCode != '' and creditCode != null">
|
||||
and creditCode like concat('%', #{creditCode}, '%')
|
||||
</if>
|
||||
<if test="supNames != null and supNames.size() != 0">
|
||||
AND name in
|
||||
<foreach collection="supNames" index="index" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="supCodes != null and supCodes.size() != 0">
|
||||
AND creditCode in
|
||||
<foreach collection="supCodes" index="index" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
@ -1,25 +1,61 @@
|
||||
<?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.glxp.udidl.admin.dao.tyapi.TySupplierMapper">
|
||||
<resultMap id="BaseResultMap" type="com.glxp.udidl.admin.entity.tyapi.TySupplierEntity">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table ty_supplier-->
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="supplier_graphId" jdbcType="VARCHAR" property="supplier_graphId" />
|
||||
<result column="announcement_date" jdbcType="VARCHAR" property="announcement_date" />
|
||||
<result column="amt" jdbcType="VARCHAR" property="amt" />
|
||||
<result column="logo" jdbcType="VARCHAR" property="logo" />
|
||||
<result column="alias" jdbcType="VARCHAR" property="alias" />
|
||||
<result column="supplier_name" jdbcType="VARCHAR" property="supplier_name" />
|
||||
<result column="relationship" jdbcType="VARCHAR" property="relationship" />
|
||||
<result column="dataSource" jdbcType="VARCHAR" property="dataSource" />
|
||||
<result column="ratio" jdbcType="VARCHAR" property="ratio" />
|
||||
<result column="creditCodeFk" jdbcType="VARCHAR" property="creditCodeFk" />
|
||||
<result column="hospName" jdbcType="VARCHAR" property="hospName" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, supplier_graphId, announcement_date, amt, logo, `alias`, supplier_name, relationship,
|
||||
dataSource, ratio, creditCodeFk, hospName
|
||||
</sql>
|
||||
<resultMap id="BaseResultMap" type="com.glxp.udidl.admin.entity.tyapi.TySupplierEntity">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table ty_supplier-->
|
||||
<id column="id" jdbcType="INTEGER" property="id"/>
|
||||
<result column="supplier_graphId" jdbcType="VARCHAR" property="supplier_graphId"/>
|
||||
<result column="announcement_date" jdbcType="VARCHAR" property="announcement_date"/>
|
||||
<result column="amt" jdbcType="VARCHAR" property="amt"/>
|
||||
<result column="logo" jdbcType="VARCHAR" property="logo"/>
|
||||
<result column="alias" jdbcType="VARCHAR" property="alias"/>
|
||||
<result column="supplier_name" jdbcType="VARCHAR" property="supplier_name"/>
|
||||
<result column="relationship" jdbcType="VARCHAR" property="relationship"/>
|
||||
<result column="dataSource" jdbcType="VARCHAR" property="dataSource"/>
|
||||
<result column="ratio" jdbcType="VARCHAR" property="ratio"/>
|
||||
<result column="creditCodeFk" jdbcType="VARCHAR" property="creditCodeFk"/>
|
||||
<result column="hospName" jdbcType="VARCHAR" property="hospName"/>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, supplier_graphId, announcement_date, amt, logo, `alias`, supplier_name, relationship,
|
||||
dataSource, ratio, creditCodeFk, hospName
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="filterList" parameterType="com.glxp.udidl.admin.req.tyapi.TyImportSupRequest"
|
||||
resultType="com.glxp.udidl.admin.entity.tyapi.TySupplierEntity">
|
||||
select ty_supplier.*
|
||||
from ty_supplier
|
||||
<where>
|
||||
<if test="hospName != '' and hospName != null">
|
||||
and hospName like concat('%', #{hospName}, '%')
|
||||
</if>
|
||||
<if test="creditCodeFk != '' and creditCodeFk != null">
|
||||
and creditCodeFk like concat('%', #{creditCodeFk}, '%')
|
||||
</if>
|
||||
<if test="year != '' and year != null">
|
||||
and year = #{year}
|
||||
</if>
|
||||
<if test="years != null and years.size() != 0">
|
||||
AND year in
|
||||
<foreach collection="years" index="index" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="hospNames != null and hospNames.size() != 0">
|
||||
AND hospName in
|
||||
<foreach collection="hospNames" index="index" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="hospCertCodes != null and hospCertCodes.size() != 0">
|
||||
AND creditCodeFk in
|
||||
<foreach collection="hospCertCodes" index="index" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
Loading…
Reference in New Issue