1. 保安证打印修改
2. 保安证查询修改
3. 考试成绩查询修改
| | |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | * 新增(补证) |
| | | * @param accreditationRecords 制证记录信息对象 |
| | | */ |
| | | @PostMapping("/save") |
| | | @ApiOperation(value = "新增", notes = "传入accreditationRecords") |
| | | public R save(@RequestBody AccreditationRecords accreditationRecords){ |
| | | return R.data(accreditationRecordsService.save(accreditationRecords)); |
| | | accreditationRecords.setCreateTime(new Date()); |
| | | accreditationRecords.setStatus(1); |
| | | accreditationRecords.setAuditStatus(1); |
| | | boolean save = accreditationRecordsService.save(accreditationRecords); |
| | | |
| | | //修改用户信息 |
| | | User user = new User(); |
| | | user.setId(accreditationRecords.getUserId()); |
| | | user.setUpdateTime(new Date()); |
| | | //修改为未制证状态 |
| | | user.setUserType(7); |
| | | userService.updateById(user); |
| | | //内网同步 |
| | | //内网新增 |
| | | String s = "insert into sys_accreditation_records(id,user_id,create_time,create_user,status,type,audit_status) " + |
| | | "values(" + "'" + accreditationRecords.getId() + "'" + "," |
| | | + "'" + accreditationRecords.getUserId() + "'" + "," |
| | | + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(accreditationRecords.getCreateTime()) + "'" + "," |
| | | + "'" + accreditationRecords.getCreateUser() +"'" + "," |
| | | + "'" + accreditationRecords.getStatus() +"'" + "," |
| | | + "'" + accreditationRecords.getType() +"'" + "," |
| | | +"'" + accreditationRecords.getAuditStatus() + "'" + ");" + |
| | | "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); |
| | | return R.data(save); |
| | | } |
| | | |
| | | |
| | |
| | | <if test="accreditationRecords.jurisdiction!=null and accreditationRecords.jurisdiction!='' and accreditationRecords.jurisdiction!='1372091709474910209'"> |
| | | and (sj.id = #{accreditationRecords.jurisdiction} or sj.parent_id = #{accreditationRecords.jurisdiction}) |
| | | </if> |
| | | <if test="accreditationRecords.status!=null"> |
| | | <if test="accreditationRecords.status==1"> |
| | | and sar.status = #{accreditationRecords.status} |
| | | </if> |
| | | <if test="accreditationRecords.status==2"> |
| | | and sar.status = #{accreditationRecords.status} |
| | | </if> |
| | | <if test="accreditationRecords.createUser!=null"> |
| | |
| | | <if test="accreditationRecords.idCardNo!=null and accreditationRecords.idCardNo!=''"> |
| | | and bu.cardid like concat('%', #{accreditationRecords.idCardNo},'%') |
| | | </if> |
| | | <if test="accreditationRecords.status==1"> |
| | | and sar.status = #{accreditationRecords.status} |
| | | </if> |
| | | <if test="accreditationRecords.status==2"> |
| | | and sar.status = #{accreditationRecords.status} |
| | | </if> |
| | | <if test="accreditationRecords.securityNumber!=null and accreditationRecords.securityNumber!=''"> |
| | | and bu.securitynumber like concat('%', #{accreditationRecords.securityNumber},'%') |
| | | </if> |
| | |
| | | </if> |
| | | <if test="accreditationRecords.securityNumber!=null and accreditationRecords.securityNumber!=''"> |
| | | and bu.securitynumber like concat('%', #{accreditationRecords.securityNumber},'%') |
| | | </if> |
| | | <if test="accreditationRecords.status==1"> |
| | | and sar.status = #{accreditationRecords.status} |
| | | </if> |
| | | <if test="accreditationRecords.status==2"> |
| | | and sar.status = #{accreditationRecords.status} |
| | | </if> |
| | | <if test="accreditationRecords.jurisdiction!=null and accreditationRecords.jurisdiction!='' and accreditationRecords.jurisdiction!='1372091709474910209'"> |
| | | and (sj.id = #{accreditationRecords.jurisdiction} or sj.parent_id = #{accreditationRecords.jurisdiction}) |
| | |
| | | <if test="accreditationRecords.status!=null"> |
| | | and sar.status = #{accreditationRecords.status} |
| | | </if> |
| | | <if test="accreditationRecords.status==1"> |
| | | and sar.status = #{accreditationRecords.status} |
| | | </if> |
| | | <if test="accreditationRecords.status==2"> |
| | | and sar.status = #{accreditationRecords.status} |
| | | </if> |
| | | <if test="accreditationRecords.createUser!=null"> |
| | | and sar.create_user = #{accreditationRecords.createUser} |
| | | </if> |
| | |
| | | </select> |
| | | |
| | | |
| | | <!--考试成绩分页信息-模拟考试--> |
| | | <!--考试成绩分页信息-培训考试--> |
| | | <select id="selectTrainExamScorePage" resultType="org.springblade.modules.exam.vo.ExamScoreVO"> |
| | | SELECT |
| | | es.id,es.theory_grade theoryGrade,ifnull(learn_grade,-1) learnGrade,es.user_id userId,es.exam_id examId, |
| | |
| | | ke.exam_name examName, |
| | | str.is_exam isExam, |
| | | bu.real_name securityName,company,bu.account,bu.sex,bu.paper_time paperTime,bu.securitynumber securityNumber,bu.avatar, |
| | | bd.dept_name companyName from |
| | | bd.dept_name companyName,bu.user_type isPaper |
| | | from |
| | | exam_score es |
| | | left join |
| | | ksxt_exam ke |
| | |
| | | </if> |
| | | <if test="examScore.examType!=null and examScore.examType!=''"> |
| | | and ke.exam_type = #{examScore.examType} |
| | | </if> |
| | | <if test="examScore.examType!=null and examScore.examType!=''"> |
| | | and ke.exam_type = #{examScore.examType} |
| | | </if> |
| | | <if test="examScore.isPaper==6"> |
| | | and bu.user_type = #{examScore.isPaper} |
| | | </if> |
| | | <if test="examScore.isPaper==7"> |
| | | and (bu.user_type = #{examScore.isPaper} or bu.user_type is null) |
| | | </if> |
| | | <if test="examScore.isAvatar==1"> |
| | | and bu.avatar is not null and bu.avatar!="" |
| | |
| | | <if test="examScore.securityName!=null and examScore.securityName!=''"> |
| | | and bu.real_name like concat('%', #{examScore.securityName},'%') |
| | | </if> |
| | | <if test="examScore.isPaper==6"> |
| | | and bu.user_type = #{examScore.isPaper} |
| | | </if> |
| | | <if test="examScore.isPaper==7"> |
| | | and (bu.user_type = #{examScore.isPaper} or bu.user_type is null) |
| | | </if> |
| | | <if test="examScore.account!=null and examScore.account!=''"> |
| | | and bu.account like concat('%', #{examScore.account},'%') |
| | | </if> |
| | |
| | | */ |
| | | private Integer isAvatar; |
| | | |
| | | /** |
| | | * 是否制证 6:是 7:否 |
| | | */ |
| | | private Integer isPaper; |
| | | |
| | | } |
| | |
| | | import org.springblade.core.tool.support.Kv; |
| | | import org.springblade.core.tool.utils.*; |
| | | import org.springblade.modules.FTP.FtpUtil; |
| | | import org.springblade.modules.accreditation.entity.AccreditationRecords; |
| | | import org.springblade.modules.accreditation.service.AccreditationRecordsService; |
| | | import org.springblade.modules.dispatcher.entity.Dispatcher; |
| | | import org.springblade.modules.dispatcher.service.IDispatcherService; |
| | | import org.springblade.modules.exam.excel.ExportExamScoreExcel; |
| | |
| | | import java.security.NoSuchAlgorithmException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static org.springblade.common.config.FtpConfig.*; |
| | | import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE; |
| | |
| | | |
| | | |
| | | private final TrainingRegistrationService trainingRegistrationService; |
| | | |
| | | private final AccreditationRecordsService accreditationRecordsService; |
| | | |
| | | /** |
| | | * 查询单条 |
| | |
| | | } else { |
| | | paperTime = new SimpleDateFormat("yyyy-MM-dd").format(user.getPaperTime()); |
| | | } |
| | | //更新制证记录制证状态 |
| | | AccreditationRecords accreditationRecords = new AccreditationRecords(); |
| | | accreditationRecords.setUserId(user.getId()); |
| | | //审核通过的 |
| | | accreditationRecords.setAuditStatus(2); |
| | | //未制证的记录 |
| | | accreditationRecords.setStatus(1); |
| | | //查询 |
| | | List<AccreditationRecords> list = accreditationRecordsService.list(Condition.getQueryWrapper(accreditationRecords)); |
| | | if (list.size()>0) { |
| | | //排序 |
| | | List<AccreditationRecords> collect = list.stream().sorted(Comparator.comparing(AccreditationRecords::getId).reversed()).collect(Collectors.toList()); |
| | | //取出第一个 |
| | | AccreditationRecords accreditationRecords1 = collect.get(0); |
| | | //修改为已制证状态 |
| | | accreditationRecords1.setStatus(2); |
| | | //更新 |
| | | accreditationRecordsService.updateById(accreditationRecords1); |
| | | //同步 |
| | | String s1 = |
| | | "update blade_user set paper_time = " + "'" + paperTime + "'" |
| | | + ",user_type = " + "'" + user.getUserType() + "'" |
| | | + ",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getUpdateTime()) + "'" |
| | | + " " + "where id = " + "'" + user.getId() + "';" + |
| | | "update sys_accreditation_records set status = " + "'" + accreditationRecords1.getStatus() + "'" + |
| | | " " + "where id = " + "'" + accreditationRecords1.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //返回 |
| | | return R.success("修改成功"); |
| | | } |
| | | |
| | | String s1 = |
| | | "update blade_user set paper_time = " + "'" + paperTime + "'" |
| | | + ",user_type = " + "'" + user.getUserType() + "'" |
| | |
| | | </encoder> |
| | | </appender> |
| | | |
| | | |
| | | <!-- 生成日志文件 --> |
| | | <appender name="INFO" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| | |
| | | <appender name="ERROR" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| | | <!-- 日志文件输出的文件名 --> |
| | | <FileNamePattern>target/blade/log/error-%d{yyyy-MM-dd}.log</FileNamePattern> |
| | | <FileNamePattern>D:/log/error-%d{yyyy-MM-dd}.log</FileNamePattern> |
| | | </rollingPolicy> |
| | | <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> |
| | | <pattern>%n%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] [%X{traceId}] [%logger{50}] %n%-5level: %msg%n</pattern> |