|
@@ -14,8 +14,10 @@ import com.gree.mall.manager.logic.common.CommonLogic;
|
|
|
import com.gree.mall.manager.plus.entity.User;
|
|
|
import com.gree.mall.manager.plus.entity.WebsitUser;
|
|
|
import com.gree.mall.manager.plus.entity.WorkerTeam;
|
|
|
+import com.gree.mall.manager.plus.entity.WorkerTeamApply;
|
|
|
import com.gree.mall.manager.plus.service.UserService;
|
|
|
import com.gree.mall.manager.plus.service.WebsitUserService;
|
|
|
+import com.gree.mall.manager.plus.service.WorkerTeamApplyService;
|
|
|
import com.gree.mall.manager.plus.service.WorkerTeamService;
|
|
|
import com.gree.mall.manager.utils.CommonUtils;
|
|
|
import com.gree.mall.manager.utils.excel.ExcelUtils;
|
|
@@ -42,6 +44,7 @@ public class WorkerTeamLogic {
|
|
|
private final WorkerTeamService workerTeamService;
|
|
|
private final WebsitUserService websitUserService;
|
|
|
private final UserService userService;
|
|
|
+ private final WorkerTeamApplyService workerTeamApplyService;
|
|
|
|
|
|
public IPage<WorkerTeamVO> list(ZfireParamBean zfireParamBean) {
|
|
|
AdminUserCom adminUser = commonLogic.getAdminUser();
|
|
@@ -96,7 +99,17 @@ public class WorkerTeamLogic {
|
|
|
.ne(StringUtils.isNotBlank(workerTeam.getId()), WorkerTeam::getId, workerTeam.getId())
|
|
|
.count();
|
|
|
if (count > 0) {
|
|
|
- throw new RemoteServiceException(workerTeam.getWebsitId() + "已存在一组同样师傅的记录" + workerTeam.getAssistantWorkerId() + "," + workerTeam.getAssistantWorkerId());
|
|
|
+ throw new RemoteServiceException(workerTeam.getWebsitId() + "已存在一组同样师傅的记录" + workerTeam.getMasterWorkerId() + "," + workerTeam.getAssistantWorkerId());
|
|
|
+ }
|
|
|
+
|
|
|
+ final Integer count1 = workerTeamApplyService.lambdaQuery()
|
|
|
+ .eq(WorkerTeamApply::getCompanyWechatId, workerTeam.getCompanyWechatId())
|
|
|
+ .eq(WorkerTeamApply::getStatus, ExamineStatusEnum.WAIT.getKey())
|
|
|
+ .eq(WorkerTeamApply::getMasterWorkerId, workerTeam.getMasterWorkerId())
|
|
|
+ .eq(WorkerTeamApply::getAssistantWorkerId, workerTeam.getAssistantWorkerId())
|
|
|
+ .count();
|
|
|
+ if (count1 > 0) {
|
|
|
+ throw new RemoteServiceException(workerTeam.getWebsitId() + "已存在一组同样师傅的待师傅确认的申请记录" + workerTeam.getMasterWorkerId() + "," + workerTeam.getAssistantWorkerId());
|
|
|
}
|
|
|
}
|
|
|
|