|
@@ -3,17 +3,18 @@ package com.usoftchina.saas.operation.service.impl;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
import com.github.pagehelper.PageInfo;
|
|
|
import com.usoftchina.saas.commons.dto.ListReqDTO;
|
|
import com.usoftchina.saas.commons.dto.ListReqDTO;
|
|
|
-import com.usoftchina.saas.operation.dto.AccountDTO;
|
|
|
|
|
-import com.usoftchina.saas.operation.dto.CompanyDTO;
|
|
|
|
|
-import com.usoftchina.saas.operation.dto.LoginDTO;
|
|
|
|
|
|
|
+import com.usoftchina.saas.operation.dto.*;
|
|
|
import com.usoftchina.saas.operation.mapper.AccountMapper;
|
|
import com.usoftchina.saas.operation.mapper.AccountMapper;
|
|
|
import com.usoftchina.saas.operation.mapper.CompanyMapper;
|
|
import com.usoftchina.saas.operation.mapper.CompanyMapper;
|
|
|
import com.usoftchina.saas.operation.service.DataService;
|
|
import com.usoftchina.saas.operation.service.DataService;
|
|
|
import com.usoftchina.saas.page.PageRequest;
|
|
import com.usoftchina.saas.page.PageRequest;
|
|
|
|
|
+import com.usoftchina.saas.utils.BeanMapper;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
+import java.util.Map;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* @author: guq
|
|
* @author: guq
|
|
@@ -68,4 +69,41 @@ public class DataServiceImpl implements DataService{
|
|
|
PageInfo<LoginDTO> pageInfo = new PageInfo<LoginDTO>(info);
|
|
PageInfo<LoginDTO> pageInfo = new PageInfo<LoginDTO>(info);
|
|
|
return pageInfo;
|
|
return pageInfo;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public PageInfo<CompanyAnalyzeDTO> getConpanyAnalyze(PageRequest page, ListReqDTO req) {
|
|
|
|
|
+ //调用过程产生数据
|
|
|
|
|
+ if (page.getNumber() <= 1) {
|
|
|
|
|
+ accountMapper.analyzeCompany();
|
|
|
|
|
+ }
|
|
|
|
|
+ PageHelper.startPage(page.getNumber(), page.getSize());
|
|
|
|
|
+ //查询数据
|
|
|
|
|
+ String con = req.getFinalCondition();
|
|
|
|
|
+ if (null == con) {
|
|
|
|
|
+ con = "1=1";
|
|
|
|
|
+ }
|
|
|
|
|
+ List<CompanyAnalyzeDTO> info = accountMapper.getConpanyAnalyze(con);
|
|
|
|
|
+ //取分页信息
|
|
|
|
|
+ PageInfo<CompanyAnalyzeDTO> pageInfo = new PageInfo<CompanyAnalyzeDTO>(info);
|
|
|
|
|
+ return pageInfo;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public CompanyAnalyzeFormDTO companyAnalyzeRead(Long id) {
|
|
|
|
|
+ if (null == id || "0".equals(id)) {
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
|
|
+ //调用过程 生成明细数据
|
|
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
|
|
+ map.put("companyId", id);
|
|
|
|
|
+ companyMapper.analyzeDetail(map);
|
|
|
|
|
+ CompanyAnalyzeFormDTO formDTO = new CompanyAnalyzeFormDTO();
|
|
|
|
|
+ //查询主表信息
|
|
|
|
|
+ CompanyAnalyzeDTO main = companyMapper.selectCompanyAnalyze(id);
|
|
|
|
|
+ //查询从表
|
|
|
|
|
+ List<CompanyAnalyzedetailDTO> items = companyMapper.selectCompanyAnalyzeDetail(id);
|
|
|
|
|
+ formDTO.setMain(main);
|
|
|
|
|
+ formDTO.setItems(items);
|
|
|
|
|
+ return formDTO;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|