代码优化

This commit is contained in:
TL
2025-07-02 09:54:43 +08:00
parent b45099f816
commit c8e1a1463f
35 changed files with 334 additions and 81 deletions

View File

@ -2,7 +2,8 @@ package com.chinaunicom.zyhy.ebtp.supplier.common;
public class CoscoType {
//供应商准入状态0.未准入、1.已准入)
//供应商准入状态0.未准入、1.已准入、2.退出
public static final Long ACCESS_STATUS_TC = 2L;
public static final Long ACCESS_STATUS_WZR = 0L;
public static final Long ACCESS_STATUS_YZR = 1L;

View File

@ -43,6 +43,19 @@ public class CoscoCategoryLibraryController extends BaseController {
}
/**
* 通过供应商id查询品类库
* @param coscoCategory
* @return
*/
@ApiOperation("查询分页数据")
@PostMapping("/supplierIdPage")
public BaseResponse<IPage<CoscoCategoryLibraryVo>> supplierIdPage(@ApiParam(value = "对象数据", required = true)
@RequestBody CoscoCategoryLibraryVo coscoCategory) {
return BaseResponse.success(coscoCategoryLibraryService.selectCategoryLibraryBySupplierIdPage(coscoCategory));
}
/**
* 获取品类库_品类库详细信息

View File

@ -79,4 +79,11 @@ public interface CoscoCategoryLibraryMapper extends IBaseMapper<CoscoCategoryLib
* @return
*/
CoscoCategoryLibrary selectByWorkFlowId(String workFlowId);
/**
* 通过供应商id查询品类库
* @return
*/
IPage<CoscoCategoryLibraryVo> selectCategoryLibraryBySupplierIdPage(IPage<CoscoCategoryLibraryVo> p,@Param("vo") CoscoCategoryLibraryVo coscoCategoryLibrary);
}

View File

@ -256,4 +256,27 @@
<include refid="selectCoscoCategoryLibraryVo"/>
where work_flow_id = #{workFlowId}
</select>
<select id="selectCategoryLibraryBySupplierIdPage" parameterType="map"
resultMap="CoscoCategoryLibraryVoMap">
select
ccl.id,
ccl.name,
ccl.area,
"集团" AS deptName,
"张三" AS createName,
ccl.term_of_validity AS termOfValidity,
ccl.approve_status AS approveStatus,
ccl.last_update_time as approveTime,
ccl.remark
from cosco_category_library_supplier ccls
left join cosco_category_library_supplier_apply cclsa on cclsa.id = ccls.category_library_supplier_apply_id
left join cosco_category_library ccl on ccls.category_library_id = ccl.id
where cclsa.approve_status = 1 and ccls.supplier_id = #{vo.supplierId}
<if test="vo.name!=null and vo.name!=''">
AND ccl.name LIKE CONCAT('%',#{vo.name},'%')
</if>
</select>
</mapper>

View File

@ -69,6 +69,8 @@ public interface ICoscoCategoryLibraryService extends IBaseService<CoscoCategor
*/
IPage<CoscoCategoryLibraryVo> getPageList(CoscoCategoryLibraryVo coscoCategory);
IPage<CoscoCategoryLibraryVo> selectCategoryLibraryBySupplierIdPage(CoscoCategoryLibraryVo coscoCategory);
/**
* 品类库详情
* @param id

View File

@ -143,6 +143,21 @@ public class CoscoCategoryLibraryServiceImpl extends BaseServiceImpl<CoscoCatego
}
/**
* 通过供应商id查询品类库
*
* @param coscoCategoryLibrary 品类库_品类库
* @return 品类库_品类库
*/
@Override
public IPage<CoscoCategoryLibraryVo> selectCategoryLibraryBySupplierIdPage(CoscoCategoryLibraryVo coscoCategoryLibrary) {
IPage<CoscoCategoryLibraryVo> p = new Page<>(coscoCategoryLibrary.getBasePageRequest().getPageNo(),
coscoCategoryLibrary.getBasePageRequest().getPageSize());
return coscoCategoryLibraryMapper.selectCategoryLibraryBySupplierIdPage(p, coscoCategoryLibrary);
}
/**
* 查询品类库详情
*

View File

@ -68,4 +68,9 @@ public class CoscoCategoryLibraryVo implements Serializable {
@ApiModelProperty(value = "分页对象信息")
private BasePageRequest basePageRequest;
/**
* 供应商id
*/
private String supplierId;
}

View File

@ -2,10 +2,12 @@ package com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.controller;
import com.alibaba.excel.EasyExcelFactory;
import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
import com.alibaba.nacos.common.utils.StringUtils;
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.AdmissionDetailsVo;
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplierCategory;
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBase;
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierVo;
@ -19,10 +21,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.net.URLEncoder;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.*;
/**
@ -150,7 +149,7 @@ public class CoscoSupplierBaseController extends BaseController {
// 动态设置导出字段(忽略未标注字段)
Set<String> includeFields = new HashSet<>(Arrays.asList(
"name","supplierTypeCn", "enterpriseType","categoryName","updateTime" // 指定要导出的字段名
"name","supplierTypeCn", "enterpriseType","categoryName","updateTime","accessStatusCn" // 指定要导出的字段名
));
String fileName = URLEncoder.encode("我的供应商.xlsx", "UTF-8");
@ -206,9 +205,11 @@ public class CoscoSupplierBaseController extends BaseController {
}
/**
* 供应商后台获取基本信息
* @param id
* @return
*/
@ApiOperation("查询数据")
@GetMapping("/{id}")
public BaseResponse<CoscoSupplierVo> get(@ApiParam(value = "主键id", required = true) @PathVariable String id){
@ -218,27 +219,32 @@ public class CoscoSupplierBaseController extends BaseController {
/**
* 查询这个供应商已准入的品类、准入明细页也掉这个接口
* 查询这个供应商已准入的品类、准入明细页也掉这个接口工作台用我自己获取登录人信息、如果前台不传供应商id自己去穿了就用传的
* @return 返回结果
*/
@ApiOperation("查询分页数据")
@PostMapping("/getCategoryPage")
public BaseResponse<IPage<CoscoAccessSupplierCategory>> getZrCategoryPage(@ApiParam(value = "对象数据", required = true) @RequestBody CoscoAccessSupplierCategory vo) {
public BaseResponse<IPage<AdmissionDetailsVo>> getZrCategoryPage(@ApiParam(value = "对象数据", required = true) @RequestBody AdmissionDetailsVo vo) {
//如果id是就自己查
if(StringUtils.isEmpty(vo.getSupplierId())){
//获取登录人信息
vo.setSupplierId("1939870786604302336");
}
return BaseResponse.success(coscoSupplierBaseService.getZrCategoryPage(vo));
}
/**
* 只查供应商基本信息
* 只查供应商基本信息(工作台用,我自己获取登录人信息)
* @param id
* @return
*/
@ApiOperation("查询数据")
@GetMapping("/coscoSupplierBase/{id}")
public BaseResponse<CoscoSupplierBase> getCoscoSupplierBase(@ApiParam(value = "主键id", required = true) @PathVariable String id){
//获取登录人信息
id = "9c12e8ea-a681-4184-81ba-5fa276299a00";
return BaseResponse.success(coscoSupplierBaseService.getCoscoSupplierBase(id));
}

View File

@ -49,7 +49,7 @@ public class CoscoSupplierChangeApplyController extends BaseController {
@ApiOperation("查询数据")
@GetMapping("/supplierChangeApplyById/{id}")
public BaseResponse<CoscoSupplierDiffVo> supplierChangeApplyById(@ApiParam(value = "主键id", required = true) @PathVariable String id){
id = "1938555957662838784";
return BaseResponse.success(coscoSupplierChangeApplyService.supplierChangeApplyById(id));
}
@ -61,7 +61,14 @@ public class CoscoSupplierChangeApplyController extends BaseController {
@ApiOperation("查询分页数据")
@PostMapping("/getSupplierChangePage")
public BaseResponse<IPage<CoscoSupplierChangeApply>> getSupplierChangePage(@ApiParam(value = "对象数据", required = true) @RequestBody CoscoSupplierChangeApply data) {
data.setSupplierId("1938468513881849856");
return BaseResponse.success(coscoSupplierChangeApplyService.selectCoscoSupplierChangeApplyList(data));
}
@GetMapping("/getSupplierIdCount/{id}")
public Integer getSupplierByIdCount(@ApiParam(value = "主键id", required = true) @PathVariable String id){
id = "1938468513881849856";
return coscoSupplierChangeApplyService.getSupplierByIdCount(id);
}
}

View File

@ -68,8 +68,9 @@ public class TycAndFxController {
* @return List<RmBaseResponse.DataItem> 风险信息列表
*/
@GetMapping("/queryRiskInfo")
BaseResponse<List<RmBaseResponse.DataItem>> queryRiskInfo(@RequestParam("supplierName") String supplierName){
return rmFeignClient.queryRiskInfo(supplierName);
BaseResponse<List<RmBaseResponse.DataItem>> queryRiskInfo(@RequestParam("supplierId") String supplierId){
CoscoSupplierBase coscoSupplierBase = coscoSupplierBaseService.selectSocialCreditCodeById(supplierId);
return rmFeignClient.queryRiskInfo(coscoSupplierBase.getName());
}

View File

@ -1,6 +1,7 @@
package com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.dao.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.AdmissionDetailsVo;
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplierCategory;
import org.springframework.data.repository.query.Param;
@ -14,9 +15,15 @@ import java.util.List;
*/
public interface CoscoAccessSupplierCategoryMapper {
/**
* 供应商品类退出
* @param page
* @param vo
* @return
*/
IPage<CoscoAccessSupplierCategory> selectExitCategoryList(IPage<CoscoAccessSupplierCategory> page, @Param("vo") CoscoAccessSupplierCategory vo);
IPage<CoscoAccessSupplierCategory> selectPageList(IPage<CoscoAccessSupplierCategory> page, @Param("vo") CoscoAccessSupplierCategory vo);
IPage<AdmissionDetailsVo> selectPageList(IPage<AdmissionDetailsVo> page, @Param("vo") AdmissionDetailsVo vo);
@ -36,6 +43,8 @@ public interface CoscoAccessSupplierCategoryMapper {
*/
public int selectCount(CoscoAccessSupplierCategory category);
public List<String> selectCategoryByDeptIdList(List<String> deptIds);
/**
* 查询供应商准入_供应商已准入品类列表
*

View File

@ -32,6 +32,15 @@ public interface CoscoAccessSupplierMapper {
*/
public List<CoscoAccessSupplier> selectCoscoAccessSupplierList(CoscoAccessSupplier coscoAccessSupplier);
/**
* 通过部门id集合查询审批中或者审批通过并且已准入的供应商id集合
* @param deptIds
* @return
*/
public List<String> selectSupplierIdByDeptIdList(List<String> deptIds);
IPage<CoscoAccessSupplier> selectSupplierPageList(IPage<CoscoAccessSupplier> page, @Param("vo") CoscoAccessSupplier vo);

View File

@ -29,7 +29,7 @@ public interface CoscoSupplierChangeApplyMapper {
*/
public CoscoSupplierChangeApply selectCoscoSupplierChangeApplyById(String id);
public CoscoSupplierChangeApply selectBySupplierId(String supplierId);
public int selectBySupplierId(String supplierId);

View File

@ -0,0 +1,33 @@
package com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity;
import com.chinaunicom.zyhy.ebtp.supplier.common.CoscoBaseEntity;
import lombok.Data;
@Data
public class AdmissionDetailsVo extends CoscoBaseEntity {
private static final long serialVersionUID = 1L;
//部门id
private String deptId;
//退出id
private String supplierexitId;
//退出时间
private String exitTime;
//退出原因
private String exitReason;
//退出品类id
private String categoryIds;
//退出品类名
private String categoryNames;
//供应商id
private String supplierId;
//加入黑名单时间
private String blackTime;
}

View File

@ -45,6 +45,7 @@ public class CoscoAccessSupplier extends CoscoBaseEntity {
//申请人
private String createBy;
private String supplierexitId;
//评审项集合
private List<CoscoAccessItem> coscoAccessItemList;

View File

@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
* 供应商准入_供应商已准入品类对象 cosco_access_supplier_category
@ -53,6 +54,8 @@ public class CoscoAccessSupplierCategory extends CoscoBaseEntity {
//评价时间
private String evaTime;
//已经在审批中或者审批通过的品类id集合
private List<String> categoryList;

View File

@ -36,12 +36,12 @@ public class CoscoAccessWork extends CoscoBaseEntity {
private String accessType;
/** 评审开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
//@Excel(name = "评审开始时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date startTime;
/** 评审结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
//@Excel(name = "评审结束时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date endTime;

View File

@ -16,11 +16,11 @@ public class CoscoMessage extends CoscoBaseEntity {
private static final long serialVersionUID = 1L;
/** 主键ID */
@NotBlank(message = "id不能为空")
private String id;
/** 接收人ID */
//@Excel(name = "接收人ID")
@NotBlank(message = "接收人id不能为空")
private String receiverId;
/** 内容 */

View File

@ -9,6 +9,7 @@ import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.util.Date;
import java.util.List;
/**
* 中远海运_供应商_基本信息对象 cosco_supplier_base
@ -224,4 +225,6 @@ public class CoscoSupplierBase {
@ExcelProperty("品类名称")
private String categoryName;
private List<String> deptList;
}

View File

@ -54,5 +54,9 @@ public class CoscoSupplierexit extends CoscoBaseEntity {
private String endTime;
//退出时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date exitTime;
}

View File

@ -1,10 +1,7 @@
package com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplierCategory;
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 com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.vo.SupplierPageVo;
import java.util.List;
@ -25,7 +22,7 @@ public interface ICoscoSupplierBaseService {
IPage<CoscoSupplierBase> getMySupplierBasePage(CoscoSupplierBase coscoSupplierBase);
IPage<CoscoAccessSupplierCategory> getZrCategoryPage(CoscoAccessSupplierCategory coscoSupplierBase);
IPage<AdmissionDetailsVo> getZrCategoryPage(AdmissionDetailsVo vo);
public List<CoscoSupplierBase> getMySupplierBaseList(CoscoSupplierBase coscoSupplierBase);

View File

@ -29,6 +29,7 @@ public interface ICoscoSupplierChangeApplyService {
*/
public IPage<CoscoSupplierChangeApply> selectCoscoSupplierChangeApplyList(CoscoSupplierChangeApply coscoSupplierChangeApply);
public int getSupplierByIdCount(String sId);
/**
* 修改中远海运_供应商_供应商信息变更申请

View File

@ -20,6 +20,11 @@ public interface ICoscoSupplierexitService {
IPage<CoscoSupplierexit> getPage(CoscoSupplierexit data);
/**
* 供应商品类退出
* @param data
* @return
*/
IPage<CoscoAccessSupplierCategory> getSupplierCategoryPage(CoscoAccessSupplierCategory data);
IPage<CoscoSupplierexitSupplierCategory> getExitInfoPage(CoscoSupplierexitSupplierCategory data);

View File

@ -180,7 +180,7 @@ public class CoscoAccessWorkCategoryServiceImpl implements ICoscoAccessWorkCateg
//先验证一下主任务表数据状态
CoscoAccessWork coscoAccessWorkData = coscoAccessWorkMapper.selectCoscoAccessWorkById(vo.getId());
if (!ObjectUtils.isEmpty(coscoAccessWorkData)) {
if (ObjectUtils.isEmpty(coscoAccessWorkData)) {
throw new IllegalArgumentException("任务信息不能为空");
}

View File

@ -2,6 +2,7 @@ package com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse;
import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
import com.chinaunicom.zyhy.ebtp.supplier.common.CoscoDateUtils;
import com.chinaunicom.zyhy.ebtp.supplier.common.CoscoIdUtil;
@ -570,7 +571,7 @@ public class CoscoAccessWorkServiceImpl implements ICoscoAccessWorkService {
//先验证一下主任务表数据状态
CoscoAccessWork coscoAccessWorkData = coscoAccessWorkMapper.selectCoscoAccessWorkById(vo.getId());
if (!ObjectUtils.isEmpty(coscoAccessWorkData)) {
if (ObjectUtils.isEmpty(coscoAccessWorkData)) {
throw new IllegalArgumentException("任务信息不能为空");
}

View File

@ -40,6 +40,10 @@ public class CoscoSupplierBaseServiceImpl implements ICoscoSupplierBaseService {
@Autowired
private ICoscoSupplierQualificationsService coscoSupplierQualificationsService;
@Autowired
private CoscoAccessSupplierMapper coscoAccessSupplierMapper;
@Autowired
private CoscoSupplierInvoiceMapper coscoSupplierInvoiceMapper;
@ -88,6 +92,10 @@ public class CoscoSupplierBaseServiceImpl implements ICoscoSupplierBaseService {
@Override
public IPage<CoscoSupplierBase> selectWzrPageList(CoscoSupplierBase coscoSupplierBase) {
List<String> deptIds = new ArrayList<>();
deptIds.add("DEPT001");
List<String> deptList = coscoAccessSupplierMapper.selectSupplierIdByDeptIdList(deptIds);
coscoSupplierBase.setDeptList(deptList);
// 创建分页对象(当前页,每页大小)
IPage<CoscoSupplierBase> page = new Page<>(coscoSupplierBase.getPageNo(), coscoSupplierBase.getPageSize());
return coscoSupplierBaseMapper.selectWzrPageList(page, coscoSupplierBase);
@ -108,10 +116,10 @@ public class CoscoSupplierBaseServiceImpl implements ICoscoSupplierBaseService {
}
@Override
public IPage<CoscoAccessSupplierCategory> getZrCategoryPage(CoscoAccessSupplierCategory coscoAccessSupplierCategory) {
public IPage<AdmissionDetailsVo> getZrCategoryPage(AdmissionDetailsVo vo) {
// 创建分页对象(当前页,每页大小)
IPage<CoscoAccessSupplierCategory> page = new Page<>(coscoAccessSupplierCategory.getPageNo(), coscoAccessSupplierCategory.getPageSize());
return coscoAccessSupplierCategoryMapper.selectPageList(page, coscoAccessSupplierCategory);
IPage<AdmissionDetailsVo> page = new Page<>(vo.getPageNo(), vo.getPageSize());
return coscoAccessSupplierCategoryMapper.selectPageList(page, vo);
}
@Override
@ -249,7 +257,7 @@ public class CoscoSupplierBaseServiceImpl implements ICoscoSupplierBaseService {
String appid = vo.getId();//任务主体id
CoscoSupplierChangeApply coscoSupplierChangeApply = coscoSupplierChangeApplyMapper.selectCoscoSupplierChangeApplyById(appid);
if (!ObjectUtils.isEmpty(coscoSupplierChangeApply)) {
if (ObjectUtils.isEmpty(coscoSupplierChangeApply)) {
throw new IllegalArgumentException("任务信息不能为空");
}
//先验证一下主任务表数据状态
@ -499,6 +507,6 @@ public class CoscoSupplierBaseServiceImpl implements ICoscoSupplierBaseService {
return true;
}
// 使用equals()比较字符串内容
return str1.equals(str2);
return !str1.equals(str2);
}
}

View File

@ -55,6 +55,10 @@ public class CoscoSupplierChangeApplyServiceImpl implements ICoscoSupplierChange
return coscoSupplierChangeApplyPage;
}
@Override
public int getSupplierByIdCount(String sId) {
return coscoSupplierChangeApplyMapper.selectBySupplierId(sId);
}
@Override

View File

@ -16,6 +16,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
@ -53,10 +54,22 @@ public class CoscoSupplierexitServiceImpl implements ICoscoSupplierexitService {
return coscoSupplierexitMapper.selectPageList(page, data);
}
/**
* 供应商品类退出
* @param data
* @return
*/
@Override
public IPage<CoscoAccessSupplierCategory> getSupplierCategoryPage(CoscoAccessSupplierCategory data) {
//获取当前登录人的所有部门,查询这个人所有部门下的已经通过与审批中的退出数据
List<String> deptIds = new ArrayList<>();
deptIds.add("DEPT001");
List<String> categoryList = coscoAccessSupplierCategoryMapper.selectCategoryByDeptIdList(deptIds);
//查询所有部门的没通过与审批中的数据
// 创建分页对象(当前页,每页大小)
IPage<CoscoAccessSupplierCategory> page = new Page<>(data.getPageNo(), data.getPageSize());
data.setCategoryList(categoryList);
return coscoAccessSupplierCategoryMapper.selectExitCategoryList(page, data);
}
@ -150,7 +163,7 @@ public class CoscoSupplierexitServiceImpl implements ICoscoSupplierexitService {
//先验证一下主任务表数据状态
CoscoSupplierexit coscoSupplierexit = coscoSupplierexitMapper.selectCoscoSupplierexitById(vo.getId());
if (!ObjectUtils.isEmpty(coscoSupplierexit)) {
if (ObjectUtils.isEmpty(coscoSupplierexit)) {
throw new IllegalArgumentException("任务信息不能为空");
}
if(CoscoType.APPROVE_STATUS_TG.equals(coscoSupplierexit.getApproveStatus()) ||
@ -166,6 +179,7 @@ public class CoscoSupplierexitServiceImpl implements ICoscoSupplierexitService {
coscoSupplierexit1.setId(vo.getId());
coscoSupplierexit1.setUpdateTime(date);
coscoSupplierexit1.setLastUpdateTime(date);
coscoSupplierexit1.setExitTime(date);
coscoSupplierexitMapper.updateCoscoSupplierexit(coscoSupplierexit1);
//查询该任务下的所有供应商品类
@ -213,7 +227,8 @@ public class CoscoSupplierexitServiceImpl implements ICoscoSupplierexitService {
CoscoAccessSupplier coscoAccessSupplier2 = new CoscoAccessSupplier();
coscoAccessSupplier2.setDeptId(coscoSupplierexit.getDeptId());
coscoAccessSupplier2.setSupplierId(coscoSupplierexitSupplier1.getSupplierId());
coscoAccessSupplier2.setAccessStatus(CoscoType.ACCESS_STATUS_WZR);
coscoAccessSupplier2.setAccessStatus(CoscoType.ACCESS_STATUS_TC);
coscoAccessSupplier2.setSupplierexitId(coscoSupplierexit.getId());//退出任务表id
coscoAccessSupplierMapper.updateCoscoAccessSupplierBySupplierIdAndDeptId(coscoAccessSupplier2);
}
}

View File

@ -98,8 +98,8 @@ spring:
redis:
sentinel:
master: eshop-redis
nodes: 10.125.164.124:32718, 10.125.164.118:32716, 10.125.164.121:32716
password: Unicom#135
nodes: 10.0.0.125:6379
password:
# 天宫Eureka配置
eureka:
@ -118,7 +118,7 @@ mybatis-plus:
map-underscore-to-camel-case: true
auto-mapping-behavior: full
# 这个配置会将执行的sql打印出来在开发或测试的时候可以用
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
mapper-locations: classpath*:com/chinaunicom/**/mapper/*Mapper.xml
global-config:
# 逻辑删除配置
@ -127,6 +127,12 @@ mybatis-plus:
logic-not-delete-value: normal # 逻辑删除标记:正常数据
logic-delete-value: deleted # 逻辑删除标记:已删除的数据
type-aliases-package: com.chinaunicom.mall.ebtp.project
logging:
level:
com.your.mapper.package: trace # 改为TRACE级别可以看到更详细参数
org.apache.ibatis: debug
com.baomidou.mybatisplus: debug
jdbc.sqlonly: debug # 如果需要JDBC级别的日志
hystrix:
command:

View File

@ -37,24 +37,43 @@
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 id="selectPageList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.AdmissionDetailsVo" resultType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.AdmissionDetailsVo">
SELECT
caw.update_time as updateTime,
cas.dept_id as deptId,
cas.supplierexit_id as supplierexitId,
cse.exit_time as exitTime,
cse.exit_reason as exitReason,
GROUP_CONCAT(casc.category_id) AS categoryIds,
GROUP_CONCAT(
(
SELECT
(SELECT GROUP_CONCAT(category_name ORDER BY FIND_IN_SET(id, c.ancestors) SEPARATOR '-')
FROM cosco_category
WHERE FIND_IN_SET(id, c.ancestors)
) AS ancestor_names
FROM cosco_category c
WHERE id = casc.category_id
)
) AS categoryNames,
max(cb.update_time) as blackTime
FROM
cosco_access_supplier cas
LEFT JOIN cosco_access_supplier_category casc ON cas.supplier_id = casc.supplier_id AND casc.del_flag = 'normal' AND cas.access_status != 2
LEFT JOIN cosco_supplierexit cse ON cse.id = cas.supplierexit_id
LEFT JOIN cosco_access_work caw ON caw.id = cas.access_work_id
left join cosco_blacklist_supplier cbs on cas.supplier_id = cbs.supplier_id
left join cosco_blacklist cb on cbs.blacklist_id = cb.id and cas.dept_id = cb.dept_id and cb.approve_status = 1 and cb.restore_approve_status != 1
WHERE
cas.supplier_id = #{vo.supplierId}
AND cas.access_status IN (1,2)
GROUP BY
caw.update_time,
cas.dept_id,
cas.supplierexit_id,
cse.exit_time,
cse.exit_reason
ORDER BY caw.update_time desc
</select>
<select id="selectCoscoAccessSupplierCategoryList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplierCategory" resultMap="CoscoAccessSupplierCategoryResult">
@ -88,6 +107,19 @@
</if>
</select>
<select id="selectCategoryByDeptIdList" parameterType="java.util.List" resultType="String">
select cssc.category_id,cs.dept_id,cs.approve_status from cosco_supplierexit_supplier_category cssc
left join cosco_supplierexit cs on cs.id = cssc.supplierexit_id
where cs.approve_status in (0) and cs.del_flag = 'normal'
and cs.dept_id in (
<foreach item="item" index="index" collection="list" separator=",">
#{item}
</foreach>
)
</select>
<select id="selectExitCategoryList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplierCategory" resultMap="CoscoAccessSupplierCategoryResult">
SELECT
s.`name` as supplierName,
@ -122,7 +154,14 @@
and c.category_id = #{vo.categoryId}
</if>
<if test="vo.reviewResult != null and vo.reviewResult != ''">
and review_result = #{vo.reviewResult}
and es.review_result = #{vo.reviewResult}
</if>
<!-- 假设参数是 List<String> list -->
<if test="vo.categoryList != null and vo.categoryList.size() > 0">
AND c.category_id NOT IN
<foreach collection="vo.categoryList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>

View File

@ -8,6 +8,8 @@
<result property="accessWorkId" column="access_work_id"/>
<result property="supplierId" column="supplier_id"/>
<result property="deptId" column="dept_id"/>
<result property="supplierexitId" column="supplierexit_id"/>
</resultMap>
<sql id="selectCoscoAccessSupplierVo">
@ -37,6 +39,23 @@
</select>
<select id="selectSupplierIdByDeptIdList" parameterType="java.util.List" resultType="String">
SELECT
cas.supplier_id
FROM
cosco_access_work caw
LEFT JOIN cosco_access_supplier cas ON caw.id = cas.access_work_id
WHERE (caw.approve_status IS NULL OR caw.approve_status = 0 or (caw.approve_status = 1 and cas.access_status = 1))
AND cas.dept_id in (
<foreach item="item" index="index" collection="list" separator=",">
#{item}
</foreach>
)
</select>
<select id="selectSupplierPageList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplier" resultMap="CoscoAccessSupplierResult">
SELECT
GROUP_CONCAT( DISTINCT d.category_name SEPARATOR ', ' ) AS categoryName,
@ -147,6 +166,9 @@
<if test="accessStatus != null">access_status =
#{accessStatus},
</if>
<if test="supplierexitId != null">supplierexit_id =
#{supplierexitId},
</if>
</trim>
where id = #{id}
</update>
@ -158,9 +180,12 @@
<if test="accessStatus != null">access_status =
#{accessStatus},
</if>
<if test="supplierexitId != null">supplierexit_id =
#{supplierexitId},
</if>
</trim>
where supplier_id = #{supplierId}
<if test="deptId != null">dept_id =
<if test="deptId != null">
and dept_id = #{deptId}
</if>

View File

@ -102,7 +102,7 @@
#{updateTime},
</if>
</trim>
where receiver_id = #{receiverId}
where id = #{id}
</update>
<update id="deleteCoscoMessageById" parameterType="String">

View File

@ -139,7 +139,13 @@
cas.access_work_id,
cas.supplier_id,
csb.`name`,
caw.update_time
caw.update_time,
cas.access_status,
CASE cas.access_status
WHEN '0' THEN '未准入'
WHEN '1' THEN '已准入'
WHEN '2' THEN '退出'
END AS access_status_cn
FROM
cosco_access_supplier cas
LEFT JOIN cosco_access_work caw ON cas.access_work_id = caw.id
@ -152,21 +158,15 @@
<select id="selectWzrPageList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBase" resultMap="CoscoSupplierBaseResult">
<include refid="selectCoscoSupplierBaseVo"/>
WHERE
id NOT IN (
SELECT
cas.supplier_id
FROM
cosco_access_work caw
LEFT JOIN cosco_access_supplier cas ON caw.id = cas.access_work_id
WHERE
(
caw.approve_status IS NULL
OR caw.approve_status IN ( 0, 1 ))
<if test="vo.deptId != null and vo.deptId != ''">
AND cas.dept_id IN (#{vo.deptId})
WHERE 1=1
<!-- 假设参数是 List<String> list -->
<if test="vo.deptList != null and vo.deptList.size() > 0">
AND id NOT IN
<foreach collection="vo.deptList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
)
<if test="vo.supplierType != null and vo.supplierType != ''">
and supplier_type = #{vo.supplierType}
</if>

View File

@ -180,12 +180,15 @@
</select>
<select id="selectBySupplierId" parameterType="String"
resultMap="CoscoSupplierChangeApplyResult">
<include refid="selectCoscoSupplierChangeApplyVo"/>
WHERE c.supplier_id = #{supplierId}
resultType="integer">
SELECT
count(0)
FROM
cosco_supplier_change_apply c
WHERE c.supplier_id = #{supplierId} and c.approve_status = 0
AND c.del_flag = 'normal'
ORDER BY c.change_time DESC
LIMIT 1 OFFSET 1;
LIMIT 1;
</select>

View File

@ -17,6 +17,9 @@
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="lastUpdateTime" column="last_update_time"/>
<result property="exitTime" column="exit_time"/>
</resultMap>
<sql id="selectCoscoSupplierexitVo">
@ -33,7 +36,8 @@
END AS approveStatusText,
work_flow_id,
create_by,
create_time
create_time,
exit_time
FROM
cosco_supplierexit
</sql>
@ -175,6 +179,9 @@
<if test="lastUpdateTime != null">last_update_time =
#{lastUpdateTime},
</if>
<if test="exitTime != null">exit_time =
#{exitTime},
</if>
</trim>
where id = #{id}
</update>