add 首页 导出应收账款统计列表
This commit is contained in:
+32
@@ -15,11 +15,16 @@ import io.swagger.annotations.Api;
|
|||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||||
|
import org.jeecgframework.poi.excel.entity.enmus.ExcelType;
|
||||||
|
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
@@ -132,4 +137,31 @@ public class IndexController {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "导出应收账款统计列表")
|
||||||
|
@GetMapping(value = "/exportUncollectedList")
|
||||||
|
public ModelAndView exportUncollectedList(
|
||||||
|
@RequestParam(name="type",defaultValue = "1")String type,
|
||||||
|
@RequestParam(name="departCode",required = false)String departCode,
|
||||||
|
@RequestParam(name="column",required = false)String column,
|
||||||
|
@RequestParam(name="order",required = false)String order) {
|
||||||
|
|
||||||
|
Page<AllProjectStatistics> page = new Page<>(-1, -1);
|
||||||
|
HashMap<String, Object> hashMap = indexService.uncollectedList(type,departCode,page,column,order);
|
||||||
|
IPage<AllProjectStatistics> pageList = (IPage<AllProjectStatistics>) hashMap.get("pageList");
|
||||||
|
List<AllProjectStatistics> records = pageList.getRecords();
|
||||||
|
|
||||||
|
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||||
|
String title = "应收账款统计";
|
||||||
|
mv.addObject(NormalExcelConstants.FILE_NAME, title); //此处设置的filename无效 ,前端会重更新设置一下
|
||||||
|
mv.addObject(NormalExcelConstants.CLASS, AllProjectStatistics.class);
|
||||||
|
//update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置--------------------
|
||||||
|
ExportParams exportParams=new ExportParams(title, title);
|
||||||
|
exportParams.setType(ExcelType.XSSF);
|
||||||
|
//update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置----------------------
|
||||||
|
mv.addObject(NormalExcelConstants.PARAMS,exportParams);
|
||||||
|
mv.addObject(NormalExcelConstants.DATA_LIST, records);
|
||||||
|
return mv;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+16
-18
@@ -22,10 +22,26 @@ public class AllProjectStatistics {
|
|||||||
@ApiModelProperty(value = "来款项目")
|
@ApiModelProperty(value = "来款项目")
|
||||||
private String projectName;
|
private String projectName;
|
||||||
|
|
||||||
|
@Excel(name = "项目负责人", width = 15)
|
||||||
|
@ApiModelProperty(value = "项目负责人")
|
||||||
|
private String principalName;
|
||||||
|
|
||||||
|
@Excel(name = "科室", width = 15)
|
||||||
|
@ApiModelProperty(value = "科室")
|
||||||
|
private String depart;
|
||||||
|
|
||||||
@Excel(name = "来款单位", width = 15)
|
@Excel(name = "来款单位", width = 15)
|
||||||
@ApiModelProperty(value = "来款单位")
|
@ApiModelProperty(value = "来款单位")
|
||||||
private String chargeCompanyTemporaryName;
|
private String chargeCompanyTemporaryName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "打包")
|
||||||
|
private Integer pack;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
@Excel(name = "打包", width = 15)
|
||||||
|
@ApiModelProperty(value = "打包")
|
||||||
|
private String packText;
|
||||||
|
|
||||||
@Excel(name = "年度待确收金额", width = 15)
|
@Excel(name = "年度待确收金额", width = 15)
|
||||||
@ApiModelProperty(value = "合同金额")
|
@ApiModelProperty(value = "合同金额")
|
||||||
private String allMoney;
|
private String allMoney;
|
||||||
@@ -49,24 +65,6 @@ public class AllProjectStatistics {
|
|||||||
@ApiModelProperty(value = "来款用途")
|
@ApiModelProperty(value = "来款用途")
|
||||||
private String ChargeUse_text;
|
private String ChargeUse_text;
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "打包")
|
|
||||||
private Integer pack;
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@Excel(name = "打包", width = 15)
|
|
||||||
@ApiModelProperty(value = "打包")
|
|
||||||
private String packText;
|
|
||||||
|
|
||||||
@Excel(name = "科室", width = 15)
|
|
||||||
@ApiModelProperty(value = "科室")
|
|
||||||
private String depart;
|
|
||||||
|
|
||||||
@Excel(name = "项目负责人", width = 15)
|
|
||||||
@ApiModelProperty(value = "项目负责人")
|
|
||||||
private String principalName;
|
|
||||||
|
|
||||||
@Excel(name = "到账时间", width = 15)
|
|
||||||
@ApiModelProperty(value = "到账时间")
|
@ApiModelProperty(value = "到账时间")
|
||||||
private String paymentDate;
|
private String paymentDate;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user