导出问题处理

0927cmt
zhaoyu 2024-04-16 17:50:26 +08:00
parent 622d72a257
commit b56ed82eef
3 changed files with 7 additions and 3 deletions

View File

@ -27,6 +27,7 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.xmlbeans.impl.xb.xsdschema.Public;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
@ -110,6 +111,9 @@ public class HiddenApiController extends BaseController {
@Autowired
private HiddenExamineService hiddenExamineService;
@Value("${hidden.count.excel}")
private String hiddenCountExcel;
/**
* 使
*
@ -1436,7 +1440,7 @@ public class HiddenApiController extends BaseController {
String date =sdf.format(new Date());
map.put("date","填表日期:"+date);
//开始执行模板填充数据
String excelFilePath = "C:\\Users\\Administrator\\Desktop\\隐患统计.xlsx"; // 替换为你的Excel文件路径
String excelFilePath = hiddenCountExcel; // 替换为你的Excel文件路径
//正则
String regex = "\\{\\{.*?\\}\\}";
Pattern pattern = Pattern.compile(regex);

View File

@ -825,7 +825,7 @@ public class HiddenServiceImpl implements HiddenService{
//卸车部自查数据
List<PageData> xcbGsc = groupByTypeGscList.get("xcbgsc");
if(!Tools.isEmpty(xcbGsc)){
map.put("xcbGscZcZs",xcbGsc.size()); //总数
map.put("xcbGscZs",xcbGsc.size()); //总数
List<PageData> xcbGscWc = xcbGsc.stream().filter(item-> StringUtils.equals("4",item.getString("STATE"))).collect(Collectors.toList());
int zijin = xcbGsc.stream().mapToInt(item-> Integer.parseInt(item.getString("INVESTMENT_FUNDS"))).sum();
if(!Tools.isEmpty(xcbGscWc)){

View File

@ -512,7 +512,7 @@
bhuUser.name as fxUserName,
bhuUserDeptD.DEPARTMENT_ID as fxUserDeptNameId,
bhuUserDept.name as fxUserDeptName,
bhuUserDeptD.name as fxUserDeptNameDName,
bhuUserDeptD.name as fxUserDeptDName,
type1.name as type1Name,
confirmUser.name as conUsername,