|
|
@ -72,25 +72,6 @@ public class WtSpToolBasicServiceImpl extends ServiceImpl<WtSpToolBasicMapper, W |
|
|
|
toolBasicVO.setUserName(user.getData().getName()); |
|
|
|
toolBasicVO.setUserName(user.getData().getName()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// Map<String,Object> params = new HashMap<>();
|
|
|
|
|
|
|
|
// params.put("spBasicId",toolBasicEntity.getSpBasicId());
|
|
|
|
|
|
|
|
// params.put("warehouseId",toolBasicEntity.getWarehouseId());
|
|
|
|
|
|
|
|
// Integer result = spBasicService.selectTotal(params);
|
|
|
|
|
|
|
|
// if(null!=result){
|
|
|
|
|
|
|
|
// toolBasicVO.setUseAmount(result);
|
|
|
|
|
|
|
|
// }else{
|
|
|
|
|
|
|
|
// toolBasicVO.setUseAmount(0);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// WtSpTotalEntity spTotalEntity = spTotalMapper.selectByBasicId(params);
|
|
|
|
|
|
|
|
// toolBasicVO.setTotalAmount(spTotalEntity.getStock()+toolBasicVO.getUseAmount());
|
|
|
|
|
|
|
|
// toolBasicVO.setNotUseAmount(spTotalEntity.getStock().intValue());
|
|
|
|
|
|
|
|
// toolBasicVO.setWarehouseId(spTotalEntity.getWarehouseId());
|
|
|
|
|
|
|
|
// WtSpWarehouseEntity warehouseEntity = warehouseMapper.selectById(spTotalEntity.getWarehouseId());
|
|
|
|
|
|
|
|
// if (null != warehouseEntity) {
|
|
|
|
|
|
|
|
// toolBasicVO.setWarehouseName(warehouseEntity.getName());
|
|
|
|
|
|
|
|
// R<String> dept = sysClient.getDeptName(warehouseEntity.getAffiliatedUnit());
|
|
|
|
|
|
|
|
// //toolBasicVO.setDeptName(dept.getData());
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
voList.add(toolBasicVO); |
|
|
|
voList.add(toolBasicVO); |
|
|
|
} |
|
|
|
} |
|
|
|
voPages.setRecords(voList); |
|
|
|
voPages.setRecords(voList); |
|
|
@ -149,10 +130,8 @@ public class WtSpToolBasicServiceImpl extends ServiceImpl<WtSpToolBasicMapper, W |
|
|
|
longList.add(deptList.getData().get(i).getId()); |
|
|
|
longList.add(deptList.getData().get(i).getId()); |
|
|
|
} |
|
|
|
} |
|
|
|
longList.add(toolBasicVO.getDeptId()); |
|
|
|
longList.add(toolBasicVO.getDeptId()); |
|
|
|
}else{ |
|
|
|
|
|
|
|
// longList = personClient.getShuiChangId(AuthUtil.getDeptId());
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if(longList.size()>0){ |
|
|
|
if(!longList.isEmpty()){ |
|
|
|
params.put("deptList",longList); |
|
|
|
params.put("deptList",longList); |
|
|
|
} |
|
|
|
} |
|
|
|
if(null!=toolBasicVO.getWarehouseId()){ |
|
|
|
if(null!=toolBasicVO.getWarehouseId()){ |
|
|
@ -173,11 +152,7 @@ public class WtSpToolBasicServiceImpl extends ServiceImpl<WtSpToolBasicMapper, W |
|
|
|
map.put("spBasicId",entity.getSpBasicId()); |
|
|
|
map.put("spBasicId",entity.getSpBasicId()); |
|
|
|
map.put("warehouseId",entity.getWarehouseId()); |
|
|
|
map.put("warehouseId",entity.getWarehouseId()); |
|
|
|
Integer res = spBasicService.selectTotal(map); |
|
|
|
Integer res = spBasicService.selectTotal(map); |
|
|
|
if(null!=result){ |
|
|
|
entity.setUseAmount(res); |
|
|
|
entity.setUseAmount(res); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
entity.setUseAmount(0); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
WtSpTotalEntity spTotalEntity = spTotalMapper.selectByBasicId(map); |
|
|
|
WtSpTotalEntity spTotalEntity = spTotalMapper.selectByBasicId(map); |
|
|
|
entity.setTotalAmount(spTotalEntity.getStock()+entity.getUseAmount()); |
|
|
|
entity.setTotalAmount(spTotalEntity.getStock()+entity.getUseAmount()); |
|
|
|
entity.setNotUseAmount(spTotalEntity.getStock().intValue()); |
|
|
|
entity.setNotUseAmount(spTotalEntity.getStock().intValue()); |
|
|
|