| | |
| | | import org.springblade.modules.information.service.IInformationService; |
| | | import org.springblade.modules.permit.entity.Permit; |
| | | import org.springblade.modules.permit.vo.PermitVO; |
| | | import org.springblade.modules.record.dto.RecordDTO; |
| | | import org.springblade.modules.recordk.dto.RecordkDTO; |
| | | import org.springblade.modules.recordk.entity.Recordk; |
| | | import org.springblade.modules.recordk.service.IRecordkService; |
| | | import org.springblade.modules.recordk.vo.RecordkVO; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | |
| | | |
| | | private final IRecordkService recordkService; |
| | | private final IInformationService informationService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 详情 |
| | |
| | | public R<IPage<RecordkVO>> page(RecordkVO recordk, Query query) { |
| | | IPage<RecordkVO> pages; |
| | | pages = recordkService.selectRecordkPage(Condition.getPage(query), recordk, recordk.getJurisdiction()); |
| | | // if (recordk.getUsetype().equals("0")) { |
| | | // pages = recordkService.selectRecordkPage(Condition.getPage(query), recordk,null); |
| | | // } else if (recordk.getUsetype().equals("1")) { |
| | | // String childer = informationService.selJurchilder(recordk.getJurisdiction()); |
| | | // String[] split = childer.split(","); |
| | | // String strArrays = ""; |
| | | // for (int j = 0; j < split.length; j++) { |
| | | // strArrays += "'" + split[j] + "',"; |
| | | // } |
| | | // String jurisdiction = strArrays.substring(0, strArrays.length() - 1); |
| | | // pages = recordkService.selectRecordkPage(Condition.getPage(query), recordk,jurisdiction); |
| | | // } else { |
| | | // pages = recordkService.selectRecordkPage(Condition.getPage(query), recordk,null); |
| | | // } |
| | | return R.data(pages); |
| | | } |
| | | |
| | |
| | | recordk.setType("2"); |
| | | recordk.setPermitime(new Date()); |
| | | recordkService.save(recordk); |
| | | //String offtime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(recordk.getOfficetime()); |
| | | //String pertime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(recordk.getPermitime()); |
| | | String s = "insert into sys_recordk(id,creditCode,enterpriseName,representative," + |
| | | "address,business,region,registration,industry,type,deptid,ptype,representativecell,contacts,contactscell,cardid,overtime," + |
| | | "jurisdiction," + |
| | |
| | | boolean b = recordkService.updateById(recordk); |
| | | String s1 = "update sys_recordk set type = " + "'" + 0 + "'" + ",approve = " + "'" + recordk.getApprove() + "'" + |
| | | " " + "where id = " + "'" + recordk.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.dataSync(s1); |
| | | return R.status(b); |
| | | } |
| | | |
| | |
| | | return R.data(map); |
| | | } |
| | | |
| | | /** |
| | | * 保安公司项目备案信息(基本信息和附件列表信息) |
| | | * @param record |
| | | * @return |
| | | */ |
| | | @GetMapping("/details") |
| | | public R details(RecordkDTO record) { |
| | | RecordkDTO detail = recordkService.getDetails(record); |
| | | return R.data(detail); |
| | | } |
| | | } |