修改bug

This commit is contained in:
YY
2025-07-02 09:38:05 +08:00
parent e5af0b7c27
commit f8e215ac2d
24 changed files with 164 additions and 110 deletions

View File

@ -16,7 +16,7 @@ public interface AnnualreviewTaskConstant {
/**
* 进行中
*/
public static final Long IN_PROGRESS = 1L;
public static final String IN_PROGRESS = "1L";
/**
* 已完成
*/

View File

@ -33,6 +33,10 @@ public interface CoscoCategoryConstant {
* 是否加入
*/
public static final Long ISTRUE = 1L;
/**
* 未加入
*/
public static final Long ISNOTTRUE = 0L;
/**
* 建库方式 online.线上
*/
@ -53,6 +57,10 @@ public interface CoscoCategoryConstant {
* 最高级 0
*/
public static final String LEVEL_TOP = "0";
/**
* 顶级0L
*/
public static final Long CATEGORY_LEVEL_TOP = 0L;
/**
* * 类型(0.分类、1.品类)

View File

@ -23,7 +23,7 @@ public class UserController {
@GetMapping("/getUserList")
public BaseResponse getUserList(SelectUserVo vo) {
return BaseResponse.success(userService.getUser(vo.getUserIds()));
return BaseResponse.success(userService.getUser(vo));
}
@GetMapping("/getDeptList")

View File

@ -1,5 +1,6 @@
package com.chinaunicom.zyhy.ebtp.supplier.base.service.impl;
import com.chinaunicom.zyhy.ebtp.supplier.base.vo.SelectUserVo;
import com.chinaunicom.zyhy.ebtp.supplier.base.vo.UserVo;
import org.springframework.stereotype.Service;
@ -23,16 +24,15 @@ public class UserService {
}
public List<UserVo> getUser(List<String> userIds) {
public List<UserVo> getUser(SelectUserVo vo) {
List<UserVo> userList = new ArrayList<>();
Map<String,String> map = new HashMap<>();
if(userIds!=null){
for (String userId : userIds) {
if(vo.getUserIds()!=null){
for (String userId : vo.getUserIds()) {
map.put(userId,userId);
}
}
for (int i = 1; i <= 10; i++) {
for (int i = 1; i <= 32; i++) {
UserVo user = new UserVo();
user.setUserId("U" + String.format("%03d", i)); // U001 ~ U010
user.setUserName("用户" + i);
@ -44,6 +44,14 @@ public class UserService {
}
userList.add(user);
}
if(vo.getPageNumber()!=null && vo.getPageSize()!=null){
int pageNum = vo.getPageNumber();
int pageSize = vo.getPageSize();
int start = (pageNum - 1) * pageSize;
int end = Math.min(start + pageSize, userList.size());
return userList.subList(start, end);
}
return userList;
}

View File

@ -7,4 +7,7 @@ import java.util.List;
@Data
public class SelectUserVo {
private List<String> userIds;
private Integer pageNumber;
private Integer pageSize;
}

View File

@ -185,7 +185,7 @@
where annualreview_task_id = #{taskId}
</update>
<select id="getSupplierAnnualReviewStatisticsList" parameterType="map"
<select id="getSupplierAnnualReviewStatisticsList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierAnnualReviewStatisticsVo"
resultType="com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierAnnualReviewStatisticsVo">
select
@ -210,11 +210,11 @@
join cosco_annualreview_task cat on cat.id = cats.annualreview_task_id
<where>
cats.del_flag = 'normal'
<if test="vo.supplierName!=null and vo.supplierName!=''">
and csb.name like concat('%',#{vo.supplierName},'%')
<if test="supplierName!=null and supplierName!=''">
and csb.name like concat('%',#{supplierName},'%')
</if>
<if test="vo.annualreviewYear!=null and vo.annualreviewYear!=''">
and cat.annualreview_year = #{vo.annualreviewYear}
<if test="annualreviewYear!=null and annualreviewYear!=''">
and cat.annualreview_year = #{annualreviewYear}
</if>
and review_result is not null
</where>
@ -230,7 +230,7 @@
case when csb.supplier_type = 'ovs' then '境外'
when csb.supplier_type = 'ovs' then '境内'
else '境内' end as area ,
csb.id,
cats.id,
'准入单位' as accessUnit,
'准入部门' as accessDept,
case when cats.review_result = 1 then '合格'

View File

@ -7,6 +7,7 @@ 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.SupplierUserConstant;
import com.chinaunicom.zyhy.ebtp.supplier.base.service.impl.UserService;
import com.chinaunicom.zyhy.ebtp.supplier.base.vo.SelectUserVo;
import com.chinaunicom.zyhy.ebtp.supplier.base.vo.UserVo;
import com.chinaunicom.zyhy.ebtp.supplier.coscoAnnualreview.dao.*;
import com.chinaunicom.zyhy.ebtp.supplier.coscoAnnualreview.entity.*;
@ -77,7 +78,7 @@ public class CoscoAnnualreviewTaskServiceImpl implements ICoscoAnnualreviewTaskS
//获取供应商用户信息
List<CoscoAnnualreviewTaskSupplierUser> coscoAnnualreviewTaskSupplierUsers = coscoAnnualreviewTaskSupplierUserMapper.selectCoscoAnnualreviewTaskSupplierUserList(coscoAnnualreviewTaskSupplierUser);
//获取用户信息
List<UserVo> user1 = userService.getUser(new ArrayList<>());
List<UserVo> user1 = userService.getUser(new SelectUserVo());
//获取已使用的用户信息
Map<String, String> userIdMap = coscoAnnualreviewTaskSupplierUsers.stream()
.collect(Collectors.
@ -107,7 +108,7 @@ public class CoscoAnnualreviewTaskServiceImpl implements ICoscoAnnualreviewTaskS
blackSupplierVos.forEach(blackSupplierVo -> {
List<TaskUserVo> taskUserVos = new ArrayList<>();
List<String> strings = suppMap.get(blackSupplierVo.getSupplierId());
if(strings.size()>0){
if(!strings.isEmpty()){
for (String userId : strings) {
TaskUserVo uVo=new TaskUserVo();
UserVo userVo = userMap.get(userId);

View File

@ -63,4 +63,11 @@ public interface CoscoBlacklistSupplierMapper {
* @return 结果
*/
public int deleteCoscoBlacklistSupplierByBlacklistIds(String[] blacklistIds);
/**
* 查询供应商加入黑名单数量
* @param supplierId
* @return
*/
int countBySupplierId(String supplierId);
}

View File

@ -4,9 +4,10 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.chinaunicom.zyhy.ebtp.supplier.coscoBlack.dao.CoscoBlacklistSupplierMapper">
<resultMap type="com.chinaunicom.zyhy.ebtp.supplier.coscoBlack.entity.CoscoBlacklistSupplier" id="CoscoBlacklistSupplierResult">
<result property="blacklistId" column="blacklist_id"/>
<result property="supplierId" column="supplier_id"/>
<resultMap type="com.chinaunicom.zyhy.ebtp.supplier.coscoBlack.entity.CoscoBlacklistSupplier"
id="CoscoBlacklistSupplierResult">
<result property="blacklistId" column="blacklist_id"/>
<result property="supplierId" column="supplier_id"/>
</resultMap>
<sql id="selectCoscoBlacklistSupplierVo">
@ -14,7 +15,9 @@
from cosco_blacklist_supplier
</sql>
<select id="selectCoscoBlacklistSupplierList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscoBlack.entity.CoscoBlacklistSupplier" resultMap="CoscoBlacklistSupplierResult">
<select id="selectCoscoBlacklistSupplierList"
parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscoBlack.entity.CoscoBlacklistSupplier"
resultMap="CoscoBlacklistSupplierResult">
<include refid="selectCoscoBlacklistSupplierVo"/>
<where>
blacklist_id = #{blacklistId}
@ -23,19 +26,20 @@
<select id="selectCoscoBlacklistSupplierByBlacklistId" parameterType="String"
resultMap="CoscoBlacklistSupplierResult">
<include refid="selectCoscoBlacklistSupplierVo"/>
where blacklist_id = #{blacklistId}
<include refid="selectCoscoBlacklistSupplierVo"/>
where blacklist_id = #{blacklistId}
</select>
<insert id="insertCoscoBlacklistSupplier" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscoBlack.entity.CoscoBlacklistSupplier">
<insert id="insertCoscoBlacklistSupplier"
parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscoBlack.entity.CoscoBlacklistSupplier">
insert into cosco_blacklist_supplier
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="blacklistId != null">blacklist_id,</if>
<if test="supplierId != null">supplier_id,</if>
<if test="blacklistId != null">blacklist_id,</if>
<if test="supplierId != null">supplier_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="blacklistId != null">#{blacklistId},</if>
<if test="supplierId != null">#{supplierId},</if>
<if test="blacklistId != null">#{blacklistId},</if>
<if test="supplierId != null">#{supplierId},</if>
</trim>
</insert>
<insert id="batchCoscoBlacklistSupplier" parameterType="java.util.List">
@ -46,18 +50,20 @@
( #{item.blacklistId}, #{item.supplierId})
</foreach>
</insert>
<update id="updateCoscoBlacklistSupplier" parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscoBlack.entity.CoscoBlacklistSupplier">
<update id="updateCoscoBlacklistSupplier"
parameterType="com.chinaunicom.zyhy.ebtp.supplier.coscoBlack.entity.CoscoBlacklistSupplier">
update cosco_blacklist_supplier
<trim prefix="SET" suffixOverrides=",">
<if test="supplierId != null">supplier_id =
#{supplierId},
</if>
<if test="supplierId != null">supplier_id =
#{supplierId},
</if>
</trim>
where blacklist_id = #{blacklistId}
</update>
<update id="deleteCoscoBlacklistSupplierByBlacklistId" parameterType="String">
update cosco_blacklist_supplier set del_flag = 2
update cosco_blacklist_supplier
set del_flag = 2
where blacklist_id = #{blacklistId}
</update>
@ -67,4 +73,12 @@
#{blacklistId}
</foreach>
</update>
<select id="countBySupplierId" parameterType="string" resultType="int">
select count(id)
from cosco_blacklist cb
join cosco_blacklist_supplier cbs on cb.id = cbs.blacklist_id
where cb.approve_status = 1
and (cb.restore_approve_status is null or cb.restore_approve_status = 0 or cb.restore_approve_status = 2)
and cbs.supplier_id = #{supplierId}
</select>
</mapper>

View File

@ -64,4 +64,11 @@ public interface ICoscoBlacklistSupplierService {
* @param listVo
*/
void batchInsert(AddBlackListVo listVo);
/**
* 根据供应商id查询
* @param supplierId
* @return
*/
int countBySupplierId(String supplierId);
}

View File

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
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.common.MessageType;
import com.chinaunicom.zyhy.ebtp.supplier.common.aop.MessageLog;
import com.chinaunicom.zyhy.ebtp.supplier.coscoBlack.dao.CoscoBlacklistMapper;
@ -91,10 +92,10 @@ public class CoscoBlacklistServiceImpl implements ICoscoBlacklistService {
@Transactional(rollbackFor = Exception.class)
public int insertCoscoBlacklist(AddBlackListVo listVo) {
listVo.setCreateTime(new Date());
listVo.setCreateBy("admin");
listVo.setCreateBy(SupplierUserConstant.USER_NAME);
listVo.setLastUpdateTime(LocalDateTime.now());
listVo.setDelFlag(CoscoCategoryConstant.DELETE_FLAG_YES);
listVo.setDeptId("1");
listVo.setDeptId(SupplierUserConstant.DEPT_ID);
listVo.setId(PropertyUtils.getSnowflakeId());
coscoBlacklistMapper.insertCoscoBlacklist(listVo);
//添加供应商
@ -229,27 +230,23 @@ public class CoscoBlacklistServiceImpl implements ICoscoBlacklistService {
if (CoscoCategoryConstant.APPROVE_STATUS_PASS.equals(list.getApproveStatus())) {
CoscoBlacklistSupplier coscoBlacklistSupplier = new CoscoBlacklistSupplier();
coscoBlacklistSupplier.setBlacklistId(coscoBlacklist.getId());
List<CoscoBlacklistSupplier> coscoBlacklistSuppliers = coscoBlacklistSupplierService.selectCoscoBlacklistSupplierList(coscoBlacklistSupplier);
List<CoscoBlacklistSupplier> coscoBlacklistSuppliers =
coscoBlacklistSupplierService.selectCoscoBlacklistSupplierList(coscoBlacklistSupplier);
//获取添加时限
DictProject dictProject = new DictProject();
dictProject.setParentCode(EvaluateTaskConstant.INDICATOR_TYPE_ND);
coscoBlacklistSuppliers.forEach(cosupplier -> {
//判断黑名单
if (coscoBlacklist.getBacklistType().equals(CoscoCategoryConstant.BLACKLIST_TYPE_BLACK)) {
int count =coscoBlacklistSupplierService.countBySupplierId(cosupplier.getSupplierId());
CoscoSupplierBase coscoSupplierBase = new CoscoSupplierBase();
coscoSupplierBase.setId(cosupplier.getSupplierId());
coscoSupplierBase.setBlacklistStatus(CoscoCategoryConstant.ISTRUE);
coscoSupplierBaseMapper.updateCoscoSupplierBase(coscoSupplierBase);
}
//判断灰名单
if (coscoBlacklist.getBacklistType().equals(CoscoCategoryConstant.BLACKLIST_TYPE_BLACK)) {
CoscoSupplierBase coscoSupplierBase = new CoscoSupplierBase();
coscoSupplierBase.setId(cosupplier.getSupplierId());
coscoSupplierBase.setGreylistStatus(CoscoCategoryConstant.ISTRUE);
coscoSupplierBaseMapper.updateCoscoSupplierBase(coscoSupplierBase);
if(count==0){
coscoSupplierBase.setId(cosupplier.getSupplierId());
coscoSupplierBase.setBlacklistStatus(CoscoCategoryConstant.ISNOTTRUE);
coscoSupplierBaseMapper.updateCoscoSupplierBase(coscoSupplierBase);
}
}
});
}
coscoBlacklistMapper.updateCoscoBlacklist(coscoBlacklist);
}

View File

@ -99,4 +99,9 @@ public class CoscoBlacklistSupplierServiceImpl implements ICoscoBlacklistSupplie
});
coscoBlacklistSupplierMapper.batchCoscoBlacklistSupplier(list);
}
@Override
public int countBySupplierId(String supplierId) {
return coscoBlacklistSupplierMapper.countBySupplierId(supplierId);
}
}

View File

@ -211,7 +211,7 @@
and ccl.area = #{vo.area}
</if>
<if test="vo.approveStatus!=null and vo.approveStatus!=''">
and ccl.area = #{vo.approveStatus}
and cclsa.approveStatus = #{vo.approveStatus}
</if>
GROUP BY
cclsa.id

View File

@ -101,16 +101,11 @@
</select>
<select id="selectCategoryNameById" parameterType="string" resultType="string">
SELECT
GROUP_CONCAT(c2.category_name ORDER BY FIND_IN_SET(c2.id, CONCAT(c1.ancestors, ',', c1.id)) SEPARATOR '>') AS full_path
FROM
cosco_category c1
JOIN
cosco_category c2
ON
FIND_IN_SET(c2.id, CONCAT(c1.ancestors, ',', c1.id))
WHERE
c1.id = #{id};
SELECT COALESCE((SELECT GROUP_CONCAT(category_name ORDER BY FIND_IN_SET(id, c.ancestors) SEPARATOR '-')
FROM cosco_category
WHERE FIND_IN_SET(id, c.ancestors)), '') AS ancestor_names
FROM cosco_category c
WHERE id = #{id}
</select>
<insert id="insertCoscoCategory"

View File

@ -8,6 +8,7 @@ import com.chinaunicom.zyhy.ebtp.supplier.base.constant.CoscoCategoryConstant;
import com.chinaunicom.zyhy.ebtp.supplier.base.constant.SupplierUserConstant;
import com.chinaunicom.zyhy.ebtp.supplier.coscoCategory.dao.CoscoCategoryLibrarAttachmentsMapper;
import com.chinaunicom.zyhy.ebtp.supplier.coscoCategory.dao.CoscoCategoryLibraryMapper;
import com.chinaunicom.zyhy.ebtp.supplier.coscoCategory.dao.CoscoCategoryMapper;
import com.chinaunicom.zyhy.ebtp.supplier.coscoCategory.entity.CoscoCategoryLibrarAttachments;
import com.chinaunicom.zyhy.ebtp.supplier.coscoCategory.entity.CoscoCategoryLibrary;
import com.chinaunicom.zyhy.ebtp.supplier.coscoCategory.service.ICoscoCategoryLibraryContainService;
@ -41,6 +42,8 @@ public class CoscoCategoryLibraryServiceImpl extends BaseServiceImpl<CoscoCatego
private ICoscoCategoryLibrarySupplierApplyService coscoCategoryLibrarySupplierApplyService;
@Autowired
private CoscoCategoryLibrarAttachmentsMapper coscoCategoryLibrarAttachmentsMapper;
@Autowired
private CoscoCategoryMapper coscoCategoryMapper;
/**
* 查询品类库_品类库
@ -155,12 +158,22 @@ public class CoscoCategoryLibraryServiceImpl extends BaseServiceImpl<CoscoCatego
CoscoCategoryLibraryDetailVo vo = new CoscoCategoryLibraryDetailVo();
try {
BeanUtils.copyProperties(vo, coscoCategoryLibrary);
} catch (IllegalAccessException e) {
throw new RuntimeException(e);
} catch (InvocationTargetException e) {
} catch (Exception e) {
throw new RuntimeException(e);
}
//获取添加的供应商
List<String> strings = coscoCategoryLibraryContainService.selectCoscoCateGoryIdByLibraryId(id);
StringBuilder sb = new StringBuilder();
for (String s : strings) {
String categoryName = coscoCategoryMapper.selectCategoryNameById(s);
if (sb.length() > 0) {
sb.append(",");
}
if(categoryName!=null){
sb.append(categoryName);
}
}
vo.setCategoryName(sb.toString());
coscoCategoryLibrarAttachmentsMapper.selectCoscoCategoryLibrarAttachmentsByCategoryLibraryId(id);
//获取添加品类
vo.setCategoryIds(coscoCategoryLibraryContainService.selectByLibraryId(id));

View File

@ -13,6 +13,10 @@ import java.util.List;
public class CoscoCategoryLibraryDetailVo extends CoscoCategoryLibrary {
private String deptName;
private String createByName="测试人员";
private String categoryName;
/**
* 品类id
*/

View File

@ -327,7 +327,7 @@
case when csb.supplier_type = 'ovs' then '境外'
when csb.supplier_type = 'ovs' then '境内'
else '境内' end as area ,
csb.id,
cets.id,
(select GROUP_CONCAT( DISTINCT cc.category_name SEPARATOR ', ' )
from cosco_access_supplier_category casc
join cosco_category cc
@ -344,14 +344,14 @@
<where>
cets.del_flag = 'normal'
and cets.review_result is not null
<if test="vo.supplierName!=null and vo.supplierName!=''">
and csb.name like concat('%',#{vo.supplierName},'%')
<if test="supplierName!=null and supplierName!=''">
and csb.name like concat('%',#{supplierName},'%')
</if>
<if test="vo.evaluateYear!=null and vo.evaluateYear!=''">
and cet.evaluate_year = #{vo.evaluateYear}
<if test="evaluateYear!=null and evaluateYear!=''">
and cet.evaluate_year = #{evaluateYear}
</if>
<if test="vo.evaluateResult!=null and vo.evaluateResult!=''">
and cets.review_result = #{vo.evaluateResult}
<if test="evaluateResult!=null and evaluateResult!=''">
and cets.review_result = #{evaluateResult}
</if>
</where>
order by cets.create_time desc

View File

@ -10,10 +10,12 @@ 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;
import com.chinaunicom.zyhy.ebtp.supplier.base.vo.UserVo;
import com.chinaunicom.zyhy.ebtp.supplier.common.MessageType;
import com.chinaunicom.zyhy.ebtp.supplier.common.aop.MessageLog;
@ -124,19 +126,19 @@ public class CoscoEvaluateTaskServiceImpl implements ICoscoEvaluateTaskService {
List<UserNdTypeVo> userNdTypeVos1 = map.get(userId);
vo.setType(userNdTypeVos1.get(0).getType());
if (EvaluateTaskConstant.INDICATOR_TYPE_ND_1.equals(vo.getType())) {
List<String> indicatorIds = userNdTypeVos1.stream().map(UserNdTypeVo::getNeId).collect(Collectors.toList());
vo.setIndicatorIds(indicatorIds);
} else {
vo.setIndicatorIds(new ArrayList<>());
}
List<String> indicatorIds = userNdTypeVos1.stream().map(UserNdTypeVo::getNeId).collect(Collectors.toList());
vo.setIndicatorIds(indicatorIds);
// if (EvaluateTaskConstant.INDICATOR_TYPE_ND_1.equals(vo.getType())) {
//
// } else {
// vo.setIndicatorIds(new ArrayList<>());
// }
vos.add(vo);
});
List<String> supplierIds = list.stream().map(TaskSupplierVo::getId).collect(Collectors.toList());
Map<String, List<String>> suppMap = list.stream().collect(Collectors.toMap(TaskSupplierVo::getId, TaskSupplierVo::getUserIds,(existing, replacement) -> existing));
Map<String, UserVo> userMap = userService.getUser(new ArrayList<>()).stream().collect(Collectors.toMap(UserVo::getUserId, userVo -> userVo));
Map<String, UserVo> userMap = userService.getUser(new SelectUserVo()).stream().collect(Collectors.toMap(UserVo::getUserId, userVo -> userVo));
List<BlackSupplierVo> blackSupplierVos = coscoSupplierBaseMapper.selectSupplierByIds(supplierIds);
blackSupplierVos.forEach(blackSupplierVo -> {
List<String> strings = suppMap.get(blackSupplierVo.getSupplierId());
@ -147,7 +149,7 @@ public class CoscoEvaluateTaskServiceImpl implements ICoscoEvaluateTaskService {
vo.setName(userMap.get(userId).getUserName());
vo.setUserDept(userMap.get(userId).getUserDept());
vo.setUserDeptId(userMap.get(userId).getUserDeptId());
vo.setSelected( true);
vo.setIsSelected( true);
taskUserVos.add(vo);
});
blackSupplierVo.setUserList(taskUserVos);
@ -162,7 +164,7 @@ public class CoscoEvaluateTaskServiceImpl implements ICoscoEvaluateTaskService {
}
private List<UserVo> getUserList(List<CoscoEvaluateTaskSupplierUser> coscoEvaluateTaskSupplierUsers) {
List<UserVo> user = userService.getUser(new ArrayList<>());
List<UserVo> user = userService.getUser(new SelectUserVo());
Map<String, UserVo> map = user.stream().collect(Collectors.toMap(UserVo::getUserId, userVo -> userVo));
Map<String, CoscoEvaluateTaskSupplierUser> suUser = coscoEvaluateTaskSupplierUsers.stream()
.collect(Collectors.toMap(
@ -482,25 +484,25 @@ public class CoscoEvaluateTaskServiceImpl implements ICoscoEvaluateTaskService {
* @param vo
* @param coscoEvaluateTemplateIndicatorNds
*/
public void adduserMap(Map<String, List<String>> userMap, AdduserIndicatorVo vo, List<CoscoEvaluateTemplateIndicatorNd> coscoEvaluateTemplateIndicatorNds) {
public void adduserMap(Map<String, List<String>> userMap, AdduserIndicatorVo vo,
List<CoscoEvaluateTemplateIndicatorNd> coscoEvaluateTemplateIndicatorNds) {
Map<String, String> map = new HashMap<>();
coscoEvaluateTemplateIndicatorNds.forEach(coscoEvaluateTemplateIndicatorNd -> {
map.put(coscoEvaluateTemplateIndicatorNd.getId(), coscoEvaluateTemplateIndicatorNd.getIndicatorStId());
});
Long type = vo.getType();
//一级项信息
Map<String, String> stIdMap = new HashMap<>();
//Map<String, String> stIdMap = new HashMap<>();
//二级项信息
Map<String, String> ndIdMap = new HashMap<>();
if (type.equals(0L)) {
if (CoscoCategoryConstant.CATEGORY_LEVEL_TOP.equals(vo.getType())) {
coscoEvaluateTemplateIndicatorNds.forEach(coscoEvaluateTemplateIndicatorNd -> {
stIdMap.put(coscoEvaluateTemplateIndicatorNd.getIndicatorStId(), coscoEvaluateTemplateIndicatorNd.getIndicatorStId());
//stIdMap.put(coscoEvaluateTemplateIndicatorNd.getIndicatorStId(), coscoEvaluateTemplateIndicatorNd.getIndicatorStId());
ndIdMap.put(coscoEvaluateTemplateIndicatorNd.getId(), coscoEvaluateTemplateIndicatorNd.getId());
});
} else {
List<String> indicatorIds = vo.getIndicatorIds();
indicatorIds.forEach(indicatorId -> {
stIdMap.put(map.get(indicatorId), map.get(indicatorId));
//stIdMap.put(map.get(indicatorId), map.get(indicatorId));
ndIdMap.put(indicatorId, indicatorId);
});
}

View File

@ -4,6 +4,7 @@ import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
import com.chinaunicom.zyhy.ebtp.supplier.base.constant.EvaluateTaskConstant;
import com.chinaunicom.zyhy.ebtp.supplier.base.constant.MessageConstant;
import com.chinaunicom.zyhy.ebtp.supplier.base.service.impl.UserService;
import com.chinaunicom.zyhy.ebtp.supplier.base.vo.SelectUserVo;
import com.chinaunicom.zyhy.ebtp.supplier.base.vo.UserVo;
import com.chinaunicom.zyhy.ebtp.supplier.common.MessageType;
import com.chinaunicom.zyhy.ebtp.supplier.common.aop.MessageLog;
@ -83,7 +84,7 @@ public class ScheduledTasksServiceImpl implements ScheduledTasksService {
//查询当前任务的人员信息及人员评价情况
List<CalculateAndObtainScoresVo> calculateAndObtainScoresVos = coscoEvaluateScoringMapper.selectCalculateAndObtainScores(coscoEvaluateTask.getId());
//获取人员信息
List<UserVo> user = userService.getUser(new ArrayList<>());
List<UserVo> user = userService.getUser(new SelectUserVo());
//给人员添加部门信息
Map<String, String> userMap = user.stream().collect(Collectors.toMap(UserVo::getUserId, UserVo::getUserDeptId));
calculateAndObtainScoresVos.forEach(vos -> {

View File

@ -29,6 +29,6 @@ public class TaskUserVo implements Serializable {
/**
* 是否被选中用于UI显示
*/
private Boolean selected=true;
private Boolean isSelected=true;
}

View File

@ -50,15 +50,10 @@ public class DataStatisticeController {
try {
List<SupplierEvaluateStatisticsVo> list = dataStatisticeService.getSupplierEvaluateStatisticsList(vo);
String fileName = URLEncoder.encode("供应评价.xlsx", "UTF-8");
// 动态设置导出字段(忽略未标注字段)
Set<String> includeFields = new HashSet<>(Arrays.asList(
"supplierName", "categoryName", "reviewScore", "reviewResult" // 指定要导出的字段名
));
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setHeader("Content-Disposition", "attachment;filename=" + fileName);
response.setCharacterEncoding("utf-8");
EasyExcelFactory.write(response.getOutputStream(), CoscoEvaluateTaskSupplier.class)
.includeColumnFieldNames(includeFields)
.sheet("供应评价")
.doWrite(list);
} catch (Exception e) {
@ -89,14 +84,11 @@ public class DataStatisticeController {
List<SupplierAnnualReviewStatisticsVo> list = dataStatisticeService.getSupplierAnnualReviewStatisticsList(vo);
String fileName = URLEncoder.encode("供应年审.xlsx", "UTF-8");
// 动态设置导出字段(忽略未标注字段)
Set<String> includeFields = new HashSet<>(Arrays.asList(
"supplierName", "categoryName", "reviewScore", "reviewResult" // 指定要导出的字段名
));
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setHeader("Content-Disposition", "attachment;filename=" + fileName);
response.setCharacterEncoding("utf-8");
EasyExcelFactory.write(response.getOutputStream(), CoscoEvaluateTaskSupplier.class)
.includeColumnFieldNames(includeFields)
.sheet("供应年审")
.doWrite(list);
} catch (Exception e) {
@ -128,14 +120,11 @@ public class DataStatisticeController {
List<SupplierExitStatisticsVo> list = dataStatisticeService.getSupplierExitStatisticsList(vo);
String fileName = URLEncoder.encode("供应商退出信息.xlsx", "UTF-8");
// 动态设置导出字段(忽略未标注字段)
Set<String> includeFields = new HashSet<>(Arrays.asList(
"supplierName", "categoryName", "reviewScore", "reviewResult" // 指定要导出的字段名
));
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setHeader("Content-Disposition", "attachment;filename=" + fileName);
response.setCharacterEncoding("utf-8");
EasyExcelFactory.write(response.getOutputStream(), CoscoEvaluateTaskSupplier.class)
.includeColumnFieldNames(includeFields)
.sheet("供应商退出信息")
.doWrite(list);
} catch (Exception e) {
@ -165,14 +154,11 @@ public class DataStatisticeController {
List<SupplierQualificationExpireVo> list = dataStatisticeService.getSupplierQualificationExpireList(vo);
String fileName = URLEncoder.encode("供应商资质.xlsx", "UTF-8");
// 动态设置导出字段(忽略未标注字段)
Set<String> includeFields = new HashSet<>(Arrays.asList(
"supplierName", "categoryName", "reviewScore", "reviewResult" // 指定要导出的字段名
));
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setHeader("Content-Disposition", "attachment;filename=" + fileName);
response.setCharacterEncoding("utf-8");
EasyExcelFactory.write(response.getOutputStream(), CoscoEvaluateTaskSupplier.class)
.includeColumnFieldNames(includeFields)
.sheet("供应商资质")
.doWrite(list);
} catch (Exception e) {

View File

@ -896,6 +896,7 @@
resultType="com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.vo.SupplierPageVo">
SELECT
csb.id,
csb.supplier_type as supplierType,
MAX(csb.name) AS name,
MAX(csb.social_credit_code) AS socialCreditCode,
MAX(cas.dept_id) AS deptId,

View File

@ -222,7 +222,7 @@
</foreach>
</update>
<select id="getSupplierQualificationExpireList" parameterType="map" resultType="com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierQualificationExpireVo">
<select id="getSupplierQualificationExpireList" parameterType="com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierQualificationExpireVo" resultType="com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierQualificationExpireVo">
SELECT
csq.authority,
csq.term_of_validity,
@ -254,8 +254,8 @@
csq.del_flag = 'normal'
AND ( csq.term_of_validity &lt; CURDATE() OR csq.term_of_validity
BETWEEN CURDATE() AND DATE_ADD( CURDATE(), INTERVAL 30 DAY ) )
<if test="vo.supplierName!=null and vo.supplierName!=''">
and csb.name like concat('%',#{vo.supplierName},'%')
<if test="supplierName!=null and supplierName!=''">
and csb.name like concat('%',#{supplierName},'%')
</if>
ORDER BY
csq.term_of_validity ASC
@ -272,7 +272,7 @@
WHEN csb.supplier_type = 'ovs' THEN
'境内' ELSE '境内'
END AS area,
csb.id,
csq.id,
'准入单位' AS accessUnit,
'准入部门' AS accessDept,
(

View File

@ -191,7 +191,9 @@
</foreach>
</update>
<select id="getSupplierExitStatisticsList" resultType="com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierExitStatisticsVo" parameterType="map">
<select id="getSupplierExitStatisticsList"
resultType="com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierExitStatisticsVo"
parameterType="com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierExitStatisticsVo">
select
csb.name supplierName,
case when csb.supplier_type = 'ovs' then '境外'
@ -212,8 +214,8 @@
on cse.id= css.supplierexit_id
join cosco_supplier_base csb on csb.id=css.supplier_id
where cse.approve_status=1
<if test="vo.supplierName!=null and vo.supplierName!=''">
and csb.name like concat('%',#{vo.supplierName},'%')
<if test="supplierName!=null and supplierName!=''">
and csb.name like concat('%',#{supplierName},'%')
</if>
</select>
<select id="getSupplierExitStatistics" resultType="com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierExitStatisticsVo" parameterType="map">
@ -222,7 +224,7 @@
case when csb.supplier_type = 'ovs' then '境外'
when csb.supplier_type = 'ovs' then '境内'
else '境内' end as area ,
csb.id,
cse.id,
'退出单位' as accessUnit,
'退出部门' as accessDept,
cse.create_by as applyUser,