|
@@ -4,8 +4,10 @@ import com.siwei.apply.domain.YdbpData;
|
|
|
import com.siwei.apply.domain.vo.YdbpDataFilterVo;
|
|
|
import com.siwei.apply.domain.vo.YdbpDataUpdateVo;
|
|
|
import com.siwei.apply.domain.vo.YdbpDataVo;
|
|
|
+import com.siwei.apply.domain.vo.YdbpExcelVo;
|
|
|
import com.siwei.apply.mapper.YdbpDataMapper;
|
|
|
import com.siwei.apply.service.YdbpDataService;
|
|
|
+import org.apache.commons.collections4.MapUtils;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -57,4 +59,26 @@ public class YdbpDataImpl implements YdbpDataService {
|
|
|
entity.setUpdatedAt(new java.util.Date());
|
|
|
ydbpDataMapper.update(entity);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<YdbpExcelVo> transformation(Map<String, Object> mapData) {
|
|
|
+ List<YdbpExcelVo> list = null;
|
|
|
+ if(MapUtils.isNotEmpty(mapData) && mapData.get("rows") != null){
|
|
|
+ list = new java.util.ArrayList<>();
|
|
|
+ List<YdbpData> rows = (List<YdbpData>) mapData.get("rows");
|
|
|
+ for(YdbpData row : rows){
|
|
|
+ YdbpExcelVo excelVo = new YdbpExcelVo();
|
|
|
+ excelVo.setName(row.getName());
|
|
|
+ excelVo.setAllArea(row.getYdArea()+row.getYdUnit());
|
|
|
+ excelVo.setZsArea(row.getZsArea()+row.getZsUnit());
|
|
|
+ excelVo.setPfNumber(row.getPfwh());
|
|
|
+ excelVo.setTheDate(row.getPfDate());
|
|
|
+ list.add(excelVo);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|