优化代码
This commit is contained in:
@ -0,0 +1,40 @@
|
||||
package com.chinaunicom.zyhy.ebtp.supplier.common;
|
||||
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
||||
import org.apache.ibatis.executor.Executor;
|
||||
import org.apache.ibatis.mapping.BoundSql;
|
||||
import org.apache.ibatis.mapping.MappedStatement;
|
||||
import org.apache.ibatis.session.ResultHandler;
|
||||
import org.apache.ibatis.session.RowBounds;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class CustomPaginationInterceptor extends PaginationInnerInterceptor {
|
||||
|
||||
@Override
|
||||
public void beforeQuery(Executor executor, MappedStatement ms, Object parameter, RowBounds rowBounds, ResultHandler resultHandler, BoundSql boundSql) throws SQLException {
|
||||
System.out.println("Current SQL ID------------------------------------: " + ms.getId());
|
||||
if (ms.getId().endsWith("_COUNT")) {
|
||||
String originalSql = boundSql.getSql();
|
||||
// 关键修改:增强正则以匹配多行和子查询中的 ORDER BY
|
||||
String newSql = removeOrderBy(originalSql);
|
||||
resetBoundSql(boundSql, newSql);
|
||||
}
|
||||
super.beforeQuery(executor, ms, parameter, rowBounds, resultHandler, boundSql);
|
||||
}
|
||||
|
||||
private String removeOrderBy(String sql) {
|
||||
// 改进后的正则:跨行匹配,并处理子查询中的 ORDER BY
|
||||
return sql.replaceAll("(?is)order\\s+by\\s+[^\\)]+", "");
|
||||
}
|
||||
|
||||
private void resetBoundSql(BoundSql boundSql, String newSql) {
|
||||
try {
|
||||
Field field = BoundSql.class.getDeclaredField("sql");
|
||||
field.setAccessible(true);
|
||||
field.set(boundSql, newSql);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("Failed to modify BoundSql", e);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package com.chinaunicom.zyhy.ebtp.supplier.common;
|
||||
import com.alibaba.excel.converters.Converter;
|
||||
import com.alibaba.excel.enums.CellDataTypeEnum;
|
||||
import com.alibaba.excel.metadata.GlobalConfiguration;
|
||||
import com.alibaba.excel.metadata.data.WriteCellData;
|
||||
import com.alibaba.excel.metadata.property.ExcelContentProperty;
|
||||
import com.alibaba.excel.metadata.data.CellData;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 将 List<?> 类型转换为 Excel 单元格中的逗号分隔字符串
|
||||
*/
|
||||
public class ListToStringConverter implements Converter<List<?>> {
|
||||
|
||||
@Override
|
||||
public Class<?> supportJavaTypeKey() {
|
||||
return List.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CellDataTypeEnum supportExcelTypeKey() {
|
||||
return CellDataTypeEnum.STRING;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WriteCellData<?> convertToExcelData(List<?> value,
|
||||
ExcelContentProperty contentProperty,
|
||||
GlobalConfiguration globalConfiguration) {
|
||||
String joined = value.stream()
|
||||
.map(Object::toString)
|
||||
.collect(Collectors.joining(","));
|
||||
return new WriteCellData<>(joined);
|
||||
}
|
||||
}
|
@ -11,7 +11,7 @@ public class MybatisPlusConfig {
|
||||
@Bean
|
||||
public MybatisPlusInterceptor mybatisPlusInterceptor() {
|
||||
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
||||
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL)); // 数据库类型
|
||||
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL)); // 根据你的数据库类型调整
|
||||
return interceptor;
|
||||
}
|
||||
}
|
@ -230,19 +230,17 @@ public class MessageLogAspect {
|
||||
CoscoSupplierAccessWorkVo vo = (CoscoSupplierAccessWorkVo) result;
|
||||
List<CoscoMessage> coscoMessageList = new ArrayList<>();
|
||||
// 使用转换后的对象
|
||||
for (CoscoAccessSupplier coscoAccessSupplier : vo.getSupplierList()) {
|
||||
for (CoscoAccessCategory coscoAccessCategory : coscoAccessSupplier.getCoscoAccessCategoryList()) {
|
||||
String approveStr = "";
|
||||
if (CoscoType.APPROVE_STATUS_TG.equals(vo.getApproveStatus())) {
|
||||
approveStr = "已通过";
|
||||
} else {
|
||||
approveStr = "已驳回";
|
||||
}
|
||||
String cont = coscoAccessSupplier.getSupplierName() + ",准入" +
|
||||
vo.getDeptId() + "部门的" +
|
||||
coscoAccessCategory.getCategoryName() + "品类," + approveStr;
|
||||
coscoMessageList.add(coscoMessageData(coscoAccessSupplier.getSupplierId(), cont, messageType));
|
||||
for (CoscoAccessCategory coscoAccessCategory : vo.getSupplierAndCategoryList()) {
|
||||
String approveStr = "";
|
||||
if (CoscoType.APPROVE_STATUS_TG.equals(vo.getApproveStatus())) {
|
||||
approveStr = "已通过";
|
||||
} else {
|
||||
approveStr = "已驳回";
|
||||
}
|
||||
String cont = coscoAccessCategory.getSupplierName() + ",准入" +
|
||||
vo.getDeptId() + "部门的" +
|
||||
coscoAccessCategory.getCategoryName() + "品类," + approveStr;
|
||||
coscoMessageList.add(coscoMessageData(coscoAccessCategory.getSupplierId(), cont, messageType));
|
||||
}
|
||||
pustMessage(coscoMessageList);
|
||||
} else {
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.chinaunicom.zyhy.ebtp.supplier.coscoAnnualreview.service.impl;
|
||||
|
||||
import cn.hutool.system.UserInfo;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
|
||||
|
@ -1,8 +1,5 @@
|
||||
package com.chinaunicom.zyhy.ebtp.supplier.coscoEvaluate.service.impl;
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
@ -10,9 +7,7 @@ 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.base.constant.AnnualreviewTaskConstant;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.base.constant.CoscoCategoryConstant;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.base.constant.EvaluateTaskConstant;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.base.constant.SupplierUserConstant;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.base.service.impl.UserService;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.base.vo.SelectUserVo;
|
||||
@ -24,12 +19,9 @@ import com.chinaunicom.zyhy.ebtp.supplier.coscoEvaluate.dao.*;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscoEvaluate.entity.*;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscoEvaluate.service.ICoscoEvaluateTaskAssignDeptService;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscoEvaluate.service.ICoscoEvaluateTemplateIndicatorNdService;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscoEvaluate.service.ICoscoEvaluateTemplateIndicatorStService;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscoEvaluate.vo.*;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.dao.mapper.CoscoSupplierBaseMapper;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscoEvaluate.service.ICoscoEvaluateTaskService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
@ -0,0 +1,37 @@
|
||||
package com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.controller;
|
||||
|
||||
import com.chinaunicom.mall.ebtp.common.base.controller.BaseController;
|
||||
import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessCategory;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessItem;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBank;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.service.ICoscoAccessCategoryService;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.service.ICoscoAccessItemService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 中远海运_供应商_银行账户Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-16
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/coscoAccessItem")
|
||||
public class CoscoAccessItemController extends BaseController {
|
||||
@Autowired
|
||||
private ICoscoAccessCategoryService coscoAccessCategoryService;
|
||||
|
||||
/**
|
||||
* 分组查询工作任务下的评审项
|
||||
*/
|
||||
@GetMapping("/groupByList")
|
||||
public BaseResponse<List<CoscoAccessCategory>> groupByList(CoscoAccessCategory coscoAccessCategory) {
|
||||
List<CoscoAccessCategory> list = coscoAccessCategoryService.selectCoscoAccessCategoryList(coscoAccessCategory);
|
||||
return BaseResponse.success(list);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
package com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.controller;
|
||||
|
||||
import com.alibaba.excel.EasyExcelFactory;
|
||||
import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
|
||||
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.CoscoAccessSupplier;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.service.ICoscoAccessSupplierService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
/**
|
||||
* 中远海运_供应商_银行账户Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-16
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/coscoAccessSupplier")
|
||||
public class CoscoAccessSupplierController extends BaseController {
|
||||
@Autowired
|
||||
private ICoscoAccessSupplierService coscoAccessSupplierService;
|
||||
|
||||
/**
|
||||
* 分组查询工作任务下的评审项
|
||||
*/
|
||||
@ApiOperation("查询分页数据")
|
||||
@PostMapping("/getPage")
|
||||
public BaseResponse getPage(@ApiParam(value = "对象数据", required = true) @RequestBody CoscoAccessSupplier coscoAccessSupplier) {
|
||||
coscoAccessSupplier.setAccessStatus(CoscoType.ACCESS_STATUS_YZR);
|
||||
List<String> deptIdList = new ArrayList<>();
|
||||
deptIdList.add("100");
|
||||
coscoAccessSupplier.setDeptIdList(deptIdList);
|
||||
return BaseResponse.success(coscoAccessSupplierService.selectCoscoAccessSupplierAndWorkPageList(coscoAccessSupplier));
|
||||
}
|
||||
|
||||
@GetMapping("/getPageExport")
|
||||
public void getPageExport(HttpServletResponse response, CoscoAccessSupplier coscoAccessSupplier){
|
||||
try{
|
||||
coscoAccessSupplier.setAccessStatus(CoscoType.ACCESS_STATUS_YZR);
|
||||
List<String> deptIdList = new ArrayList<>();
|
||||
deptIdList.add("100");
|
||||
coscoAccessSupplier.setDeptIdList(deptIdList);
|
||||
List<CoscoAccessSupplier> list = coscoAccessSupplierService.selectCoscoAccessSupplierAndWorkExecList(coscoAccessSupplier);
|
||||
|
||||
// 动态设置导出字段(忽略未标注字段)
|
||||
Set<String> includeFields = new HashSet<>(Arrays.asList(
|
||||
"supplierName","supplierTypeCn", "accessTypeText","categoryNameList","updateYear" // 指定要导出的字段名
|
||||
));
|
||||
|
||||
String fileName = URLEncoder.encode("供应商准入情况统计.xlsx", "UTF-8");
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + fileName);
|
||||
response.setCharacterEncoding("utf-8");
|
||||
|
||||
EasyExcelFactory.write(response.getOutputStream())
|
||||
.includeColumnFieldNames(includeFields)
|
||||
.head(CoscoAccessSupplier.class)
|
||||
.registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) // 自动列宽
|
||||
.sheet("供应商准入情况统计")
|
||||
.doWrite(list);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -34,6 +34,7 @@ public class CoscoAccessWorkController extends BaseController {
|
||||
@ApiOperation("查询分页数据")
|
||||
@PostMapping("/getPage")
|
||||
public BaseResponse<IPage<CoscoAccessWork>> getPage(@ApiParam(value = "对象数据", required = true) @RequestBody CoscoAccessWork data) {
|
||||
//判断当前登录人是否是组长
|
||||
data.setUserId("1");
|
||||
return BaseResponse.success(coscoAccessWorkService.getPage(data));
|
||||
}
|
||||
@ -79,7 +80,7 @@ public class CoscoAccessWorkController extends BaseController {
|
||||
@ApiOperation("查询数据")
|
||||
@GetMapping("/reviewInfo")
|
||||
public BaseResponse<List<CoscoAccessSupplier>> reviewInfo(@ApiParam(value = "主键id", required = true) String id,@ApiParam(value = "用户id", required = true) String userId){
|
||||
userId = "1000";
|
||||
userId = "1";
|
||||
return BaseResponse.success(coscoAccessWorkService.reviewInfo(id,userId));
|
||||
}
|
||||
|
||||
@ -102,7 +103,7 @@ public class CoscoAccessWorkController extends BaseController {
|
||||
@ApiOperation("修改数据")
|
||||
@PostMapping("/update")
|
||||
public BaseResponse<Boolean> update(@ApiParam(value = "对象数据", required = true) @RequestBody @Valid CoscoAccessUserItemVo vo){
|
||||
vo.setUserId("USER002");
|
||||
vo.setUserId("1");
|
||||
return BaseResponse.success(coscoAccessWorkService.updateCoscoAccessWork(vo));
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,6 @@ 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;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.service.ICoscoSupplierBaseService;
|
||||
@ -43,7 +42,7 @@ public class CoscoSupplierBaseController extends BaseController {
|
||||
*/
|
||||
@ApiOperation("查询分页数据")
|
||||
@PostMapping("/getPage")
|
||||
public BaseResponse<IPage<CoscoSupplierBase>> getPage(@ApiParam(value = "对象数据", required = true) @RequestBody CoscoSupplierBase coscoSupplierBase) {
|
||||
public BaseResponse<IPage<CoscoSupplierBase>> selectWzrPageList(@ApiParam(value = "对象数据", required = true) @RequestBody CoscoSupplierBase coscoSupplierBase) {
|
||||
return BaseResponse.success(coscoSupplierBaseService.selectWzrPageList(coscoSupplierBase));
|
||||
}
|
||||
|
||||
@ -122,18 +121,40 @@ public class CoscoSupplierBaseController extends BaseController {
|
||||
|
||||
|
||||
/**
|
||||
* 根据部门查询合格供应商列表查询分页数据
|
||||
* 根据部门查询合格供应商列表查询分页数据(只查境内,境外的合格供应商)
|
||||
* @return 返回结果
|
||||
*/
|
||||
@ApiOperation("查询分页数据")
|
||||
@PostMapping("/getPageQualified")
|
||||
public BaseResponse<IPage<CoscoSupplierBase>> getPageQualified(@ApiParam(value = "对象数据", required = true) @RequestBody CoscoSupplierBase coscoSupplierBase) {
|
||||
List<String> supplierTypeList = new ArrayList<>();
|
||||
supplierTypeList.add(CoscoType.SUPPLIER_TYPE_DVS);//境内
|
||||
supplierTypeList.add(CoscoType.SUPPLIER_TYPE_OVS);//境外
|
||||
coscoSupplierBase.setAccessStatus(CoscoType.ACCESS_STATUS_YZR);
|
||||
coscoSupplierBase.setBlacklistStatus(CoscoType.BLACKLIST_STATUS_W);
|
||||
coscoSupplierBase.setSupplierTypeList(supplierTypeList);
|
||||
return BaseResponse.success(coscoSupplierBaseService.getPage(coscoSupplierBase));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据部门查询合格供应商列表查询分页数据(只查个人的合格供应商)
|
||||
* @return 返回结果
|
||||
*/
|
||||
@ApiOperation("查询分页数据")
|
||||
@PostMapping("/getPagePe")
|
||||
public BaseResponse<IPage<CoscoSupplierBase>> getPagePe(@ApiParam(value = "对象数据", required = true) @RequestBody CoscoSupplierBase coscoSupplierBase) {
|
||||
List<String> supplierTypeList = new ArrayList<>();
|
||||
supplierTypeList.add(CoscoType.SUPPLIER_TYPE_PE);//个人
|
||||
coscoSupplierBase.setAccessStatus(CoscoType.ACCESS_STATUS_YZR);
|
||||
coscoSupplierBase.setBlacklistStatus(CoscoType.BLACKLIST_STATUS_W);
|
||||
coscoSupplierBase.setSupplierTypeList(supplierTypeList);
|
||||
return BaseResponse.success(coscoSupplierBaseService.getPage(coscoSupplierBase));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 导出合我的分页数据
|
||||
@ -170,20 +191,24 @@ public class CoscoSupplierBaseController extends BaseController {
|
||||
|
||||
|
||||
/**
|
||||
* 导出合格供应商列表查询分页数据
|
||||
* 导出境内境外合格供应商列表查询分页数据
|
||||
* @return
|
||||
*/
|
||||
|
||||
@GetMapping("/getPageQualifiedExport")
|
||||
public void getPageQualifiedExport(HttpServletResponse response, CoscoSupplierBase coscoSupplierBase){
|
||||
try{
|
||||
List<String> supplierTypeList = new ArrayList<>();
|
||||
supplierTypeList.add(CoscoType.SUPPLIER_TYPE_DVS);//境内
|
||||
supplierTypeList.add(CoscoType.SUPPLIER_TYPE_OVS);//境外
|
||||
coscoSupplierBase.setAccessStatus(CoscoType.ACCESS_STATUS_YZR);
|
||||
coscoSupplierBase.setBlacklistStatus(CoscoType.BLACKLIST_STATUS_W);
|
||||
coscoSupplierBase.setSupplierTypeList(supplierTypeList);
|
||||
List<CoscoSupplierBase> list = coscoSupplierBaseService.selectCoscoSupplierBaseList(coscoSupplierBase);
|
||||
|
||||
// 动态设置导出字段(忽略未标注字段)
|
||||
Set<String> includeFields = new HashSet<>(Arrays.asList(
|
||||
"name", "socialCreditCode","supplierTypeCn", "enterpriseTypeCn","createTime" // 指定要导出的字段名
|
||||
"name", "unifiedCode","supplierTypeCn", "enterpriseTypeCn","createTime" // 指定要导出的字段名
|
||||
));
|
||||
|
||||
String fileName = URLEncoder.encode("合格供应商.xlsx", "UTF-8");
|
||||
@ -204,6 +229,45 @@ public class CoscoSupplierBaseController extends BaseController {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出个人合格供应商列表查询分页数据
|
||||
* @return
|
||||
*/
|
||||
|
||||
@GetMapping("/getPagePeExport")
|
||||
public void getPagePeExport(HttpServletResponse response, CoscoSupplierBase coscoSupplierBase){
|
||||
try{
|
||||
List<String> supplierTypeList = new ArrayList<>();
|
||||
supplierTypeList.add(CoscoType.SUPPLIER_TYPE_PE);//个人
|
||||
coscoSupplierBase.setAccessStatus(CoscoType.ACCESS_STATUS_YZR);
|
||||
coscoSupplierBase.setBlacklistStatus(CoscoType.BLACKLIST_STATUS_W);
|
||||
coscoSupplierBase.setSupplierTypeList(supplierTypeList);
|
||||
List<CoscoSupplierBase> list = coscoSupplierBaseService.selectCoscoSupplierBaseList(coscoSupplierBase);
|
||||
|
||||
// 动态设置导出字段(忽略未标注字段)
|
||||
Set<String> includeFields = new HashSet<>(Arrays.asList(
|
||||
"name", "unifiedCode","personPhone", "createTime" // 指定要导出的字段名
|
||||
));
|
||||
|
||||
String fileName = URLEncoder.encode("个人合格供应商.xlsx", "UTF-8");
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + fileName);
|
||||
response.setCharacterEncoding("utf-8");
|
||||
|
||||
EasyExcelFactory.write(response.getOutputStream())
|
||||
.includeColumnFieldNames(includeFields)
|
||||
.head(CoscoSupplierBase.class)
|
||||
.registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()) // 自动列宽
|
||||
.sheet("个人合格供应商")
|
||||
.doWrite(list);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 供应商后台获取基本信息
|
||||
* @param id
|
||||
@ -243,7 +307,7 @@ public class CoscoSupplierBaseController extends BaseController {
|
||||
@GetMapping("/getSupplierInfo/{id}")
|
||||
public BaseResponse<CoscoSupplierBase> getCoscoSupplierBase(@ApiParam(value = "主键id", required = true) @PathVariable String id){
|
||||
//获取登录人信息
|
||||
id = "9c12e8ea-a681-4184-81ba-5fa276299a00";
|
||||
id = "1942424482567487488";
|
||||
return BaseResponse.success(coscoSupplierBaseService.getCoscoSupplierBase(id));
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessCategory;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -27,6 +29,12 @@ public interface CoscoAccessCategoryMapper {
|
||||
*/
|
||||
public List<CoscoAccessCategory> selectCoscoAccessCategoryList(CoscoAccessCategory coscoAccessCategory);
|
||||
|
||||
//通过任务id与部门id查询这个部门下不存在的品类
|
||||
public List<CoscoAccessCategory> selectCoscoAccessCategoryByDeptIdList(CoscoAccessCategory coscoAccessCategory);
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 新增供应商准入_准入申请关联品类
|
||||
*
|
||||
|
@ -44,12 +44,11 @@ public interface CoscoAccessItemAttachmentsMapper {
|
||||
public int updateCoscoAccessItemAttachments(CoscoAccessItemAttachments coscoAccessItemAttachments);
|
||||
|
||||
/**
|
||||
* 删除供应商准入_准入工作评审项附件
|
||||
* 通过评审项关联评审人表id准入工作评审项附件
|
||||
*
|
||||
* @param id 供应商准入_准入工作评审项附件主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCoscoAccessItemAttachmentsById(String id);
|
||||
public int deleteCoscoAccessItemAttachmentsByAccessUserItemId(String accessUserItemId);
|
||||
|
||||
/**
|
||||
* 批量删除供应商准入_准入工作评审项附件
|
||||
|
@ -27,6 +27,14 @@ public interface CoscoAccessItemMapper {
|
||||
*/
|
||||
public List<CoscoAccessItem> selectCoscoAccessItemList(CoscoAccessItem coscoAccessItem);
|
||||
|
||||
/**
|
||||
* 分组查询任务下的评审项
|
||||
* @param coscoAccessItem
|
||||
* @return
|
||||
*/
|
||||
public List<CoscoAccessItem> selectGroupByItemList(CoscoAccessItem coscoAccessItem);
|
||||
|
||||
|
||||
/**
|
||||
* 新增供应商准入_准入工作评审项
|
||||
*
|
||||
|
@ -2,6 +2,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.CoscoAccessSupplier;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBase;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.List;
|
||||
@ -31,14 +32,10 @@ public interface CoscoAccessSupplierMapper {
|
||||
*/
|
||||
public List<CoscoAccessSupplier> selectCoscoAccessSupplierList(CoscoAccessSupplier coscoAccessSupplier);
|
||||
|
||||
public IPage<CoscoAccessSupplier> selectCoscoAccessSupplierAndWorkPageList(IPage<CoscoAccessSupplier> page, @Param("vo") CoscoAccessSupplier vo);
|
||||
|
||||
public List<CoscoAccessSupplier> selectCoscoAccessSupplierAndWorkExecList(CoscoAccessSupplier coscoAccessSupplier);
|
||||
|
||||
/**
|
||||
* 通过部门id集合,查询审批中或者审批通过并且已准入的供应商id集合
|
||||
* @param deptIds
|
||||
* @return
|
||||
*/
|
||||
public List<String> selectSupplierIdByDeptIdList(List<String> deptIds);
|
||||
|
||||
|
||||
|
||||
|
@ -19,6 +19,14 @@ public interface CoscoAccessWorkAttachmentsMapper {
|
||||
*/
|
||||
public CoscoAccessWorkAttachments selectCoscoAccessWorkAttachmentsById(String id);
|
||||
|
||||
/**
|
||||
* 通过工作id查询附件信息
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public CoscoAccessWorkAttachments selectCoscoAccessWorkAttachmentsByWorkId(String id);
|
||||
|
||||
|
||||
/**
|
||||
* 查询中远海运_准入申请工作附件列表
|
||||
*
|
||||
|
@ -2,7 +2,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.CoscoAccessWork;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -15,9 +15,6 @@ import java.util.List;
|
||||
public interface CoscoAccessWorkMapper {
|
||||
|
||||
|
||||
|
||||
List<Long> selectPageByIdList(IPage<CoscoAccessWork> page, @Param("vo") CoscoAccessWork vo);
|
||||
|
||||
IPage<CoscoAccessWork> selectPageList(IPage<CoscoAccessWork> page, @Param("vo") CoscoAccessWork vo);
|
||||
|
||||
IPage<CoscoAccessWork> selectApproveList(CoscoAccessWork coscoAccessWork);
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.chinaunicom.mall.ebtp.common.base.dao.IBaseMapper;
|
||||
import com.chinaunicom.mall.ebtp.common.base.dao.IBaseMapper;;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBank;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
|
@ -1,11 +1,13 @@
|
||||
package com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.chinaunicom.mall.ebtp.common.base.dao.IBaseMapper;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscoBlack.vo.BlackSupplierVo;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBase;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.vo.BaseCategoryNameVo;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.vo.SupplierPageVo;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -15,7 +17,7 @@ import java.util.List;
|
||||
* @author ruoyi
|
||||
* @date 2025-06-16
|
||||
*/
|
||||
public interface CoscoSupplierBaseMapper {
|
||||
public interface CoscoSupplierBaseMapper extends IBaseMapper<CoscoSupplierBase> {
|
||||
/**
|
||||
* 查询中远海运_供应商_基本信息
|
||||
*
|
||||
@ -34,7 +36,7 @@ public interface CoscoSupplierBaseMapper {
|
||||
|
||||
|
||||
|
||||
IPage<CoscoSupplierBase> selectWzrPageList(IPage<CoscoSupplierBase> page, @Param("vo") CoscoSupplierBase vo);
|
||||
IPage<CoscoSupplierBase> selectWzrPageList(IPage<CoscoSupplierBase> page, @Param("vo") CoscoSupplierBase vo);
|
||||
|
||||
IPage<CoscoSupplierBase> selectPageList(IPage<CoscoSupplierBase> page, @Param("vo") CoscoSupplierBase vo);
|
||||
|
||||
@ -97,7 +99,7 @@ public interface CoscoSupplierBaseMapper {
|
||||
List<BlackSupplierVo> selectSupplierByIds(List<String> supperList);
|
||||
|
||||
/**
|
||||
* 查询选择人员
|
||||
* 查询已准入的供应商
|
||||
* @param page
|
||||
* @param vo
|
||||
* @return
|
||||
|
@ -19,8 +19,22 @@ public class CoscoAccessCategory extends CoscoBaseEntity {
|
||||
/** 品类id(cosco_category表主键) */
|
||||
private String categoryId;
|
||||
|
||||
//品类名
|
||||
/**
|
||||
* 品类名称
|
||||
*/
|
||||
private String categoryName;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
private String deptId;
|
||||
|
||||
/**
|
||||
* 供应商ID
|
||||
*/
|
||||
private String supplierId;
|
||||
|
||||
private String supplierName;
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.common.CoscoBaseEntity;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.common.ListToStringConverter;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
@ -31,6 +33,7 @@ public class CoscoAccessSupplier extends CoscoBaseEntity {
|
||||
private String supplierId;
|
||||
|
||||
//供应商名
|
||||
@ExcelProperty("供应商名称")
|
||||
private String supplierName;
|
||||
|
||||
//品类名
|
||||
@ -65,4 +68,39 @@ public class CoscoAccessSupplier extends CoscoBaseEntity {
|
||||
*/
|
||||
private List<String> idList;
|
||||
|
||||
private List<String> deptIdList;
|
||||
|
||||
//品类名称
|
||||
@ExcelProperty(value = "准入品类", converter = ListToStringConverter.class)
|
||||
private List<String> categoryNameList;
|
||||
|
||||
|
||||
/**
|
||||
* 准入年度
|
||||
*/
|
||||
@ExcelProperty("准入年度")
|
||||
private Long updateYear;
|
||||
/**
|
||||
* 准入方式
|
||||
*/
|
||||
private String accessType;
|
||||
|
||||
|
||||
/**
|
||||
* 准入方式-中文
|
||||
*/
|
||||
@ExcelProperty("准入方式")
|
||||
private String accessTypeText;
|
||||
|
||||
/**
|
||||
* 境内境外或者个人
|
||||
*/
|
||||
@ExcelProperty("境内境外")
|
||||
private String supplierTypeCn;
|
||||
|
||||
//年度开始时间大于等于格式2025-01-01
|
||||
private String startTime;
|
||||
//年度结束时间小于格式2026-01-01
|
||||
private String endTime;
|
||||
|
||||
}
|
||||
|
@ -49,6 +49,10 @@ public class CoscoAccessUserItem extends CoscoBaseEntity {
|
||||
|
||||
//评审项名
|
||||
private String itemName;
|
||||
//评审类型
|
||||
private String itemType;
|
||||
|
||||
|
||||
|
||||
//评审附件
|
||||
private CoscoAccessItemAttachments coscoAccessTtemAttachments;
|
||||
|
@ -36,6 +36,11 @@ public class CoscoAccessWork extends CoscoBaseEntity {
|
||||
//@Excel(name = "准入方式(online.线上准入、offline.线下准入)")
|
||||
private String accessType;
|
||||
|
||||
/** 准入说明 */
|
||||
private String accessDesc;
|
||||
|
||||
|
||||
|
||||
/** 评审开始时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||
//@Excel(name = "评审开始时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@ -83,8 +88,8 @@ public class CoscoAccessWork extends CoscoBaseEntity {
|
||||
//当前登录人,验证是否是组长用
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 分页查询条件
|
||||
*/
|
||||
List<Long> idList;
|
||||
|
||||
//品类名集合
|
||||
private List<String> categoryNameList;
|
||||
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.chinaunicom.mall.ebtp.common.base.entity.BasePageRequest;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@ -48,7 +49,6 @@ public class CoscoSupplierBase {
|
||||
private String enterpriseType;
|
||||
|
||||
/** 企业名称 */
|
||||
@NotBlank(message = "企业名称不能为空")
|
||||
@TableField("企业名称")
|
||||
@ExcelProperty("供应商名称")
|
||||
private String name;
|
||||
@ -59,7 +59,6 @@ public class CoscoSupplierBase {
|
||||
|
||||
/** 统一社会信用代码 */
|
||||
@TableField("统一社会信用代码")
|
||||
@ExcelProperty("统一社会信用代码")
|
||||
private String socialCreditCode;
|
||||
|
||||
/** 经营范围 */
|
||||
@ -132,6 +131,7 @@ public class CoscoSupplierBase {
|
||||
|
||||
/** 个人 __ 个人联系电话 */
|
||||
@TableField("个人联系电话")
|
||||
@ExcelProperty("联系电话")
|
||||
private String personPhone;
|
||||
|
||||
/** 个人 __ 开户行 */
|
||||
@ -236,5 +236,11 @@ public class CoscoSupplierBase {
|
||||
//批量修改用
|
||||
private List<String> idList;
|
||||
|
||||
private List<String> deptIdList;
|
||||
//合并后的统一社会信用代码
|
||||
@ExcelProperty("统一社会信用代码")
|
||||
private String unifiedCode;
|
||||
|
||||
private List<String> supplierTypeList;
|
||||
|
||||
}
|
@ -54,8 +54,6 @@ public interface ICoscoAccessItemAttachmentsService {
|
||||
/**
|
||||
* 删除供应商准入_准入工作评审项附件信息
|
||||
*
|
||||
* @param id 供应商准入_准入工作评审项附件主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCoscoAccessItemAttachmentsById(String id);
|
||||
public int deleteCoscoAccessItemAttachmentsByAccessUserItemId(String accessUserItemId);
|
||||
}
|
||||
|
@ -27,6 +27,14 @@ public interface ICoscoAccessItemService {
|
||||
*/
|
||||
public List<CoscoAccessItem> selectCoscoAccessItemList(CoscoAccessItem coscoAccessItem);
|
||||
|
||||
|
||||
/**
|
||||
* 分组查询任务下评审项
|
||||
* @param coscoAccessItem
|
||||
* @return
|
||||
*/
|
||||
public List<CoscoAccessItem> selectGroupByItemList(CoscoAccessItem coscoAccessItem);
|
||||
|
||||
/**
|
||||
* 新增供应商准入_准入工作评审项
|
||||
*
|
||||
|
@ -1,6 +1,9 @@
|
||||
package com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.service;
|
||||
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplier;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplierCategory;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessWork;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.vo.CoscoSupplierAccessWorkVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -51,4 +54,14 @@ public interface ICoscoAccessSupplierCategoryService {
|
||||
*/
|
||||
public int deleteCoscoAccessSupplierCategoryByIds(String[] ids);
|
||||
|
||||
|
||||
/**
|
||||
* 供应商准入,零星采购/应急采购类型,准入品类直接添加到已准入品类表处理方法
|
||||
* @param coscoAccessWorkData
|
||||
* @param supplierList
|
||||
* @param categoryIdList
|
||||
* @return
|
||||
*/
|
||||
public CoscoSupplierAccessWorkVo sporadicHandling(CoscoAccessWork coscoAccessWorkData, List<CoscoAccessSupplier> supplierList, List<String> categoryIdList);
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplier;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBase;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierQualifications;
|
||||
@ -22,6 +23,20 @@ public interface ICoscoAccessSupplierService {
|
||||
*/
|
||||
public CoscoAccessSupplier selectCoscoAccessSupplierByAccessWorkId(String accessWorkId);
|
||||
|
||||
|
||||
/**
|
||||
* 供应商准入统计分页查询
|
||||
* @param coscoAccessSupplier
|
||||
* @return
|
||||
*/
|
||||
public IPage<CoscoAccessSupplier> selectCoscoAccessSupplierAndWorkPageList(CoscoAccessSupplier coscoAccessSupplier);
|
||||
|
||||
/**
|
||||
* 供应商准入统计导出
|
||||
* @param coscoAccessSupplier
|
||||
* @return
|
||||
*/
|
||||
public List<CoscoAccessSupplier> selectCoscoAccessSupplierAndWorkExecList(CoscoAccessSupplier coscoAccessSupplier);
|
||||
/**
|
||||
* 查询供应商准入_关联供应商列表
|
||||
*
|
||||
|
@ -91,11 +91,10 @@ public class CoscoAccessItemAttachmentsServiceImpl implements ICoscoAccessItemAt
|
||||
/**
|
||||
* 删除供应商准入_准入工作评审项附件信息
|
||||
*
|
||||
* @param id 供应商准入_准入工作评审项附件主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCoscoAccessItemAttachmentsById(String id) {
|
||||
return coscoAccessItemAttachmentsMapper.deleteCoscoAccessItemAttachmentsById(id);
|
||||
public int deleteCoscoAccessItemAttachmentsByAccessUserItemId(String accessUserItemId) {
|
||||
return coscoAccessItemAttachmentsMapper.deleteCoscoAccessItemAttachmentsByAccessUserItemId(accessUserItemId);
|
||||
}
|
||||
}
|
||||
|
@ -23,8 +23,6 @@ public class CoscoAccessItemServiceImpl implements ICoscoAccessItemService {
|
||||
@Autowired
|
||||
private CoscoAccessItemMapper coscoAccessItemMapper;
|
||||
|
||||
@Autowired
|
||||
private CoscoAccessSupplierMapper coscoAccessSupplierMapper;
|
||||
|
||||
/**
|
||||
* 查询供应商准入_准入工作评审项
|
||||
@ -48,6 +46,11 @@ public class CoscoAccessItemServiceImpl implements ICoscoAccessItemService {
|
||||
return coscoAccessItemMapper.selectCoscoAccessItemList(coscoAccessItem);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CoscoAccessItem> selectGroupByItemList(CoscoAccessItem coscoAccessItem) {
|
||||
return coscoAccessItemMapper.selectGroupByItemList(coscoAccessItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增供应商准入_准入工作评审项
|
||||
*
|
||||
|
@ -2,12 +2,22 @@ package com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.service.impl;
|
||||
|
||||
import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.common.CoscoDateUtils;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.common.CoscoType;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.common.MessageType;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.common.aop.MessageLog;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.dao.mapper.CoscoAccessSupplierCategoryMapper;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.dao.mapper.CoscoSupplierBaseMapper;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplier;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplierCategory;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessWork;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBase;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.service.ICoscoAccessSupplierCategoryService;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.vo.CoscoSupplierAccessWorkVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@ -21,6 +31,9 @@ import java.util.List;
|
||||
public class CoscoAccessSupplierCategoryServiceImpl implements ICoscoAccessSupplierCategoryService {
|
||||
@Autowired
|
||||
private CoscoAccessSupplierCategoryMapper coscoAccessSupplierCategoryMapper;
|
||||
@Autowired
|
||||
private CoscoSupplierBaseMapper coscoSupplierBaseMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询供应商准入_供应商已准入品类
|
||||
@ -83,4 +96,59 @@ public class CoscoAccessSupplierCategoryServiceImpl implements ICoscoAccessSuppl
|
||||
public int deleteCoscoAccessSupplierCategoryByIds(String[] ids) {
|
||||
return coscoAccessSupplierCategoryMapper.deleteCoscoAccessSupplierCategoryByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 供应商准入零星采购/应急采购处理
|
||||
* @return
|
||||
*/
|
||||
@Transactional
|
||||
@MessageLog(messageType = MessageType.MESSAGETYPE_GYSZR)
|
||||
public CoscoSupplierAccessWorkVo sporadicHandling(CoscoAccessWork coscoAccessWorkData,List<CoscoAccessSupplier> supplierList,List<String> categoryIdList) {
|
||||
|
||||
//aop返回对象,消息推送用
|
||||
CoscoSupplierAccessWorkVo coscoSupplierAccessWorkVo = new CoscoSupplierAccessWorkVo();
|
||||
List<CoscoAccessSupplier> supplierMessageList = new ArrayList<>();
|
||||
List<String> supplierBaseIdList = new ArrayList<>();
|
||||
|
||||
Date date = new Date();
|
||||
//品类准入新增
|
||||
List<CoscoAccessSupplierCategory> coscoAccessSupplierCategoryInsertList = new ArrayList<>();
|
||||
for(CoscoAccessSupplier supplier : supplierList ){
|
||||
for (String categoryId : categoryIdList){
|
||||
CoscoAccessSupplierCategory coscoAccessSupplierCategory = new CoscoAccessSupplierCategory();
|
||||
coscoAccessSupplierCategory.setId(PropertyUtils.getSnowflakeId());
|
||||
coscoAccessSupplierCategory.setAccessWorkId(coscoAccessWorkData.getId());
|
||||
coscoAccessSupplierCategory.setSupplierId(supplier.getSupplierId());
|
||||
coscoAccessSupplierCategory.setCategoryId(categoryId);
|
||||
coscoAccessSupplierCategory.setDeptId(coscoAccessWorkData.getDeptId());
|
||||
coscoAccessSupplierCategory.setCreateBy(coscoAccessWorkData.getCreateBy());
|
||||
coscoAccessSupplierCategory.setUpdateBy(coscoAccessWorkData.getUpdateBy());
|
||||
coscoAccessSupplierCategory.setCreateTime(date);
|
||||
coscoAccessSupplierCategory.setUpdateTime(date);
|
||||
coscoAccessSupplierCategory.setLastUpdateTime(date);
|
||||
coscoAccessSupplierCategoryInsertList.add(coscoAccessSupplierCategory);
|
||||
}
|
||||
//需要修改供应商id结合
|
||||
supplierBaseIdList.add(supplier.getSupplierId());
|
||||
|
||||
//需要发送消息的供应商集合
|
||||
supplierMessageList.add(supplier);
|
||||
}
|
||||
//批量新增已准入品类
|
||||
coscoAccessSupplierCategoryMapper.batchCoscoAccessSupplierCategory(coscoAccessSupplierCategoryInsertList);
|
||||
|
||||
//批量修改供应商基础信息状态
|
||||
CoscoSupplierBase batchUpCoscoSupplierBase = new CoscoSupplierBase();
|
||||
batchUpCoscoSupplierBase.setAccessStatus(CoscoType.ACCESS_STATUS_YZR);
|
||||
batchUpCoscoSupplierBase.setIdList(supplierBaseIdList);
|
||||
batchUpCoscoSupplierBase.setUpdateTime(date);
|
||||
coscoSupplierBaseMapper.updateCoscoSupplierBaseByIds(batchUpCoscoSupplierBase);
|
||||
|
||||
//封装消息内容实体
|
||||
coscoSupplierAccessWorkVo.setSupplierList(supplierMessageList);
|
||||
coscoSupplierAccessWorkVo.setApproveStatus(coscoAccessWorkData.getApproveStatus());
|
||||
coscoSupplierAccessWorkVo.setDeptId(coscoAccessWorkData.getDeptId());
|
||||
return coscoSupplierAccessWorkVo;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,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.zyhy.ebtp.supplier.common.CoscoType;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.common.MessageType;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.common.aop.MessageLog;
|
||||
@ -44,6 +46,17 @@ public class CoscoAccessSupplierServiceImpl implements ICoscoAccessSupplierServi
|
||||
return coscoAccessSupplierMapper.selectCoscoAccessSupplierByAccessWorkId(accessWorkId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<CoscoAccessSupplier> selectCoscoAccessSupplierAndWorkPageList(CoscoAccessSupplier coscoAccessSupplier) {
|
||||
IPage<CoscoAccessSupplier> accessSupplierIPage = new Page<>(coscoAccessSupplier.getPageNo(), coscoAccessSupplier.getPageSize());
|
||||
return coscoAccessSupplierMapper.selectCoscoAccessSupplierAndWorkPageList(accessSupplierIPage,coscoAccessSupplier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CoscoAccessSupplier> selectCoscoAccessSupplierAndWorkExecList(CoscoAccessSupplier coscoAccessSupplier) {
|
||||
return coscoAccessSupplierMapper.selectCoscoAccessSupplierAndWorkExecList(coscoAccessSupplier);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询供应商准入_关联供应商列表
|
||||
*
|
||||
|
@ -70,9 +70,6 @@ public class CoscoAccessWorkCategoryServiceImpl implements ICoscoAccessWorkCateg
|
||||
// 创建分页对象(当前页,每页大小)
|
||||
IPage<CoscoAccessWork> page = new Page<>(data.getPageNo(), data.getPageSize());
|
||||
data.setApplyType(CoscoType.APPLY_TYPE_PLZR);
|
||||
|
||||
List<Long> IdList= coscoAccessWorkMapper.selectPageByIdList(page, data);
|
||||
data.setIdList(IdList);
|
||||
IPage<CoscoAccessWork> wqeq = coscoAccessWorkMapper.selectPageList(page, data);
|
||||
return wqeq;
|
||||
}
|
||||
@ -191,7 +188,7 @@ public class CoscoAccessWorkCategoryServiceImpl implements ICoscoAccessWorkCateg
|
||||
|
||||
//推送消息用的
|
||||
CoscoSupplierAccessWorkVo coscoSupplierAccessWorkVo = new CoscoSupplierAccessWorkVo();
|
||||
List<CoscoAccessSupplier> supplierIdList = new ArrayList<>();
|
||||
List<CoscoAccessCategory> supplierAndCateGoryList = new ArrayList<>();
|
||||
|
||||
//修改任务主表审批状态--通过或者驳回
|
||||
CoscoAccessWork coscoAccessWork = new CoscoAccessWork();
|
||||
@ -199,74 +196,50 @@ public class CoscoAccessWorkCategoryServiceImpl implements ICoscoAccessWorkCateg
|
||||
coscoAccessWork.setApproveStatus(coscoAccessWorkData.getApproveStatus());
|
||||
coscoAccessWorkService.updateWork(coscoAccessWork);
|
||||
|
||||
//供应商信息
|
||||
CoscoAccessSupplier coscoAccessSupplier = new CoscoAccessSupplier();
|
||||
coscoAccessSupplier.setAccessWorkId(coscoAccessWorkData.getId());
|
||||
List<CoscoAccessSupplier> supplierList = coscoAccessSupplierMapper.selectCoscoAccessSupplierList(coscoAccessSupplier);
|
||||
//处理审批逻辑
|
||||
approveYandN(coscoAccessWorkData, supplierIdList, supplierList);
|
||||
approveYandN(coscoAccessWorkData, supplierAndCateGoryList);
|
||||
|
||||
//封装消息内容实体
|
||||
coscoSupplierAccessWorkVo.setSupplierList(supplierIdList);
|
||||
coscoSupplierAccessWorkVo.setSupplierAndCategoryList(supplierAndCateGoryList);
|
||||
coscoSupplierAccessWorkVo.setApproveStatus(coscoAccessWorkData.getApproveStatus());
|
||||
coscoSupplierAccessWorkVo.setDeptId(coscoAccessWorkData.getDeptId());
|
||||
|
||||
return coscoSupplierAccessWorkVo;
|
||||
}
|
||||
|
||||
private void approveYandN(CoscoAccessWork coscoAccessWorkData, List<CoscoAccessSupplier> supplierIdList, List<CoscoAccessSupplier> supplierList) {
|
||||
private void approveYandN(CoscoAccessWork coscoAccessWorkData, List<CoscoAccessCategory> supplierAndCateGoryList) {
|
||||
Date date = new Date();
|
||||
//根据id查询全部需要准入的品类
|
||||
//根据任务id与部门id查询需要准入的品类,并且排除每个供应商已存在该部门下的品类
|
||||
CoscoAccessCategory coscoAccessCategory = new CoscoAccessCategory();
|
||||
coscoAccessCategory.setAccessWorkId(coscoAccessWorkData.getId());
|
||||
List<CoscoAccessCategory> coscoAccessCategoryList = coscoAccessCategoryMapper.selectCoscoAccessCategoryList(coscoAccessCategory);
|
||||
coscoAccessCategory.setDeptId(coscoAccessWorkData.getDeptId());
|
||||
List<CoscoAccessCategory> coscoAccessCategoryList = coscoAccessCategoryMapper.selectCoscoAccessCategoryByDeptIdList(coscoAccessCategory);
|
||||
|
||||
//审批通过
|
||||
if(CoscoType.APPROVE_STATUS_TG.equals(coscoAccessWorkData.getApproveStatus())){
|
||||
//把需要准入的品类添加到已准入品类表
|
||||
|
||||
//查询当前部门下已有的品类
|
||||
CoscoAccessSupplierCategory coscoAccessSupplierCategoryDept = new CoscoAccessSupplierCategory();
|
||||
coscoAccessSupplierCategoryDept.setDeptId(coscoAccessWorkData.getDeptId());
|
||||
List<CoscoAccessSupplierCategory> existingList =
|
||||
coscoAccessSupplierCategoryMapper.selectCoscoAccessSupplierCategoryList(coscoAccessSupplierCategoryDept);
|
||||
|
||||
//重新封装成集合,判断用
|
||||
Set<String> existingKeySet = existingList.stream()
|
||||
.map(e -> e.getSupplierId() + "_" + e.getCategoryId())
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
List<CoscoAccessSupplierCategory> coscoAccessSupplierCategoryList = new ArrayList<>();
|
||||
for(CoscoAccessSupplier accessSupplier : supplierList){
|
||||
for (CoscoAccessCategory accessCategory : coscoAccessCategoryList){
|
||||
//判断当前品类是否已存在,如果不存在则添加到已准入品类表
|
||||
String key = accessSupplier.getSupplierId() + "_" + accessCategory.getCategoryId();
|
||||
if (!existingKeySet.contains(key)) {
|
||||
CoscoAccessSupplierCategory coscoAccessSupplierCategory = new CoscoAccessSupplierCategory();
|
||||
coscoAccessSupplierCategory.setAccessWorkId(coscoAccessWorkData.getId());
|
||||
coscoAccessSupplierCategory.setSupplierId(accessSupplier.getSupplierId());
|
||||
coscoAccessSupplierCategory.setCategoryId(accessCategory.getCategoryId());
|
||||
coscoAccessSupplierCategory.setCreateBy(coscoAccessWorkData.getCreateBy());
|
||||
coscoAccessSupplierCategory.setUpdateBy(coscoAccessWorkData.getUpdateBy());
|
||||
coscoAccessSupplierCategory.setDeptId(coscoAccessWorkData.getDeptId());
|
||||
coscoAccessSupplierCategory.setId(PropertyUtils.getSnowflakeId());
|
||||
coscoAccessSupplierCategory.setCreateTime(date);
|
||||
coscoAccessSupplierCategory.setUpdateTime(date);
|
||||
coscoAccessSupplierCategory.setLastUpdateTime(date);
|
||||
coscoAccessSupplierCategoryList.add(coscoAccessSupplierCategory);
|
||||
}
|
||||
}
|
||||
accessSupplier.setCoscoAccessCategoryList(coscoAccessCategoryList);
|
||||
supplierIdList.add(accessSupplier);
|
||||
for (CoscoAccessCategory accessCategory : coscoAccessCategoryList){
|
||||
CoscoAccessSupplierCategory coscoAccessSupplierCategory = new CoscoAccessSupplierCategory();
|
||||
coscoAccessSupplierCategory.setAccessWorkId(coscoAccessWorkData.getId());
|
||||
coscoAccessSupplierCategory.setSupplierId(accessCategory.getSupplierId());
|
||||
coscoAccessSupplierCategory.setCategoryId(accessCategory.getCategoryId());
|
||||
coscoAccessSupplierCategory.setCreateBy(coscoAccessWorkData.getCreateBy());
|
||||
coscoAccessSupplierCategory.setUpdateBy(coscoAccessWorkData.getUpdateBy());
|
||||
coscoAccessSupplierCategory.setDeptId(coscoAccessWorkData.getDeptId());
|
||||
coscoAccessSupplierCategory.setId(PropertyUtils.getSnowflakeId());
|
||||
coscoAccessSupplierCategory.setCreateTime(date);
|
||||
coscoAccessSupplierCategory.setUpdateTime(date);
|
||||
coscoAccessSupplierCategory.setLastUpdateTime(date);
|
||||
coscoAccessSupplierCategoryList.add(coscoAccessSupplierCategory);
|
||||
supplierAndCateGoryList.add(accessCategory);
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(coscoAccessSupplierCategoryList)) {
|
||||
coscoAccessSupplierCategoryMapper.batchCoscoAccessSupplierCategory(coscoAccessSupplierCategoryList);
|
||||
}
|
||||
|
||||
}else{ //审批未通过
|
||||
for(CoscoAccessSupplier accessSupplier : supplierList){
|
||||
accessSupplier.setCoscoAccessCategoryList(coscoAccessCategoryList);
|
||||
supplierIdList.add(accessSupplier);
|
||||
for(CoscoAccessCategory accessCategory : coscoAccessCategoryList){
|
||||
supplierAndCateGoryList.add(accessCategory);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,6 @@ 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;
|
||||
@ -10,6 +9,7 @@ import com.chinaunicom.zyhy.ebtp.supplier.common.CoscoType;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.common.MessageType;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.common.aop.MessageLog;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscoCategory.service.ICoscoCategoryService;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.dao.mapper.CoscoSupplierBaseMapper;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.dao.mapper.*;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.*;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.service.*;
|
||||
@ -37,6 +37,9 @@ public class CoscoAccessWorkServiceImpl implements ICoscoAccessWorkService {
|
||||
@Autowired
|
||||
private ICoscoCategoryService coscoCategoryService;
|
||||
|
||||
@Autowired
|
||||
private ICoscoAccessSupplierCategoryService coscoAccessSupplierCategoryService;
|
||||
|
||||
|
||||
|
||||
@Autowired
|
||||
@ -145,6 +148,9 @@ public class CoscoAccessWorkServiceImpl implements ICoscoAccessWorkService {
|
||||
CoscoAccessUser coscoAccessUser = new CoscoAccessUser();
|
||||
coscoAccessUser.setAccessWorkId(id);
|
||||
vo.setCoscoAccessUserls(coscoAccessUserMapper.selectCoscoAccessUserList(coscoAccessUser));
|
||||
|
||||
//查询附件信息
|
||||
vo.setCoscoAccessWorkAttachments(coscoAccessWorkAttachmentsMapper.selectCoscoAccessWorkAttachmentsByWorkId(id));
|
||||
return vo;
|
||||
}
|
||||
|
||||
@ -211,7 +217,12 @@ public class CoscoAccessWorkServiceImpl implements ICoscoAccessWorkService {
|
||||
//供应商准入_准入申请工作主表新增
|
||||
CoscoAccessWork coscoAccessWork = vo.getCoscoAccessWork();
|
||||
coscoAccessWork.setId(workId);
|
||||
|
||||
coscoAccessWork.setApplyType(CoscoType.APPLY_TYPE_GYSZR);
|
||||
coscoAccessWork.setCreateBy("1");
|
||||
coscoAccessWork.setCreateTime(date);
|
||||
coscoAccessWork.setUpdateBy("1");
|
||||
coscoAccessWork.setUpdateTime(date);
|
||||
coscoAccessWork.setLastUpdateTime(date);
|
||||
|
||||
//供应商准入_准入申请关联品类表新增
|
||||
addCateGoryId(vo, workId);
|
||||
@ -237,18 +248,8 @@ public class CoscoAccessWorkServiceImpl implements ICoscoAccessWorkService {
|
||||
if(CoscoType.ACCESS_TYPE_OFFLINE.equals(coscoAccessWork.getAccessType())){
|
||||
//如果是线下准入、评审状态直接为完成
|
||||
coscoAccessWork.setReviewStatus(CoscoType.REVIEW_STATUS_YWC);
|
||||
|
||||
//审查附件新增
|
||||
CoscoAccessWorkAttachments coscoAccessWorkAttachments = vo.getCoscoAccessWorkAttachments();
|
||||
coscoAccessWorkAttachments.setId(PropertyUtils.getSnowflakeId());
|
||||
coscoAccessWorkAttachments.setAccessWorkId(workId);
|
||||
coscoAccessWorkAttachments.setAttachmentsType(CoscoType.ACCESS_TYPE_OFFLINE);
|
||||
coscoAccessWorkAttachments.setCreateBy("1");
|
||||
coscoAccessWorkAttachments.setCreateTime(date);
|
||||
coscoAccessWorkAttachments.setUpdateBy("1");
|
||||
coscoAccessWorkAttachments.setUpdateTime(date);
|
||||
coscoAccessWorkAttachments.setLastUpdateTime(date);
|
||||
coscoAccessWorkAttachmentsMapper.insertCoscoAccessWorkAttachments(coscoAccessWorkAttachments);
|
||||
//新增线下审批需要的附件
|
||||
addCoscoAccessWorkAttachments(vo.getCoscoAccessWorkAttachments(),workId,CoscoType.ACCESS_TYPE_OFFLINE);
|
||||
}
|
||||
|
||||
//如果是零星采购/应急采购,不需要走任何流程直接审核通过
|
||||
@ -256,22 +257,38 @@ public class CoscoAccessWorkServiceImpl implements ICoscoAccessWorkService {
|
||||
//如果是零星采购/应急采购、评审状态直接为完成
|
||||
coscoAccessWork.setReviewStatus(CoscoType.REVIEW_STATUS_YWC);
|
||||
//如果是零星采购/应急采购、审批状态直接为通过
|
||||
coscoAccessWork.setApproveStatus(CoscoType.ACCESS_STATUS_TC);
|
||||
|
||||
|
||||
|
||||
coscoAccessWork.setApproveStatus(CoscoType.ACCESS_STATUS_YZR);
|
||||
//零星采购,直接把准入品类添加到已准入品类表,并给供应商发送消息
|
||||
sporadicHandling(coscoAccessWork,vo.getCategoryIds());
|
||||
//新增零星采购需要的附件
|
||||
addCoscoAccessWorkAttachments(vo.getCoscoAccessWorkAttachments(),workId,CoscoType.ACCESS_TYPE_SCATTERED);
|
||||
}
|
||||
|
||||
//保存工作主表
|
||||
coscoAccessWork.setApplyType(CoscoType.APPLY_TYPE_GYSZR);
|
||||
coscoAccessWork.setCreateBy("1");
|
||||
coscoAccessWork.setCreateTime(date);
|
||||
coscoAccessWork.setUpdateBy("1");
|
||||
coscoAccessWork.setUpdateTime(date);
|
||||
coscoAccessWork.setLastUpdateTime(date);
|
||||
return coscoAccessWorkMapper.insertCoscoAccessWork(coscoAccessWork);
|
||||
}
|
||||
|
||||
/**
|
||||
* 线下准入 与 零星采购 新增附件方法
|
||||
* @param coscoAccessWorkAttachments 附件实体
|
||||
* @param attachmentsType 附件类型
|
||||
*/
|
||||
private void addCoscoAccessWorkAttachments(CoscoAccessWorkAttachments coscoAccessWorkAttachments,String workId,String attachmentsType){
|
||||
//附件新增
|
||||
if(!ObjectUtils.isEmpty(coscoAccessWorkAttachments)){
|
||||
Date date = new Date();
|
||||
coscoAccessWorkAttachments.setId(PropertyUtils.getSnowflakeId());
|
||||
coscoAccessWorkAttachments.setAccessWorkId(workId);
|
||||
coscoAccessWorkAttachments.setAttachmentsType(attachmentsType);
|
||||
coscoAccessWorkAttachments.setCreateBy("1");
|
||||
coscoAccessWorkAttachments.setCreateTime(date);
|
||||
coscoAccessWorkAttachments.setUpdateBy("1");
|
||||
coscoAccessWorkAttachments.setUpdateTime(date);
|
||||
coscoAccessWorkAttachments.setLastUpdateTime(date);
|
||||
coscoAccessWorkAttachmentsMapper.insertCoscoAccessWorkAttachments(coscoAccessWorkAttachments);
|
||||
}
|
||||
}
|
||||
|
||||
private void addUserAndItem(CoscoAccessWorkVo vo, String workId, String leaderId) {
|
||||
//评审项集合
|
||||
List<CoscoAccessItem> coscoAccessItemList = new ArrayList<>();
|
||||
@ -498,6 +515,7 @@ public class CoscoAccessWorkServiceImpl implements ICoscoAccessWorkService {
|
||||
}
|
||||
|
||||
private void addCoscoAccessUserItemAndUp(CoscoAccessUserItemVo vo) {
|
||||
//如果附件有值可能是新增,也可能是修改
|
||||
if (!CollectionUtils.isEmpty(vo.getCoscoAccessUserItemList())) {
|
||||
for(CoscoAccessUserItem coscoAccessUserItem : vo.getCoscoAccessUserItemList()){
|
||||
//修改评审项关联评审人员表
|
||||
@ -512,6 +530,8 @@ public class CoscoAccessWorkServiceImpl implements ICoscoAccessWorkService {
|
||||
}else{
|
||||
coscoAccessItemAttachmentsService.insertCoscoAccessItemAttachments(coscoAccessTtemAttachments);
|
||||
}
|
||||
}else{
|
||||
coscoAccessItemAttachmentsService.deleteCoscoAccessItemAttachmentsByAccessUserItemId(coscoAccessUserItem.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -581,7 +601,7 @@ public class CoscoAccessWorkServiceImpl implements ICoscoAccessWorkService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 接受审批返回值
|
||||
* 供应商准入接受审批返回值处理
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@ -679,4 +699,21 @@ public class CoscoAccessWorkServiceImpl implements ICoscoAccessWorkService {
|
||||
return coscoSupplierAccessWorkVo;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 供应商准入零星采购/应急采购处理
|
||||
* @return
|
||||
*/
|
||||
public void sporadicHandling(CoscoAccessWork coscoAccessWorkData,List<String> categoryIdList) {
|
||||
|
||||
//通过工作主体任务id查询供应商信息--因为需要给供应商发送准入申请通过的消息
|
||||
CoscoAccessSupplier coscoAccessSupplier = new CoscoAccessSupplier();
|
||||
coscoAccessSupplier.setAccessWorkId(coscoAccessWorkData.getId());
|
||||
List<CoscoAccessSupplier> supplierList = coscoAccessSupplierMapper.selectCoscoAccessSupplierList(coscoAccessSupplier);
|
||||
//调用准入品类直接添加到已准入表方法
|
||||
coscoAccessSupplierCategoryService.sporadicHandling(coscoAccessWorkData,supplierList,categoryIdList);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -2,19 +2,20 @@ package com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.nacos.common.utils.StringUtils;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.chinaunicom.mall.ebtp.common.base.service.impl.BaseServiceImpl;
|
||||
import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.common.CoscoDateUtils;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.common.CoscoIdUtil;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.common.CoscoType;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.common.MessageType;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.common.aop.MessageLog;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscoCategory.dao.CoscoCategoryMapper;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscoCategory.entity.CoscoCategory;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscoCategory.service.ICoscoCategoryService;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.dao.mapper.CoscoSupplierBaseMapper;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.dao.mapper.*;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.*;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.service.*;
|
||||
@ -35,7 +36,7 @@ import java.util.*;
|
||||
* @date 2025-06-16
|
||||
*/
|
||||
@Service
|
||||
public class CoscoSupplierBaseServiceImpl implements ICoscoSupplierBaseService {
|
||||
public class CoscoSupplierBaseServiceImpl extends BaseServiceImpl<CoscoSupplierBaseMapper, CoscoSupplierBase> implements ICoscoSupplierBaseService {
|
||||
@Autowired
|
||||
private CoscoSupplierBaseMapper coscoSupplierBaseMapper;
|
||||
@Autowired
|
||||
@ -43,10 +44,6 @@ public class CoscoSupplierBaseServiceImpl implements ICoscoSupplierBaseService {
|
||||
|
||||
|
||||
|
||||
@Autowired
|
||||
private CoscoAccessSupplierMapper coscoAccessSupplierMapper;
|
||||
|
||||
|
||||
|
||||
@Autowired
|
||||
private CoscoSupplierInvoiceMapper coscoSupplierInvoiceMapper;
|
||||
@ -101,14 +98,13 @@ public class CoscoSupplierBaseServiceImpl implements ICoscoSupplierBaseService {
|
||||
*/
|
||||
@Override
|
||||
public IPage<CoscoSupplierBase> selectWzrPageList(CoscoSupplierBase coscoSupplierBase) {
|
||||
IPage<CoscoSupplierBase> page = new Page<>(coscoSupplierBase.getPageNo(), coscoSupplierBase.getPageSize());
|
||||
//查询当前登录人的部门本级、上级、下级,所有已发起和已准入供应商id
|
||||
List<String> deptIds = new ArrayList<>();
|
||||
deptIds.add("DEPT001");
|
||||
List<String> supplierBaseList = coscoAccessSupplierMapper.selectSupplierIdByDeptIdList(deptIds);
|
||||
coscoSupplierBase.setSupplierBaseList(supplierBaseList);
|
||||
deptIds.add("100");
|
||||
coscoSupplierBase.setDeptIdList(deptIds);
|
||||
//查询当前登录人的部门本级、上级、下级,以外的供应商数据
|
||||
IPage<CoscoSupplierBase> page = new Page<>(coscoSupplierBase.getPageNo(), coscoSupplierBase.getPageSize());
|
||||
return coscoSupplierBaseMapper.selectWzrPageList(page, coscoSupplierBase);
|
||||
return coscoSupplierBaseMapper.selectWzrPageList(page,coscoSupplierBase);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -222,6 +218,8 @@ public class CoscoSupplierBaseServiceImpl implements ICoscoSupplierBaseService {
|
||||
coscoSupplierQualifications.setLastUpdateTime(date);
|
||||
coscoSupplierQualificationsList.add(coscoSupplierQualifications);
|
||||
}
|
||||
//资质信息保存
|
||||
coscoSupplierQualificationsMapper.batchCoscoSupplierQualifications(coscoSupplierQualificationsList);
|
||||
}
|
||||
//发票信息保存
|
||||
if (!ObjectUtils.isEmpty(vo.getCoscoSupplierInvoice())) {
|
||||
@ -247,6 +245,8 @@ public class CoscoSupplierBaseServiceImpl implements ICoscoSupplierBaseService {
|
||||
coscoSupplierBank.setLastUpdateTime(date);
|
||||
coscoSupplierBankList.add(coscoSupplierBank);
|
||||
}
|
||||
//银行账户保存
|
||||
coscoSupplierBankMapper.batchCoscoSupplierBank(coscoSupplierBankList);
|
||||
}
|
||||
if (!ObjectUtils.isEmpty(vo.getCoscoSupplierSurvey())) {
|
||||
//填写人信息
|
||||
@ -273,6 +273,8 @@ public class CoscoSupplierBaseServiceImpl implements ICoscoSupplierBaseService {
|
||||
coscoSupplierSurveyQuestionReply.setLastUpdateTime(date);
|
||||
coscoSupplierSurveyQuestionReplieList.add(coscoSupplierSurveyQuestionReply);
|
||||
}
|
||||
//问题回复保存
|
||||
coscoSupplierSurveyQuestionReplyMapper.batchCoscoSupplierSurveyQuestionReply(coscoSupplierSurveyQuestionReplieList);
|
||||
}
|
||||
//承诺书/其他附件添加到集合
|
||||
if (!CollectionUtils.isEmpty(vo.getCoscoSupplierSurveyAttachments())) {
|
||||
@ -286,16 +288,10 @@ public class CoscoSupplierBaseServiceImpl implements ICoscoSupplierBaseService {
|
||||
coscoSupplierSurveyAttachments.setLastUpdateTime(date);
|
||||
coscoSupplierSurveyAttachmentsList.add(coscoSupplierSurveyAttachments);
|
||||
}
|
||||
//承诺书、其他附件保存
|
||||
coscoSupplierSurveyAttachmentsMapper.batchCoscoSupplierSurveyAttachments(coscoSupplierSurveyAttachmentsList);
|
||||
}
|
||||
|
||||
//资质信息保存
|
||||
coscoSupplierQualificationsMapper.batchCoscoSupplierQualifications(coscoSupplierQualificationsList);
|
||||
//银行账户保存
|
||||
coscoSupplierBankMapper.batchCoscoSupplierBank(coscoSupplierBankList);
|
||||
//问题回复保存
|
||||
coscoSupplierSurveyQuestionReplyMapper.batchCoscoSupplierSurveyQuestionReply(coscoSupplierSurveyQuestionReplieList);
|
||||
//承诺书、其他附件保存
|
||||
coscoSupplierSurveyAttachmentsMapper.batchCoscoSupplierSurveyAttachments(coscoSupplierSurveyAttachmentsList);
|
||||
|
||||
//基本信息新增
|
||||
CoscoSupplierBase coscoSupplierBase = vo.getCoscoSupplierBase();
|
||||
|
@ -3,10 +3,10 @@ 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.util.PropertyUtils;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.common.CoscoDateUtils;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.common.CoscoType;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.common.MessageType;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.common.aop.MessageLog;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.dao.mapper.CoscoSupplierBaseMapper;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.dao.mapper.*;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.*;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.service.ICoscoSupplierexitService;
|
||||
@ -15,7 +15,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
@ -59,9 +58,9 @@ public class CoscoSupplierexitServiceImpl implements ICoscoSupplierexitService {
|
||||
*/
|
||||
@Override
|
||||
public IPage<CoscoAccessSupplierCategory> getSupplierCategoryPage(CoscoAccessSupplierCategory data) {
|
||||
//获取当前登录人的所有部门,查询这个人所有部门下的已经通过与审批中的退出数据
|
||||
//获取当前登录人的所有部门,查询这个人所有部门下的审批中的退出数据 ---因为审批通过的会在因准入品类表中删除所有不需要查审批通过的
|
||||
List<String> deptIds = new ArrayList<>();
|
||||
deptIds.add("DEPT001");
|
||||
deptIds.add("100");
|
||||
List<String> categoryList = coscoAccessSupplierCategoryMapper.selectCategoryByDeptIdList(deptIds);
|
||||
|
||||
//查询所有部门的没通过与审批中的数据
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.vo;
|
||||
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessCategory;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplier;
|
||||
import lombok.Data;
|
||||
|
||||
@ -13,6 +14,13 @@ public class CoscoSupplierAccessWorkVo {
|
||||
*/
|
||||
List<CoscoAccessSupplier> supplierList;
|
||||
|
||||
|
||||
/**
|
||||
* 供应商品类准入品类id与供应商id集合
|
||||
*/
|
||||
List<CoscoAccessCategory> supplierAndCategoryList;
|
||||
|
||||
|
||||
/**
|
||||
* 审批状态
|
||||
*/
|
||||
|
@ -21,6 +21,24 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCoscoAccessCategoryByDeptIdList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessCategory" resultMap="CoscoAccessCategoryResult">
|
||||
SELECT
|
||||
cac.category_id,
|
||||
cas.supplier_id,
|
||||
cc.category_name as categoryName,
|
||||
CASE
|
||||
WHEN csb.supplier_type = 'ovs' THEN
|
||||
name_en ELSE name
|
||||
END AS supplierName
|
||||
from cosco_access_work caw
|
||||
left join cosco_access_category cac on caw.id = cac.access_work_id
|
||||
left join cosco_category cc on cc.id = cac.category_id and cc.del_flag = 'normal'
|
||||
left join cosco_access_supplier cas on caw.id = cas.access_work_id
|
||||
LEFT JOIN cosco_supplier_base csb ON cas.supplier_id = csb.id and csb.del_flag = 'normal'
|
||||
LEFT JOIN cosco_access_supplier_category casc ON casc.category_id = cac.category_id AND casc.dept_id = #{deptId} and cas.supplier_id = casc.supplier_id and casc.del_flag = 'normal'
|
||||
where caw.id = #{accessWorkId} AND casc.id IS NULL;
|
||||
</select>
|
||||
|
||||
<select id="selectCoscoAccessCategoryByAccessWorkId" parameterType="String"
|
||||
resultMap="CoscoAccessCategoryResult">
|
||||
<include refid="selectCoscoAccessCategoryVo"/>
|
||||
|
@ -151,13 +151,13 @@
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoAccessItemAttachmentsById" parameterType="String">
|
||||
update cosco_access_item_attachments set del_flag = 2
|
||||
where id = #{id}
|
||||
<update id="deleteCoscoAccessItemAttachmentsByAccessUserItemId" parameterType="String">
|
||||
update cosco_access_item_attachments set del_flag = 'deleted'
|
||||
where access_user_item_id = #{accessUserItemId}
|
||||
</update>
|
||||
|
||||
<update id="deleteCoscoAccessItemAttachmentsByIds" parameterType="String">
|
||||
update cosco_access_item_attachments set del_flag = 2 where id in
|
||||
update cosco_access_item_attachments set del_flag = 'deleted' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
@ -44,6 +44,14 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectGroupByItemList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessItem" resultMap="CoscoAccessItemResult">
|
||||
select item_type,item_name
|
||||
from cosco_access_item
|
||||
where access_work_id = #{accessWorkId}
|
||||
GROUP BY item_type,item_name
|
||||
|
||||
</select>
|
||||
|
||||
<select id="selectCoscoAccessItemById" parameterType="String"
|
||||
resultMap="CoscoAccessItemResult">
|
||||
<include refid="selectCoscoAccessItemVo"/>
|
||||
|
@ -176,6 +176,7 @@
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
order by c.create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
|
@ -9,6 +9,26 @@
|
||||
<result property="supplierId" column="supplier_id"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="supplierexitId" column="supplierexit_id"/>
|
||||
<collection property="categoryNameList"
|
||||
column="{supplierId=supplier_id}"
|
||||
ofType="string"
|
||||
select="selectCoscoAccessCategoryList">
|
||||
</collection>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<resultMap type="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplierCategory" id="CoscoAccessSupplierCategoryResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="accessWorkId" column="access_work_id"/>
|
||||
<result property="supplierId" column="supplier_id"/>
|
||||
<result property="categoryId" column="category_id"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="lastUpdateTime" column="last_update_time"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCoscoAccessSupplierVo">
|
||||
@ -20,9 +40,45 @@
|
||||
a.dept_id
|
||||
FROM
|
||||
cosco_access_supplier a
|
||||
LEFT JOIN cosco_supplier_base s ON a.supplier_id = s.id
|
||||
LEFT JOIN cosco_supplier_base s ON a.supplier_id = s.id and s.del_flag = 'normal'
|
||||
</sql>
|
||||
|
||||
<sql id="selectCoscoAccessSupplierAndWorkVo">
|
||||
SELECT
|
||||
a.id,
|
||||
CASE
|
||||
WHEN s.supplier_type = 'ovs' THEN
|
||||
name_en ELSE name END AS supplierName,
|
||||
CASE s.supplier_type
|
||||
WHEN 'dvs' THEN '境内企业'
|
||||
WHEN 'ovs' THEN '境外企业'
|
||||
WHEN 'pe' THEN '个人'
|
||||
END AS supplier_type_cn,
|
||||
a.access_work_id,
|
||||
a.supplier_id,
|
||||
a.dept_id,
|
||||
caw.access_type,
|
||||
CASE
|
||||
WHEN caw.access_type = 'online' THEN '线上准入'
|
||||
WHEN caw.access_type = 'offline' THEN '线下准入'
|
||||
WHEN caw.access_type = 'scattered' THEN '零星采购/应急采购/个人供应商'
|
||||
ELSE caw.access_type
|
||||
END AS accessTypeText,
|
||||
YEAR(caw.update_time) AS updateYear
|
||||
FROM
|
||||
cosco_access_supplier a
|
||||
LEFT JOIN cosco_supplier_base s ON a.supplier_id = s.id and s.del_flag = 'normal'
|
||||
left join cosco_access_work caw on caw.id = a.access_work_id and caw.del_flag = 'normal'
|
||||
</sql>
|
||||
|
||||
<select id="selectCoscoAccessCategoryList"
|
||||
parameterType="map"
|
||||
resultType="string">
|
||||
select a.category_name as categoryName from cosco_access_supplier_category c
|
||||
left join cosco_category a on c.category_id = a.id and a.del_flag = 'normal'
|
||||
where c.supplier_id = #{supplierId} and c.del_flag = 'normal'
|
||||
</select>
|
||||
|
||||
<select id="selectCoscoAccessSupplierList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplier" resultMap="CoscoAccessSupplierResult">
|
||||
<include refid="selectCoscoAccessSupplierVo"/>
|
||||
<where>
|
||||
@ -38,22 +94,60 @@
|
||||
</where>
|
||||
</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}
|
||||
<select id="selectCoscoAccessSupplierAndWorkPageList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplier" resultMap="CoscoAccessSupplierResult">
|
||||
<include refid="selectCoscoAccessSupplierAndWorkVo"/>
|
||||
<where>
|
||||
and a.dept_id in
|
||||
<foreach collection="vo.deptIdList" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
)
|
||||
<if test="vo.accessStatus != null">
|
||||
and a.access_status = #{vo.accessStatus}
|
||||
</if>
|
||||
<if test="vo.supplierName != null and vo.supplierName != ''">
|
||||
and s.name = #{vo.supplierName} or s.name_en = #{vo.supplierName}
|
||||
</if>
|
||||
<if test="vo.accessType != null and vo.accessType != ''">
|
||||
and caw.access_type = #{vo.accessType}
|
||||
</if>
|
||||
<if test="vo.startTime!=null and vo.startTime != ''">
|
||||
and caw.update_time >= #{vo.startTime}
|
||||
</if>
|
||||
<if test="vo.endTime!=null and vo.endTime != ''">
|
||||
and caw.update_time < #{vo.endTime}
|
||||
</if>
|
||||
</where>
|
||||
order by a.id desc
|
||||
</select>
|
||||
|
||||
<select id="selectCoscoAccessSupplierAndWorkExecList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessSupplier" resultMap="CoscoAccessSupplierResult">
|
||||
<include refid="selectCoscoAccessSupplierAndWorkVo"/>
|
||||
<where>
|
||||
and a.dept_id in
|
||||
<foreach collection="deptIdList" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
<if test="accessStatus != null">
|
||||
and a.access_status = #{accessStatus}
|
||||
</if>
|
||||
<if test="supplierName != null and supplierName != ''">
|
||||
and s.name = #{supplierName} or s.name_en = #{supplierName}
|
||||
</if>
|
||||
<if test="accessType != null and accessType != ''">
|
||||
and caw.access_type = #{accessType}
|
||||
</if>
|
||||
<if test="startTime!=null and startTime != ''">
|
||||
and caw.update_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime!=null and endTime != ''">
|
||||
and caw.update_time < #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
order by a.id desc
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -45,6 +45,7 @@
|
||||
<sql id="selectCoscoAccessUserItemVo">
|
||||
SELECT
|
||||
i.item_name AS itemName,
|
||||
i.item_type as itemType,
|
||||
ui.review_by,
|
||||
ui.id,
|
||||
ui.access_work_id,
|
||||
|
@ -62,6 +62,14 @@
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectCoscoAccessWorkAttachmentsByWorkId" parameterType="String"
|
||||
resultMap="CoscoAccessWorkAttachmentsResult">
|
||||
<include refid="selectCoscoAccessWorkAttachmentsVo"/>
|
||||
where access_work_id = #{accessWorkId}
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertCoscoAccessWorkAttachments" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessWorkAttachments">
|
||||
insert into cosco_access_work_attachments
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
@ -10,6 +10,7 @@
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="applyType" column="apply_type"/>
|
||||
<result property="accessType" column="access_type"/>
|
||||
<result property="accessDesc" column="access_desc"/>
|
||||
<result property="startTime" column="start_time"/>
|
||||
<result property="endTime" column="end_time"/>
|
||||
<result property="reviewStatus" column="review_status"/>
|
||||
@ -21,19 +22,32 @@
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="lastUpdateTime" column="last_update_time"/>
|
||||
<collection property="categoryNameList"
|
||||
column="{accessWorkId=id}"
|
||||
ofType="string"
|
||||
select="selectCoscoAccessCategoryList">
|
||||
</collection>
|
||||
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessCategory" id="CoscoAccessCategoryResult">
|
||||
<result property="accessWorkId" column="access_work_id"/>
|
||||
<result property="categoryId" column="category_id"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCoscoAccessWorkVo">
|
||||
SELECT
|
||||
DISTINCT
|
||||
w.id,
|
||||
w.access_work_name,
|
||||
w.dept_id,
|
||||
w.access_type,
|
||||
CASE
|
||||
WHEN w.access_type = 'online' THEN '线上准入'
|
||||
WHEN w.access_type = 'offline' THEN '线下准入'
|
||||
WHEN w.access_type = 'scattered' THEN '零星采购/应急采购/个人供应商'
|
||||
ELSE w.access_type
|
||||
END AS access_type_text,
|
||||
w.access_desc,
|
||||
w.start_time,
|
||||
w.end_time,
|
||||
CASE
|
||||
@ -58,20 +72,21 @@
|
||||
w.last_update_time
|
||||
FROM
|
||||
cosco_access_work w
|
||||
left join cosco_access_category c on w.id = c.access_work_id
|
||||
</sql>
|
||||
|
||||
|
||||
|
||||
<sql id="selectCoscoAccessWorkGroupVo">
|
||||
select c.categoryName,
|
||||
select
|
||||
IFNULL(cau.is_leader, 0) AS isLeader,
|
||||
w.id,
|
||||
w.access_work_name,
|
||||
w.dept_id,
|
||||
w.access_type,
|
||||
CASE
|
||||
WHEN w.access_type = 'online' THEN '线上准入'
|
||||
WHEN w.access_type = 'offline' THEN '线下准入'
|
||||
WHEN w.access_type = 'scattered' THEN '零星采购/应急采购/个人供应商'
|
||||
ELSE w.access_type
|
||||
END AS access_type_text,
|
||||
w.start_time,
|
||||
@ -99,75 +114,26 @@
|
||||
w.last_update_time
|
||||
FROM
|
||||
cosco_access_work w
|
||||
left join (
|
||||
SELECT
|
||||
cac.access_work_id,
|
||||
GROUP_CONCAT(cc.category_name SEPARATOR ', ') AS categoryName
|
||||
FROM cosco_access_category cac
|
||||
INNER JOIN cosco_category cc ON cac.category_id = cc.id
|
||||
GROUP BY cac.access_work_id
|
||||
) as c on c.access_work_id = w.id
|
||||
left join cosco_access_user cau on w.id = cau.access_work_id and cau.is_leader = 1
|
||||
left join cosco_access_user cau on w.id = cau.access_work_id and cau.is_leader = 1
|
||||
left join cosco_access_category cac on cac.access_work_id = w.id
|
||||
<if test="vo.userId != null and vo.userId != ''">
|
||||
and cau.user_id = #{vo.userId}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectPageByIdList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessWork" resultType="long">
|
||||
select w.id from cosco_access_work w
|
||||
<where>
|
||||
and w.del_flag = 'normal'
|
||||
<if test="vo.categoryId != null and vo.categoryId != ''">
|
||||
and c.category_id = #{vo.categoryId}
|
||||
</if>
|
||||
<if test="vo.accessWorkName != null and vo.accessWorkName != ''">
|
||||
and w.access_work_name like concat('%', #{vo.accessWorkName}, '%')
|
||||
</if>
|
||||
<if test="vo.deptId != null and vo.deptId != ''">
|
||||
and w.dept_id = #{vo.deptId}
|
||||
</if>
|
||||
<if test="vo.applyType != null and vo.applyType != ''">
|
||||
and w.apply_type = #{vo.applyType}
|
||||
</if>
|
||||
<if test="vo.accessType != null and vo.accessType != ''">
|
||||
and w.access_type = #{vo.accessType}
|
||||
</if>
|
||||
<if test="vo.startTime != null ">
|
||||
and w.start_time = #{vo.startTime}
|
||||
</if>
|
||||
<if test="vo.endTime != null ">
|
||||
and w.end_time = #{vo.endTime}
|
||||
</if>
|
||||
<if test="vo.reviewStatus != null ">
|
||||
and w.review_status = #{vo.reviewStatus}
|
||||
</if>
|
||||
<if test="vo.approveStatus != null ">
|
||||
and w.approve_status = #{vo.approveStatus}
|
||||
</if>
|
||||
<if test="vo.workFlowId != null and vo.workFlowId != ''">
|
||||
and w.work_flow_id = #{vo.workFlowId}
|
||||
</if>
|
||||
<if test="vo.lastUpdateTime != null ">
|
||||
and w.last_update_time = #{vo.lastUpdateTime}
|
||||
</if>
|
||||
</where>
|
||||
order by w.create_time desc
|
||||
<select id="selectCoscoAccessCategoryList"
|
||||
parameterType="map"
|
||||
resultType="string">
|
||||
select a.category_name as categoryName from cosco_access_category c
|
||||
left join cosco_category a on c.category_id = a.id and a.del_flag = 'normal'
|
||||
where c.access_work_id = #{accessWorkId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectPageList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessWork" resultMap="CoscoAccessWorkResult">
|
||||
<include refid="selectCoscoAccessWorkGroupVo"/>
|
||||
<where>
|
||||
and w.del_flag = 'normal'
|
||||
<if test="vo.idList != null and vo.idList.size() > 0">
|
||||
AND w.id IN
|
||||
<foreach collection="vo.idList" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="vo.categoryId != null and vo.categoryId != ''">
|
||||
and c.category_id = #{vo.categoryId}
|
||||
and cac.category_id = #{vo.categoryId}
|
||||
</if>
|
||||
<if test="vo.accessWorkName != null and vo.accessWorkName != ''">
|
||||
and w.access_work_name like concat('%', #{vo.accessWorkName}, '%')
|
||||
@ -209,7 +175,7 @@
|
||||
<where>
|
||||
and w.del_flag = 'normal'
|
||||
<if test="vo.categoryId != null and vo.categoryId != ''">
|
||||
and c.category_id = #{vo.categoryId}
|
||||
and cac.category_id = #{vo.categoryId}
|
||||
</if>
|
||||
<if test="vo.accessWorkName != null and vo.accessWorkName != ''">
|
||||
and w.access_work_name like concat('%', #{vo.accessWorkName}, '%')
|
||||
@ -242,7 +208,6 @@
|
||||
and w.last_update_time = #{vo.lastUpdateTime}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
order by w.create_time desc
|
||||
</select>
|
||||
|
||||
@ -253,7 +218,7 @@
|
||||
<where>
|
||||
and w.del_flag = 'normal'
|
||||
<if test="vo.categoryId != null and vo.categoryId != ''">
|
||||
and c.category_id = #{vo.categoryId}
|
||||
and cac.category_id = #{vo.categoryId}
|
||||
</if>
|
||||
<if test="vo.accessWorkName != null and vo.accessWorkName != ''">
|
||||
and w.access_work_name like concat('%', #{vo.accessWorkName}, '%')
|
||||
@ -289,7 +254,6 @@
|
||||
and w.last_update_time = #{vo.lastUpdateTime}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
order by w.create_time desc
|
||||
</select>
|
||||
|
||||
@ -308,6 +272,7 @@
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="applyType != null">apply_type,</if>
|
||||
<if test="accessType != null">access_type,</if>
|
||||
<if test="accessDesc != null">access_desc,</if>
|
||||
<if test="startTime != null">start_time,</if>
|
||||
<if test="endTime != null">end_time,</if>
|
||||
<if test="reviewStatus != null">review_status,</if>
|
||||
@ -326,6 +291,7 @@
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
<if test="applyType != null">#{applyType},</if>
|
||||
<if test="accessType != null">#{accessType},</if>
|
||||
<if test="accessDesc != null">#{accessDesc},</if>
|
||||
<if test="startTime != null">#{startTime},</if>
|
||||
<if test="endTime != null">#{endTime},</if>
|
||||
<if test="reviewStatus != null">#{reviewStatus},</if>
|
||||
@ -341,10 +307,10 @@
|
||||
</insert>
|
||||
<insert id="batchCoscoAccessWork" parameterType="java.util.List">
|
||||
insert into cosco_access_work
|
||||
( id, access_work_name, dept_id, apply_type, access_type, start_time, end_time, review_status, approve_status, work_flow_id, del_flag, create_by, create_time, update_by, update_time, last_update_time)
|
||||
( id, access_work_name, dept_id, apply_type, access_type, access_desc, start_time, end_time, review_status, approve_status, work_flow_id, del_flag, create_by, create_time, update_by, update_time, last_update_time)
|
||||
values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.accessWorkName}, #{item.deptId}, #{item.applyType}, #{item.accessType}, #{item.startTime}, #{item.endTime}, #{item.reviewStatus}, #{item.approveStatus}, #{item.workFlowId}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.lastUpdateTime})
|
||||
( #{item.id}, #{item.accessWorkName}, #{item.deptId}, #{item.applyType}, #{item.accessType}, #{item.accessDesc}, #{item.startTime}, #{item.endTime}, #{item.reviewStatus}, #{item.approveStatus}, #{item.workFlowId}, #{item.delFlag}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.lastUpdateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="updateCoscoAccessWork" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoAccessWork">
|
||||
@ -362,6 +328,9 @@
|
||||
<if test="accessType != null">access_type =
|
||||
#{accessType},
|
||||
</if>
|
||||
<if test="accessDesc != null">access_desc =
|
||||
#{accessDesc},
|
||||
</if>
|
||||
<if test="startTime != null">start_time =
|
||||
#{startTime},
|
||||
</if>
|
||||
|
@ -51,6 +51,9 @@
|
||||
<result property="enterpriseTypeCn" column="enterprise_type_cn"/>
|
||||
<result property="currencyCn" column="currency_cn"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="unifiedCode" column="unified_code"/>
|
||||
|
||||
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCoscoSupplierBaseVo">
|
||||
@ -64,6 +67,12 @@
|
||||
WHEN 'pe' THEN '个人'
|
||||
ELSE supplier_type
|
||||
END AS supplier_type_cn,
|
||||
CASE
|
||||
WHEN supplier_type = 'dvs' THEN social_credit_code
|
||||
WHEN supplier_type = 'ovs' THEN vat
|
||||
WHEN supplier_type = 'pe' THEN id_card
|
||||
ELSE NULL
|
||||
END AS unified_code,
|
||||
licence_accessory,
|
||||
licence_date,
|
||||
enterprise_type,
|
||||
@ -139,6 +148,12 @@
|
||||
WHEN 'ovs' THEN '境外企业'
|
||||
WHEN 'pe' THEN '个人'
|
||||
END AS supplier_type_cn,
|
||||
CASE
|
||||
WHEN supplier_type = 'dvs' THEN social_credit_code
|
||||
WHEN supplier_type = 'ovs' THEN vat
|
||||
WHEN supplier_type = 'pe' THEN id_card
|
||||
ELSE NULL
|
||||
END AS unified_code,
|
||||
csb.enterprise_type,
|
||||
dp.dic_name as enterprise_type_cn,
|
||||
cas.id,
|
||||
@ -167,121 +182,49 @@
|
||||
left join dict_project dp on csb.enterprise_type = dp.`code` and dp.parent_code = 'enterprise_type'
|
||||
</sql>
|
||||
|
||||
|
||||
<sql id="selecWzrListVo">
|
||||
SELECT
|
||||
csb.id,
|
||||
CASE
|
||||
WHEN csb.supplier_type = 'dvs' THEN social_credit_code
|
||||
WHEN csb.supplier_type = 'ovs' THEN vat
|
||||
WHEN csb.supplier_type = 'pe' THEN id_card
|
||||
ELSE NULL
|
||||
END AS unified_code,
|
||||
CASE
|
||||
WHEN csb.supplier_type = 'ovs' THEN name_en
|
||||
ELSE name
|
||||
END AS name
|
||||
FROM
|
||||
cosco_supplier_base csb
|
||||
left join (
|
||||
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" collection="vo.deptIdList" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
) b on csb.id = b.supplier_id
|
||||
</sql>
|
||||
|
||||
<select id="selectWzrPageList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoSupplierBase" resultMap="CoscoSupplierBaseResult">
|
||||
<include refid="selectCoscoSupplierBaseVo"/>
|
||||
<where>
|
||||
<if test="vo.supplierBaseList != null and vo.supplierBaseList.size() > 0">
|
||||
AND csb.id NOT IN
|
||||
<foreach collection="vo.supplierBaseList" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="vo.supplierType != null and vo.supplierType != ''">
|
||||
and supplier_type = #{vo.supplierType}
|
||||
</if>
|
||||
<if test="vo.licenceAccessory != null and vo.licenceAccessory != ''">
|
||||
and licence_accessory = #{vo.licenceAccessory}
|
||||
</if>
|
||||
<if test="vo.licenceDate != null and vo.licenceDate != ''">
|
||||
and licence_date = #{vo.licenceDate}
|
||||
</if>
|
||||
<if test="vo.enterpriseType != null and vo.enterpriseType != ''">
|
||||
and enterprise_type = #{vo.enterpriseType}
|
||||
</if>
|
||||
<if test="vo.name != null and vo.name != ''">
|
||||
and name like concat('%', #{vo.name}, '%')
|
||||
</if>
|
||||
<if test="vo.nameEn != null and vo.nameEn != ''">
|
||||
and name_en = #{vo.nameEn}
|
||||
</if>
|
||||
<if test="vo.socialCreditCode != null and vo.socialCreditCode != ''">
|
||||
and social_credit_code = #{vo.socialCreditCode}
|
||||
</if>
|
||||
<if test="vo.range != null and vo.range != ''">
|
||||
and `range` = #{vo.range}
|
||||
</if>
|
||||
<if test="vo.regAddress != null and vo.regAddress != ''">
|
||||
and reg_address = #{vo.regAddress}
|
||||
</if>
|
||||
<if test="vo.workAddress != null and vo.workAddress != ''">
|
||||
and work_address = #{vo.workAddress}
|
||||
</if>
|
||||
<if test="vo.parentCompanyInvestor != null and vo.parentCompanyInvestor != ''">
|
||||
and parent_company_investor = #{vo.parentCompanyInvestor}
|
||||
</if>
|
||||
<if test="vo.legalPerson != null and vo.legalPerson != ''">
|
||||
and legal_person = #{vo.legalPerson}
|
||||
</if>
|
||||
<if test="vo.idCard != null and vo.idCard != ''">
|
||||
and id_card = #{vo.idCard}
|
||||
</if>
|
||||
<if test="vo.capital != null ">
|
||||
and capital = #{vo.capital}
|
||||
</if>
|
||||
<if test="vo.contactsName != null and vo.contactsName != ''">
|
||||
and contacts_name like concat('%', #{vo.contactsName}, '%')
|
||||
</if>
|
||||
<if test="vo.contactsPhone != null and vo.contactsPhone != ''">
|
||||
and contacts_phone = #{vo.contactsPhone}
|
||||
</if>
|
||||
<if test="vo.contactsType != null and vo.contactsType != ''">
|
||||
and contacts_type = #{vo.contactsType}
|
||||
</if>
|
||||
<if test="vo.contactsEmail != null and vo.contactsEmail != ''">
|
||||
and contacts_email = #{vo.contactsEmail}
|
||||
</if>
|
||||
<if test="vo.telephone != null and vo.telephone != ''">
|
||||
and telephone = #{telephone}
|
||||
</if>
|
||||
<if test="vo.nation != null and vo.nation != ''">
|
||||
and nation = #{nation}
|
||||
</if>
|
||||
<if test="vo.vat != null and vo.vat != ''">
|
||||
and vat = #{vo.vat}
|
||||
</if>
|
||||
<if test="vo.taxpayerId != null and vo.taxpayerId != ''">
|
||||
and taxpayer_id = #{vo.taxpayerId}
|
||||
</if>
|
||||
<if test="vo.currency != null and vo.currency != ''">
|
||||
and currency = #{vo.currency}
|
||||
</if>
|
||||
<if test="vo.personName != null and vo.personName != ''">
|
||||
and person_name like concat('%', #{vo.personName}, '%')
|
||||
</if>
|
||||
<if test="vo.personPhone != null and vo.personPhone != ''">
|
||||
and person_phone = #{vo.personPhone}
|
||||
</if>
|
||||
<if test="vo.personBank != null and vo.personBank != ''">
|
||||
and person_bank = #{vo.personBank}
|
||||
</if>
|
||||
<if test="vo.personAccount != null and vo.personAccount != ''">
|
||||
and person_account = #{vo.personAccount}
|
||||
</if>
|
||||
<if test="vo.accessStatus != null ">
|
||||
and access_status = #{vo.accessStatus}
|
||||
</if>
|
||||
<if test="vo.blacklistStatus != null ">
|
||||
and blacklist_status = #{vo.blacklistStatus}
|
||||
</if>
|
||||
<if test="vo.greylistStatus != null ">
|
||||
and greylist_status = #{vo.greylistStatus}
|
||||
</if>
|
||||
<if test="vo.fillinStatus != null ">
|
||||
and fillin_status = #{vo.fillinStatus}
|
||||
</if>
|
||||
<if test="vo.fillinBy != null and vo.fillinBy != ''">
|
||||
and fillin_by = #{vo.fillinBy}
|
||||
</if>
|
||||
<if test="vo.sapCode != null and vo.sapCode != ''">
|
||||
and sap_code = #{vo.sapCode}
|
||||
</if>
|
||||
<if test="vo.lastUpdateTime != null ">
|
||||
and last_update_time = #{vo.lastUpdateTime}
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
<include refid="selecWzrListVo"/>
|
||||
where b.supplier_id is null
|
||||
<if test="vo.name != null and vo.name != ''">
|
||||
and csb.name = #{vo.name} or csb.name_en = #{vo.name}
|
||||
</if>
|
||||
<if test="vo.supplierType != null and vo.supplierType != ''">
|
||||
and supplier_type = #{vo.supplierType}
|
||||
</if>
|
||||
order by csb.create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
@ -296,6 +239,12 @@
|
||||
<if test="vo.supplierType != null and vo.supplierType != ''">
|
||||
and supplier_type = #{vo.supplierType}
|
||||
</if>
|
||||
<if test="vo.supplierTypeList != null and vo.supplierTypeList.size > 0">
|
||||
AND supplier_type IN
|
||||
<foreach item="item" collection="vo.supplierTypeList" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="vo.licenceAccessory != null and vo.licenceAccessory != ''">
|
||||
and licence_accessory = #{vo.licenceAccessory}
|
||||
</if>
|
||||
@ -541,111 +490,117 @@
|
||||
<include refid="selectCoscoSupplierBaseVo"/>
|
||||
<where>
|
||||
and del_flag = 'normal'
|
||||
<if test="deptId != null and deptId != ''">
|
||||
and dept_id = #{vo.deptId}
|
||||
</if>
|
||||
<if test="supplierType != null and supplierType != ''">
|
||||
and supplier_type = #{supplierType}
|
||||
</if>
|
||||
<if test="licenceAccessory != null and licenceAccessory != ''">
|
||||
and licence_accessory = #{licenceAccessory}
|
||||
</if>
|
||||
<if test="licenceDate != null and licenceDate != ''">
|
||||
and licence_date = #{licenceDate}
|
||||
</if>
|
||||
<if test="enterpriseType != null and enterpriseType != ''">
|
||||
and enterprise_type = #{enterpriseType}
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
and name like concat('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="nameEn != null and nameEn != ''">
|
||||
and name_en = #{nameEn}
|
||||
</if>
|
||||
<if test="socialCreditCode != null and socialCreditCode != ''">
|
||||
and social_credit_code = #{socialCreditCode}
|
||||
</if>
|
||||
<if test="range != null and range != ''">
|
||||
and `range` = #{range}
|
||||
</if>
|
||||
<if test="regAddress != null and regAddress != ''">
|
||||
and reg_address = #{regAddress}
|
||||
</if>
|
||||
<if test="workAddress != null and workAddress != ''">
|
||||
and work_address = #{workAddress}
|
||||
</if>
|
||||
<if test="parentCompanyInvestor != null and parentCompanyInvestor != ''">
|
||||
and parent_company_investor = #{parentCompanyInvestor}
|
||||
</if>
|
||||
<if test="legalPerson != null and legalPerson != ''">
|
||||
and legal_person = #{legalPerson}
|
||||
</if>
|
||||
<if test="idCard != null and idCard != ''">
|
||||
and id_card = #{idCard}
|
||||
</if>
|
||||
<if test="capital != null ">
|
||||
and capital = #{capital}
|
||||
</if>
|
||||
<if test="contactsName != null and contactsName != ''">
|
||||
and contacts_name like concat('%', #{contactsName}, '%')
|
||||
</if>
|
||||
<if test="contactsPhone != null and contactsPhone != ''">
|
||||
and contacts_phone = #{contactsPhone}
|
||||
</if>
|
||||
<if test="contactsType != null and contactsType != ''">
|
||||
and contacts_type = #{contactsType}
|
||||
</if>
|
||||
<if test="contactsEmail != null and contactsEmail != ''">
|
||||
and contacts_email = #{contactsEmail}
|
||||
</if>
|
||||
<if test="telephone != null and telephone != ''">
|
||||
and telephone = #{telephone}
|
||||
</if>
|
||||
<if test="nation != null and nation != ''">
|
||||
and nation = #{nation}
|
||||
</if>
|
||||
<if test="vat != null and vat != ''">
|
||||
and vat = #{vat}
|
||||
</if>
|
||||
<if test="taxpayerId != null and taxpayerId != ''">
|
||||
and taxpayer_id = #{taxpayerId}
|
||||
</if>
|
||||
<if test="currency != null and currency != ''">
|
||||
and currency = #{currency}
|
||||
</if>
|
||||
<if test="personName != null and personName != ''">
|
||||
and person_name like concat('%', #{personName}, '%')
|
||||
</if>
|
||||
<if test="personPhone != null and personPhone != ''">
|
||||
and person_phone = #{personPhone}
|
||||
</if>
|
||||
<if test="personBank != null and personBank != ''">
|
||||
and person_bank = #{personBank}
|
||||
</if>
|
||||
<if test="personAccount != null and personAccount != ''">
|
||||
and person_account = #{personAccount}
|
||||
</if>
|
||||
<if test="accessStatus != null ">
|
||||
and access_status = #{accessStatus}
|
||||
</if>
|
||||
<if test="blacklistStatus != null ">
|
||||
and blacklist_status = #{blacklistStatus}
|
||||
</if>
|
||||
<if test="greylistStatus != null ">
|
||||
and greylist_status = #{greylistStatus}
|
||||
</if>
|
||||
<if test="fillinStatus != null ">
|
||||
and fillin_status = #{fillinStatus}
|
||||
</if>
|
||||
<if test="fillinBy != null and fillinBy != ''">
|
||||
and fillin_by = #{fillinBy}
|
||||
</if>
|
||||
<if test="sapCode != null and sapCode != ''">
|
||||
and sap_code = #{sapCode}
|
||||
</if>
|
||||
<if test="lastUpdateTime != null ">
|
||||
and last_update_time = #{lastUpdateTime}
|
||||
</if>
|
||||
<if test="deptId != null and deptId != ''">
|
||||
and dept_id = #{vo.deptId}
|
||||
</if>
|
||||
<if test="supplierTypeList != null and supplierTypeList.size > 0">
|
||||
AND supplier_type IN
|
||||
<foreach item="item" collection="supplierTypeList" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="supplierType != null and supplierType != ''">
|
||||
and supplier_type = #{supplierType}
|
||||
</if>
|
||||
<if test="licenceAccessory != null and licenceAccessory != ''">
|
||||
and licence_accessory = #{licenceAccessory}
|
||||
</if>
|
||||
<if test="licenceDate != null and licenceDate != ''">
|
||||
and licence_date = #{licenceDate}
|
||||
</if>
|
||||
<if test="enterpriseType != null and enterpriseType != ''">
|
||||
and enterprise_type = #{enterpriseType}
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
and name like concat('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="nameEn != null and nameEn != ''">
|
||||
and name_en = #{nameEn}
|
||||
</if>
|
||||
<if test="socialCreditCode != null and socialCreditCode != ''">
|
||||
and social_credit_code = #{socialCreditCode}
|
||||
</if>
|
||||
<if test="range != null and range != ''">
|
||||
and `range` = #{range}
|
||||
</if>
|
||||
<if test="regAddress != null and regAddress != ''">
|
||||
and reg_address = #{regAddress}
|
||||
</if>
|
||||
<if test="workAddress != null and workAddress != ''">
|
||||
and work_address = #{workAddress}
|
||||
</if>
|
||||
<if test="parentCompanyInvestor != null and parentCompanyInvestor != ''">
|
||||
and parent_company_investor = #{parentCompanyInvestor}
|
||||
</if>
|
||||
<if test="legalPerson != null and legalPerson != ''">
|
||||
and legal_person = #{legalPerson}
|
||||
</if>
|
||||
<if test="idCard != null and idCard != ''">
|
||||
and id_card = #{idCard}
|
||||
</if>
|
||||
<if test="capital != null ">
|
||||
and capital = #{capital}
|
||||
</if>
|
||||
<if test="contactsName != null and contactsName != ''">
|
||||
and contacts_name like concat('%', #{contactsName}, '%')
|
||||
</if>
|
||||
<if test="contactsPhone != null and contactsPhone != ''">
|
||||
and contacts_phone = #{contactsPhone}
|
||||
</if>
|
||||
<if test="contactsType != null and contactsType != ''">
|
||||
and contacts_type = #{contactsType}
|
||||
</if>
|
||||
<if test="contactsEmail != null and contactsEmail != ''">
|
||||
and contacts_email = #{contactsEmail}
|
||||
</if>
|
||||
<if test="telephone != null and telephone != ''">
|
||||
and telephone = #{telephone}
|
||||
</if>
|
||||
<if test="nation != null and nation != ''">
|
||||
and nation = #{nation}
|
||||
</if>
|
||||
<if test="vat != null and vat != ''">
|
||||
and vat = #{vat}
|
||||
</if>
|
||||
<if test="taxpayerId != null and taxpayerId != ''">
|
||||
and taxpayer_id = #{taxpayerId}
|
||||
</if>
|
||||
<if test="currency != null and currency != ''">
|
||||
and currency = #{currency}
|
||||
</if>
|
||||
<if test="personName != null and personName != ''">
|
||||
and person_name like concat('%', #{personName}, '%')
|
||||
</if>
|
||||
<if test="personPhone != null and personPhone != ''">
|
||||
and person_phone = #{personPhone}
|
||||
</if>
|
||||
<if test="personBank != null and personBank != ''">
|
||||
and person_bank = #{personBank}
|
||||
</if>
|
||||
<if test="personAccount != null and personAccount != ''">
|
||||
and person_account = #{personAccount}
|
||||
</if>
|
||||
<if test="accessStatus != null ">
|
||||
and access_status = #{accessStatus}
|
||||
</if>
|
||||
<if test="blacklistStatus != null ">
|
||||
and blacklist_status = #{blacklistStatus}
|
||||
</if>
|
||||
<if test="greylistStatus != null ">
|
||||
and greylist_status = #{greylistStatus}
|
||||
</if>
|
||||
<if test="fillinStatus != null ">
|
||||
and fillin_status = #{fillinStatus}
|
||||
</if>
|
||||
<if test="fillinBy != null and fillinBy != ''">
|
||||
and fillin_by = #{fillinBy}
|
||||
</if>
|
||||
<if test="sapCode != null and sapCode != ''">
|
||||
and sap_code = #{sapCode}
|
||||
</if>
|
||||
<if test="lastUpdateTime != null ">
|
||||
and last_update_time = #{lastUpdateTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
Reference in New Issue
Block a user