Преглед изворни кода

增加与ai大模型对话

wwh пре 6 дана
родитељ
комит
05fd210317

+ 2 - 1
huimv-employment/fe-api/src/main/java/com/huimv/employment/controller/mp/ContractController.java

@@ -62,7 +62,8 @@ public class ContractController {
62 62
 
63 63
     @PostMapping("/{id}/confirm-sign")
64 64
     @Operation(summary = "确认签署完成",
65
-            description = "临时工确认签署(Mock 闭环)。sign_status→signed,登记 contract_signing→completed。已签署幂等返回。",
65
+            description = "临时工确认签署(Mock 闭环)。sign_status→signed,登记 contract_signing→completed。"
66
+                    + "订单不自动开工,须企业调用 POST /orders/{orderId}/start-work。已签署幂等返回。",
66 67
             parameters = {
67 68
                     @Parameter(name = "id", in = ParameterIn.PATH, required = true, description = "fe_contract.id")
68 69
             })

+ 76 - 0
huimv-employment/fe-api/src/main/java/com/huimv/employment/controller/mp/EmploymentOrderController.java

@@ -0,0 +1,76 @@
1
+package com.huimv.employment.controller.mp;
2
+
3
+import com.huimv.employment.common.exception.BizException;
4
+import com.huimv.employment.common.exception.ErrorCode;
5
+import com.huimv.employment.common.web.R;
6
+import com.huimv.employment.security.LoginUser;
7
+import com.huimv.employment.security.LoginUserHolder;
8
+import com.huimv.employment.service.order.EmploymentOrderService;
9
+import com.huimv.employment.service.order.dto.OrderStartWorkRequest;
10
+import com.huimv.employment.service.order.dto.OrderStartWorkResponse;
11
+import io.swagger.v3.oas.annotations.Operation;
12
+import io.swagger.v3.oas.annotations.Parameter;
13
+import io.swagger.v3.oas.annotations.enums.ParameterIn;
14
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
15
+import io.swagger.v3.oas.annotations.tags.Tag;
16
+import org.springframework.web.bind.annotation.GetMapping;
17
+import org.springframework.web.bind.annotation.PathVariable;
18
+import org.springframework.web.bind.annotation.PostMapping;
19
+import org.springframework.web.bind.annotation.RequestBody;
20
+import org.springframework.web.bind.annotation.RequestMapping;
21
+import org.springframework.web.bind.annotation.RestController;
22
+
23
+/**
24
+ * 企业端用工订单:开工确认等。
25
+ */
26
+@RestController
27
+@RequestMapping("/api/v1/mp/orders")
28
+@Tag(name = "用工订单", description = "企业确认开工等")
29
+@SecurityRequirement(name = "Authorization")
30
+public class EmploymentOrderController {
31
+
32
+    private static final String USER_TYPE_ENTERPRISE = "enterprise";
33
+
34
+    private final EmploymentOrderService employmentOrderService;
35
+
36
+    public EmploymentOrderController(EmploymentOrderService employmentOrderService) {
37
+        this.employmentOrderService = employmentOrderService;
38
+    }
39
+
40
+    @GetMapping("/{orderId}/start-work-status")
41
+    @Operation(summary = "查询开工就绪状态",
42
+            description = "返回已签/计划人数、是否齐签、是否缺编、是否可确认开工。待审人数仅提示,不阻挡。",
43
+            parameters = {
44
+                    @Parameter(name = "orderId", in = ParameterIn.PATH, required = true,
45
+                            description = "fe_employment_order.id")
46
+            })
47
+    public R<OrderStartWorkResponse> startWorkStatus(@PathVariable("orderId") Long orderId) {
48
+        requireEnterprise();
49
+        return R.ok(employmentOrderService.getStartWorkStatus(LoginUserHolder.require().getUserId(), orderId));
50
+    }
51
+
52
+    @PostMapping("/{orderId}/start-work")
53
+    @Operation(summary = "确认开工",
54
+            description = "企业确认开工。须已过审工人全部签完;已签人数 &lt; 计划人数时须 allow_understaffed=true。"
55
+                    + "成功后订单 contract_signing→work_started。",
56
+            parameters = {
57
+                    @Parameter(name = "orderId", in = ParameterIn.PATH, required = true,
58
+                            description = "fe_employment_order.id")
59
+            })
60
+    public R<OrderStartWorkResponse> startWork(@PathVariable("orderId") Long orderId,
61
+                                               @RequestBody(required = false) OrderStartWorkRequest request) {
62
+        requireEnterprise();
63
+        if (request == null) {
64
+            request = new OrderStartWorkRequest();
65
+        }
66
+        return R.ok(employmentOrderService.startWork(LoginUserHolder.require().getUserId(), orderId, request));
67
+    }
68
+
69
+    private static LoginUser requireEnterprise() {
70
+        LoginUser loginUser = LoginUserHolder.require();
71
+        if (!USER_TYPE_ENTERPRISE.equals(loginUser.getUserType())) {
72
+            throw new BizException(ErrorCode.ENTERPRISE_ONLY);
73
+        }
74
+        return loginUser;
75
+    }
76
+}

+ 1 - 1
huimv-employment/fe-api/src/main/resources/application.yml

@@ -5,7 +5,7 @@ spring:
5 5
     active: dev
6 6
 
7 7
 server:
8
-  port: 8080
8
+  port: 8081
9 9
 
10 10
 logging:
11 11
   file:

+ 4 - 3
huimv-employment/fe-service/src/main/java/com/huimv/employment/service/contract/ContractService.java

@@ -237,7 +237,8 @@ public class ContractService {
237 237
 
238 238
     /**
239 239
      * 临时工确认签署完成(Mock 电子签闭环;真实电子签可改为回调驱动)。
240
-     * <p>将合同置为 {@code signed},登记 {@code contract_signing → completed}。</p>
240
+     * <p>将合同置为 {@code signed},登记 {@code contract_signing → completed}。
241
+     * 订单不自动开工,须企业调用确认开工接口。</p>
241 242
      */
242 243
     @Transactional(rollbackFor = Exception.class)
243 244
     public ContractItemResponse confirmSign(Long userId, Long contractId) {
@@ -263,8 +264,8 @@ public class ContractService {
263 264
         feContractMapper.updateById(update);
264 265
 
265 266
         markRegistrationCompleted(contract.getRegistrationId(), now);
266
-        log.info("合同签署完成 contractId={} workerId={} registrationId={}",
267
-                contract.getId(), worker.getId(), contract.getRegistrationId());
267
+        log.info("合同签署完成 contractId={} workerId={} registrationId={} orderId={}",
268
+                contract.getId(), worker.getId(), contract.getRegistrationId(), contract.getOrderId());
268 269
         return getMyContract(userId, contractId);
269 270
     }
270 271
 

+ 192 - 2
huimv-employment/fe-service/src/main/java/com/huimv/employment/service/order/EmploymentOrderService.java

@@ -3,39 +3,61 @@ package com.huimv.employment.service.order;
3 3
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
4 4
 import com.huimv.employment.common.exception.BizException;
5 5
 import com.huimv.employment.common.exception.ErrorCode;
6
+import com.huimv.employment.dao.entity.FeContract;
6 7
 import com.huimv.employment.dao.entity.FeEmploymentDraft;
7 8
 import com.huimv.employment.dao.entity.FeEmploymentOrder;
8 9
 import com.huimv.employment.dao.entity.FeEnterprise;
10
+import com.huimv.employment.dao.entity.FeWorkerRegistration;
9 11
 import com.huimv.employment.dao.mapper.FeEmploymentDraftMapper;
10 12
 import com.huimv.employment.dao.mapper.FeEmploymentOrderMapper;
13
+import com.huimv.employment.dao.mapper.FeWorkerRegistrationMapper;
14
+import com.huimv.employment.service.contract.ContractService;
11 15
 import com.huimv.employment.service.conversation.ConversationService;
12 16
 import com.huimv.employment.service.enterprise.EnterpriseService;
13 17
 import com.huimv.employment.service.order.dto.EmploymentOrderItemResponse;
18
+import com.huimv.employment.service.order.dto.OrderStartWorkRequest;
19
+import com.huimv.employment.service.order.dto.OrderStartWorkResponse;
14 20
 import org.springframework.stereotype.Service;
21
+import org.springframework.transaction.annotation.Transactional;
22
+import org.springframework.util.StringUtils;
15 23
 
24
+import java.time.LocalDateTime;
16 25
 import java.util.ArrayList;
17 26
 import java.util.Collections;
18 27
 import java.util.List;
19 28
 
20 29
 /**
21
- * 企业端用工订单查询。
30
+ * 企业端用工订单查询与开工确认
22 31
  */
23 32
 @Service
24 33
 public class EmploymentOrderService {
25 34
 
35
+    private static final String STEP_CONTRACT_SIGNING = "contract_signing";
36
+    private static final String STEP_WORK_STARTED = "work_started";
37
+    private static final String REG_CONTRACT_SIGNING = "contract_signing";
38
+    private static final String REG_COMPLETED = "completed";
39
+    private static final String REG_UNDER_REVIEW = "under_review";
40
+    private static final String SIGN_SIGNED = "signed";
41
+
26 42
     private final FeEmploymentOrderMapper feEmploymentOrderMapper;
27 43
     private final FeEmploymentDraftMapper feEmploymentDraftMapper;
44
+    private final FeWorkerRegistrationMapper feWorkerRegistrationMapper;
28 45
     private final ConversationService conversationService;
29 46
     private final EnterpriseService enterpriseService;
47
+    private final ContractService contractService;
30 48
 
31 49
     public EmploymentOrderService(FeEmploymentOrderMapper feEmploymentOrderMapper,
32 50
                                   FeEmploymentDraftMapper feEmploymentDraftMapper,
51
+                                  FeWorkerRegistrationMapper feWorkerRegistrationMapper,
33 52
                                   ConversationService conversationService,
34
-                                  EnterpriseService enterpriseService) {
53
+                                  EnterpriseService enterpriseService,
54
+                                  ContractService contractService) {
35 55
         this.feEmploymentOrderMapper = feEmploymentOrderMapper;
36 56
         this.feEmploymentDraftMapper = feEmploymentDraftMapper;
57
+        this.feWorkerRegistrationMapper = feWorkerRegistrationMapper;
37 58
         this.conversationService = conversationService;
38 59
         this.enterpriseService = enterpriseService;
60
+        this.contractService = contractService;
39 61
     }
40 62
 
41 63
     /**
@@ -85,6 +107,174 @@ public class EmploymentOrderService {
85 107
         return result;
86 108
     }
87 109
 
110
+    /**
111
+     * 查询开工就绪状态(人数提示、是否齐签、是否可开工)。
112
+     */
113
+    public OrderStartWorkResponse getStartWorkStatus(Long userId, Long orderId) {
114
+        FeEmploymentOrder order = requireOwnedOrder(userId, orderId);
115
+        return buildStartWorkStatus(order, false);
116
+    }
117
+
118
+    /**
119
+     * 企业确认开工:要求已过审工人全部签完;缺编须 {@code allow_understaffed=true}。
120
+     * <p>订单 {@code contract_signing → work_started}。</p>
121
+     */
122
+    @Transactional(rollbackFor = Exception.class)
123
+    public OrderStartWorkResponse startWork(Long userId, Long orderId, OrderStartWorkRequest request) {
124
+        FeEmploymentOrder order = requireOwnedOrder(userId, orderId);
125
+        OrderStartWorkResponse status = buildStartWorkStatus(order, true);
126
+        if (STEP_WORK_STARTED.equals(order.getCurrentStepCode())
127
+                || isStepAfter(order.getCurrentStepCode(), STEP_WORK_STARTED)) {
128
+            status.setMessage("订单已进入开工阶段");
129
+            return status;
130
+        }
131
+        if (!STEP_CONTRACT_SIGNING.equals(order.getCurrentStepCode())) {
132
+            throw new BizException(ErrorCode.BAD_REQUEST,
133
+                    "当前步骤不可开工:" + (order.getCurrentStepCode() == null ? "未知" : order.getCurrentStepCode()));
134
+        }
135
+        if (status.getApprovedCount() == null || status.getApprovedCount() <= 0) {
136
+            throw new BizException(ErrorCode.BAD_REQUEST, "尚无已过审工人,无法开工");
137
+        }
138
+        if (!Boolean.TRUE.equals(status.getAllApprovedSigned())) {
139
+            throw new BizException(ErrorCode.BAD_REQUEST,
140
+                    "尚有已过审工人未完成签署(已签 " + status.getSignedCount()
141
+                            + "/" + status.getApprovedCount() + ")");
142
+        }
143
+        boolean allowUnderstaffed = request != null && request.isAllowUnderstaffed();
144
+        if (Boolean.TRUE.equals(status.getUnderstaffed()) && !allowUnderstaffed) {
145
+            throw new BizException(ErrorCode.BAD_REQUEST,
146
+                    "已签署 " + status.getSignedCount() + " 人,计划 "
147
+                            + status.getPlannedCount() + " 人,未招满。"
148
+                            + "确认缺编开工请传 allow_understaffed=true");
149
+        }
150
+
151
+        LocalDateTime now = LocalDateTime.now();
152
+        FeEmploymentOrder update = new FeEmploymentOrder();
153
+        update.setId(order.getId());
154
+        update.setCurrentStepCode(STEP_WORK_STARTED);
155
+        update.setUpdateTime(now);
156
+        feEmploymentOrderMapper.updateById(update);
157
+        order.setCurrentStepCode(STEP_WORK_STARTED);
158
+
159
+        OrderStartWorkResponse result = buildStartWorkStatus(order, true);
160
+        result.setMessage(Boolean.TRUE.equals(status.getUnderstaffed())
161
+                ? "已确认缺编开工"
162
+                : "已确认开工");
163
+        return result;
164
+    }
165
+
166
+    private FeEmploymentOrder requireOwnedOrder(Long userId, Long orderId) {
167
+        enterpriseService.requireEnterpriseUser(userId);
168
+        FeEnterprise enterprise = enterpriseService.findEnterpriseByUserId(userId);
169
+        if (enterprise == null) {
170
+            throw new BizException(ErrorCode.BAD_REQUEST, "请先完成企业登记");
171
+        }
172
+        if (orderId == null) {
173
+            throw new BizException(ErrorCode.BAD_REQUEST, "订单 ID 无效");
174
+        }
175
+        FeEmploymentOrder order = feEmploymentOrderMapper.selectById(orderId);
176
+        if (order == null) {
177
+            throw new BizException(ErrorCode.NOT_FOUND, "用工订单不存在");
178
+        }
179
+        if (order.getEnterpriseId() == null || !order.getEnterpriseId().equals(enterprise.getId())) {
180
+            throw new BizException(ErrorCode.FORBIDDEN, "无权操作该订单");
181
+        }
182
+        return order;
183
+    }
184
+
185
+    private OrderStartWorkResponse buildStartWorkStatus(FeEmploymentOrder order, boolean forStartAction) {
186
+        Long orderId = order.getId();
187
+        int planned = order.getWorkerCount() != null && order.getWorkerCount() > 0
188
+                ? order.getWorkerCount() : 0;
189
+
190
+        List<FeWorkerRegistration> regs = feWorkerRegistrationMapper.selectList(
191
+                new LambdaQueryWrapper<FeWorkerRegistration>()
192
+                        .eq(FeWorkerRegistration::getOrderId, orderId));
193
+        if (regs == null) {
194
+            regs = Collections.emptyList();
195
+        }
196
+
197
+        int approved = 0;
198
+        int signed = 0;
199
+        int pendingSign = 0;
200
+        int underReview = 0;
201
+        for (FeWorkerRegistration reg : regs) {
202
+            String st = reg.getRegStatus();
203
+            if (REG_UNDER_REVIEW.equals(st)) {
204
+                underReview++;
205
+                continue;
206
+            }
207
+            if (!REG_CONTRACT_SIGNING.equals(st) && !REG_COMPLETED.equals(st)) {
208
+                continue;
209
+            }
210
+            approved++;
211
+            FeContract contract = contractService.findActiveByRegistrationId(reg.getId());
212
+            if (contract != null && SIGN_SIGNED.equals(contract.getSignStatus())) {
213
+                signed++;
214
+            } else {
215
+                pendingSign++;
216
+            }
217
+        }
218
+
219
+        boolean allApprovedSigned = approved > 0 && pendingSign == 0;
220
+        boolean understaffed = planned > 0 && signed < planned;
221
+        boolean atSigning = STEP_CONTRACT_SIGNING.equals(order.getCurrentStepCode());
222
+        boolean canStart = atSigning && allApprovedSigned;
223
+
224
+        OrderStartWorkResponse response = new OrderStartWorkResponse();
225
+        response.setOrderId(orderId);
226
+        response.setOrderNo(order.getOrderNo());
227
+        response.setCurrentStepCode(order.getCurrentStepCode());
228
+        response.setPlannedCount(planned);
229
+        response.setApprovedCount(approved);
230
+        response.setSignedCount(signed);
231
+        response.setPendingSignCount(pendingSign);
232
+        response.setUnderReviewCount(underReview);
233
+        response.setAllApprovedSigned(allApprovedSigned);
234
+        response.setUnderstaffed(understaffed);
235
+        response.setCanStartWork(canStart);
236
+
237
+        if (STEP_WORK_STARTED.equals(order.getCurrentStepCode())
238
+                || isStepAfter(order.getCurrentStepCode(), STEP_WORK_STARTED)) {
239
+            response.setMessage("订单已进入开工阶段");
240
+        } else if (!atSigning) {
241
+            response.setMessage("订单尚未进入签约阶段");
242
+        } else if (approved == 0) {
243
+            response.setMessage("尚无已过审工人");
244
+        } else if (!allApprovedSigned) {
245
+            response.setMessage("已签 " + signed + "/" + approved + ",待签 " + pendingSign + " 人");
246
+        } else if (understaffed) {
247
+            response.setMessage("已齐签,但未招满(已签 " + signed + "/" + planned
248
+                    + ")。缺编开工须传 allow_understaffed=true"
249
+                    + (underReview > 0 ? ";另有 " + underReview + " 人待审" : ""));
250
+        } else {
251
+            response.setMessage(forStartAction ? "可确认开工" : "已齐签且人数达标,可确认开工"
252
+                    + (underReview > 0 ? "(另有 " + underReview + " 人待审,不阻挡开工)" : ""));
253
+        }
254
+        return response;
255
+    }
256
+
257
+    private static boolean isStepAfter(String current, String target) {
258
+        if (!StringUtils.hasText(current) || !StringUtils.hasText(target)) {
259
+            return false;
260
+        }
261
+        String[] steps = {
262
+                "draft_created", "plan_confirmed", "registration", "enterprise_audit",
263
+                "contract_signing", "work_started", "settlement_pending", "settlement_paid", "completed"
264
+        };
265
+        int curIdx = -1;
266
+        int targetIdx = -1;
267
+        for (int i = 0; i < steps.length; i++) {
268
+            if (steps[i].equals(current)) {
269
+                curIdx = i;
270
+            }
271
+            if (steps[i].equals(target)) {
272
+                targetIdx = i;
273
+            }
274
+        }
275
+        return curIdx >= 0 && targetIdx >= 0 && curIdx > targetIdx;
276
+    }
277
+
88 278
     private static EmploymentOrderItemResponse toItem(FeEmploymentOrder order) {
89 279
         EmploymentOrderItemResponse item = new EmploymentOrderItemResponse();
90 280
         item.setDraftId(order.getDraftId());

+ 26 - 0
huimv-employment/fe-service/src/main/java/com/huimv/employment/service/order/dto/OrderStartWorkRequest.java

@@ -0,0 +1,26 @@
1
+package com.huimv.employment.service.order.dto;
2
+
3
+import com.fasterxml.jackson.annotation.JsonAlias;
4
+import com.fasterxml.jackson.annotation.JsonProperty;
5
+import io.swagger.v3.oas.annotations.media.Schema;
6
+
7
+@Schema(description = "企业确认开工请求")
8
+public class OrderStartWorkRequest {
9
+
10
+    @JsonProperty("allow_understaffed")
11
+    @JsonAlias({"allowUnderstaffed"})
12
+    @Schema(description = "已签人数少于计划人数时,是否仍确认缺编开工;默认 false")
13
+    private Boolean allowUnderstaffed;
14
+
15
+    public Boolean getAllowUnderstaffed() {
16
+        return allowUnderstaffed;
17
+    }
18
+
19
+    public void setAllowUnderstaffed(Boolean allowUnderstaffed) {
20
+        this.allowUnderstaffed = allowUnderstaffed;
21
+    }
22
+
23
+    public boolean isAllowUnderstaffed() {
24
+        return Boolean.TRUE.equals(allowUnderstaffed);
25
+    }
26
+}

+ 146 - 0
huimv-employment/fe-service/src/main/java/com/huimv/employment/service/order/dto/OrderStartWorkResponse.java

@@ -0,0 +1,146 @@
1
+package com.huimv.employment.service.order.dto;
2
+
3
+import com.fasterxml.jackson.annotation.JsonProperty;
4
+import io.swagger.v3.oas.annotations.media.Schema;
5
+
6
+@Schema(description = "订单签约/开工就绪状态")
7
+public class OrderStartWorkResponse {
8
+
9
+    @JsonProperty("order_id")
10
+    private Long orderId;
11
+
12
+    @JsonProperty("order_no")
13
+    private String orderNo;
14
+
15
+    @JsonProperty("current_step_code")
16
+    private String currentStepCode;
17
+
18
+    @Schema(description = "计划人数")
19
+    @JsonProperty("planned_count")
20
+    private Integer plannedCount;
21
+
22
+    @Schema(description = "已过审人数(待签+已签)")
23
+    @JsonProperty("approved_count")
24
+    private Integer approvedCount;
25
+
26
+    @Schema(description = "已签署完成人数")
27
+    @JsonProperty("signed_count")
28
+    private Integer signedCount;
29
+
30
+    @Schema(description = "已过审但仍待签人数")
31
+    @JsonProperty("pending_sign_count")
32
+    private Integer pendingSignCount;
33
+
34
+    @Schema(description = "待企业审核人数(提示用,不挡开工)")
35
+    @JsonProperty("under_review_count")
36
+    private Integer underReviewCount;
37
+
38
+    @Schema(description = "已过审工人是否全部签完")
39
+    @JsonProperty("all_approved_signed")
40
+    private Boolean allApprovedSigned;
41
+
42
+    @Schema(description = "已签人数是否少于计划人数")
43
+    private Boolean understaffed;
44
+
45
+    @Schema(description = "是否可确认开工(齐签且步骤为 contract_signing)")
46
+    @JsonProperty("can_start_work")
47
+    private Boolean canStartWork;
48
+
49
+    private String message;
50
+
51
+    public Long getOrderId() {
52
+        return orderId;
53
+    }
54
+
55
+    public void setOrderId(Long orderId) {
56
+        this.orderId = orderId;
57
+    }
58
+
59
+    public String getOrderNo() {
60
+        return orderNo;
61
+    }
62
+
63
+    public void setOrderNo(String orderNo) {
64
+        this.orderNo = orderNo;
65
+    }
66
+
67
+    public String getCurrentStepCode() {
68
+        return currentStepCode;
69
+    }
70
+
71
+    public void setCurrentStepCode(String currentStepCode) {
72
+        this.currentStepCode = currentStepCode;
73
+    }
74
+
75
+    public Integer getPlannedCount() {
76
+        return plannedCount;
77
+    }
78
+
79
+    public void setPlannedCount(Integer plannedCount) {
80
+        this.plannedCount = plannedCount;
81
+    }
82
+
83
+    public Integer getApprovedCount() {
84
+        return approvedCount;
85
+    }
86
+
87
+    public void setApprovedCount(Integer approvedCount) {
88
+        this.approvedCount = approvedCount;
89
+    }
90
+
91
+    public Integer getSignedCount() {
92
+        return signedCount;
93
+    }
94
+
95
+    public void setSignedCount(Integer signedCount) {
96
+        this.signedCount = signedCount;
97
+    }
98
+
99
+    public Integer getPendingSignCount() {
100
+        return pendingSignCount;
101
+    }
102
+
103
+    public void setPendingSignCount(Integer pendingSignCount) {
104
+        this.pendingSignCount = pendingSignCount;
105
+    }
106
+
107
+    public Integer getUnderReviewCount() {
108
+        return underReviewCount;
109
+    }
110
+
111
+    public void setUnderReviewCount(Integer underReviewCount) {
112
+        this.underReviewCount = underReviewCount;
113
+    }
114
+
115
+    public Boolean getAllApprovedSigned() {
116
+        return allApprovedSigned;
117
+    }
118
+
119
+    public void setAllApprovedSigned(Boolean allApprovedSigned) {
120
+        this.allApprovedSigned = allApprovedSigned;
121
+    }
122
+
123
+    public Boolean getUnderstaffed() {
124
+        return understaffed;
125
+    }
126
+
127
+    public void setUnderstaffed(Boolean understaffed) {
128
+        this.understaffed = understaffed;
129
+    }
130
+
131
+    public Boolean getCanStartWork() {
132
+        return canStartWork;
133
+    }
134
+
135
+    public void setCanStartWork(Boolean canStartWork) {
136
+        this.canStartWork = canStartWork;
137
+    }
138
+
139
+    public String getMessage() {
140
+        return message;
141
+    }
142
+
143
+    public void setMessage(String message) {
144
+        this.message = message;
145
+    }
146
+}