智慧保安后台管理-外网
Administrator
2022-06-21 cf28e9992cb05efc608550d2037e968eea758975
制证批量审批修改
1 files modified
2 files added
61 ■■■■ changed files
src/main/java/org/springblade/modules/exam/service/impl/ScoreAuditRecordsServiceImpl.java 25 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/sqlAsyc/Sql.java 10 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/sqlAsyc/SqlAsyncController.java 26 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/exam/service/impl/ScoreAuditRecordsServiceImpl.java
@@ -183,12 +183,7 @@
                        " " + "where id = " + "'" + examScore.getId() + "';"+
                    "update sys_training_registration set is_exam = " + "'" + trainingRegistration.getIsExam() + "'" +
                        ",cancel = " + "'" + trainingRegistration.getCancel() + "'" +
                        " " + "where id = " + "'" + trainingRegistration.getId() + "';"+
                    "update blade_user set hold = " + "'" + user.getHold() + "'" +
                        ",securitynumber = " + "'" + user.getSecuritynumber() + "'" +
                        ",user_type = " + "'" + user.getUserType() + "'" +
                        ",is_train = " + "'" + user.getIsTrain() + "'" +
                        " " + "where id = " + "'" + user.getId() + "'";
                        " " + "where id = " + "'" + trainingRegistration.getId() + "'";
                myAsyncService.FTP(s1);
            }
        }
@@ -273,13 +268,13 @@
                        //设置为未制证的状态
                        user.setUserType(7);
                        //如果已有保安证编号,不更保安证编号信息
                        if (null == user.getSecuritynumber() || user.getSecuritynumber().equals("")) {
                            //去内网生成保安证编号,由内网生成,无需返回
                            //数据推送
                            Map<String, Object> map = new HashMap<>(1);
                            map.put("key",examScore);
                            myAsyncService.FTPSecurityNumberBit(map);
                        }
//                        if (null == user.getSecuritynumber() || user.getSecuritynumber().equals("")) {
//                            //去内网生成保安证编号,由内网生成,无需返回
//                            //数据推送
//                            Map<String, Object> map = new HashMap<>(1);
//                            map.put("key",examScore);
//                            myAsyncService.FTPSecurityNumberBit(map);
//                        }
                    } else {
                        //不合格
                        examScore.setQualified(1);
@@ -312,8 +307,8 @@
                            " " + "where id = " + "'" + examScore.getId() + "';"+
                        "update sys_training_registration set is_exam = " + "'" + trainingRegistration.getIsExam() + "'" +
                            " " + "where id = " + "'" + trainingRegistration.getId() + "';"+
                        "update blade_user set hold = " + "'" + user.getHold() + "'" +
                            ",securitynumber = " + "'" + user.getSecuritynumber() + "'" +
                        "update blade_user set hold = " + "'" + 2 + "'" +
                            ",securitynumber = " + "'" + "" + "'" +
                            ",user_type = " + "'" + user.getUserType() + "'" +
                            ",is_train = " + "'" + user.getIsTrain() + "'" +
                            " " + "where id = " + "'" + user.getId() + "'";
src/main/java/org/springblade/modules/sqlAsyc/Sql.java
New file
@@ -0,0 +1,10 @@
package org.springblade.modules.sqlAsyc;
import lombok.Data;
import java.io.Serializable;
@Data
public class Sql implements Serializable {
    private String sql;
}
src/main/java/org/springblade/modules/sqlAsyc/SqlAsyncController.java
New file
@@ -0,0 +1,26 @@
package org.springblade.modules.sqlAsyc;
import lombok.AllArgsConstructor;
import org.springblade.modules.system.service.MyAsyncService;
import org.springframework.web.bind.annotation.*;
/**
 * sql 同步内网
 * @author zhongrj
 * @since 2022-06-21
 */
@RestController
@RequestMapping("/sql")
@AllArgsConstructor
public class SqlAsyncController {
    private final MyAsyncService myAsyncService;
    /**
     * sql 同步
     */
    @PostMapping("/async")
    public void sqlAsyc(@RequestBody Sql sql){
        myAsyncService.FTP(sql.getSql());
    }
}