Browse Source

Merge remote-tracking branch 'origin/dev_ic_mp' into develop

master
yinzuomei 4 years ago
parent
commit
d237d8b140
  1. 5
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActDraftController.java
  2. 3
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java

5
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActDraftController.java

@ -1,5 +1,7 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.work.*;
@ -82,8 +84,9 @@ public class WorkActDraftController {
* @Date 2020/7/21 17:24
**/
@PostMapping("preview")
public Result<ActPreviewResultDTO> previewActDetail(@RequestBody ActPreviewFormDTO formDTO){
public Result<ActPreviewResultDTO> previewActDetail(@LoginUser TokenDto tokenDto, @RequestBody ActPreviewFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO,ActPreviewFormDTO.UserInternalGroup.class);
formDTO.setCustomerId(tokenDto.getCustomerId());
ActPreviewResultDTO resultDTO=workActDraftService.previewActDetail(formDTO);
return new Result<ActPreviewResultDTO>().ok(resultDTO);
}

3
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java

@ -373,6 +373,9 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
//待处理+已派单才可以指派
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), String.format("需求当前状态为【%s】,不可指派",entity.getStatus()),"当前状态,不可指派");
}
if (UserDemandConstant.VOLUNTEER.equals(formDTO.getServiceType()) && formDTO.getServerId().equals(entity.getDemandUserId())) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), String.format("居民端用户上报的需求【%s】,需求人与服务方(志愿者)不能同为一人", entity.getId()), "需求人与服务方不能同为一人");
}
//1、修改主表
//置为已派单
entity.setStatus(UserDemandConstant.ASSIGNED);

Loading…
Cancel
Save