|
@@ -1,5 +1,6 @@
|
|
package cn.fastfun.controller.api;
|
|
package cn.fastfun.controller.api;
|
|
|
|
|
|
|
|
+import cn.fastfun.controller.dto.asset.AssetConfDto;
|
|
import cn.fastfun.controller.dto.asset.BaseInfoDTO;
|
|
import cn.fastfun.controller.dto.asset.BaseInfoDTO;
|
|
import cn.fastfun.controller.dto.asset.ResponseDTO;
|
|
import cn.fastfun.controller.dto.asset.ResponseDTO;
|
|
import cn.fastfun.controller.dto.asset.FigureDTO;
|
|
import cn.fastfun.controller.dto.asset.FigureDTO;
|
|
@@ -10,7 +11,7 @@ import cn.fastfun.service.entity.AppAssetConf;
|
|
import cn.fastfun.service.entity.AppDevice;
|
|
import cn.fastfun.service.entity.AppDevice;
|
|
import cn.fastfun.service.impl.AppAssetConfServiceImpl;
|
|
import cn.fastfun.service.impl.AppAssetConfServiceImpl;
|
|
import cn.fastfun.service.impl.AppAssetProfitServiceImpl;
|
|
import cn.fastfun.service.impl.AppAssetProfitServiceImpl;
|
|
-//import cn.fastfun.service.mapper.AppAssetConfMapper;
|
|
|
|
|
|
+import cn.fastfun.service.mapper.AppAssetConfMapper;
|
|
import cn.fastfun.util.IrrUtil;
|
|
import cn.fastfun.util.IrrUtil;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
@@ -52,8 +53,8 @@ public class ApiAssetProfitController {
|
|
@Autowired
|
|
@Autowired
|
|
AppDeviceService appDeviceService;
|
|
AppDeviceService appDeviceService;
|
|
|
|
|
|
-// @Autowired
|
|
|
|
-// AppAssetConfMapper appAssetConfMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ AppAssetConfMapper appAssetConfMapper;
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "基础信息")
|
|
@ApiOperation(value = "基础信息")
|
|
@@ -786,15 +787,20 @@ public class ApiAssetProfitController {
|
|
}
|
|
}
|
|
|
|
|
|
Page<AppAssetConf> appAssetConfPage = appAssetConfService.page(page, appAssetConfQueryWrapper);
|
|
Page<AppAssetConf> appAssetConfPage = appAssetConfService.page(page, appAssetConfQueryWrapper);
|
|
-// appAssetConfMapper.getAssetConf(param.getSn(), param.getTableOrder(), param.getType().split(","),
|
|
|
|
-// new SimpleDateFormat("yyyy-MM-dd").format(param.getTimeStart()), new SimpleDateFormat("yyyy-MM-dd").format(param.getTimeEnd()),
|
|
|
|
-// (param.getIndex()-1)*param.getLength(), param.getLength());
|
|
|
|
|
|
+
|
|
|
|
+ List<String> strings = Arrays.asList(param.getType());
|
|
|
|
+
|
|
|
|
+ List<AssetConfDto> assetConf = appAssetConfMapper.getAssetConf(param.getSn(), param.getTableOrder(),
|
|
|
|
+ param.getType() == null?null:Arrays.asList(param.getType()),
|
|
|
|
+ param.getTimeStart() == null?null:new SimpleDateFormat("yyyy-MM-dd").format(param.getTimeStart()),
|
|
|
|
+ param.getTimeEnd() == null?null:new SimpleDateFormat("yyyy-MM-dd").format(param.getTimeEnd()),
|
|
|
|
+ (param.getIndex() - 1) * param.getLength(), param.getLength());
|
|
List<Map<String, Object>> data = new ArrayList<>();
|
|
List<Map<String, Object>> data = new ArrayList<>();
|
|
- if (appAssetConfPage.getTotal() > 0) {
|
|
|
|
- appAssetConfPage.getRecords().forEach(p -> {
|
|
|
|
|
|
+ if (assetConf.size() > 0) {
|
|
|
|
+ assetConf.forEach(p -> {
|
|
data.add(new HashMap<String, Object>() {{
|
|
data.add(new HashMap<String, Object>() {{
|
|
put("time", p.getTime());
|
|
put("time", p.getTime());
|
|
- put("type", p.getType());
|
|
|
|
|
|
+ put("type", p.getTypeText());
|
|
put("amount", p.getAmount());
|
|
put("amount", p.getAmount());
|
|
put("remark", "");
|
|
put("remark", "");
|
|
}});
|
|
}});
|