培训登记优化

This commit is contained in:
苏竹红
2024-06-21 17:16:36 +08:00
parent 788c968289
commit 50ae1f4ce4
9 changed files with 42 additions and 17 deletions

View File

@@ -17,7 +17,6 @@ public enum ShopSubStageEnum {
SHOP_STAGE_2(ShopStageEnum.SHOP_STAGE_1, 20, "上传租赁合同", 14),
SHOP_STAGE_4(ShopStageEnum.SHOP_STAGE_2, 40, "证照办理", 24),
SHOP_STAGE_5(ShopStageEnum.SHOP_STAGE_2, 50, "员工招聘", 23),
SHOP_STAGE_6(ShopStageEnum.SHOP_STAGE_2, 60, "加盟商/员工培训", 30),
SHOP_STAGE_7(ShopStageEnum.SHOP_STAGE_2, 70, "缴纳加盟费/保证金", 1),
SHOP_STAGE_8(ShopStageEnum.SHOP_STAGE_2, 80, "加盟合同签约", 4),
SHOP_STAGE_9(ShopStageEnum.SHOP_STAGE_2, 90, "设计阶段", 21),
@@ -88,7 +87,6 @@ public enum ShopSubStageEnum {
return ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_70;
case SHOP_STAGE_2:
case SHOP_STAGE_4:
case SHOP_STAGE_6:
case SHOP_STAGE_8:
case SHOP_STAGE_9:
case SHOP_STAGE_11:
@@ -112,7 +110,6 @@ public enum ShopSubStageEnum {
case SHOP_STAGE_1:
case SHOP_STAGE_2:
case SHOP_STAGE_5:
case SHOP_STAGE_6:
case SHOP_STAGE_7:
case SHOP_STAGE_8:
return planCompleteTime.plusDays(getPlanCompleteDays()).toString();

View File

@@ -35,10 +35,6 @@ public enum ShopSubStageStatusEnum {
SHOP_SUB_STAGE_STATUS_50(ShopSubStageEnum.SHOP_STAGE_5, 500, "登记中", Boolean.FALSE),
SHOP_SUB_STAGE_STATUS_51(ShopSubStageEnum.SHOP_STAGE_5, 510, "已完成", Boolean.TRUE),
//加盟商/员工培训
SHOP_SUB_STAGE_STATUS_60(ShopSubStageEnum.SHOP_STAGE_6, 600, "培训中", Boolean.FALSE),
SHOP_SUB_STAGE_STATUS_61(ShopSubStageEnum.SHOP_STAGE_6, 610, "已完成", Boolean.TRUE),
//缴纳加盟费/保证金
SHOP_SUB_STAGE_STATUS_70(ShopSubStageEnum.SHOP_STAGE_7, 700, "待发布账单", Boolean.FALSE),
SHOP_SUB_STAGE_STATUS_71(ShopSubStageEnum.SHOP_STAGE_7, 710, "待缴费", Boolean.FALSE),

View File

@@ -26,5 +26,7 @@
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="deleted" jdbcType="BIT" property="deleted" />
<result column="train_time" jdbcType="TIMESTAMP" property="trainTime" />
<result column="completion_certificate" jdbcType="VARCHAR" property="completionCertificate" />
</resultMap>
</mapper>

View File

@@ -1,5 +1,6 @@
package com.cool.store.entity;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -126,4 +127,9 @@ public class TempUserDetailDO {
* 是否删除0.否 1.是
*/
private Boolean deleted;
@Column(name = "train_time")
private Date trainTime;
@Column(name = "completion_certificate")
private String completionCertificate;
}

View File

@@ -54,4 +54,10 @@ public class TempUserDetailRequest {
@ApiModelProperty("登记时间")
private Date registerTime;
@ApiModelProperty("培训时间")
private Date trainTime;
@ApiModelProperty("结业证书")
private String completionCertificate;
}

View File

@@ -114,4 +114,10 @@ public class TempUserDetailInfoVO {
@ApiModelProperty("来源create-创建 sync-钉钉同步")
private String source;
@ApiModelProperty("培训时间")
private Date trainTime;
@ApiModelProperty("结业证书")
private String completionCertificate;
}

View File

@@ -614,12 +614,12 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
// 培训全部结束
//登记人员,培训状态由未开始到培训中
ShopStageInfoDO shopStageInfoDO = shopStageInfoDAO.getShopSubStageInfo(tempUserDetailDO.getShopId(), ShopSubStageEnum.SHOP_STAGE_6);
if(shopStageInfoDO != null && shopStageInfoDO.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_60.getShopSubStageStatus())){
shopStageInfoDAO.updateShopStageInfo(tempUserDetailDO.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_61);
//状态结束
preparationService.whetherToOpenForAcceptance(tempUserDetailDO.getShopId());
}
// ShopStageInfoDO shopStageInfoDO = shopStageInfoDAO.getShopSubStageInfo(tempUserDetailDO.getShopId(), ShopSubStageEnum.SHOP_STAGE_6);
// if(shopStageInfoDO != null && shopStageInfoDO.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_60.getShopSubStageStatus())){
// shopStageInfoDAO.updateShopStageInfo(tempUserDetailDO.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_61);
// //状态结束
// preparationService.whetherToOpenForAcceptance(tempUserDetailDO.getShopId());
// }
Map<String, String> messageMap = new HashMap<>();
messageMap.put("storeName", shopInfoDO.getShopName());

View File

@@ -120,15 +120,17 @@ public class TempUserDetailServiceImpl implements TempUserDetailService {
tempUserDetailDO.setIdCardPositiveUrl(tempUserDetailRequest.getIdNumPhoto());
tempUserDetailDO.setHealthCertificateUrl(tempUserDetailRequest.getHealthCertificate());
tempUserDetailDO.setRegisterTime(tempUserDetailRequest.getRegisterTime());
tempUserDetailDO.setTrainTime(tempUserDetailRequest.getTrainTime());
tempUserDetailDO.setCompletionCertificate(tempUserDetailRequest.getCompletionCertificate());
tempUserDetailDO.setSubmitTime(new Date());
tempUserDetailDO.setSource("create");
tempUserDetailDAO.insertSelective(tempUserDetailDO);
//登记人员,培训状态由未开始到培训中
ShopStageInfoDO shopStageInfoDO = shopStageInfoDAO.getShopSubStageInfo(tempUserDetailDO.getShopId(), ShopSubStageEnum.SHOP_STAGE_6);
if(shopStageInfoDO != null && shopStageInfoDO.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus())){
shopStageInfoDAO.updateShopStageInfo(tempUserDetailDO.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_60);
}
// ShopStageInfoDO shopStageInfoDO = shopStageInfoDAO.getShopSubStageInfo(tempUserDetailDO.getShopId(), ShopSubStageEnum.SHOP_STAGE_6);
// if(shopStageInfoDO != null && shopStageInfoDO.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus())){
// shopStageInfoDAO.updateShopStageInfo(tempUserDetailDO.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_60);
// }
// List<String> userIdList = enterpriseUserRoleDao.getUserIdsByRoleIdList(Collections.singletonList(UserRoleEnum.TRAINER.getCode()));
// RegionDO regionDO = regionDao.getRegionById(shopInfoDO.getRegionId());
@@ -164,6 +166,8 @@ public class TempUserDetailServiceImpl implements TempUserDetailService {
tempUserDetailInfoVO.setIdCardPositiveUrl(tempUserDetailDO.getIdCardPositiveUrl());
tempUserDetailInfoVO.setHealthCertificateUrl(tempUserDetailDO.getHealthCertificateUrl());
tempUserDetailInfoVO.setRegisterTime(tempUserDetailDO.getRegisterTime());
tempUserDetailInfoVO.setTrainTime(tempUserDetailDO.getTrainTime());
tempUserDetailInfoVO.setCompletionCertificate(tempUserDetailDO.getCompletionCertificate());
return tempUserDetailInfoVO;
}

View File

@@ -3,6 +3,7 @@ package com.cool.store.controller.webb;
import com.cool.store.dto.ehr.StaffBaseInfoDTO;
import com.cool.store.request.IdRequest;
import com.cool.store.request.ShopIdRequest;
import com.cool.store.request.TempUserDetailRequest;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.TempUserDetailService;
import com.cool.store.vo.TempUserDetailInfoVO;
@@ -46,6 +47,13 @@ public class PCTempUserDetailController {
return ResponseResult.success(tempUserDetailService.getUserInfoByIdCard((idCard)));
}
@PostMapping(path = "/addTempUserDetail")
@ApiOperation("培训登记-确认登记")
public ResponseResult<Boolean> addTempUserDetail(@RequestBody TempUserDetailRequest tempUserDetailRequest) {
tempUserDetailService.addTempUserDetail((tempUserDetailRequest));
return ResponseResult.success(Boolean.TRUE);
}
@GetMapping(path = "/getUserInfoByIdUserDetailId")
@ApiImplicitParams({