Merge remote-tracking branch '99/dev' into 99dev
This commit is contained in:
@ -16,6 +16,8 @@ import com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierQualificatio
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@ -97,7 +99,19 @@ public class DataStatisticeServiceImpl implements DataStatisticeService {
|
||||
public IPage<SupplierExitStatisticsVo> getSupplierExitStatistics(SupplierExitStatisticsVo vo) {
|
||||
IPage<SupplierExitStatisticsVo> p = new Page<>(vo.getBasePageRequest().getPageNo(),
|
||||
vo.getBasePageRequest().getPageSize());
|
||||
return coscoSupplierexitMapper.getSupplierExitStatistics(p, vo);
|
||||
IPage<SupplierExitStatisticsVo> supplierExitStatistics = coscoSupplierexitMapper.getSupplierExitStatistics(p, vo);
|
||||
supplierExitStatistics.getRecords().forEach(item -> {
|
||||
getCateName(item);
|
||||
});
|
||||
return supplierExitStatistics;
|
||||
}
|
||||
|
||||
private void getCateName(SupplierExitStatisticsVo item) {
|
||||
if(item.getCategoryIds()!=null && item.getCategoryIds().length()>0){
|
||||
String[] split = item.getCategoryIds().split(",");
|
||||
List<String> categoryNameListByIds = coscoCategoryService.getCategoryNameListByIds(new ArrayList<>(Arrays.asList(split)));
|
||||
item.setCategoryName(String.join(",", categoryNameListByIds));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -114,7 +128,15 @@ public class DataStatisticeServiceImpl implements DataStatisticeService {
|
||||
public IPage<SupplierQualificationExpireVo> getSupplierQualificationExpire(SupplierQualificationExpireVo vo) {
|
||||
IPage<SupplierQualificationExpireVo> p = new Page<>(vo.getBasePageRequest().getPageNo(),
|
||||
vo.getBasePageRequest().getPageSize());
|
||||
return coscoSupplierQualificationsMapper.getSupplierExitStatistics(p, vo);
|
||||
IPage<SupplierQualificationExpireVo> supplierExitStatistics = coscoSupplierQualificationsMapper.getSupplierExitStatistics(p, vo);
|
||||
supplierExitStatistics.getRecords().forEach(item -> {
|
||||
if(item.getCategoryIds()!=null && item.getCategoryIds().length()>0){
|
||||
String[] split = item.getCategoryIds().split(",");
|
||||
List<String> categoryNameListByIds = coscoCategoryService.getCategoryNameListByIds(new ArrayList<>(Arrays.asList(split)));
|
||||
item.setCategoryName(String.join(",", categoryNameListByIds));
|
||||
}
|
||||
});
|
||||
return supplierExitStatistics;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -45,6 +45,8 @@ public class SupplierExitStatisticsVo {
|
||||
|
||||
private String supplierId;
|
||||
|
||||
private String categoryIds;
|
||||
|
||||
@ApiModelProperty(value = "分页对象信息")
|
||||
private BasePageRequest basePageRequest;
|
||||
}
|
||||
|
@ -62,4 +62,6 @@ public class SupplierQualificationExpireVo {
|
||||
|
||||
@ApiModelProperty(value = "分页对象信息")
|
||||
private BasePageRequest basePageRequest;
|
||||
|
||||
private String categoryIds;
|
||||
}
|
||||
|
@ -184,7 +184,7 @@
|
||||
|
||||
<select id="selectPageList" resultType="com.chinaunicom.zyhy.ebtp.supplier.coscoCategory.vo.ListCoscoCategoryLibrarySupplierApplyVo">
|
||||
|
||||
select cclsa.id, ccl.name,max(dp.dic_name) AS area,cclsa.create_by as createBy ,
|
||||
select cclsa.id, ccl.name,ccl.area AS area,cclsa.create_by as createBy ,
|
||||
ccl.create_time as applyTime,cclsa.approve_status as approveStatus,ccl.dept_id as deptId,
|
||||
case when cclsa.approve_status=0 and cclsa.work_flow_id is null then '未开始'
|
||||
when cclsa.approve_status=0 and cclsa.work_flow_id is not null then '进行中'
|
||||
@ -203,7 +203,6 @@
|
||||
join cosco_category_library ccl on cclsa.category_library_id=ccl.id
|
||||
left join cosco_category_library_supplier ccls on ccls.category_library_supplier_apply_id=cclsa.id
|
||||
left join cosco_supplier_base csb on csb.id= ccls.supplier_id
|
||||
left join dict_project dp on ccl.area = dp.code and dp.parent_code='area'
|
||||
where cclsa.del_flag ='normal'
|
||||
<if test="vo.name!=null and vo.name!=''">
|
||||
and ccl.name like concat('%',#{vo.name},'%')
|
||||
|
@ -257,7 +257,8 @@
|
||||
ORDER BY
|
||||
csq.term_of_validity ASC
|
||||
</select>
|
||||
<select id="getSupplierExitStatistics" parameterType="map" resultType="com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierQualificationExpireVo">
|
||||
<select id="getSupplierExitStatistics" parameterType="map"
|
||||
resultType="com.chinaunicom.zyhy.ebtp.supplier.dataStatistics.vo.SupplierQualificationExpireVo">
|
||||
SELECT
|
||||
csq.authority,
|
||||
csq.term_of_validity,
|
||||
@ -275,14 +276,13 @@
|
||||
'准入部门' AS accessDept,
|
||||
(
|
||||
SELECT
|
||||
GROUP_CONCAT( DISTINCT cc.category_name SEPARATOR ', ' )
|
||||
GROUP_CONCAT( DISTINCT casc.category_id SEPARATOR ', ' )
|
||||
FROM
|
||||
cosco_access_supplier_category casc
|
||||
JOIN cosco_category cc ON cc.id = casc.category_id
|
||||
WHERE
|
||||
casc.del_flag = 'normal'
|
||||
AND casc.supplier_id = csb.id
|
||||
) AS categoryName
|
||||
) AS categoryIds
|
||||
FROM
|
||||
cosco_supplier_qualifications csq
|
||||
JOIN cosco_supplier_base csb ON csq.supplier_id = csb.id
|
||||
|
@ -251,11 +251,9 @@
|
||||
'退出部门' as accessDept,
|
||||
cse.create_by as applyUser,
|
||||
cse.update_time as applyTime,
|
||||
(select GROUP_CONCAT( DISTINCT cc.category_name SEPARATOR ', ' )
|
||||
(select GROUP_CONCAT( DISTINCT cssc.category_id SEPARATOR ', ' )
|
||||
from cosco_supplierexit_supplier_category cssc
|
||||
join cosco_category cc
|
||||
ON cc.id = cssc.category_id
|
||||
where cssc.supplier_id=csb.id and cssc.supplierexit_id=cse.id) as categoryName
|
||||
where cssc.supplier_id=csb.id and cssc.supplierexit_id=cse.id) as categoryIds
|
||||
from cosco_supplierexit cse
|
||||
join cosco_supplierexit_supplier css
|
||||
on cse.id= css.supplierexit_id
|
||||
|
Reference in New Issue
Block a user