| 
					
				 | 
			
			
				@@ -7,10 +7,12 @@ import com.onemap.apply.mapper.gdbh.TGdbhGdServerMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.onemap.apply.mapper.gdbh.TGdbhYjjbntMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.onemap.apply.mapper.gdbh.TGdbhYjjbntServerMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.onemap.apply.service.gdbh.ITGdbhGdService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.onemap.common.core.utils.StringUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.stereotype.Service; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import javax.annotation.Resource; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.math.BigDecimal; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import java.math.RoundingMode; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.util.ArrayList; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.util.HashMap; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.util.List; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -46,7 +48,13 @@ public class TGdbhGdServiceImpl implements ITGdbhGdService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         String areacolumn = d2.getAreaColumn(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         String sjy = d2.getSjy(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Map<String, Object> retMap = tGdbhGdMapper.ntzl(sjy, areacolumn, yaer, xzqhdm, dlbm); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        Map<String, Object> gdnhmbMap = tGdbhGdMapper.gdnhmb(xzqhdm, dlbm); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Map<String, Object> gdnhmbMap = null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (StringUtils.isEmpty(dlbm) || dlbm.equals("01")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            gdnhmbMap = tGdbhGdMapper.gdnhmb(xzqhdm, dlbm); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            gdnhmbMap = tGdbhGdMapper.ntzl(sjy, areacolumn, yaer, xzqhdm, "01"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (gdnhmbMap == null || gdnhmbMap.size() == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             retMap.put("zb", "暂无"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             retMap.put("bh_mj", "暂无"); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -54,7 +62,7 @@ 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) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                retMap.put("zb", yjjbnt_mj.divide(gd_mj, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100))); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                retMap.put("zb", yjjbnt_mj.divide(gd_mj, 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).setScale(2, RoundingMode.DOWN)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 retMap.put("zb", 0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 |