|
|
|
@ -65,6 +65,7 @@ import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.enums.complaintCollection.*; |
|
|
|
|
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
|
import java.io.IOException; |
|
|
|
import java.io.UnsupportedEncodingException; |
|
|
|
import java.io.UnsupportedEncodingException; |
|
|
|
@ -253,6 +254,18 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public Result<Boolean> addComplaintCollectionBlame(ComplaintCollectionAndBlameAddRequest request) { |
|
|
|
public Result<Boolean> addComplaintCollectionBlame(ComplaintCollectionAndBlameAddRequest request) { |
|
|
|
|
|
|
|
// 局长信箱办结的时候做限制
|
|
|
|
|
|
|
|
ComplaintCollectionQueryParam complaintCollectionQueryParam = new ComplaintCollectionQueryParam(); |
|
|
|
|
|
|
|
complaintCollectionQueryParam.setId(request.getComplaintId()); |
|
|
|
|
|
|
|
ComplaintCollection complaint = complaintCollectionResourceService |
|
|
|
|
|
|
|
.query(complaintCollectionQueryParam) |
|
|
|
|
|
|
|
.stream() |
|
|
|
|
|
|
|
.findFirst() |
|
|
|
|
|
|
|
.orElseThrow(() -> new ValidationException("未找到对应的投诉数据")); |
|
|
|
|
|
|
|
if ("23".equals(complaint.getSourceTable()) && |
|
|
|
|
|
|
|
!ComplaintCollectionProcessingStatusEnum.ALLOWED_COMPLETE_STATUS.contains(complaint.getProcessingStatus())) { |
|
|
|
|
|
|
|
throw new ValidationException("局长信箱只能操作已办结和已终止类型状态"); |
|
|
|
|
|
|
|
} |
|
|
|
String userName = UserContextHolder.getCurrentUser().getUserName(); |
|
|
|
String userName = UserContextHolder.getCurrentUser().getUserName(); |
|
|
|
String checkStatus = SfssUtil.getCheckStatusCategory(request.getCheckStatusCode()); |
|
|
|
String checkStatus = SfssUtil.getCheckStatusCategory(request.getCheckStatusCode()); |
|
|
|
// 更新表头基本信息
|
|
|
|
// 更新表头基本信息
|
|
|
|
@ -292,6 +305,17 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic |
|
|
|
collectionUpdateParam.setPublicRecognition(request.getPublicRecognition()); |
|
|
|
collectionUpdateParam.setPublicRecognition(request.getPublicRecognition()); |
|
|
|
// 更新归集表状态
|
|
|
|
// 更新归集表状态
|
|
|
|
collectionUpdateParam.setStatus("1"); |
|
|
|
collectionUpdateParam.setStatus("1"); |
|
|
|
|
|
|
|
// 更新初核
|
|
|
|
|
|
|
|
if (complaint.getGwf2() == null ) { |
|
|
|
|
|
|
|
LocalDateTime discoveryTime = complaint.getDiscoveryTime(); |
|
|
|
|
|
|
|
long maxSeconds = CHECK_LIMIT_DAYS * TimeUtil.SECONDS_OF_A_DAY; |
|
|
|
|
|
|
|
long remainingAtInitial = TimeUtil.getRemainingDuration(discoveryTime, LocalDateTime.now(), maxSeconds); |
|
|
|
|
|
|
|
String initialReviewStatus = (remainingAtInitial < 0) ? |
|
|
|
|
|
|
|
ComplaintCollectionInitialEnum.TIMEOUT_UPLOAD.getCode() : ComplaintCollectionInitialEnum.UPLOADED.getCode(); |
|
|
|
|
|
|
|
collectionUpdateParam.setId(request.getComplaintId()); |
|
|
|
|
|
|
|
collectionUpdateParam.setGwf2(LocalDateTime.now().format(INITIAL_REVIEW_FMT)); |
|
|
|
|
|
|
|
collectionUpdateParam.setGwf3(initialReviewStatus); |
|
|
|
|
|
|
|
} |
|
|
|
complaintCollectionResourceService.updateSelectiveById(collectionUpdateParam); |
|
|
|
complaintCollectionResourceService.updateSelectiveById(collectionUpdateParam); |
|
|
|
// 是否属实
|
|
|
|
// 是否属实
|
|
|
|
boolean itTure = InspectCaseEnum.isItTure(checkStatus); |
|
|
|
boolean itTure = InspectCaseEnum.isItTure(checkStatus); |
|
|
|
@ -1028,7 +1052,6 @@ public class ComplaintCollectionServiceImpl implements ComplaintCollectionServic |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|