供应商查询

This commit is contained in:
TL
2025-06-19 16:54:28 +08:00
parent af60c12959
commit 9d53ca8f29
17 changed files with 457 additions and 84 deletions

View File

@ -0,0 +1,14 @@
package com.chinaunicom.zyhy.ebtp.supplier.common;
public class ChangeText {
public static final String JBXX = "基本信息变更";
public static final String ZZXX = "资质信息变更";
public static final String KPXX = "开票信息变更";
public static final String YHZG = "银行账户变更";
}

View File

@ -5,6 +5,15 @@ public class CoscoType {
//供应商准入状态0.未准入、1.已准入)
public static final Long ACCESS_STATUS_YZR = 1L;
//是否为代理录入0.否、1.是)
public static final Long FILLIN_STATUS_S = 1L;
//供应商黑名单状态0.未加入、1已加入
public static final Long BLACKLIST_STATUS_W = 0l;
//供应商灰名单状态0.未加入、1已加入
public static final Long GREYLIST_STATUS_W = 0l;
//评审项单项

View File

@ -11,6 +11,8 @@ import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.chinaunicom.mall.ebtp.common.base.controller.BaseController;
import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse;
import com.chinaunicom.zyhy.ebtp.supplier.common.CoscoType;
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplierCategory;
import com.chinaunicom.zyhy.ebtp.supplier.coscoBlack.vo.BlackSupplierVo;
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBank;
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBase;
@ -48,13 +50,69 @@ public class CoscoSupplierBaseController extends BaseController {
}
/**
* 供应商注册
* @param vo
* @return
*/
@ApiOperation("新增数据")
@PostMapping("/add")
public BaseResponse<Boolean> update(@ApiParam(value = "对象数据", required = true) @RequestBody CoscoSupplierVo vo){
return BaseResponse.success(coscoSupplierBaseService.insertCoscoSupplierBase(vo));
}
/**
* 供应商注册代录
* @param vo
* @return
*/
@ApiOperation("新增数据")
@PostMapping("/addAgent")
public BaseResponse<Boolean> addAgent(@ApiParam(value = "对象数据", required = true) @RequestBody CoscoSupplierVo vo){
CoscoSupplierBase coscoSupplierBase = vo.getCoscoSupplierBase();
coscoSupplierBase.setFillinStatus(CoscoType.FILLIN_STATUS_S);//代录入标识
coscoSupplierBase.setFillinBy("1");//代理人
return BaseResponse.success(coscoSupplierBaseService.insertCoscoSupplierBase(vo));
}
/**
* 代录列表查询分页数据
* @return 返回结果
*/
@ApiOperation("查询分页数据")
@PostMapping("/getPageAgent")
public BaseResponse<IPage<CoscoSupplierBase>> getPageAgent(@ApiParam(value = "对象数据", required = true) @RequestBody CoscoSupplierBase coscoSupplierBase) {
coscoSupplierBase.setFillinBy("1");
return BaseResponse.success(coscoSupplierBaseService.getPage(coscoSupplierBase));
}
/**
* 我的供应商列表查询分页数据
* @return 返回结果
*/
@ApiOperation("查询分页数据")
@PostMapping("/getPageMy")
public BaseResponse<IPage<CoscoSupplierBase>> getPageMy(@ApiParam(value = "对象数据", required = true) @RequestBody CoscoSupplierBase coscoSupplierBase) {
coscoSupplierBase.setCreateBy("1");
return BaseResponse.success(coscoSupplierBaseService.getPage(coscoSupplierBase));
}
/**
* 根据部门查询合格供应商列表查询分页数据
* @return 返回结果
*/
@ApiOperation("查询分页数据")
@PostMapping("/getPageQualified")
public BaseResponse<IPage<CoscoSupplierBase>> getPageQualified(@ApiParam(value = "对象数据", required = true) @RequestBody CoscoSupplierBase coscoSupplierBase) {
coscoSupplierBase.setAccessStatus(CoscoType.ACCESS_STATUS_YZR);
coscoSupplierBase.setBlacklistStatus(CoscoType.BLACKLIST_STATUS_W);
coscoSupplierBase.setGreylistStatus(CoscoType.GREYLIST_STATUS_W);
return BaseResponse.success(coscoSupplierBaseService.getPage(coscoSupplierBase));
}
@ApiOperation("查询数据")
@GetMapping("/{id}")
@ -64,6 +122,18 @@ public class CoscoSupplierBaseController extends BaseController {
}
/**
* 查询这个供应商已准入的品类、准入明细页也掉这个接口
* @return 返回结果
*/
@ApiOperation("查询分页数据")
@PostMapping("/getCategoryPage")
public BaseResponse<IPage<CoscoAccessSupplierCategory>> getZrCategoryPage(@ApiParam(value = "对象数据", required = true) @RequestBody CoscoAccessSupplierCategory vo) {
return BaseResponse.success(coscoSupplierBaseService.getZrCategoryPage(vo));
}
/**
* 获取选择供应商信息
* @return 返回结果

View File

@ -64,4 +64,15 @@ public class CoscoSupplierChangeApplyController extends BaseController {
return BaseResponse.success(coscoSupplierChangeApplyService.selectCoscoSupplierChangeApplyById(id));
}
/**
* 供应商后台变更进度查询
* @return 返回结果
*/
@ApiOperation("查询分页数据")
@PostMapping("/getSupplierChangePage")
public BaseResponse<IPage<CoscoSupplierChangeApply>> getSupplierChangePage(@ApiParam(value = "对象数据", required = true) @RequestBody CoscoSupplierChangeApply data) {
return BaseResponse.success(coscoSupplierChangeApplyService.selectCoscoSupplierChangeApplyList(data));
}
}

View File

@ -17,6 +17,10 @@ public interface CoscoAccessSupplierCategoryMapper {
IPage<CoscoAccessSupplierCategory> selectExitCategoryList(IPage<CoscoAccessSupplierCategory> page, @Param("vo") CoscoAccessSupplierCategory vo);
IPage<CoscoAccessSupplierCategory> selectPageList(IPage<CoscoAccessSupplierCategory> page, @Param("vo") CoscoAccessSupplierCategory vo);
/**
* 查询供应商准入_供应商已准入品类

View File

@ -16,6 +16,12 @@ import java.util.List;
public interface CoscoSupplierChangeApplyMapper {
IPage<CoscoSupplierChangeApply> selectPageList(IPage<CoscoSupplierChangeApply> page, @Param("vo") CoscoSupplierChangeApply vo);
/**
* 查询中远海运_供应商_供应商信息变更申请列表
*
* @return 中远海运_供应商_供应商信息变更申请集合
*/
public IPage<CoscoSupplierChangeApply> selectCoscoSupplierChangeApplyList(IPage<CoscoSupplierChangeApply> page, @Param("vo") CoscoSupplierChangeApply vo);
/**
@ -29,13 +35,6 @@ public interface CoscoSupplierChangeApplyMapper {
public CoscoSupplierChangeApply selectBySupplierId(String supplierId);
/**
* 查询中远海运_供应商_供应商信息变更申请列表
*
* @param coscoSupplierChangeApply 中远海运_供应商_供应商信息变更申请
* @return 中远海运_供应商_供应商信息变更申请集合
*/
public List<CoscoSupplierChangeApply> selectCoscoSupplierChangeApplyList(CoscoSupplierChangeApply coscoSupplierChangeApply);
/**
* 新增中远海运_供应商_供应商信息变更申请

View File

@ -19,6 +19,11 @@ public class CoscoSupplierBase extends CoscoBaseEntity {
/** 主键ID */
private String id;
/**
* 部门id
*/
private String deptId;
/** 供应商身份类型dvs.境内企业/机构、ovs.境外企业、pe.个人) */
//@Excel(name = "供应商身份类型", readConverterExp = "d=vs.境内企业/机构、ovs.境外企业、pe.个人")
private String supplierType;
@ -159,5 +164,9 @@ public class CoscoSupplierBase extends CoscoBaseEntity {
//@Excel(name = "最后更新时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date lastUpdateTime;
private String supplierTypeCn;
private String accessStatusCn;
}

View File

@ -1,6 +1,7 @@
package com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity;
import java.util.Date;
import java.util.List;
import com.chinaunicom.zyhy.ebtp.supplier.common.CoscoBaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
@ -63,5 +64,9 @@ public class CoscoSupplierChangeApply extends CoscoBaseEntity {
private String approveStatusText;
private CoscoSupplierDiffVo coscoSupplierDiffVo;
//变更内容字段
private List<String> textList;
}

View File

@ -2,6 +2,7 @@ package com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity;
import lombok.Data;
import java.util.List;
import java.util.Map;
@Data
@ -21,4 +22,6 @@ public class CoscoSupplierDiffVo {
Map<String,Object> bankListMap;
//变更内容
List<String> txtList;
}

View File

@ -2,10 +2,7 @@ package com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.chinaunicom.zyhy.ebtp.supplier.coscoBlack.vo.BlackSupplierVo;
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBank;
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBase;
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierChangeApply;
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierVo;
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.*;
import java.util.List;
@ -19,6 +16,9 @@ public interface ICoscoSupplierBaseService {
IPage<CoscoSupplierBase> getPage(CoscoSupplierBase coscoSupplierBase);
IPage<CoscoAccessSupplierCategory> getZrCategoryPage(CoscoAccessSupplierCategory coscoSupplierBase);
/**
* 查询中远海运_供应商_基本信息

View File

@ -31,7 +31,7 @@ public interface ICoscoSupplierChangeApplyService {
* @param coscoSupplierChangeApply 中远海运_供应商_供应商信息变更申请
* @return 中远海运_供应商_供应商信息变更申请集合
*/
public List<CoscoSupplierChangeApply> selectCoscoSupplierChangeApplyList(CoscoSupplierChangeApply coscoSupplierChangeApply);
public IPage<CoscoSupplierChangeApply> selectCoscoSupplierChangeApplyList(CoscoSupplierChangeApply coscoSupplierChangeApply);
/**
* 新增中远海运_供应商_供应商信息变更申请

View File

@ -560,6 +560,7 @@ public class CoscoAccessWorkServiceImpl implements ICoscoAccessWorkService {
coscoSupplierBase.setUpdateBy("1");
coscoSupplierBase.setUpdateTime(CoscoDateUtils.getNowDate());
coscoSupplierBase.setLastUpdateTime(CoscoDateUtils.getNowDate());
coscoSupplierBase.setDeptId(coscoAccessWorkData.getDeptId());
coscoSupplierBaseMapper.updateCoscoSupplierBase(coscoSupplierBase);
}

View File

@ -59,7 +59,8 @@ public class CoscoSupplierBaseServiceImpl implements ICoscoSupplierBaseService {
@Autowired
private CoscoSupplierChangeApplyMapper coscoSupplierChangeApplyMapper;
@Autowired
private CoscoAccessSupplierCategoryMapper coscoAccessSupplierCategoryMapper;
@Override
public IPage<CoscoSupplierBase> getPage(CoscoSupplierBase coscoSupplierBase) {
@ -68,6 +69,13 @@ public class CoscoSupplierBaseServiceImpl implements ICoscoSupplierBaseService {
return coscoSupplierBaseMapper.selectPageList(page, coscoSupplierBase);
}
@Override
public IPage<CoscoAccessSupplierCategory> getZrCategoryPage(CoscoAccessSupplierCategory coscoAccessSupplierCategory) {
// 创建分页对象(当前页,每页大小)
IPage<CoscoAccessSupplierCategory> page = new Page<>(coscoAccessSupplierCategory.getPageNo(), coscoAccessSupplierCategory.getPageSize());
return coscoAccessSupplierCategoryMapper.selectPageList(page, coscoAccessSupplierCategory);
}
/**
* 查询中远海运_供应商_基本信息
*

View File

@ -1,11 +1,13 @@
package com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.service.impl;
import java.lang.reflect.Field;
import java.util.*;
import java.util.stream.Collectors;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
import com.chinaunicom.zyhy.ebtp.supplier.common.ChangeText;
import com.chinaunicom.zyhy.ebtp.supplier.common.CoscoDateUtils;
import com.chinaunicom.zyhy.ebtp.supplier.common.CoscoType;
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.dao.mapper.*;
@ -46,6 +48,26 @@ public class CoscoSupplierChangeApplyServiceImpl implements ICoscoSupplierChange
return coscoSupplierChangeApplyMapper.selectPageList(page, data);
}
/**
* 查询中远海运_供应商_供应商信息变更申请列表
*
* @return 中远海运_供应商_供应商信息变更申请
*/
@Override
public IPage<CoscoSupplierChangeApply> selectCoscoSupplierChangeApplyList(CoscoSupplierChangeApply data) {
// 创建分页对象(当前页,每页大小)
IPage<CoscoSupplierChangeApply> page = new Page<>(data.getPageNo(), data.getPageSize());
IPage<CoscoSupplierChangeApply> CoscoSupplierChangeApplyPage
= coscoSupplierChangeApplyMapper.selectCoscoSupplierChangeApplyList(page, data);
List<CoscoSupplierChangeApply> coscoSupplierChangeApplies = CoscoSupplierChangeApplyPage.getRecords();
for(CoscoSupplierChangeApply coscoSupplierChangeApply : coscoSupplierChangeApplies){
CoscoSupplierDiffVo vo = selectCoscoSupplierChangeApplyById(coscoSupplierChangeApply.getId());
coscoSupplierChangeApply.setTextList(vo.getTxtList());
}
return CoscoSupplierChangeApplyPage;
}
/**
* 查询中远海运_供应商_供应商信息变更申请
*
@ -53,6 +75,7 @@ public class CoscoSupplierChangeApplyServiceImpl implements ICoscoSupplierChange
*/
@Override
public CoscoSupplierDiffVo selectCoscoSupplierChangeApplyById(String appid) {
List<String> upTxt = new ArrayList<>();
CoscoSupplierDiffVo diffVo = new CoscoSupplierDiffVo();
CoscoSupplierChangeApply coscoSupplierChangeApply = coscoSupplierChangeApplyMapper.selectCoscoSupplierChangeApplyById(appid);
@ -65,7 +88,15 @@ public class CoscoSupplierChangeApplyServiceImpl implements ICoscoSupplierChange
coscoSupplierChangeBase.setSupplierId(coscoSupplierChangeApply.getSupplierId());
coscoSupplierChangeBase.setSupplierChangeApplyId(appid);
SupplierChangeDiffResult selectDiff = coscoSupplierChangeBaseMapper.selectDiff(coscoSupplierChangeBase);
//验证基本信息
try{
boolean supplierDiff = supplierChangeDiffResultFieldValue(selectDiff);
if(supplierDiff){
upTxt.add(ChangeText.JBXX);
}
}catch (Exception e){
e.printStackTrace();
}
//老基本信息
CoscoSupplierChangeBase oldCoscoSupplierBase = coscoSupplierChangeBaseMapper.selectBySupplierId(coscoSupplierChangeApply.getSupplierId());
//新基本信息
@ -85,14 +116,26 @@ public class CoscoSupplierChangeApplyServiceImpl implements ICoscoSupplierChange
coscoSupplierChangeQualificationsMapper.selectCoscoSupplierChangeQualificationsList(coscoSupplierChangeQualifications2);
//资质对比
Map<String,Object> qualificationsMap = qualificationsDiff(oldCoscoSupplierChangeQualificationsList,newCoscoSupplierChangeQualificationsList);
if(qualificationsMap != null){
if(qualificationsMap.get("text") != null){
upTxt.add(qualificationsMap.get("text").toString());
}
}
//开票信息比对
CoscoSupplierChangeInvoice invoice = new CoscoSupplierChangeInvoice();
invoice.setOldSupplierId(oldCoscoSupplierBase.getId());
invoice.setNewSupplierId(newCoscoSupplierBase.getId());
InvoiceChangeDiffVo invoiceChangeDiffVo = coscoSupplierChangeInvoiceMapper.selectInvoiceDitt(invoice);
//验证开票信息
try{
boolean supplierDiff = invoiceChangeDiffVoFieldValue(invoiceChangeDiffVo);
if(supplierDiff){
upTxt.add(ChangeText.KPXX);
}
}catch (Exception e){
e.printStackTrace();
}
//原银行
CoscoSupplierChangeBank oldBank = new CoscoSupplierChangeBank();
@ -105,9 +148,13 @@ public class CoscoSupplierChangeApplyServiceImpl implements ICoscoSupplierChange
newBank.setSupplierId(newCoscoSupplierBase.getId());
List<CoscoSupplierChangeBank> newBankList =
coscoSupplierChangeBankMapper.selectCoscoSupplierChangeBankList(newBank);
//资质对比
//银行对比
Map<String,Object> bankListMap = bankDiff(oldBankList,newBankList);
if(bankListMap != null){
if(bankListMap.get("text") != null){
upTxt.add(bankListMap.get("text").toString());
}
}
diffVo.setCoscoSupplierChangeApply(coscoSupplierChangeApply);
@ -115,12 +162,22 @@ public class CoscoSupplierChangeApplyServiceImpl implements ICoscoSupplierChange
diffVo.setQualificationsMap(qualificationsMap);
diffVo.setInvoiceChangeDiffVo(invoiceChangeDiffVo);
diffVo.setBankListMap(bankListMap);
diffVo.setTxtList(upTxt);
}else{
//基础信息比对结果
CoscoSupplierChangeBase coscoSupplierChangeBase = new CoscoSupplierChangeBase();
coscoSupplierChangeBase.setSupplierChangeApplyIdOld(oldCoscoSupplierChangeApply.getId());
coscoSupplierChangeBase.setSupplierChangeApplyId(appid);
SupplierChangeDiffResult selectDiff = coscoSupplierChangeBaseMapper.selectDiff(coscoSupplierChangeBase);
//验证基本信息
try{
boolean supplierDiff = supplierChangeDiffResultFieldValue(selectDiff);
if(supplierDiff){
upTxt.add(ChangeText.JBXX);
}
}catch (Exception e){
e.printStackTrace();
}
//老基本信息
CoscoSupplierChangeBase oldCoscoSupplierBase = coscoSupplierChangeBaseMapper.selectBySupplierChangeApplyId(oldCoscoSupplierChangeApply.getId());
@ -141,14 +198,26 @@ public class CoscoSupplierChangeApplyServiceImpl implements ICoscoSupplierChange
coscoSupplierChangeQualificationsMapper.selectCoscoSupplierChangeQualificationsList(coscoSupplierChangeQualifications2);
//资质对比
Map<String,Object> qualificationsMap = qualificationsDiff(oldCoscoSupplierChangeQualificationsList,newCoscoSupplierChangeQualificationsList);
if(qualificationsMap != null){
if(qualificationsMap.get("text") != null){
upTxt.add(qualificationsMap.get("text").toString());
}
}
//开票信息比对
CoscoSupplierChangeInvoice invoice = new CoscoSupplierChangeInvoice();
invoice.setOldSupplierId(oldCoscoSupplierBase.getId());
invoice.setNewSupplierId(newCoscoSupplierBase.getId());
InvoiceChangeDiffVo invoiceChangeDiffVo = coscoSupplierChangeInvoiceMapper.selectInvoiceDitt(invoice);
//验证开票信息
try{
boolean supplierDiff = invoiceChangeDiffVoFieldValue(invoiceChangeDiffVo);
if(supplierDiff){
upTxt.add(ChangeText.KPXX);
}
}catch (Exception e){
e.printStackTrace();
}
//原银行
CoscoSupplierChangeBank oldBank = new CoscoSupplierChangeBank();
@ -161,9 +230,13 @@ public class CoscoSupplierChangeApplyServiceImpl implements ICoscoSupplierChange
newBank.setSupplierId(newCoscoSupplierBase.getId());
List<CoscoSupplierChangeBank> newBankList =
coscoSupplierChangeBankMapper.selectCoscoSupplierChangeBankList(newBank);
//资质对比
//银行对比
Map<String,Object> bankListMap = bankDiff(oldBankList,newBankList);
if(bankListMap != null){
if(bankListMap.get("text") != null){
upTxt.add(bankListMap.get("text").toString());
}
}
diffVo.setCoscoSupplierChangeApply(coscoSupplierChangeApply);
@ -171,6 +244,7 @@ public class CoscoSupplierChangeApplyServiceImpl implements ICoscoSupplierChange
diffVo.setQualificationsMap(qualificationsMap);
diffVo.setInvoiceChangeDiffVo(invoiceChangeDiffVo);
diffVo.setBankListMap(bankListMap);
diffVo.setTxtList(upTxt);
}
return diffVo;
@ -233,7 +307,9 @@ public class CoscoSupplierChangeApplyServiceImpl implements ICoscoSupplierChange
}
}
}
if(delQualificationsList.size() > 0 || addQualificationsList.size() > 0 || updateQualificationsList.size() > 0){
qualificationsMap.put("text",ChangeText.ZZXX);
}
qualificationsMap.put("delList",delQualificationsList);
qualificationsMap.put("addList",addQualificationsList);
qualificationsMap.put("updateList",updateQualificationsList);
@ -297,26 +373,73 @@ public class CoscoSupplierChangeApplyServiceImpl implements ICoscoSupplierChange
}
}
}
if(delList.size() > 0 || addList.size() > 0 || updateList.size() > 0){
qualificationsMap.put("text",ChangeText.YHZG);
}
qualificationsMap.put("delList",delList);
qualificationsMap.put("addList",addList);
qualificationsMap.put("updateList",updateList);
return qualificationsMap;
}
/**
* 验证基础信息是否有变更
* @param result
* @return
* @throws IllegalAccessException
*/
public boolean supplierChangeDiffResultFieldValue(SupplierChangeDiffResult result) throws IllegalAccessException {
if (result == null) {
return false;
}
Field[] fields = result.getClass().getDeclaredFields();
for (Field field : fields) {
field.setAccessible(true);
Object value = field.get(result);
if (value != null) {
if (value instanceof String && !((String) value).isEmpty()) {
return true;
} else if (value instanceof Number && ((Number) value).intValue() != 0) {
return true;
} else if (!(value instanceof String) && !(value instanceof Number)) {
return true;
}
}
}
return false;
}
/**
* 查询中远海运_供应商_供应商信息变更申请列表
*
* @param coscoSupplierChangeApply 中远海运_供应商_供应商信息变更申请
* @return 中远海运_供应商_供应商信息变更申请
* 验证发票信息是否有变更
* @param result
* @return
* @throws IllegalAccessException
*/
@Override
public List<CoscoSupplierChangeApply> selectCoscoSupplierChangeApplyList(CoscoSupplierChangeApply coscoSupplierChangeApply) {
return coscoSupplierChangeApplyMapper.selectCoscoSupplierChangeApplyList(coscoSupplierChangeApply);
public boolean invoiceChangeDiffVoFieldValue(InvoiceChangeDiffVo result) throws IllegalAccessException {
if (result == null) {
return false;
}
Field[] fields = result.getClass().getDeclaredFields();
for (Field field : fields) {
field.setAccessible(true);
Object value = field.get(result);
if (value != null) {
if (value instanceof String && !((String) value).isEmpty()) {
return true;
} else if (value instanceof Number && ((Number) value).intValue() != 0) {
return true;
} else if (!(value instanceof String) && !(value instanceof Number)) {
return true;
}
}
}
return false;
}
/**
* 新增中远海运_供应商_供应商信息变更申请
*

View File

@ -37,22 +37,42 @@
left join cosco_category ca on c.category_id = ca.id and ca.del_flag = 'normal'
</sql>
<select id="selectPageList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplierCategory" resultMap="CoscoAccessSupplierCategoryResult">
<include refid="selectCoscoAccessSupplierCategoryVo"/>
<where>
c.del_flag = 'normal'
<if test="vo.accessWorkId != null and vo.accessWorkId != ''">
and c.access_work_id = #{vo.accessWorkId}
</if>
<if test="vo.supplierId != null and vo.supplierId != ''">
and c.supplier_id = #{vo.supplierId}
</if>
<if test="vo.categoryId != null and vo.categoryId != ''">
and c.category_id = #{vo.categoryId}
</if>
<if test="vo.lastUpdateTime != null ">
and c.last_update_time = #{vo.lastUpdateTime}
</if>
</where>
order by c.create_time desc
</select>
<select id="selectCoscoAccessSupplierCategoryList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplierCategory" resultMap="CoscoAccessSupplierCategoryResult">
<include refid="selectCoscoAccessSupplierCategoryVo"/>
<where>
c.del_flag = 'normal'
<if test="accessWorkId != null and accessWorkId != ''">
and c.access_work_id = #{accessWorkId}
</if>
<if test="supplierId != null and supplierId != ''">
and c.supplier_id = #{supplierId}
</if>
<if test="categoryId != null and categoryId != ''">
and c.category_id = #{categoryId}
</if>
<if test="lastUpdateTime != null ">
and c.last_update_time = #{lastUpdateTime}
</if>
<if test="accessWorkId != null and accessWorkId != ''">
and c.access_work_id = #{accessWorkId}
</if>
<if test="supplierId != null and supplierId != ''">
and c.supplier_id = #{supplierId}
</if>
<if test="categoryId != null and categoryId != ''">
and c.category_id = #{categoryId}
</if>
<if test="lastUpdateTime != null ">
and c.last_update_time = #{lastUpdateTime}
</if>
</where>
order by c.create_time desc
</select>

View File

@ -46,17 +46,92 @@
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="lastUpdateTime" column="last_update_time"/>
<result property="supplierTypeCn" column="supplier_type_cn"/>
<result property="accessStatusCn" column="access_status_cn"/>
<result property="deptId" column="dept_id"/>
</resultMap>
<sql id="selectCoscoSupplierBaseVo">
select id, supplier_type, licence_accessory, licence_date, enterprise_type, name, name_en, social_credit_code, `range`, reg_address, work_address, parent_company_investor, legal_person, id_card, capital, contacts_name, contacts_phone, contacts_type, contacts_email, telephone, nation, vat, taxpayer_id, currency, person_name, person_phone, person_bank, person_account, remark, access_status, blacklist_status, greylist_status, fillin_status, fillin_by, sap_code, del_flag, create_by, create_time, update_by, update_time, last_update_time
from cosco_supplier_base
SELECT
id,
dept_id,
supplier_type,
CASE supplier_type
WHEN 'dvs' THEN '境内企业'
WHEN 'ovs' THEN '境外企业'
WHEN 'pe' THEN '个人'
ELSE supplier_type
END AS supplier_type_cn,
licence_accessory,
licence_date,
enterprise_type,
name,
name_en,
social_credit_code,
`range`,
reg_address,
work_address,
parent_company_investor,
legal_person,
id_card,
capital,
contacts_name,
contacts_phone,
contacts_type,
contacts_email,
telephone,
nation,
vat,
taxpayer_id,
currency,
person_name,
person_phone,
person_bank,
person_account,
remark,
access_status,
CASE access_status
WHEN 0 THEN '未准入'
WHEN 1 THEN '已准入'
ELSE CAST(access_status AS CHAR)
END AS access_status_cn,
blacklist_status,
CASE blacklist_status
WHEN 0 THEN '未加入'
WHEN 1 THEN '已加入'
ELSE CAST(blacklist_status AS CHAR)
END AS blacklist_status_cn,
greylist_status,
CASE greylist_status
WHEN 0 THEN '未加入'
WHEN 1 THEN '已加入'
ELSE CAST(greylist_status AS CHAR)
END AS greylist_status_cn,
fillin_status,
CASE fillin_status
WHEN 0 THEN '否'
WHEN 1 THEN '是'
ELSE CAST(fillin_status AS CHAR)
END AS fillin_status_cn,
fillin_by,
sap_code,
create_by,
create_time,
update_by,
update_time,
last_update_time
FROM
cosco_supplier_base
</sql>
<select id="selectPageList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBase" resultMap="CoscoSupplierBaseResult">
<include refid="selectCoscoSupplierBaseVo"/>
<where>
and del_flag = 'normal'
<if test="vo.deptId != null and vo.deptId != ''">
and dept_id = #{vo.deptId}
</if>
<if test="vo.supplierType != null and vo.supplierType != ''">
and supplier_type = #{vo.supplierType}
</if>
@ -168,6 +243,9 @@
<include refid="selectCoscoSupplierBaseVo"/>
<where>
and del_flag = 'normal'
<if test="vo.deptId != null and vo.deptId != ''">
and dept_id = #{vo.deptId}
</if>
<if test="supplierType != null and supplierType != ''">
and supplier_type = #{supplierType}
</if>
@ -499,6 +577,9 @@
<if test="lastUpdateTime != null">last_update_time =
#{lastUpdateTime},
</if>
<if test="deptId != null and deptId != ''">dept_id =
#{deptId},
</if>
</trim>
where id = #{id}
</update>

View File

@ -38,28 +38,44 @@
<select id="selectPageList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierChangeApply" resultMap="CoscoSupplierChangeApplyResult">
SELECT
ca.id,
sb.`name` as supplierName ,
csca.id,
sb.id as supplier_id,
csca.change_time,
CASE
WHEN sb.supplier_type = 'dvs' THEN '境内企业'
WHEN sb.supplier_type = 'ovs' THEN '境企业'
WHEN sb.supplier_type = 'pe' THEN '个人'
WHEN sb.supplier_type = 'dvs' THEN
'境企业'
WHEN sb.supplier_type = 'ovs' THEN
'境外企业'
WHEN sb.supplier_type = 'pe' THEN
'个人'
END AS supplier_type,
sb.enterprise_type,
caw.update_time,
ca.change_time,
CASE
WHEN ca.approve_status = 0 THEN '审批中'
WHEN ca.approve_status = 1 THEN '通过'
WHEN ca.approve_status = 2 THEN '驳回'
ELSE CAST(ca.approve_status AS CHAR)
END AS approve_status_text
WHEN csca.approve_status = 0 THEN
'审批中'
WHEN csca.approve_status = 1 THEN
'通过'
WHEN csca.approve_status = 2 THEN
'驳回'
END AS approve_status_text,
sb.`name` as supplierName,
sb.enterprise_type,
caw.update_time
FROM
cosco_supplier_change_apply ca
left join cosco_supplier_base sb on sb.id = ca.supplier_id and sb.del_flag = 'normal'
cosco_supplier_base sb
LEFT JOIN (
SELECT c.id, c.supplier_id, c.change_time, c.approve_status
FROM cosco_supplier_change_apply c
INNER JOIN (
SELECT supplier_id, MAX(change_time) AS latest_time
FROM cosco_supplier_change_apply
GROUP BY supplier_id
) m ON c.supplier_id = m.supplier_id AND c.change_time = m.latest_time
) csca ON sb.id = csca.supplier_id
left join cosco_access_supplier cas on sb.id = cas.supplier_id
left join cosco_access_work caw on cas.access_work_id = caw.id and caw.del_flag = 'normal'
where sb.access_status = 1 and sb.blacklist_status = 0 and sb.greylist_status = 0 and caw.apply_type = 0 and ca.del_flag = 'normal'
where sb.access_status = 1 and sb.blacklist_status = 0 and sb.greylist_status = 0 and caw.apply_type = 0 and sb.del_flag = 'normal'
<if test="vo.supplierName != null and vo.supplierName != ''">
and sb.name like concat('%', #{vo.supplierName}, '%')
</if>
@ -67,38 +83,38 @@
and sb.supplier_type = #{vo.supplierType}
</if>
<if test="vo.startTime!=null and vo.startTime != ''">
and ca.change_time &gt;= #{vo.startTime}
and csca.change_time &gt;= #{vo.startTime}
</if>
<if test="vo.endTime!=null and vo.endTime != ''">
and ca.change_time &lt;= #{vo.endTime}
and csca.change_time &lt;= #{vo.endTime}
</if>
<if test="vo.approveStatus!=null and vo.approveStatus != ''">
and ca.approve_status = #{vo.approveStatus}
and csca.approve_status = #{vo.approveStatus}
</if>
order by ca.create_time desc
order by sb.create_time desc
</select>
<select id="selectCoscoSupplierChangeApplyList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierChangeApply" resultMap="CoscoSupplierChangeApplyResult">
<include refid="selectCoscoSupplierChangeApplyVo"/>
<where>
<if test="supplierId != null and supplierId != ''">
and supplier_id = #{supplierId}
</if>
<if test="changeBy != null and changeBy != ''">
and change_by = #{changeBy}
</if>
<if test="changeTime != null ">
and change_time = #{changeTime}
</if>
<if test="approveStatus != null ">
and approve_status = #{approveStatus}
</if>
<if test="workFlowId != null and workFlowId != ''">
and work_flow_id = #{workFlowId}
</if>
<if test="lastUpdateTime != null ">
and last_update_time = #{lastUpdateTime}
</if>
<if test="vo.supplierId != null and vo.supplierId != ''">
and supplier_id = #{vo.supplierId}
</if>
<if test="vo.changeBy != null and vo.changeBy != ''">
and change_by = #{vo.changeBy}
</if>
<if test="vo.changeTime != null ">
and change_time = #{vo.changeTime}
</if>
<if test="vo.approveStatus != null ">
and approve_status = #{vo.approveStatus}
</if>
<if test="vo.workFlowId != null and vo.workFlowId != ''">
and work_flow_id = #{vo.workFlowId}
</if>
<if test="vo.lastUpdateTime != null ">
and last_update_time = #{vo.lastUpdateTime}
</if>
</where>
</select>