认证虚拟清单详情-查询处理数据回显。
This commit is contained in:
+4
-2
@@ -59,7 +59,8 @@ public class AuthDummyInventoryInfoEOController extends JeroController<AuthDummy
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<AuthDummyInventoryInfoEO> queryWrapper = QueryGenerator.initQueryWrapper(authDummyInventoryInfoEO, req.getParameterMap());
|
||||
Page<AuthDummyInventoryInfoEO> page = new Page<AuthDummyInventoryInfoEO>(pageNo, pageSize);
|
||||
IPage<AuthDummyInventoryInfoEO> pageList = authDummyInventoryInfoEOService.page(page, queryWrapper);
|
||||
IPage<AuthDummyInventoryInfoEO> pageList = this.authDummyInventoryInfoEOService.page(page, queryWrapper);
|
||||
this.authDummyInventoryInfoEOService.disposeData(pageList.getRecords(),authDummyInventoryInfoEO.getCut());
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
@@ -72,7 +73,8 @@ public class AuthDummyInventoryInfoEOController extends JeroController<AuthDummy
|
||||
@ApiOperation(value="认证虚拟清单详情表-列表查询", notes="认证虚拟清单详情表-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<AuthDummyInventoryInfoEO>> queryList(AuthDummyInventoryInfoEO authDummyInventoryInfoEO,HttpServletRequest req) {
|
||||
List<AuthDummyInventoryInfoEO> list = authDummyInventoryInfoEOService.queryList(authDummyInventoryInfoEO,req);
|
||||
List<AuthDummyInventoryInfoEO> list = this.authDummyInventoryInfoEOService.queryList(authDummyInventoryInfoEO,req);
|
||||
this.authDummyInventoryInfoEOService.disposeData(list,authDummyInventoryInfoEO.getCut());
|
||||
return Result.OK(authDummyInventoryInfoEO.getCut(),list);
|
||||
}
|
||||
|
||||
|
||||
+3
@@ -91,6 +91,9 @@ public class AuthDummyInventoryInfoEO implements Serializable {
|
||||
@Excel(name = "责任领域", width = 15)
|
||||
@ApiModelProperty(value = "责任领域")
|
||||
private java.lang.String dutyTerritory;
|
||||
@TableField(exist = false)
|
||||
// 责任领域名称
|
||||
private String dutyTerritoryName;
|
||||
|
||||
/**交付物*/
|
||||
@Excel(name = "交付物", width = 15)
|
||||
|
||||
+17
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.modules.authDummy.entity.AuthDummyInventoryInfoEO;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.modules.system.entity.SysCategory;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@@ -103,4 +104,20 @@ public interface IAuthDummyInventoryInfoEOService extends IService<AuthDummyInve
|
||||
* @param request
|
||||
*/
|
||||
void exportTemplate(AuthDummyInventoryInfoEO authDummyInventoryInfoEO, HttpServletResponse response, HttpServletRequest request);
|
||||
|
||||
/**
|
||||
* 处理数据
|
||||
* @param datas
|
||||
* @param cut
|
||||
*/
|
||||
void disposeData(List<AuthDummyInventoryInfoEO> datas, String cut);
|
||||
|
||||
/**
|
||||
* 获取责任领域名称
|
||||
* @param cut
|
||||
* @param categoryList
|
||||
* @param technologyTerritoryList
|
||||
* @return
|
||||
*/
|
||||
String getTreeName(String cut, List<SysCategory> categoryList, List<String> technologyTerritoryList);
|
||||
}
|
||||
|
||||
+45
@@ -28,10 +28,12 @@ import com.jero.modules.dummy.entity.DummyInventoryInfoEOEn;
|
||||
import com.jero.modules.dummy.service.impl.DummyLogEOServiceImpl;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.project.enums.ProjectInventoryFieldEnum;
|
||||
import com.jero.modules.split.common.FileUnZip;
|
||||
import com.jero.modules.system.entity.SysCategory;
|
||||
import com.jero.modules.system.entity.SysDictItem;
|
||||
import com.jero.modules.system.mapper.SysCategoryMapper;
|
||||
import com.jero.modules.system.service.ISysDictItemService;
|
||||
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
||||
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
@@ -114,6 +116,9 @@ public class AuthDummyInventoryInfoEOServiceImpl extends ServiceImpl<AuthDummyIn
|
||||
@Autowired
|
||||
private IBussDocumentLibraryEOService iBussDocumentLibraryEOService;
|
||||
|
||||
@Autowired
|
||||
private ISysDictItemService sysDictItemService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -1087,4 +1092,44 @@ public class AuthDummyInventoryInfoEOServiceImpl extends ServiceImpl<AuthDummyIn
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disposeData(List<AuthDummyInventoryInfoEO> datas, String cut) {
|
||||
if(CollectionUtils.isNotEmpty(datas)){
|
||||
List<SysCategory> categoryList = this.sysCategoryService.list();
|
||||
List<SysDictItem> sysDictItems = this.sysDictItemServiceImpl.getBaseMapper().selectItemsAll();
|
||||
|
||||
for (AuthDummyInventoryInfoEO data : datas) {
|
||||
if(StringUtils.isNotEmpty(data.getDeliverableType())){
|
||||
String deliverableTypeName = this.getTreeName(cut, categoryList, Arrays.asList(data.getDeliverableType().split(",")));
|
||||
data.setDeliverableTypeName(deliverableTypeName);
|
||||
}
|
||||
if(StringUtils.isNotEmpty(data.getDutyTerritory())){
|
||||
String dutyTerritoryName = this.sysDictItemService.disposeShowDictItemValue(sysDictItems,data.getDutyTerritory(),cut, ProjectInventoryFieldEnum.DUTY_TERRITORY.getValue());
|
||||
data.setDutyTerritoryName(dutyTerritoryName);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTreeName(String cut, List<SysCategory> categoryList, List<String> technologyTerritoryList) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (String technologyTerritory : technologyTerritoryList) {
|
||||
List<SysCategory> collect = categoryList.stream().filter(e -> technologyTerritory.equals(e.getId())).collect(Collectors.toList());
|
||||
if(collect.size() != 0){
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
sb.append(collect.get(0).getName() + ",");
|
||||
} else {
|
||||
sb.append(collect.get(0).getEnName()+ ",");
|
||||
}
|
||||
}
|
||||
}
|
||||
String technologyTerritoryName = "";
|
||||
if (StringUtils.isNotBlank(sb)) {
|
||||
technologyTerritoryName = sb.substring(0, sb.length() - 1);
|
||||
}
|
||||
return technologyTerritoryName;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user