|
@@ -248,8 +248,10 @@ public class CompensationInfoServiceImpl extends BaseServiceImpl<CompensationInf
|
|
|
BigDecimal b2 = new BigDecimal(0);
|
|
|
//地面附着物
|
|
|
BigDecimal b3 = new BigDecimal(0);
|
|
|
- //金额总计
|
|
|
+ //时段奖
|
|
|
BigDecimal b4 = new BigDecimal(0);
|
|
|
+ //金额总计
|
|
|
+ BigDecimal b5 = new BigDecimal(0);
|
|
|
//农用地面积
|
|
|
BigDecimal a1 = new BigDecimal(0);
|
|
|
//建设用地面积
|
|
@@ -293,7 +295,7 @@ public class CompensationInfoServiceImpl extends BaseServiceImpl<CompensationInf
|
|
|
//循环统计字段
|
|
|
for (WbsFormElement element : elements) {
|
|
|
Integer dict = element.getDynamicDict();
|
|
|
- if (dict.equals(7)){
|
|
|
+ if (dict.equals(41)){
|
|
|
continue;
|
|
|
}
|
|
|
//获取当前统计字段所有填写的值
|
|
@@ -303,10 +305,10 @@ public class CompensationInfoServiceImpl extends BaseServiceImpl<CompensationInf
|
|
|
continue;
|
|
|
}
|
|
|
//单独计算面积
|
|
|
- if (dict.equals(6)) {
|
|
|
- //统计面积,去找到当前行的地类dict为7
|
|
|
- List<WbsFormElement> collect = elements.stream().filter(l -> l.getDynamicDict().equals(7)).collect(Collectors.toList());
|
|
|
- //获取dict为7的key,如果key不存在则提示未配置土地性质
|
|
|
+ if (dict.equals(42)) {
|
|
|
+ //统计面积,去找到当前行的地类dict为41
|
|
|
+ List<WbsFormElement> collect = elements.stream().filter(l -> l.getDynamicDict().equals(41)).collect(Collectors.toList());
|
|
|
+ //获取dict为41的key,如果key不存在则提示未配置土地性质
|
|
|
if (collect == null || collect.size() == 0){
|
|
|
throw new ServiceException("未配置地类");
|
|
|
}
|
|
@@ -341,16 +343,18 @@ public class CompensationInfoServiceImpl extends BaseServiceImpl<CompensationInf
|
|
|
}else {
|
|
|
//当前统计值
|
|
|
try {
|
|
|
- if (dict.equals(1)) {
|
|
|
+ if (dict.equals(80)) {
|
|
|
+ str.add(StringUtils.join(vos.stream().map(l -> l.getTabVal()).collect(Collectors.toList()), "、") + "、");
|
|
|
+ } else if (dict.equals(82)) {
|
|
|
b1 = b1.add(vos.stream().map(l -> new BigDecimal(l.getTabVal())).reduce(BigDecimal.valueOf(0), BigDecimal::add));
|
|
|
- } else if (dict.equals(2)) {
|
|
|
+ } else if (dict.equals(83)) {
|
|
|
b2 = b2.add(vos.stream().map(l -> new BigDecimal(l.getTabVal())).reduce(BigDecimal.valueOf(0), BigDecimal::add));
|
|
|
- } else if (dict.equals(3)) {
|
|
|
+ } else if (dict.equals(84)) {
|
|
|
b3 = b3.add(vos.stream().map(l -> new BigDecimal(l.getTabVal())).reduce(BigDecimal.valueOf(0), BigDecimal::add));
|
|
|
- } else if (dict.equals(4)) {
|
|
|
- str.add(StringUtils.join(vos.stream().map(l -> l.getTabVal()).collect(Collectors.toList()), "、") + "、");
|
|
|
- } else if (dict.equals(5)) {
|
|
|
+ } else if (dict.equals(85)){
|
|
|
b4 = b4.add(vos.stream().map(l -> new BigDecimal(l.getTabVal())).reduce(BigDecimal.valueOf(0), BigDecimal::add));
|
|
|
+ } else if (dict.equals(86)) {
|
|
|
+ b5 = b5.add(vos.stream().map(l -> new BigDecimal(l.getTabVal())).reduce(BigDecimal.valueOf(0), BigDecimal::add));
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
throw new ServiceException("金额字段不能包含其他字符,请重新填写");
|
|
@@ -367,10 +371,10 @@ public class CompensationInfoServiceImpl extends BaseServiceImpl<CompensationInf
|
|
|
//设置金额
|
|
|
info.setLandMoney(b1);
|
|
|
info.setCropsMoney(b2.add(b3));
|
|
|
- if (!info.getLandMoney().add(info.getCropsMoney()).equals(b4)){
|
|
|
+ if (!info.getLandMoney().add(info.getCropsMoney()).add(b4).equals(b5)){
|
|
|
throw new ServiceException("补偿金额合计不对,请校验土地、青苗、等金额之和,是否等于补偿金额合计");
|
|
|
}
|
|
|
- info.setAllMoney(b4);
|
|
|
+ info.setAllMoney(b5);
|
|
|
//设置面积
|
|
|
info.setAreaA(a1);
|
|
|
info.setAreaB(a2);
|