智慧保安后台管理-外网项目备份
Administrator
2022-01-17 e2ea82b9219c1fa616a6d877480f23e7a5aa3f29
1.考试修改
2.押运人员定位修改
7 files modified
82 ■■■■■ changed files
src/main/java/org/springblade/modules/equipage/controller/fixed.java 35 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/exam/entity/ScoreAuditRecords.java 5 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/exam/mapper/ExamScoreMapper.xml 28 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/exam/mapper/ScoreAuditRecordsMapper.xml 5 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/exam/vo/ExamScoreVO.java 3 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/exam/vo/ScoreAuditRecordsVO.java 5 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml 1 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/equipage/controller/fixed.java
@@ -1,27 +1,21 @@
package org.springblade.modules.equipage.controller;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.metadata.IPage;
import net.sf.json.JSONArray;
import net.sf.json.JSONException;
import net.sf.json.JSONObject;
import org.springblade.common.utils.HttpReqUtil;
import org.springblade.common.utils.Md5SignUtil;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.tool.api.R;
import org.springblade.modules.FTP.FtpUtil;
import org.springblade.modules.equipage.service.CarService;
import org.springblade.modules.location.entity.LiveLocation;
import org.springblade.modules.location.entity.Locus;
import org.springblade.modules.location.service.LiveLocationService;
import org.springblade.modules.location.service.LocusService;
import org.springblade.modules.system.entity.User;
import org.springblade.modules.system.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import springfox.documentation.spring.web.json.Json;
import java.io.IOException;
import java.text.DateFormat;
import java.text.ParseException;
@@ -51,22 +45,19 @@
        String url = "http://47.104.104.46/api/client/getgis.php";
        //查询有押运人员的数据
        List<Map<String, Object>> list = userService.selectEquipent();
        for (int i = 0; i < list.size(); i++) {
            //实时位置实体类
            LiveLocation liveLocation = new LiveLocation();
            liveLocation.setType(1);
            String id = list.get(i).get("id").toString();
            liveLocation.setWorkerId(id);
            Map<String, Object> params = new HashMap<>();
            String equipmentCode = list.get(i).get("code").toString();
            //设备imei号
            params.put("acc", equipmentCode);
            String res = null;
            res = HttpReqUtil.getInstance().doPost(url, params, null);
            System.out.println("res = " + res);
            Map<String,Object> map =(Map<String,Object>) com.alibaba.fastjson.JSON.parse("header");
            System.out.println("map = " + map.get("code"));
            if (!map.get("code").equals("3")) {
        if (list.size()>0) {
            for (int i = 0; i < list.size(); i++) {
                //实时位置实体类
                LiveLocation liveLocation = new LiveLocation();
                liveLocation.setType(1);
                String id = list.get(i).get("id").toString();
                liveLocation.setWorkerId(id);
                Map<String, Object> params = new HashMap<>();
                String equipmentCode = list.get(i).get("code").toString();
                //设备imei号
                params.put("acc", equipmentCode);
                String res = null;
                res = HttpReqUtil.getInstance().doPost(url, params, null);
                JSONArray jsonArray = JSONArray.fromObject(res);
                JSONArray sortedJsonArray = new JSONArray();
                List<JSONObject> jsonValues = new ArrayList<JSONObject>();
src/main/java/org/springblade/modules/exam/entity/ScoreAuditRecords.java
@@ -102,4 +102,9 @@
    @TableField("audit_user")
    private Long auditUser;
    /**
     * 纸质考试图片 url
     */
    private String url;
}
src/main/java/org/springblade/modules/exam/mapper/ExamScoreMapper.xml
@@ -69,7 +69,7 @@
        SELECT
            es.id,es.theory_grade theoryGrade,ifnull(learn_grade,-1) learnGrade,es.user_id userId,es.exam_id examId,
            es.exam_time examTime,all_grade allGrade,exam_end_time examEndTime,qualified,es.candidate_no candidateNo,
            ke.exam_name examName,
            ke.exam_name examName,date_format(ke.start_time,'%Y-%m-%d') startTime,date_format(ke.end_time,'%Y-%m-%d') endTime,
            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,bu.user_type isPaper
@@ -121,8 +121,8 @@
        <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 test="examScore.examId!=null">
            and es.exam_id = #{examScore.examId}
        </if>
        <if test="examScore.isPaper==6">
            and bu.user_type = #{examScore.isPaper}
@@ -145,8 +145,11 @@
        <if test="examScore.examDate!=null  and examScore.examDate!=''">
            and date_format(ke.start_time,'%Y-%m-%d') = #{examScore.examDate}
        </if>
        <if test="examScore.sortName!=null and examScore.sortName!=''">
        <if test="examScore.sortName!=null and examScore.sortName!='' and examScore.sortName!='companyName'">
            ORDER BY es.${examScore.sortName} ${examScore.sort},es.id desc
        </if>
        <if test="examScore.sortName=='companyName'">
            ORDER BY bd.dept_name ${examScore.sort},es.id desc
        </if>
        <if test="examScore.sortName==null or examScore.sortName==''">
            order by es.id desc
@@ -379,7 +382,7 @@
        where
        1=1
        and (str.is_exam = 2 or str.is_exam = 3 or str.is_exam = 4)
        <if test="examScore.examName!=null and  examScore.examName!=''">
        <if test="examScore.examName!=null and  examScore.examName!='' and examScore.examName!='undefined'">
            and ke.exam_name like concat('%', #{examScore.examName},'%')
        </if>
        <if test="examScore.companyName!=null and  examScore.companyName!=''">
@@ -403,6 +406,9 @@
        <if test="examScore.userId!=null and  examScore.userId!=''">
            and es.user_id = #{examScore.userId}
        </if>
        <if test="examScore.examId!=null and examScore.examId!='undefined'">
            and es.exam_id = #{examScore.examId}
        </if>
        <if test="examScore.deptId!=null and  examScore.deptId!=''">
            and bd.id = #{examScore.deptId}
        </if>
@@ -424,10 +430,18 @@
        <if test="examScore.qualified!=null">
            and es.qualified = #{examScore.qualified}
        </if>
        <if test="examScore.examDate!=null and examScore.examDate!=''">
        <if test="examScore.examDate!=null  and examScore.examDate!=''">
            and date_format(ke.start_time,'%Y-%m-%d') = #{examScore.examDate}
        </if>
        order by es.id desc
        <if test="examScore.sortName!=null and examScore.sortName!='' and examScore.sortName!='companyName'">
            ORDER BY es.${examScore.sortName} ${examScore.sort},es.id desc
        </if>
        <if test="examScore.sortName=='companyName'">
            ORDER BY bd.dept_name ${examScore.sort},es.id desc
        </if>
        <if test="examScore.sortName==null or examScore.sortName==''">
            order by es.id desc
        </if>
    </select>
    <!--导出-按条件查询成绩数据-模拟考试-->
src/main/java/org/springblade/modules/exam/mapper/ScoreAuditRecordsMapper.xml
@@ -11,7 +11,7 @@
            bu.sex,bu.cardid idCardNo,
            ifnull(DATE_FORMAT(NOW(), '%Y') - SUBSTRING( bu.cardid,7,4),0) age,
            bu1.real_name applyRealName,
            ke.exam_name examName,
            ke.exam_name examName,date_format(ke.start_time,'%Y-%m-%d') examTime,
            bt1.dept_name applyUnitName
        FROM
            sys_score_audit_records ssar
@@ -69,6 +69,9 @@
        <if test="scoreAuditRecords.examName!=null and  scoreAuditRecords.examName!=''">
            and ke.exam_name like concat('%', #{scoreAuditRecords.examName},'%')
        </if>
        <if test="scoreAuditRecords.examTime!=null and  scoreAuditRecords.examTime!=''">
            and date_format(ke.start_time,'%Y-%m-%d') = #{scoreAuditRecords.examTime}
        </if>
        <if test="scoreAuditRecords.trainUnitId!=null and  scoreAuditRecords.trainUnitId!=''">
            and bt1.id = #{scoreAuditRecords.trainUnitId}
        </if>
src/main/java/org/springblade/modules/exam/vo/ExamScoreVO.java
@@ -121,6 +121,9 @@
     */
    private String startTime;
//    private Date startTime;
    /**
     * 考试结束时间
     */
src/main/java/org/springblade/modules/exam/vo/ScoreAuditRecordsVO.java
@@ -81,4 +81,9 @@
     */
    private String ids;
    /**
     * 考试开始时间查询
     */
    private String examTime;
}
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
@@ -998,6 +998,7 @@
          AND is_deleted = 0
          AND `status` = 1
          AND equipment_code IS NOT NULL
          AND equipment_code!=""
    </select>
    <!--查詢用戶派遣記錄信息-->