lxw
2022-06-16 addc5a16ce7c02e37997c7e9c8d6586ace3ab4d8
A059的的时候stateFlag文本信息“时间+第几次放/充电”
3个文件已修改
19 ■■■■ 已修改文件
src/main/java/com/whyc/service/BattInfService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/EchartPictureDowloadService.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/util/ActionUtil.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/BattInfService.java
@@ -383,7 +383,7 @@
        Battinf binf = battInfMapper.serchExcelName(battGroupId);
        //导出格式:内蒙古自治区-鄂尔多斯市-东胜区-中心局-理士400AH1组-2022-04-21-第1次放电
        String excelName = binf.getStationName1() + "-" + binf.getStationName2() + "-" + binf.getStationName5() + "-" + binf.getStationName3() + "-" +
                binf.getBattProducer() + binf.getMonCapStd() + "AH" + (binf.getGroupIndexInFBSDevice() + 1) + "组" + "-" + binf.getBattProductDate() + stateFlag;
                binf.getBattProducer() + binf.getMonCapStd() + "AH" + (binf.getGroupIndexInFBSDevice() + 1) + "组" + "-" + stateFlag;
        return excelName;
    }
src/main/java/com/whyc/service/EchartPictureDowloadService.java
@@ -123,7 +123,7 @@
        int battGroupId = Integer.valueOf(req.getParameter("battGroupId"));  //电池组编号
        int testRecordCount = Integer.valueOf(req.getParameter("testRecordCount"));  //测试编号
        String stateFlag = req.getParameter("stateFlag");//第几次放电
        stateFlag = "第1次放电";
        //stateFlag = "2022-02-10-第1次放电";
        List<FBOTestData> list = fboservice.getList(battGroupId, testRecordCount);  //查询4059充放电数据
@@ -207,8 +207,8 @@
        rowNum+=2;
        //excel文件名
        String testTime = new SimpleDateFormat("yyyy-MM-dd").format(test_starttime);
        excelName = excelName+"-"+testTime;
        /*String testTime = new SimpleDateFormat("yyyy-MM-dd").format(test_starttime);
        excelName = excelName+"-"+testTime;*/
        String regEx="[\n`~!@#$%^&*()+=|{}':;',\\[\\].<>/?~!@#¥%……&*()——+|{}【】‘;:”“’。, 、?]";
        excelName = excelName.replace(regEx,"");
@@ -224,7 +224,8 @@
            HSSFClientAnchor anchor = new HSSFClientAnchor(0, 0, 512, 255,(short) 0, rowNum, (short) 10, rowNum+rowNumAdd);
            anchor.setAnchorType(3);
            patriarch.createPicture(anchor,wb.addPicture(bytes.get(picNum),HSSFWorkbook.PICTURE_TYPE_PNG)).resize(1);
            picNum ++;rowNum+=rowNumAdd;
            picNum++;
            rowNum += rowNumAdd;
        }
        rowNum++;
src/main/java/com/whyc/util/ActionUtil.java
@@ -5,7 +5,6 @@
import com.google.gson.JsonSyntaxException;
import com.whyc.pojo.UserInf;
import org.apache.commons.codec.digest.DigestUtils;
import org.springframework.web.context.ContextLoader;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import sun.misc.BASE64Decoder;
@@ -21,15 +20,13 @@
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Optional;
import static jdk.nashorn.internal.objects.NativeNumber.toFixed;
public class ActionUtil{
    public static String time_yyyyMMddHHmmss = "yyyy-MM-dd HH:mm:ss";
    public static String time_yyyyMMdd = "yyyy-MM-dd";
    public static SimpleDateFormat sdfwithOutday=new SimpleDateFormat("yyyy_MM");
    public static SimpleDateFormat sdfwithday = new SimpleDateFormat("yyyy-MM-dd");
    /*
     * 获取HttpServletRequest
@@ -436,8 +433,9 @@
     * @return
    */
    public static boolean generateImage(String imgStr, String path) {
        if (imgStr == null)
        if (imgStr == null) {
            return false;
        }
        BASE64Decoder decoder = new BASE64Decoder();
        try {
            // 解密