|
|
@ -17,6 +17,7 @@ import com.kms.yg.sz.domain.dto.AqrwDto; |
|
|
|
import com.kms.yg.sz.domain.dto.NumDto; |
|
|
|
import com.shuili.common.core.domain.SearchParam; |
|
|
|
import com.shuili.common.core.service.BaseService; |
|
|
|
import com.shuili.common.utils.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
@ -149,8 +150,10 @@ public class BsSgcDfAqrwService extends BaseService<BsSgcDfAqrwMapper, BsSgcDfAq |
|
|
|
BsSgcDfAqrw DfAqrw = bsSgcDfAqrwMapper.selectById(taskId); |
|
|
|
|
|
|
|
String adcd = DfAqrw.getAdcd(); |
|
|
|
SysXzqh byId = sysXzqhService.getById(adcd); |
|
|
|
|
|
|
|
QueryWrapper<SysXzqh> queryWrapper = new QueryWrapper<>(); |
|
|
|
queryWrapper.apply("LEFT(XZQHDM, 6) = LEFT({0}, 6)", adcd) |
|
|
|
.apply("RIGHT(XZQHDM, 6) = '000000'"); |
|
|
|
SysXzqh byId= sysXzqhService.getOne(queryWrapper); |
|
|
|
Integer layer = byId.getLayer(); |
|
|
|
|
|
|
|
List<NumDto> Num = bsSgcDfAqrwMapper.getNum(sysXzqhService.getSubString(adcd), layer,taskId); |
|
|
@ -168,25 +171,25 @@ public class BsSgcDfAqrwService extends BaseService<BsSgcDfAqrwMapper, BsSgcDfAq |
|
|
|
AqrwDto aqrwDto = new AqrwDto(); |
|
|
|
aqrwDto.setAdcdName(numDto.getName()); |
|
|
|
for (NumDto dto : zeroNum) { |
|
|
|
if (ObjectUtil.isNotNull(dto) &&dto.getName().equals(numDto.getName())) { |
|
|
|
if (ObjectUtil.isNotNull(dto) &&StringUtils.isNotNull(dto.getName())&&dto.getName().equals(numDto.getName())) { |
|
|
|
aqrwDto.setZeroNum(dto.getNum()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
for (NumDto dto : oneNum) { |
|
|
|
if (ObjectUtil.isNotNull(dto) &&dto.getName().equals(numDto.getName())) { |
|
|
|
if (ObjectUtil.isNotNull(dto) && StringUtils.isNotNull(dto.getName())&&dto.getName().equals(numDto.getName())) { |
|
|
|
aqrwDto.setOneNum(dto.getNum()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
for (NumDto dto : twoNum) { |
|
|
|
if (ObjectUtil.isNotNull(dto) &&dto.getName().equals(numDto.getName())) { |
|
|
|
if (ObjectUtil.isNotNull(dto) &&StringUtils.isNotNull(dto.getName())&&dto.getName().equals(numDto.getName())) { |
|
|
|
aqrwDto.setTwoNum(dto.getNum()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
for (NumDto dto : threeNum) { |
|
|
|
if (ObjectUtil.isNotNull(dto) &&dto.getName().equals(numDto.getName())) { |
|
|
|
if (ObjectUtil.isNotNull(dto) &&StringUtils.isNotNull(dto.getName())&&dto.getName().equals(numDto.getName())) { |
|
|
|
aqrwDto.setThreeNum(dto.getNum()); |
|
|
|
} |
|
|
|
} |
|
|
@ -210,8 +213,10 @@ public class BsSgcDfAqrwService extends BaseService<BsSgcDfAqrwMapper, BsSgcDfAq |
|
|
|
|
|
|
|
// 获取adcd属性值
|
|
|
|
String adcd = DfAqrw.getAdcd(); |
|
|
|
// 根据adcd属性值查询SysXzqh对象
|
|
|
|
SysXzqh byId = sysXzqhService.getById(adcd); |
|
|
|
QueryWrapper<SysXzqh> queryWrapper = new QueryWrapper<>(); |
|
|
|
queryWrapper.apply("LEFT(XZQHDM, 6) = LEFT({0}, 6)", adcd) |
|
|
|
.apply("RIGHT(XZQHDM, 6) = '000000'"); |
|
|
|
SysXzqh byId= sysXzqhService.getOne(queryWrapper); |
|
|
|
|
|
|
|
// 获取层级属性值
|
|
|
|
Integer layer = byId.getLayer(); |
|
|
@ -230,7 +235,7 @@ public class BsSgcDfAqrwService extends BaseService<BsSgcDfAqrwMapper, BsSgcDfAq |
|
|
|
// 遍历one列表
|
|
|
|
for (NumDto numDto : one) { |
|
|
|
// 如果numDto的名称与aqrwDto的adcdName属性值相等,则将numDto的num属性值赋给aqrwDto的one属性
|
|
|
|
if (numDto.getName().equals(aqrwDto.getAdcdName())) { |
|
|
|
if (StringUtils.isNotEmpty(numDto.getName())&&numDto.getName().equals(aqrwDto.getAdcdName())) { |
|
|
|
aqrwDto.setOne(numDto.getNum()); |
|
|
|
|
|
|
|
} |
|
|
@ -239,7 +244,7 @@ public class BsSgcDfAqrwService extends BaseService<BsSgcDfAqrwMapper, BsSgcDfAq |
|
|
|
// 遍历two列表
|
|
|
|
for (NumDto numDto : two) { |
|
|
|
// 如果numDto的名称与aqrwDto的adcdName属性值相等,则将numDto的num属性值赋给aqrwDto的two属性
|
|
|
|
if (numDto.getName().equals(aqrwDto.getAdcdName())) { |
|
|
|
if (StringUtils.isNotEmpty(numDto.getName())&&numDto.getName().equals(aqrwDto.getAdcdName())) { |
|
|
|
aqrwDto.setTwo(numDto.getNum()); |
|
|
|
|
|
|
|
} |
|
|
@ -247,7 +252,7 @@ public class BsSgcDfAqrwService extends BaseService<BsSgcDfAqrwMapper, BsSgcDfAq |
|
|
|
// 遍历three列表
|
|
|
|
for (NumDto numDto : three) { |
|
|
|
// 如果numDto的名称与aqrwDto的adcdName属性值相等,则将numDto的num属性值赋给aqrwDto的three属性
|
|
|
|
if (numDto.getName().equals(aqrwDto.getAdcdName())) { |
|
|
|
if (StringUtils.isNotEmpty(numDto.getName())&&numDto.getName().equals(aqrwDto.getAdcdName())) { |
|
|
|
aqrwDto.setThree(numDto.getNum()); |
|
|
|
|
|
|
|
} |
|
|
|