diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/controller/HomeOverviewController.java b/src/main/java/com/zhgd/xmgl/modules/baotou/controller/HomeOverviewController.java index 09c67f215..6254553ad 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/controller/HomeOverviewController.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/controller/HomeOverviewController.java @@ -1,5 +1,6 @@ package com.zhgd.xmgl.modules.baotou.controller; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.zhgd.jeecg.common.api.vo.Result; import com.zhgd.xmgl.modules.baotou.entity.vo.CountEnterpriseVo; import com.zhgd.xmgl.modules.baotou.entity.vo.EnterpriseListVo; @@ -56,4 +57,19 @@ public class HomeOverviewController { return Result.success(deviceUnitService.getEnterpriseList(param)); } + + @ApiOperation(value = "施工队伍单位列表", notes = "施工队伍单位列表", httpMethod = "GET") + @ApiImplicitParams({ + @ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"), + @ApiImplicitParam(name = "type", value = "1监理2epc3施工", paramType = "body", required = true, dataType = "Integer"), + @ApiImplicitParam(name = "enterpriseName", value = "单位名称", paramType = "body", required = true, dataType = "Integer"), + @ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"), + @ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"), + }) + @GetMapping(value = "/getEnterprisePageList") + public Result> getEnterprisePageList(@ApiIgnore @RequestParam HashMap param) { + return Result.success(deviceUnitService.getEnterprisePageList(param)); + } + + } diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/DeviceUnitMapper.java b/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/DeviceUnitMapper.java index c583aa087..1153d2847 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/DeviceUnitMapper.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/DeviceUnitMapper.java @@ -40,22 +40,31 @@ public interface DeviceUnitMapper extends BaseMapper { /** * 获取监理单位和epc单位和人数 + * * @param param * @return */ - List getSuperviseList(HashMap param); + List getSuperviseList(@Param("param") HashMap param); /** * 获取epc单位和施工人数 + * * @param param * @return */ - List getEpcsList(HashMap param); + List getEpcsList(@Param("param") HashMap param); /** * 获取监理单位和人数 + * * @param param * @return */ - List getConstructionList(HashMap param); + List getConstructionList(@Param("param") HashMap param); + + Page getSuperviseList(Page page, @Param("param") HashMap param); + + Page getEpcsList(Page page, @Param("param") HashMap param); + + Page getConstructionList(Page page, @Param("param") HashMap param); } diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/xml/DeviceUnitMapper.xml b/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/xml/DeviceUnitMapper.xml index 316aceb7e..0394268fc 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/xml/DeviceUnitMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/xml/DeviceUnitMapper.xml @@ -74,54 +74,69 @@ - + select + ei.enterprise_name as construction + ,count(distinct wi.id) as num + from project_enterprise pe + join enterprise_info ei on ei.id=pe.enterprise_id + left join worker_info wi on ei.id = wi.enterprise_id and wi.inService_type = 1 + where pe.project_sn=#{param.projectSn} + and pe.enterprise_type_id=11 + + and ei.enterprise_name like concat('%', #{param.enterpriseName}, '%') + + + and ei.enterprise_name like concat('%', #{param.construction}, '%') + + group by ei.id diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/xml/WorkerAdmissionDetailMapper.xml b/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/xml/WorkerAdmissionDetailMapper.xml index 972e3e474..779fd3a66 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/xml/WorkerAdmissionDetailMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/mapper/xml/WorkerAdmissionDetailMapper.xml @@ -43,7 +43,7 @@ - left join exam_train_record tr on tr.application_id=wa.id and t.id_card=tr.worker_card and tr.application_type=1 + left join exam_train_record tr on tr.application_id=wa.id and t.id=tr.worker_id and tr.application_type=1 and tr.submit = 1 left join ( diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/controller/PlanRecordController.java b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/controller/PlanRecordController.java index b852a4f76..961b3a5e6 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/controller/PlanRecordController.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/controller/PlanRecordController.java @@ -1,18 +1,25 @@ package com.zhgd.xmgl.modules.baotou.plan.controller; +import java.util.Date; +import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.NumberUtil; import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.zhgd.annotation.OperLog; import com.zhgd.jeecg.common.api.vo.Result; +import com.zhgd.jeecg.common.execption.OpenAlertException; import com.zhgd.xmgl.modules.baotou.plan.entity.*; import com.zhgd.xmgl.modules.baotou.plan.mapper.PlanRecordMapper; import com.zhgd.xmgl.modules.baotou.plan.service.*; +import com.zhgd.xmgl.modules.exam.entity.ExamCourse; import com.zhgd.xmgl.modules.stuff.entity.StuffType; +import com.zhgd.xmgl.util.ListUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; @@ -25,8 +32,10 @@ import org.springframework.context.annotation.Lazy; import org.springframework.web.bind.annotation.*; import springfox.documentation.annotations.ApiIgnore; +import javax.sound.midi.VoiceStatus; import java.math.BigDecimal; import java.util.*; +import java.util.function.Function; import java.util.stream.Collectors; @@ -307,4 +316,113 @@ public class PlanRecordController { return Result.success(planRecordService.queryTreePage(param)); } + @ApiOperation(value = "更新所有ancestor", notes = "更新所有ancestor", httpMethod = "GET") + @GetMapping(value = "/updateAncestor") + public Result updateAncestor(@ApiIgnore @RequestParam HashMap param) { + List list = planRecordService.list(); + Map> pbsMap = list.stream().collect(Collectors.groupingBy(PlanRecord::getPbsId)); + for (Map.Entry> entry : pbsMap.entrySet()) { + List value = entry.getValue(); + value.stream().filter(o -> o.getParentId().equals(0L)).forEach(o -> { + o.setAncestors("0"); + planRecordService.updateById(o); + setAncestor(o, list); + }); + } + return Result.ok(); + } + + private void setAncestor(PlanRecord planRecord, List all) { + all.stream().filter(o -> o.getParentId().equals(planRecord.getId())).forEach(o -> { + o.setAncestors(planRecord.getAncestors() + "," + planRecord.getId()); + planRecordService.updateById(o); + setAncestor(o, all); + }); + } + + @OperLog(operModul = "进度计划编制管理", operType = "删除", operDesc = "批量删除进度计划编制信息") + @ApiOperation(value = "批量删除进度计划编制信息", notes = "批量删除进度计划编制信息", httpMethod = "POST") + @ApiImplicitParam(name = "ids", value = "进度计划编制IDs", paramType = "body", required = true, dataType = "String") + @PostMapping(value = "/deleteBatch") + public Result deleteBatch(@ApiIgnore @RequestBody HashMap map) { + Result result = new Result(); + String ids = MapUtils.getString(map, "ids"); + if (ids == null || "".equals(ids.trim())) { + result.error500("参数不识别!"); + } else { + this.planRecordService.removeByIds(Arrays.asList(ids.split(","))); + Result.success("删除成功!"); + } + return Result.ok(); + } + +// @GetMapping(value = "/t") +// public Result todo(@ApiIgnore @RequestParam HashMap param) { +// List records = planRecordService.list(new LambdaQueryWrapper() +// .eq(PlanRecord::getPbsId, 1891317705611223041L) +// ); +// Map idMap = records.stream().collect(Collectors.toMap(PlanRecord::getId, Function.identity(), (o1, o2) -> o1)); +// List workList = records.stream().filter(o -> o.getWorkType() == 1).collect(Collectors.toList()); +// List categories = planWorkCategoryService.list(new LambdaQueryWrapper() +// .eq(PlanWorkCategory::getProjectType, 1)); +// Map cNameMap = categories.stream().collect(Collectors.toMap(PlanWorkCategory::getCategoryName, Function.identity(), (o1, o2) -> o1)); +// for (PlanRecord planRecord : workList) { +// PlanRecord parent = idMap.get(planRecord.getParentId()); +// PlanWorkCategory category = cNameMap.get(parent.getJobName()); +// if (category != null) { +// PlanChooseCategory choose = new PlanChooseCategory(); +// choose.setProjectSn(planRecord.getProjectSn()); +// choose.setCategoryId(category.getId()); +// choose.setRecordId(planRecord.getId()); +// planChooseCategoryService.add(choose); +// } else { +// throw new OpenAlertException(); +// } +// } +// return Result.ok(); +// } +// +// @GetMapping(value = "/updateLine") +// public Result updateLine(@ApiIgnore @RequestParam HashMap param) { +// List records = planRecordService.list(new LambdaQueryWrapper() +// .eq(PlanRecord::getPbsId, 1891317705611223041L) +// ); +// Map idMap = records.stream().collect(Collectors.toMap(PlanRecord::getId, Function.identity(), (o1, o2) -> o1)); +// List workList = records.stream().filter(o -> o.getWorkType() == 1).collect(Collectors.toList()); +// Map> pMap = workList.stream().collect(Collectors.groupingBy(PlanRecord::getParentId)); +// for (Map.Entry> entry : pMap.entrySet()) { +// List list = entry.getValue(); +// list = list.stream().sorted((o1, o2) -> o1.getPlannedStart().compareTo(o2.getPlannedStart())).collect(Collectors.toList()); +// PlanRecord planRecord = list.get(0); +// planRecord.setMilestoneType(1); +// planRecordService.updateById(planRecord); +// PlanRecord last = list.get(list.size() - 1); +// last.setMilestoneType(2); +// planRecordService.updateById(last); +// +// } +// return Result.ok(); +// } +// +// @GetMapping(value = "/updateKey") +// public Result updateKey(@ApiIgnore @RequestParam HashMap param) { +// List records = planRecordService.list(new LambdaQueryWrapper() +// .eq(PlanRecord::getPbsId, 1891317705611223041L) +// ); +// Map idMap = records.stream().collect(Collectors.toMap(PlanRecord::getId, Function.identity(), (o1, o2) -> o1)); +// List workList = records.stream().filter(o -> o.getWorkType() == 1).collect(Collectors.toList()); +// Map> pMap = workList.stream().collect(Collectors.groupingBy(PlanRecord::getParentId)); +// for (Map.Entry> entry : pMap.entrySet()) { +// List list = entry.getValue(); +// list = list.stream().sorted((o1, o2) -> o1.getPlannedStart().compareTo(o2.getPlannedStart())).collect(Collectors.toList()); +// for (PlanRecord planRecord : list) { +// planRecord.setNodeStatus(1); +// planRecordService.updateById(planRecord); +// } +// +// } +// return Result.ok(); +// } + + } diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/entity/PlanRecord.java b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/entity/PlanRecord.java index 78fc3d6a3..e0fb2ffc5 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/entity/PlanRecord.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/entity/PlanRecord.java @@ -158,16 +158,19 @@ public class PlanRecord implements Serializable { private java.lang.Integer nodeStatus; @ApiModelProperty(value = "1开始里程碑2完成里程碑") private java.lang.Integer milestoneType; - /**预警级别:1一般2严重3重大**/ - @ApiModelProperty(value="预警级别:1一般2严重3重大") - private java.lang.Integer warnLevel ; - @ApiModelProperty(value="是否重要里程碑1是0否") - private java.lang.Integer isImportantMilestone ; - @ApiModelProperty(value="勾选实际开始1勾选0不勾选") - private java.lang.Integer isActualStart ; - @ApiModelProperty(value="勾选实际完成1勾选0不勾选") - private java.lang.Integer isActualFinish ; - + /** + * 预警级别:1一般2严重3重大 + **/ + @ApiModelProperty(value = "预警级别:1一般2严重3重大") + private java.lang.Integer warnLevel; + @ApiModelProperty(value = "是否重要里程碑1是0否") + private java.lang.Integer isImportantMilestone; + @ApiModelProperty(value = "勾选实际开始1勾选0不勾选") + private java.lang.Integer isActualStart; + @ApiModelProperty(value = "勾选实际完成1勾选0不勾选") + private java.lang.Integer isActualFinish; + @ApiModelProperty(value = "排序") + private java.lang.Integer sort; @TableField(exist = false) private List children; @TableField(exist = false) diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/service/impl/PlanRecordServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/service/impl/PlanRecordServiceImpl.java index ad0281d70..4065b2445 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/plan/service/impl/PlanRecordServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/plan/service/impl/PlanRecordServiceImpl.java @@ -90,7 +90,7 @@ public class PlanRecordServiceImpl extends ServiceImpl split = StrUtil.split(recordIds, ","); queryWrapper.in(RefUtil.fieldNameUlc(PlanRecord::getId), split); } - queryWrapper.orderByDesc(RefUtil.fieldNameUlc(PlanRecord::getId)); + queryWrapper.orderByAsc(RefUtil.fieldNameUlc(PlanRecord::getPlannedStart)); return queryWrapper; } diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/service/IDeviceUnitService.java b/src/main/java/com/zhgd/xmgl/modules/baotou/service/IDeviceUnitService.java index 98c92e45b..685064cfc 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/service/IDeviceUnitService.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/service/IDeviceUnitService.java @@ -1,5 +1,6 @@ package com.zhgd.xmgl.modules.baotou.service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.zhgd.xmgl.modules.baotou.entity.DeviceUnit; import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -58,4 +59,6 @@ public interface IDeviceUnitService extends IService { List getEpcList(HashMap param); List getEnterpriseList(HashMap param); + + Page getEnterprisePageList(HashMap param); } diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/ConstructionDeclarationDataServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/ConstructionDeclarationDataServiceImpl.java index d17ba869b..31e475948 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/ConstructionDeclarationDataServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/ConstructionDeclarationDataServiceImpl.java @@ -47,7 +47,7 @@ public class ConstructionDeclarationDataServiceImpl extends ServiceImpl getQueryWrapper(HashMap param) { QueryWrapper queryWrapper = QueryGenerator.initPageQueryWrapper(ConstructionDeclarationData.class, param, true); - queryWrapper.orderByDesc(RefUtil.fieldNameUlc(ConstructionDeclarationData::getId)); + queryWrapper.orderByAsc(RefUtil.fieldNameUlc(ConstructionDeclarationData::getCreateDate)); return queryWrapper; } diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/ContractorMonthlyApproveServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/ContractorMonthlyApproveServiceImpl.java index 28389aa2a..698d127ef 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/ContractorMonthlyApproveServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/ContractorMonthlyApproveServiceImpl.java @@ -132,6 +132,7 @@ public class ContractorMonthlyApproveServiceImpl extends ServiceImpl getEnterprisePageList(HashMap param) { + Integer type = MapUtils.getInteger(param, "type"); + Page page = PageUtil.getPage(param); + if (Objects.equals(type, 1)) { + return baseMapper.getSuperviseList(page, param); + } else if (Objects.equals(type, 2)) { + return baseMapper.getEpcsList(page, param); + } else if (Objects.equals(type, 3)) { + return baseMapper.getConstructionList(page, param); + } + return null; + } } diff --git a/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/WorkerAdmissionDetailServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/WorkerAdmissionDetailServiceImpl.java index 314671e55..29a03a68a 100644 --- a/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/WorkerAdmissionDetailServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/baotou/service/impl/WorkerAdmissionDetailServiceImpl.java @@ -498,6 +498,7 @@ public class WorkerAdmissionDetailServiceImpl extends ServiceImpl impl @Override public Result uploadExcelCar(MultipartFile excelFile, String projectSn) { Result result = new Result(); - StringBuilder existName = new StringBuilder(""); + StringBuilder existCarNumName = new StringBuilder(""); + String existCarNumMsg = ""; ArrayList errIdCards = new ArrayList<>(); String rtMsg = ""; - String existMsg = ""; + StringBuilder existWorkerName = new StringBuilder(""); + String existWorkerNameMsg = ""; try { InputStream is = excelFile.getInputStream(); List> list = ExcelUtils.jxlExlToList(is, 0); @@ -266,10 +268,18 @@ public class CarInfoServiceImpl extends ServiceImpl impl excelCar.setCarColor(importInfo.get("车辆颜色")); excelCar.setAddTime(new Date()); excelCar.setProjectSn(projectSn); + String readWorkerName = importInfo.get("司机姓名"); if (!"临时车辆".equals(carModuleType)) { - excelCar.setDriverWorkerId(Optional.ofNullable(workerMap.get(importInfo.get("司机姓名"))).map(o -> String.valueOf(o.getId())).orElse(null)); + WorkerInfo workerInfo = workerMap.get(readWorkerName); + if (workerInfo == null) { + existWorkerName.append(readWorkerName); + existWorkerName.append("、"); + log.info("在人员管理中不存在:{}", readWorkerName); + continue; + } + excelCar.setDriverWorkerId(String.valueOf(workerInfo.getId())); } - excelCar.setDriverWorkerName(importInfo.get("司机姓名")); + excelCar.setDriverWorkerName(readWorkerName); excelCar.setDriverTelephone(importInfo.get("司机电话")); excelCar.setIsBlack(Objects.equals(importInfo.get("是否黑名单"), "是") ? 1 : 0); excelCar.setCarType(Optional.ofNullable(carTypeMap.get(importInfo.get("车种类型"))).map(CarType::getId).orElse(null)); @@ -283,8 +293,8 @@ public class CarInfoServiceImpl extends ServiceImpl impl } else { //存在车辆 if (dataCar.toExistString().equals(excelCar.toExistString())) { - existName.append(excelCar.getCarNumber()); - existName.append("、"); + existCarNumName.append(excelCar.getCarNumber()); + existCarNumName.append("、"); log.info("忽略批量导入已存在完全一样车辆:{}", excelCar.getCarNumber()); continue; } @@ -292,17 +302,16 @@ public class CarInfoServiceImpl extends ServiceImpl impl this.editCarInfo(excelCar); } } - if (!"".equals(existName.toString())) { - existName.deleteCharAt(existName.lastIndexOf("、")); - existMsg = "车牌号为:" + existName + "的车辆已存在对应信息(车牌号等信息一致)"; + + if (!"".equals(existCarNumName.toString())) { + existCarNumName.deleteCharAt(existCarNumName.lastIndexOf("、")); + existCarNumMsg = "车牌号为:" + existCarNumName + "的车辆已存在对应信息(车牌号等信息一致)。"; } - String errIdCardMsg = ""; - if (CollUtil.isNotEmpty(errIdCards)) { - if (StrUtil.isNotBlank(existMsg)) { - errIdCardMsg += ","; - } + if (!"".equals(existWorkerName.toString())) { + existWorkerName.deleteCharAt(existWorkerName.lastIndexOf("、")); + existWorkerNameMsg = "司机姓名:" + existWorkerName + "在人员管理中不存在。"; } - rtMsg = StrUtil.format("导入成功。{}{}", existMsg, errIdCardMsg); + rtMsg = StrUtil.format("导入成功。{}{}", existCarNumMsg, existWorkerNameMsg); result.successMsg(rtMsg); } catch (OpenAlertException e) { log.error("error:", e); diff --git a/src/main/java/com/zhgd/xmgl/modules/exam/controller/ExamWorkerController.java b/src/main/java/com/zhgd/xmgl/modules/exam/controller/ExamWorkerController.java index 9b9f0613b..c3274c245 100644 --- a/src/main/java/com/zhgd/xmgl/modules/exam/controller/ExamWorkerController.java +++ b/src/main/java/com/zhgd/xmgl/modules/exam/controller/ExamWorkerController.java @@ -209,7 +209,8 @@ public class ExamWorkerController { String[] typeArr = {"一", "二", "三"}; int typeIndex = -1; //封装数据 - Map params = new HashMap(); + Map params = new HashMap<>(); + int index = 0; for (Map.Entry> entry : typeMap.entrySet()) { Integer key = entry.getKey(); int[] i = {1}; @@ -219,21 +220,31 @@ public class ExamWorkerController { BigDecimal score = one.getScore(); StringBuilder content = new StringBuilder(); BigDecimal total = NumberUtil.mul(list.size(), score); + String title; if (key == 1) { - params.put("t1", typeArr[++typeIndex] + "、单选题:(每题" + score + "分,共计" + total + "分)"); + title = typeArr[++typeIndex] + "、单选题:(每题" + score + "分,共计" + total + "分)"; + } else if (key == 2) { + title = typeArr[++typeIndex] + "、多选题:(每题" + one.getScore() + "分,共计" + total + "分、漏选少选得" + NumberUtil.div(one.getScore(), 2, 2) + "分,错选不得分。)"; + } else { + title = typeArr[++typeIndex] + "、判断题(每题" + one.getScore() + "分,共" + total + "分,正确:打√,错误:打×)"; + } + if (index == 0) { + params.put("t1", title); + //遍历题目 addOption(list, content, i, imageMap, params); params.put("c1", content.toString()); - } else if (key == 2) { - params.put("t2", typeArr[++typeIndex] + "、多选题:(每题" + one.getScore() + "分,共计" + total + "分、漏选少选得" + NumberUtil.div(one.getScore(), 2, 2) + "分,错选不得分。)"); + } else if (index == 1) { + params.put("t2", title); //遍历题目 addOption(list, content, i, imageMap, params); params.put("c2", content.toString()); } else { - params.put("t3", typeArr[++typeIndex] + "、判断题(每题" + one.getScore() + "分,共" + total + "分,正确:打√,错误:打×)"); + params.put("t3", title); //遍历题目 addOption(list, content, i, imageMap, params); params.put("c3", content.toString()); } + index++; } } String recordId = MapUtils.getString(param, "recordId"); diff --git a/src/main/java/com/zhgd/xmgl/modules/exam/mapper/xml/ExamTrainRecordMapper.xml b/src/main/java/com/zhgd/xmgl/modules/exam/mapper/xml/ExamTrainRecordMapper.xml index b070bb9a4..0ff14dc38 100644 --- a/src/main/java/com/zhgd/xmgl/modules/exam/mapper/xml/ExamTrainRecordMapper.xml +++ b/src/main/java/com/zhgd/xmgl/modules/exam/mapper/xml/ExamTrainRecordMapper.xml @@ -295,7 +295,7 @@ from exam_train_record ec join exam_paper p on ec.exam_paper_id = p.id join exam_subject es on p.subject_id = es.id - join worker_admission_detail wi on wi.id_card = ec.worker_card + join worker_admission_detail wi on wi.id = ec.worker_id left join enterprise_info ei on ei.id=wi.enterprise_id left join enterprise_info ei1 on ei1.id=wi.epc_cbs left join (select worker_admission_detail_id,certificate_number from worker_admission_certificate_detail group