|
|
@ -2,12 +2,17 @@ package com.zc.business.service.impl; |
|
|
|
|
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.List; |
|
|
|
import java.util.regex.Matcher; |
|
|
|
import java.util.regex.Pattern; |
|
|
|
|
|
|
|
import com.ruoyi.common.utils.DateUtils; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import com.zc.business.mapper.DcRoadSectionMapper; |
|
|
|
import com.zc.business.domain.DcRoadSection; |
|
|
|
import com.zc.business.service.IDcRoadSectionService; |
|
|
|
import org.w3c.dom.CDATASection; |
|
|
|
|
|
|
|
/** |
|
|
|
* 辖区路段Service业务层处理 |
|
|
@ -42,6 +47,44 @@ public class DcRoadSectionServiceImpl implements IDcRoadSectionService |
|
|
|
@Override |
|
|
|
public List<DcRoadSection> selectDcRoadSectionList(DcRoadSection dcRoadSection) |
|
|
|
{ |
|
|
|
String startStakeMark = dcRoadSection.getStartStakeMark(); |
|
|
|
String endStakeMark = dcRoadSection.getEndStakeMark(); |
|
|
|
if (StringUtils.isNotBlank(startStakeMark)&&StringUtils.isNotBlank(endStakeMark)){ |
|
|
|
String[] parts = startStakeMark.split("(?<=K)|(?=[+])"); |
|
|
|
String startPartsValue=parts[1]; |
|
|
|
String[] partsEnd = endStakeMark.split("(?<=K)|(?=[+])"); |
|
|
|
String endPartsValue=partsEnd[1]; |
|
|
|
Integer startParts = Integer.valueOf(startPartsValue)*1000; |
|
|
|
Integer endParts = Integer.valueOf(endPartsValue)*1000; |
|
|
|
String[] startRiceNumber = startStakeMark.split("\\+"); |
|
|
|
String[] endRiceNumber = endStakeMark.split("\\+"); |
|
|
|
String startRiceValue=startRiceNumber[1]; |
|
|
|
String endRiceValue=endRiceNumber[1]; |
|
|
|
Integer startRice = Integer.valueOf(startRiceValue); |
|
|
|
Integer endRice = Integer.valueOf(endRiceValue); |
|
|
|
Integer start=startParts+startRice; |
|
|
|
Integer end=endParts+endRice; |
|
|
|
dcRoadSection.setStartStakeMark(start.toString()); |
|
|
|
dcRoadSection.setEndStakeMark(end.toString()); |
|
|
|
}else if (StringUtils.isNotBlank(startStakeMark)&&endStakeMark==null){ |
|
|
|
String[] parts = startStakeMark.split("(?<=K)|(?=[+])"); |
|
|
|
String startPartsValue=parts[1]; |
|
|
|
Integer startParts = Integer.valueOf(startPartsValue)*1000; |
|
|
|
String[] startRiceNumber = startStakeMark.split("\\+"); |
|
|
|
String startRiceValue=startRiceNumber[1]; |
|
|
|
Integer startRice = Integer.valueOf(startRiceValue); |
|
|
|
Integer start=startParts+startRice; |
|
|
|
dcRoadSection.setStartStakeMark(start.toString()); |
|
|
|
}else if (StringUtils.isNotBlank(endStakeMark)&&startStakeMark==null){ |
|
|
|
String[] partsEnd = endStakeMark.split("(?<=K)|(?=[+])"); |
|
|
|
String endPartsValue=partsEnd[1]; |
|
|
|
Integer endParts = Integer.valueOf(endPartsValue)*1000; |
|
|
|
String[] endRiceNumber = endStakeMark.split("\\+"); |
|
|
|
String endRiceValue=endRiceNumber[1]; |
|
|
|
Integer endRice = Integer.valueOf(endRiceValue); |
|
|
|
Integer end=endParts+endRice; |
|
|
|
dcRoadSection.setEndStakeMark(end.toString()); |
|
|
|
} |
|
|
|
return dcRoadSectionMapper.selectDcRoadSectionList(dcRoadSection); |
|
|
|
} |
|
|
|
|
|
|
|