包头bug修复
This commit is contained in:
parent
14286a7c53
commit
e847804f7b
@ -1,5 +1,6 @@
|
|||||||
package com.zhgd.xmgl.modules.baotou.controller;
|
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.jeecg.common.api.vo.Result;
|
||||||
import com.zhgd.xmgl.modules.baotou.entity.vo.CountEnterpriseVo;
|
import com.zhgd.xmgl.modules.baotou.entity.vo.CountEnterpriseVo;
|
||||||
import com.zhgd.xmgl.modules.baotou.entity.vo.EnterpriseListVo;
|
import com.zhgd.xmgl.modules.baotou.entity.vo.EnterpriseListVo;
|
||||||
@ -56,4 +57,19 @@ public class HomeOverviewController {
|
|||||||
return Result.success(deviceUnitService.getEnterpriseList(param));
|
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<Page<EnterpriseListVo>> getEnterprisePageList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||||
|
return Result.success(deviceUnitService.getEnterprisePageList(param));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -40,22 +40,31 @@ public interface DeviceUnitMapper extends BaseMapper<DeviceUnit> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取监理单位和epc单位和人数
|
* 获取监理单位和epc单位和人数
|
||||||
|
*
|
||||||
* @param param
|
* @param param
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<EnterpriseListVo> getSuperviseList(HashMap<String, Object> param);
|
List<EnterpriseListVo> getSuperviseList(@Param("param") HashMap<String, Object> param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取epc单位和施工人数
|
* 获取epc单位和施工人数
|
||||||
|
*
|
||||||
* @param param
|
* @param param
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<EnterpriseListVo> getEpcsList(HashMap<String, Object> param);
|
List<EnterpriseListVo> getEpcsList(@Param("param") HashMap<String, Object> param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取监理单位和人数
|
* 获取监理单位和人数
|
||||||
|
*
|
||||||
* @param param
|
* @param param
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<EnterpriseListVo> getConstructionList(HashMap<String, Object> param);
|
List<EnterpriseListVo> getConstructionList(@Param("param") HashMap<String, Object> param);
|
||||||
|
|
||||||
|
Page<EnterpriseListVo> getSuperviseList(Page page, @Param("param") HashMap<String, Object> param);
|
||||||
|
|
||||||
|
Page<EnterpriseListVo> getEpcsList(Page page, @Param("param") HashMap<String, Object> param);
|
||||||
|
|
||||||
|
Page<EnterpriseListVo> getConstructionList(Page page, @Param("param") HashMap<String, Object> param);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -74,54 +74,69 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getSuperviseList" resultType="com.zhgd.xmgl.modules.baotou.entity.vo.EnterpriseListVo">
|
<select id="getSuperviseList" resultType="com.zhgd.xmgl.modules.baotou.entity.vo.EnterpriseListVo">
|
||||||
select
|
select
|
||||||
ei.enterprise_name as supervise
|
ei.enterprise_name as supervise
|
||||||
,group_concat(distinct ei1.enterprise_name) as epc
|
,group_concat(distinct ei1.enterprise_name) as epc
|
||||||
,count(distinct wi.id) as num
|
,count(distinct wi.id) as num
|
||||||
from project_enterprise pe
|
from project_enterprise pe
|
||||||
join enterprise_info ei on ei.id=pe.enterprise_id
|
join enterprise_info ei on ei.id=pe.enterprise_id
|
||||||
left join project_group_unit pgu on pgu.supervising_unit_id = ei.id
|
left join project_group_unit pgu on pgu.supervising_unit_id = ei.id
|
||||||
left join device_unit du on find_in_set(pgu.project_group_id,du.project_group_ids)
|
left join device_unit du on find_in_set(pgu.project_group_id,du.project_group_ids)
|
||||||
left join enterprise_info ei1 on find_in_set(ei1.id,du.epc_contractor_ids)
|
left join enterprise_info ei1 on find_in_set(ei1.id,du.epc_contractor_ids)
|
||||||
left join worker_info wi on ei.id = wi.enterprise_id and wi.inService_type = 1
|
left join worker_info wi on ei.id = wi.enterprise_id and wi.inService_type = 1
|
||||||
where pe.project_sn=#{projectSn}
|
where pe.project_sn=#{param.projectSn}
|
||||||
and pe.enterprise_type_id=7
|
and pe.enterprise_type_id=7
|
||||||
<if test="enterpriseName != null and enterpriseName != ''">
|
<if test="param.enterpriseName != null and param.enterpriseName != ''">
|
||||||
and ei.enterprise_name like concat('%', #{enterpriseName}, '%')
|
and ei.enterprise_name like concat('%', #{param.enterpriseName}, '%')
|
||||||
</if>
|
</if>
|
||||||
group by ei.id
|
<if test="param.supervise != null and param.supervise != ''">
|
||||||
|
and ei.enterprise_name like concat('%', #{param.supervise}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.epc != null and param.epc != ''">
|
||||||
|
and ei1.enterprise_name like concat('%', #{param.epc}, '%')
|
||||||
|
</if>
|
||||||
|
group by ei.id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getEpcsList" resultType="com.zhgd.xmgl.modules.baotou.entity.vo.EnterpriseListVo">
|
<select id="getEpcsList" resultType="com.zhgd.xmgl.modules.baotou.entity.vo.EnterpriseListVo">
|
||||||
select
|
select
|
||||||
ei.enterprise_name as epc
|
ei.enterprise_name as epc
|
||||||
,group_concat(distinct ei1.enterprise_name) as construction
|
,group_concat(distinct ei1.enterprise_name) as construction
|
||||||
,count(distinct wi.id) as num
|
,count(distinct wi.id) as num
|
||||||
from project_enterprise pe
|
from project_enterprise pe
|
||||||
join enterprise_info ei on ei.id=pe.enterprise_id
|
join enterprise_info ei on ei.id=pe.enterprise_id
|
||||||
left join device_unit du on find_in_set(ei.id,du.epc_contractor_ids)
|
left join device_unit du on find_in_set(ei.id,du.epc_contractor_ids)
|
||||||
left join enterprise_info ei1 on find_in_set(ei1.id,du.epc_contractor_ids)
|
left join enterprise_info ei1 on find_in_set(ei1.id,du.epc_contractor_ids)
|
||||||
left join worker_info wi on ei.id = wi.enterprise_id and wi.inService_type = 1
|
left join worker_info wi on ei.id = wi.enterprise_id and wi.inService_type = 1
|
||||||
where pe.project_sn=#{projectSn}
|
where pe.project_sn=#{param.projectSn}
|
||||||
and pe.enterprise_type_id=3
|
and pe.enterprise_type_id=3
|
||||||
<if test="enterpriseName != null and enterpriseName != ''">
|
<if test="param.enterpriseName != null and param.enterpriseName != ''">
|
||||||
and ei.enterprise_name like concat('%', #{enterpriseName}, '%')
|
and ei.enterprise_name like concat('%', #{param.enterpriseName}, '%')
|
||||||
</if>
|
</if>
|
||||||
group by ei.id
|
<if test="param.epc != null and param.epc != ''">
|
||||||
|
and ei.enterprise_name like concat('%', #{param.epc}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="param.construction != null and param.construction != ''">
|
||||||
|
and ei1.enterprise_name like concat('%', #{param.construction}, '%')
|
||||||
|
</if>
|
||||||
|
group by ei.id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getConstructionList" resultType="com.zhgd.xmgl.modules.baotou.entity.vo.EnterpriseListVo">
|
<select id="getConstructionList" resultType="com.zhgd.xmgl.modules.baotou.entity.vo.EnterpriseListVo">
|
||||||
select
|
select
|
||||||
ei.enterprise_name as construction
|
ei.enterprise_name as construction
|
||||||
,count(distinct wi.id) as num
|
,count(distinct wi.id) as num
|
||||||
from project_enterprise pe
|
from project_enterprise pe
|
||||||
join enterprise_info ei on ei.id=pe.enterprise_id
|
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
|
left join worker_info wi on ei.id = wi.enterprise_id and wi.inService_type = 1
|
||||||
where pe.project_sn=#{projectSn}
|
where pe.project_sn=#{param.projectSn}
|
||||||
and pe.enterprise_type_id=11
|
and pe.enterprise_type_id=11
|
||||||
<if test="enterpriseName != null and enterpriseName != ''">
|
<if test="param.enterpriseName != null and param.enterpriseName != ''">
|
||||||
and ei.enterprise_name like concat('%', #{enterpriseName}, '%')
|
and ei.enterprise_name like concat('%', #{param.enterpriseName}, '%')
|
||||||
</if>
|
</if>
|
||||||
group by ei.id
|
<if test="param.construction != null and param.construction != ''">
|
||||||
|
and ei.enterprise_name like concat('%', #{param.construction}, '%')
|
||||||
|
</if>
|
||||||
|
group by ei.id
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -43,7 +43,7 @@
|
|||||||
<!-- and etr.is_re_education = 0-->
|
<!-- and etr.is_re_education = 0-->
|
||||||
<!-- and es.type=1-->
|
<!-- and es.type=1-->
|
||||||
<!-- group by etr.worker_card)t on t.worker_card=etr.worker_card and t.start_exam_time=etr.start_exam_time) tr on tr.worker_card = t.id_card-->
|
<!-- group by etr.worker_card)t on t.worker_card=etr.worker_card and t.start_exam_time=etr.start_exam_time) tr on tr.worker_card = t.id_card-->
|
||||||
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
|
and tr.submit = 1
|
||||||
left join (
|
left join (
|
||||||
<include refid="com.zhgd.xmgl.modules.baotou.mapper.WorkerAdmissionDetailMapper.dicMap">
|
<include refid="com.zhgd.xmgl.modules.baotou.mapper.WorkerAdmissionDetailMapper.dicMap">
|
||||||
|
|||||||
@ -1,18 +1,25 @@
|
|||||||
package com.zhgd.xmgl.modules.baotou.plan.controller;
|
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.collection.CollUtil;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.NumberUtil;
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
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.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.zhgd.annotation.OperLog;
|
import com.zhgd.annotation.OperLog;
|
||||||
import com.zhgd.jeecg.common.api.vo.Result;
|
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.entity.*;
|
||||||
import com.zhgd.xmgl.modules.baotou.plan.mapper.PlanRecordMapper;
|
import com.zhgd.xmgl.modules.baotou.plan.mapper.PlanRecordMapper;
|
||||||
import com.zhgd.xmgl.modules.baotou.plan.service.*;
|
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.modules.stuff.entity.StuffType;
|
||||||
|
import com.zhgd.xmgl.util.ListUtils;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
@ -25,8 +32,10 @@ import org.springframework.context.annotation.Lazy;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import springfox.documentation.annotations.ApiIgnore;
|
import springfox.documentation.annotations.ApiIgnore;
|
||||||
|
|
||||||
|
import javax.sound.midi.VoiceStatus;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
@ -307,4 +316,113 @@ public class PlanRecordController {
|
|||||||
return Result.success(planRecordService.queryTreePage(param));
|
return Result.success(planRecordService.queryTreePage(param));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "更新所有ancestor", notes = "更新所有ancestor", httpMethod = "GET")
|
||||||
|
@GetMapping(value = "/updateAncestor")
|
||||||
|
public Result updateAncestor(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||||
|
List<PlanRecord> list = planRecordService.list();
|
||||||
|
Map<Long, List<PlanRecord>> pbsMap = list.stream().collect(Collectors.groupingBy(PlanRecord::getPbsId));
|
||||||
|
for (Map.Entry<Long, List<PlanRecord>> entry : pbsMap.entrySet()) {
|
||||||
|
List<PlanRecord> 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<PlanRecord> 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<String, Object> 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<String, Object> param) {
|
||||||
|
// List<PlanRecord> records = planRecordService.list(new LambdaQueryWrapper<PlanRecord>()
|
||||||
|
// .eq(PlanRecord::getPbsId, 1891317705611223041L)
|
||||||
|
// );
|
||||||
|
// Map<Long, PlanRecord> idMap = records.stream().collect(Collectors.toMap(PlanRecord::getId, Function.identity(), (o1, o2) -> o1));
|
||||||
|
// List<PlanRecord> workList = records.stream().filter(o -> o.getWorkType() == 1).collect(Collectors.toList());
|
||||||
|
// List<PlanWorkCategory> categories = planWorkCategoryService.list(new LambdaQueryWrapper<PlanWorkCategory>()
|
||||||
|
// .eq(PlanWorkCategory::getProjectType, 1));
|
||||||
|
// Map<String, PlanWorkCategory> 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<String, Object> param) {
|
||||||
|
// List<PlanRecord> records = planRecordService.list(new LambdaQueryWrapper<PlanRecord>()
|
||||||
|
// .eq(PlanRecord::getPbsId, 1891317705611223041L)
|
||||||
|
// );
|
||||||
|
// Map<Long, PlanRecord> idMap = records.stream().collect(Collectors.toMap(PlanRecord::getId, Function.identity(), (o1, o2) -> o1));
|
||||||
|
// List<PlanRecord> workList = records.stream().filter(o -> o.getWorkType() == 1).collect(Collectors.toList());
|
||||||
|
// Map<Long, List<PlanRecord>> pMap = workList.stream().collect(Collectors.groupingBy(PlanRecord::getParentId));
|
||||||
|
// for (Map.Entry<Long, List<PlanRecord>> entry : pMap.entrySet()) {
|
||||||
|
// List<PlanRecord> 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<String, Object> param) {
|
||||||
|
// List<PlanRecord> records = planRecordService.list(new LambdaQueryWrapper<PlanRecord>()
|
||||||
|
// .eq(PlanRecord::getPbsId, 1891317705611223041L)
|
||||||
|
// );
|
||||||
|
// Map<Long, PlanRecord> idMap = records.stream().collect(Collectors.toMap(PlanRecord::getId, Function.identity(), (o1, o2) -> o1));
|
||||||
|
// List<PlanRecord> workList = records.stream().filter(o -> o.getWorkType() == 1).collect(Collectors.toList());
|
||||||
|
// Map<Long, List<PlanRecord>> pMap = workList.stream().collect(Collectors.groupingBy(PlanRecord::getParentId));
|
||||||
|
// for (Map.Entry<Long, List<PlanRecord>> entry : pMap.entrySet()) {
|
||||||
|
// List<PlanRecord> 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();
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -158,16 +158,19 @@ public class PlanRecord implements Serializable {
|
|||||||
private java.lang.Integer nodeStatus;
|
private java.lang.Integer nodeStatus;
|
||||||
@ApiModelProperty(value = "1开始里程碑2完成里程碑")
|
@ApiModelProperty(value = "1开始里程碑2完成里程碑")
|
||||||
private java.lang.Integer milestoneType;
|
private java.lang.Integer milestoneType;
|
||||||
/**预警级别:1一般2严重3重大**/
|
/**
|
||||||
@ApiModelProperty(value="预警级别:1一般2严重3重大")
|
* 预警级别:1一般2严重3重大
|
||||||
private java.lang.Integer warnLevel ;
|
**/
|
||||||
@ApiModelProperty(value="是否重要里程碑1是0否")
|
@ApiModelProperty(value = "预警级别:1一般2严重3重大")
|
||||||
private java.lang.Integer isImportantMilestone ;
|
private java.lang.Integer warnLevel;
|
||||||
@ApiModelProperty(value="勾选实际开始1勾选0不勾选")
|
@ApiModelProperty(value = "是否重要里程碑1是0否")
|
||||||
private java.lang.Integer isActualStart ;
|
private java.lang.Integer isImportantMilestone;
|
||||||
@ApiModelProperty(value="勾选实际完成1勾选0不勾选")
|
@ApiModelProperty(value = "勾选实际开始1勾选0不勾选")
|
||||||
private java.lang.Integer isActualFinish ;
|
private java.lang.Integer isActualStart;
|
||||||
|
@ApiModelProperty(value = "勾选实际完成1勾选0不勾选")
|
||||||
|
private java.lang.Integer isActualFinish;
|
||||||
|
@ApiModelProperty(value = "排序")
|
||||||
|
private java.lang.Integer sort;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private List<PlanRecord> children;
|
private List<PlanRecord> children;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
|
|||||||
@ -90,7 +90,7 @@ public class PlanRecordServiceImpl extends ServiceImpl<PlanRecordMapper, PlanRec
|
|||||||
List<String> split = StrUtil.split(recordIds, ",");
|
List<String> split = StrUtil.split(recordIds, ",");
|
||||||
queryWrapper.in(RefUtil.fieldNameUlc(PlanRecord::getId), split);
|
queryWrapper.in(RefUtil.fieldNameUlc(PlanRecord::getId), split);
|
||||||
}
|
}
|
||||||
queryWrapper.orderByDesc(RefUtil.fieldNameUlc(PlanRecord::getId));
|
queryWrapper.orderByAsc(RefUtil.fieldNameUlc(PlanRecord::getPlannedStart));
|
||||||
return queryWrapper;
|
return queryWrapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.zhgd.xmgl.modules.baotou.service;
|
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.zhgd.xmgl.modules.baotou.entity.DeviceUnit;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
@ -58,4 +59,6 @@ public interface IDeviceUnitService extends IService<DeviceUnit> {
|
|||||||
List<EnterpriseInfo> getEpcList(HashMap<String, Object> param);
|
List<EnterpriseInfo> getEpcList(HashMap<String, Object> param);
|
||||||
|
|
||||||
List<EnterpriseListVo> getEnterpriseList(HashMap<String, Object> param);
|
List<EnterpriseListVo> getEnterpriseList(HashMap<String, Object> param);
|
||||||
|
|
||||||
|
Page<EnterpriseListVo> getEnterprisePageList(HashMap<String, Object> param);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -47,7 +47,7 @@ public class ConstructionDeclarationDataServiceImpl extends ServiceImpl<Construc
|
|||||||
|
|
||||||
private QueryWrapper<ConstructionDeclarationData> getQueryWrapper(HashMap<String, Object> param) {
|
private QueryWrapper<ConstructionDeclarationData> getQueryWrapper(HashMap<String, Object> param) {
|
||||||
QueryWrapper<ConstructionDeclarationData> queryWrapper = QueryGenerator.initPageQueryWrapper(ConstructionDeclarationData.class, param, true);
|
QueryWrapper<ConstructionDeclarationData> queryWrapper = QueryGenerator.initPageQueryWrapper(ConstructionDeclarationData.class, param, true);
|
||||||
queryWrapper.orderByDesc(RefUtil.fieldNameUlc(ConstructionDeclarationData::getId));
|
queryWrapper.orderByAsc(RefUtil.fieldNameUlc(ConstructionDeclarationData::getCreateDate));
|
||||||
return queryWrapper;
|
return queryWrapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -132,6 +132,7 @@ public class ContractorMonthlyApproveServiceImpl extends ServiceImpl<ContractorM
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
ContractorMonthlyApprove approve = JSON.parseObject(JSON.toJSONString(param.get("approve")), ContractorMonthlyApprove.class);
|
ContractorMonthlyApprove approve = JSON.parseObject(JSON.toJSONString(param.get("approve")), ContractorMonthlyApprove.class);
|
||||||
|
approve.setId(null);
|
||||||
this.add(approve);
|
this.add(approve);
|
||||||
JSONArray details = JSON.parseArray(JSON.toJSONString(param.get("details")));
|
JSONArray details = JSON.parseArray(JSON.toJSONString(param.get("details")));
|
||||||
for (int i = 0; i < details.size(); i++) {
|
for (int i = 0; i < details.size(); i++) {
|
||||||
@ -142,6 +143,7 @@ public class ContractorMonthlyApproveServiceImpl extends ServiceImpl<ContractorM
|
|||||||
for (int j = 0; j < details1.size(); j++) {
|
for (int j = 0; j < details1.size(); j++) {
|
||||||
JSONObject jo1 = details1.getJSONObject(j);
|
JSONObject jo1 = details1.getJSONObject(j);
|
||||||
ContractorMonthlyDetail detail = BeanUtil.toBean(jo1, ContractorMonthlyDetail.class);
|
ContractorMonthlyDetail detail = BeanUtil.toBean(jo1, ContractorMonthlyDetail.class);
|
||||||
|
detail.setId(null);
|
||||||
detail.setPeriodId(period.getId());
|
detail.setPeriodId(period.getId());
|
||||||
detail.setApproveDeviceId(deviceId);
|
detail.setApproveDeviceId(deviceId);
|
||||||
detail.setApproveId(approve.getId());
|
detail.setApproveId(approve.getId());
|
||||||
@ -397,6 +399,7 @@ public class ContractorMonthlyApproveServiceImpl extends ServiceImpl<ContractorM
|
|||||||
|
|
||||||
private ContractorMonthlyPeriod savePeriod(ContractorMonthlyApprove approve, Long approveDeviceId) {
|
private ContractorMonthlyPeriod savePeriod(ContractorMonthlyApprove approve, Long approveDeviceId) {
|
||||||
ContractorMonthlyPeriod period = new ContractorMonthlyPeriod();
|
ContractorMonthlyPeriod period = new ContractorMonthlyPeriod();
|
||||||
|
period.setId(null);
|
||||||
period.setDeviceId(approveDeviceId);
|
period.setDeviceId(approveDeviceId);
|
||||||
period.setGroupId(approve.getGroupId());
|
period.setGroupId(approve.getGroupId());
|
||||||
period.setEnterpriseId(approve.getEnterpriseId());
|
period.setEnterpriseId(approve.getEnterpriseId());
|
||||||
|
|||||||
@ -210,4 +210,18 @@ public class DeviceUnitServiceImpl extends ServiceImpl<DeviceUnitMapper, DeviceU
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Page<EnterpriseListVo> getEnterprisePageList(HashMap<String, Object> 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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -498,6 +498,7 @@ public class WorkerAdmissionDetailServiceImpl extends ServiceImpl<WorkerAdmissio
|
|||||||
workerInfo.setEpcCbs(detail.getEpcCbs());
|
workerInfo.setEpcCbs(detail.getEpcCbs());
|
||||||
}
|
}
|
||||||
workerInfo.setEnterDate(enterDate);
|
workerInfo.setEnterDate(enterDate);
|
||||||
|
workerInfo.setPhoneNumber(detail.getPhone());
|
||||||
return workerInfo;
|
return workerInfo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -233,10 +233,12 @@ public class CarInfoServiceImpl extends ServiceImpl<CarInfoMapper, CarInfo> impl
|
|||||||
@Override
|
@Override
|
||||||
public Result uploadExcelCar(MultipartFile excelFile, String projectSn) {
|
public Result uploadExcelCar(MultipartFile excelFile, String projectSn) {
|
||||||
Result<String> result = new Result<String>();
|
Result<String> result = new Result<String>();
|
||||||
StringBuilder existName = new StringBuilder("");
|
StringBuilder existCarNumName = new StringBuilder("");
|
||||||
|
String existCarNumMsg = "";
|
||||||
ArrayList<String> errIdCards = new ArrayList<>();
|
ArrayList<String> errIdCards = new ArrayList<>();
|
||||||
String rtMsg = "";
|
String rtMsg = "";
|
||||||
String existMsg = "";
|
StringBuilder existWorkerName = new StringBuilder("");
|
||||||
|
String existWorkerNameMsg = "";
|
||||||
try {
|
try {
|
||||||
InputStream is = excelFile.getInputStream();
|
InputStream is = excelFile.getInputStream();
|
||||||
List<Map<String, String>> list = ExcelUtils.jxlExlToList(is, 0);
|
List<Map<String, String>> list = ExcelUtils.jxlExlToList(is, 0);
|
||||||
@ -266,10 +268,18 @@ public class CarInfoServiceImpl extends ServiceImpl<CarInfoMapper, CarInfo> impl
|
|||||||
excelCar.setCarColor(importInfo.get("车辆颜色"));
|
excelCar.setCarColor(importInfo.get("车辆颜色"));
|
||||||
excelCar.setAddTime(new Date());
|
excelCar.setAddTime(new Date());
|
||||||
excelCar.setProjectSn(projectSn);
|
excelCar.setProjectSn(projectSn);
|
||||||
|
String readWorkerName = importInfo.get("司机姓名");
|
||||||
if (!"临时车辆".equals(carModuleType)) {
|
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.setDriverTelephone(importInfo.get("司机电话"));
|
||||||
excelCar.setIsBlack(Objects.equals(importInfo.get("是否黑名单"), "是") ? 1 : 0);
|
excelCar.setIsBlack(Objects.equals(importInfo.get("是否黑名单"), "是") ? 1 : 0);
|
||||||
excelCar.setCarType(Optional.ofNullable(carTypeMap.get(importInfo.get("车种类型"))).map(CarType::getId).orElse(null));
|
excelCar.setCarType(Optional.ofNullable(carTypeMap.get(importInfo.get("车种类型"))).map(CarType::getId).orElse(null));
|
||||||
@ -283,8 +293,8 @@ public class CarInfoServiceImpl extends ServiceImpl<CarInfoMapper, CarInfo> impl
|
|||||||
} else {
|
} else {
|
||||||
//存在车辆
|
//存在车辆
|
||||||
if (dataCar.toExistString().equals(excelCar.toExistString())) {
|
if (dataCar.toExistString().equals(excelCar.toExistString())) {
|
||||||
existName.append(excelCar.getCarNumber());
|
existCarNumName.append(excelCar.getCarNumber());
|
||||||
existName.append("、");
|
existCarNumName.append("、");
|
||||||
log.info("忽略批量导入已存在完全一样车辆:{}", excelCar.getCarNumber());
|
log.info("忽略批量导入已存在完全一样车辆:{}", excelCar.getCarNumber());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -292,17 +302,16 @@ public class CarInfoServiceImpl extends ServiceImpl<CarInfoMapper, CarInfo> impl
|
|||||||
this.editCarInfo(excelCar);
|
this.editCarInfo(excelCar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!"".equals(existName.toString())) {
|
|
||||||
existName.deleteCharAt(existName.lastIndexOf("、"));
|
if (!"".equals(existCarNumName.toString())) {
|
||||||
existMsg = "车牌号为:" + existName + "的车辆已存在对应信息(车牌号等信息一致)";
|
existCarNumName.deleteCharAt(existCarNumName.lastIndexOf("、"));
|
||||||
|
existCarNumMsg = "车牌号为:" + existCarNumName + "的车辆已存在对应信息(车牌号等信息一致)。";
|
||||||
}
|
}
|
||||||
String errIdCardMsg = "";
|
if (!"".equals(existWorkerName.toString())) {
|
||||||
if (CollUtil.isNotEmpty(errIdCards)) {
|
existWorkerName.deleteCharAt(existWorkerName.lastIndexOf("、"));
|
||||||
if (StrUtil.isNotBlank(existMsg)) {
|
existWorkerNameMsg = "司机姓名:" + existWorkerName + "在人员管理中不存在。";
|
||||||
errIdCardMsg += ",";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
rtMsg = StrUtil.format("导入成功。{}{}", existMsg, errIdCardMsg);
|
rtMsg = StrUtil.format("导入成功。{}{}", existCarNumMsg, existWorkerNameMsg);
|
||||||
result.successMsg(rtMsg);
|
result.successMsg(rtMsg);
|
||||||
} catch (OpenAlertException e) {
|
} catch (OpenAlertException e) {
|
||||||
log.error("error:", e);
|
log.error("error:", e);
|
||||||
|
|||||||
@ -209,7 +209,8 @@ public class ExamWorkerController {
|
|||||||
String[] typeArr = {"一", "二", "三"};
|
String[] typeArr = {"一", "二", "三"};
|
||||||
int typeIndex = -1;
|
int typeIndex = -1;
|
||||||
//封装数据
|
//封装数据
|
||||||
Map<String, Object> params = new HashMap<String, Object>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
|
int index = 0;
|
||||||
for (Map.Entry<Integer, List<ExamQuestionBankVo>> entry : typeMap.entrySet()) {
|
for (Map.Entry<Integer, List<ExamQuestionBankVo>> entry : typeMap.entrySet()) {
|
||||||
Integer key = entry.getKey();
|
Integer key = entry.getKey();
|
||||||
int[] i = {1};
|
int[] i = {1};
|
||||||
@ -219,21 +220,31 @@ public class ExamWorkerController {
|
|||||||
BigDecimal score = one.getScore();
|
BigDecimal score = one.getScore();
|
||||||
StringBuilder content = new StringBuilder();
|
StringBuilder content = new StringBuilder();
|
||||||
BigDecimal total = NumberUtil.mul(list.size(), score);
|
BigDecimal total = NumberUtil.mul(list.size(), score);
|
||||||
|
String title;
|
||||||
if (key == 1) {
|
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);
|
addOption(list, content, i, imageMap, params);
|
||||||
params.put("c1", content.toString());
|
params.put("c1", content.toString());
|
||||||
} else if (key == 2) {
|
} else if (index == 1) {
|
||||||
params.put("t2", typeArr[++typeIndex] + "、多选题:(每题" + one.getScore() + "分,共计" + total + "分、漏选少选得" + NumberUtil.div(one.getScore(), 2, 2) + "分,错选不得分。)");
|
params.put("t2", title);
|
||||||
//遍历题目
|
//遍历题目
|
||||||
addOption(list, content, i, imageMap, params);
|
addOption(list, content, i, imageMap, params);
|
||||||
params.put("c2", content.toString());
|
params.put("c2", content.toString());
|
||||||
} else {
|
} else {
|
||||||
params.put("t3", typeArr[++typeIndex] + "、判断题(每题" + one.getScore() + "分,共" + total + "分,正确:打√,错误:打×)");
|
params.put("t3", title);
|
||||||
//遍历题目
|
//遍历题目
|
||||||
addOption(list, content, i, imageMap, params);
|
addOption(list, content, i, imageMap, params);
|
||||||
params.put("c3", content.toString());
|
params.put("c3", content.toString());
|
||||||
}
|
}
|
||||||
|
index++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
String recordId = MapUtils.getString(param, "recordId");
|
String recordId = MapUtils.getString(param, "recordId");
|
||||||
|
|||||||
@ -295,7 +295,7 @@
|
|||||||
from exam_train_record ec
|
from exam_train_record ec
|
||||||
join exam_paper p on ec.exam_paper_id = p.id
|
join exam_paper p on ec.exam_paper_id = p.id
|
||||||
join exam_subject es on p.subject_id = es.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 ei on ei.id=wi.enterprise_id
|
||||||
left join enterprise_info ei1 on ei1.id=wi.epc_cbs
|
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
|
left join (select worker_admission_detail_id,certificate_number from worker_admission_certificate_detail group
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user