|
@ -31,6 +31,7 @@ import com.epmet.opendata.service.BaseConflictsResolveService; |
|
|
import com.epmet.opendata.service.BaseDisputeProcessService; |
|
|
import com.epmet.opendata.service.BaseDisputeProcessService; |
|
|
import com.epmet.opendata.service.ExDeptService; |
|
|
import com.epmet.opendata.service.ExDeptService; |
|
|
import com.epmet.opendata.service.ExUserService; |
|
|
import com.epmet.opendata.service.ExUserService; |
|
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
@ -47,6 +48,7 @@ import java.util.stream.Collectors; |
|
|
* @author generator generator@elink-cn.com |
|
|
* @author generator generator@elink-cn.com |
|
|
* @since v1.0.0 2021-10-15 |
|
|
* @since v1.0.0 2021-10-15 |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
@Slf4j |
|
|
@Service |
|
|
@Service |
|
|
public class BaseDisputeProcessServiceImpl extends BaseServiceImpl<BaseDisputeProcessDao, BaseDisputeProcessEntity> implements BaseDisputeProcessService { |
|
|
public class BaseDisputeProcessServiceImpl extends BaseServiceImpl<BaseDisputeProcessDao, BaseDisputeProcessEntity> implements BaseDisputeProcessService { |
|
|
@Resource |
|
|
@Resource |
|
@ -90,7 +92,10 @@ public class BaseDisputeProcessServiceImpl extends BaseServiceImpl<BaseDisputePr |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void saveEvent(EventInfoFormDTO formDTO, Map<String, Integer> deptMap, Map<String, Integer> userMap, List<EventInfoResultDTO> list) { |
|
|
private void saveEvent(EventInfoFormDTO formDTO, Map<String, Integer> deptMap, Map<String, Integer> userMap, List<EventInfoResultDTO> list) { |
|
|
if (CollectionUtils.isNotEmpty(list)) { |
|
|
if (CollectionUtils.isEmpty(list)) { |
|
|
|
|
|
log.warn("no event data to save table base_conflicts_resolve"); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
List<BaseConflictsResolveEntity> resolveList = list.stream().map(item -> { |
|
|
List<BaseConflictsResolveEntity> resolveList = list.stream().map(item -> { |
|
|
BaseConflictsResolveEntity entity = new BaseConflictsResolveEntity(); |
|
|
BaseConflictsResolveEntity entity = new BaseConflictsResolveEntity(); |
|
@ -103,13 +108,13 @@ public class BaseDisputeProcessServiceImpl extends BaseServiceImpl<BaseDisputePr |
|
|
entity.setHappenPlace(item.getHappenPlace()); |
|
|
entity.setHappenPlace(item.getHappenPlace()); |
|
|
String eventDescription = item.getEventDescription(); |
|
|
String eventDescription = item.getEventDescription(); |
|
|
//如果不为空 长度控制1000以内
|
|
|
//如果不为空 长度控制1000以内
|
|
|
if (StringUtils.isNotBlank(eventDescription) && eventDescription.length() > NumConstant.ONE_THOUSAND){ |
|
|
if (StringUtils.isNotBlank(eventDescription) && eventDescription.length() > NumConstant.ONE_THOUSAND) { |
|
|
eventDescription = eventDescription.substring(NumConstant.ZERO,NumConstant.ONE_THOUSAND); |
|
|
eventDescription = eventDescription.substring(NumConstant.ZERO, NumConstant.ONE_THOUSAND); |
|
|
} |
|
|
} |
|
|
entity.setEventDescription(eventDescription); |
|
|
entity.setEventDescription(eventDescription); |
|
|
entity.setLng(null == item.getLng()?null:item.getLng().toPlainString()); |
|
|
entity.setLng(null == item.getLng() ? null : item.getLng().toPlainString()); |
|
|
entity.setLat(null == item.getLat()?null:item.getLat().toPlainString()); |
|
|
entity.setLat(null == item.getLat() ? null : item.getLat().toPlainString()); |
|
|
entity.setCreateBy(null == userMap.get(item.getReporterId())?null:String.valueOf(userMap.get(item.getReporterId()))); |
|
|
entity.setCreateBy(null == userMap.get(item.getReporterId()) ? null : String.valueOf(userMap.get(item.getReporterId()))); |
|
|
entity.setCreateDate(item.getReportTime()); |
|
|
entity.setCreateDate(item.getReportTime()); |
|
|
entity.setUpdateDate(new Date()); |
|
|
entity.setUpdateDate(new Date()); |
|
|
entity.setStatus(item.getStatus()); |
|
|
entity.setStatus(item.getStatus()); |
|
@ -117,8 +122,8 @@ public class BaseDisputeProcessServiceImpl extends BaseServiceImpl<BaseDisputePr |
|
|
if (("03").equals(item.getStatus())) { |
|
|
if (("03").equals(item.getStatus())) { |
|
|
entity.setSuccessfulOrNot("Y"); |
|
|
entity.setSuccessfulOrNot("Y"); |
|
|
} |
|
|
} |
|
|
//一级分类里 如果是03 矛盾纠纷 则涉及人数写2(目前业务不支持 所以应产品需求 填2)
|
|
|
//业务不包含 一级分类里 如果是03 矛盾纠纷 则涉及人数写2(目前业务不支持 所以应产品需求 填2)
|
|
|
if ("03".equals(item.getParentEventCategory())){ |
|
|
if ("03".equals(item.getParentEventCategory())) { |
|
|
entity.setNumberInvolved(NumConstant.TWO); |
|
|
entity.setNumberInvolved(NumConstant.TWO); |
|
|
} |
|
|
} |
|
|
entity.setEventNo(("py_").concat(item.getId())); |
|
|
entity.setEventNo(("py_").concat(item.getId())); |
|
@ -133,5 +138,4 @@ public class BaseDisputeProcessServiceImpl extends BaseServiceImpl<BaseDisputePr |
|
|
|
|
|
|
|
|
baseConflictsResolveService.saveOrUpdateBatch(resolveList, formDTO.getPageSize()); |
|
|
baseConflictsResolveService.saveOrUpdateBatch(resolveList, formDTO.getPageSize()); |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|