| | |
| | | import com.whyc.pojo.MacInit; |
| | | import com.whyc.util.ActionUtil; |
| | | import com.whyc.util.MacUtil; |
| | | import com.whyc.util.ThreadLocalUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.swing.plaf.TableHeaderUI; |
| | | import java.io.FileNotFoundException; |
| | | import java.io.IOException; |
| | | import java.io.OutputStream; |
| | |
| | | MacInit macInit = initMapper.selectOne(initwrapper); |
| | | //导出csv |
| | | Date date = new Date(); |
| | | String filename = "mac_" + ActionUtil.sdf.format(date).replace(" ", "_").replace(":", "_") + ".csv"; |
| | | //String filename = "mac_" + ActionUtil.sdf.format(date).replace(" ", "_").replace(":", "_") + ".csv"; |
| | | String filename = "mac_" + ThreadLocalUtil.format(date,1).replace(" ", "_").replace(":", "_") + ".csv"; |
| | | try { |
| | | // 转码防止乱码 |
| | | resp.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
| | |
| | | public void getMacHis(HttpServletRequest req, HttpServletResponse resp, List<String> list) { |
| | | //导出csv |
| | | Date date = new Date(); |
| | | String filename = "mac_" + ActionUtil.sdf.format(date).replace(" ", "_").replace(":", "_") + ".csv"; |
| | | //String filename = "mac_" + ActionUtil.sdf.format(date).replace(" ", "_").replace(":", "_") + ".csv"; |
| | | String filename = "mac_" + ThreadLocalUtil.format(date,1).replace(" ", "_").replace(":", "_") + ".csv"; |
| | | try { |
| | | // 转码防止乱码 |
| | | resp.setHeader("Access-Control-Expose-Headers", "Content-Disposition"); |