|
|
@ -70,7 +70,7 @@ public class CountJobMainController { |
|
|
|
public CommonResult<PageResult<CountJobMainRespVO>> getCountJobMainSenior(@Valid @RequestBody CustomConditions conditions) { |
|
|
|
PageResult<CountJobMainDO> pageResult = countJobMainService.getCountJobMainSenior(conditions); |
|
|
|
PageResult<CountJobMainRespVO> result = CountJobMainConvert.INSTANCE.convertPage(pageResult); |
|
|
|
for(CountJobMainRespVO vo : result.getList()) { |
|
|
|
for (CountJobMainRespVO vo : result.getList()) { |
|
|
|
AdminUserRespDTO user = userApi.getUser(Long.valueOf(vo.getCreator())); |
|
|
|
//后端创建个字段作为前端展示的虚拟字段
|
|
|
|
vo.setCreator(user.getNickname()); |
|
|
@ -107,14 +107,15 @@ public class CountJobMainController { |
|
|
|
public CommonResult<CountJobMainRespVO> getCountJobById(@RequestParam("id") Long id) { |
|
|
|
CountJobMainDO countJobMain = countJobMainService.getCountJobMain(id); |
|
|
|
CountJobMainRespVO result = CountJobMainConvert.INSTANCE.convert(countJobMain); |
|
|
|
if(result==null) { |
|
|
|
return success(result); |
|
|
|
}; |
|
|
|
if (result == null) { |
|
|
|
return success(null); |
|
|
|
} |
|
|
|
; |
|
|
|
CountJobDetailExportReqVO reqVO = new CountJobDetailExportReqVO(); |
|
|
|
reqVO.setMasterId(result.getId()); |
|
|
|
List<CountJobDetailDO> countJobDetailList = countJobDetailService.getCountJobDetailList(reqVO); |
|
|
|
List<CountJobDetailExcelVO> vos = CountJobDetailConvert.INSTANCE.convertList02(countJobDetailList); |
|
|
|
result.setSubList(vos); |
|
|
|
List<CountJobDetailDO> countJobDetailList = countJobDetailService.selectList(result.getId()); |
|
|
|
List<CountJobDetailRespVO> countJobDetailRespVOList = CountJobDetailConvert.INSTANCE.convertList(countJobDetailList); |
|
|
|
result.setSubList(countJobDetailRespVOList); |
|
|
|
return success(result); |
|
|
|
} |
|
|
|
|
|
|
@ -122,11 +123,11 @@ public class CountJobMainController { |
|
|
|
@Operation(summary = "APP获得盘点任务数量根据任务状态") |
|
|
|
@Parameter(name = "types", description = "类型数组", required = false, example = "\"types\":[\"1\",\"2\"]") |
|
|
|
@PreAuthorize("@ss.hasPermission('wms:count-job-main:query')") |
|
|
|
public CommonResult<Map<String,Integer>> getCountByStatus(@RequestBody Map<String, List<String>> map) { |
|
|
|
public CommonResult<Map<String, Integer>> getCountByStatus(@RequestBody Map<String, List<String>> map) { |
|
|
|
List<String> list = new ArrayList<>(); |
|
|
|
if(map==null||map.get("types")==null|| StringUtil.isEmpty(map.get("types").toString())){ |
|
|
|
if (map == null || map.get("types") == null || StringUtil.isEmpty(map.get("types").toString())) { |
|
|
|
list.add("1");//默认不传为执行中的
|
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
list = map.get("types"); |
|
|
|
} |
|
|
|
Map<String, Integer> countByStatus = countJobMainService.getCountByStatus(list); |
|
|
@ -150,9 +151,9 @@ public class CountJobMainController { |
|
|
|
mapDropDown.put(45, uom); |
|
|
|
List<CountJobMainExcelVO> resultList = new ArrayList<>(); |
|
|
|
// 导出
|
|
|
|
for(CountJobMainDO mainDO : list) { |
|
|
|
for (CountJobMainDO mainDO : list) { |
|
|
|
List<CountJobDetailDO> subList = countJobDetailService.selectList(mainDO.getId()); |
|
|
|
for(CountJobDetailDO detailDO : subList) { |
|
|
|
for (CountJobDetailDO detailDO : subList) { |
|
|
|
CountJobMainExcelVO vo = CountJobMainConvert.INSTANCE.convert(mainDO, detailDO); |
|
|
|
AdminUserRespDTO user = userApi.getUser(Long.valueOf(vo.getCreator())); |
|
|
|
//后端创建个字段作为前端展示的虚拟字段
|
|
|
|