|
|
@@ -17,6 +17,7 @@ import com.huimv.employment.dao.mapper.FeWorkerRegistrationMapper;
|
|
17
|
17
|
import com.huimv.employment.dao.mapper.FeWorkflowDefinitionMapper;
|
|
18
|
18
|
import com.huimv.employment.dao.mapper.FeWorkflowStepMapper;
|
|
19
|
19
|
import com.huimv.employment.service.config.RegistrationQrProperties;
|
|
|
20
|
+import com.huimv.employment.service.conversation.ConversationService;
|
|
20
|
21
|
import com.huimv.employment.service.enterprise.EnterpriseService;
|
|
21
|
22
|
import com.huimv.employment.service.registration.dto.RegistrationBatchDetailResponse;
|
|
22
|
23
|
import com.huimv.employment.service.registration.dto.RegistrationBatchProgressResponse;
|
|
|
@@ -76,6 +77,7 @@ public class RegistrationBatchService {
|
|
76
|
77
|
private final FeWorkflowDefinitionMapper feWorkflowDefinitionMapper;
|
|
77
|
78
|
private final FeWorkflowStepMapper feWorkflowStepMapper;
|
|
78
|
79
|
private final EnterpriseService enterpriseService;
|
|
|
80
|
+ private final ConversationService conversationService;
|
|
79
|
81
|
private final WeChatMiniAppService weChatMiniAppService;
|
|
80
|
82
|
private final RegistrationQrProperties qrProperties;
|
|
81
|
83
|
|
|
|
@@ -86,6 +88,7 @@ public class RegistrationBatchService {
|
|
86
|
88
|
FeWorkflowDefinitionMapper feWorkflowDefinitionMapper,
|
|
87
|
89
|
FeWorkflowStepMapper feWorkflowStepMapper,
|
|
88
|
90
|
EnterpriseService enterpriseService,
|
|
|
91
|
+ ConversationService conversationService,
|
|
89
|
92
|
WeChatMiniAppService weChatMiniAppService,
|
|
90
|
93
|
RegistrationQrProperties qrProperties) {
|
|
91
|
94
|
this.feRegistrationBatchMapper = feRegistrationBatchMapper;
|
|
|
@@ -95,6 +98,7 @@ public class RegistrationBatchService {
|
|
95
|
98
|
this.feWorkflowDefinitionMapper = feWorkflowDefinitionMapper;
|
|
96
|
99
|
this.feWorkflowStepMapper = feWorkflowStepMapper;
|
|
97
|
100
|
this.enterpriseService = enterpriseService;
|
|
|
101
|
+ this.conversationService = conversationService;
|
|
98
|
102
|
this.weChatMiniAppService = weChatMiniAppService;
|
|
99
|
103
|
this.qrProperties = qrProperties;
|
|
100
|
104
|
}
|
|
|
@@ -180,6 +184,35 @@ public class RegistrationBatchService {
|
|
180
|
184
|
return toDetailResponse(batch, order, draft);
|
|
181
|
185
|
}
|
|
182
|
186
|
|
|
|
187
|
+ /**
|
|
|
188
|
+ * 按会话查询其下全部草稿的登记进度详情。
|
|
|
189
|
+ * <p>元素结构与 {@link #getDetailByDraftId} 相同;尚未确认方案、无批次的草稿跳过。</p>
|
|
|
190
|
+ */
|
|
|
191
|
+ public List<RegistrationBatchDetailResponse> listDetailsByConversation(Long userId, Long conversationId) {
|
|
|
192
|
+ conversationService.requireOwned(userId, conversationId);
|
|
|
193
|
+ FeEnterprise enterprise = enterpriseService.findEnterpriseByUserId(userId);
|
|
|
194
|
+ if (enterprise == null) {
|
|
|
195
|
+ throw new BizException(ErrorCode.NOT_FOUND, "企业信息不存在");
|
|
|
196
|
+ }
|
|
|
197
|
+ List<FeEmploymentDraft> drafts = feEmploymentDraftMapper.selectList(
|
|
|
198
|
+ new LambdaQueryWrapper<FeEmploymentDraft>()
|
|
|
199
|
+ .eq(FeEmploymentDraft::getConversationId, conversationId)
|
|
|
200
|
+ .eq(FeEmploymentDraft::getEnterpriseId, enterprise.getId())
|
|
|
201
|
+ .orderByAsc(FeEmploymentDraft::getId));
|
|
|
202
|
+ List<RegistrationBatchDetailResponse> result = new ArrayList<>();
|
|
|
203
|
+ if (drafts == null || drafts.isEmpty()) {
|
|
|
204
|
+ return result;
|
|
|
205
|
+ }
|
|
|
206
|
+ for (FeEmploymentDraft draft : drafts) {
|
|
|
207
|
+ try {
|
|
|
208
|
+ result.add(getDetailByDraftId(userId, draft.getId()));
|
|
|
209
|
+ } catch (BizException ignored) {
|
|
|
210
|
+ // 未确认方案或无批次时跳过
|
|
|
211
|
+ }
|
|
|
212
|
+ }
|
|
|
213
|
+ return result;
|
|
|
214
|
+ }
|
|
|
215
|
+
|
|
183
|
216
|
/**
|
|
184
|
217
|
* 企业端登记进度详情:按批次主键 ID 或业务编号(如 bat_1)。
|
|
185
|
218
|
*/
|
|
|
@@ -215,6 +248,7 @@ public class RegistrationBatchService {
|
|
215
|
248
|
String batchNo = batch.getBatchNo();
|
|
216
|
249
|
|
|
217
|
250
|
RegistrationBatchDetailResponse response = new RegistrationBatchDetailResponse();
|
|
|
251
|
+ response.setDraftId(draft != null ? draft.getId() : order.getDraftId());
|
|
218
|
252
|
response.setBatchId(batch.getId());
|
|
219
|
253
|
response.setBatchNo(batchNo);
|
|
220
|
254
|
response.setTitle(title);
|