认证清单-修改历史-处理展示数据。
This commit is contained in:
+3
-2
@@ -55,7 +55,8 @@ public class ProjectCertificationInventoryLogEOController extends JeroController
|
|||||||
QueryWrapper<ProjectCertificationInventoryLogEO> queryWrapper = QueryGenerator.initQueryWrapper(projectCertificationInventoryLogEO, req.getParameterMap());
|
QueryWrapper<ProjectCertificationInventoryLogEO> queryWrapper = QueryGenerator.initQueryWrapper(projectCertificationInventoryLogEO, req.getParameterMap());
|
||||||
Page<ProjectCertificationInventoryLogEO> page = new Page<ProjectCertificationInventoryLogEO>(pageNo, pageSize);
|
Page<ProjectCertificationInventoryLogEO> page = new Page<ProjectCertificationInventoryLogEO>(pageNo, pageSize);
|
||||||
queryWrapper.orderByDesc("create_time");
|
queryWrapper.orderByDesc("create_time");
|
||||||
IPage<ProjectCertificationInventoryLogEO> pageList = projectCertificationInventoryLogEOService.page(page, queryWrapper);
|
IPage<ProjectCertificationInventoryLogEO> pageList = this.projectCertificationInventoryLogEOService.page(page, queryWrapper);
|
||||||
|
this.projectCertificationInventoryLogEOService.disposeData(pageList.getRecords(),projectCertificationInventoryLogEO.getCut());
|
||||||
return Result.OK(pageList);
|
return Result.OK(pageList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -68,7 +69,7 @@ public class ProjectCertificationInventoryLogEOController extends JeroController
|
|||||||
@ApiOperation(value="项目库-认证清单-修改历史表-列表查询", notes="项目库-认证清单-修改历史表-列表查询")
|
@ApiOperation(value="项目库-认证清单-修改历史表-列表查询", notes="项目库-认证清单-修改历史表-列表查询")
|
||||||
@GetMapping(value = "/list")
|
@GetMapping(value = "/list")
|
||||||
public Result<List<ProjectCertificationInventoryLogEO>> queryList(ProjectCertificationInventoryLogEO projectCertificationInventoryLogEO,HttpServletRequest req) {
|
public Result<List<ProjectCertificationInventoryLogEO>> queryList(ProjectCertificationInventoryLogEO projectCertificationInventoryLogEO,HttpServletRequest req) {
|
||||||
List<ProjectCertificationInventoryLogEO> list = projectCertificationInventoryLogEOService.queryList(projectCertificationInventoryLogEO,req);
|
List<ProjectCertificationInventoryLogEO> list = this.projectCertificationInventoryLogEOService.queryList(projectCertificationInventoryLogEO,req);
|
||||||
return Result.OK(list);
|
return Result.OK(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+7
@@ -66,4 +66,11 @@ public interface IProjectCertificationInventoryLogEOService extends IService<Pro
|
|||||||
* @param projectCertificationInventoryLogEOList
|
* @param projectCertificationInventoryLogEOList
|
||||||
*/
|
*/
|
||||||
void insertBatch(List<ProjectCertificationInventoryLogEO> projectCertificationInventoryLogEOList);
|
void insertBatch(List<ProjectCertificationInventoryLogEO> projectCertificationInventoryLogEOList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理数据
|
||||||
|
* @param datas
|
||||||
|
* @param cut
|
||||||
|
*/
|
||||||
|
void disposeData(List<ProjectCertificationInventoryLogEO> datas, String cut);
|
||||||
}
|
}
|
||||||
|
|||||||
+17
@@ -1,10 +1,13 @@
|
|||||||
package com.jero.modules.project.service.impl;
|
package com.jero.modules.project.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.jero.common.constant.enums.CutEnum;
|
||||||
import com.jero.common.system.query.QueryGenerator;
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
import com.jero.modules.project.entity.ProjectCertificationInventoryLogEO;
|
import com.jero.modules.project.entity.ProjectCertificationInventoryLogEO;
|
||||||
import com.jero.modules.project.mapper.ProjectCertificationInventoryLogEOMapper;
|
import com.jero.modules.project.mapper.ProjectCertificationInventoryLogEOMapper;
|
||||||
import com.jero.modules.project.service.IProjectCertificationInventoryLogEOService;
|
import com.jero.modules.project.service.IProjectCertificationInventoryLogEOService;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@@ -91,6 +94,7 @@ public class ProjectCertificationInventoryLogEOServiceImpl extends ServiceImpl<P
|
|||||||
QueryWrapper<ProjectCertificationInventoryLogEO> queryWrapper = QueryGenerator.initQueryWrapper(projectCertificationInventoryLogEO, req.getParameterMap());
|
QueryWrapper<ProjectCertificationInventoryLogEO> queryWrapper = QueryGenerator.initQueryWrapper(projectCertificationInventoryLogEO, req.getParameterMap());
|
||||||
queryWrapper.orderByDesc("create_time");
|
queryWrapper.orderByDesc("create_time");
|
||||||
List<ProjectCertificationInventoryLogEO> projectCertificationInventoryLogEOList = this.list(queryWrapper);
|
List<ProjectCertificationInventoryLogEO> projectCertificationInventoryLogEOList = this.list(queryWrapper);
|
||||||
|
this.disposeData(projectCertificationInventoryLogEOList,projectCertificationInventoryLogEO.getCut());
|
||||||
return projectCertificationInventoryLogEOList;
|
return projectCertificationInventoryLogEOList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,4 +102,17 @@ public class ProjectCertificationInventoryLogEOServiceImpl extends ServiceImpl<P
|
|||||||
public void insertBatch(List<ProjectCertificationInventoryLogEO> projectCertificationInventoryLogEOList) {
|
public void insertBatch(List<ProjectCertificationInventoryLogEO> projectCertificationInventoryLogEOList) {
|
||||||
this.saveBatch(projectCertificationInventoryLogEOList);
|
this.saveBatch(projectCertificationInventoryLogEOList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void disposeData(List<ProjectCertificationInventoryLogEO> datas, String cut) {
|
||||||
|
if(CollectionUtils.isNotEmpty(datas)){
|
||||||
|
for (ProjectCertificationInventoryLogEO data : datas) {
|
||||||
|
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
|
||||||
|
data.setContent(data.getContentCn());
|
||||||
|
}else {
|
||||||
|
data.setContent(data.getContentEn());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user