| | |
| | | import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat; |
| | | import net.sourceforge.pinyin4j.format.HanyuPinyinToneType; |
| | | import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination; |
| | | import org.springblade.common.utils.arg; |
| | | import org.springblade.core.excel.util.ExcelUtil; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | import static org.springblade.common.constant.FtpConstant.*; |
| | | import static org.springblade.common.config.FtpConfig.*; |
| | | |
| | | /** |
| | | * @author zhongrj |
| | |
| | | */ |
| | | @PostMapping("/remove") |
| | | public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) { |
| | | List<String> list = Arrays.asList(ids.split(",")); |
| | | list.forEach(id -> { |
| | | //内网同步 |
| | | String s1 = "delete from sys_apply where id = " + "'" + id + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | }); |
| | | return R.status(applyService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | |
| | | //内网同步 |
| | | Long sid = examScore.getId(); |
| | | String format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(examScore.getExamTime()); |
| | | // String s = "insert into exam_score(id,exam_time,user_id,exam_id,apply_id) " + |
| | | // "values(" + "'" + sid + "'" + "," + "'" + |
| | | // format + "'" + "," + "'" + |
| | | // examScore.getUserId() +"'" + "," +"'" + |
| | | // examScore.getExamId() +"'" + "," +"'" + |
| | | // examScore.getApplyId() + "'" + ")"; |
| | | // FtpUtil.sqlFileUpload(s); |
| | | String s = "insert into exam_score(id,exam_time,user_id,exam_id,apply_id) " + |
| | | "values(" + "'" + sid + "'" + "," + "'" + |
| | | format + "'" + "," + "'" + |
| | | examScore.getUserId() +"'" + "," +"'" + |
| | | examScore.getExamId() +"'" + "," +"'" + |
| | | examScore.getApplyId() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | return examScore; |
| | | } |
| | | |
| | |
| | | } catch (FileNotFoundException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | FtpUtil.uploadFile(ftpHost_dev, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", "f"+response1+".json", in1); |
| | | FtpUtil.uploadFile(ftpHost, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", "f"+response1+".json", in1); |
| | | return "成功"; |
| | | } |
| | | |