|
@@ -4,12 +4,10 @@ import cn.com.ctop.common.module.annotation.AutoLog;
|
|
import cn.com.ctop.common.module.constant.CtopRoleCodeConstant;
|
|
import cn.com.ctop.common.module.constant.CtopRoleCodeConstant;
|
|
import cn.com.ctop.common.module.entity.MaterialInfo;
|
|
import cn.com.ctop.common.module.entity.MaterialInfo;
|
|
import cn.com.ctop.common.module.entity.Project;
|
|
import cn.com.ctop.common.module.entity.Project;
|
|
|
|
+import cn.com.ctop.common.module.entity.SupplierList;
|
|
import cn.com.ctop.common.module.entity.UserAllocation;
|
|
import cn.com.ctop.common.module.entity.UserAllocation;
|
|
import cn.com.ctop.common.module.mapper.ProjectMapper;
|
|
import cn.com.ctop.common.module.mapper.ProjectMapper;
|
|
-import cn.com.ctop.common.module.service.IMaterialInfoService;
|
|
|
|
-import cn.com.ctop.common.module.service.IProjectService;
|
|
|
|
-import cn.com.ctop.common.module.service.ISysRoleService;
|
|
|
|
-import cn.com.ctop.common.module.service.IUserAllocationService;
|
|
|
|
|
|
+import cn.com.ctop.common.module.service.*;
|
|
import cn.com.ctop.common.module.utils.Check;
|
|
import cn.com.ctop.common.module.utils.Check;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
@@ -156,6 +154,8 @@ public class ProjectController {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private ISysCategoryService sysCategoryService;
|
|
private ISysCategoryService sysCategoryService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private ISupplierListService supplierListService;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 分页列表查询
|
|
* 分页列表查询
|
|
@@ -202,6 +202,23 @@ public class ProjectController {
|
|
queryWrapper.like("project_name", projectName);
|
|
queryWrapper.like("project_name", projectName);
|
|
}
|
|
}
|
|
IPage<Project> pageList = projectService.page(page, queryWrapper);
|
|
IPage<Project> pageList = projectService.page(page, queryWrapper);
|
|
|
|
+ List<Project> records = pageList.getRecords();
|
|
|
|
+ if (!Check.isNull(records)) {
|
|
|
|
+ for (Project project1 : records) {
|
|
|
|
+ if (!Check.isNull(project1.getSupplierCode())) {
|
|
|
|
+ QueryWrapper<SupplierList> supplierListQueryWrapper = new QueryWrapper<>();
|
|
|
|
+ supplierListQueryWrapper.eq("supplier_code", project1.getSupplierCode());
|
|
|
|
+ supplierListQueryWrapper.last("limit 1");
|
|
|
|
+ SupplierList one = supplierListService.getOne(supplierListQueryWrapper);
|
|
|
|
+ if (!Check.isNull(one)) {
|
|
|
|
+ project1.setSupplierName(one.getSupplierName());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
result.setSuccess(true);
|
|
result.setSuccess(true);
|
|
result.setResult(pageList);
|
|
result.setResult(pageList);
|
|
return result;
|
|
return result;
|