Merge branch 'dev' of http://59.110.10.99:53000/liuc/biz_supplier_manage into dev
This commit is contained in:
@ -79,22 +79,10 @@ public class OrgServiceImpl implements IOrgService {
|
|||||||
|
|
||||||
// 3. 解析 orgFullId(判空 + 安全分割)
|
// 3. 解析 orgFullId(判空 + 安全分割)
|
||||||
SysOrg sysOrg = baseResponse.getData();
|
SysOrg sysOrg = baseResponse.getData();
|
||||||
String orgFullId = sysOrg.getOrgFullId();
|
|
||||||
if (StringUtils.isEmpty(orgFullId)) {
|
|
||||||
return BaseResponse.fail("组织全ID为空");
|
|
||||||
}
|
|
||||||
|
|
||||||
String[] parts = orgFullId.split(",");
|
|
||||||
String orgId;
|
|
||||||
if (parts.length == 1) {
|
|
||||||
orgId = parts[0]; // 只有一级,返回一级
|
|
||||||
} else {
|
|
||||||
orgId = parts[1]; // 有多级,返回第二级
|
|
||||||
}
|
|
||||||
|
|
||||||
// 4. 查询组织数据(判空构造参数)
|
// 4. 查询组织数据(判空构造参数)
|
||||||
SysOrg sysOrgAll = new SysOrg();
|
SysOrg sysOrgAll = new SysOrg();
|
||||||
sysOrgAll.setOrgId(orgId);
|
sysOrgAll.setOrgId(sysOrg.getUpOrgId());
|
||||||
BaseResponse<List<SysOrgVO>> response = systemClient.queryAll(sysOrgAll);
|
BaseResponse<List<SysOrgVO>> response = systemClient.queryAll(sysOrgAll);
|
||||||
|
|
||||||
// 5. 返回前检查接口响应
|
// 5. 返回前检查接口响应
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
package com.chinaunicom.zyhy.ebtp.supplier.common;
|
||||||
|
|
||||||
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
|
@Retention(RetentionPolicy.RUNTIME) // 注解在运行时可用
|
||||||
|
@Target(ElementType.FIELD) // 注解用于字段
|
||||||
|
public @interface ChineseName {
|
||||||
|
String value(); // 中文名称
|
||||||
|
}
|
@ -46,6 +46,8 @@ public class CoscoSupplierBank extends CoscoBaseEntity {
|
|||||||
/** 币种 */
|
/** 币种 */
|
||||||
//@Excel(name = "币种")
|
//@Excel(name = "币种")
|
||||||
private String currency;
|
private String currency;
|
||||||
|
//字典名
|
||||||
|
private String currencyName;
|
||||||
|
|
||||||
/** 国家 */
|
/** 国家 */
|
||||||
//@Excel(name = "国家")
|
//@Excel(name = "国家")
|
||||||
@ -67,5 +69,14 @@ public class CoscoSupplierBank extends CoscoBaseEntity {
|
|||||||
//@Excel(name = "最后更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
//@Excel(name = "最后更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
private Date lastUpdateTime;
|
private Date lastUpdateTime;
|
||||||
|
|
||||||
|
//国家字典回显
|
||||||
|
private String nationName;
|
||||||
|
|
||||||
|
//省字典回显
|
||||||
|
private String provinceName;
|
||||||
|
|
||||||
|
//市回显
|
||||||
|
private String cityName;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
package com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity;
|
package com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity;
|
||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.chinaunicom.zyhy.ebtp.supplier.common.ChineseName;
|
||||||
import com.chinaunicom.mall.ebtp.common.base.entity.BasePageRequest;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@ -23,163 +22,163 @@ public class CoscoSupplierBase {
|
|||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** 主键ID */
|
/** 主键ID */
|
||||||
@TableField("主键ID")
|
@ChineseName("主键ID")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门id
|
* 部门id
|
||||||
*/
|
*/
|
||||||
@TableField("部门ID")
|
@ChineseName("部门ID")
|
||||||
private String deptId;
|
private String deptId;
|
||||||
|
|
||||||
/** 供应商身份类型(dvs.境内企业/机构、ovs.境外企业、pe.个人) */
|
/** 供应商身份类型(dvs.境内企业/机构、ovs.境外企业、pe.个人) */
|
||||||
@TableField("供应商身份类型")
|
@ChineseName("供应商身份类型")
|
||||||
private String supplierType;
|
private String supplierType;
|
||||||
|
|
||||||
/** 营业执照附件文件url */
|
/** 营业执照附件文件url */
|
||||||
@TableField("营业执照附件文件URL")
|
@ChineseName("营业执照附件文件URL")
|
||||||
private String licenceAccessory;
|
private String licenceAccessory;
|
||||||
|
|
||||||
/** 营业执照有效期 */
|
/** 营业执照有效期 */
|
||||||
@TableField("营业执照有效期")
|
@ChineseName("营业执照有效期")
|
||||||
private String licenceDate;
|
private String licenceDate;
|
||||||
|
|
||||||
/** 企业类型(数据字典code) */
|
/** 企业类型(数据字典code) */
|
||||||
@TableField("企业类型")
|
@ChineseName("企业类型")
|
||||||
private String enterpriseType;
|
private String enterpriseType;
|
||||||
|
|
||||||
/** 企业名称 */
|
/** 企业名称 */
|
||||||
@TableField("企业名称")
|
@ChineseName("企业名称")
|
||||||
@ExcelProperty("供应商名称")
|
@ExcelProperty("供应商名称")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
/** 企业英文名称 */
|
/** 企业英文名称 */
|
||||||
@TableField("企业英文名称")
|
@ChineseName("企业英文名称")
|
||||||
private String nameEn;
|
private String nameEn;
|
||||||
|
|
||||||
/** 统一社会信用代码 */
|
/** 统一社会信用代码 */
|
||||||
@TableField("统一社会信用代码")
|
@ChineseName("统一社会信用代码")
|
||||||
private String socialCreditCode;
|
private String socialCreditCode;
|
||||||
|
|
||||||
/** 经营范围 */
|
/** 经营范围 */
|
||||||
@TableField("经营范围")
|
@ChineseName("经营范围")
|
||||||
private String range;
|
private String range;
|
||||||
|
|
||||||
/** 注册地址 */
|
/** 注册地址 */
|
||||||
@TableField("注册地址")
|
@ChineseName("注册地址")
|
||||||
private String regAddress;
|
private String regAddress;
|
||||||
|
|
||||||
/** 办公地址 */
|
/** 办公地址 */
|
||||||
@TableField("办公地址")
|
@ChineseName("办公地址")
|
||||||
private String workAddress;
|
private String workAddress;
|
||||||
|
|
||||||
/** 母公司/出资人信息 */
|
/** 母公司/出资人信息 */
|
||||||
@TableField("母公司/出资人信息")
|
@ChineseName("母公司/出资人信息")
|
||||||
private String parentCompanyInvestor;
|
private String parentCompanyInvestor;
|
||||||
|
|
||||||
/** 企业法定代表人/负责人 */
|
/** 企业法定代表人/负责人 */
|
||||||
@TableField("企业法定代表人/负责人")
|
@ChineseName("企业法定代表人/负责人")
|
||||||
private String legalPerson;
|
private String legalPerson;
|
||||||
|
|
||||||
/** 身份证号 */
|
/** 身份证号 */
|
||||||
@TableField("身份证号")
|
@ChineseName("身份证号")
|
||||||
private String idCard;
|
private String idCard;
|
||||||
|
|
||||||
/** 注册资本/实收资本(万元) */
|
/** 注册资本/实收资本(万元) */
|
||||||
@TableField("注册资本/实收资本(万元)")
|
@ChineseName("注册资本/实收资本(万元)")
|
||||||
private Long capital;
|
private Long capital;
|
||||||
|
|
||||||
/** 联系人姓名 */
|
/** 联系人姓名 */
|
||||||
@TableField("联系人姓名")
|
@ChineseName("联系人姓名")
|
||||||
private String contactsName;
|
private String contactsName;
|
||||||
|
|
||||||
/** 联系人手机 */
|
/** 联系人手机 */
|
||||||
@TableField("联系人手机")
|
@ChineseName("联系人手机")
|
||||||
private String contactsPhone;
|
private String contactsPhone;
|
||||||
|
|
||||||
/** 联系人身份类别 */
|
/** 联系人身份类别 */
|
||||||
@TableField("联系人身份类别")
|
@ChineseName("联系人身份类别")
|
||||||
private String contactsType;
|
private String contactsType;
|
||||||
|
|
||||||
/** 联系人邮箱 */
|
/** 联系人邮箱 */
|
||||||
@TableField("联系人邮箱")
|
@ChineseName("联系人邮箱")
|
||||||
private String contactsEmail;
|
private String contactsEmail;
|
||||||
|
|
||||||
/** 固定电话 */
|
/** 固定电话 */
|
||||||
@TableField("固定电话")
|
@ChineseName("固定电话")
|
||||||
private String telephone;
|
private String telephone;
|
||||||
|
|
||||||
/** 境外企业 __ 国家地区 */
|
/** 境外企业 __ 国家地区 */
|
||||||
@TableField("境外企业国家地区")
|
@ChineseName("境外企业国家地区")
|
||||||
private String nation;
|
private String nation;
|
||||||
|
|
||||||
/** 境外企业 __ 增值税号VAT */
|
/** 境外企业 __ 增值税号VAT */
|
||||||
@TableField("境外企业增值税号VAT")
|
@ChineseName("境外企业增值税号VAT")
|
||||||
private String vat;
|
private String vat;
|
||||||
|
|
||||||
/** 境外企业 __ 境外纳税人ID号 */
|
/** 境外企业 __ 境外纳税人ID号 */
|
||||||
@TableField("境外企业纳税人ID号")
|
@ChineseName("境外企业纳税人ID号")
|
||||||
private String taxpayerId;
|
private String taxpayerId;
|
||||||
|
|
||||||
/** 境外企业 __ 币种(数据字典code) */
|
/** 境外企业 __ 币种(数据字典code) */
|
||||||
@TableField("境外企业币种")
|
@ChineseName("境外企业币种")
|
||||||
private String currency;
|
private String currency;
|
||||||
|
|
||||||
/** 个人 __ 个人姓名 */
|
/** 个人 __ 个人姓名 */
|
||||||
@TableField("个人姓名")
|
@ChineseName("个人姓名")
|
||||||
private String personName;
|
private String personName;
|
||||||
|
|
||||||
/** 个人 __ 个人联系电话 */
|
/** 个人 __ 个人联系电话 */
|
||||||
@TableField("个人联系电话")
|
@ChineseName("个人联系电话")
|
||||||
@ExcelProperty("联系电话")
|
@ExcelProperty("联系电话")
|
||||||
private String personPhone;
|
private String personPhone;
|
||||||
|
|
||||||
/** 个人 __ 开户行 */
|
/** 个人 __ 开户行 */
|
||||||
@TableField("个人开户行")
|
@ChineseName("个人开户行")
|
||||||
private String personBank;
|
private String personBank;
|
||||||
|
|
||||||
/** 个人 __ 银行账号 */
|
/** 个人 __ 银行账号 */
|
||||||
@TableField("个人银行账号")
|
@ChineseName("个人银行账号")
|
||||||
private String personAccount;
|
private String personAccount;
|
||||||
|
|
||||||
/** 供应商准入状态(0.未准入、1.已准入) */
|
/** 供应商准入状态(0.未准入、1.已准入) */
|
||||||
@TableField("供应商准入状态")
|
@ChineseName("供应商准入状态")
|
||||||
private Long accessStatus;
|
private Long accessStatus;
|
||||||
|
|
||||||
/** 供应商黑名单状态(0.未加入、已加入) */
|
/** 供应商黑名单状态(0.未加入、已加入) */
|
||||||
@TableField("供应商黑名单状态")
|
@ChineseName("供应商黑名单状态")
|
||||||
private Long blacklistStatus;
|
private Long blacklistStatus;
|
||||||
|
|
||||||
/** 供应商灰名单状态(0.未加入、已加入) */
|
/** 供应商灰名单状态(0.未加入、已加入) */
|
||||||
@TableField("供应商灰名单状态")
|
@ChineseName("供应商灰名单状态")
|
||||||
private Long greylistStatus;
|
private Long greylistStatus;
|
||||||
|
|
||||||
/** 是否为代理录入(0.否、1.是) */
|
/** 是否为代理录入(0.否、1.是) */
|
||||||
@TableField("代理录入状态")
|
@ChineseName("代理录入状态")
|
||||||
private Long fillinStatus;
|
private Long fillinStatus;
|
||||||
|
|
||||||
/** 代理录入人 */
|
/** 代理录入人 */
|
||||||
@TableField("代理录入人")
|
@ChineseName("代理录入人")
|
||||||
private String fillinBy;
|
private String fillinBy;
|
||||||
|
|
||||||
/** sap_code 集团数据底座赋码(集团北京SAP系统编码) */
|
/** sap_code 集团数据底座赋码(集团北京SAP系统编码) */
|
||||||
@TableField("SAP系统编码")
|
@ChineseName("SAP系统编码")
|
||||||
private String sapCode;
|
private String sapCode;
|
||||||
|
|
||||||
/** 删除标识(normal.正常、deleted.已删除) */
|
/** 删除标识(normal.正常、deleted.已删除) */
|
||||||
@TableField("删除标识")
|
@ChineseName("删除标识")
|
||||||
private String delFlag;
|
private String delFlag;
|
||||||
|
|
||||||
/** 最后更新时间 */
|
/** 最后更新时间 */
|
||||||
@TableField("最后更新时间")
|
@ChineseName("最后更新时间")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
private Date lastUpdateTime;
|
private Date lastUpdateTime;
|
||||||
|
|
||||||
@TableField("供应商身份类型中文")
|
@ChineseName("供应商身份类型中文")
|
||||||
@ExcelProperty("境内/境外")
|
@ExcelProperty("境内/境外")
|
||||||
private String supplierTypeCn;
|
private String supplierTypeCn;
|
||||||
|
|
||||||
@TableField("准入状态中文")
|
@ChineseName("准入状态中文")
|
||||||
private String accessStatusCn;
|
private String accessStatusCn;
|
||||||
|
|
||||||
/** 创建时间 */
|
/** 创建时间 */
|
||||||
@ -243,4 +242,14 @@ public class CoscoSupplierBase {
|
|||||||
|
|
||||||
private List<String> supplierTypeList;
|
private List<String> supplierTypeList;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 境外地市回显字典
|
||||||
|
*/
|
||||||
|
private String nationName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 身份类别回显字段
|
||||||
|
*/
|
||||||
|
private String contactsTypeName;
|
||||||
}
|
}
|
@ -2,13 +2,13 @@ package com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.service.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.chinaunicom.mall.ebtp.common.base.entity.BaseCacheUser;
|
import com.chinaunicom.mall.ebtp.common.base.entity.BaseCacheUser;
|
||||||
import com.chinaunicom.mall.ebtp.common.base.service.impl.BaseServiceImpl;
|
import com.chinaunicom.mall.ebtp.common.base.service.impl.BaseServiceImpl;
|
||||||
import com.chinaunicom.mall.ebtp.common.base.util.TokenUtil;
|
import com.chinaunicom.mall.ebtp.common.base.util.TokenUtil;
|
||||||
import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
|
import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
|
||||||
|
import com.chinaunicom.zyhy.ebtp.supplier.common.ChineseName;
|
||||||
import com.chinaunicom.zyhy.ebtp.supplier.common.CoscoDateUtils;
|
import com.chinaunicom.zyhy.ebtp.supplier.common.CoscoDateUtils;
|
||||||
import com.chinaunicom.zyhy.ebtp.supplier.base.constant.CoscoType;
|
import com.chinaunicom.zyhy.ebtp.supplier.base.constant.CoscoType;
|
||||||
import com.chinaunicom.zyhy.ebtp.supplier.base.constant.MessageType;
|
import com.chinaunicom.zyhy.ebtp.supplier.base.constant.MessageType;
|
||||||
@ -91,8 +91,6 @@ public class CoscoSupplierBaseServiceImpl extends BaseServiceImpl<CoscoSupplierB
|
|||||||
@Autowired
|
@Autowired
|
||||||
private CoscoCategoryLibraryContainMapper coscoCategoryLibraryContainMapper;
|
private CoscoCategoryLibraryContainMapper coscoCategoryLibraryContainMapper;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ICoscoCategoryService coscoCategoryService;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -546,8 +544,8 @@ public class CoscoSupplierBaseServiceImpl extends BaseServiceImpl<CoscoSupplierB
|
|||||||
history.setFieldName(field.getName()); // 字段名
|
history.setFieldName(field.getName()); // 字段名
|
||||||
|
|
||||||
// 获取字段注解(中文名)
|
// 获取字段注解(中文名)
|
||||||
if (field.isAnnotationPresent(TableField.class)) {
|
if (field.isAnnotationPresent(ChineseName.class)) {
|
||||||
TableField annotation = field.getAnnotation(TableField.class);
|
ChineseName annotation = field.getAnnotation(ChineseName.class);
|
||||||
history.setFieldAnnotation(annotation.value());
|
history.setFieldAnnotation(annotation.value());
|
||||||
} else {
|
} else {
|
||||||
history.setFieldAnnotation(field.getName());
|
history.setFieldAnnotation(field.getName());
|
||||||
|
@ -25,8 +25,35 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectCoscoSupplierBankVo">
|
<sql id="selectCoscoSupplierBankVo">
|
||||||
select id, supplier_id, interbank_number, bank, swift_code, account_name, account, currency, nation, province, city, del_flag, create_by, create_time, update_by, update_time, last_update_time
|
SELECT
|
||||||
from cosco_supplier_bank
|
csb.id,
|
||||||
|
csb.supplier_id,
|
||||||
|
csb.interbank_number,
|
||||||
|
csb.bank,
|
||||||
|
csb.swift_code,
|
||||||
|
csb.account_name,
|
||||||
|
csb.account,
|
||||||
|
csb.currency,
|
||||||
|
dpbz.dic_name as currencyName,
|
||||||
|
csb.nation,
|
||||||
|
COALESCE(drn.`name`, dri.`name`) as nationName,
|
||||||
|
csb.province,
|
||||||
|
drp.`name` as provinceName,
|
||||||
|
csb.city,
|
||||||
|
drc.`name` as cityName,
|
||||||
|
csb.del_flag,
|
||||||
|
csb.create_by,
|
||||||
|
csb.create_time,
|
||||||
|
csb.update_by,
|
||||||
|
csb.update_time,
|
||||||
|
csb.last_update_time
|
||||||
|
FROM
|
||||||
|
cosco_supplier_bank csb
|
||||||
|
left join dict_project dpbz on csb.currency = dpbz.`code` and dpbz.parent_code = 'currency'
|
||||||
|
left join dict_region drn on csb.nation = drn.id
|
||||||
|
left join dict_region drp on csb.province = drp.id
|
||||||
|
left join dict_region drc on csb.city = drc.id
|
||||||
|
left join dict_region_international dri on csb.nation = dri.id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
@ -34,57 +61,57 @@
|
|||||||
<include refid="selectCoscoSupplierBankVo"/>
|
<include refid="selectCoscoSupplierBankVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="vo.supplierId != null and vo.supplierId != ''">
|
<if test="vo.supplierId != null and vo.supplierId != ''">
|
||||||
and supplier_id = #{vo.supplierId}
|
and csb.supplier_id = #{vo.supplierId}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by create_time desc
|
order by csb.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectCoscoSupplierBankList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBank" resultMap="CoscoSupplierBankResult">
|
<select id="selectCoscoSupplierBankList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBank" resultMap="CoscoSupplierBankResult">
|
||||||
<include refid="selectCoscoSupplierBankVo"/>
|
<include refid="selectCoscoSupplierBankVo"/>
|
||||||
<where>
|
<where>
|
||||||
and del_flag = 'normal'
|
and csb.del_flag = 'normal'
|
||||||
<if test="supplierId != null and supplierId != ''">
|
<if test="supplierId != null and supplierId != ''">
|
||||||
and supplier_id = #{supplierId}
|
and csb.supplier_id = #{supplierId}
|
||||||
</if>
|
</if>
|
||||||
<if test="interbankNumber != null and interbankNumber != ''">
|
<if test="interbankNumber != null and interbankNumber != ''">
|
||||||
and interbank_number = #{interbankNumber}
|
and csb.interbank_number = #{interbankNumber}
|
||||||
</if>
|
</if>
|
||||||
<if test="bank != null and bank != ''">
|
<if test="bank != null and bank != ''">
|
||||||
and bank = #{bank}
|
and csb.bank = #{bank}
|
||||||
</if>
|
</if>
|
||||||
<if test="swiftCode != null and swiftCode != ''">
|
<if test="swiftCode != null and swiftCode != ''">
|
||||||
and swift_code = #{swiftCode}
|
and csb.swift_code = #{swiftCode}
|
||||||
</if>
|
</if>
|
||||||
<if test="accountName != null and accountName != ''">
|
<if test="accountName != null and accountName != ''">
|
||||||
and account_name like concat('%', #{accountName}, '%')
|
and csb.account_name like concat('%', #{accountName}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="account != null and account != ''">
|
<if test="account != null and account != ''">
|
||||||
and account = #{account}
|
and csb.account = #{account}
|
||||||
</if>
|
</if>
|
||||||
<if test="currency != null and currency != ''">
|
<if test="currency != null and currency != ''">
|
||||||
and currency = #{currency}
|
and csb.currency = #{currency}
|
||||||
</if>
|
</if>
|
||||||
<if test="nation != null and nation != ''">
|
<if test="nation != null and nation != ''">
|
||||||
and nation = #{nation}
|
and csb.nation = #{nation}
|
||||||
</if>
|
</if>
|
||||||
<if test="province != null and province != ''">
|
<if test="province != null and province != ''">
|
||||||
and province = #{province}
|
and csb.province = #{province}
|
||||||
</if>
|
</if>
|
||||||
<if test="city != null and city != ''">
|
<if test="city != null and city != ''">
|
||||||
and city = #{city}
|
and csb.csb.city = #{city}
|
||||||
</if>
|
</if>
|
||||||
<if test="lastUpdateTime != null ">
|
<if test="lastUpdateTime != null ">
|
||||||
and last_update_time = #{lastUpdateTime}
|
and csb.last_update_time = #{lastUpdateTime}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by create_time desc
|
order by csb.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectCoscoSupplierBankById" parameterType="String"
|
<select id="selectCoscoSupplierBankById" parameterType="String"
|
||||||
resultMap="CoscoSupplierBankResult">
|
resultMap="CoscoSupplierBankResult">
|
||||||
<include refid="selectCoscoSupplierBankVo"/>
|
<include refid="selectCoscoSupplierBankVo"/>
|
||||||
where id = #{id}
|
where csb.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertCoscoSupplierBank" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBank">
|
<insert id="insertCoscoSupplierBank" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBank">
|
||||||
|
@ -59,84 +59,88 @@
|
|||||||
<sql id="selectCoscoSupplierBaseVo">
|
<sql id="selectCoscoSupplierBaseVo">
|
||||||
SELECT
|
SELECT
|
||||||
csb.id,
|
csb.id,
|
||||||
dept_id,
|
csb.dept_id,
|
||||||
supplier_type,
|
csb.supplier_type,
|
||||||
CASE supplier_type
|
CASE csb.supplier_type
|
||||||
WHEN 'dvs' THEN '境内企业'
|
WHEN 'dvs' THEN '境内企业'
|
||||||
WHEN 'ovs' THEN '境外企业'
|
WHEN 'ovs' THEN '境外企业'
|
||||||
WHEN 'pe' THEN '个人'
|
WHEN 'pe' THEN '个人'
|
||||||
ELSE supplier_type
|
ELSE supplier_type
|
||||||
END AS supplier_type_cn,
|
END AS supplier_type_cn,
|
||||||
CASE
|
CASE
|
||||||
WHEN supplier_type = 'dvs' THEN social_credit_code
|
WHEN csb.supplier_type = 'dvs' THEN social_credit_code
|
||||||
WHEN supplier_type = 'ovs' THEN vat
|
WHEN csb.supplier_type = 'ovs' THEN vat
|
||||||
WHEN supplier_type = 'pe' THEN id_card
|
WHEN csb.supplier_type = 'pe' THEN id_card
|
||||||
ELSE NULL
|
ELSE NULL
|
||||||
END AS unified_code,
|
END AS unified_code,
|
||||||
licence_accessory,
|
csb.licence_accessory,
|
||||||
licence_date,
|
csb.licence_date,
|
||||||
enterprise_type,
|
csb.enterprise_type,
|
||||||
dp.dic_name as enterprise_type_cn,
|
dp.dic_name as enterprise_type_cn,
|
||||||
name,
|
csb.name,
|
||||||
name_en,
|
csb.name_en,
|
||||||
social_credit_code,
|
csb.social_credit_code,
|
||||||
`range`,
|
csb.`range`,
|
||||||
reg_address,
|
csb.reg_address,
|
||||||
work_address,
|
csb.work_address,
|
||||||
parent_company_investor,
|
csb.parent_company_investor,
|
||||||
legal_person,
|
csb.legal_person,
|
||||||
id_card,
|
csb.id_card,
|
||||||
capital,
|
csb.capital,
|
||||||
contacts_name,
|
csb.contacts_name,
|
||||||
contacts_phone,
|
csb.contacts_phone,
|
||||||
contacts_type,
|
csb.contacts_type,
|
||||||
contacts_email,
|
dpc.dic_name as contactsTypeName,
|
||||||
telephone,
|
csb.contacts_email,
|
||||||
nation,
|
csb.telephone,
|
||||||
vat,
|
csb.nation,
|
||||||
taxpayer_id,
|
dri.`name` as nationName,
|
||||||
currency,
|
csb.vat,
|
||||||
|
csb.taxpayer_id,
|
||||||
|
csb.currency,
|
||||||
dpbz.dic_name as currency_cn,
|
dpbz.dic_name as currency_cn,
|
||||||
person_name,
|
csb.person_name,
|
||||||
person_phone,
|
csb.person_phone,
|
||||||
person_bank,
|
csb.person_bank,
|
||||||
person_account,
|
csb.person_account,
|
||||||
remark,
|
csb.remark,
|
||||||
access_status,
|
csb.access_status,
|
||||||
CASE access_status
|
CASE csb.access_status
|
||||||
WHEN 0 THEN '未准入'
|
WHEN 0 THEN '未准入'
|
||||||
WHEN 1 THEN '已准入'
|
WHEN 1 THEN '已准入'
|
||||||
ELSE CAST(access_status AS CHAR)
|
ELSE CAST(access_status AS CHAR)
|
||||||
END AS access_status_cn,
|
END AS access_status_cn,
|
||||||
blacklist_status,
|
csb.blacklist_status,
|
||||||
CASE blacklist_status
|
CASE csb.blacklist_status
|
||||||
WHEN 0 THEN '未加入'
|
WHEN 0 THEN '未加入'
|
||||||
WHEN 1 THEN '已加入'
|
WHEN 1 THEN '已加入'
|
||||||
ELSE CAST(blacklist_status AS CHAR)
|
ELSE CAST(blacklist_status AS CHAR)
|
||||||
END AS blacklist_status_cn,
|
END AS blacklist_status_cn,
|
||||||
greylist_status,
|
csb.greylist_status,
|
||||||
CASE greylist_status
|
CASE csb.greylist_status
|
||||||
WHEN 0 THEN '未加入'
|
WHEN 0 THEN '未加入'
|
||||||
WHEN 1 THEN '已加入'
|
WHEN 1 THEN '已加入'
|
||||||
ELSE CAST(greylist_status AS CHAR)
|
ELSE CAST(greylist_status AS CHAR)
|
||||||
END AS greylist_status_cn,
|
END AS greylist_status_cn,
|
||||||
fillin_status,
|
csb.fillin_status,
|
||||||
CASE fillin_status
|
CASE csb.fillin_status
|
||||||
WHEN 0 THEN '否'
|
WHEN 0 THEN '否'
|
||||||
WHEN 1 THEN '是'
|
WHEN 1 THEN '是'
|
||||||
ELSE CAST(fillin_status AS CHAR)
|
ELSE CAST(fillin_status AS CHAR)
|
||||||
END AS fillin_status_cn,
|
END AS fillin_status_cn,
|
||||||
fillin_by,
|
csb.fillin_by,
|
||||||
sap_code,
|
csb.sap_code,
|
||||||
create_by,
|
csb.create_by,
|
||||||
create_time,
|
csb.create_time,
|
||||||
update_by,
|
csb.update_by,
|
||||||
update_time,
|
csb.update_time,
|
||||||
last_update_time
|
csb.last_update_time
|
||||||
FROM
|
FROM
|
||||||
cosco_supplier_base csb
|
cosco_supplier_base csb
|
||||||
left join dict_project dp on csb.enterprise_type = dp.`code` and dp.parent_code = 'enterprise_type'
|
left join dict_project dp on csb.enterprise_type = dp.`code` and dp.parent_code = 'enterprise_type'
|
||||||
left join dict_project dpbz on csb.currency = dpbz.`code` and dpbz.parent_code = 'currency'
|
left join dict_project dpbz on csb.currency = dpbz.`code` and dpbz.parent_code = 'currency'
|
||||||
|
left join dict_project dpc on csb.contacts_type = dpc.`code` and dpc.parent_code = 'contacts_type'
|
||||||
|
left join dict_region_international dri on csb.nation = dri.id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user