特殊技能认证
This commit is contained in:
parent
cf2c3dcd29
commit
44e158d570
|
|
@ -12,11 +12,14 @@ import com.ghy.common.utils.ExceptionUtil;
|
|||
import com.ghy.common.utils.ObjectUtils;
|
||||
import com.ghy.common.utils.StringUtils;
|
||||
import com.ghy.common.utils.poi.ExcelUtil;
|
||||
import com.ghy.goods.domain.DeptGoodsCategory;
|
||||
import com.ghy.goods.service.DeptGoodsCategoryService;
|
||||
import com.ghy.system.domain.SysArea;
|
||||
import com.ghy.system.service.ISysAreaService;
|
||||
import com.ghy.worker.domain.Worker;
|
||||
import com.ghy.worker.domain.WorkerBank;
|
||||
import com.ghy.worker.domain.WorkerCertification;
|
||||
import com.ghy.worker.domain.WorkerSpecialSkill;
|
||||
import com.ghy.worker.service.IWorkerCertificationService;
|
||||
import com.ghy.worker.service.WorkerBankService;
|
||||
import com.ghy.worker.service.WorkerService;
|
||||
|
|
@ -59,6 +62,9 @@ public class WorkerCertificationController extends BaseController
|
|||
@Autowired
|
||||
private WorkerService workerService;
|
||||
|
||||
@Autowired
|
||||
private DeptGoodsCategoryService deptGoodsCategoryService;
|
||||
|
||||
@RequiresPermissions("worker:certification:view")
|
||||
@GetMapping()
|
||||
public String certification()
|
||||
|
|
@ -167,9 +173,7 @@ public class WorkerCertificationController extends BaseController
|
|||
int insertRows = workerCertificationService.insertWorkerCertification(request);
|
||||
Assert.isTrue(insertRows == 1, "实名认证记录新增失败");
|
||||
// 入驻特殊技能信息持久化
|
||||
if (!CollectionUtils.isEmpty(request.getSpecialSkills())) {
|
||||
workerSpecialSkillService.updateWorkerSpecialSkill(request.getWorkerId(), request.getSpecialSkills());
|
||||
}
|
||||
workerSpecialSkillService.updateWorkerSpecialSkill(request.getWorkerId(), request.getSpecialSkills());
|
||||
return AjaxResult.success("保存成功");
|
||||
}
|
||||
|
||||
|
|
@ -179,7 +183,22 @@ public class WorkerCertificationController extends BaseController
|
|||
try {
|
||||
WorkerCertification workerCertification = workerCertificationService.selectByWorkerId(request.getWorkerId());
|
||||
if (workerCertification != null) {
|
||||
workerCertification.setSpecialSkills(workerSpecialSkillService.getByWorker(request.getWorkerId()));
|
||||
List<WorkerSpecialSkill> byWorker = workerSpecialSkillService.getByWorker(request.getWorkerId());
|
||||
byWorker.forEach(workerSpecialSkill -> {
|
||||
DeptGoodsCategory three = deptGoodsCategoryService.selectOneByGoodsCategoryId(workerSpecialSkill.getSpecialSkillId());
|
||||
if(three != null){
|
||||
workerSpecialSkill.setThreeDeptGoodsCategory(three);
|
||||
DeptGoodsCategory two = deptGoodsCategoryService.selectOneByGoodsCategoryId(three.getParentCategoryId());
|
||||
if(two != null){
|
||||
workerSpecialSkill.setTwoDeptGoodsCategory(two);
|
||||
DeptGoodsCategory first = deptGoodsCategoryService.selectOneByGoodsCategoryId(two.getParentCategoryId());
|
||||
if(first != null){
|
||||
workerSpecialSkill.setFirstDeptGoodsCategory(first);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
workerCertification.setSpecialSkills(byWorker);
|
||||
if (workerCertification.getCompanyCountryId() != null) {
|
||||
SysArea sysArea = sysAreaService.selectById(workerCertification.getCompanyCountryId());
|
||||
workerCertification.setMergerName(sysArea.getMergerName());
|
||||
|
|
|
|||
|
|
@ -61,6 +61,9 @@
|
|||
<if test="type != null ">
|
||||
and gc.type = #{type}
|
||||
</if>
|
||||
<if test="deptGoodsCategoryId != null">
|
||||
and dgc.dept_goods_category_id = #{deptGoodsCategoryId}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
|
@ -165,8 +168,8 @@
|
|||
</select>
|
||||
|
||||
<select id="selectOneByGoodsCategoryId" resultMap="DeptGoodsCategoryResult">
|
||||
<include refid="selectDeptGoodsCategory"/>
|
||||
WHERE goods_category_id = #{goodsCategoryId} LIMIT 1
|
||||
<include refid="selectJoin"/>
|
||||
WHERE gc.goods_category_id = #{goodsCategoryId} LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="selectByDeptId" resultMap="DeptGoodsCategoryResult">
|
||||
|
|
|
|||
|
|
@ -17,6 +17,16 @@ public class WorkerCertification extends BaseEntity
|
|||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long deptId;
|
||||
|
||||
public Long getDeptId() {
|
||||
return deptId;
|
||||
}
|
||||
|
||||
public void setDeptId(Long deptId) {
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
/** 主键id */
|
||||
private String workerCertificationId;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.ghy.worker.domain;
|
|||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ghy.common.core.domain.BaseEntity;
|
||||
import com.ghy.goods.domain.DeptGoodsCategory;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
|
@ -49,4 +50,11 @@ public class WorkerSpecialSkill extends BaseEntity {
|
|||
private String specialSkillName;
|
||||
|
||||
private String dangerous;
|
||||
|
||||
private DeptGoodsCategory firstDeptGoodsCategory;
|
||||
|
||||
private DeptGoodsCategory twoDeptGoodsCategory;
|
||||
|
||||
private DeptGoodsCategory threeDeptGoodsCategory;
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue