|
|
|
@ -11,6 +11,10 @@ import com.biutag.supervision.constants.enums.*; |
|
|
|
import com.biutag.supervision.pojo.dto.ActionDto; |
|
|
|
import com.biutag.supervision.pojo.dto.ActionDto; |
|
|
|
import com.biutag.supervision.pojo.dto.flow.VerifyData; |
|
|
|
import com.biutag.supervision.pojo.dto.flow.VerifyData; |
|
|
|
import com.biutag.supervision.pojo.entity.*; |
|
|
|
import com.biutag.supervision.pojo.entity.*; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.param.ComplaintCollection.ComplaintCollectionQueryParam; |
|
|
|
|
|
|
|
import com.biutag.supervision.pojo.param.ComplaintCollection.ComplaintCollectionUpdateParam; |
|
|
|
|
|
|
|
import com.biutag.supervision.repository.complaintCollection.ComplaintCollectionResourceService; |
|
|
|
|
|
|
|
import com.biutag.supervision.repository.supdepart.SupDepartResourceService; |
|
|
|
import com.biutag.supervision.service.*; |
|
|
|
import com.biutag.supervision.service.*; |
|
|
|
import com.biutag.supervision.util.JSON; |
|
|
|
import com.biutag.supervision.util.JSON; |
|
|
|
import com.biutag.supervision.util.TimeUtil; |
|
|
|
import com.biutag.supervision.util.TimeUtil; |
|
|
|
@ -46,6 +50,10 @@ public class ApplyCompletionAction implements Action { |
|
|
|
|
|
|
|
|
|
|
|
private final Validator validator; |
|
|
|
private final Validator validator; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final ComplaintCollectionResourceService complaintCollectionResourceService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final SupDepartResourceService supDepartResourceService; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void next(ActionDto actionDto) { |
|
|
|
public void next(ActionDto actionDto) { |
|
|
|
VerifyData verifyData = BeanUtil.toBean(actionDto.getData(), VerifyData.class); |
|
|
|
VerifyData verifyData = BeanUtil.toBean(actionDto.getData(), VerifyData.class); |
|
|
|
@ -73,6 +81,8 @@ public class ApplyCompletionAction implements Action { |
|
|
|
.set(Negative::getVerifyTime, LocalDateTime.now()) |
|
|
|
.set(Negative::getVerifyTime, LocalDateTime.now()) |
|
|
|
.set(Negative::getLatestProcessTime, LocalDateTime.now()); |
|
|
|
.set(Negative::getLatestProcessTime, LocalDateTime.now()); |
|
|
|
negativeService.update(updateWrapper); |
|
|
|
negativeService.update(updateWrapper); |
|
|
|
|
|
|
|
// 同步修改投诉举报涉及单位
|
|
|
|
|
|
|
|
updateComplaintCollectionInfo(negative, verifyData); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void updateNegative(Negative negative, VerifyData verifyData) { |
|
|
|
public void updateNegative(Negative negative, VerifyData verifyData) { |
|
|
|
@ -291,4 +301,36 @@ public class ApplyCompletionAction implements Action { |
|
|
|
workService.save(work); |
|
|
|
workService.save(work); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void updateComplaintCollectionInfo(Negative negative, VerifyData verifyData) { |
|
|
|
|
|
|
|
ComplaintCollectionQueryParam complaintCollectionQueryParam = new ComplaintCollectionQueryParam(); |
|
|
|
|
|
|
|
complaintCollectionQueryParam.setOriginId(negative.getOriginId()); |
|
|
|
|
|
|
|
List<ComplaintCollection> complaintCollections = complaintCollectionResourceService.query(complaintCollectionQueryParam); |
|
|
|
|
|
|
|
if (CollectionUtil.isEmpty(complaintCollections)) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (CollectionUtil.size(complaintCollections) > 1) { |
|
|
|
|
|
|
|
throw new IllegalArgumentException("关联多条投诉举报数据,请联系管理员处理"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
ComplaintCollection complaintCollection = complaintCollections.get(0); |
|
|
|
|
|
|
|
ComplaintCollectionUpdateParam complaintCollectionUpdateParam = new ComplaintCollectionUpdateParam(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String involveDepartId = verifyData.getInvolveDepartId(); |
|
|
|
|
|
|
|
SupDepart byId = departService.getById(involveDepartId); |
|
|
|
|
|
|
|
if (3==byId.getLevel()){ |
|
|
|
|
|
|
|
SupDepart pid = departService.getById(byId.getPid()); |
|
|
|
|
|
|
|
complaintCollectionUpdateParam.setSecondDepartId(pid.getId()); |
|
|
|
|
|
|
|
complaintCollectionUpdateParam.setSecondDepartName(pid.getShortName()); |
|
|
|
|
|
|
|
complaintCollectionUpdateParam.setThirdDepartId(byId.getId()); |
|
|
|
|
|
|
|
complaintCollectionUpdateParam.setThirdDepartName(byId.getShortName()); |
|
|
|
|
|
|
|
}else if (2==byId.getLevel()){ |
|
|
|
|
|
|
|
complaintCollectionUpdateParam.setSecondDepartId(byId.getId()); |
|
|
|
|
|
|
|
complaintCollectionUpdateParam.setSecondDepartName(byId.getShortName()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
complaintCollectionUpdateParam.setId(complaintCollection.getId()); |
|
|
|
|
|
|
|
complaintCollectionResourceService.updateSelectiveById(complaintCollectionUpdateParam); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|