| | |
| | | public SecureRegistry secureRegistry() { |
| | | SecureRegistry secureRegistry = new SecureRegistry(); |
| | | secureRegistry.setEnabled(true); |
| | | secureRegistry.excludePathPatterns("/blade-auth/**"); |
| | | // secureRegistry.excludePathPatterns("/blade-user/**"); |
| | | secureRegistry.excludePathPatterns("/blade-auth/**");secureRegistry.excludePathPatterns("/blade-user/**"); |
| | | secureRegistry.excludePathPatterns("/blade-system/menu/routes"); |
| | | secureRegistry.excludePathPatterns("/blade-system/menu/auth-routes"); |
| | | secureRegistry.excludePathPatterns("/blade-system/menu/top-menu"); |
| | |
| | | secureRegistry.excludePathPatterns("/webjars/**"); |
| | | secureRegistry.excludePathPatterns("/swagger-resources/**"); |
| | | secureRegistry.excludePathPatterns("/druid/**"); |
| | | // secureRegistry.excludePathPatterns("/performance/**"); |
| | | // secureRegistry.excludePathPatterns("/information/**"); |
| | | // secureRegistry.excludePathPatterns("/shareholder/**"); |
| | | // secureRegistry.excludePathPatterns("/member/**"); |
| | | // secureRegistry.excludePathPatterns("/honor/**"); |
| | | // secureRegistry.excludePathPatterns("/dispatcher/**"); |
| | | // secureRegistry.excludePathPatterns("/employment/**"); |
| | | // secureRegistry.excludePathPatterns("/train/**"); |
| | | // secureRegistry.excludePathPatterns("/examination/**"); |
| | | // secureRegistry.excludePathPatterns("/experience/**"); |
| | | // secureRegistry.excludePathPatterns("/record/**"); |
| | | // secureRegistry.excludePathPatterns("/revoke/**"); |
| | | // secureRegistry.excludePathPatterns("/recordk/**"); |
| | | // secureRegistry.excludePathPatterns("/jurisdiction/**"); |
| | | // secureRegistry.excludePathPatterns("/permit/**"); |
| | | // secureRegistry.excludePathPatterns("/car/**"); |
| | | // secureRegistry.excludePathPatterns("/gun/**"); |
| | | // secureRegistry.excludePathPatterns("/equipage/**"); |
| | | // secureRegistry.excludePathPatterns("/blade-user/**"); |
| | | // secureRegistry.excludePathPatterns("/trainingRegistration/**"); |
| | | // secureRegistry.excludePathPatterns("/seinspect/**"); |
| | | // secureRegistry.excludePathPatterns("/coinspect/**"); |
| | | // secureRegistry.excludePathPatterns("/blade-user/**"); |
| | | // secureRegistry.excludePathPatterns("/pushMsg/**"); |
| | | // secureRegistry.excludePathPatterns("/owner/**"); |
| | | // secureRegistry.excludePathPatterns("/friend/**"); |
| | | // secureRegistry.excludePathPatterns("/chat-records/**"); |
| | | // secureRegistry.excludePathPatterns("/chatgroup/**"); |
| | | // secureRegistry.excludePathPatterns("/chatgroupc/**"); |
| | | // secureRegistry.excludePathPatterns("/zc/**"); |
| | | // secureRegistry.excludePathPatterns("/licet/**"); |
| | | // secureRegistry.excludePathPatterns("/licetuser/**"); |
| | | secureRegistry.excludePathPatterns("/performance/**"); |
| | | secureRegistry.excludePathPatterns("/information/**"); |
| | | secureRegistry.excludePathPatterns("/shareholder/**"); |
| | | secureRegistry.excludePathPatterns("/member/**"); |
| | | secureRegistry.excludePathPatterns("/honor/**"); |
| | | secureRegistry.excludePathPatterns("/dispatcher/**"); |
| | | secureRegistry.excludePathPatterns("/employment/**"); |
| | | secureRegistry.excludePathPatterns("/train/**"); |
| | | secureRegistry.excludePathPatterns("/examination/**"); |
| | | secureRegistry.excludePathPatterns("/experience/**"); |
| | | secureRegistry.excludePathPatterns("/record/**"); |
| | | secureRegistry.excludePathPatterns("/revoke/**"); |
| | | secureRegistry.excludePathPatterns("/recordk/**"); |
| | | secureRegistry.excludePathPatterns("/jurisdiction/**"); |
| | | secureRegistry.excludePathPatterns("/permit/**"); |
| | | secureRegistry.excludePathPatterns("/car/**"); |
| | | secureRegistry.excludePathPatterns("/gun/**"); |
| | | secureRegistry.excludePathPatterns("/equipage/**"); |
| | | secureRegistry.excludePathPatterns("/blade-user/**"); |
| | | secureRegistry.excludePathPatterns("/trainingRegistration/**"); |
| | | secureRegistry.excludePathPatterns("/seinspect/**"); |
| | | secureRegistry.excludePathPatterns("/coinspect/**"); |
| | | secureRegistry.excludePathPatterns("/blade-user/**"); |
| | | secureRegistry.excludePathPatterns("/pushMsg/**"); |
| | | secureRegistry.excludePathPatterns("/owner/**"); |
| | | secureRegistry.excludePathPatterns("/friend/**"); |
| | | secureRegistry.excludePathPatterns("/chat-records/**"); |
| | | secureRegistry.excludePathPatterns("/chatgroup/**"); |
| | | secureRegistry.excludePathPatterns("/chatgroupc/**"); |
| | | secureRegistry.excludePathPatterns("/zc/**"); |
| | | secureRegistry.excludePathPatterns("/licet/**"); |
| | | secureRegistry.excludePathPatterns("/licetuser/**"); |
| | | return secureRegistry; |
| | | } |
| | | |
| | |
| | | import org.springblade.modules.accreditation.entity.AccreditationRecords; |
| | | import org.springblade.modules.accreditation.service.AccreditationRecordsService; |
| | | import org.springblade.modules.accreditation.vo.AccreditationRecordsVo; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.core.io.ClassPathResource; |
| | | import org.springframework.core.io.Resource; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | private final AccreditationRecordsService accreditationRecordsService; |
| | | |
| | | private final IUserService userService; |
| | | |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 自定义分页 |
| | |
| | | "update blade_user set user_type = " + "'" + user.getUserType() + "'" + |
| | | ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getUpdateTime()) + "'" + |
| | | " " + "where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | return R.data(save); |
| | | } |
| | | |
| | |
| | | "update blade_user set user_type = " + user.getUserType() + "" + |
| | | ",update_time = " + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getUpdateTime()) + "" + |
| | | "where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | }else { |
| | | //内网同步 |
| | | String s = |
| | |
| | | ",audit_time = " + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(accreditationRecords.getAuditTime()) + "" + |
| | | ",audit_user = " + accreditationRecords.getAuditUser() + " " + |
| | | "where id = " + "'" + accreditationRecords.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | }else { |
| | | //内网同步 |
| | |
| | | ",audit_time = " + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(accreditationRecords.getAuditTime()) + "" + |
| | | ",audit_user = " + accreditationRecords.getAuditUser() + " " + |
| | | "where id = " + "'" + accreditationRecords.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | //返回 |
| | | return R.status(b); |
| | |
| | | "update blade_user set user_type = " + user.getUserType() + "" + |
| | | ",update_time = " + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getUpdateTime()) + "" + |
| | | "where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | }else { |
| | | //内网同步 |
| | | String s = |
| | |
| | | ",audit_time = " + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(accreditationRecords.getAuditTime()) + "" + |
| | | ",audit_user = " + accreditationRecords.getAuditUser() + " " + |
| | | "where id = " + "'" + accreditationRecords.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | }else { |
| | | //内网同步 |
| | |
| | | ",audit_time = " + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(accreditationRecords.getAuditTime()) + "" + |
| | | ",audit_user = " + accreditationRecords.getAuditUser() + " " + |
| | | "where id = " + "'" + accreditationRecords.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | }); |
| | | //返回 |
| | |
| | | import org.springblade.modules.accreditation.mapper.AccreditationRecordsMapper; |
| | | import org.springblade.modules.accreditation.service.AccreditationRecordsService; |
| | | import org.springblade.modules.accreditation.vo.AccreditationRecordsVo; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.net.MalformedURLException; |
| | |
| | | |
| | | /** |
| | | * 制证记录服务实现类 |
| | | * |
| | | * @author zhongrj |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class AccreditationRecordsServiceImpl extends ServiceImpl<AccreditationRecordsMapper, AccreditationRecords> implements AccreditationRecordsService { |
| | | |
| | | @Autowired |
| | | private MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param page |
| | | * @param accreditationRecords |
| | | * @return |
| | |
| | | |
| | | /** |
| | | * 制证申请(批量) |
| | | * |
| | | * @param accreditationRecords 制证记录信息对象 |
| | | */ |
| | | @Override |
| | |
| | | + "'" + records.getStatus() +"'" + "," |
| | | + "'" + records.getType() +"'" + "," |
| | | +"'" + records.getAuditStatus() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | } |
| | | //判断类型,如果是证书的,审核未通过的可以再次申请,审核通过的,暂时不给于新增记录 |
| | |
| | | + "'" + records.getStatus() +"'" + "," |
| | | + "'" + records.getType() +"'" + "," |
| | | +"'" + records.getAuditStatus() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | /** |
| | | * 自定义详情信息 |
| | | * |
| | | * @param accreditationRecords |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 导出保安员证信息 |
| | | * |
| | | * @param accreditationRecords |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 导出证书制证信息 |
| | | * |
| | | * @param accreditationRecords |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 批量修改为已制证 |
| | | * |
| | | * @param accreditationRecords 制证记录信息对象 |
| | | */ |
| | | @Override |
| | |
| | | String s = |
| | | "update sys_accreditation_records set status = " + accreditationRecords.getStatus() + "" + |
| | | "where id = " + "'" + accreditationRecords.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | }); |
| | | return true; |
| | | } |
| | |
| | | import org.springblade.modules.exam.service.ExamScoreService; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springblade.modules.training.vo.TrainingRegistrationVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | |
| | | // @Autowired |
| | | private final ExamScoreService examScoreService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param query page,size |
| | | * @param apply 考试报名信息对象 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 新增报名 |
| | | * |
| | | * @param apply 考试报名信息对象 |
| | | */ |
| | | @PostMapping("/save") |
| | |
| | | "values(" + "'" + id + "'" + "," + "'" + apply.getUserId() + "'" + "," + "'" + formatStr + |
| | | "'" + "," + "'" + apply.getApplyStatus() + "'" + "," +"'" + apply.getIsExam() + "'" + ");" + |
| | | "update blade_user set is_apply = " + user1.getIsApply() + " " +"where id = " + "'" + user1.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改 |
| | | * |
| | | * @param apply 考试报名信息对象 |
| | | */ |
| | | @PostMapping("/update") |
| | |
| | | |
| | | /** |
| | | * 新增或修改 |
| | | * |
| | | * @param apply 考试报名信息对象 |
| | | */ |
| | | @PostMapping("/submit") |
| | |
| | | |
| | | /** |
| | | * 导出报名数数据 |
| | | * |
| | | * @param response |
| | | * @param apply 报名对象 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 生成准考证号码 |
| | | * |
| | | * @param apply 考试报名信息对象 |
| | | */ |
| | | private String getCandidateNo(Apply apply) { |
| | |
| | | |
| | | /** |
| | | * 生成报名编号 |
| | | * |
| | | * @param apply 考试报名信息对象 |
| | | */ |
| | | private String getApplyCode(Apply apply) { |
| | |
| | | |
| | | /** |
| | | * 获取字符串拼音的第一个字母 |
| | | * |
| | | * @param chinese |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param ids 考试报名信息ids 数组 |
| | | */ |
| | | @PostMapping("/remove") |
| | |
| | | list.forEach(id -> { |
| | | //内网同步 |
| | | String s1 = "delete from sys_apply where id = " + "'" + id + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | }); |
| | | return R.status(applyService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | /** |
| | | * 查询用户详情 |
| | | * |
| | | * @param user |
| | | */ |
| | | @GetMapping("/userDetail") |
| | |
| | | |
| | | /** |
| | | * 详情 |
| | | * |
| | | * @param apply 考试报名信息对象 |
| | | */ |
| | | @GetMapping("/detail") |
| | |
| | | |
| | | /** |
| | | * 获取准考证信息 |
| | | * |
| | | * @param apply |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 取消报名 |
| | | * |
| | | * @param apply 考试报名信息对象 |
| | | */ |
| | | @PostMapping("/cancelApply") |
| | |
| | | String s = |
| | | "update sys_apply set apply_status = " + apply.getApplyStatus() + " " +"where id = " + "'" + apply.getId() + "';" + |
| | | "update blade_user set is_apply = " + user.getIsApply() + " " +"where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 公司报名列表取消报名,无applyId |
| | | * |
| | | * @param apply 考试报名信息对象 |
| | | */ |
| | | @PostMapping("/cancelApplyNotApplyId") |
| | |
| | | |
| | | /** |
| | | * 批量报名 |
| | | * |
| | | * @param ids userIds 人员 |
| | | */ |
| | | @PostMapping("/batchApply") |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 生成考试,报名 |
| | | * |
| | | * @param applyVO 报名info |
| | | */ |
| | | @PostMapping("/batchExam") |
| | |
| | | "," + "'" + examPaper.getExamType() +"'" + |
| | | "," + "'" + format +"'" + |
| | | "," +"'" + endTimeFormat + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | |
| | | //修改报名信息 |
| | | applyIds.forEach(apply ->{ |
| | |
| | | String s1 = |
| | | "update sys_apply set exam_id = " + apply.getExamId() + ",candidate_no = " + "'" + apply.getCandidateNo() + "'" + |
| | | " " +"where id = " + "'" + apply.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | }); |
| | | } |
| | |
| | | |
| | | /** |
| | | * 查询报名清册信息 |
| | | * |
| | | * @param apply 报名信息 |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询保安员个人报名信息 |
| | | * |
| | | * @param apply 报名信息,包含userId |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 修改考试状态 |
| | | * |
| | | * @param apply 报名信息,包含userId,applyid |
| | | * @return |
| | | */ |
| | |
| | | examScore.setCandidateNo(apply.getCandidateNo()); |
| | | examScore.setExamTime(new Date()); |
| | | //新增考试成绩 |
| | | examScoreService.save(examScore); |
| | | boolean save = examScoreService.save(examScore); |
| | | if (save) { |
| | | //内网同步 |
| | | Long sid = examScore.getId(); |
| | | String format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(examScore.getExamTime()); |
| | |
| | | "," + "'" + examScore.getUserId() +"'" + |
| | | "," +"'" + examScore.getExamId() +"'" + |
| | | "," +"'" + examScore.getApplyId() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | return examScore; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * test |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("/test") |
| | |
| | | import org.springblade.modules.apply.entity.ExamPayment; |
| | | import org.springblade.modules.apply.service.ExamPaymentService; |
| | | import org.springblade.modules.apply.vo.ExamPaymentVO; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Arrays; |
| | |
| | | public class ExamPaymentController { |
| | | |
| | | private final ExamPaymentService examPaymentService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param query page,size |
| | | * @param examPayment 考试缴费信息对象 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 新增 |
| | | * |
| | | * @param examPayment 考试缴费信息对象 |
| | | */ |
| | | @PostMapping("/save") |
| | |
| | | |
| | | /** |
| | | * 修改 |
| | | * |
| | | * @param examPayment 考试缴费信息对象 |
| | | */ |
| | | @PostMapping("/update") |
| | |
| | | |
| | | /** |
| | | * 新增或修改 |
| | | * |
| | | * @param examPayment 考试缴费信息对象 |
| | | */ |
| | | @PostMapping("/submit") |
| | |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param ids 考试缴费信息ids 数组 |
| | | */ |
| | | @PostMapping("/remove") |
| | |
| | | list.forEach(id -> { |
| | | //内网同步 |
| | | String s1 = "delete from sys_exam_payment where id = " + "'" + id + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | }); |
| | | return R.status(examPaymentService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | * |
| | | * @param examPayment 考试缴费信息对象 |
| | | */ |
| | | @GetMapping("/detail") |
| | |
| | | import org.springblade.modules.exam.service.ExamScoreService; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springblade.modules.training.entity.TrainingRegistration; |
| | | import org.springblade.modules.training.service.TrainingRegistrationService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | @Autowired |
| | | private TrainingRegistrationService trainingRegistrationService; |
| | | @Autowired |
| | | private MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 自定义分页数据 |
| | |
| | | + "'" + examId + "'" + "," |
| | | +"'" + apply1.getIsExam() + "'" + ");" + |
| | | "update blade_user set is_apply = " + "'" + user1.getIsApply() + "'" +"where id = " + "'" + user1.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | }else { |
| | | if (user1.getIsApply()!=1) { |
| | | Apply apply1 = new Apply(); |
| | |
| | | + "'" + examId + "'" + "," |
| | | +"'" + apply1.getIsExam() + "'" + ");" + |
| | | "update blade_user set is_apply = " + "'" + user1.getIsApply() + "'" +"where id = " + "'" + user1.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | String s1 = |
| | | "update sys_apply set is_exam = " + apply1.getIsExam() + " " +"where id = " + "'" + apply1.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | //模拟考 |
| | | if (apply.getExamType()==2){ |
| | |
| | | |
| | | String s1 = |
| | | "update sys_training_registration set is_exam = " + trainingRegistration.getIsExam() + " " +"where id = " + "'" + trainingRegistration.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | } |
| | | |
| | |
| | | import org.springblade.modules.coinspect.entity.Coinspect; |
| | | import org.springblade.modules.coinspect.service.ICoinspectService; |
| | | import org.springblade.modules.coinspect.vo.CoinspectVO; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | |
| | | public class CoinspectController extends BladeController { |
| | | |
| | | private final ICoinspectService coinspectService; |
| | | |
| | | private final MyAsyncService myAsyncService; |
| | | /** |
| | | * 详情 |
| | | */ |
| | |
| | | "'" + coinspect.getInsid() + "'" + "," + |
| | | "'" + coinspect.getResults() + "'" + "," + |
| | | "'" + coinspect.getUrl() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | return R.success("新增成功"); |
| | | } |
| | | |
| | |
| | | import org.springblade.modules.desk.wrapper.NoticeWrapper; |
| | | import org.springblade.modules.system.entity.Dept; |
| | | import org.springblade.modules.system.service.IDeptService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | |
| | | private final INoticeService noticeService; |
| | | |
| | | private final IDeptService iDeptService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 详情 |
| | |
| | | //新增 |
| | | status = noticeService.save(notice); |
| | | notice.setIsDeleted(0); |
| | | if (status) { |
| | | //数据同步 |
| | | String s1 = |
| | | "insert into blade_notice(id,title,category,release_time,content,create_user,create_dept,create_time,is_deleted,dept_id,cover_url,type) " + |
| | |
| | | "'" + notice.getDeptId() + "'" + "," + |
| | | "'" + notice.getCoverUrl() + "'" + "," + |
| | | "'" +notice.getType() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | }else { |
| | | //修改 |
| | | status = noticeService.updateById(notice); |
| | | if (status) { |
| | | //内网同步 |
| | | String s1 = |
| | | "update blade_notice set title = " + "'" + notice.getTitle() + "'" + |
| | |
| | | ",cover_url = " + "'" + notice.getCoverUrl() + "'" + |
| | | ",type = " + "'" + notice.getType() + "'" + |
| | | " " +"where id = " + "'" + notice.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | } |
| | | return R.status(status); |
| | | } |
| | |
| | | list.forEach(id ->{ |
| | | //内网同步 |
| | | String s1 = "delete from blade_notice where id = " + "'" + id + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | }); |
| | | boolean temp = noticeService.deleteLogic(Func.toLongList(ids)); |
| | | return R.status(temp); |
| | |
| | | import org.springblade.modules.directive.entity.DirectiveFile; |
| | | import org.springblade.modules.directive.service.DirectiveService; |
| | | import org.springblade.modules.directive.vo.DirectiveVo; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | |
| | | public class DirectiveController { |
| | | |
| | | private final DirectiveService directiveService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 自定义分页 |
| | |
| | | boolean status = false; |
| | | directive.setSendTime(new Date()); |
| | | status = directiveService.save(directive); |
| | | if (status){ |
| | | //数据同步 |
| | | String s1 = |
| | | "insert into sys_directive(id,type,send_directive_id,receive_directive_ids,send_time,content) " + |
| | |
| | | "'" + directive.getReceiveDirectiveIds() + "'" + "," + |
| | | "'" + directive.getSendTime() + "'" + "," + |
| | | "'" + directive.getContent() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | if (status) { |
| | | //新增图片 |
| | | if (null != directive.getUrl() && directive.getUrl() != "") { |
| | |
| | | "'" + directiveFile.getType() + "'" + "," + |
| | | "'" + directiveFile.getDirectiveId() + "'" + "," + |
| | | "'" + urls+ "'"+ ")"; |
| | | FtpUtil.sqlFileUpload(s2); |
| | | //FtpUtil.sqlFileUpload(s2); |
| | | myAsyncService.FTP(s2); |
| | | if (!status) { |
| | | return R.status(false); |
| | | } |
| | |
| | | public R updateDirectiveAndFile(@RequestBody DirectiveVo directive) throws Exception { |
| | | //新增指令信息 |
| | | boolean update = directiveService.updateById(directive); |
| | | if (update) { |
| | | //内网同步 |
| | | String s1 = "update sys_directive set type = " + "'" + directive.getType() + "'" + |
| | | ",send_directive_id = " + "'" + directive.getSendDirectiveId() + "'" + |
| | |
| | | ",send_time = " + "'" + directive.getSendTime() + "'" + |
| | | ",content = " + "'" + directive.getContent() + "'" + |
| | | " " + "where id = " + "'" + directive.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | boolean status = false; |
| | | if (update) { |
| | | //先删除图片 |
| | |
| | | "'" + directiveFile.getType() + "'" + "," + |
| | | "'" + directiveFile.getDirectiveId() + "'" + "," + |
| | | "'" + urls + "'"+ ")"; |
| | | FtpUtil.sqlFileUpload(s2); |
| | | //FtpUtil.sqlFileUpload(s2); |
| | | myAsyncService.FTP(s2); |
| | | if (!status) { |
| | | R.status(false); |
| | | } |
| | |
| | | import io.swagger.annotations.ApiParam; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | import org.springblade.modules.dispatcher.service.IDispatcherUnitService; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springblade.modules.system.vo.UserVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | |
| | | private final IDispatcherUnitService dispatcherUnitService; |
| | | |
| | | private final IUserService userService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 详情 |
| | |
| | | |
| | | /** |
| | | * 结束派遣 |
| | | * |
| | | * @param dispatcher |
| | | */ |
| | | @PostMapping("/over-dispatcher") |
| | |
| | | userService.updateById(user); |
| | | |
| | | |
| | | |
| | | //内网同步 |
| | | String s1 = |
| | | "update sys_dispatcher set status = " + "'" + dispatcher.getStatus() + "'" + |
| | |
| | | " " +"where id = " + "'" + dispatcher.getId() + "';"+ |
| | | "update blade_user set dispatch = " + "'" + user.getDispatch() + "'" + |
| | | " " +"where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | return R.status(status); |
| | | } |
| | | |
| | |
| | | |
| | | //新增派遣记录 |
| | | status = dispatcherService.save(dispatcher); |
| | | |
| | | if (status) { |
| | | //数据同步 |
| | | String s1 = |
| | | "insert into sys_dispatcher(id,dispatcherTime,dispatcherAddress,dispatcher_unit_id,user_ids,end_time,dept_id,jurisdiction,create_time,status) " + |
| | |
| | | "'" + dispatcher.getStatus() + "'" + ");" + |
| | | "update blade_user set dispatch = " + "'" + user.getDispatch() + "'" + |
| | | " " + "where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | } else { |
| | | dispatcher.setUpdateTime(new Date()); |
| | | //查询当前派遣记录 |
| | |
| | | |
| | | //修改 |
| | | status = dispatcherService.updateById(dispatcher); |
| | | |
| | | if (status) { |
| | | //内网同步 |
| | | String s1 = |
| | | "update blade_user set dispatch = " + "'" + user.getDispatch() + "'" + |
| | |
| | | " " + "where id = " + "'" + dispatcher.getId() + "';" + |
| | | "update blade_user set dispatch = " + "'" + user1.getDispatch() + "'" + |
| | | " " + "where id = " + "'" + user1.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | }else { |
| | | //没有修改保安员,只修改了派遣时间等信息 |
| | | //修改 |
| | | status = dispatcherService.updateById(dispatcher); |
| | | |
| | | if (status) { |
| | | //内网同步 |
| | | String s1 = |
| | | "update sys_dispatcher set dispatcherTime = " + "'" + new SimpleDateFormat("yyyy-MM-dd").format(dispatcher.getDispatchertime()) + "'" + |
| | |
| | | ",dept_id = " + "'" + dispatcher.getDeptId() + "'" + |
| | | ",jurisdiction = " + "'" + dispatcher.getJurisdiction() + "'" + |
| | | " " + "where id = " + "'" + dispatcher.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | } |
| | | } |
| | | return R.status(status); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | "'" + dispatcher.getStatus() + "'" + ");" + |
| | | "update blade_user set dispatch = " + "'" + user.getDispatch() + "'" + |
| | | " " + "where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | }else { |
| | | User user = new User(); |
| | |
| | | "'" + dispatcher.getStatus() + "'" + ");" + |
| | | "update blade_user set dispatch = " + "'" + user.getDispatch() + "'" + |
| | | " " + "where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | }else { |
| | | User user = new User(); |
| | |
| | | "'" + dispatcher.getStatus() + "'" + ");" + |
| | | "update blade_user set dispatch = " + "'" + user.getDispatch() + "'" + |
| | | " " + "where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | |
| | | }); |
| | |
| | | " " + "where id = " + "'" + dispatcher.getId() + "';" + |
| | | "update blade_user set dispatch = " + "'" + user1.getDispatch() + "'" + |
| | | " " + "where id = " + "'" + user1.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | }else { |
| | | //修改原保安人员的派遣状态 |
| | |
| | | " " + "where id = " + "'" + dispatcher.getId() + "';" + |
| | | "update blade_user set dispatch = " + "'" + user1.getDispatch() + "'" + |
| | | " " + "where id = " + "'" + user1.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | }else { |
| | | //修改原保安人员的派遣状态 |
| | |
| | | " " + "where id = " + "'" + dispatcher.getId() + "';" + |
| | | "update blade_user set dispatch = " + "'" + user1.getDispatch() + "'" + |
| | | " " + "where id = " + "'" + user1.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | }else { |
| | | if (null!=dispatcherUnit.getDistrict() && !dispatcherUnit.getDistrict().equals("") && !dispatcherUnit.getDistrict().equals(-1)) { |
| | |
| | | ",dept_id = " + "'" + dispatcher.getDeptId() + "'" + |
| | | ",jurisdiction = " + "'" + dispatcher.getJurisdiction() + "'" + |
| | | " " + "where id = " + "'" + dispatcher.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | }else { |
| | | //没有修改保安员,只修改了派遣时间等信息 |
| | |
| | | ",dept_id = " + "'" + dispatcher.getDeptId() + "'" + |
| | | ",jurisdiction = " + "'" + dispatcher.getJurisdiction() + "'" + |
| | | " " + "where id = " + "'" + dispatcher.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | }else { |
| | | //没有修改保安员,只修改了派遣时间等信息 |
| | |
| | | ",dept_id = " + "'" + dispatcher.getDeptId() + "'" + |
| | | ",jurisdiction = " + "'" + dispatcher.getJurisdiction() + "'" + |
| | | " " + "where id = " + "'" + dispatcher.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | } |
| | | return R.status(status); |
| | |
| | | list.forEach(id ->{ |
| | | //内网同步 |
| | | String s1 = "delete from sys_dispatcher where id = " + "'" + id + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | }); |
| | | return R.status(dispatcherService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | |
| | | import org.springblade.modules.dispatcher.vo.DispatcherVO; |
| | | import org.springblade.modules.exam.excel.ExamScoreExcel; |
| | | import org.springblade.modules.exam.excel.ExamScoreImporter; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | |
| | | |
| | | private final IDispatcherUnitService dispatcherUnitService; |
| | | private final IDispatcherService dispatcherService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 详情 |
| | |
| | | |
| | | /** |
| | | * 自定义树 |
| | | * |
| | | * @param dispatcher |
| | | * @return |
| | | */ |
| | |
| | | dispatcherUnit.setCreateTime(new Date()); |
| | | //新增 |
| | | status = dispatcherUnitService.save(dispatcherUnit); |
| | | |
| | | if (status) { |
| | | //数据同步 |
| | | String s1 = |
| | | "insert into sys_dispatcher_unit(id,name,dept_id,linkman,phone,jurisdiction,create_time,start_time,end_time," + |
| | |
| | | "'" + dispatcherUnit.getSecurityLinkman() + "'" + "," + |
| | | "'" + dispatcherUnit.getCell() + "'" + "," + |
| | | "'" +dispatcherUnit.getNum() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | }else { |
| | | //修改 |
| | | status = dispatcherUnitService.updateById(dispatcherUnit); |
| | |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | String endTime = sdf.format(date); |
| | | dispatcherService.updateEndtime(endTime,ids); |
| | | if (status) { |
| | | //内网同步 |
| | | String s1 = |
| | | "update sys_dispatcher_unit set name = " + "'" + dispatcherUnit.getName() + "'" + |
| | |
| | | ",cell = " + "'" + dispatcherUnit.getCell() + "'" + |
| | | ",num = " + "'" + dispatcherUnit.getNum() + "'" + |
| | | " " +"where id = " + "'" + dispatcherUnit.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | //内网同步派遣记录修改合同时间 |
| | | String s2 = |
| | | "update sys_dispatcher set end_time = " + "'" + endTime + "'" +" " + "where dispatcher_unit_id = " + "'" + ids + "'"; |
| | | FtpUtil.sqlFileUpload(s2); |
| | | //FtpUtil.sqlFileUpload(s2); |
| | | myAsyncService.FTP(s2); |
| | | } |
| | | } |
| | | return R.status(status); |
| | | } |
| | |
| | | list.forEach(id ->{ |
| | | //内网同步 |
| | | String s1 = "delete from sys_dispatcher_unit where id = " + "'" + id + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | }); |
| | | return R.status(dispatcherUnitService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | /** |
| | | * 导入派遣单位数据 |
| | | * |
| | | * @param isCovered 1 覆盖 0不覆盖 |
| | | * @return |
| | | */ |
| | |
| | | import org.springblade.modules.dispatcher.vo.DispatcherUnitVO; |
| | | import org.springblade.modules.dispatcher.vo.DispatcherVO; |
| | | import org.springblade.modules.system.service.IUserDeptService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.text.ParseException; |
| | |
| | | private final IDispatcherService dispatcherService; |
| | | |
| | | private final IUserDeptService userDeptService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | @Override |
| | | public IPage<DispatcherUnitVO> selectDispatcherUnitPage(IPage<DispatcherUnitVO> page, DispatcherUnitVO dispatcherUnitVO) { |
| | |
| | | |
| | | /** |
| | | * 派遣公司信息详情 |
| | | * |
| | | * @param dispatcherUnit 派遣信息对象 |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 自定义树 |
| | | * |
| | | * @param dispatcher |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 派遣导入 |
| | | * |
| | | * @param data |
| | | * @param isCovered |
| | | */ |
| | |
| | | "'" + dispatcherUnit.getSecurityLinkman() + "'" + "," + |
| | | "'" + dispatcherUnit.getCell() + "'" + "," + |
| | | "'" + dispatcherUnit.getNum() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | }); |
| | | } |
| | | } |
| | |
| | | import org.springblade.modules.equipage.excel.CarImporter; |
| | | import org.springblade.modules.equipage.service.CarService; |
| | | import org.springblade.modules.equipage.vo.CarVo; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | |
| | | public class CarController { |
| | | |
| | | private final CarService carService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param query page,size |
| | | * @param car 车辆信息对象 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 新增 |
| | | * |
| | | * @param car 车辆信息对象 |
| | | */ |
| | | @PostMapping("/save") |
| | |
| | | |
| | | /** |
| | | * 修改 |
| | | * |
| | | * @param car 车辆信息对象 |
| | | */ |
| | | @PostMapping("/update") |
| | |
| | | |
| | | /** |
| | | * 新增或修改 |
| | | * |
| | | * @param car 车辆信息对象 |
| | | */ |
| | | @PostMapping("/submit") |
| | |
| | | car.setDateForProduction(new Date()); |
| | | //新增 |
| | | status = carService.save(car); |
| | | |
| | | if (status) { |
| | | //数据同步 |
| | | String s1 = |
| | | "insert into sys_car(id,car_number,number_type,car_type,dept_id," + |
| | |
| | | "'" + car.getUmweltsatz() + "'" + "," + |
| | | "'" + car.getMode() + "'" + "," + |
| | | "'" +car.getJurisdiction() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | |
| | | }else { |
| | | //修改 |
| | | status = carService.updateById(car); |
| | | if (status) { |
| | | //内网同步 |
| | | String s1 = |
| | | "update sys_car set car_number = " + "'" + car.getCarNumber() + "'" + |
| | |
| | | ",mode = " + "'" + car.getMode() + "'" + |
| | | ",jurisdiction = " + "'" + car.getJurisdiction() + "'" + |
| | | " " +"where id = " + "'" + car.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | } |
| | | return R.status(status); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param ids 车辆信息ids 数组 |
| | | */ |
| | | @PostMapping("/remove") |
| | |
| | | list.forEach(id ->{ |
| | | //内网同步 |
| | | String s1 = "delete from sys_car where id = " + "'" + id + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | }); |
| | | return R.status(carService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | * |
| | | * @param car 车辆信息对象 |
| | | */ |
| | | @GetMapping("/detail") |
| | |
| | | import org.springblade.modules.equipage.vo.EquipageVo; |
| | | import org.springblade.modules.exam.excel.ExamScoreExcel; |
| | | import org.springblade.modules.exam.excel.ExamScoreImporter; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | |
| | | public class EquipageController { |
| | | |
| | | private final EquipageService equipageService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param query page,size |
| | | * @param equipage 装备信息对象 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 新增 |
| | | * |
| | | * @param equipage 装备信息对象 |
| | | */ |
| | | @PostMapping("/save") |
| | |
| | | |
| | | /** |
| | | * 修改 |
| | | * |
| | | * @param equipage 装备信息对象 |
| | | */ |
| | | @PostMapping("/update") |
| | |
| | | |
| | | /** |
| | | * 新增或修改 |
| | | * |
| | | * @param equipage 装备信息对象 |
| | | */ |
| | | @PostMapping("/submit") |
| | |
| | | if (equipage.getId()==null){ |
| | | //新增 |
| | | status = equipageService.save(equipage); |
| | | |
| | | if (status) { |
| | | //数据推送 |
| | | String s1 = |
| | | "insert into sys_equipage(id,name,number,specifications,mode,dept_id,brand,date_for_production,jurisdiction,person_in_charge,num) " + |
| | |
| | | "'" + equipage.getJurisdiction() + "'" + "," + |
| | | "'" + equipage.getPersonInCharge() + "'" + "," + |
| | | "'" +equipage.getNum() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | }else { |
| | | //修改 |
| | | status = equipageService.updateById(equipage); |
| | | if (status) { |
| | | //内网同步 |
| | | String s1 = |
| | | "update sys_equipage set name = " + "'" + equipage.getName() + "'" + |
| | |
| | | ",num = " + "'" + equipage.getNum() + "'" + |
| | | ",person_in_charge = " + "'" + equipage.getPersonInCharge() + "'" + |
| | | " " +"where id = " + "'" + equipage.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | } |
| | | return R.status(status); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param ids 装备信息ids 数组 |
| | | */ |
| | | @PostMapping("/remove") |
| | |
| | | list.forEach(id ->{ |
| | | //内网同步 |
| | | String s1 = "delete from sys_equipage where id = " + "'" + id + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | }); |
| | | return R.status(equipageService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | * |
| | | * @param equipage 装备信息对象 |
| | | */ |
| | | @GetMapping("/detail") |
| | |
| | | |
| | | /** |
| | | * 导入装备数据 |
| | | * |
| | | * @param isCovered 1 覆盖 0不覆盖 |
| | | * @return |
| | | */ |
| | |
| | | import org.springblade.modules.equipage.excel.GunImporter; |
| | | import org.springblade.modules.equipage.service.GunService; |
| | | import org.springblade.modules.equipage.vo.GunVo; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | |
| | | public class GunController { |
| | | |
| | | private final GunService gunService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param query page,size |
| | | * @param gun 枪支信息对象 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 新增 |
| | | * |
| | | * @param gun 枪支信息对象 |
| | | */ |
| | | @PostMapping("/save") |
| | |
| | | |
| | | /** |
| | | * 修改 |
| | | * |
| | | * @param gun 枪支信息对象 |
| | | */ |
| | | @PostMapping("/update") |
| | |
| | | |
| | | /** |
| | | * 新增或修改 |
| | | * |
| | | * @param gun 枪支信息对象 |
| | | */ |
| | | @PostMapping("/submit") |
| | |
| | | if (null==gun.getId()) { |
| | | //新增 |
| | | status = gunService.save(gun); |
| | | |
| | | if (status) { |
| | | //数据同步 |
| | | String s1 = |
| | | "insert into sys_gun(id,issue_unit,card_number,gun_mode," + |
| | |
| | | "'" + new SimpleDateFormat("yyyy-MM-dd").format(gun.getValidTime()) + "'" + "," + |
| | | "'" +gun.getCardNo() + "'" + "," + |
| | | "'" +gun.getJurisdiction() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | }else { |
| | | //修改 |
| | | status = gunService.updateById(gun); |
| | | if (status) { |
| | | //内网同步 |
| | | String s1 = |
| | | "update sys_gun set issue_unit = " + "'" + gun.getIssueUnit() + "'" + |
| | |
| | | ",jurisdiction = " + "'" + gun.getJurisdiction() + "'" + |
| | | ",card_no = " + "'" + gun.getCardNo() + "'" + |
| | | " " +"where id = " + "'" + gun.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | } |
| | | return R.status(status); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param ids 枪支信息ids 数组 |
| | | */ |
| | | @PostMapping("/remove") |
| | |
| | | list.forEach(id ->{ |
| | | //内网同步 |
| | | String s1 = "delete from sys_gun where id = " + "'" + id + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | }); |
| | | return R.status(gunService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | * |
| | | * @param gun 枪支信息对象 |
| | | */ |
| | | @GetMapping("/detail") |
| | |
| | | import org.springblade.modules.location.service.LiveLocationService; |
| | | import org.springblade.modules.location.service.LocusService; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.io.IOException; |
| | | import java.text.DateFormat; |
| | | import java.text.ParseException; |
| | |
| | | private LocusService locusService; |
| | | @Autowired |
| | | private CarService carService; |
| | | @Autowired |
| | | private MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 押运人员 |
| | |
| | | "'" + liveLocation.getLongitude() + "'" + "," + |
| | | "'" + liveLocation.getLatitude() + "'" + "," + |
| | | "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(liveLocation.getRecordTime()) + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } else { |
| | | status = liveLocationService.updateById(liveLocationInfo); |
| | | //内网同步 |
| | |
| | | ",latitude = " + "'" + liveLocationInfo.getLatitude() + "'" + |
| | | ",record_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(liveLocationInfo.getRecordTime()) + "'" + |
| | | " " + "where id = " + "'" + liveLocationInfo.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | } |
| | | } |
| | |
| | | String track = jsonArray.getJSONObject(0).get("track").toString(); |
| | | if (track.equals("[]")){ |
| | | System.out.println("数据为空"); |
| | | } |
| | | else { |
| | | } else { |
| | | JSONArray jsonArray1 = JSONArray.fromObject(track); |
| | | for (int j = 0; j < jsonArray1.size(); j++) { |
| | | String gis_jd = jsonArray1.getJSONObject(j).get("gis_jd").toString(); |
| | |
| | | s1 += ";"; |
| | | } |
| | | } |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | } |
| | | } |
| | |
| | | if (null == liveLocationInfo) { |
| | | //新增 |
| | | status = liveLocationService.save(liveLocation); |
| | | if (status) { |
| | | //数据推送 |
| | | String s1 = |
| | | "insert into sys_live_location(id,type,worker_id,longitude,latitude,record_time) " + |
| | |
| | | "'" + liveLocation.getLongitude() + "'" + "," + |
| | | "'" + liveLocation.getLatitude() + "'" + "," + |
| | | "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(liveLocation.getRecordTime()) + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | } else { |
| | | status = liveLocationService.updateById(liveLocationInfo); |
| | | //内网同步 |
| | | if (status) { |
| | | String s1 = |
| | | "update sys_live_location set type = " + "'" + liveLocationInfo.getType() + "'" + |
| | | ",worker_id = " + "'" + liveLocationInfo.getWorkerId() + "'" + |
| | |
| | | ",latitude = " + "'" + liveLocationInfo.getLatitude() + "'" + |
| | | ",record_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(liveLocationInfo.getRecordTime()) + "'" + |
| | | " " + "where id = " + "'" + liveLocationInfo.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | |
| | | import org.springblade.modules.equipage.vo.CarVo; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IUserDeptService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private IUserDeptService userDeptService; |
| | | @Autowired |
| | | private MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 车辆分页信息 |
| | |
| | | "," + "'" + car.getBrand() + "'" + |
| | | "," + "'" + car.getUmweltsatz() + "'" + |
| | | "," + "'" + car.getMode() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | |
| | | }); |
| | | }else { |
| | |
| | | import org.springblade.modules.equipage.vo.EquipageVo; |
| | | import org.springblade.modules.system.service.IUserDeptService; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | private final IUserService userService; |
| | | |
| | | private final IUserDeptService userDeptService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | @Override |
| | | public IPage<EquipageVo> selectEquipagePage(IPage<EquipageVo> page, EquipageVo rquipage) { |
| | |
| | | "'" + equipage.getBrand() + "'" + "," + |
| | | "'" + new SimpleDateFormat("yyyy/MM/dd").format(equipage.getDateForProduction()) + "'" + "," + |
| | | "'" + equipage.getNum() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | }else { |
| | | //数据推送 |
| | | String s1 = |
| | |
| | | "'" + equipage.getPersonInCharge() + "'" + "," + |
| | | "'" + equipage.getBrand() + "'" + "," + |
| | | "'" + equipage.getNum() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | }); |
| | | } |
| | |
| | | import org.springblade.modules.equipage.service.GunService; |
| | | import org.springblade.modules.equipage.vo.GunVo; |
| | | import org.springblade.modules.system.service.IUserDeptService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private IUserDeptService userDeptService; |
| | | @Autowired |
| | | private MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 枪支分页信息 |
| | |
| | | "'" + gun.getDeptId() + "'" + "," + |
| | | "'" + gun.getPersonInCharge() + "'" + "," + |
| | | "'" +gun.getCardNo() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | |
| | | }); |
| | | }else { |
| | |
| | | import org.springblade.modules.exam.wrapper.ExamPaperWrapper; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springblade.modules.training.entity.TrainExam; |
| | | import org.springblade.modules.training.entity.TrainingRegistration; |
| | | import org.springblade.modules.training.service.TrainingRegistrationService; |
| | |
| | | |
| | | |
| | | private final IUserService userService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | |
| | | /** |
| | |
| | | |
| | | /** |
| | | * 自定义查询 |
| | | * |
| | | * @param query 分页条件 |
| | | * @param examPaperVO 查询参数 |
| | | * @return |
| | |
| | | public R save(@RequestBody ExamPaper examPaper) { |
| | | boolean save = examPaperService.save(examPaper); |
| | | String format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(examPaper.getStartTime()); |
| | | if (save) { |
| | | String s = "insert into ksxt_exam(id,exam_name,exam_type,start_time) " + |
| | | "values(" + "'" + examPaper.getId() + "'" + "," + "'" + examPaper.getExamName() + |
| | | "'" + "," + "'" + examPaper.getExamType() + |
| | | "'" + "," +"'" + format + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | return R.status(save); |
| | | } |
| | | |
| | |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入exam") |
| | | public R update(@RequestBody ExamPaper exam) { |
| | | boolean b = examPaperService.updateById(exam); |
| | | if (b) { |
| | | String s1 = |
| | | "update ksxt_exam set exam_name = " + "'" + exam.getExamName() + "'" + |
| | | ",start_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(exam.getStartTime()) + "'" + |
| | | " " +"where id = " + "'" + exam.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | return R.status(examPaperService.updateById(exam)); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | return R.status(b); |
| | | } |
| | | |
| | | /** |
| | |
| | | list.forEach(id ->{ |
| | | //内网同步 |
| | | String s1 = "delete from ksxt_exam where id = " + "'" + id + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | }); |
| | | boolean temp = examPaperService.removeByIds(Func.toLongList(ids)); |
| | | return R.status(temp); |
| | |
| | | |
| | | /** |
| | | * 自定义树 |
| | | * |
| | | * @param examPaper |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询考生考试信息 |
| | | * |
| | | * @param examPaper 用户id |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 考试名单确认 |
| | | * |
| | | * @param |
| | | * @return |
| | | */ |
| | |
| | | public R applyConfirm(@RequestBody ExamPaper exam) { |
| | | exam.setConfirmTime(new Date()); |
| | | boolean status = examPaperService.updateById(exam); |
| | | if (status) { |
| | | //内网数据同步 |
| | | String s1 = |
| | | "update ksxt_exam set confirm_user = " + "'" + exam.getConfirmUser()+ "'" |
| | | + ",confirm_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(exam.getConfirmTime())+ "'" |
| | | + " " +"where id = " + "'" + exam.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | //返回数据 |
| | | return R.data(status); |
| | | } |
| | |
| | | |
| | | /** |
| | | * 审核修改 |
| | | * |
| | | * @param examPaper 报名培训申请信息对象 |
| | | */ |
| | | @PostMapping("/update-audit") |
| | |
| | | examPaper.setAuditTime(new Date()); |
| | | //修改考试审核状态 |
| | | status = examPaperService.updateById(examPaper); |
| | | if (status) { |
| | | //数据同步 |
| | | String s1 = |
| | | "update ksxt_exam set audit_status = " + "'" + examPaper.getAuditStatus()+ "'" |
| | | + ",audit_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(examPaper.getAuditTime())+ "'" |
| | | + " " +"where id = " + "'" + examPaper.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | //查询当前考试已报名的人员培训报名数据集合 |
| | | List<TrainingRegistration> trainingRegistrations = examPaperService.getTrainList(examPaper.getId()); |
| | | // System.out.println("trainingRegistrations = " + trainingRegistrations); |
| | |
| | | trainingRegistration.setAuditStatus(3); |
| | | } |
| | | //修改培训报名信息 |
| | | trainingRegistrationService.updateById(trainingRegistration); |
| | | boolean b = trainingRegistrationService.updateById(trainingRegistration); |
| | | if (b) { |
| | | //数据同步 |
| | | String s2 = |
| | | "update sys_training_registration set candidate_no = " + "'" + trainingRegistration.getCandidateNo()+ "'" |
| | | + ",audit_status = " + "'" + trainingRegistration.getAuditStatus() + "'" |
| | | + " " +"where id = " + "'" + trainingRegistration.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s2); |
| | | //FtpUtil.sqlFileUpload(s2); |
| | | myAsyncService.FTP(s2); |
| | | } |
| | | }); |
| | | } |
| | | return R.status(status); |
| | |
| | | |
| | | /** |
| | | * 生成准考证号码 |
| | | * |
| | | * @param examPaper 考试报名信息对象 |
| | | */ |
| | | private String getCandidateNo(ExamPaper examPaper) { |
| | |
| | | |
| | | /** |
| | | * 考试中页面刷新,1查询所有的答题信息,2查询所有的已答信息 3其他信息 |
| | | * |
| | | * @param examPaperVO 必须包含 scoreId |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询考试统计信息 |
| | | * |
| | | * @param examPaperVO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 根据考试id 统计查询考试信息 |
| | | * |
| | | * @param examPaperVO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 导出考试统计情况信息 |
| | | * |
| | | * @param examScoreVO 需要传三个参数 1:培训学校名称,2:培训学校id 3:日期 4:考试类型,培训考试 |
| | | */ |
| | | @GetMapping("export-examStatistics") |
| | |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IRoleService; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springblade.modules.system.vo.UserVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | |
| | | private final ExamPaperService examPaperService; |
| | | |
| | | private final SecurityPaperService securityPaperService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 自定义分页 |
| | |
| | | @ApiOperation(value = "新增", notes = "传入examScore") |
| | | public R save(@RequestBody ExamScore examScore) { |
| | | boolean save = examScoreService.save(examScore); |
| | | if (save) { |
| | | //内网同步 |
| | | 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) " + |
| | | "values(" + "'" + sid + "'" + |
| | | "," + "'" + format + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | //返回 |
| | | return R.status(save); |
| | | } |
| | |
| | | |
| | | /** |
| | | * 点击了开始考试后超过60分钟后再考试的,计算之前的考试成绩 |
| | | * |
| | | * @param examScore 考试成绩信息对象 |
| | | */ |
| | | @GetMapping("/getExamScore") |
| | |
| | | public R updateAbsent(@RequestBody ExamScore examScore) { |
| | | examScore.setQualified(3); |
| | | boolean status = examScoreService.updateByIdAndQualifiee(examScore); |
| | | |
| | | if (status) { |
| | | //内网数据推送 |
| | | String s1 = |
| | | "update exam_score set qualified = " + "'" + examScore.getQualified() + "'" + |
| | | " " + "where id = " + "'" + examScore.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | return R.status(status); |
| | | } |
| | | |
| | |
| | | //修改为持证保安 |
| | | user1.setHold("1"); |
| | | //更新保安数据 |
| | | userService.updateById(user1); |
| | | |
| | | boolean b = userService.updateById(user1); |
| | | if (b) { |
| | | //数据同步 |
| | | String s1 = |
| | | "update blade_user set hold = " + "'" + user1.getHold() + "'" + |
| | | ",securitynumber = " + "'" + user1.getSecuritynumber() + "'" + |
| | | ",user_type = " + "'" + user1.getUserType() + "'" + |
| | | " " + "where id = " + "'" + user1.getId() + "'"; |
| | | |
| | | // String s1 = |
| | | // "insert into sys_security_paper(id,number,create_time,people_name,id_card_no,user_id,apply_id,exam_id) " + |
| | | // "values(" + "'" + securityPaper.getId() + "'" |
| | | // + "," + "'" + securityPaper.getNumber() +"'" |
| | | // + "," + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(securityPaper.getCreateTime()) +"'" |
| | | // + "," + "'" + securityPaper.getPeopleName() + "'" |
| | | // + "," + "'" + securityPaper.getIdCardNo() + "'" |
| | | // + "," + "'" + securityPaper.getUserId() + "'" |
| | | // + "," + "'" + securityPaper.getApplyId() + "'" |
| | | // + "," +"'" + securityPaper.getExamId() + "'" + ");" + |
| | | // "update blade_user set hold = " + "'" + user1.getHold() + "'" + |
| | | // ",securitynumber = " + "'" + user1.getSecuritynumber() + "'" + |
| | | // ",user_type = " + "'" + user1.getUserType() + "'" + |
| | | // " " + "where id = " + "'" + user1.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | } |
| | | } else { |
| | | //不合格 |
| | |
| | | ",all_grade = " + "'" + examScore.getAllGrade() + "'" + |
| | | ",qualified = " + "'" + examScore.getQualified() + "'" + |
| | | " " + "where id = " + "'" + examScore.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | |
| | | //本地修改 |
| | | return R.status(examScoreService.updateById(examScore)); |
| | |
| | | list.forEach(id -> { |
| | | //内网同步 |
| | | String s1 = "delete from exam_score where id = " + "'" + id + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | }); |
| | | return R.status(examScoreService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | |
| | | cjhz.put("sccj",sccj); |
| | | return R.data(cjhz); |
| | | } |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | |
| | | |
| | | /** |
| | | * 考试成绩及状态修改 |
| | | * |
| | | * @param updateParamVo |
| | | */ |
| | | @GetMapping("/update-exam-score") |
| | |
| | | |
| | | /** |
| | | * 考试重置(重考) |
| | | * |
| | | * @param updateParamVo |
| | | */ |
| | | @PostMapping("/refreshTrainExamInfo") |
| | |
| | | |
| | | /** |
| | | * 考试成绩恢复状态重置(重考) |
| | | * |
| | | * @param |
| | | */ |
| | | @GetMapping("/refreshTrainExamScore") |
| | |
| | | |
| | | /** |
| | | * 考试情况统计,按月统计各个培训学校考试合格人数和不合格人数 |
| | | * |
| | | * @param |
| | | */ |
| | | @GetMapping("/getExamStatisInfo") |
| | |
| | | |
| | | /** |
| | | * 获取当前时间 |
| | | * |
| | | * @param |
| | | */ |
| | | @GetMapping("/getNowDate") |
| | | public R getNowDate() { |
| | | return R.data(System.currentTimeMillis()); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | /** |
| | | * 导入题库 |
| | | * |
| | | * @param isCovered 1 覆盖 0不覆盖 |
| | | * @return |
| | | */ |
| | |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IRoleService; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springblade.modules.system.vo.UserVO; |
| | | import org.springblade.modules.training.entity.TrainingRegistration; |
| | | import org.springblade.modules.training.service.TrainingRegistrationService; |
| | |
| | | |
| | | /** |
| | | * 考试成绩服务实现类 |
| | | * |
| | | * @author zhongrj |
| | | */ |
| | | @Service |
| | |
| | | |
| | | @Autowired |
| | | private IInformationService informationService; |
| | | |
| | | @Autowired |
| | | private MyAsyncService myAsyncService; |
| | | |
| | | |
| | | /** |
| | | * 自定义分页数据 |
| | | * |
| | | * @param page 分页条件 |
| | | * @param examScore 考试成绩对象 |
| | | * @return |
| | |
| | | |
| | | /** |
| | | * 详情 |
| | | * |
| | | * @param examScore 考试成绩信息对象 |
| | | */ |
| | | @Override |
| | |
| | | |
| | | /** |
| | | * 保存考试成绩 |
| | | * |
| | | * @param examScore 考试成绩信息对象 |
| | | * @return |
| | | */ |
| | |
| | | String s = |
| | | "update sys_apply set is_exam = " + apply1.getIsExam() + " " +"where id = " + "'" + apply1.getId() + "';" + |
| | | "update blade_user set is_apply = " + user.getIsApply() + " " +"where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | |
| | | } |
| | | //模拟考试 |
| | |
| | | String s = |
| | | "update sys_training_registration set is_exam = " + trainingRegistration1.getIsExam() + " " +"where id = " + "'" + trainingRegistration1.getId() + "';" + |
| | | "update blade_user set is_train = " + user.getIsTrain() + " " +"where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | |
| | | //设置考试ID |
| | |
| | | ",exam_end_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:dd").format(examScore.getExamEndTime()) + "'" + |
| | | ",qualified = " + "'" + examScore.getQualified() + "'" + |
| | | " " +"where id = " + "'" + examScore.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | |
| | | if (i>0){ |
| | | //返回结果 |
| | |
| | | |
| | | /** |
| | | * 导入实操成绩 |
| | | * |
| | | * @param examScoreExcelList |
| | | * @param isCovered 是否覆盖 |
| | | */ |
| | |
| | | // ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getUpdateTime()) + "'" + |
| | | // ",user_type = " + "'" + user.getUserType() + "'" + |
| | | // " " + "where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | } |
| | | } else { |
| | |
| | | ",all_grade = " + "'" + examScore.getAllGrade() + "'" + |
| | | ",qualified = " + "'" + examScore.getQualified() + "'" + |
| | | " " + "where id = " + "'" + examScore.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | //更新成绩数据 |
| | | baseMapper.updateById(examScore); |
| | | }else { |
| | |
| | | public List<Map<String, Object>> scoreStatistics(String deptid,String jurisdiction) { |
| | | return baseMapper.scoreStatistics(deptid,jurisdiction); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> scoreStatisticssc(String deptid,String jurisdiction) { |
| | | return baseMapper.scoreStatisticssc(deptid,jurisdiction); |
| | |
| | | |
| | | /** |
| | | * 修改成绩信息 |
| | | * |
| | | * @param examScore |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 考试成绩及状态修改 |
| | | * |
| | | * @param updateParamVo |
| | | */ |
| | | @Override |
| | |
| | | |
| | | /** |
| | | * 考试重置 |
| | | * |
| | | * @param updateParamVo |
| | | * @return |
| | | */ |
| | |
| | | "update blade_user set is_train = " + "'" + user.getIsTrain() + "'" + |
| | | " " + "where id = " + "'" + user.getId() + "';"+ |
| | | "delete from exam_score where id = " + "'" + updateParamVo.getScoreId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | |
| | | return true; |
| | | } |
| | |
| | | "update blade_user set is_train = " + "'" + user.getIsTrain() + "'" + |
| | | " " + "where id = " + "'" + user.getId() + "';"+ |
| | | "delete from exam_score where id = " + "'" + updateParamVo.getScoreId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | |
| | | return true; |
| | | } |
| | |
| | | |
| | | /** |
| | | * 按条件查询成绩数据 |
| | | * |
| | | * @param examScoreVO |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 考试状态修改,考试成绩恢复 |
| | | * |
| | | * @param |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 点击了开始考试后超过60分钟后再考试的,计算之前的考试成绩 |
| | | * |
| | | * @param examScore |
| | | * @return |
| | | */ |
| | |
| | | String s = |
| | | "update sys_training_registration set is_exam = " + trainingRegistration1.getIsExam() + " " +"where id = " + "'" + trainingRegistration1.getId() + "';" + |
| | | "update blade_user set is_train = " + user.getIsTrain() + " " +"where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | |
| | | //设置理论得分 |
| | | score.setTheoryGrade(count); |
| | |
| | | ",exam_end_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:dd").format(new Date()) + "'" + |
| | | ",qualified = " + "'" + score.getQualified() + "'" + |
| | | " " +"where id = " + "'" + score.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | |
| | | if (i>0){ |
| | | //返回结果 |
| | |
| | | |
| | | /** |
| | | * 考试情况统计,按月统计各个培训学校考试合格人数和不合格人数 |
| | | * |
| | | * @param |
| | | */ |
| | | @Override |
| | |
| | | import org.springblade.modules.exam.vo.ExamSubjectChoicesVO; |
| | | import org.springblade.modules.simulateexam.entity.SimulateExamAnswerRecord; |
| | | import org.springblade.modules.simulateexam.service.SimulateExamAnswerRecordService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | |
| | | /** |
| | | * 选择题服务实现类 |
| | | * |
| | | * @author zhongrj |
| | | */ |
| | | @Service |
| | |
| | | |
| | | @Autowired |
| | | private SimulateExamAnswerRecordService simulateExamAnswerRecordService; |
| | | @Autowired |
| | | private MyAsyncService myAsyncService; |
| | | |
| | | |
| | | @Override |
| | |
| | | |
| | | /** |
| | | * 详情 |
| | | * |
| | | * @param examSubjectChoices 选择题信息对象 |
| | | */ |
| | | @Override |
| | |
| | | |
| | | /** |
| | | * 新增题目及选项信息 |
| | | * |
| | | * @param examSubjectChoices 题目信息对象 |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 题库导入 |
| | | * |
| | | * @param data 导入数据 |
| | | * @param isCovered |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 判断当前题目的答题结果 |
| | | * |
| | | * @param preSubJectId 题目Id |
| | | * @param preResult 提交的结果 |
| | | * @param scoreId 成绩id |
| | |
| | | |
| | | /** |
| | | * 新增答题记录 |
| | | * |
| | | * @param choices 题目 |
| | | * @param preSubJectId 上一题题目id |
| | | * @param preResult 上一题答题结果 |
| | |
| | | "," + "'" + examAnswerRecord.getAnswerScore() + "'" + |
| | | "," + "'" + examAnswerRecord.getAnswerResult() + "'" + |
| | | "," + "'" + examAnswerRecord.getScoreId() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | |
| | | /** |
| | | * 随机查询题库120道 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | |
| | | |
| | | /** |
| | | * 判断当前题目的答题结果 |
| | | * |
| | | * @param preSubJectId 题目 id |
| | | * @param preResult 提交的结果 |
| | | * @param simulateExamId 模拟考试记录 id |
| | |
| | | |
| | | /** |
| | | * 新增模拟考试答题记录 |
| | | * |
| | | * @param choices 题目信息 |
| | | * @param preSubJectId 题目id |
| | | * @param preResult 提交的答案 |
| | |
| | | import org.springblade.modules.securitypaper.service.SecurityPaperService; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springblade.modules.system.vo.UserVO; |
| | | import org.springblade.modules.training.entity.TrainingRegistration; |
| | | import org.springblade.modules.training.service.TrainingRegistrationService; |
| | |
| | | |
| | | @Autowired |
| | | private SecurityPaperService securityPaperService; |
| | | @Autowired |
| | | private MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 自定义分页 |
| | |
| | | " " + "where id = " + "'" + trainingRegistration.getId() + "';"+ |
| | | "update blade_user set is_train = " + "'" + user.getIsTrain() + "'" + |
| | | " " + "where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } else { |
| | | //实操成绩不为空 |
| | | if (examScore.getTheoryGrade() >= 60 && examScore.getLearnGrade() >= 60) { |
| | |
| | | + "," + "'" + securityPaper.getUserId() + "'" |
| | | + "," + "'" + securityPaper.getApplyId() + "'" |
| | | + "," +"'" + securityPaper.getExamId() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | } else { |
| | | //不合格 |
| | |
| | | ",user_type = " + "'" + user.getUserType() + "'" + |
| | | ",is_train = " + "'" + user.getIsTrain() + "'" + |
| | | " " + "where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | } |
| | | //审核时间 |
| | |
| | | " " + "where id = " + "'" + trainingRegistration.getId() + "';"+ |
| | | "update blade_user set is_train = " + "'" + user.getIsTrain() + "'" + |
| | | " " + "where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } else { |
| | | //实操成绩不为空 |
| | | if (examScore.getTheoryGrade() >= 60 && examScore.getLearnGrade() >= 60) { |
| | |
| | | ",user_type = " + "'" + user.getUserType() + "'" + |
| | | ",is_train = " + "'" + user.getIsTrain() + "'" + |
| | | " " + "where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | } |
| | | //审核时间 |
| | |
| | | import org.springblade.modules.experience.vo.ExperienceVO; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | |
| | | |
| | | |
| | | private final IUserService userService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 详情 |
| | |
| | | + ",companyname = " + "'" + experience.getCompanyname() + "'" |
| | | + ",securityId = " + "'" + experience.getSecurityid() + "'" |
| | | + " " + "where id = " + "'" + experience.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | |
| | | }else { |
| | | //新增 |
| | |
| | | "," + "'" + experience.getCompanyname() + "'" + |
| | | "," + "'" + experience.getSecurityid() + "'" |
| | | + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | return R.status(status); |
| | | } |
| | |
| | | import org.springblade.modules.system.service.IDeptService; |
| | | import org.springblade.modules.system.service.IRoleService; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | private final IUserService userService; |
| | | |
| | | private final IRoleService roleService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 详情 |
| | |
| | | Role oneRole = roleService.getOne(Condition.getQueryWrapper(role)); |
| | | user.setRoleId(oneRole.getId().toString()); |
| | | //插入用户数据 |
| | | userService.save(user); |
| | | |
| | | boolean save = userService.save(user); |
| | | if (save) { |
| | | Integer isDeleted = 0; |
| | | //Integer id = information.getId(); |
| | | String s = "insert into sys_information(id,creditCode,enterpriseName,representative" + |
| | | ",registeredCapital,organizationCode,registrationNumber, enterprises, address," + |
| | | " business,region,registration,industry,departmentid,stats,jurisdiction,representativecell," + |
| | |
| | | "," + "'" + user.getStatus() + "'" + |
| | | "," + "'" + user.getIsDeleted() + "'" + |
| | | "," + "'" + user.getRoleId() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | |
| | | } |
| | | } |
| | | return R.success("成功"); |
| | | } |
| | |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入information") |
| | | public R update(@Valid @RequestBody Information information) throws Exception { |
| | | informationService.updateById(information); |
| | | boolean b = informationService.updateById(information); |
| | | if (b) { |
| | | String businessLicense = null; |
| | | String businessLicenses = null; |
| | | String licence = null; |
| | |
| | | ",business_License = " + "'" + businessLicenses + "'" + |
| | | ",licence = " + "'" + licences + "'" + |
| | | " " + "where id = " + "'" + information.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | return R.success("修改成功"); |
| | | } |
| | | |
| | |
| | | informationService.deleteUserByDeptId(s); |
| | | //保安公司信息 |
| | | String s1 = "delete from sys_information where departmentid = " + "'" + s + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | //主要管理人 |
| | | String s2 = "delete from sys_shareholder where dept_id = " + "'" + s + "'"; |
| | | FtpUtil.sqlFileUpload(s2); |
| | | //FtpUtil.sqlFileUpload(s2); |
| | | myAsyncService.FTP(s2); |
| | | //出资人 |
| | | String s3 = "delete from sys_member where dept_id = " + "'" + s + "'"; |
| | | FtpUtil.sqlFileUpload(s3); |
| | | //FtpUtil.sqlFileUpload(s3); |
| | | myAsyncService.FTP(s3); |
| | | //组织机构信息逻辑删除 |
| | | String s4 = "update blade_dept set is_deleted = 1 where id = " + "'" + s + "'"; |
| | | FtpUtil.sqlFileUpload(s4); |
| | | //FtpUtil.sqlFileUpload(s4); |
| | | myAsyncService.FTP(s4); |
| | | //保安公司人员信息删除 |
| | | String s5 = "update blade_user set is_deleted = 1 where dept_id " + "'" + s + "'"; |
| | | FtpUtil.sqlFileUpload(s5); |
| | | //FtpUtil.sqlFileUpload(s5); |
| | | myAsyncService.FTP(s5); |
| | | }); |
| | | //返回 |
| | | return R.success("删除成功"); |
| | |
| | | } |
| | | return R.data(list); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | |
| | | /** |
| | | * 查询学历统计信息 |
| | | * |
| | | * @param deptid 部门id |
| | | * @param jurisdiction 辖区 |
| | | * @return |
| | |
| | | |
| | | /** |
| | | * 获取部门信息() |
| | | * |
| | | * @param information |
| | | * @return |
| | | */ |
| | |
| | | import org.springblade.modules.location.vo.LiveLocationVOTest; |
| | | import org.springblade.modules.location.vo.LiveLocationVo; |
| | | import org.springblade.modules.location.vo.LocusVo; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | |
| | | |
| | | |
| | | private final LocusService locusService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param query page,size |
| | | * @param liveLocation 实时位置信息对象 |
| | | * |
| | | */ |
| | | @GetMapping("/page") |
| | | public R<IPage<LiveLocationVo>> page(LiveLocationVo liveLocation, Query query) { |
| | |
| | | |
| | | /** |
| | | * 新增 |
| | | * |
| | | * @param liveLocation 实时位置信息对象 |
| | | */ |
| | | @PostMapping("/save") |
| | |
| | | |
| | | /** |
| | | * 实时位置信息新增,同时新增到轨迹表中 |
| | | * |
| | | * @param liveLocation 实时位置信息对象 |
| | | */ |
| | | @PostMapping("/saveLiveLocationAndLocus") |
| | |
| | | //新增 |
| | | liveLocation.setRecordTime(new Date()); |
| | | status = liveLocationService.save(liveLocation); |
| | | if (status) { |
| | | //数据推送 |
| | | String s1 = |
| | | "insert into sys_live_location(id,type,worker_id,longitude,latitude,record_time,location) " + |
| | |
| | | "'" + liveLocation.getLatitude() + "'" + "," + |
| | | "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(liveLocation.getRecordTime()) + "'" + "," + |
| | | "'" +liveLocation.getLocation() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | }else { |
| | | //更新 |
| | | liveLocationInfo.setRecordTime(new Date()); |
| | | liveLocationInfo.setLongitude(liveLocation.getLongitude()); |
| | | liveLocationInfo.setLatitude(liveLocation.getLatitude()); |
| | | status = liveLocationService.updateById(liveLocationInfo); |
| | | |
| | | if (status) { |
| | | //内网同步 |
| | | String s1 = |
| | | "update sys_live_location set type = " + "'" + liveLocation.getType() + "'" + |
| | |
| | | ",record_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(liveLocation.getRecordTime()) + "'" + |
| | | ",location = " + "'" + liveLocation.getLocation() + "'" + |
| | | " " +"where id = " + "'" + liveLocation.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | } |
| | | |
| | | if (status){ |
| | |
| | | "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(locus.getRecordTime()) + "'" + "," + |
| | | "'" + locus.getLongitude() + "'" + "," + |
| | | "'" +locus.getLatitude() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s2); |
| | | //FtpUtil.sqlFileUpload(s2); |
| | | myAsyncService.FTP(s2); |
| | | |
| | | if (save1){ |
| | | //返回数据 |
| | |
| | | |
| | | /** |
| | | * 实时位置信息新增,同时新增到轨迹表中 |
| | | * |
| | | * @param locationVOTest 实时位置信息对象 |
| | | */ |
| | | @PostMapping("/saveLiveLocationAndLocusAsTest") |
| | |
| | | //新增 |
| | | liveLocation.setRecordTime(new Date()); |
| | | status = liveLocationService.save(liveLocation); |
| | | if (status) { |
| | | //数据推送 |
| | | String s1 = |
| | | "insert into sys_live_location(id,type,worker_id,longitude,latitude,record_time,location) " + |
| | |
| | | "'" + liveLocation.getLatitude() + "'" + "," + |
| | | "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(liveLocation.getRecordTime()) + "'" + "," + |
| | | "'" +liveLocation.getLocation() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | }else { |
| | | //更新 |
| | | liveLocationInfo.setRecordTime(new Date()); |
| | | liveLocationInfo.setLongitude(liveLocation.getLongitude()); |
| | | liveLocationInfo.setLatitude(liveLocation.getLatitude()); |
| | | status = liveLocationService.updateById(liveLocationInfo); |
| | | |
| | | if (status) { |
| | | //内网同步 |
| | | String s1 = |
| | | "update sys_live_location set type = " + "'" + liveLocation.getType() + "'" + |
| | |
| | | ",record_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(liveLocation.getRecordTime()) + "'" + |
| | | ",location = " + "'" + liveLocation.getLocation() + "'" + |
| | | " " +"where id = " + "'" + liveLocation.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | } |
| | | |
| | | if (status){ |
| | |
| | | "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(locus.getRecordTime()) + "'" + "," + |
| | | "'" + locus.getLongitude() + "'" + "," + |
| | | "'" +locus.getLatitude() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s2); |
| | | myAsyncService.FTP(s2); |
| | | //FtpUtil.sqlFileUpload(s2); |
| | | |
| | | if (save1){ |
| | | //返回数据 |
| | |
| | | |
| | | /** |
| | | * 修改 |
| | | * |
| | | * @param liveLocation 实时位置信息对象 |
| | | */ |
| | | @PostMapping("/update") |
| | |
| | | |
| | | /** |
| | | * 新增或修改 |
| | | * |
| | | * @param liveLocation 实时位置信息对象 |
| | | */ |
| | | @PostMapping("/submit") |
| | |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param ids 实时位置信息ids 数组 |
| | | */ |
| | | @PostMapping("/remove") |
| | |
| | | |
| | | /** |
| | | * 详情 |
| | | * |
| | | * @param liveLocation 实时位置信息对象 |
| | | */ |
| | | @GetMapping("/detail") |
| | |
| | | |
| | | /** |
| | | * 获取轨迹数据 |
| | | * |
| | | * @param liveLocationVo 实时对象信息 |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 首页实时定位 |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("/getLiveLocationVoList") |
| | |
| | | import org.springblade.modules.location.service.LocusService; |
| | | import org.springblade.modules.location.vo.LocusVo; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | private final LocusService locusService; |
| | | private final CarService carService; |
| | | private IUserService userService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 自定义分页 |
| | |
| | | s1 += ";"; |
| | | } |
| | | } |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | deletescsv(substring); |
| | | } |
| | | deletescsv(substring); |
| | |
| | | |
| | | /** |
| | | * 删除本地csv文件 |
| | | * |
| | | * @param fileName |
| | | */ |
| | | public static void deletescsv(String fileName){ |
| | |
| | | import org.springblade.modules.member.vo.MemberVO; |
| | | import org.springblade.modules.shareholder.excel.shareExcel; |
| | | import org.springblade.modules.shareholder.excel.shareImporter; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | |
| | | public class MemberController extends BladeController { |
| | | |
| | | private final IMemberService memberService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 详情 |
| | |
| | | @ApiOperation(value = "新增", notes = "传入member") |
| | | public R save(@Valid @RequestBody Member member) throws Exception { |
| | | boolean save = memberService.save(member); |
| | | if (save) { |
| | | String s1 = |
| | | "insert into sys_member(id,name,post,cardid,cell,creditCode,dept_id) " + |
| | | "values(" + "'" + member.getId() + "'" + "," + |
| | |
| | | "'" + member.getCell() + "'"+"," + |
| | | "'" + member.getCreditcode() + "'"+"," + |
| | | "'" + member.getDeptId() + "'"+")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | return R.status(save); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "修改", notes = "传入member") |
| | | public R update(@Valid @RequestBody Member member) throws Exception { |
| | | boolean b = memberService.updateById(member); |
| | | if (b) { |
| | | String s1 = "update sys_member set name = " + "'" + member.getName() + "'" + |
| | | ",post = " + "'" + member.getPost() + "'" + |
| | | ",cardid = " + "'" + member.getCardid() + "'" + |
| | |
| | | ",creditCode = " + "'" + member.getCreditcode() + "'" + |
| | | ",dept_id = " + "'" + member.getDeptId() + "'" + |
| | | " " + "where id = " + "'" + member.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | return R.status(b); |
| | | } |
| | | |
| | |
| | | List<Long> list = Func.toLongList(ids); |
| | | list.forEach(id -> { |
| | | String s1 = "delete from sys_member where id = " + "'" + id + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | }); |
| | | return R.status(memberService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | |
| | | import org.springblade.modules.performance.entity.Performance; |
| | | import org.springblade.modules.performance.service.IPerformanceService; |
| | | import org.springblade.modules.performance.vo.PerformanceVO; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | |
| | | public class PerformanceController extends BladeController { |
| | | |
| | | private final IPerformanceService performanceService; |
| | | |
| | | private final MyAsyncService myAsyncService; |
| | | /** |
| | | * 详情 |
| | | */ |
| | |
| | | "'" + performance.getAchievements() + "'" + "," + |
| | | "'" + new SimpleDateFormat("yyyy-MM-dd").format(performance.getTime()) + "'" + "," + |
| | | "'" + performance.getScore() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | return R.status(save); |
| | | } |
| | | |
| | |
| | | ",time = " + "'" + new SimpleDateFormat("yyyy-MM-dd").format(performance.getTime()) + "'" + |
| | | ",score = " + "'" + performance.getScore() + "'" + |
| | | " " + "where id = " + "'" + performance.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | return R.status(b); |
| | | } |
| | | |
| | |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IDeptService; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import sun.net.www.http.HttpClient; |
| | | |
| | |
| | | private final IInformationService informationService; |
| | | private final IUserService userService; |
| | | private final IAttachService attachService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 详情 |
| | |
| | | "'" + permit.getRepresentativecell() + "'" + "," + "'" + permit.getContacts() + "'" + "," + "'" |
| | | + permit.getContactscell() + "'" + "," + "'" + permit.getJurisdiction() + "'" + |
| | | "," + "'" + permit.getCardid() + "'" + "," + "'" + overtime + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | return R.success("许可提交成功"); |
| | | } |
| | | |
| | |
| | | permit.setType("2"); |
| | | permit.setStorage("1"); |
| | | permit.setPermitime(new Date()); |
| | | permitService.save(permit); |
| | | boolean save = permitService.save(permit); |
| | | //String pertime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(permit.getPermitime()); |
| | | String overtime = new SimpleDateFormat("yyyy-MM-dd").format(permit.getOvertime()); |
| | | if (save) { |
| | | String s = "insert into sys_permit(id,creditCode,enterpriseName,representative," + |
| | | "registeredCapital,organizationCode,registrationNumber,identificationNumber,enterprises," + |
| | | "address,business,region,registration,industry,type,deptid,ptype,representativecell,contacts,contactscell,jurisdiction,cardid,overtime)" + |
| | |
| | | "'" + permit.getRepresentativecell() + "'" + "," + "'" + permit.getContacts() + "'" + "," + "'" |
| | | + permit.getContactscell() + "'" + "," + "'" + permit.getJurisdiction() + "'" + |
| | | "," + "'" + permit.getCardid() + "'" + "," + "'" + overtime + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | //返回 |
| | | return R.data(permit); |
| | | } |
| | |
| | | user.setRoleId("1414575196264300546"); |
| | | user.setStatus(1); |
| | | user.setIsDeleted(0); |
| | | userService.save(user); |
| | | boolean save = userService.save(user); |
| | | if (save) { |
| | | String roleid = "1415563428727328770"; |
| | | String s = "insert into sys_information(id,creditCode,enterpriseName,representative" + |
| | | ",registeredCapital,organizationCode,registrationNumber, enterprises, address," + |
| | |
| | | "," + "'" + information.getContacts() + "'" + |
| | | "," + "'" + information.getContactscell() + "'" + |
| | | "," + "'" + information.getCreateUserId() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | String ss = "insert into blade_dept(id,parent_id,tenant_id,dept_name,ancestors,dept_category,is_deleted) values(" + "'" + dept.getId() + "'" + "," + "'" + dept.getParentId() + "'" + "," |
| | | + "'" + dept.getTenantId() + "'" + |
| | | "," + "'" + information.getEnterprisename() + "'" + |
| | | "," + "'" + dept.getAncestors() + "'" + |
| | | "," + "'" + dept.getDeptCategory() + "'" + |
| | | "," + "'" + isDeleted + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(ss); |
| | | myAsyncService.FTP(ss); |
| | | String rtime; |
| | | String paperTime; |
| | | if (user.getRtime() == null) { |
| | |
| | | "," + "'" + user.getStatus() + "'" + |
| | | "," + "'" + user.getIsDeleted() + "'" + |
| | | "," + "'" + user.getDispatch() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(sss); |
| | | //// //注册用户 |
| | | //// User user = new User(); |
| | | //// user.setAccount(permit.getEnterprisename()); |
| | | //// String initPassword = ParamCache.getValue(DEFAULT_PARAM_PASSWORD); |
| | | //// user.setPassword(initPassword); |
| | | //// user.setRoleId("1414575196264300546"); |
| | | //// user.setDeptId(information.getDepartmentid()); |
| | | //// userService.saveOrUpdate(user); |
| | | // //把附件添加单位id |
| | | // attachService.updat(information.getDepartmentid(), permit.getCardid()); |
| | | myAsyncService.FTP(sss); |
| | | //把附件添加单位id |
| | | String s1 = "update sys_permit set type = " + "'" + 0 + "'" + ",approve = " + "'" + permit.getApprove() + "'" + |
| | | " " + "where id = " + "'" + permit.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | } else { |
| | | String s1 = "update sys_permit set type = " + "'" + 1 + "'" + ",approve = " + "'" + permit.getApprove() + "'" + |
| | | " " + "where id = " + "'" + permit.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | return R.success("成功"); |
| | | } |
| | |
| | | |
| | | /** |
| | | * 保安公司/培训学校许可设立详情(基本信息和附件列表信息) |
| | | * |
| | | * @param record |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 许可备案集合信息 |
| | | * |
| | | * @param record |
| | | * @return |
| | | */ |
| | |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IDeptService; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | |
| | | private final IInformationService informationService; |
| | | private final IUserService userService; |
| | | private final IAttachService attachService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 详情 |
| | |
| | | String id = map.get("id").toString(); |
| | | recordService.removeByIds(Func.toLongList(id)); |
| | | String s1 = "delete from sys_record where id = " + "'" + id + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | record.setStorage("1"); |
| | | record.setType("2"); |
| | | record.setPermitime(new Date()); |
| | | recordService.save(record); |
| | | //String offtime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(record.getOfficetime()); |
| | | //String pertime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(record.getPermitime()); |
| | | boolean save = recordService.save(record); |
| | | if (save) { |
| | | String s = "insert into sys_record(id,representative," + |
| | | "address,business,registration,industry,type,ptype,representativecell,contacts,contactscell,perid,offices,jurisdiction,cardid,storage,overtime)" + |
| | | "values(" + "'" + record.getId() + "'" + "," + |
| | |
| | | "," + "'" + record.getStorage() + "'" + |
| | | "," + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(record.getOvertime()) + "'" |
| | | + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | return R.success("成功"); |
| | | } |
| | | |
| | |
| | | user.setRoleId("1414575196264300546"); |
| | | user.setStatus(1); |
| | | user.setIsDeleted(0); |
| | | userService.save(user); |
| | | boolean save = userService.save(user); |
| | | if (save) { |
| | | String roleid = "1415563428727328770"; |
| | | String s = "insert into sys_information(id,creditCode,enterpriseName,representative" + |
| | | ",registeredCapital,organizationCode,registrationNumber, enterprises, address," + |
| | |
| | | "," + "'" + information.getContacts() + "'" + |
| | | "," + "'" + information.getContactscell() + "'" + |
| | | "," + "'" + information.getCreateUserId() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | String ss = "insert into blade_dept(id,parent_id,tenant_id,dept_name,ancestors,dept_category,is_deleted) values(" + "'" + dept.getId() + "'" + "," + "'" + dept.getParentId() + "'" + "," |
| | | + "'" + dept.getTenantId() + "'" + |
| | | "," + "'" + information.getEnterprisename() + "'" + |
| | | "," + "'" + dept.getAncestors() + "'" + |
| | | "," + "'" + dept.getDeptCategory() + "'" + |
| | | "," + "'" + isDeleted + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(ss); |
| | | myAsyncService.FTP(ss); |
| | | String rtime; |
| | | String paperTime; |
| | | if (user.getRtime() == null) { |
| | |
| | | "," + "'" + user.getStatus() + "'" + |
| | | "," + "'" + user.getIsDeleted() + "'" + |
| | | "," + "'" + user.getDispatch() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(sss); |
| | | // Integer isDeleted = 0; |
| | | // //注册用户 |
| | | // User user = new User(); |
| | | // user.setDeptId(information.getDepartmentid()); |
| | | // user.setTenantId("000000"); |
| | | // user.setAccount(record.getEnterprisename()); |
| | | // String initPassword = ParamCache.getValue(DEFAULT_PARAM_PASSWORD); |
| | | // user.setPassword(initPassword); |
| | | // user.setCreateTime(new Date()); |
| | | // user.setUpdateTime(new Date()); |
| | | // user.setRoleId("1414575196264300546"); |
| | | // user.setStatus(1); |
| | | // user.setIsDeleted(0); |
| | | // userService.save(user); |
| | | // String roleid = "1415563428727328770"; |
| | | // String s = "insert into sys_information(id,creditCode,enterpriseName,representative" + |
| | | // ",registeredCapital,organizationCode,registrationNumber, enterprises, address," + |
| | | // " business,region,registration,industry,departmentid,stats,jurisdiction,representativecell," + |
| | | // "contacts,contactscell,create_time,create_user_id) " + |
| | | // "values(" + "'" + information.getId() + "'" + |
| | | // "," + "'" + information.getCreditcode() + "'" + |
| | | // "," + "'" + information.getEnterprisename() + "'" + |
| | | // "," + "'" + information.getRepresentative() + "'" + |
| | | // "," + "'" + information.getRegisteredcapital() + "'" + |
| | | // "," + "'" + information.getOrganizationcode() + "'" + |
| | | // "," + "'" + information.getRegistrationnumber() + "'" + |
| | | // "," + "'" + information.getEnterprises() + "'" + |
| | | // "," + "'" + information.getAddress() + "'" + |
| | | // "," + "'" + information.getBusiness() + "'" + |
| | | // "," + "'" + information.getRegion() + "'" + |
| | | // "," + "'" + information.getRegistration() + "'" + |
| | | // "," + "'" + information.getIndustry() + "'" + |
| | | // "," + "'" + information.getDepartmentid() + "'" + |
| | | // "," + "'" + information.getStats() + "'" + |
| | | // "," + "'" + information.getJurisdiction() + "'" + |
| | | // "," + "'" + information.getRepresentativecell() + "'" + |
| | | // "," + "'" + information.getContacts() + "'" + |
| | | // "," + "'" + information.getContactscell() + "'" + |
| | | // "," + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(information.getCreateTime()) + "'" + |
| | | // "," + "'" + information.getCreateUserId() + "'" + ");" + |
| | | // "insert into blade_dept(id,parent_id,tenant_id,dept_name,ancestors,dept_category,is_deleted) values(" + "'" + information.getDepartmentid() + "'" + "," + "'" + dept.getParentId() + "'" + "," |
| | | // + "'" + dept.getTenantId() + "'" + |
| | | // "," + "'" + information.getEnterprisename() + "'" + |
| | | // "," + "'" + dept.getAncestors() + "'" + |
| | | // "," + "'" + dept.getDeptCategory() + "'" + |
| | | // "," + "'" + isDeleted + "'" + ");" + |
| | | // "insert into blade_user(id,tenant_id,account,password,role_id,dept_id,create_time,update_time,status,is_deleted) " + |
| | | // "values(" + "'" + user.getId() + "'" + |
| | | // "," + "'" + user.getTenantId() + "'" |
| | | // + "," + "'" + user.getAccount() + "'" + |
| | | // "," + "'" + user.getPassword() + "'" + |
| | | // "," + "'" + roleid + "'" + |
| | | // "," + "'" + user.getDeptId() + "'" + |
| | | // "," + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getCreateTime()) + "'" + |
| | | // "," + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getUpdateTime()) + "'" + |
| | | // "," + "'" + user.getStatus() + "'" + |
| | | // "," + "'" + user.getIsDeleted() + "'" + ")"; |
| | | // FtpUtil.sqlFileUpload(s); |
| | | // //注册用户 |
| | | // User user = new User(); |
| | | // user.setAccount(record.getEnterprisename()); |
| | | // String initPassword = ParamCache.getValue(DEFAULT_PARAM_PASSWORD); |
| | | // user.setPassword(initPassword); |
| | | // boolean b = userService.saveOrUpdate(user); |
| | | myAsyncService.FTP(sss); |
| | | } |
| | | //把附件添加单位id |
| | | attachService.updat(information.getDepartmentid(), record.getCardid()); |
| | | String s1 = "update sys_record set type = " + "'" + record.getType() + "'" + |
| | |
| | | ",stime = " + "'" + record.getStime() + "'" + |
| | | ",xtime = " + "'" + record.getXtime() + "'" + |
| | | " " + "where id = " + "'" + record.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } else { |
| | | String s1 = "update sys_record set type = " + "'" + record.getType() + "'" + |
| | | ",papprove = " + "'" + record.getPapprove() + "'" + |
| | |
| | | ",stime = " + "'" + record.getStime() + "'" + |
| | | ",xtime = " + "'" + record.getXtime() + "'" + |
| | | " " + "where id = " + "'" + record.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | return R.status(recordService.saveOrUpdate(record)); |
| | | } |
| | |
| | | |
| | | /** |
| | | * 保安公司备案信息(基本信息和附件列表信息) |
| | | * |
| | | * @param record |
| | | * @return |
| | | */ |
| | |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IDeptService; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | |
| | | private final IInformationService informationService; |
| | | private final IUserService userService; |
| | | private final IAttachService attachService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 详情 |
| | |
| | | String id = map.get("id").toString(); |
| | | recordService.removeByIds(Func.toLongList(id)); |
| | | String s1 = "delete from sys_record where id = " + "'" + id + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | record.setStorage("1"); |
| | | record.setType("2"); |
| | |
| | | "," + "'" + record.getChangecontacts() + "'" + |
| | | "," + "'" + record.getChangecontactscell() + "'" + |
| | | ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | return R.success("成功"); |
| | | } |
| | | |
| | |
| | | "update sys_information set representative = " + "'" + information1.getRepresentative() + "'" + |
| | | ",representativecell = " + "'" + information1.getRepresentativecell() + "'" + |
| | | " " + "where id = " + "'" + information1.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | }else { |
| | | //按组织机构查询 |
| | | Information information2 = new Information(); |
| | |
| | | "update sys_information set representative = " + "'" + information1.getRepresentative() + "'" + |
| | | ",representativecell = " + "'" + information1.getRepresentativecell() + "'" + |
| | | " " + "where id = " + "'" + information1.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | }else { |
| | | //设置未审核不通过 |
| | | record.setType("1"); |
| | |
| | | String s1 = "update sys_record set type = " + "'" + record.getType() + "'" + |
| | | ",approve = " + "'" + record.getApprove() + "'" + |
| | | " " + "where id = " + "'" + record.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | throw new ServiceException("当前公司单位未保安服务系统存在,请先注册!"); |
| | | } |
| | | } |
| | |
| | | String s1 = "update sys_record set type = " + "'" + record.getType() + "'" + |
| | | ",approve = " + "'" + record.getApprove() + "'" + |
| | | " " + "where id = " + "'" + record.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | //返回数据 |
| | | return R.status(status); |
| | |
| | | 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.FTP(s1); |
| | | return R.status(b); |
| | | } |
| | | |
| | |
| | | import org.springblade.modules.system.service.IDeptService; |
| | | import org.springblade.modules.system.service.IRoleService; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | private final IUserService userService; |
| | | |
| | | private final IRoleService roleService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | |
| | | /** |
| | |
| | | "," + "'" + user.getStatus() + "'" + |
| | | "," + "'" + user.getIsDeleted() + "'" + |
| | | "," + "'" + user.getRoleId() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | } |
| | | } |
| | |
| | | import org.springblade.modules.resource.entity.Attach; |
| | | import org.springblade.modules.resource.service.IAttachService; |
| | | import org.springblade.modules.resource.vo.AttachVO; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | |
| | | public class AttachController extends BladeController { |
| | | |
| | | private final IAttachService attachService; |
| | | |
| | | private final MyAsyncService myAsyncService; |
| | | /** |
| | | * 详情 |
| | | */ |
| | |
| | | list.forEach(id ->{ |
| | | //内网同步 |
| | | String s1 = "delete from blade_attach where id = " + "'" + id + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | }); |
| | | return R.status(attachService.deleteLogic(Func.toLongList(ids))); |
| | | } |
| | |
| | | import org.springblade.modules.resource.service.IAttachService; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import java.io.File; |
| | |
| | | private final ExamPaperService examPaperService; |
| | | |
| | | private final ExamPaymentService examPaymentService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 创建存储桶 |
| | |
| | | //内网数据推送 |
| | | //数据推送 |
| | | String s = "update blade_user set avatar = " + "'" + inUrl + "'" + "where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | |
| | | //文件推送 |
| | | InputStream inputStream = multipartFile.getInputStream(); |
| | |
| | | "," + "'" + examPayment.getWorkerId() + "'" + |
| | | "," + "'" + examPayment.getPaymentStatus() + "'" + |
| | | "," +"'" + inUrl + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | |
| | | //文件推送 |
| | | InputStream inputStream = multipartFile.getInputStream(); |
| | |
| | | } else { |
| | | s1 += ")"; |
| | | } |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | return attach.getId(); |
| | | } |
| | | |
| | |
| | | import org.springblade.modules.revoke.entity.Revoke; |
| | | import org.springblade.modules.revoke.service.IRevokeService; |
| | | import org.springblade.modules.revoke.vo.RevokeVO; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | |
| | | |
| | | private final IRevokeService revokeService; |
| | | private final IInformationService informationService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | |
| | | public R<IPage<RevokeVO>> page(RevokeVO revoke, Query query) { |
| | | IPage<RevokeVO> pages; |
| | | pages =revokeService.selectRevokePage(Condition.getPage(query), revoke,revoke.getJurisdiction()); |
| | | // if (revoke.getUsetype().equals("0")) { |
| | | // pages = revokeService.selectRevokePage(Condition.getPage(query), revoke,null); |
| | | // } else if (revoke.getUsetype().equals("1")) { |
| | | // String childer = informationService.selJurchilder(revoke.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 =revokeService.selectRevokePage(Condition.getPage(query), revoke,jurisdiction); |
| | | // } else { |
| | | // pages =revokeService.selectRevokePage(Condition.getPage(query), revoke,null); |
| | | // } |
| | | |
| | | return R.data(pages); |
| | | } |
| | | |
| | |
| | | revoke.setStorage("1"); |
| | | revoke.setType("2"); |
| | | revoke.setPermitime(new Date()); |
| | | revokeService.save(revoke); |
| | | //String formatStr = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(revoke.getEstablishtime()); |
| | | //String pertime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(revoke.getPermitime()); |
| | | boolean save = revokeService.save(revoke); |
| | | if (save) { |
| | | String s = "insert into sys_revoke(id,creditCode,enterpriseName,representative," + |
| | | "registeredCapital,organizationCode,registrationNumber,identificationNumber,enterprises," + |
| | | "address,business,region,registration,industry,type,deptid,ptype,representativecell,contacts,contactscell,reason,jurisdiction,cardid)" + |
| | |
| | | + revoke.getType() + "'" + "," + "'" + revoke.getDeptid() + "'" + "," + "'" + revoke.getPtype() + "'" + "," + |
| | | "'" + revoke.getRepresentativecell() + "'" + "," + "'" + revoke.getContacts() + "'" + "," + "'" + revoke.getContactscell() + "'" + "," + |
| | | "'" + revoke.getReason() + "'" + "," + "'" + revoke.getJurisdiction() + "'" +"," + "'" + revoke.getCardid() + "'"+ ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | return R.success("成功"); |
| | | } |
| | | |
| | |
| | | import org.springblade.modules.seinspect.entity.Seinspect; |
| | | import org.springblade.modules.seinspect.service.ISeinspectService; |
| | | import org.springblade.modules.seinspect.vo.SeinspectVO; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | |
| | | public class SeinspectController extends BladeController { |
| | | |
| | | private final ISeinspectService seinspectService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 详情 |
| | |
| | | @ApiOperation(value = "新增", notes = "传入seinspect") |
| | | public R save(@Valid @RequestBody Seinspect seinspect) throws Exception { |
| | | seinspect.setReviewtime(new Date()); |
| | | seinspectService.save(seinspect); |
| | | boolean save = seinspectService.save(seinspect); |
| | | if (save) { |
| | | String url = ""; |
| | | if (seinspect.getUrl()!=null&& !"".equals(seinspect.getUrl())){ |
| | | String[] split = seinspect.getUrl().split(","); |
| | |
| | | "'" + seinspect.getExaminerId() + "'" + "," + |
| | | "'" + seinspect.getJurisdiction() + "'" + "," + |
| | | "'" + seinspect.getSecurityId() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | return R.success("成功"); |
| | | } |
| | | |
| | |
| | | import org.springblade.modules.shareholder.excel.shareImporter; |
| | | import org.springblade.modules.shareholder.service.IShareholderService; |
| | | import org.springblade.modules.shareholder.vo.ShareholderVO; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | |
| | | public class ShareholderController extends BladeController { |
| | | |
| | | private final IShareholderService shareholderService; |
| | | |
| | | private final MyAsyncService myAsyncService; |
| | | /** |
| | | * 详情 |
| | | */ |
| | |
| | | "'" + shareholder.getCell() + "'" + "," + |
| | | "'" + shareholder.getCreditcode() + "'" + "," + |
| | | "'" + shareholder.getDeptId() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } else { |
| | | String s1 = |
| | | "insert into sys_shareholder(id,shareholder,shareholdingratio,capital,capitalTime,cardid,cell,creditCode,dept_id) " + |
| | |
| | | "'" + shareholder.getCell() + "'" + "," + |
| | | "'" + shareholder.getCreditcode() + "'" + "," + |
| | | "'" + shareholder.getDeptId() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | return R.status(save); |
| | | } |
| | |
| | | ",creditCode = " + "'" + shareholder.getCreditcode() + "'" + |
| | | ",dept_id = " + "'" + shareholder.getDeptId() + "'" + |
| | | " " + "where id = " + "'" + shareholder.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } else { |
| | | //内网同步 |
| | | String s1 = "update sys_shareholder set shareholder = " + "'" + shareholder.getShareholder() + "'" + |
| | |
| | | ",creditCode = " + "'" + shareholder.getCreditcode() + "'" + |
| | | ",dept_id = " + "'" + shareholder.getDeptId() + "'" + |
| | | " " + "where id = " + "'" + shareholder.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | return R.status(b); |
| | | } |
| | |
| | | List<Long> list = Func.toLongList(ids); |
| | | list.forEach(id -> { |
| | | String s1 = "delete from sys_shareholder where id = " + "'" + id + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | }); |
| | | return R.status(shareholderService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | |
| | | import org.springblade.modules.system.node.TreeNodes; |
| | | import org.springblade.modules.system.service.IDeptService; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springblade.modules.system.vo.DeptVO; |
| | | import org.springblade.modules.system.wrapper.DeptWrapper; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | |
| | | private final IUserService userService; |
| | | private final IInformationService informationService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 详情 |
| | |
| | | "," + "'" + dept.getSort() + "'" + |
| | | "," + "'" + dept.getRemark() + "'" + |
| | | "," + "'" + isDeleted + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(ss); |
| | | //FtpUtil.sqlFileUpload(ss); |
| | | myAsyncService.FTP(ss); |
| | | }else { |
| | | //修改 |
| | | //内网同步 |
| | |
| | | + ",remark = " + "'" + dept.getRemark() + "'" |
| | | + ",is_deleted = " + "'" + dept.getIsDeleted() + "'" |
| | | + " " + "where id = " + "'" + dept.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | // String id = kv.get("id").toString(); |
| | | // information.setDepartmentid(id); |
| | |
| | | list.forEach(id -> { |
| | | //内网同步 |
| | | String s1 = "update blade_dept set is_deleted = 1 where id = " + "'" + id + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | }); |
| | | return R.status(deptService.removeDept(ids)); |
| | | } |
| | |
| | | user.setJurisdiction(one.getId().toString()); |
| | | } |
| | | //新增 |
| | | userService.save(user); |
| | | boolean stats = userService.save(user); |
| | | if (stats) { |
| | | //内网同步 |
| | | String s = "insert into blade_user(" + |
| | | "id,tenant_id,code,account,password,real_name,phone,sex,role_id,dept_id," + |
| | |
| | | "," + "'" + user.getIsDeleted() + "'" + |
| | | "," + "'" + user.getJurisdiction() + "'" |
| | | + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | }else { |
| | | //修改 |
| | | User user1 = userService.getById(user.getId()); |
| | | user.setPassword(user1.getPassword()); |
| | | user.setUpdateTime(new Date()); |
| | | userService.updateById(user); |
| | | |
| | | boolean b = userService.updateById(user); |
| | | if (b) { |
| | | String s1 = |
| | | "update blade_user set account = " + "'" + user.getAccount() + "'" |
| | | + ",code = " + "'" + user.getCode() + "'" |
| | |
| | | + ",cardid = " + "'" + user.getCardid() + "'" |
| | | + ",guncode = " + "'" + user.getGuncode() + "'" |
| | | + " " + "where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | } |
| | | |
| | | //返回 |
| | |
| | | dispatcherList.forEach(dispatcher1 -> { |
| | | dispatcher1.setStatus(1); |
| | | dispatcher1.setUpdateTime(new Date()); |
| | | dispatcherService.updateById(dispatcher1); |
| | | |
| | | boolean b = dispatcherService.updateById(dispatcher1); |
| | | if (b) { |
| | | String s1 = |
| | | "update sys_dispatcher set status = " + "'" + dispatcher1.getStatus() + "'" |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(dispatcher1.getUpdateTime()) + "'" |
| | | + " " + "where id = " + "'" + dispatcher1.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | }); |
| | | } |
| | | |
| | |
| | | String s1 = |
| | | "update sys_experience set departureTime = " + "'" + new SimpleDateFormat("yyyy-MM-dd").format(experience1.getDeparturetime()) + "'" |
| | | + " " + "where id = " + "'" + experience1.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | }else { |
| | | //新增 |
| | | if (null!=user.getRtime()){ |
| | |
| | | experience.setCardid(user.getCardid()); |
| | | experience.setSecurityid(user.getId().toString()); |
| | | //新增 |
| | | experienceService.save(experience); |
| | | |
| | | boolean save = experienceService.save(experience); |
| | | if (save) { |
| | | //内网同步 |
| | | String s = "insert into sys_experience(id,name,entryTime,departureTime,leaving,cardId,companyname,securityId) " + |
| | | "values(" + "'" + experience.getId() + "'" + |
| | |
| | | "," + "'" + experience.getCompanyname() + "'" + |
| | | "," + "'" + experience.getSecurityid() + "'" |
| | | + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | } |
| | | |
| | | boolean status = userService.updateById(user); |
| | | //qfqk 数据推送 |
| | | if (status){ |
| | | myAsyncService.updateUserByQfqk(user); |
| | | } |
| | | |
| | | //内网更新 |
| | | String s1 = |
| | | "update blade_user set status = " + "'" + user.getStatus() + "'" |
| | | + " " + "where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | |
| | | return R.success("修改成功"); |
| | | } |
| | | } |
| | |
| | | + ",guncode = " + "'" + user.getGuncode() + "'" |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getUpdateTime()) + "'" |
| | | + " " + "where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } else { |
| | | rtime = new SimpleDateFormat("yyyy-MM-dd").format(user.getRtime()); |
| | | String s1 = |
| | |
| | | + ",guncode = " + "'" + user.getGuncode() + "'" |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getUpdateTime()) + "'" |
| | | + " " + "where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | return R.success("修改成功"); |
| | | } |
| | |
| | | + ",hold = " + "'" + user.getHold() + "'" |
| | | + ",cell = " + "'" + user.getCell() + "'" |
| | | + " " + "where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | return R.success("修改成功"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 指纹图片上传 |
| | | * |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | |
| | | + " " + "where id = " + "'" + user.getId() + "';" + |
| | | "update sys_accreditation_records set status = " + "'" + accreditationRecords1.getStatus() + "'" + |
| | | " " + "where id = " + "'" + accreditationRecords1.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | //返回 |
| | | return R.success("修改成功"); |
| | | } |
| | |
| | | + ",user_type = " + "'" + user.getUserType() + "'" |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getUpdateTime()) + "'" |
| | | + " " + "where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | return R.success("修改成功"); |
| | | } |
| | | |
| | |
| | | myAsyncService.deleteUserByQfqk(user1); |
| | | //内网同步 |
| | | String s1 = "update blade_user set is_deleted = 1 where id = " + "'" + id + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | }); |
| | | return R.status(userService.removeUser(ids)); |
| | | } |
| | |
| | | String s1 = "update blade_user set status = " + user2.getStatus() + |
| | | ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user2.getUpdateTime()) + "'" + |
| | | " where id = " + "'" + user2.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | |
| | | //人员离职后修改派遣记录,修改从业记录 |
| | | updateUserDispatcherExp(user2); |
| | |
| | | //1.群访群控数据推送(异步) |
| | | if (status) { |
| | | myAsyncService.qfqkUserSave(user); |
| | | } |
| | | |
| | | |
| | | //2.内网数据推送 |
| | | String s = "insert into blade_user(" + |
| | | "id,tenant_id,account,password,name,real_name,avatar,email,phone,sex," + |
| | |
| | | "," + "'" + experience.getCompanyname() + "'" + |
| | | "," + "'" + experience.getSecurityid() + "'" |
| | | + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | |
| | | |
| | | //获取从业记录 |
| | | // List<Experience> experiences = (List<Experience>) userMap.get("userPractitionersInfo"); |
| | |
| | | |
| | | /** |
| | | * 修改派遣记录,修改从业记录 |
| | | * |
| | | * @param user |
| | | */ |
| | | private void updateUserDispatcherExp(User user) { |
| | |
| | | "update sys_dispatcher set status = " + "'" + dispatcher1.getStatus() + "'" |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(dispatcher1.getUpdateTime()) + "'" |
| | | + " " + "where id = " + "'" + dispatcher1.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | }); |
| | | } |
| | | |
| | |
| | | String s1 = |
| | | "update sys_experience set departureTime = " + "'" + new SimpleDateFormat("yyyy-MM-dd").format(experience1.getDeparturetime()) + "'" |
| | | + " " + "where id = " + "'" + experience1.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | }else { |
| | | //新增 |
| | | if (null!=user.getRtime()){ |
| | |
| | | "," + "'" + experience.getCompanyname() + "'" + |
| | | "," + "'" + experience.getSecurityid() + "'" |
| | | + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | /** |
| | | * 用户详情 |
| | | * |
| | | * @param user |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 保安员导出 |
| | | * |
| | | * @param response |
| | | * @param user 查询条件 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 保安员账号校验 |
| | | * |
| | | * @param user |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 年龄分布查询 |
| | | * |
| | | * @param user |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询登录密码还是 123456 的单位信息 |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("/getNotUpdatePwdInfo") |
| | |
| | | |
| | | import net.sf.json.JSONObject; |
| | | import org.springblade.common.utils.HttpClientUtils; |
| | | import org.springblade.modules.FTP.FtpUtil; |
| | | import org.springblade.modules.system.dto.UserDTO; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springframework.scheduling.annotation.Async; |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * FTP |
| | | * @param s sql语句 |
| | | */ |
| | | @Async |
| | | public void FTP(String s) { |
| | | FtpUtil.sqlFileUpload(s); |
| | | } |
| | | } |
| | |
| | | private final IDeptService deptService; |
| | | private final JurisdictionService jurisdictionService; |
| | | private final IExperienceService experienceService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | "," + "'" + user.getJurisdiction() + "'"+ |
| | | "," + "'" + user.getIsDeleted() + "'" |
| | | + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | return b; |
| | | } |
| | | |
| | |
| | | "," + "'" + user.getIsDeleted() + "'" + |
| | | "," + "'" + user.getJurisdiction() + "'" |
| | | + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | }else { |
| | | //匹配组织机构是否一致,如果不一致 |
| | | if(!user2.getDeptId().equals(user.getDeptId())){ |
| | |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user2.getUpdateTime()) + "'" |
| | | + ",cardid = " + "'" + user2.getCardid() + "'" |
| | | + " " + "where id = " + "'" + user2.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | } |
| | | }); |
| | |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user2.getUpdateTime()) + "'" |
| | | + ",registered = " + "'" + user2.getRegistered() + "'" |
| | | + " " + "where id = " + "'" + user2.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | }else { |
| | | status.set(false); |
| | | //加入集合 |
| | |
| | | + ",registered = " + "'" + user2.getRegistered() + "'" |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user2.getUpdateTime()) + "'" |
| | | + " " + "where id = " + "'" + user2.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | } |
| | | } |
| | |
| | | //判断list.size 大小 |
| | | if (list.size()==1000){ |
| | | //执行 |
| | | FtpUtil.sqlFileUpload(builder.toString()); |
| | | //FtpUtil.sqlFileUpload(builder.toString()); |
| | | myAsyncService.FTP(builder.toString()); |
| | | //清空 |
| | | builder.delete(0,builder.length()); |
| | | } |
| | |
| | | //判断list.size 大小 |
| | | if (split1.length==1000){ |
| | | //执行 |
| | | FtpUtil.sqlFileUpload(builder1.toString()); |
| | | //FtpUtil.sqlFileUpload(builder1.toString()); |
| | | myAsyncService.FTP(builder1.toString()); |
| | | //清空 |
| | | builder1.delete(0,builder1.length()); |
| | | } |
| | | } |
| | | //剩余的继续执行 |
| | | FtpUtil.sqlFileUpload(builder.toString()); |
| | | FtpUtil.sqlFileUpload(builder1.toString()); |
| | | //FtpUtil.sqlFileUpload(builder.toString()); |
| | | myAsyncService.FTP(builder.toString()); |
| | | //FtpUtil.sqlFileUpload(builder1.toString()); |
| | | myAsyncService.FTP(builder1.toString()); |
| | | } |
| | | // System.out.println("导入时间: = " + (System.currentTimeMillis()-time)); |
| | | |
| | |
| | | "," + "'" + experience.getCompanyname() + "'" + |
| | | "," + "'" + experience.getSecurityid() + "'" |
| | | + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | else { |
| | | //匹配组织机构是否一致,如果不一致 |
| | |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user2.getUpdateTime()) + "'" |
| | | + ",registered = " + "'" + user2.getRegistered() + "'" |
| | | + " " + "where id = " + "'" + user2.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | }else { |
| | | status.set(false); |
| | | //加入集合 |
| | |
| | | + ",registered = " + "'" + user2.getRegistered() + "'" |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user2.getUpdateTime()) + "'" |
| | | + " " + "where id = " + "'" + user2.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | } |
| | | }); |
| | |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.FTP.FtpUtil; |
| | | import org.springblade.modules.information.entity.Information; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.talk.entity.Talk; |
| | |
| | | public class TalkController extends BladeController { |
| | | |
| | | private final ITalkService talkService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 详情 |
| | |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入talk") |
| | | public R save(@Valid @RequestBody Talk talk) { |
| | | talkService.save(talk); |
| | | boolean save = talkService.save(talk); |
| | | String url = ""; |
| | | String[] split = talk.getImgurl().split(","); |
| | | for (int i = 0; i < split.length; i++) { |
| | |
| | | } |
| | | String substring = url.substring(0, url.length() - 1); |
| | | talk.setImgurl(substring); |
| | | if (save) { |
| | | //数据同步 |
| | | String s1 = |
| | | "insert into sys_talk(id,title,real_name,talkcontent,talktime,conclusion,evaluate,deptid,imgurl) " + |
| | |
| | | "'" + talk.getEvaluate() + "'" + "," + |
| | | "'" + talk.getDeptid() + "'" + "," + |
| | | "'" + talk.getImgurl() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | return R.success("新增成功"); |
| | | } |
| | | |
| | |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入talk") |
| | | public R update(@Valid @RequestBody Talk talk) { |
| | | talkService.updateById(talk); |
| | | boolean b = talkService.updateById(talk); |
| | | String url = ""; |
| | | String[] split = talk.getImgurl().split(","); |
| | | for (int i = 0; i < split.length; i++) { |
| | |
| | | } |
| | | String substring = url.substring(0, url.length() - 1); |
| | | talk.setImgurl(substring); |
| | | if (b) { |
| | | String s1 = "update sys_talk set title = " + "'" + talk.getTitle() + "'" + |
| | | ",real_name = " + "'" + talk.getRealName() + "'" + |
| | | ",talkcontent = " + "'" + talk.getTalkcontent() + "'" + |
| | |
| | | ",deptid = " + "'" + talk.getDeptid() + "'" + |
| | | ",imgurl = " + "'" + talk.getImgurl() + "'" + |
| | | " " + "where id = " + "'" + talk.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | return R.success("修改成功"); |
| | | } |
| | | |
| | |
| | | list.forEach(id -> { |
| | | //内网同步 |
| | | String s1 = "delete from sys_talk where id = " + "'" + id + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | }); |
| | | return R.status(talkService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | |
| | | import org.springblade.modules.exam.service.ExamPaperService; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springblade.modules.system.vo.UserVO; |
| | | import org.springblade.modules.training.entity.TrainingRegistration; |
| | | import org.springblade.modules.training.excel.TrainingRegistrationExcel; |
| | |
| | | import org.springblade.modules.training.vo.TrainingRegistrationVo; |
| | | import org.springblade.modules.vip.service.UserVipService; |
| | | import org.springblade.modules.vip.service.VipTopicService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | |
| | | private final UserVipService userVipService; |
| | | |
| | | private final VipTopicService vipTopicService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | |
| | | /** |
| | | * 自定义分页 |
| | |
| | | + "," + "'" + trainingRegistration.getIsExam() + "'" |
| | | + "," +"'" + trainingRegistration.getAuditStatus() + "'" + ");" + |
| | | "update blade_user set is_train = " + user1.getIsTrain() + " " +"where id = " + "'" + user1.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(sql); |
| | | //FtpUtil.sqlFileUpload(sql); |
| | | myAsyncService.FTP(sql); |
| | | } |
| | | |
| | | |
| | |
| | | ",audit_status = " + "'" + trainingRegistration.getAuditStatus() + "'" + |
| | | " " +"where id = " + "'" + trainingRegistration.getId() + "';" + |
| | | "update blade_user set is_train = " + user.getIsTrain() + " " +"where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | |
| | | /** |
| | |
| | | "," + "'" + examPaper.getCreator() +"'" + |
| | | "," + "'" + creatorTimeFormat +"'" + |
| | | "," +"'" + examPaper.getAuditStatus() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | |
| | | |
| | | //修改报名信息 |
| | |
| | | "update sys_training_registration set train_exam_id = " + "'" + trainingRegistration.getTrainExamId() + "'" |
| | | + ",audit_status = " + "'" + trainingRegistration.getAuditStatus() + "'" |
| | | + " " + "where id = " + "'" + trainingRegistration.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | }); |
| | | } |
| | |
| | | "," + "'" + examPaper.getCreator() +"'" + |
| | | "," + "'" + creatorTimeFormat +"'" + |
| | | "," +"'" + examPaper.getAuditStatus() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | |
| | | //修改报名信息 |
| | | list.forEach(id ->{ |
| | |
| | | "update sys_training_registration set train_exam_id = " + "'" + trainingRegistration.getTrainExamId() + "'" |
| | | + ",audit_status = " + "'" + trainingRegistration.getAuditStatus() + "'" |
| | | + " " + "where id = " + "'" + trainingRegistration.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | } |
| | | }); |
| | |
| | | String s1 = |
| | | "update sys_training_registration set vip_status = " + "'" + trainingRegistration.getVipStatus() + "'" |
| | | + " " + "where id = " + "'" + trainingRegistration.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | //更新并返回数据 |
| | | return R.data(trainingRegistrationService.updateById(trainingRegistration)); |
| | | } |
| | |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IUserDeptService; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springblade.modules.training.entity.TrainingRegistration; |
| | | import org.springblade.modules.training.excel.TrainingRegistrationExcel; |
| | | import org.springblade.modules.training.mapper.TrainingRegistrationMapper; |
| | |
| | | private final AbsentRecordsService absentRecordsService; |
| | | |
| | | private final ExamScoreService examScoreService; |
| | | @Autowired |
| | | private MyAsyncService myAsyncService; |
| | | |
| | | @Autowired |
| | | private ExamAnswerRecordService examAnswerRecordService; |
| | |
| | | + "," + "'" + trainingRegistration.getIsExam() + "'" |
| | | + "," +"'" + trainingRegistration.getAuditStatus() + "'" + ");" + |
| | | "update blade_user set is_train = " + user1.getIsTrain() + " " +"where id = " + "'" + user1.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | |
| | | |
| | |
| | | + "'" + examScore.getUserId() + "'" + "," |
| | | + "'" + examScore.getApplyId() + "'" + "," |
| | | + "'" + examScore.getExamId() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | } |
| | | } |
| | |
| | | "update exam_score set theory_grade = " + examScore1.getTheoryGrade() + |
| | | ",qualified = " + "'" + examScore1.getQualified() + "'" + |
| | | " " + "where id = " + "'" + examScore1.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | }); |
| | | }else { |
| | | //数据同步 |
| | | String s = |
| | | "update sys_training_registration set is_exam = " + trainingRegistration1.getIsExam() + |
| | | " " + "where id = " + "'" + trainingRegistration1.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | } |
| | | }); |
| | | } |
| | |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IDeptService; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springblade.modules.workreport.entity.WorkReport; |
| | | import org.springblade.modules.workreport.service.WorkReportService; |
| | | import org.springblade.modules.workreport.vo.WorkReportVo; |
| | |
| | | private final IUserService userService; |
| | | |
| | | private final IDeptService deptService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 自定义分页 |
| | | * |
| | | * @param query page,size |
| | | * @param workReport 工作汇报信息对象 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 自定义分页--接收到的汇报信息page |
| | | * |
| | | * @param query page,size |
| | | * @param workReport 工作汇报信息对象 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 新增 |
| | | * |
| | | * @param workReport 工作汇报信息对象 |
| | | */ |
| | | @PostMapping("/save") |
| | |
| | | |
| | | /** |
| | | * 修改 |
| | | * |
| | | * @param workReport 工作汇报信息对象 |
| | | */ |
| | | @PostMapping("/update") |
| | |
| | | |
| | | /** |
| | | * 新增或修改 |
| | | * |
| | | * @param workReport 工作汇报信息对象 |
| | | */ |
| | | @PostMapping("/submit") |
| | |
| | | workReport.setReplyDeptIds(getReplyDeptIds(workReport.getReceivedIds())); |
| | | //新增 |
| | | status = workReportService.save(workReport); |
| | | |
| | | if (status) { |
| | | //数据同步 |
| | | String s1 = |
| | | "insert into sys_work_report(id,type,content,work_desc,report_time,received_ids,dept_id,reply_dept_ids,category,user_id) " + |
| | |
| | | "'" + workReport.getReplyDeptIds() + "'" + "," + |
| | | "'" + workReport.getCategory() + "'" + "," + |
| | | "'" +workReport.getUserId() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | }else { |
| | | workReport.setReplyDeptIds(getReplyDeptIds(workReport.getReceivedIds())); |
| | | if (null==workReport.getReplyTime()){ |
| | |
| | | |
| | | //修改 |
| | | status = workReportService.updateById(workReport); |
| | | |
| | | if (status) { |
| | | //内网同步 |
| | | String s1 = |
| | | "update sys_work_report set type = " + "'" + workReport.getType() + "'" + |
| | |
| | | ",category = " + "'" + workReport.getCategory() + "'" + |
| | | ",user_id = " + "'" + workReport.getUserId() + "'" + |
| | | " " +"where id = " + "'" + workReport.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | } |
| | | } |
| | | return R.status(status); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param ids 工作汇报信息ids 数组 |
| | | */ |
| | | @PostMapping("/remove") |
| | |
| | | list.forEach(id ->{ |
| | | //内网同步 |
| | | String s1 = "delete from sys_work_report where id = " + "'" + id + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.FTP(s1); |
| | | }); |
| | | return R.status(workReportService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | * |
| | | * @param workReport 工作汇报信息对象 |
| | | */ |
| | | @GetMapping("/detail") |
| | |
| | | |
| | | /** |
| | | * 获取接收人的单位信息 |
| | | * |
| | | * @param detail 汇报详情 |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 获取接收人的单位id(dept)信息 |
| | | * |
| | | * @param |
| | | * @return |
| | | */ |
| | |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IDeptService; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springblade.modules.zc.entity.Zc; |
| | | import org.springblade.modules.zc.service.IZcService; |
| | | import org.springblade.modules.zc.vo.ZcVO; |
| | |
| | | private IUserService iUserService; |
| | | |
| | | private final IDeptService deptFeignApi; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | /** |
| | | * 详情 |
| | |
| | | "," + "'" + user.getHold() + "'" + |
| | | "," + "'" + user.getExaminationType() + "'" + |
| | | "," + "'" + user.getDispatch() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | //FtpUtil.sqlFileUpload(s); |
| | | myAsyncService.FTP(s); |
| | | |
| | | } |
| | | return R.status(zcService.updateById(zc)); |