Compare commits
4 Commits
41e9c23924
...
9ba13f6f06
Author | SHA1 | Date | |
---|---|---|---|
9ba13f6f06 | |||
e827c1f8b9 | |||
a9677f9169 | |||
8c087005f3 |
@ -60,6 +60,7 @@ public class CoscoAnnualreviewTaskSupplierUserServiceImpl implements ICoscoAnnua
|
|||||||
//返回封装
|
//返回封装
|
||||||
AnnualreviewTaskSupplierUserInfoVo vo = new AnnualreviewTaskSupplierUserInfoVo();
|
AnnualreviewTaskSupplierUserInfoVo vo = new AnnualreviewTaskSupplierUserInfoVo();
|
||||||
vo.setId(id);
|
vo.setId(id);
|
||||||
|
vo.setSupplierId(coscoAnnualreviewTaskSupplierUser.getSupplierId());
|
||||||
vo.setName(baseCategoryNameVo.getName());
|
vo.setName(baseCategoryNameVo.getName());
|
||||||
BaseCacheUser currentUser = TokenUtil.getCurrentUser();
|
BaseCacheUser currentUser = TokenUtil.getCurrentUser();
|
||||||
//TODO 待完善,部门名称
|
//TODO 待完善,部门名称
|
||||||
|
@ -47,6 +47,8 @@ public class AnnualreviewTaskSupplierUserInfoVo implements Serializable {
|
|||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
private Date endTime;
|
private Date endTime;
|
||||||
|
|
||||||
|
private String supplierId;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 打分项集合
|
* 打分项集合
|
||||||
|
@ -16,6 +16,9 @@ public class ScheduledTasksController {
|
|||||||
public void checkTask() {
|
public void checkTask() {
|
||||||
scheduledTasksService.checkTask();
|
scheduledTasksService.checkTask();
|
||||||
}
|
}
|
||||||
|
@RequestMapping("/closeTask")
|
||||||
|
public void close() {
|
||||||
|
scheduledTasksService.closeTask();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.chinaunicom.zyhy.ebtp.supplier.coscoEvaluate.dao;
|
package com.chinaunicom.zyhy.ebtp.supplier.coscoEvaluate.dao;
|
||||||
|
|
||||||
import com.chinaunicom.zyhy.ebtp.supplier.coscoEvaluate.entity.CoscoEvaluateTaskDeptWeight;
|
import com.chinaunicom.zyhy.ebtp.supplier.coscoEvaluate.entity.CoscoEvaluateTaskDeptWeight;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -72,5 +73,5 @@ public interface CoscoEvaluateTaskDeptWeightMapper {
|
|||||||
* @param taskIds
|
* @param taskIds
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<CoscoEvaluateTaskDeptWeight> selectByTaskId(List<String> taskIds);
|
List<CoscoEvaluateTaskDeptWeight> selectByTaskId(@Param("taskIds")List<String> taskIds);
|
||||||
}
|
}
|
||||||
|
@ -1,20 +1,24 @@
|
|||||||
package com.chinaunicom.zyhy.ebtp.supplier.coscoEvaluate.service.impl;
|
package com.chinaunicom.zyhy.ebtp.supplier.coscoEvaluate.service.impl;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.chinaunicom.zyhy.ebtp.supplier.base.service.IUserService;
|
||||||
|
import com.chinaunicom.zyhy.ebtp.supplier.base.vo.SelectUserVo;
|
||||||
|
import com.chinaunicom.zyhy.ebtp.supplier.base.vo.UserVo;
|
||||||
import com.chinaunicom.zyhy.ebtp.supplier.coscoEvaluate.dao.*;
|
import com.chinaunicom.zyhy.ebtp.supplier.coscoEvaluate.dao.*;
|
||||||
import com.chinaunicom.zyhy.ebtp.supplier.coscoEvaluate.entity.*;
|
import com.chinaunicom.zyhy.ebtp.supplier.coscoEvaluate.entity.*;
|
||||||
import com.chinaunicom.zyhy.ebtp.supplier.coscoEvaluate.vo.*;
|
import com.chinaunicom.zyhy.ebtp.supplier.coscoEvaluate.service.ICoscoEvaluateTaskSupplierService;
|
||||||
|
import com.chinaunicom.zyhy.ebtp.supplier.coscoEvaluate.vo.SupplierDimensionVo;
|
||||||
|
import com.chinaunicom.zyhy.ebtp.supplier.coscoEvaluate.vo.TaskIndicatorBaseVo;
|
||||||
|
import com.chinaunicom.zyhy.ebtp.supplier.coscoEvaluate.vo.TaskIndicatorVo;
|
||||||
|
import com.chinaunicom.zyhy.ebtp.supplier.coscoEvaluate.vo.TaskSubIndicatorVo;
|
||||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.dao.mapper.CoscoSupplierBaseMapper;
|
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.dao.mapper.CoscoSupplierBaseMapper;
|
||||||
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.vo.BaseCategoryNameVo;
|
import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.vo.BaseCategoryNameVo;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.chinaunicom.zyhy.ebtp.supplier.coscoEvaluate.service.ICoscoEvaluateTaskSupplierService;
|
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 【供应商评价_评价任务关联供应商表】Service业务层处理
|
* 【供应商评价_评价任务关联供应商表】Service业务层处理
|
||||||
@ -36,6 +40,8 @@ public class CoscoEvaluateTaskSupplierServiceImpl implements ICoscoEvaluateTaskS
|
|||||||
private CoscoEvaluateScoringResultMapper coscoEvaluateScoringResultMapper;
|
private CoscoEvaluateScoringResultMapper coscoEvaluateScoringResultMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private CoscoEvaluateTemplateIndicatorNdMapper coscoEvaluateTemplateIndicatorNdMapper;
|
private CoscoEvaluateTemplateIndicatorNdMapper coscoEvaluateTemplateIndicatorNdMapper;
|
||||||
|
@Autowired
|
||||||
|
private IUserService userService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询【供应商评价_评价任务关联供应商表】
|
* 查询【供应商评价_评价任务关联供应商表】
|
||||||
@ -116,9 +122,19 @@ public class CoscoEvaluateTaskSupplierServiceImpl implements ICoscoEvaluateTaskS
|
|||||||
IPage<SupplierDimensionVo> p = new Page<>(vo.getBasePageRequest().getPageNo(),
|
IPage<SupplierDimensionVo> p = new Page<>(vo.getBasePageRequest().getPageNo(),
|
||||||
vo.getBasePageRequest().getPageSize());
|
vo.getBasePageRequest().getPageSize());
|
||||||
IPage<SupplierDimensionVo> supplierDimensionVoIPage = coscoEvaluateTaskSupplierMapper.selectSupplierDimensionPage(p, vo);
|
IPage<SupplierDimensionVo> supplierDimensionVoIPage = coscoEvaluateTaskSupplierMapper.selectSupplierDimensionPage(p, vo);
|
||||||
|
List<UserVo> user = userService.getUser(new SelectUserVo());
|
||||||
|
Map<String ,UserVo> map = new HashMap<>();
|
||||||
|
user.forEach(userVo -> {
|
||||||
|
map.put(userVo.getUserId(), userVo);
|
||||||
|
});
|
||||||
|
|
||||||
List<String> deptIds = new ArrayList<>();
|
List<String> deptIds = new ArrayList<>();
|
||||||
supplierDimensionVoIPage.getRecords().forEach(item -> {
|
supplierDimensionVoIPage.getRecords().forEach(item -> {
|
||||||
deptIds.add(item.getDeptId());
|
UserVo userVo = map.get(item.getUserId());
|
||||||
|
if(userVo!=null){
|
||||||
|
item.setUserName(userVo.getUserName());
|
||||||
|
item.setDeptName(userVo.getUserDept());
|
||||||
|
}
|
||||||
});
|
});
|
||||||
//根据部门id查询评价单位
|
//根据部门id查询评价单位
|
||||||
return supplierDimensionVoIPage;
|
return supplierDimensionVoIPage;
|
||||||
|
@ -19,12 +19,10 @@ import com.chinaunicom.zyhy.ebtp.supplier.coscosupplier.entity.CoscoMessage;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@ -69,6 +67,7 @@ public class ScheduledTasksServiceImpl implements ScheduledTasksService {
|
|||||||
*/
|
*/
|
||||||
@Scheduled(cron = "0 0 2 * * ?")
|
@Scheduled(cron = "0 0 2 * * ?")
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void closeTask() {
|
public void closeTask() {
|
||||||
//查询小于当前时间 未关闭任务
|
//查询小于当前时间 未关闭任务
|
||||||
//获取当前时间指标信息
|
//获取当前时间指标信息
|
||||||
@ -100,7 +99,10 @@ public class ScheduledTasksServiceImpl implements ScheduledTasksService {
|
|||||||
//获取人员信息
|
//获取人员信息
|
||||||
List<UserVo> user = userService.getUser(new SelectUserVo());
|
List<UserVo> user = userService.getUser(new SelectUserVo());
|
||||||
//给人员添加部门信息
|
//给人员添加部门信息
|
||||||
Map<String, String> userMap = user.stream().collect(Collectors.toMap(UserVo::getUserId, UserVo::getUserDeptId));
|
Map<String, String> userMap=new HashMap<>();
|
||||||
|
user.forEach(userVo -> {
|
||||||
|
System.out.println(userVo.getUserId());
|
||||||
|
userMap.put(userVo.getUserId(), userVo.getUserDeptId());});
|
||||||
calculateAndObtainScoresVos.forEach(vos -> {
|
calculateAndObtainScoresVos.forEach(vos -> {
|
||||||
vos.setDeptId(userMap.get(vos.getUserId()));
|
vos.setDeptId(userMap.get(vos.getUserId()));
|
||||||
});
|
});
|
||||||
|
@ -65,6 +65,10 @@ public class SupplierDimensionVo implements Serializable {
|
|||||||
* 人员id
|
* 人员id
|
||||||
*/
|
*/
|
||||||
private String userId;
|
private String userId;
|
||||||
|
/**
|
||||||
|
* 人员名称
|
||||||
|
*/
|
||||||
|
private String userName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 任务id
|
* 任务id
|
||||||
@ -78,10 +82,11 @@ public class SupplierDimensionVo implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 分数
|
* 分数
|
||||||
*/
|
*/
|
||||||
private String suscore;
|
private Integer suScore;
|
||||||
|
|
||||||
private String categoryName;
|
private String categoryName;
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "分页对象信息")
|
@ApiModelProperty(value = "分页对象信息")
|
||||||
private BasePageRequest basePageRequest;
|
private BasePageRequest basePageRequest;
|
||||||
}
|
}
|
||||||
|
@ -46,6 +46,8 @@ public class SupplierAnnualReviewStatisticsVo {
|
|||||||
*/
|
*/
|
||||||
@ExcelProperty("评价年度")
|
@ExcelProperty("评价年度")
|
||||||
private String annualreviewYear;
|
private String annualreviewYear;
|
||||||
|
|
||||||
|
private String supplierId;
|
||||||
/**
|
/**
|
||||||
* 评价结果
|
* 评价结果
|
||||||
*/
|
*/
|
||||||
|
@ -43,6 +43,8 @@ public class SupplierExitStatisticsVo {
|
|||||||
@ExcelProperty("退出时间")
|
@ExcelProperty("退出时间")
|
||||||
private String applyTime;
|
private String applyTime;
|
||||||
|
|
||||||
|
private String supplierId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "分页对象信息")
|
@ApiModelProperty(value = "分页对象信息")
|
||||||
private BasePageRequest basePageRequest;
|
private BasePageRequest basePageRequest;
|
||||||
}
|
}
|
||||||
|
@ -58,6 +58,8 @@ public class SupplierQualificationExpireVo {
|
|||||||
@ExcelProperty("分类名称")
|
@ExcelProperty("分类名称")
|
||||||
private String categoryName;
|
private String categoryName;
|
||||||
|
|
||||||
|
private String supplierId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "分页对象信息")
|
@ApiModelProperty(value = "分页对象信息")
|
||||||
private BasePageRequest basePageRequest;
|
private BasePageRequest basePageRequest;
|
||||||
}
|
}
|
||||||
|
@ -237,6 +237,7 @@
|
|||||||
select
|
select
|
||||||
|
|
||||||
csb.name supplierName,
|
csb.name supplierName,
|
||||||
|
csb.id as supplierId,
|
||||||
case when csb.supplier_type = 'ovs' then '境外'
|
case when csb.supplier_type = 'ovs' then '境外'
|
||||||
when csb.supplier_type = 'ovs' then '境内'
|
when csb.supplier_type = 'ovs' then '境内'
|
||||||
else '境内' end as area ,
|
else '境内' end as area ,
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
SELECT
|
SELECT
|
||||||
catsu.id,
|
catsu.id,
|
||||||
csb.NAME,
|
csb.NAME,
|
||||||
|
csb.id as supplierId,
|
||||||
cat.dept_id as deptId,
|
cat.dept_id as deptId,
|
||||||
cat.annualreview_theme,
|
cat.annualreview_theme,
|
||||||
'单位' AS deptName,
|
'单位' AS deptName,
|
||||||
|
@ -192,7 +192,7 @@
|
|||||||
|
|
||||||
<select id="selectByTaskIds" parameterType="list"
|
<select id="selectByTaskIds" parameterType="list"
|
||||||
resultType="com.chinaunicom.zyhy.ebtp.supplier.coscoEvaluate.vo.CalculateAndObtainScoresVo">
|
resultType="com.chinaunicom.zyhy.ebtp.supplier.coscoEvaluate.vo.CalculateAndObtainScoresVo">
|
||||||
select cetsu.user_id as userId, ces.score, ces.indicator_nd_id as indicatorNdId, '1' as dept_id as deptId,
|
select cetsu.user_id as userId, ces.score, ces.indicator_nd_id as indicatorNdId, '1' as deptId,
|
||||||
cets.supplier_id as supplierId,cetsu.evaluate_task_id as evaluateTaskId
|
cets.supplier_id as supplierId,cetsu.evaluate_task_id as evaluateTaskId
|
||||||
from cosco_evaluate_scoring ces
|
from cosco_evaluate_scoring ces
|
||||||
join cosco_evaluate_task_supplier_user cetsu
|
join cosco_evaluate_task_supplier_user cetsu
|
||||||
|
@ -389,6 +389,7 @@
|
|||||||
</if>
|
</if>
|
||||||
|
|
||||||
</where>
|
</where>
|
||||||
|
group by cet.id
|
||||||
order by cet.create_time desc
|
order by cet.create_time desc
|
||||||
</select>
|
</select>
|
||||||
<select id="selectMyPage"
|
<select id="selectMyPage"
|
||||||
|
@ -281,9 +281,11 @@
|
|||||||
SELECT
|
SELECT
|
||||||
cetsu.id,
|
cetsu.id,
|
||||||
csb.`name`,
|
csb.`name`,
|
||||||
|
csb.id as supplierId,
|
||||||
cet.evaluate_theme evaluateTheme,
|
cet.evaluate_theme evaluateTheme,
|
||||||
cet.start_time startTime,
|
cet.start_time startTime,
|
||||||
cet.end_time endTime,
|
cet.end_time endTime,
|
||||||
|
cetsu.user_id as userId,
|
||||||
case when cc.category_name is null then '未指定'
|
case when cc.category_name is null then '未指定'
|
||||||
else cc.category_name end as categoryName,
|
else cc.category_name end as categoryName,
|
||||||
cet.STATUS ,
|
cet.STATUS ,
|
||||||
@ -295,11 +297,12 @@
|
|||||||
when cet.status =2 then '已结束' end as statusName,
|
when cet.status =2 then '已结束' end as statusName,
|
||||||
case when cetsu.review_status =0 then '未提交'
|
case when cetsu.review_status =0 then '未提交'
|
||||||
when cetsu.review_status=1 then '已提交' end as reviewStatusName,
|
when cetsu.review_status=1 then '已提交' end as reviewStatusName,
|
||||||
(select sum(score)
|
IFNULL((
|
||||||
from cosco_evaluate_scoring where del_flag='normal'
|
SELECT SUM(score)
|
||||||
and evaluate_task_supplier_user_id=cetsu.id)
|
FROM cosco_evaluate_scoring
|
||||||
as suscore
|
WHERE del_flag='normal'
|
||||||
|
AND evaluate_task_supplier_user_id=cetsu.id
|
||||||
|
), 0) AS suScore
|
||||||
FROM
|
FROM
|
||||||
cosco_evaluate_task_supplier_user cetsu
|
cosco_evaluate_task_supplier_user cetsu
|
||||||
LEFT JOIN cosco_evaluate_task cet ON cetsu.evaluate_task_id = cet.id
|
LEFT JOIN cosco_evaluate_task cet ON cetsu.evaluate_task_id = cet.id
|
||||||
|
@ -265,6 +265,7 @@
|
|||||||
csq.authority,
|
csq.authority,
|
||||||
csq.term_of_validity,
|
csq.term_of_validity,
|
||||||
csb.NAME supplierName,
|
csb.NAME supplierName,
|
||||||
|
csb.id as supplierId,
|
||||||
CASE
|
CASE
|
||||||
|
|
||||||
WHEN csb.supplier_type = 'ovs' THEN
|
WHEN csb.supplier_type = 'ovs' THEN
|
||||||
|
@ -232,6 +232,7 @@
|
|||||||
<select id="getSupplierExitStatistics" resultType="com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierExitStatisticsVo" parameterType="map">
|
<select id="getSupplierExitStatistics" resultType="com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierExitStatisticsVo" parameterType="map">
|
||||||
select
|
select
|
||||||
csb.name supplierName,
|
csb.name supplierName,
|
||||||
|
csb.id as supplierId,
|
||||||
case when csb.supplier_type = 'ovs' then '境外'
|
case when csb.supplier_type = 'ovs' then '境外'
|
||||||
when csb.supplier_type = 'ovs' then '境内'
|
when csb.supplier_type = 'ovs' then '境内'
|
||||||
else '境内' end as area ,
|
else '境内' end as area ,
|
||||||
|
Reference in New Issue
Block a user