| | |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.FTP.FtpUtil; |
| | | import org.springblade.modules.directive.entity.Directive; |
| | | import org.springblade.modules.directive.entity.DirectiveFile; |
| | | import org.springblade.modules.directive.service.DirectiveService; |
| | | import org.springblade.modules.directive.vo.DirectiveVo; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | |
| | | boolean status = false; |
| | | directive.setSendTime(new Date()); |
| | | status = directiveService.save(directive); |
| | | //内网新增 |
| | | //arg.test01(arg.url+"/directive/saveDirectiveAndFile",directive); |
| | | //数据同步 |
| | | String s1 = |
| | | "insert into sys_directive(id,type,send_directive_id,receive_directive_ids,send_time,content) " + |
| | | "values(" + "'" + directive.getId() + "'" + "," + |
| | | "'" + directive.getType() + "'" + "," + |
| | | "'" + directive.getSendDirectiveId() + "'" + "," + |
| | | "'" + directive.getReceiveDirectiveIds() + "'" + "," + |
| | | "'" + new SimpleDateFormat("yyyy-MM-dd").format(directive.getStartTime()) + "'" + "," + |
| | | "'" +directive.getContent() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | if (status){ |
| | | //新增图片 |
| | | if (null!=directive.getUrl() && directive.getUrl()!=""){ |