修改错误问题
This commit is contained in:
@ -89,4 +89,11 @@ public interface CoscoCategoryLibraryContainMapper extends IBaseMapper<CoscoCate
|
||||
* @return
|
||||
*/
|
||||
List<String> selectCoscoCateGoryIdByLibraryId(String libraryId);
|
||||
|
||||
/**
|
||||
* 获取品类库添加供应商id
|
||||
* @param categoryLibraryId
|
||||
* @return
|
||||
*/
|
||||
List<String> selectSupplierIdByLibraryId(Long categoryLibraryId);
|
||||
}
|
||||
|
@ -140,10 +140,19 @@ public class CoscoEvaluateTaskServiceImpl implements ICoscoEvaluateTaskService {
|
||||
strings.forEach(userId -> {
|
||||
TaskUserVo vo = new TaskUserVo();
|
||||
vo.setId(userId);
|
||||
vo.setName(userMap.get(userId).getUserName());
|
||||
vo.setUserDept(userMap.get(userId).getUserDept());
|
||||
vo.setUserDeptId(userMap.get(userId).getUserDeptId());
|
||||
UserVo userVo = userMap.get(userId);
|
||||
if(userVo==null){
|
||||
vo.setName(userId);
|
||||
vo.setUserDept(userId);
|
||||
vo.setUserDeptId(userId);
|
||||
vo.setIsSelected(true);
|
||||
}else{
|
||||
vo.setName(userVo.getUserName());
|
||||
vo.setUserDept(userVo.getUserDept());
|
||||
vo.setUserDeptId(userVo.getUserDeptId());
|
||||
vo.setIsSelected(true);
|
||||
}
|
||||
|
||||
taskUserVos.add(vo);
|
||||
});
|
||||
blackSupplierVo.setUserList(taskUserVos);
|
||||
@ -169,7 +178,16 @@ public class CoscoEvaluateTaskServiceImpl implements ICoscoEvaluateTaskService {
|
||||
Map<String, UserVo> userMap = new HashMap<>();
|
||||
suUser.keySet().forEach(usa -> {
|
||||
UserVo userVo = map.get(usa);
|
||||
if(userVo==null){
|
||||
userVo=new UserVo();
|
||||
userVo.setUserId(usa);
|
||||
userVo.setUserName(usa);
|
||||
userVo.setUserDept("无");
|
||||
userVo.setUserDeptId("无");
|
||||
userVo.setIsSelected(true);
|
||||
}else{
|
||||
userVo.setIsSelected(true);
|
||||
}
|
||||
userMap.put(usa, userVo);
|
||||
});
|
||||
return userMap.values().stream().collect(Collectors.toList());
|
||||
|
@ -11,6 +11,7 @@ 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.CoscoCategoryLibraryContainMapper;
|
||||
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.*;
|
||||
@ -90,6 +91,9 @@ public class CoscoSupplierBaseServiceImpl implements ICoscoSupplierBaseService {
|
||||
@Autowired
|
||||
private CoscoAccessSupplierCategoryMapper coscoAccessSupplierCategoryMapper;
|
||||
|
||||
@Autowired
|
||||
private CoscoCategoryLibraryContainMapper coscoCategoryLibraryContainMapper;
|
||||
|
||||
@Override
|
||||
public IPage<CoscoSupplierBase> selectWzrPageList(CoscoSupplierBase coscoSupplierBase) {
|
||||
List<String> deptIds = new ArrayList<>();
|
||||
@ -332,8 +336,14 @@ public class CoscoSupplierBaseServiceImpl implements ICoscoSupplierBaseService {
|
||||
|
||||
@Override
|
||||
public IPage<SupplierPageVo> getSupplierPage(SupplierPageVo supplierPageVo) {
|
||||
if(supplierPageVo.getCategoryLibraryId()!=null){
|
||||
List<String> supplierIds=coscoCategoryLibraryContainMapper.selectSupplierIdByLibraryId(supplierPageVo.getCategoryLibraryId());
|
||||
if(supplierIds.isEmpty()){
|
||||
return new Page<>();
|
||||
}
|
||||
supplierPageVo.setLibrarySupplierIdList(supplierIds);
|
||||
}
|
||||
IPage<CoscoSupplierBase> page = new Page<>(supplierPageVo.getBasePageRequest().getPageNo(), supplierPageVo.getBasePageRequest().getPageSize());
|
||||
|
||||
return coscoSupplierBaseMapper.getSupplierPage(page ,supplierPageVo);
|
||||
}
|
||||
|
||||
|
@ -10,13 +10,19 @@ import java.util.List;
|
||||
@Data
|
||||
public class SupplierPageVo {
|
||||
|
||||
/** 供应商ID */
|
||||
/**
|
||||
* 供应商ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/** 供应商名称 */
|
||||
/**
|
||||
* 供应商名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/** 部门ID */
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
private String deptId;
|
||||
|
||||
/**
|
||||
@ -28,20 +34,38 @@ public class SupplierPageVo {
|
||||
*/
|
||||
private String companyName;
|
||||
|
||||
/** 准入时间 */
|
||||
/**
|
||||
* 准入时间
|
||||
*/
|
||||
private Date admissionTime;
|
||||
|
||||
/** 所属品类(多个以逗号分隔) */
|
||||
/**
|
||||
* 所属品类(多个以逗号分隔)
|
||||
*/
|
||||
private String categoryName;
|
||||
|
||||
/** 最新评价等级 */
|
||||
/**
|
||||
* 最新评价等级
|
||||
*/
|
||||
private String levelName;
|
||||
|
||||
/** 最新评价时间 */
|
||||
/**
|
||||
* 最新评价时间
|
||||
*/
|
||||
private Date evaluationTime;
|
||||
/**
|
||||
* 获取品类库id
|
||||
*/
|
||||
private Long categoryLibraryId;
|
||||
/**
|
||||
* 获取品类库供应商id集合
|
||||
*/
|
||||
private List<String> librarySupplierIdList;
|
||||
|
||||
|
||||
/** 最新评价时间 */
|
||||
/**
|
||||
* 最新评价时间
|
||||
*/
|
||||
private String supplierType;
|
||||
/**
|
||||
* 品类id
|
||||
|
@ -115,4 +115,10 @@
|
||||
where cclc.category_library_id = #{libraryId} and cc.type=1
|
||||
</select>
|
||||
|
||||
<select id="selectSupplierIdByLibraryId" parameterType="string" resultType="string">
|
||||
select cclc.supplier_id
|
||||
from cosco_category_library_contain cclc
|
||||
where cclc.category_library_id = #{libraryId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
@ -958,13 +958,6 @@
|
||||
AND tsk2.approve_status = 1
|
||||
AND ts2.del_flag = 'normal'
|
||||
AND tsk2.del_flag = 'normal'
|
||||
-- 添加当前搜索部门上下所有id
|
||||
<if test="vo.deptList != null and vo.deptList.size > 0">
|
||||
AND tsk2.dept_id IN
|
||||
<foreach item="dept" collection="vo.deptList" open="(" separator="," close=")">
|
||||
#{dept}
|
||||
</foreach>
|
||||
</if>
|
||||
)
|
||||
) ets ON ets.supplier_id = csb.id
|
||||
-- 黑名单排除
|
||||
@ -996,7 +989,18 @@
|
||||
<if test="vo.levelName!=null and vo.levelName!=''">
|
||||
and ets.level_name = #{vo.levelName}
|
||||
</if>
|
||||
|
||||
<if test="vo.librarySupplierIdList!=null and vo.librarySupplierIdList.size>0">
|
||||
and t.id IN
|
||||
<foreach item="id" collection="vo.librarySupplierIdList" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="vo.deptList != null and vo.deptList.size > 0">
|
||||
AND t.dept_id IN
|
||||
<foreach item="dept" collection="vo.deptList" open="(" separator="," close=")">
|
||||
#{dept}
|
||||
</foreach>
|
||||
</if>
|
||||
) t
|
||||
WHERE t.rn = 1
|
||||
|
||||
|
Reference in New Issue
Block a user