Ver código fonte

修改百分比

DESKTOP-2K9OVK9\siwei 4 meses atrás
pai
commit
bcd1ccdc22

+ 2 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/gdbh/impl/TGdbhGdServiceImpl.java

@@ -54,6 +54,8 @@ public class TGdbhGdServiceImpl implements ITGdbhGdService {
             BigDecimal yjjbnt_mj = (BigDecimal) retMap.get("mj");
             BigDecimal gd_mj = (BigDecimal) gdnhmbMap.get("mj");
             if (yjjbnt_mj.doubleValue() != 0 && gd_mj.doubleValue() != 0) {
+                yjjbnt_mj = yjjbnt_mj.multiply(new BigDecimal(100));
+                gd_mj = gd_mj.multiply(new BigDecimal(100));
                 retMap.put("zb", yjjbnt_mj.divide(gd_mj, 2, BigDecimal.ROUND_HALF_UP));
             } else {
                 retMap.put("zb", 0);

+ 2 - 0
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/gdbh/impl/TGdbhYjjbntServiceImpl.java

@@ -65,6 +65,8 @@ public class TGdbhYjjbntServiceImpl implements ITGdbhYjjbntService {
             BigDecimal yjjbnt_mj = (BigDecimal) retMap.get("mj");
             BigDecimal gd_mj = (BigDecimal) gdMap.get("mj");
             if (yjjbnt_mj.doubleValue() != 0 && gd_mj.doubleValue() != 0) {
+                yjjbnt_mj =yjjbnt_mj.multiply(new BigDecimal(100));
+                gd_mj =gd_mj.multiply(new BigDecimal(100));
                 retMap.put("zb", yjjbnt_mj.divide(gd_mj, 2, BigDecimal.ROUND_HALF_UP));
             } else {
                 retMap.put("zb", 0);