| | |
| | | @Value("\${imgPath}") var imgPath: String, |
| | | ) : SearchService { |
| | | |
| | | private val dateUtil = DateUtil() |
| | | |
| | | override fun writeToFile(config: ExcelConfigVo, mode: Int) { |
| | | val dbMapper = DbMapper( |
| | | scenseMapper, |
| | |
| | | } |
| | | |
| | | //建立第一层目录,包含所有的任务 |
| | | val time = dateUtil.DateToString(Date(), "yyyy-MM-dd_HH-mm-ss") |
| | | val time = DateUtil.DateToString(Date(), "yyyy-MM-dd_HH-mm-ss") |
| | | var basePath = |
| | | Constant.DEFAULT_FILE_PATH + File.separator + "images" + File.separator + "temp" + File.separator + time |
| | | imgPath + File.separator + "temp" + File.separator + time |
| | | var file = File(basePath) |
| | | var i = 1 |
| | | while (file.exists() && i <= 100) { |
| | |
| | | createCriteria().andEqualTo("businessguid", p.guid) |
| | | }).forEach { m -> |
| | | val picPath = |
| | | Constant.DEFAULT_FILE_PATH + File.separator + "images" + File.separator + m.extension1 + m.guid + ".jpg" |
| | | imgPath + File.separator + m.extension1 + m.guid + ".jpg" |
| | | val fromFile = File(picPath) |
| | | val picName = p.problemname + "_" + p.location + "($y).jpg" |
| | | val toFile = File(pPath + File.separator + picName) |
| | |
| | | override fun downloadPic2(sceneType: Int, topTaskId: String, response: HttpServletResponse): HttpServletResponse { |
| | | //建立第一层目录,包含所有的任务 |
| | | val topTask = taskMapper.selectByPrimaryKey(topTaskId) |
| | | val time = dateUtil.DateToString(Date(), "yyyy-MM-dd_HH-mm-ss") |
| | | val time = DateUtil.DateToString(Date(), "yyyy-MM-dd_HH-mm-ss") |
| | | val basePath = |
| | | Constant.DEFAULT_FILE_PATH + File.separator + "images" + File.separator + "temp" + File.separator + topTask.name |
| | | imgPath + File.separator + "temp" + File.separator + topTask.name |
| | | val file = File(basePath) |
| | | if (!file.exists()) { |
| | | file.mkdirs() |
| | |
| | | |
| | | //建立一个子任务文件夹 |
| | | var subTaskFilePath = "${basePath}${File.separator}(${ |
| | | dateUtil.DateToString( |
| | | DateUtil.DateToString( |
| | | it.planstarttime, |
| | | DateUtil.DateStyle.YYYY_MM_DD_CN |
| | | ) |
| | |
| | | |
| | | u.forEach { f -> |
| | | val picPath = |
| | | Constant.DEFAULT_FILE_PATH + File.separator + "images" + File.separator + f.extension1 + f.guid + ".jpg" |
| | | imgPath + File.separator + f.extension1 + f.guid + ".jpg" |
| | | val fromFile = File(picPath) |
| | | val picName = f.description |
| | | val toFile = File(pPath + File.separator + picName) |