智慧保安后台管理-外网项目备份
tangzy
2022-02-24 d4b00c05321d9373a33bfb26618735e2a5868a81
FTP异步处理
50 files modified
1186 ■■■■■ changed files
src/main/java/org/springblade/common/config/BladeConfiguration.java 67 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/accreditation/controller/AccreditationRecordsController.java 24 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/accreditation/service/impl/AccreditationRecordsServiceImpl.java 21 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/apply/controller/ApplyController.java 46 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/apply/controller/ExamPaymentController.java 11 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/apply/service/impl/ApplyServiceImpl.java 15 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/coinspect/controller/CoinspectController.java 6 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/desk/controller/NoticeController.java 15 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/directive/controller/DirectiveController.java 18 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/dispatcher/controller/DispatcherController.java 57 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/dispatcher/controller/DispatcherUnitController.java 21 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/dispatcher/service/impl/DispatcherUnitServiceImpl.java 8 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/equipage/controller/CarController.java 23 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/equipage/controller/EquipageController.java 23 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/equipage/controller/GunController.java 22 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/equipage/controller/fixed.java 26 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/equipage/service/impl/CarServiceImpl.java 6 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/equipage/service/impl/EquipageServiceImpl.java 8 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/equipage/service/impl/GunServiceImpl.java 6 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/exam/controller/ExamPaperController.java 45 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/exam/controller/ExamScoreController.java 50 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/exam/controller/ExamSubjectChoicesController.java 1 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/exam/service/impl/ExamScoreServiceImpl.java 44 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/exam/service/impl/ExamSubjectChoicesServiceImpl.java 15 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/exam/service/impl/ScoreAuditRecordsServiceImpl.java 18 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/experience/controller/ExperienceController.java 8 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/controller/InformationController.java 37 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/location/controller/LiveLocationController.java 41 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/location/controller/LocusController.java 6 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/member/controller/MemberController.java 15 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/performance/controller/PerformanceController.java 9 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/permit/controller/PermitController.java 38 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/record/controller/RecordController.java 92 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/recordLegalperson/controller/RecordLegalpersonController.java 20 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/recordk/controller/RecordkController.java 21 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/registerUnit/controller/RegisterUnitController.java 5 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/resource/controller/AttachController.java 6 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java 11 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/revoke/controller/RevokeController.java 26 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/seinspect/controller/SeinspectController.java 9 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/shareholder/controller/ShareholderController.java 18 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/controller/DeptController.java 11 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/controller/UserController.java 80 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/service/MyAsyncService.java 10 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java 37 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/talk/controller/TalkController.java 19 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/training/controller/TrainingRegistrationController.java 25 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/training/service/impl/TrainingRegistrationServiceImpl.java 15 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/workreport/controller/WorkReportController.java 26 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/zc/controller/ZcController.java 5 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/config/BladeConfiguration.java
@@ -38,8 +38,7 @@
    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");
@@ -53,38 +52,38 @@
        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;
    }
src/main/java/org/springblade/modules/accreditation/controller/AccreditationRecordsController.java
@@ -29,6 +29,7 @@
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.*;
@@ -56,7 +57,7 @@
    private final AccreditationRecordsService accreditationRecordsService;
    private final IUserService userService;
    private final MyAsyncService myAsyncService;
    /**
     * 自定义分页
@@ -101,7 +102,8 @@
        "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);
    }
@@ -156,7 +158,8 @@
                        "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 =
@@ -165,7 +168,8 @@
                        ",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 {
            //内网同步
@@ -175,7 +179,8 @@
                    ",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);
@@ -217,7 +222,8 @@
                            "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 =
@@ -226,7 +232,8 @@
                            ",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 {
                //内网同步
@@ -236,7 +243,8 @@
                        ",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);
            }
        });
        //返回
src/main/java/org/springblade/modules/accreditation/service/impl/AccreditationRecordsServiceImpl.java
@@ -12,6 +12,8 @@
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;
@@ -25,15 +27,18 @@
/**
 * 制证记录服务实现类
 *
 * @author zhongrj
 */
@Service
@AllArgsConstructor
public class AccreditationRecordsServiceImpl extends ServiceImpl<AccreditationRecordsMapper, AccreditationRecords> implements AccreditationRecordsService {
    @Autowired
    private MyAsyncService myAsyncService;
    /**
     * 自定义分页
     *
     * @param page
     * @param accreditationRecords
     * @return
@@ -46,6 +51,7 @@
    /**
     * 制证申请(批量)
     *
     * @param accreditationRecords 制证记录信息对象
     */
    @Override
@@ -78,7 +84,8 @@
                        + "'" + records.getStatus() +"'" + ","
                        + "'" + records.getType() +"'" + ","
                        +"'" + records.getAuditStatus() + "'" + ")";
                    FtpUtil.sqlFileUpload(s);
                    //FtpUtil.sqlFileUpload(s);
                    myAsyncService.FTP(s);
                }
            }
            //判断类型,如果是证书的,审核未通过的可以再次申请,审核通过的,暂时不给于新增记录
@@ -98,7 +105,8 @@
                        + "'" + records.getStatus() +"'" + ","
                        + "'" + records.getType() +"'" + ","
                        +"'" + records.getAuditStatus() + "'" + ")";
                    FtpUtil.sqlFileUpload(s);
                    //FtpUtil.sqlFileUpload(s);
                    myAsyncService.FTP(s);
                }
            }
@@ -108,6 +116,7 @@
    /**
     * 自定义详情信息
     *
     * @param accreditationRecords
     * @return
     */
@@ -118,6 +127,7 @@
    /**
     * 导出保安员证信息
     *
     * @param accreditationRecords
     * @return
     */
@@ -186,6 +196,7 @@
    /**
     * 导出证书制证信息
     *
     * @param accreditationRecords
     * @return
     */
@@ -209,6 +220,7 @@
    /**
     * 批量修改为已制证
     *
     * @param accreditationRecords 制证记录信息对象
     */
    @Override
@@ -227,7 +239,8 @@
            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;
    }
src/main/java/org/springblade/modules/apply/controller/ApplyController.java
@@ -31,6 +31,7 @@
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.*;
@@ -67,9 +68,11 @@
//    @Autowired
    private final ExamScoreService examScoreService;
    private final MyAsyncService myAsyncService;
    /**
     * 自定义分页
     *
     * @param query page,size
     * @param apply 考试报名信息对象
     */
@@ -90,6 +93,7 @@
    /**
     * 新增报名
     *
     * @param apply 考试报名信息对象
     */
    @PostMapping("/save")
@@ -151,12 +155,14 @@
            "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")
@@ -166,6 +172,7 @@
    /**
     * 新增或修改
     *
     * @param apply 考试报名信息对象
     */
    @PostMapping("/submit")
@@ -209,6 +216,7 @@
    /**
     * 导出报名数数据
     *
     * @param response
     * @param apply 报名对象
     */
@@ -221,6 +229,7 @@
    /**
     * 生成准考证号码
     *
     * @param apply 考试报名信息对象
     */
    private String getCandidateNo(Apply apply) {
@@ -293,6 +302,7 @@
    /**
     * 生成报名编号
     *
     * @param apply 考试报名信息对象
     */
    private String getApplyCode(Apply apply) {
@@ -344,6 +354,7 @@
    /**
     * 获取字符串拼音的第一个字母
     *
     * @param chinese
     * @return
     */
@@ -370,6 +381,7 @@
    /**
     * 删除
     *
     * @param ids 考试报名信息ids 数组
     */
    @PostMapping("/remove")
@@ -378,13 +390,15 @@
        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")
@@ -398,6 +412,7 @@
    /**
     * 详情
     *
     * @param apply 考试报名信息对象
     */
    @GetMapping("/detail")
@@ -411,6 +426,7 @@
    /**
     * 获取准考证信息
     *
     * @param apply
     * @return
     */
@@ -427,6 +443,7 @@
    /**
     * 取消报名
     *
     * @param apply 考试报名信息对象
     */
    @PostMapping("/cancelApply")
@@ -475,12 +492,14 @@
        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")
@@ -527,6 +546,7 @@
    /**
     * 批量报名
     *
     * @param ids userIds 人员
     */
    @PostMapping("/batchApply")
@@ -612,9 +632,9 @@
    }
    /**
     * 生成考试,报名
     *
     * @param applyVO 报名info
     */
    @PostMapping("/batchExam")
@@ -646,7 +666,8 @@
                "," + "'" + examPaper.getExamType() +"'" +
                "," + "'" + format +"'" +
                ","  +"'" + endTimeFormat + "'" + ")";
            FtpUtil.sqlFileUpload(s);
            //FtpUtil.sqlFileUpload(s);
            myAsyncService.FTP(s);
            //修改报名信息
            applyIds.forEach(apply ->{
@@ -659,7 +680,8 @@
                    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);
                }
            });
        }
@@ -669,6 +691,7 @@
    /**
     * 查询报名清册信息
     *
     * @param apply 报名信息
     * @return
     */
@@ -680,6 +703,7 @@
    /**
     * 查询保安员个人报名信息
     *
     * @param apply 报名信息,包含userId
     * @return
     */
@@ -691,6 +715,7 @@
    /**
     * 修改考试状态
     *
     * @param apply 报名信息,包含userId,applyid
     * @return
     */
@@ -705,7 +730,8 @@
        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());
@@ -716,14 +742,16 @@
            "," + "'" + examScore.getUserId() +"'" +
            ","  +"'" + examScore.getExamId() +"'" +
            ","  +"'" + examScore.getApplyId() + "'" + ")";
        FtpUtil.sqlFileUpload(s);
            //FtpUtil.sqlFileUpload(s);
            myAsyncService.FTP(s);
        }
        return examScore;
    }
    /**
     * test
     *
     * @return
     */
    @GetMapping("/test")
src/main/java/org/springblade/modules/apply/controller/ExamPaymentController.java
@@ -13,6 +13,7 @@
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;
@@ -29,9 +30,11 @@
public class ExamPaymentController {
    private final ExamPaymentService examPaymentService;
    private final MyAsyncService myAsyncService;
    /**
     * 自定义分页
     *
     * @param query page,size
     * @param examPayment 考试缴费信息对象
     */
@@ -52,6 +55,7 @@
    /**
     * 新增
     *
     * @param examPayment 考试缴费信息对象
     */
    @PostMapping("/save")
@@ -63,6 +67,7 @@
    /**
     * 修改
     *
     * @param examPayment 考试缴费信息对象
     */
    @PostMapping("/update")
@@ -72,6 +77,7 @@
    /**
     * 新增或修改
     *
     * @param examPayment 考试缴费信息对象
     */
    @PostMapping("/submit")
@@ -82,6 +88,7 @@
    /**
     * 删除
     *
     * @param ids 考试缴费信息ids 数组
     */
    @PostMapping("/remove")
@@ -90,13 +97,15 @@
        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")
src/main/java/org/springblade/modules/apply/service/impl/ApplyServiceImpl.java
@@ -28,6 +28,7 @@
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;
@@ -56,6 +57,8 @@
    @Autowired
    private TrainingRegistrationService trainingRegistrationService;
    @Autowired
    private  MyAsyncService myAsyncService;
    /**
     * 自定义分页数据
@@ -142,7 +145,8 @@
                        + "'" + 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();
@@ -173,7 +177,8 @@
                            + "'" + examId + "'" + ","
                            +"'" + apply1.getIsExam() + "'" + ");" +
                            "update blade_user set is_apply = " + "'" + user1.getIsApply() + "'" +"where id = " + "'" + user1.getId() + "'";
                        FtpUtil.sqlFileUpload(s);
                        //FtpUtil.sqlFileUpload(s);
                        myAsyncService.FTP(s);
                    }
                }
            }
@@ -465,7 +470,8 @@
            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){
@@ -478,7 +484,8 @@
            String s1 =
                "update sys_training_registration set is_exam = " + trainingRegistration.getIsExam() + " " +"where id = " + "'" + trainingRegistration.getId() + "'";
            FtpUtil.sqlFileUpload(s1);
            //FtpUtil.sqlFileUpload(s1);
            myAsyncService.FTP(s1);
        }
    }
src/main/java/org/springblade/modules/coinspect/controller/CoinspectController.java
@@ -33,6 +33,7 @@
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;
@@ -52,7 +53,7 @@
public class CoinspectController extends BladeController {
    private final ICoinspectService coinspectService;
    private final MyAsyncService myAsyncService;
    /**
     * 详情
     */
@@ -116,7 +117,8 @@
                "'" + coinspect.getInsid() + "'" + "," +
                "'" + coinspect.getResults() + "'" + "," +
                "'" + coinspect.getUrl() + "'" + ")";
        FtpUtil.sqlFileUpload(s1);
        //FtpUtil.sqlFileUpload(s1);
        myAsyncService.FTP(s1);
        return R.success("新增成功");
    }
src/main/java/org/springblade/modules/desk/controller/NoticeController.java
@@ -36,6 +36,7 @@
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;
@@ -60,6 +61,7 @@
    private final INoticeService noticeService;
    private final IDeptService iDeptService;
    private final MyAsyncService myAsyncService;
    /**
     * 详情
@@ -134,6 +136,7 @@
            //新增
            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) " +
@@ -149,10 +152,13 @@
                    "'" + 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() + "'" +
@@ -167,7 +173,9 @@
                    ",cover_url = " + "'" + notice.getCoverUrl() + "'" +
                    ",type = " + "'" + notice.getType() + "'" +
                    " " +"where id = " + "'" + notice.getId() + "'";
            FtpUtil.sqlFileUpload(s1);
                //FtpUtil.sqlFileUpload(s1);
                myAsyncService.FTP(s1);
            }
        }
        return R.status(status);
    }
@@ -184,7 +192,8 @@
        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);
src/main/java/org/springblade/modules/directive/controller/DirectiveController.java
@@ -15,6 +15,7 @@
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;
@@ -31,6 +32,7 @@
public class DirectiveController {
    private final DirectiveService directiveService;
    private final MyAsyncService myAsyncService;
    /**
     * 自定义分页
@@ -67,6 +69,7 @@
        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) " +
@@ -76,7 +79,9 @@
                "'" + directive.getReceiveDirectiveIds() + "'" + "," +
                "'" + directive.getSendTime() + "'" + "," +
                "'" + directive.getContent() + "'" + ")";
        FtpUtil.sqlFileUpload(s1);
            //FtpUtil.sqlFileUpload(s1);
            myAsyncService.FTP(s1);
        }
        if (status) {
            //新增图片
            if (null != directive.getUrl() && directive.getUrl() != "") {
@@ -96,7 +101,8 @@
                            "'" + directiveFile.getType() + "'" + "," +
                            "'" + directiveFile.getDirectiveId() + "'" + "," +
                            "'" + urls+ "'"+ ")";
                    FtpUtil.sqlFileUpload(s2);
                    //FtpUtil.sqlFileUpload(s2);
                    myAsyncService.FTP(s2);
                    if (!status) {
                        return R.status(false);
                    }
@@ -118,6 +124,7 @@
    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() + "'" +
@@ -125,7 +132,9 @@
            ",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) {
            //先删除图片
@@ -147,7 +156,8 @@
                            "'" + directiveFile.getType() + "'" + "," +
                            "'" + directiveFile.getDirectiveId() + "'" + "," +
                            "'" + urls + "'"+ ")";
                    FtpUtil.sqlFileUpload(s2);
                    //FtpUtil.sqlFileUpload(s2);
                    myAsyncService.FTP(s2);
                    if (!status) {
                        R.status(false);
                    }
src/main/java/org/springblade/modules/dispatcher/controller/DispatcherController.java
@@ -21,6 +21,7 @@
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;
@@ -34,6 +35,7 @@
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;
@@ -66,6 +68,7 @@
    private final IDispatcherUnitService dispatcherUnitService;
    private final IUserService userService;
    private final MyAsyncService myAsyncService;
    /**
     * 详情
@@ -128,6 +131,7 @@
    /**
     * 结束派遣
     *
     * @param dispatcher
     */
    @PostMapping("/over-dispatcher")
@@ -153,7 +157,6 @@
        userService.updateById(user);
        //内网同步
        String s1 =
            "update sys_dispatcher set status = " + "'" + dispatcher.getStatus() + "'" +
@@ -161,7 +164,8 @@
                " " +"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);
    }
@@ -185,7 +189,7 @@
            //新增派遣记录
            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) " +
@@ -201,7 +205,9 @@
                    "'" + 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());
            //查询当前派遣记录
@@ -232,7 +238,7 @@
                //修改
                status = dispatcherService.updateById(dispatcher);
                if (status) {
                //内网同步
                String s1 =
                    "update blade_user set dispatch = " + "'" + user.getDispatch() + "'" +
@@ -248,12 +254,14 @@
                        " " + "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()) + "'" +
@@ -265,12 +273,13 @@
                        ",dept_id = " + "'" + dispatcher.getDeptId() + "'" +
                        ",jurisdiction = " + "'" + dispatcher.getJurisdiction() + "'" +
                        " " + "where id = " + "'" + dispatcher.getId() + "'";
                FtpUtil.sqlFileUpload(s1);
                    //FtpUtil.sqlFileUpload(s1);
                    myAsyncService.FTP(s1);
                }
            }
        }
        return R.status(status);
    }
    /**
@@ -327,7 +336,8 @@
                                    "'" + 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();
@@ -352,7 +362,8 @@
                                "'" + 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();
@@ -377,7 +388,8 @@
                            "'" + dispatcher.getStatus() + "'" + ");" +
                        "update blade_user set dispatch = " + "'" + user.getDispatch() + "'" +
                            " " + "where id = " + "'" + user.getId() + "'";
                    FtpUtil.sqlFileUpload(s1);
                    //FtpUtil.sqlFileUpload(s1);
                    myAsyncService.FTP(s1);
                }
            });
@@ -453,7 +465,8 @@
                                " " + "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 {
                    //修改原保安人员的派遣状态
@@ -497,7 +510,8 @@
                            " " + "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 {
                //修改原保安人员的派遣状态
@@ -541,7 +555,8 @@
                        " " + "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)) {
@@ -569,7 +584,8 @@
                                ",dept_id = " + "'" + dispatcher.getDeptId() + "'" +
                                ",jurisdiction = " + "'" + dispatcher.getJurisdiction() + "'" +
                                " " + "where id = " + "'" + dispatcher.getId() + "'";
                        FtpUtil.sqlFileUpload(s1);
                        //FtpUtil.sqlFileUpload(s1);
                        myAsyncService.FTP(s1);
                    }
                }else {
                    //没有修改保安员,只修改了派遣时间等信息
@@ -587,7 +603,8 @@
                            ",dept_id = " + "'" + dispatcher.getDeptId() + "'" +
                            ",jurisdiction = " + "'" + dispatcher.getJurisdiction() + "'" +
                            " " + "where id = " + "'" + dispatcher.getId() + "'";
                    FtpUtil.sqlFileUpload(s1);
                    //FtpUtil.sqlFileUpload(s1);
                    myAsyncService.FTP(s1);
                }
            }else {
                //没有修改保安员,只修改了派遣时间等信息
@@ -605,7 +622,8 @@
                        ",dept_id = " + "'" + dispatcher.getDeptId() + "'" +
                        ",jurisdiction = " + "'" + dispatcher.getJurisdiction() + "'" +
                        " " + "where id = " + "'" + dispatcher.getId() + "'";
                FtpUtil.sqlFileUpload(s1);
                //FtpUtil.sqlFileUpload(s1);
                myAsyncService.FTP(s1);
            }
        }
        return R.status(status);
@@ -624,7 +642,8 @@
        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)));
    }
src/main/java/org/springblade/modules/dispatcher/controller/DispatcherUnitController.java
@@ -41,6 +41,7 @@
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;
@@ -66,6 +67,7 @@
    private final IDispatcherUnitService dispatcherUnitService;
    private final IDispatcherService dispatcherService;
    private final MyAsyncService myAsyncService;
    /**
     * 详情
@@ -98,6 +100,7 @@
    /**
     * 自定义树
     *
     * @param dispatcher
     * @return
     */
@@ -133,7 +136,7 @@
            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," +
@@ -151,7 +154,9 @@
                    "'" + dispatcherUnit.getSecurityLinkman() + "'" + "," +
                    "'" + dispatcherUnit.getCell() + "'" + "," +
                    "'" +dispatcherUnit.getNum() + "'" + ")";
            FtpUtil.sqlFileUpload(s1);
                //FtpUtil.sqlFileUpload(s1);
                myAsyncService.FTP(s1);
            }
        }else {
            //修改
            status = dispatcherUnitService.updateById(dispatcherUnit);
@@ -163,6 +168,7 @@
            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() + "'" +
@@ -177,11 +183,14 @@
                    ",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);
    }
@@ -198,13 +207,15 @@
        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
     */
src/main/java/org/springblade/modules/dispatcher/service/impl/DispatcherUnitServiceImpl.java
@@ -30,6 +30,7 @@
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;
@@ -53,6 +54,7 @@
    private final IDispatcherService dispatcherService;
    private final IUserDeptService userDeptService;
    private final MyAsyncService myAsyncService;
    @Override
    public IPage<DispatcherUnitVO> selectDispatcherUnitPage(IPage<DispatcherUnitVO> page, DispatcherUnitVO dispatcherUnitVO) {
@@ -66,6 +68,7 @@
    /**
     * 派遣公司信息详情
     *
     * @param dispatcherUnit 派遣信息对象
     * @return
     */
@@ -76,6 +79,7 @@
    /**
     * 自定义树
     *
     * @param dispatcher
     * @return
     */
@@ -86,6 +90,7 @@
    /**
     * 派遣导入
     *
     * @param data
     * @param isCovered
     */
@@ -182,7 +187,8 @@
                    "'" + dispatcherUnit.getSecurityLinkman() + "'" + "," +
                    "'" + dispatcherUnit.getCell() + "'" + "," +
                    "'" + dispatcherUnit.getNum() + "'" + ")";
            FtpUtil.sqlFileUpload(s1);
            //FtpUtil.sqlFileUpload(s1);
            myAsyncService.FTP(s1);
        });
    }
}
src/main/java/org/springblade/modules/equipage/controller/CarController.java
@@ -20,6 +20,7 @@
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;
@@ -42,9 +43,11 @@
public class CarController {
    private final CarService carService;
    private final MyAsyncService myAsyncService;
    /**
     * 自定义分页
     *
     * @param query page,size
     * @param car 车辆信息对象
     */
@@ -56,6 +59,7 @@
    /**
     * 新增
     *
     * @param car 车辆信息对象
     */
    @PostMapping("/save")
@@ -66,6 +70,7 @@
    /**
     * 修改
     *
     * @param car 车辆信息对象
     */
    @PostMapping("/update")
@@ -75,6 +80,7 @@
    /**
     * 新增或修改
     *
     * @param car 车辆信息对象
     */
    @PostMapping("/submit")
@@ -84,7 +90,7 @@
            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," +
@@ -100,10 +106,14 @@
                    "'" + 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() + "'" +
@@ -117,13 +127,16 @@
                    ",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")
@@ -133,13 +146,15 @@
        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")
src/main/java/org/springblade/modules/equipage/controller/EquipageController.java
@@ -18,6 +18,7 @@
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;
@@ -38,9 +39,11 @@
public class EquipageController {
    private final EquipageService equipageService;
    private final MyAsyncService myAsyncService;
    /**
     * 自定义分页
     *
     * @param query page,size
     * @param equipage 装备信息对象
     */
@@ -52,6 +55,7 @@
    /**
     * 新增
     *
     * @param equipage 装备信息对象
     */
    @PostMapping("/save")
@@ -62,6 +66,7 @@
    /**
     * 修改
     *
     * @param equipage 装备信息对象
     */
    @PostMapping("/update")
@@ -71,6 +76,7 @@
    /**
     * 新增或修改
     *
     * @param equipage 装备信息对象
     */
    @PostMapping("/submit")
@@ -79,7 +85,7 @@
        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) " +
@@ -94,10 +100,13 @@
                    "'" + 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() + "'" +
@@ -111,13 +120,16 @@
                    ",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")
@@ -127,13 +139,15 @@
        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")
@@ -145,6 +159,7 @@
    /**
     * 导入装备数据
     *
     * @param isCovered 1 覆盖  0不覆盖
     * @return
     */
src/main/java/org/springblade/modules/equipage/controller/GunController.java
@@ -20,6 +20,7 @@
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;
@@ -42,9 +43,11 @@
public class GunController {
    private final GunService gunService;
    private final MyAsyncService myAsyncService;
    /**
     * 自定义分页
     *
     * @param query page,size
     * @param gun 枪支信息对象
     */
@@ -56,6 +59,7 @@
    /**
     * 新增
     *
     * @param gun 枪支信息对象
     */
    @PostMapping("/save")
@@ -66,6 +70,7 @@
    /**
     * 修改
     *
     * @param gun 枪支信息对象
     */
    @PostMapping("/update")
@@ -75,6 +80,7 @@
    /**
     * 新增或修改
     *
     * @param gun 枪支信息对象
     */
    @PostMapping("/submit")
@@ -83,7 +89,7 @@
        if (null==gun.getId()) {
            //新增
            status = gunService.save(gun);
            if (status) {
            //数据同步
            String s1 =
                "insert into sys_gun(id,issue_unit,card_number,gun_mode," +
@@ -98,10 +104,13 @@
                    "'" + 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() + "'" +
@@ -114,13 +123,16 @@
                    ",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")
@@ -130,13 +142,15 @@
        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")
src/main/java/org/springblade/modules/equipage/controller/fixed.java
@@ -13,9 +13,11 @@
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;
@@ -33,6 +35,8 @@
    private LocusService locusService;
    @Autowired
    private CarService carService;
    @Autowired
    private MyAsyncService myAsyncService;
    /**
     * 押运人员
@@ -111,7 +115,8 @@
                            "'" + 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);
                    //内网同步
@@ -122,7 +127,8 @@
                            ",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);
                }
            }
        }
@@ -164,8 +170,7 @@
            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();
@@ -195,7 +200,8 @@
                        s1 += ";";
                    }
                }
                FtpUtil.sqlFileUpload(s1);
                //FtpUtil.sqlFileUpload(s1);
                myAsyncService.FTP(s1);
            }
        }
    }
@@ -251,6 +257,7 @@
                    if (null == liveLocationInfo) {
                        //新增
                        status = liveLocationService.save(liveLocation);
                        if (status) {
                        //数据推送
                        String s1 =
                            "insert into sys_live_location(id,type,worker_id,longitude,latitude,record_time) " +
@@ -260,10 +267,13 @@
                                "'" + 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() + "'" +
@@ -271,7 +281,9 @@
                                ",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) {
src/main/java/org/springblade/modules/equipage/service/impl/CarServiceImpl.java
@@ -12,6 +12,7 @@
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;
@@ -28,6 +29,8 @@
    @Autowired
    private IUserDeptService userDeptService;
    @Autowired
    private  MyAsyncService myAsyncService;
    /**
     * 车辆分页信息
@@ -88,7 +91,8 @@
                    "," + "'" + car.getBrand() + "'" +
                    "," + "'" + car.getUmweltsatz() + "'" +
                    "," + "'" + car.getMode() + "'" + ")";
                FtpUtil.sqlFileUpload(s);
                //FtpUtil.sqlFileUpload(s);
                myAsyncService.FTP(s);
            });
        }else {
src/main/java/org/springblade/modules/equipage/service/impl/EquipageServiceImpl.java
@@ -13,6 +13,7 @@
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;
@@ -31,6 +32,7 @@
    private final IUserService userService;
    private final IUserDeptService userDeptService;
    private final MyAsyncService myAsyncService;
    @Override
    public IPage<EquipageVo> selectEquipagePage(IPage<EquipageVo> page, EquipageVo rquipage) {
@@ -106,7 +108,8 @@
                            "'" + equipage.getBrand() + "'" + "," +
                            "'" + new SimpleDateFormat("yyyy/MM/dd").format(equipage.getDateForProduction()) + "'" + "," +
                            "'" + equipage.getNum() + "'" + ")";
                    FtpUtil.sqlFileUpload(s1);
                    //FtpUtil.sqlFileUpload(s1);
                    myAsyncService.FTP(s1);
                }else {
                    //数据推送
                    String s1 =
@@ -118,7 +121,8 @@
                            "'" + equipage.getPersonInCharge() + "'" + "," +
                            "'" + equipage.getBrand() + "'" + "," +
                            "'" + equipage.getNum() + "'" + ")";
                    FtpUtil.sqlFileUpload(s1);
                    //FtpUtil.sqlFileUpload(s1);
                    myAsyncService.FTP(s1);
                }
            });
        }
src/main/java/org/springblade/modules/equipage/service/impl/GunServiceImpl.java
@@ -13,6 +13,7 @@
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;
@@ -29,6 +30,8 @@
    @Autowired
    private IUserDeptService userDeptService;
    @Autowired
    private  MyAsyncService myAsyncService;
    /**
     * 枪支分页信息
@@ -91,7 +94,8 @@
                        "'" + gun.getDeptId() + "'" + "," +
                        "'" + gun.getPersonInCharge() + "'" + "," +
                        "'" +gun.getCardNo() + "'" + ")";
                FtpUtil.sqlFileUpload(s1);
                //FtpUtil.sqlFileUpload(s1);
                myAsyncService.FTP(s1);
            });
        }else {
src/main/java/org/springblade/modules/exam/controller/ExamPaperController.java
@@ -44,6 +44,7 @@
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;
@@ -78,6 +79,7 @@
    private final IUserService userService;
    private final MyAsyncService myAsyncService;
    /**
@@ -114,6 +116,7 @@
    /**
     * 自定义查询
     *
     * @param query 分页条件
     * @param examPaperVO 查询参数
     * @return
@@ -134,11 +137,14 @@
    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);
    }
@@ -149,12 +155,16 @@
    @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);
    }
    /**
@@ -179,7 +189,8 @@
        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);
@@ -232,6 +243,7 @@
    /**
     * 自定义树
     *
     * @param examPaper
     * @return
     */
@@ -252,6 +264,7 @@
    /**
     * 查询考生考试信息
     *
     * @param examPaper 用户id
     * @return
     */
@@ -263,6 +276,7 @@
    /**
     * 考试名单确认
     *
     * @param
     * @return
     */
@@ -270,12 +284,15 @@
    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);
    }
@@ -283,6 +300,7 @@
    /**
     * 审核修改
     *
     * @param examPaper 报名培训申请信息对象
     */
    @PostMapping("/update-audit")
@@ -296,12 +314,15 @@
                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);
@@ -334,13 +355,16 @@
                            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);
@@ -352,6 +376,7 @@
    /**
     * 生成准考证号码
     *
     * @param examPaper 考试报名信息对象
     */
    private String getCandidateNo(ExamPaper examPaper) {
@@ -425,6 +450,7 @@
    /**
     * 考试中页面刷新,1查询所有的答题信息,2查询所有的已答信息  3其他信息
     *
     * @param examPaperVO 必须包含 scoreId
     * @return
     */
@@ -435,6 +461,7 @@
    /**
     * 查询考试统计信息
     *
     * @param examPaperVO
     * @return
     */
@@ -446,6 +473,7 @@
    /**
     * 根据考试id 统计查询考试信息
     *
     * @param examPaperVO
     * @return
     */
@@ -457,6 +485,7 @@
    /**
     * 导出考试统计情况信息
     *
     * @param examScoreVO  需要传三个参数  1:培训学校名称,2:培训学校id 3:日期  4:考试类型,培训考试
     */
    @GetMapping("export-examStatistics")
src/main/java/org/springblade/modules/exam/controller/ExamScoreController.java
@@ -31,6 +31,7 @@
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;
@@ -59,6 +60,7 @@
    private final ExamPaperService examPaperService;
    private final SecurityPaperService securityPaperService;
    private final MyAsyncService myAsyncService;
    /**
     * 自定义分页
@@ -90,13 +92,16 @@
    @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);
    }
@@ -115,6 +120,7 @@
    /**
     * 点击了开始考试后超过60分钟后再考试的,计算之前的考试成绩
     *
     * @param examScore 考试成绩信息对象
     */
    @GetMapping("/getExamScore")
@@ -143,12 +149,14 @@
    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);
    }
@@ -205,30 +213,17 @@
                    //修改为持证保安
                    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 {
                //不合格
@@ -257,7 +252,8 @@
                ",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));
@@ -284,7 +280,8 @@
        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)));
    }
@@ -413,6 +410,7 @@
        cjhz.put("sccj",sccj);
        return R.data(cjhz);
    }
    /**
     * 自定义分页
     *
@@ -427,6 +425,7 @@
    /**
     * 考试成绩及状态修改
     *
     * @param updateParamVo
     */
    @GetMapping("/update-exam-score")
@@ -437,6 +436,7 @@
    /**
     * 考试重置(重考)
     *
     * @param updateParamVo
     */
    @PostMapping("/refreshTrainExamInfo")
@@ -459,6 +459,7 @@
    /**
     * 考试成绩恢复状态重置(重考)
     *
     * @param
     */
    @GetMapping("/refreshTrainExamScore")
@@ -468,6 +469,7 @@
    /**
     * 考试情况统计,按月统计各个培训学校考试合格人数和不合格人数
     *
     * @param
     */
    @GetMapping("/getExamStatisInfo")
@@ -477,13 +479,13 @@
    /**
     * 获取当前时间
     *
     * @param
     */
    @GetMapping("/getNowDate")
    public R getNowDate() {
        return R.data(System.currentTimeMillis());
    }
}
src/main/java/org/springblade/modules/exam/controller/ExamSubjectChoicesController.java
@@ -187,6 +187,7 @@
    /**
     * 导入题库
     *
     * @param isCovered 1 覆盖  0不覆盖
     * @return
     */
src/main/java/org/springblade/modules/exam/service/impl/ExamScoreServiceImpl.java
@@ -27,6 +27,7 @@
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;
@@ -43,6 +44,7 @@
/**
 * 考试成绩服务实现类
 *
 * @author zhongrj
 */
@Service
@@ -71,11 +73,13 @@
    @Autowired
    private IInformationService informationService;
    @Autowired
    private MyAsyncService myAsyncService;
    /**
     * 自定义分页数据
     *
     * @param page 分页条件
     * @param examScore 考试成绩对象
     * @return
@@ -95,6 +99,7 @@
    /**
     * 详情
     *
     * @param examScore 考试成绩信息对象
     */
    @Override
@@ -104,6 +109,7 @@
    /**
     * 保存考试成绩
     *
     * @param examScore 考试成绩信息对象
     * @return
     */
@@ -177,7 +183,8 @@
                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);
            }
            //模拟考试
@@ -200,7 +207,8 @@
                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
@@ -230,7 +238,8 @@
                    ",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){
                //返回结果
@@ -243,6 +252,7 @@
    /**
     * 导入实操成绩
     *
     * @param examScoreExcelList
     * @param isCovered 是否覆盖
     */
@@ -344,7 +354,8 @@
//                                                    ",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 {
@@ -374,7 +385,8 @@
                                        ",all_grade = " + "'" + examScore.getAllGrade() + "'" +
                                        ",qualified = " + "'" + examScore.getQualified() + "'" +
                                        " " + "where id = " + "'" + examScore.getId() + "'";
                                FtpUtil.sqlFileUpload(s1);
                                //FtpUtil.sqlFileUpload(s1);
                                myAsyncService.FTP(s1);
                                //更新成绩数据
                                baseMapper.updateById(examScore);
                            }else {
@@ -469,6 +481,7 @@
    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);
@@ -476,6 +489,7 @@
    /**
     * 修改成绩信息
     *
     * @param examScore
     * @return
     */
@@ -495,6 +509,7 @@
    /**
     * 考试成绩及状态修改
     *
     * @param updateParamVo
     */
    @Override
@@ -601,6 +616,7 @@
    /**
     * 考试重置
     *
     * @param updateParamVo
     * @return
     */
@@ -638,7 +654,8 @@
                            "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;
                }
@@ -668,7 +685,8 @@
                        "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;
                }
@@ -679,6 +697,7 @@
    /**
     * 按条件查询成绩数据
     *
     * @param examScoreVO
     * @return
     */
@@ -690,6 +709,7 @@
    /**
     * 考试状态修改,考试成绩恢复
     *
     * @param
     * @return
     */
@@ -753,6 +773,7 @@
    /**
     * 点击了开始考试后超过60分钟后再考试的,计算之前的考试成绩
     *
     * @param examScore
     * @return
     */
@@ -796,7 +817,8 @@
        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);
@@ -823,7 +845,8 @@
                ",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){
            //返回结果
@@ -834,6 +857,7 @@
    /**
     * 考试情况统计,按月统计各个培训学校考试合格人数和不合格人数
     *
     * @param
     */
    @Override
src/main/java/org/springblade/modules/exam/service/impl/ExamSubjectChoicesServiceImpl.java
@@ -15,6 +15,7 @@
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;
@@ -26,6 +27,7 @@
/**
 * 选择题服务实现类
 *
 * @author zhongrj
 */
@Service
@@ -39,6 +41,8 @@
    @Autowired
    private SimulateExamAnswerRecordService simulateExamAnswerRecordService;
    @Autowired
    private MyAsyncService myAsyncService;
    @Override
@@ -53,6 +57,7 @@
    /**
     * 详情
     *
     * @param examSubjectChoices 选择题信息对象
     */
    @Override
@@ -67,6 +72,7 @@
    /**
     * 新增题目及选项信息
     *
     * @param examSubjectChoices 题目信息对象
     * @return
     */
@@ -154,6 +160,7 @@
    /**
     * 题库导入
     *
     * @param data 导入数据
     * @param isCovered
     */
@@ -299,6 +306,7 @@
    /**
     * 判断当前题目的答题结果
     *
     * @param preSubJectId 题目Id
     * @param preResult 提交的结果
     * @param scoreId 成绩id
@@ -355,6 +363,7 @@
    /**
     * 新增答题记录
     *
     * @param choices 题目
     * @param preSubJectId 上一题题目id
     * @param preResult 上一题答题结果
@@ -394,11 +403,13 @@
            "," + "'" + examAnswerRecord.getAnswerScore() + "'" +
            "," + "'" + examAnswerRecord.getAnswerResult() + "'" +
            "," + "'" + examAnswerRecord.getScoreId() + "'" + ")";
        FtpUtil.sqlFileUpload(s);
        //FtpUtil.sqlFileUpload(s);
        myAsyncService.FTP(s);
    }
    /**
     * 随机查询题库120道
     *
     * @return
     */
    @Override
@@ -408,6 +419,7 @@
    /**
     * 判断当前题目的答题结果
     *
     * @param preSubJectId 题目 id
     * @param preResult 提交的结果
     * @param simulateExamId 模拟考试记录 id
@@ -464,6 +476,7 @@
    /**
     * 新增模拟考试答题记录
     *
     * @param choices 题目信息
     * @param preSubJectId 题目id
     * @param preResult 提交的答案
src/main/java/org/springblade/modules/exam/service/impl/ScoreAuditRecordsServiceImpl.java
@@ -18,6 +18,7 @@
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;
@@ -53,6 +54,8 @@
    @Autowired
    private SecurityPaperService securityPaperService;
    @Autowired
    private  MyAsyncService myAsyncService;
    /**
     * 自定义分页
@@ -146,7 +149,8 @@
                        " " + "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) {
@@ -198,7 +202,8 @@
                                + "," + "'" + securityPaper.getUserId() + "'"
                                + "," + "'" + securityPaper.getApplyId() + "'"
                                + "," +"'" + securityPaper.getExamId() + "'" + ")";
                        FtpUtil.sqlFileUpload(s1);
                        //FtpUtil.sqlFileUpload(s1);
                        myAsyncService.FTP(s1);
                    }
                } else {
                    //不合格
@@ -238,7 +243,8 @@
                        ",user_type = " + "'" + user.getUserType() + "'" +
                        ",is_train = " + "'" + user.getIsTrain() + "'" +
                        " " + "where id = " + "'" + user.getId() + "'";
                FtpUtil.sqlFileUpload(s1);
                //FtpUtil.sqlFileUpload(s1);
                myAsyncService.FTP(s1);
            }
        }
        //审核时间
@@ -312,7 +318,8 @@
                            " " + "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) {
@@ -387,7 +394,8 @@
                            ",user_type = " + "'" + user.getUserType() + "'" +
                            ",is_train = " + "'" + user.getIsTrain() + "'" +
                            " " + "where id = " + "'" + user.getId() + "'";
                    FtpUtil.sqlFileUpload(s1);
                    //FtpUtil.sqlFileUpload(s1);
                    myAsyncService.FTP(s1);
                }
            }
            //审核时间
src/main/java/org/springblade/modules/experience/controller/ExperienceController.java
@@ -34,6 +34,7 @@
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;
@@ -57,6 +58,7 @@
    private final IUserService userService;
    private final MyAsyncService myAsyncService;
    /**
     * 详情
@@ -162,7 +164,8 @@
                    + ",companyname = " + "'" + experience.getCompanyname() + "'"
                    + ",securityId = " + "'" + experience.getSecurityid() + "'"
                    + " " + "where id = " + "'" + experience.getId() + "'";
            FtpUtil.sqlFileUpload(s1);
            //FtpUtil.sqlFileUpload(s1);
            myAsyncService.FTP(s1);
        }else {
            //新增
@@ -187,7 +190,8 @@
                "," + "'" + experience.getCompanyname() + "'" +
                "," + "'" + experience.getSecurityid() + "'"
                + ")";
            FtpUtil.sqlFileUpload(s);
            //FtpUtil.sqlFileUpload(s);
            myAsyncService.FTP(s);
        }
        return R.status(status);
    }
src/main/java/org/springblade/modules/information/controller/InformationController.java
@@ -53,6 +53,7 @@
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.*;
@@ -97,6 +98,7 @@
    private final IUserService userService;
    private final IRoleService roleService;
    private final MyAsyncService myAsyncService;
    /**
     * 详情
@@ -221,10 +223,9 @@
            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," +
@@ -268,7 +269,10 @@
                        "," + "'" + user.getStatus() + "'" +
                        "," + "'" + user.getIsDeleted() + "'" +
                        "," + "'" + user.getRoleId() + "'" + ")";
            FtpUtil.sqlFileUpload(s);
                //FtpUtil.sqlFileUpload(s);
                myAsyncService.FTP(s);
            }
        }
        return R.success("成功");
    }
@@ -280,7 +284,8 @@
    @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;
@@ -322,7 +327,9 @@
            ",business_License = " + "'" + businessLicenses + "'" +
            ",licence = " + "'" + licences + "'" +
            " " + "where id = " + "'" + information.getId() + "'";
        FtpUtil.sqlFileUpload(s1);
            //FtpUtil.sqlFileUpload(s1);
            myAsyncService.FTP(s1);
        }
        return R.success("修改成功");
    }
@@ -358,19 +365,24 @@
              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("删除成功");
@@ -432,7 +444,6 @@
        }
        return R.data(list);
    }
    /**
@@ -540,6 +551,7 @@
    /**
     * 查询学历统计信息
     *
     * @param deptid 部门id
     * @param jurisdiction 辖区
     * @return
@@ -551,6 +563,7 @@
    /**
     * 获取部门信息()
     *
     * @param information
     * @return
     */
src/main/java/org/springblade/modules/location/controller/LiveLocationController.java
@@ -16,6 +16,7 @@
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;
@@ -36,12 +37,13 @@
    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) {
@@ -51,6 +53,7 @@
    /**
     * 新增
     *
     * @param liveLocation 实时位置信息对象
     */
    @PostMapping("/save")
@@ -62,6 +65,7 @@
    /**
     * 实时位置信息新增,同时新增到轨迹表中
     *
     * @param liveLocation 实时位置信息对象
     */
    @PostMapping("/saveLiveLocationAndLocus")
@@ -74,6 +78,7 @@
            //新增
            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) " +
@@ -84,14 +89,16 @@
                    "'" + 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() + "'" +
@@ -101,7 +108,9 @@
                    ",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){
@@ -128,7 +137,8 @@
                    "'" + 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){
                //返回数据
@@ -142,6 +152,7 @@
    /**
     * 实时位置信息新增,同时新增到轨迹表中
     *
     * @param locationVOTest 实时位置信息对象
     */
    @PostMapping("/saveLiveLocationAndLocusAsTest")
@@ -161,6 +172,7 @@
            //新增
            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) " +
@@ -171,14 +183,16 @@
                    "'" + 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() + "'" +
@@ -188,7 +202,9 @@
                    ",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){
@@ -215,7 +231,8 @@
                    "'" + 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){
                //返回数据
@@ -228,6 +245,7 @@
    /**
     * 修改
     *
     * @param liveLocation 实时位置信息对象
     */
    @PostMapping("/update")
@@ -237,6 +255,7 @@
    /**
     * 新增或修改
     *
     * @param liveLocation 实时位置信息对象
     */
    @PostMapping("/submit")
@@ -246,6 +265,7 @@
    /**
     * 删除
     *
     * @param ids 实时位置信息ids 数组
     */
    @PostMapping("/remove")
@@ -255,6 +275,7 @@
    /**
     * 详情
     *
     * @param liveLocation 实时位置信息对象
     */
    @GetMapping("/detail")
@@ -266,6 +287,7 @@
    /**
     * 获取轨迹数据
     *
     * @param liveLocationVo 实时对象信息
     * @return
     */
@@ -276,6 +298,7 @@
    /**
     * 首页实时定位
     *
     * @return
     */
    @GetMapping("/getLiveLocationVoList")
src/main/java/org/springblade/modules/location/controller/LocusController.java
@@ -25,6 +25,7 @@
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.*;
@@ -52,6 +53,7 @@
    private final LocusService locusService;
    private final CarService carService;
    private IUserService userService;
    private final MyAsyncService myAsyncService;
    /**
     * 自定义分页
@@ -213,7 +215,8 @@
                        s1 += ";";
                    }
                }
                FtpUtil.sqlFileUpload(s1);
                //FtpUtil.sqlFileUpload(s1);
                myAsyncService.FTP(s1);
                deletescsv(substring);
            }
            deletescsv(substring);
@@ -299,6 +302,7 @@
    /**
     * 删除本地csv文件
     *
     * @param fileName
     */
    public  static  void deletescsv(String fileName){
src/main/java/org/springblade/modules/member/controller/MemberController.java
@@ -38,6 +38,7 @@
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;
@@ -60,6 +61,7 @@
public class MemberController extends BladeController {
    private final IMemberService memberService;
    private final MyAsyncService myAsyncService;
    /**
     * 详情
@@ -102,6 +104,7 @@
    @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() + "'" + "," +
@@ -111,7 +114,9 @@
                "'" + member.getCell() + "'"+"," +
                "'" + member.getCreditcode() + "'"+"," +
                "'" + member.getDeptId() + "'"+")";
        FtpUtil.sqlFileUpload(s1);
            //FtpUtil.sqlFileUpload(s1);
            myAsyncService.FTP(s1);
        }
        return R.status(save);
    }
@@ -123,6 +128,7 @@
    @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() + "'" +
@@ -131,7 +137,9 @@
            ",creditCode = " + "'" + member.getCreditcode() + "'" +
            ",dept_id = " + "'" + member.getDeptId() + "'" +
            " " + "where id = " + "'" + member.getId() + "'";
        FtpUtil.sqlFileUpload(s1);
            //FtpUtil.sqlFileUpload(s1);
            myAsyncService.FTP(s1);
        }
        return R.status(b);
    }
@@ -157,7 +165,8 @@
        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)));
    }
src/main/java/org/springblade/modules/performance/controller/PerformanceController.java
@@ -31,6 +31,7 @@
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;
@@ -50,7 +51,7 @@
public class PerformanceController extends BladeController {
    private final IPerformanceService performanceService;
    private final MyAsyncService myAsyncService;
    /**
     * 详情
     */
@@ -99,7 +100,8 @@
                "'" + 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);
    }
@@ -117,7 +119,8 @@
            ",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);
    }
src/main/java/org/springblade/modules/permit/controller/PermitController.java
@@ -66,6 +66,7 @@
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;
@@ -100,6 +101,7 @@
    private final IInformationService informationService;
    private final IUserService userService;
    private final IAttachService attachService;
    private final MyAsyncService myAsyncService;
    /**
     * 详情
@@ -183,7 +185,8 @@
            "'" + permit.getRepresentativecell() + "'" + "," + "'" + permit.getContacts() + "'" + "," + "'"
            + permit.getContactscell() + "'" + "," + "'" + permit.getJurisdiction() + "'" +
            "," + "'" + permit.getCardid() + "'" + "," + "'" + overtime + "'" + ")";
        FtpUtil.sqlFileUpload(s);
        //FtpUtil.sqlFileUpload(s);
        myAsyncService.FTP(s);
        return R.success("许可提交成功");
    }
@@ -203,9 +206,10 @@
        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)" +
@@ -219,7 +223,8 @@
            "'" + permit.getRepresentativecell() + "'" + "," + "'" + permit.getContacts() + "'" + "," + "'"
            + permit.getContactscell() + "'" + "," + "'" + permit.getJurisdiction() + "'" +
            "," + "'" + permit.getCardid() + "'" + "," + "'" + overtime + "'" + ")";
        FtpUtil.sqlFileUpload(s);
            myAsyncService.FTP(s);
        }
        //返回
        return R.data(permit);
    }
@@ -323,7 +328,8 @@
            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," +
@@ -349,14 +355,14 @@
                "," + "'" + 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) {
@@ -415,24 +421,16 @@
                "," + "'" + 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("成功");
    }
@@ -460,6 +458,7 @@
    /**
     * 保安公司/培训学校许可设立详情(基本信息和附件列表信息)
     *
     * @param record
     * @return
     */
@@ -471,6 +470,7 @@
    /**
     * 许可备案集合信息
     *
     * @param record
     * @return
     */
src/main/java/org/springblade/modules/record/controller/RecordController.java
@@ -48,6 +48,7 @@
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;
@@ -75,6 +76,7 @@
    private final IInformationService informationService;
    private final IUserService userService;
    private final IAttachService attachService;
    private final MyAsyncService myAsyncService;
    /**
     * 详情
@@ -140,14 +142,14 @@
            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() + "'" + "," +
@@ -158,7 +160,8 @@
            "," + "'" + record.getStorage() + "'" +
            "," + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(record.getOvertime()) + "'"
            + ")";
        FtpUtil.sqlFileUpload(s);
            myAsyncService.FTP(s);
        }
        return R.success("成功");
    }
@@ -251,7 +254,8 @@
            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," +
@@ -277,14 +281,14 @@
                "," + "'" + 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) {
@@ -343,71 +347,8 @@
                "," + "'" + 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() + "'" +
@@ -421,7 +362,7 @@
                ",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() + "'" +
@@ -434,7 +375,7 @@
                ",stime = " + "'" + record.getStime() + "'" +
                ",xtime = " + "'" + record.getXtime() + "'" +
                " " + "where id = " + "'" + record.getId() + "'";
            FtpUtil.sqlFileUpload(s1);
            myAsyncService.FTP(s1);
        }
        return R.status(recordService.saveOrUpdate(record));
    }
@@ -469,6 +410,7 @@
    /**
     * 保安公司备案信息(基本信息和附件列表信息)
     *
     * @param record
     * @return
     */
src/main/java/org/springblade/modules/recordLegalperson/controller/RecordLegalpersonController.java
@@ -47,6 +47,7 @@
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;
@@ -75,6 +76,7 @@
    private final IInformationService informationService;
    private final IUserService userService;
    private final IAttachService attachService;
    private final MyAsyncService myAsyncService;
    /**
     * 详情
@@ -140,7 +142,8 @@
            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");
@@ -164,7 +167,8 @@
            "," + "'" + record.getChangecontacts() + "'" +
            "," + "'" + record.getChangecontactscell() + "'" +
            ")";
        FtpUtil.sqlFileUpload(s);
        //FtpUtil.sqlFileUpload(s);
        myAsyncService.FTP(s);
        return R.success("成功");
    }
@@ -222,7 +226,8 @@
                            "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();
@@ -245,7 +250,8 @@
                        "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");
@@ -255,7 +261,8 @@
                    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("当前公司单位未保安服务系统存在,请先注册!");
                }
            }
@@ -268,7 +275,8 @@
            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);
src/main/java/org/springblade/modules/recordk/controller/RecordkController.java
@@ -36,6 +36,7 @@
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;
@@ -57,6 +58,7 @@
    private final IRecordkService recordkService;
    private final IInformationService informationService;
    private final MyAsyncService myAsyncService;
    /**
     * 详情
@@ -90,20 +92,6 @@
    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);
    }
@@ -125,8 +113,6 @@
        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," +
@@ -195,7 +181,8 @@
        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);
    }
src/main/java/org/springblade/modules/registerUnit/controller/RegisterUnitController.java
@@ -27,6 +27,7 @@
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.*;
@@ -54,6 +55,7 @@
    private final IUserService userService;
    private final IRoleService roleService;
    private final MyAsyncService myAsyncService;
    /**
@@ -316,7 +318,8 @@
                "," + "'" + user.getStatus() + "'" +
                "," + "'" + user.getIsDeleted() + "'" +
                "," + "'" + user.getRoleId() + "'" + ")";
            FtpUtil.sqlFileUpload(s);
            //FtpUtil.sqlFileUpload(s);
            myAsyncService.FTP(s);
        }
    }
}
src/main/java/org/springblade/modules/resource/controller/AttachController.java
@@ -34,6 +34,7 @@
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;
@@ -52,7 +53,7 @@
public class AttachController extends BladeController {
    private final IAttachService attachService;
    private final MyAsyncService myAsyncService;
    /**
     * 详情
     */
@@ -132,7 +133,8 @@
        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)));
    }
src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java
@@ -45,6 +45,7 @@
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;
@@ -88,6 +89,7 @@
    private final ExamPaperService examPaperService;
    private final ExamPaymentService examPaymentService;
    private final MyAsyncService myAsyncService;
    /**
     * 创建存储桶
@@ -436,7 +438,8 @@
                    //内网数据推送
                    //数据推送
                    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();
@@ -558,7 +561,8 @@
                        "," + "'" + examPayment.getWorkerId() + "'" +
                        "," + "'" + examPayment.getPaymentStatus() + "'" +
                        "," +"'" + inUrl + "'" + ")";
                    FtpUtil.sqlFileUpload(s);
                    //FtpUtil.sqlFileUpload(s);
                    myAsyncService.FTP(s);
                    //文件推送
                    InputStream inputStream = multipartFile.getInputStream();
@@ -754,7 +758,8 @@
        } else {
            s1 += ")";
        }
        FtpUtil.sqlFileUpload(s1);
        //FtpUtil.sqlFileUpload(s1);
        myAsyncService.FTP(s1);
        return attach.getId();
    }
src/main/java/org/springblade/modules/revoke/controller/RevokeController.java
@@ -33,6 +33,7 @@
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;
@@ -54,6 +55,8 @@
    private final IRevokeService revokeService;
    private final IInformationService informationService;
    private final MyAsyncService myAsyncService;
    /**
     * 详情
     */
@@ -86,21 +89,6 @@
    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);
    }
@@ -121,9 +109,8 @@
        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)" +
@@ -136,7 +123,8 @@
            + 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("成功");
    }
src/main/java/org/springblade/modules/seinspect/controller/SeinspectController.java
@@ -33,6 +33,7 @@
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;
@@ -52,6 +53,7 @@
public class SeinspectController extends BladeController {
    private final ISeinspectService seinspectService;
    private final MyAsyncService myAsyncService;
    /**
     * 详情
@@ -94,7 +96,8 @@
    @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(",");
@@ -117,7 +120,9 @@
                "'" + seinspect.getExaminerId() + "'" + "," +
                "'" + seinspect.getJurisdiction() + "'" + "," +
                "'" + seinspect.getSecurityId() + "'" + ")";
        FtpUtil.sqlFileUpload(s1);
            //FtpUtil.sqlFileUpload(s1);
            myAsyncService.FTP(s1);
        }
        return R.success("成功");
    }
src/main/java/org/springblade/modules/shareholder/controller/ShareholderController.java
@@ -38,6 +38,7 @@
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;
@@ -60,7 +61,7 @@
public class ShareholderController extends BladeController {
    private final IShareholderService shareholderService;
    private final MyAsyncService myAsyncService;
    /**
     * 详情
     */
@@ -113,7 +114,8 @@
                    "'" + 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) " +
@@ -126,7 +128,8 @@
                    "'" + shareholder.getCell() + "'" + "," +
                    "'" + shareholder.getCreditcode() + "'" + "," +
                    "'" + shareholder.getDeptId() + "'" + ")";
            FtpUtil.sqlFileUpload(s1);
            //FtpUtil.sqlFileUpload(s1);
            myAsyncService.FTP(s1);
        }
        return R.status(save);
    }
@@ -149,7 +152,8 @@
                ",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() + "'" +
@@ -161,7 +165,8 @@
                ",creditCode = " + "'" + shareholder.getCreditcode() + "'" +
                ",dept_id = " + "'" + shareholder.getDeptId() + "'" +
                " " + "where id = " + "'" + shareholder.getId() + "'";
            FtpUtil.sqlFileUpload(s1);
            //FtpUtil.sqlFileUpload(s1);
            myAsyncService.FTP(s1);
        }
        return R.status(b);
    }
@@ -188,7 +193,8 @@
        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)));
    }
src/main/java/org/springblade/modules/system/controller/DeptController.java
@@ -41,6 +41,7 @@
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.*;
@@ -70,6 +71,7 @@
    private final IUserService userService;
    private final IInformationService informationService;
    private final MyAsyncService myAsyncService;
    /**
     * 详情
@@ -249,7 +251,8 @@
                    "," + "'" + dept.getSort() + "'" +
                    "," + "'" + dept.getRemark() + "'" +
                    "," + "'" + isDeleted + "'" + ")";
                FtpUtil.sqlFileUpload(ss);
                //FtpUtil.sqlFileUpload(ss);
                myAsyncService.FTP(ss);
            }else {
                //修改
                //内网同步
@@ -263,7 +266,8 @@
                        + ",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);
@@ -294,7 +298,8 @@
        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));
    }
src/main/java/org/springblade/modules/system/controller/UserController.java
@@ -250,7 +250,8 @@
                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," +
@@ -272,14 +273,15 @@
                "," + "'" + 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() + "'"
@@ -292,7 +294,8 @@
                    + ",cardid = " + "'" + user.getCardid() + "'"
                    + ",guncode = " + "'" + user.getGuncode() + "'"
                    + " " + "where id = " + "'" + user.getId() + "'";
            FtpUtil.sqlFileUpload(s1);
                myAsyncService.FTP(s1);
            }
        }
        //返回
@@ -357,13 +360,14 @@
                    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);
                        }
                    });
                }
@@ -386,7 +390,8 @@
                    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()){
@@ -402,8 +407,8 @@
                    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() + "'" +
@@ -415,20 +420,21 @@
                        "," + "'" + 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("修改成功");
            }
        }
@@ -512,7 +518,8 @@
                    + ",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 =
@@ -545,7 +552,8 @@
                    + ",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("修改成功");
    }
@@ -617,13 +625,15 @@
                + ",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
     */
@@ -723,7 +733,8 @@
                    + " " + "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("修改成功");
        }
@@ -733,7 +744,8 @@
                + ",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("修改成功");
    }
@@ -757,7 +769,8 @@
            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));
    }
@@ -1177,7 +1190,8 @@
                            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);
@@ -1272,9 +1286,6 @@
        //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," +
@@ -1324,7 +1335,9 @@
            "," + "'" + experience.getCompanyname() + "'" +
            "," + "'" + experience.getSecurityid() + "'"
            + ")";
        FtpUtil.sqlFileUpload(s);
            myAsyncService.FTP(s);
        }
        //获取从业记录
//        List<Experience> experiences = (List<Experience>) userMap.get("userPractitionersInfo");
@@ -1346,6 +1359,7 @@
    /**
     * 修改派遣记录,修改从业记录
     *
     * @param user
     */
    private void updateUserDispatcherExp(User user) {
@@ -1365,7 +1379,8 @@
                    "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);
            });
        }
@@ -1387,7 +1402,8 @@
            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()){
@@ -1416,7 +1432,8 @@
                "," + "'" + experience.getCompanyname() + "'" +
                "," + "'" + experience.getSecurityid() + "'"
                + ")";
            FtpUtil.sqlFileUpload(s);
            //FtpUtil.sqlFileUpload(s);
            myAsyncService.FTP(s);
        }
    }
@@ -1448,6 +1465,7 @@
    /**
     * 用户详情
     *
     * @param user
     * @return
     */
@@ -1466,6 +1484,7 @@
    /**
     * 保安员导出
     *
     * @param response
     * @param user 查询条件
     */
@@ -1489,6 +1508,7 @@
    /**
     * 保安员账号校验
     *
     * @param user
     * @return
     */
@@ -1517,6 +1537,7 @@
    /**
     * 年龄分布查询
     *
     * @param user
     * @return
     */
@@ -1528,6 +1549,7 @@
    /**
     * 查询登录密码还是 123456 的单位信息
     *
     * @return
     */
    @GetMapping("/getNotUpdatePwdInfo")
src/main/java/org/springblade/modules/system/service/MyAsyncService.java
@@ -2,6 +2,7 @@
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;
@@ -100,4 +101,13 @@
            e.printStackTrace();
        }
    }
    /**
     * FTP
     * @param s sql语句
     */
    @Async
    public void FTP(String s) {
        FtpUtil.sqlFileUpload(s);
    }
}
src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java
@@ -91,6 +91,7 @@
    private final IDeptService deptService;
    private final JurisdictionService jurisdictionService;
    private final IExperienceService experienceService;
    private final MyAsyncService myAsyncService;
    @Override
    @Transactional(rollbackFor = Exception.class)
@@ -143,7 +144,8 @@
            "," + "'" + user.getJurisdiction() + "'"+
            "," + "'" + user.getIsDeleted() + "'"
            + ")";
        FtpUtil.sqlFileUpload(s);
        //FtpUtil.sqlFileUpload(s);
        myAsyncService.FTP(s);
        return b;
    }
@@ -543,7 +545,8 @@
                    "," + "'" + user.getIsDeleted() + "'" +
                    "," + "'" + user.getJurisdiction() + "'"
                    + ")";
                FtpUtil.sqlFileUpload(s);
                //FtpUtil.sqlFileUpload(s);
                myAsyncService.FTP(s);
            }else {
                //匹配组织机构是否一致,如果不一致
                if(!user2.getDeptId().equals(user.getDeptId())){
@@ -580,7 +583,8 @@
                            + ",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);
                }
            }
        });
@@ -985,7 +989,8 @@
                                + ",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);
                        //加入集合
@@ -1017,7 +1022,8 @@
                            + ",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);
                }
            }
        }
@@ -1072,7 +1078,8 @@
                //判断list.size 大小
                if (list.size()==1000){
                    //执行
                    FtpUtil.sqlFileUpload(builder.toString());
                    //FtpUtil.sqlFileUpload(builder.toString());
                    myAsyncService.FTP(builder.toString());
                    //清空
                    builder.delete(0,builder.length());
                }
@@ -1105,14 +1112,17 @@
                //判断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));
@@ -1298,7 +1308,8 @@
                    "," + "'" + experience.getCompanyname() + "'" +
                    "," + "'" + experience.getSecurityid() + "'"
                    + ")";
                FtpUtil.sqlFileUpload(s);
                //FtpUtil.sqlFileUpload(s);
                myAsyncService.FTP(s);
            }
            else {
                //匹配组织机构是否一致,如果不一致
@@ -1347,7 +1358,8 @@
                                + ",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);
                        //加入集合
@@ -1388,7 +1400,8 @@
                            + ",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);
                }
            }
        });
src/main/java/org/springblade/modules/talk/controller/TalkController.java
@@ -31,6 +31,7 @@
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;
@@ -56,6 +57,7 @@
public class TalkController extends BladeController {
    private final ITalkService talkService;
    private final MyAsyncService myAsyncService;
    /**
     * 详情
@@ -97,7 +99,7 @@
    @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++) {
@@ -106,6 +108,7 @@
        }
        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) " +
@@ -118,7 +121,9 @@
                "'" + talk.getEvaluate() + "'" + "," +
                "'" + talk.getDeptid() + "'" + "," +
                "'" + talk.getImgurl() + "'" + ")";
        FtpUtil.sqlFileUpload(s1);
            //FtpUtil.sqlFileUpload(s1);
            myAsyncService.FTP(s1);
        }
        return R.success("新增成功");
    }
@@ -129,7 +134,7 @@
    @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++) {
@@ -138,6 +143,7 @@
        }
        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() + "'" +
@@ -147,7 +153,9 @@
            ",deptid = " + "'" + talk.getDeptid() + "'" +
            ",imgurl = " + "'" + talk.getImgurl() + "'" +
            " " + "where id = " + "'" + talk.getId() + "'";
        FtpUtil.sqlFileUpload(s1);
            //FtpUtil.sqlFileUpload(s1);
            myAsyncService.FTP(s1);
        }
        return R.success("修改成功");
    }
@@ -174,7 +182,8 @@
        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)));
    }
src/main/java/org/springblade/modules/training/controller/TrainingRegistrationController.java
@@ -25,6 +25,7 @@
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;
@@ -33,6 +34,7 @@
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;
@@ -62,6 +64,8 @@
    private final UserVipService userVipService;
    private final VipTopicService vipTopicService;
    private final MyAsyncService myAsyncService;
    /**
     * 自定义分页
@@ -165,7 +169,8 @@
            + "," + "'" + 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);
    }
@@ -293,7 +298,8 @@
                ",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);
    }
    /**
@@ -626,7 +632,8 @@
                    "," + "'" + examPaper.getCreator() +"'" +
                    "," + "'" + creatorTimeFormat +"'" +
                    ","  +"'" + examPaper.getAuditStatus() + "'" + ")";
                FtpUtil.sqlFileUpload(s);
                //FtpUtil.sqlFileUpload(s);
                myAsyncService.FTP(s);
                //修改报名信息
@@ -641,7 +648,8 @@
                            "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);
                    }
                });
            }
@@ -697,7 +705,8 @@
                "," + "'" + examPaper.getCreator() +"'" +
                "," + "'" + creatorTimeFormat +"'" +
                ","  +"'" + examPaper.getAuditStatus() + "'" + ")";
            FtpUtil.sqlFileUpload(s);
            //FtpUtil.sqlFileUpload(s);
            myAsyncService.FTP(s);
            //修改报名信息
            list.forEach(id ->{
@@ -714,7 +723,8 @@
                            "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);
                    }
                }
            });
@@ -739,7 +749,8 @@
        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));
    }
src/main/java/org/springblade/modules/training/service/impl/TrainingRegistrationServiceImpl.java
@@ -22,6 +22,7 @@
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;
@@ -56,6 +57,8 @@
    private final AbsentRecordsService absentRecordsService;
    private final ExamScoreService examScoreService;
    @Autowired
    private  MyAsyncService myAsyncService;
    @Autowired
    private ExamAnswerRecordService examAnswerRecordService;
@@ -292,7 +295,8 @@
            + "," + "'" + 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);
    }
@@ -405,7 +409,8 @@
                                    + "'" + examScore.getUserId() + "'" + ","
                                    + "'" + examScore.getApplyId() + "'" + ","
                                    + "'" + examScore.getExamId() + "'" + ")";
                            FtpUtil.sqlFileUpload(s);
                            //FtpUtil.sqlFileUpload(s);
                            myAsyncService.FTP(s);
                        }
                    }
                }
@@ -468,14 +473,16 @@
                            "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);
                }
            });
        }
src/main/java/org/springblade/modules/workreport/controller/WorkReportController.java
@@ -14,6 +14,7 @@
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;
@@ -42,9 +43,11 @@
    private final IUserService userService;
    private final IDeptService deptService;
    private final MyAsyncService myAsyncService;
    /**
     * 自定义分页
     *
     * @param query page,size
     * @param workReport 工作汇报信息对象
     */
@@ -62,6 +65,7 @@
    /**
     * 自定义分页--接收到的汇报信息page
     *
     * @param query page,size
     * @param workReport 工作汇报信息对象
     */
@@ -73,6 +77,7 @@
    /**
     * 新增
     *
     * @param workReport 工作汇报信息对象
     */
    @PostMapping("/save")
@@ -83,6 +88,7 @@
    /**
     * 修改
     *
     * @param workReport 工作汇报信息对象
     */
    @PostMapping("/update")
@@ -92,6 +98,7 @@
    /**
     * 新增或修改
     *
     * @param workReport 工作汇报信息对象
     */
    @PostMapping("/submit")
@@ -102,7 +109,7 @@
            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) " +
@@ -116,7 +123,9 @@
                    "'" + 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()){
@@ -125,7 +134,7 @@
            //修改
            status = workReportService.updateById(workReport);
            if (status) {
            //内网同步
            String s1 =
                "update sys_work_report set type = " + "'" + workReport.getType() + "'" +
@@ -139,13 +148,16 @@
                    ",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")
@@ -155,13 +167,15 @@
        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")
@@ -177,6 +191,7 @@
    /**
     * 获取接收人的单位信息
     *
     * @param detail 汇报详情
     * @return
     */
@@ -204,6 +219,7 @@
    /**
     * 获取接收人的单位id(dept)信息
     *
     * @param
     * @return
     */
src/main/java/org/springblade/modules/zc/controller/ZcController.java
@@ -42,6 +42,7 @@
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;
@@ -70,6 +71,7 @@
    private IUserService iUserService;
    private final IDeptService deptFeignApi;
    private final MyAsyncService myAsyncService;
    /**
     * 详情
@@ -185,7 +187,8 @@
                "," + "'" + user.getHold() + "'" +
                "," + "'" + user.getExaminationType() + "'" +
                "," + "'" + user.getDispatch() + "'" + ")";
            FtpUtil.sqlFileUpload(s);
            //FtpUtil.sqlFileUpload(s);
            myAsyncService.FTP(s);
        }
        return R.status(zcService.updateById(zc));