| | |
| | | |
| | | import javax.validation.Valid; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入seinspect") |
| | | public R save(@Valid @RequestBody Seinspect seinspect) throws Exception { |
| | | seinspect.setReviewtime(new Date()); |
| | | seinspectService.save(seinspect); |
| | | String url = ""; |
| | | if (seinspect.getUrl()!=null&& !"".equals(seinspect.getUrl())){ |
| | |
| | | } |
| | | //数据同步 |
| | | String s1 = |
| | | "insert into sys_seinspect(id,realName,carid,sName,inspectman,deptName,reviewTime,insid,examination_type,url,jid,deptid,jurisdiction) " + |
| | | "insert into sys_seinspect(id,reviewTime,content,result,url,examiner_dept_id,examiner_id,jurisdiction,security_id) " + |
| | | "values(" + "'" + seinspect.getId() + "'" + "," + |
| | | "'" + seinspect.getRealname() + "'" + "," + |
| | | "'" + seinspect.getCarid() + "'" + "," + |
| | | "'" + seinspect.getSname() + "'" + "," + |
| | | "'" + seinspect.getInspectman() + "'" + "," + |
| | | "'" + seinspect.getDeptname() + "'" + "," + |
| | | "'" + seinspect.getReviewtime() + "'" + "," + |
| | | "'" + seinspect.getInsid() + "'" + "," + |
| | | "'" + seinspect.getExaminationType() + "'" + "," + |
| | | "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "'" + "," + |
| | | "'" + seinspect.getContent() + "'" + "," + |
| | | "'" + seinspect.getResult() + "'" + "," + |
| | | "'" + seinspect.getUrl() + "'" + "," + |
| | | "'" + seinspect.getJid() + "'" + "," + |
| | | "'" + seinspect.getDeptid() + "'" + "," + |
| | | "'" +seinspect.getJurisdiction() + "'" + ")"; |
| | | "'" + seinspect.getExaminerDeptId() + "'" + "," + |
| | | "'" + seinspect.getExaminerId() + "'" + "," + |
| | | "'" + seinspect.getJurisdiction() + "'" + "," + |
| | | "'" + seinspect.getSecurityId() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | return R.success("成功"); |
| | | } |