包头bug修改
This commit is contained in:
parent
d7ac081008
commit
a7c2a25d77
@ -1,10 +1,14 @@
|
|||||||
package com.zhgd.xmgl.modules.baotou.controller;
|
package com.zhgd.xmgl.modules.baotou.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.convert.Convert;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
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.xmgl.modules.baotou.entity.DeviceUnit;
|
import com.zhgd.xmgl.modules.baotou.entity.DeviceUnit;
|
||||||
|
import com.zhgd.xmgl.modules.baotou.entity.ProjectGroupUnit;
|
||||||
import com.zhgd.xmgl.modules.baotou.service.IDeviceUnitService;
|
import com.zhgd.xmgl.modules.baotou.service.IDeviceUnitService;
|
||||||
|
import com.zhgd.xmgl.modules.baotou.service.IProjectGroupUnitService;
|
||||||
import com.zhgd.xmgl.modules.worker.entity.EnterpriseInfo;
|
import com.zhgd.xmgl.modules.worker.entity.EnterpriseInfo;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
@ -14,11 +18,14 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.apache.commons.collections.MapUtils;
|
import org.apache.commons.collections.MapUtils;
|
||||||
import org.simpleframework.xml.core.Validate;
|
import org.simpleframework.xml.core.Validate;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
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 java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -33,6 +40,9 @@ import java.util.List;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@Api(tags = "装置管理相关Api")
|
@Api(tags = "装置管理相关Api")
|
||||||
public class DeviceUnitController {
|
public class DeviceUnitController {
|
||||||
|
@Lazy
|
||||||
|
@Autowired
|
||||||
|
IProjectGroupUnitService projectGroupUnitService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IDeviceUnitService deviceUnitService;
|
private IDeviceUnitService deviceUnitService;
|
||||||
|
|
||||||
@ -132,5 +142,22 @@ public class DeviceUnitController {
|
|||||||
return Result.success(deviceUnitService.getEpcList(map));
|
return Result.success(deviceUnitService.getEpcList(map));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "项目组的监理赋值给装置的新增字段监理", notes = "项目组的监理赋值给装置的新增字段监理", httpMethod = "GET")
|
||||||
|
@GetMapping(value = "/setNewSupervisingUnitIds")
|
||||||
|
public Result setNewSupervisingUnitIds(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||||
|
Map<Long, List<ProjectGroupUnit>> groupMap = projectGroupUnitService.list(null).stream().collect(Collectors.groupingBy(ProjectGroupUnit::getProjectGroupId));
|
||||||
|
List<DeviceUnit> units = deviceUnitService.list();
|
||||||
|
for (DeviceUnit unit : units) {
|
||||||
|
if (StrUtil.isNotBlank(unit.getProjectGroupIds())) {
|
||||||
|
for (String groupId : StrUtil.split(unit.getProjectGroupIds(), ",")) {
|
||||||
|
List<ProjectGroupUnit> unitList = groupMap.get(Convert.toLong(groupId));
|
||||||
|
if (unitList.size() > 0) {
|
||||||
|
unit.setSupervisingUnitIds(StrUtil.join(",", unitList.stream().map(ProjectGroupUnit::getSupervisingUnitId).collect(Collectors.toList())));
|
||||||
|
deviceUnitService.updateById(unit);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return Result.ok();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.zhgd.xmgl.modules.baotou.controller;
|
package com.zhgd.xmgl.modules.baotou.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
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;
|
||||||
@ -140,4 +141,5 @@ public class ProjectGroupController {
|
|||||||
return Result.success(projectGroupService.getProjectGroupEnterpriseList(param));
|
return Result.success(projectGroupService.getProjectGroupEnterpriseList(param));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -59,7 +59,6 @@ public class DeviceUnit implements Serializable {
|
|||||||
@ApiModelProperty(value="排序")
|
@ApiModelProperty(value="排序")
|
||||||
private java.lang.Integer sort;
|
private java.lang.Integer sort;
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
@ApiModelProperty(value="监理单位ids")
|
@ApiModelProperty(value="监理单位ids")
|
||||||
private java.lang.String supervisingUnitIds;
|
private java.lang.String supervisingUnitIds;
|
||||||
/**监理单位名称*/
|
/**监理单位名称*/
|
||||||
@ -72,18 +71,21 @@ public class DeviceUnit implements Serializable {
|
|||||||
private java.lang.String epcContractorName;
|
private java.lang.String epcContractorName;
|
||||||
/**
|
/**
|
||||||
* 施工单位名称
|
* 施工单位名称
|
||||||
*/
|
*/
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@ApiModelProperty(value = "施工单位名称")
|
@ApiModelProperty(value = "施工单位名称")
|
||||||
private java.lang.String constructionUnitName;
|
private java.lang.String constructionUnitName;
|
||||||
/**
|
/**
|
||||||
* 项目组名称
|
* 项目组名称
|
||||||
*/
|
*/
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@ApiModelProperty(value = "项目组名称")
|
@ApiModelProperty(value = "项目组名称")
|
||||||
private java.lang.String projectGroupName;
|
private java.lang.String projectGroupName;
|
||||||
|
// /**
|
||||||
@TableField(exist = false)
|
// * 这里是对应一个项目组的情况才能用
|
||||||
@ApiModelProperty(value = "项目组管理id")
|
// */
|
||||||
private java.lang.Long projectGroupId;
|
// @TableField(exist = false)
|
||||||
|
// @ApiModelProperty(value = "项目组管理id")
|
||||||
|
// @Deprecated
|
||||||
|
// private java.lang.Long projectGroupId;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -99,15 +99,16 @@ public class ReturnTrainingApplication implements Serializable {
|
|||||||
private java.lang.String applicantUnitName;
|
private java.lang.String applicantUnitName;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@ApiModelProperty(value = "单位安全负责人名称")
|
@ApiModelProperty(value = "单位安全负责人名称")
|
||||||
private java.lang.String unitSafetyOfficerName;
|
private java.lang.String unitSafetyOfficerName;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@ApiModelProperty(value = "申请人名称")
|
@ApiModelProperty(value = "申请人名称")
|
||||||
private java.lang.String applicantName;
|
private java.lang.String applicantName;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@ApiModelProperty(value = "试卷名称")
|
@ApiModelProperty(value = "试卷名称")
|
||||||
private java.lang.String paperName;
|
private java.lang.String paperName;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@ApiModelProperty(value = "未考试人数")
|
@ApiModelProperty(value = "未考试人数")
|
||||||
private java.lang.Integer notExamNum;
|
private java.lang.Integer notExamNum;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private java.lang.Long workerId;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,6 @@
|
|||||||
group_concat(distinct pg.project_group_name) as project_group_name,
|
group_concat(distinct pg.project_group_name) as project_group_name,
|
||||||
group_concat(distinct ei.enterprise_name) as epc_contractor_name,
|
group_concat(distinct ei.enterprise_name) as epc_contractor_name,
|
||||||
group_concat(distinct ei3.enterprise_name) as construction_unit_name,
|
group_concat(distinct ei3.enterprise_name) as construction_unit_name,
|
||||||
group_concat(distinct pgu.supervising_unit_id) as supervising_unit_ids,
|
|
||||||
group_concat(distinct ei4.enterprise_name) as supervising_unit_name
|
group_concat(distinct ei4.enterprise_name) as supervising_unit_name
|
||||||
<if test="param.accountType == '6'.toString() ">
|
<if test="param.accountType == '6'.toString() ">
|
||||||
, group_concat(distinct pg.id) as project_group_ids
|
, group_concat(distinct pg.id) as project_group_ids
|
||||||
@ -24,17 +23,17 @@
|
|||||||
,t.epc_contractor_ids
|
,t.epc_contractor_ids
|
||||||
,t.sort
|
,t.sort
|
||||||
,t.id
|
,t.id
|
||||||
,pgu.project_group_id
|
,t.supervising_unit_ids
|
||||||
from
|
from
|
||||||
device_unit t
|
device_unit t
|
||||||
left join project_group pg on find_in_set(pg.id,t.project_group_ids)
|
left join project_group pg on find_in_set(pg.id,t.project_group_ids)
|
||||||
left join project_group_unit pgu on pg.id = pgu.project_group_id
|
left join project_group_unit pgu on pg.id = pgu.project_group_id
|
||||||
left join enterprise_info ei on find_in_set(ei.id,t.epc_contractor_ids)
|
left join enterprise_info ei on find_in_set(ei.id,t.epc_contractor_ids)
|
||||||
left join enterprise_info ei3 on find_in_set(ei3.id,t.construction_unit_ids)
|
left join enterprise_info ei3 on find_in_set(ei3.id,t.construction_unit_ids)
|
||||||
left join enterprise_info ei4 on find_in_set(ei4.id,pgu.supervising_unit_id)
|
left join enterprise_info ei4 on find_in_set(ei4.id,t.supervising_unit_ids)
|
||||||
where 1=1
|
where 1=1
|
||||||
<if test="param.projectGroupId != null and param.projectGroupId != ''">
|
<if test="param.projectGroupId != null and param.projectGroupId != ''">
|
||||||
and pgu.project_group_id = #{param.projectGroupId}
|
and find_in_set(#{param.projectGroupId},t.project_group_ids)
|
||||||
</if>
|
</if>
|
||||||
<if test="param.projectSn != null and param.projectSn != ''">
|
<if test="param.projectSn != null and param.projectSn != ''">
|
||||||
and t.project_sn = #{param.projectSn}
|
and t.project_sn = #{param.projectSn}
|
||||||
|
|||||||
@ -33,7 +33,8 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getBatchByPaper" resultType="com.zhgd.xmgl.modules.baotou.entity.ReturnTrainingApplication">
|
<select id="getBatchByPaper" resultType="com.zhgd.xmgl.modules.baotou.entity.ReturnTrainingApplication">
|
||||||
select distinct t.*
|
select distinct t.*,
|
||||||
|
rtd.id as worker_id
|
||||||
from return_training_application t
|
from return_training_application t
|
||||||
join exam_paper ep on ep.id=t.paper_id
|
join exam_paper ep on ep.id=t.paper_id
|
||||||
join return_training_detail rtd on rtd.application_id = t.id
|
join return_training_detail rtd on rtd.application_id = t.id
|
||||||
@ -47,7 +48,7 @@
|
|||||||
<select id="getQualifierWorker" resultType="java.util.Map">
|
<select id="getQualifierWorker" resultType="java.util.Map">
|
||||||
select
|
select
|
||||||
t.id
|
t.id
|
||||||
,count(distinct etr.worker_card) qualifierNum
|
,count(distinct etr.id) qualifierNum
|
||||||
from return_training_application t
|
from return_training_application t
|
||||||
join exam_train_record etr on etr.application_id=t.id
|
join exam_train_record etr on etr.application_id=t.id
|
||||||
where t.id in
|
where t.id in
|
||||||
@ -63,7 +64,7 @@
|
|||||||
<select id="getNotExamWorker" resultType="java.util.Map">
|
<select id="getNotExamWorker" resultType="java.util.Map">
|
||||||
select
|
select
|
||||||
t.id
|
t.id
|
||||||
,count(distinct wad.id_card) notExamNum
|
,count(distinct wad.id) notExamNum
|
||||||
from return_training_application t
|
from return_training_application t
|
||||||
join return_training_detail wad on wad.application_id=t.id
|
join return_training_detail wad on wad.application_id=t.id
|
||||||
where t.id in
|
where t.id in
|
||||||
@ -71,8 +72,8 @@
|
|||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
and not exists(
|
and not exists(
|
||||||
select * from exam_train_record where application_id=t.id and worker_card=wad.id_card and application_type = 2
|
SELECT * FROM exam_train_record etr
|
||||||
and submit = 1
|
WHERE etr.application_id = t.id AND etr.worker_id= wad.id AND etr.application_type = 2 AND etr.submit = 1
|
||||||
)
|
)
|
||||||
group by t.id
|
group by t.id
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
,etr.is_pass
|
,etr.is_pass
|
||||||
from return_training_detail t
|
from return_training_detail t
|
||||||
join return_training_application rta on rta.id=t.application_id
|
join return_training_application rta on rta.id=t.application_id
|
||||||
left join exam_train_record etr on etr.application_id=rta.id and etr.worker_card=t.id_card and etr.submit = 1
|
left join exam_train_record etr on etr.application_id=rta.id and t.id=etr.worker_id and etr.submit = 1
|
||||||
LEFT JOIN worker_info a on a.id_card=t.id_card
|
LEFT JOIN worker_info a on a.id_card=t.id_card
|
||||||
LEFT JOIN team_info b ON a.team_id = b.id
|
LEFT JOIN team_info b ON a.team_id = b.id
|
||||||
LEFT JOIN department_info c ON a.department_id = c.id
|
LEFT JOIN department_info c ON a.department_id = c.id
|
||||||
|
|||||||
@ -68,7 +68,7 @@
|
|||||||
<select id="getExamQualifierWorker" resultType="java.util.Map">
|
<select id="getExamQualifierWorker" resultType="java.util.Map">
|
||||||
select
|
select
|
||||||
t.id
|
t.id
|
||||||
,count(distinct etr.worker_card) examQualifierNum
|
,count(distinct etr.id) examQualifierNum
|
||||||
from worker_admission t
|
from worker_admission t
|
||||||
join exam_train_record etr on etr.application_id=t.id
|
join exam_train_record etr on etr.application_id=t.id
|
||||||
where t.id in
|
where t.id in
|
||||||
@ -84,7 +84,7 @@
|
|||||||
<select id="getNotExamWorker" resultType="java.util.Map">
|
<select id="getNotExamWorker" resultType="java.util.Map">
|
||||||
select
|
select
|
||||||
t.id
|
t.id
|
||||||
,count(distinct wad.id_card) notExamNum
|
,count(distinct wad.id) notExamNum
|
||||||
from worker_admission t
|
from worker_admission t
|
||||||
join worker_admission_detail wad on wad.worker_admission_id=t.id
|
join worker_admission_detail wad on wad.worker_admission_id=t.id
|
||||||
where t.id in
|
where t.id in
|
||||||
|
|||||||
@ -1,9 +1,10 @@
|
|||||||
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.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
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.service.IService;
|
||||||
|
import com.zhgd.xmgl.modules.baotou.entity.DeviceUnit;
|
||||||
|
import com.zhgd.xmgl.modules.baotou.entity.ProjectGroup;
|
||||||
import com.zhgd.xmgl.modules.baotou.entity.vo.EnterpriseListVo;
|
import com.zhgd.xmgl.modules.baotou.entity.vo.EnterpriseListVo;
|
||||||
import com.zhgd.xmgl.modules.worker.entity.EnterpriseInfo;
|
import com.zhgd.xmgl.modules.worker.entity.EnterpriseInfo;
|
||||||
|
|
||||||
@ -13,42 +14,53 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* @Description: 装置管理
|
* @Description: 装置管理
|
||||||
* @author: pds
|
* @author: pds
|
||||||
* @date: 2024-08-06
|
* @date: 2024-08-06
|
||||||
* @version: V1.0
|
* @version: V1.0
|
||||||
*/
|
*/
|
||||||
public interface IDeviceUnitService extends IService<DeviceUnit> {
|
public interface IDeviceUnitService extends IService<DeviceUnit> {
|
||||||
/**
|
/**
|
||||||
* 分页列表查询装置管理信息
|
* 分页列表查询装置管理信息
|
||||||
|
*
|
||||||
* @param param 参数map
|
* @param param 参数map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
IPage<DeviceUnit> queryPageList(HashMap<String, Object> param);
|
IPage<DeviceUnit> queryPageList(HashMap<String, Object> param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询装置管理信息
|
* 列表查询装置管理信息
|
||||||
|
*
|
||||||
* @param param 参数map
|
* @param param 参数map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<DeviceUnit> queryList(HashMap<String, Object> param);
|
List<DeviceUnit> queryList(HashMap<String, Object> param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加装置管理信息
|
* 添加装置管理信息
|
||||||
|
*
|
||||||
* @param deviceUnit 装置管理
|
* @param deviceUnit 装置管理
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void add(DeviceUnit deviceUnit);
|
void add(DeviceUnit deviceUnit);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑装置管理信息
|
* 编辑装置管理信息
|
||||||
|
*
|
||||||
* @param deviceUnit 装置管理
|
* @param deviceUnit 装置管理
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void edit(DeviceUnit deviceUnit);
|
void edit(DeviceUnit deviceUnit);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据id删除装置管理信息
|
* 根据id删除装置管理信息
|
||||||
|
*
|
||||||
* @param id 装置管理的id
|
* @param id 装置管理的id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void delete(String id);
|
void delete(String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据id查询装置管理信息
|
* 根据id查询装置管理信息
|
||||||
|
*
|
||||||
* @param id 装置管理的id
|
* @param id 装置管理的id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -61,4 +73,12 @@ public interface IDeviceUnitService extends IService<DeviceUnit> {
|
|||||||
List<EnterpriseListVo> getEnterpriseList(HashMap<String, Object> param);
|
List<EnterpriseListVo> getEnterpriseList(HashMap<String, Object> param);
|
||||||
|
|
||||||
Page<EnterpriseListVo> getEnterprisePageList(HashMap<String, Object> param);
|
Page<EnterpriseListVo> getEnterprisePageList(HashMap<String, Object> param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑项目组检查装置的绑定关系是否满足
|
||||||
|
*
|
||||||
|
* @param oldProjectGroup
|
||||||
|
* @param projectGroup
|
||||||
|
*/
|
||||||
|
void checkUnitBeUse(ProjectGroup oldProjectGroup, ProjectGroup projectGroup);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,10 +1,8 @@
|
|||||||
package com.zhgd.xmgl.modules.baotou.service;
|
package com.zhgd.xmgl.modules.baotou.service;
|
||||||
|
|
||||||
import com.zhgd.xmgl.modules.baotou.entity.ProjectGroup;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.zhgd.xmgl.modules.baotou.entity.vo.CountEnterpriseVo;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.zhgd.xmgl.modules.baotou.entity.vo.EnterpriseListVo;
|
import com.zhgd.xmgl.modules.baotou.entity.ProjectGroup;
|
||||||
import com.zhgd.xmgl.modules.baotou.entity.vo.ProjectGroupEnterpriseVo;
|
import com.zhgd.xmgl.modules.baotou.entity.vo.ProjectGroupEnterpriseVo;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -14,42 +12,53 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* @Description: 项目组管理
|
* @Description: 项目组管理
|
||||||
* @author: pds
|
* @author: pds
|
||||||
* @date: 2024-08-06
|
* @date: 2024-08-06
|
||||||
* @version: V1.0
|
* @version: V1.0
|
||||||
*/
|
*/
|
||||||
public interface IProjectGroupService extends IService<ProjectGroup> {
|
public interface IProjectGroupService extends IService<ProjectGroup> {
|
||||||
/**
|
/**
|
||||||
* 分页列表查询项目组管理信息
|
* 分页列表查询项目组管理信息
|
||||||
|
*
|
||||||
* @param param 参数map
|
* @param param 参数map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
IPage<ProjectGroup> queryPageList(HashMap<String, Object> param);
|
IPage<ProjectGroup> queryPageList(HashMap<String, Object> param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表查询项目组管理信息
|
* 列表查询项目组管理信息
|
||||||
|
*
|
||||||
* @param param 参数map
|
* @param param 参数map
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<ProjectGroup> queryList(HashMap<String, Object> param);
|
List<ProjectGroup> queryList(HashMap<String, Object> param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加项目组管理信息
|
* 添加项目组管理信息
|
||||||
|
*
|
||||||
* @param projectGroup 项目组管理
|
* @param projectGroup 项目组管理
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void add(ProjectGroup projectGroup);
|
void add(ProjectGroup projectGroup);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑项目组管理信息
|
* 编辑项目组管理信息
|
||||||
|
*
|
||||||
* @param projectGroup 项目组管理
|
* @param projectGroup 项目组管理
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void edit(ProjectGroup projectGroup);
|
void edit(ProjectGroup projectGroup);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据id删除项目组管理信息
|
* 根据id删除项目组管理信息
|
||||||
|
*
|
||||||
* @param id 项目组管理的id
|
* @param id 项目组管理的id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void delete(String id);
|
void delete(String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据id查询项目组管理信息
|
* 根据id查询项目组管理信息
|
||||||
|
*
|
||||||
* @param id 项目组管理的id
|
* @param id 项目组管理的id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -57,7 +66,13 @@ public interface IProjectGroupService extends IService<ProjectGroup> {
|
|||||||
|
|
||||||
void saveObj(ProjectGroup projectGroup);
|
void saveObj(ProjectGroup projectGroup);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表查询项目组下的承包商信息(去重)
|
||||||
|
*
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
ProjectGroupEnterpriseVo getProjectGroupEnterpriseList(HashMap<String, Object> param);
|
ProjectGroupEnterpriseVo getProjectGroupEnterpriseList(HashMap<String, Object> param);
|
||||||
|
|
||||||
List<Map<String ,Object>> getTreeList(HashMap<String, Object> param);
|
List<Map<String, Object>> getTreeList(HashMap<String, Object> param);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
package com.zhgd.xmgl.modules.baotou.service.impl;
|
package com.zhgd.xmgl.modules.baotou.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.convert.Convert;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
@ -11,10 +13,13 @@ import com.zhgd.jeecg.common.execption.OpenAlertException;
|
|||||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||||
import com.zhgd.xmgl.constant.Cts;
|
import com.zhgd.xmgl.constant.Cts;
|
||||||
import com.zhgd.xmgl.modules.baotou.entity.DeviceUnit;
|
import com.zhgd.xmgl.modules.baotou.entity.DeviceUnit;
|
||||||
|
import com.zhgd.xmgl.modules.baotou.entity.ProjectGroup;
|
||||||
import com.zhgd.xmgl.modules.baotou.entity.UserDevGroup;
|
import com.zhgd.xmgl.modules.baotou.entity.UserDevGroup;
|
||||||
import com.zhgd.xmgl.modules.baotou.entity.vo.EnterpriseListVo;
|
import com.zhgd.xmgl.modules.baotou.entity.vo.EnterpriseListVo;
|
||||||
|
import com.zhgd.xmgl.modules.baotou.entity.vo.ProjectGroupEnterpriseVo;
|
||||||
import com.zhgd.xmgl.modules.baotou.mapper.DeviceUnitMapper;
|
import com.zhgd.xmgl.modules.baotou.mapper.DeviceUnitMapper;
|
||||||
import com.zhgd.xmgl.modules.baotou.service.IDeviceUnitService;
|
import com.zhgd.xmgl.modules.baotou.service.IDeviceUnitService;
|
||||||
|
import com.zhgd.xmgl.modules.baotou.service.IProjectGroupService;
|
||||||
import com.zhgd.xmgl.modules.baotou.service.IProjectGroupUnitService;
|
import com.zhgd.xmgl.modules.baotou.service.IProjectGroupUnitService;
|
||||||
import com.zhgd.xmgl.modules.baotou.service.IUserDevGroupService;
|
import com.zhgd.xmgl.modules.baotou.service.IUserDevGroupService;
|
||||||
import com.zhgd.xmgl.modules.project.service.IProjectEnterpriseService;
|
import com.zhgd.xmgl.modules.project.service.IProjectEnterpriseService;
|
||||||
@ -32,6 +37,7 @@ import org.springframework.context.annotation.Lazy;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -63,6 +69,9 @@ public class DeviceUnitServiceImpl extends ServiceImpl<DeviceUnitMapper, DeviceU
|
|||||||
@Lazy
|
@Lazy
|
||||||
@Autowired
|
@Autowired
|
||||||
private IDeviceUnitService deviceUnitService;
|
private IDeviceUnitService deviceUnitService;
|
||||||
|
@Lazy
|
||||||
|
@Autowired
|
||||||
|
private IProjectGroupService projectGroupService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<DeviceUnit> queryPageList(HashMap<String, Object> param) {
|
public IPage<DeviceUnit> queryPageList(HashMap<String, Object> param) {
|
||||||
@ -224,4 +233,81 @@ public class DeviceUnitServiceImpl extends ServiceImpl<DeviceUnitMapper, DeviceU
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void checkUnitBeUse(ProjectGroup oldProjectGroup, ProjectGroup projectGroup) {
|
||||||
|
//Key是单位名称,val是装置名称
|
||||||
|
Map<String, List<String>> useMap = new HashMap<>();
|
||||||
|
Map<Long, EnterpriseInfo> enterpriseIdMap = BeanUtil.copyToList(enterpriseInfoService.getEnterpriseInfoList(new MapBuilder<String, Object>().put(Cts.PROJECT_SN, projectGroup.getProjectSn()).put(Cts.IGNORE_DATA_SCOPE, 1).build()), EnterpriseInfo.class)
|
||||||
|
.stream().collect(Collectors.toMap(EnterpriseInfo::getId, Function.identity(), (o1, o2) -> o1));
|
||||||
|
List<DeviceUnit> deviceUnits = deviceUnitService.queryList(new MapBuilder<String, Object>()
|
||||||
|
.put("projectSn", projectGroup.getProjectSn())
|
||||||
|
.put("projectGroupId", projectGroup.getId())
|
||||||
|
.build());
|
||||||
|
for (DeviceUnit unit : deviceUnits) {
|
||||||
|
String supervisingUnitIds = unit.getSupervisingUnitIds();
|
||||||
|
String epcContractorIds = unit.getEpcContractorIds();
|
||||||
|
String constructionUnitIds = unit.getConstructionUnitIds();
|
||||||
|
ProjectGroupEnterpriseVo vo = projectGroupService.getProjectGroupEnterpriseList(new MapBuilder<String, Object>()
|
||||||
|
.put("projectGroupIds", unit.getProjectGroupIds())
|
||||||
|
.put("supervisingUnitIds", supervisingUnitIds)
|
||||||
|
.put("epcContractorIds", epcContractorIds)
|
||||||
|
.build());
|
||||||
|
if (StrUtil.isNotBlank(supervisingUnitIds)) {
|
||||||
|
for (String id : StrUtil.split(supervisingUnitIds, ",")) {
|
||||||
|
Long idLong = Convert.toLong(id);
|
||||||
|
if (!vo.getSupervisingUnitIds().contains(idLong)) {
|
||||||
|
String enterpriseName = enterpriseIdMap.get(idLong).getEnterpriseName();
|
||||||
|
List<String> list = useMap.get(enterpriseName);
|
||||||
|
if (list == null) {
|
||||||
|
list = new ArrayList<>();
|
||||||
|
}
|
||||||
|
list.add(unit.getDeviceUnitName());
|
||||||
|
useMap.put(enterpriseName, list);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotBlank(epcContractorIds)) {
|
||||||
|
for (String id : StrUtil.split(epcContractorIds, ",")) {
|
||||||
|
Long idLong = Convert.toLong(id);
|
||||||
|
if (!vo.getEpcContractorIds().contains(idLong)) {
|
||||||
|
String enterpriseName = enterpriseIdMap.get(idLong).getEnterpriseName();
|
||||||
|
List<String> list = useMap.get(enterpriseName);
|
||||||
|
if (list == null) {
|
||||||
|
list = new ArrayList<>();
|
||||||
|
}
|
||||||
|
list.add(unit.getDeviceUnitName());
|
||||||
|
useMap.put(enterpriseName, list);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotBlank(constructionUnitIds)) {
|
||||||
|
for (String id : StrUtil.split(constructionUnitIds, ",")) {
|
||||||
|
if (!vo.getConstructionUnitIds().contains(id)) {
|
||||||
|
String enterpriseName = enterpriseIdMap.get(Convert.toLong(id)).getEnterpriseName();
|
||||||
|
List<String> list = useMap.get(enterpriseName);
|
||||||
|
if (list == null) {
|
||||||
|
list = new ArrayList<>();
|
||||||
|
}
|
||||||
|
list.add(unit.getDeviceUnitName());
|
||||||
|
useMap.put(enterpriseName, list);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
StringBuilder errorSb = new StringBuilder("");
|
||||||
|
if (CollUtil.isNotEmpty(useMap)) {
|
||||||
|
for (Map.Entry<String, List<String>> entry : useMap.entrySet()) {
|
||||||
|
if (StrUtil.isNotBlank(errorSb.toString())) {
|
||||||
|
errorSb.append(",");
|
||||||
|
}
|
||||||
|
errorSb.append(entry.getKey());
|
||||||
|
errorSb.append("已被");
|
||||||
|
errorSb.append(StrUtil.join(",", entry.getValue()));
|
||||||
|
errorSb.append("装置绑定");
|
||||||
|
}
|
||||||
|
throw new OpenAlertException("编辑失败," + errorSb.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
package com.zhgd.xmgl.modules.baotou.service.impl;
|
package com.zhgd.xmgl.modules.baotou.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
@ -131,9 +130,11 @@ public class ProjectGroupServiceImpl extends ServiceImpl<ProjectGroupMapper, Pro
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@DistributedLock(keyPrefix = "project_group:", key = "#projectGroup.projectSn", tryLok = true, lockTime = 0)
|
@DistributedLock(keyPrefix = "project_group:", key = "#projectGroup.projectSn", tryLok = true, lockTime = 0)
|
||||||
public void saveObj(ProjectGroup projectGroup) {
|
public void saveObj(ProjectGroup projectGroup) {
|
||||||
|
boolean update = false;
|
||||||
Long id = projectGroup.getId();
|
Long id = projectGroup.getId();
|
||||||
|
List<Long> oldSupervisingUnitIds = new ArrayList<>();
|
||||||
if (id != null) {
|
if (id != null) {
|
||||||
checkBeUsed(projectGroup);
|
update = true;
|
||||||
baseMapper.updateById(projectGroup);
|
baseMapper.updateById(projectGroup);
|
||||||
} else {
|
} else {
|
||||||
baseMapper.insert(projectGroup);
|
baseMapper.insert(projectGroup);
|
||||||
@ -147,33 +148,12 @@ public class ProjectGroupServiceImpl extends ServiceImpl<ProjectGroupMapper, Pro
|
|||||||
projectGroupUnit.setProjectSn(projectGroup.getProjectSn());
|
projectGroupUnit.setProjectSn(projectGroup.getProjectSn());
|
||||||
projectGroupUnitMapper.insert(projectGroupUnit);
|
projectGroupUnitMapper.insert(projectGroupUnit);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void checkBeUsed(ProjectGroup projectGroup) {
|
//编辑项目组检查装置的绑定关系是否满足
|
||||||
List<DeviceUnit> deviceUnits = deviceUnitService.list(new LambdaQueryWrapper<DeviceUnit>()
|
if (update) {
|
||||||
.apply("find_in_set({0},project_group_ids)", projectGroup.getId()));
|
ProjectGroup oldPg = this.getById(id);
|
||||||
List<String> groupIds = deviceUnits.stream().flatMap(deviceUnit -> StrUtil.split(deviceUnit.getProjectGroupIds(), ",").stream()).collect(Collectors.toList());
|
deviceUnitService.checkUnitBeUse(oldPg, projectGroup);
|
||||||
if (CollUtil.isNotEmpty(groupIds)) {
|
|
||||||
List<ProjectGroupUnit> projectGroupUnits = projectGroupUnitMapper.selectList(new LambdaQueryWrapper<ProjectGroupUnit>().in(ProjectGroupUnit::getProjectGroupId, groupIds).ne(ProjectGroupUnit::getProjectGroupId, projectGroup.getId()));
|
|
||||||
projectGroupUnits.addAll(projectGroup.getProjectGroupUnitList());
|
|
||||||
List<String> gConstructionUnitIds = projectGroupUnits.stream().flatMap(projectGroupUnit -> StrUtil.split(projectGroupUnit.getConstructionUnitIds(), ",").stream()).collect(Collectors.toList());
|
|
||||||
List<Long> gEpcContractorIds = projectGroupUnits.stream().map(ProjectGroupUnit::getEpcContractorId).collect(Collectors.toList());
|
|
||||||
for (DeviceUnit u : deviceUnits) {
|
|
||||||
String constructionUnitIds = u.getConstructionUnitIds();
|
|
||||||
String epcContractorIds = u.getEpcContractorIds();
|
|
||||||
// for (String constructionUnitId : StrUtil.split(constructionUnitIds, ",")) {
|
|
||||||
// if (gConstructionUnitIds.stream().noneMatch(constructionUnitId::equals)) {
|
|
||||||
// throw new OpenAlertException("编辑失败,解绑的施工单位已被装置使用!");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// for (String epcContractorId : StrUtil.split(epcContractorIds, ",")) {
|
|
||||||
// if (gEpcContractorIds.stream().noneMatch(s -> epcContractorId.equals(String.valueOf(s)))) {
|
|
||||||
// throw new OpenAlertException("编辑失败,解绑的EPC承包商已被装置使用!");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -107,6 +107,7 @@ public class ExamCourseCommentController {
|
|||||||
UserInfo user = SecurityUtils.getUser();
|
UserInfo user = SecurityUtils.getUser();
|
||||||
examCourseComment.setCreateBy(user.getUserId().toString());
|
examCourseComment.setCreateBy(user.getUserId().toString());
|
||||||
examCourseCommentService.save(examCourseComment);
|
examCourseCommentService.save(examCourseComment);
|
||||||
|
System.out.println();
|
||||||
return Result.success("添加成功!");
|
return Result.success("添加成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,6 +2,8 @@ package com.zhgd.xmgl.modules.exam.controller;
|
|||||||
|
|
||||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||||
import cn.afterturn.easypoi.excel.entity.TemplateExportParams;
|
import cn.afterturn.easypoi.excel.entity.TemplateExportParams;
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.convert.Convert;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
@ -11,6 +13,8 @@ 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.jeecg.common.execption.OpenAlertException;
|
||||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||||
|
import com.zhgd.xmgl.modules.baotou.service.IReturnTrainingApplicationService;
|
||||||
|
import com.zhgd.xmgl.modules.baotou.service.IWorkerAdmissionService;
|
||||||
import com.zhgd.xmgl.modules.exam.entity.ExamAnswerQuestion;
|
import com.zhgd.xmgl.modules.exam.entity.ExamAnswerQuestion;
|
||||||
import com.zhgd.xmgl.modules.exam.entity.ExamTrainRecord;
|
import com.zhgd.xmgl.modules.exam.entity.ExamTrainRecord;
|
||||||
import com.zhgd.xmgl.modules.exam.service.IExamTrainRecordService;
|
import com.zhgd.xmgl.modules.exam.service.IExamTrainRecordService;
|
||||||
@ -27,6 +31,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.apache.commons.collections.MapUtils;
|
import org.apache.commons.collections.MapUtils;
|
||||||
import org.apache.poi.ss.usermodel.Workbook;
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
@ -37,7 +42,6 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.sql.Struct;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
|
||||||
@ -53,8 +57,14 @@ import java.util.*;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@Api(tags = "教育培训记录信息管理")
|
@Api(tags = "教育培训记录信息管理")
|
||||||
public class ExamTrainRecordController {
|
public class ExamTrainRecordController {
|
||||||
|
@Lazy
|
||||||
|
@Autowired
|
||||||
|
IReturnTrainingApplicationService returnTrainingApplicationService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IExamTrainRecordService examTrainRecordService;
|
private IExamTrainRecordService examTrainRecordService;
|
||||||
|
@Lazy
|
||||||
|
@Autowired
|
||||||
|
private IWorkerAdmissionService workerAdmissionService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
@ -145,7 +155,6 @@ public class ExamTrainRecordController {
|
|||||||
return Result.success(list);
|
return Result.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加
|
* 添加
|
||||||
*
|
*
|
||||||
@ -352,7 +361,8 @@ public class ExamTrainRecordController {
|
|||||||
mp.put("idCard", p.getIdCard());
|
mp.put("idCard", p.getIdCard());
|
||||||
mp.put("typeName", p.getTypeName());
|
mp.put("typeName", p.getTypeName());
|
||||||
mp.put("certificateNumber", p.getCertificateNumber());
|
mp.put("certificateNumber", p.getCertificateNumber());
|
||||||
mp.put("issueCompany", p.getIssueCompany());
|
List<String> ic = Arrays.asList("市场监督管理局", "应急管理局", "住房和城乡建设厅", "人力资源和社会保障部(厅)");
|
||||||
|
mp.put("issueCompany", Convert.toInt(p.getIssueCompany()) != null ? CollUtil.get(ic, Convert.toInt(p.getIssueCompany()) - 1) : "");
|
||||||
mp.put("issueTime", p.getIssueTime());
|
mp.put("issueTime", p.getIssueTime());
|
||||||
mp.put("effectTime", p.getEffectTime());
|
mp.put("effectTime", p.getEffectTime());
|
||||||
mp.put("enterpriseName", p.getEnterpriseName());
|
mp.put("enterpriseName", p.getEnterpriseName());
|
||||||
|
|||||||
@ -498,7 +498,7 @@ public class ExamWorkerController {
|
|||||||
map.put("id", o.getId());
|
map.put("id", o.getId());
|
||||||
map.put("time", DateUtil.formatDateTime(o.getApprovalTime()));
|
map.put("time", DateUtil.formatDateTime(o.getApprovalTime()));
|
||||||
map.put("applicationType", 2);
|
map.put("applicationType", 2);
|
||||||
map.put("workerId", null);
|
map.put("workerId", o.getWorkerId());
|
||||||
return map;
|
return map;
|
||||||
}).collect(Collectors.toList()));
|
}).collect(Collectors.toList()));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -168,6 +168,7 @@
|
|||||||
wc.photo_url as photo_url,
|
wc.photo_url as photo_url,
|
||||||
es.name subject_name,
|
es.name subject_name,
|
||||||
p.name exam_paper_name
|
p.name exam_paper_name
|
||||||
|
,ec.exam_paper_id
|
||||||
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
|
||||||
@ -205,6 +206,7 @@
|
|||||||
wc.photo_url as photo_url,
|
wc.photo_url as photo_url,
|
||||||
es.name subject_name,
|
es.name subject_name,
|
||||||
p.name exam_paper_name
|
p.name exam_paper_name
|
||||||
|
,ec.exam_paper_id
|
||||||
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
|
||||||
@ -212,7 +214,7 @@
|
|||||||
left join enterprise_info ei on ei.id=wi.enterprise_id
|
left join enterprise_info ei on ei.id=wi.enterprise_id
|
||||||
left join (select wc1.* from worker_admission_certificate_detail wc1 join (select
|
left join (select wc1.* from worker_admission_certificate_detail wc1 join (select
|
||||||
worker_admission_detail_id,certificate_number from worker_admission_certificate_detail group
|
worker_admission_detail_id,certificate_number from worker_admission_certificate_detail group
|
||||||
by worker_admission_detail_id)t on t.worker_admission_detail_id=wc1.id
|
by worker_admission_detail_id)t on t.worker_admission_detail_id=wc1.worker_admission_detail_id
|
||||||
where 1=1
|
where 1=1
|
||||||
<if test="param.projectSn != null and param.projectSn != ''">
|
<if test="param.projectSn != null and param.projectSn != ''">
|
||||||
and wc1.project_sn = #{param.projectSn}
|
and wc1.project_sn = #{param.projectSn}
|
||||||
|
|||||||
@ -464,7 +464,7 @@ public class ExamTrainRecordServiceImpl extends ServiceImpl<ExamTrainRecordMappe
|
|||||||
trainRecord = new ExamTrainRecordVo();
|
trainRecord = new ExamTrainRecordVo();
|
||||||
this.setQuestionsIf(paper, trainRecord);
|
this.setQuestionsIf(paper, trainRecord);
|
||||||
Long workerId = MapUtils.getLong(param, "workerId");
|
Long workerId = MapUtils.getLong(param, "workerId");
|
||||||
trainRecord.setWorkerId(applicationType == 1 ? workerId : id);
|
trainRecord.setWorkerId(workerId);
|
||||||
trainRecord.setWorkerName(wn);
|
trainRecord.setWorkerName(wn);
|
||||||
trainRecord.setWorkerTeam(teamName);
|
trainRecord.setWorkerTeam(teamName);
|
||||||
trainRecord.setWorkerType(typeName);
|
trainRecord.setWorkerType(typeName);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user