|
|
|
@ -4,14 +4,22 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
|
import com.fkzy.warn.mapper.ReportMapper; |
|
|
|
import com.fkzy.warn.model.EnterpriseInfo; |
|
|
|
import com.fkzy.warn.model.Report; |
|
|
|
import com.fkzy.warn.model.User; |
|
|
|
import com.fkzy.warn.model.params.GenerateReportParams; |
|
|
|
import com.fkzy.warn.service.EnterpriseInfoService; |
|
|
|
import com.fkzy.warn.service.ReportService; |
|
|
|
import com.fkzy.warn.common.constants.EntityConstants; |
|
|
|
import com.fkzy.warn.common.request.RequestParameter; |
|
|
|
import com.fkzy.warn.common.response.ApiResponse; |
|
|
|
import com.fkzy.warn.service.UserService; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
/** |
|
|
|
* @author zhangjing |
|
|
|
@ -22,6 +30,13 @@ import java.util.List; |
|
|
|
public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> implements |
|
|
|
ReportService { |
|
|
|
|
|
|
|
@Resource |
|
|
|
EnterpriseInfoService enterpriseInfoService; |
|
|
|
@Resource |
|
|
|
UserService userService; |
|
|
|
@Resource |
|
|
|
ReportService reportService; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public ApiResponse saveModel(Report entity, String ticket) { |
|
|
|
@ -55,4 +70,15 @@ public class ReportServiceImpl extends ServiceImpl impleme |
|
|
|
Page<Report> result = this.page(page, eWrapper); |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Map<String,Object> generateReport(GenerateReportParams params, String ticket) { |
|
|
|
Report report = getById(params.getId()); |
|
|
|
Map<String,Object> result = new HashMap<>(); |
|
|
|
QueryWrapper<EnterpriseInfo> enterpriseInfoQueryWrapper = new QueryWrapper<>(); |
|
|
|
enterpriseInfoQueryWrapper.eq("CREDITCODE", report.getCreditCode()); |
|
|
|
EnterpriseInfo enterpriseInfo = enterpriseInfoService.getOne(enterpriseInfoQueryWrapper); |
|
|
|
result.put("basicEnterprise",enterpriseInfo); |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |