Explorar o código

Merge branch 'master' of http://47.112.200.206:3000/shenhao/sys

shenhao %!s(int64=4) %!d(string=hai) anos
pai
achega
e564237f43

+ 2 - 2
src/main/java/com/ssj/dao/sys/fx/dao/impl/FxQueryDaoImpl.java

@@ -915,10 +915,10 @@ public class FxQueryDaoImpl implements FxQueryDao {
         selSql.append("   	SELECT m.id,m.type as merchant_type,m.pos_code,m.unit_name,0 as price,t.price,0 as buy_month,0 as give_month,0 as sign_type,0 as type,0 as lib_service,t.create_time as time,4 as cap_type from fx_merchant_plat_order t ");
         selSql.append("  	LEFT JOIN fx_merchant m ON t.merchant_id=m.id ");
         selSql.append("  UNION	ALL");
-        selSql.append(" 	SELECT m.id,m.type as merchant_type,m.pos_code,m.unit_name,t.unit_price,0 as price,t.num as buy_month,0 as give_month,0 as sign_type,t.type,t.lib_service,t.create_time as time,5 as cap_type from fx_merchant_sign_order t 	");
+        selSql.append(" 	SELECT m.id,m.type as merchant_type,m.pos_code,m.unit_name,t.unit_price,t.price as price,t.num as buy_month,0 as give_month,0 as sign_type,t.type,t.lib_service,t.create_time as time,5 as cap_type from fx_merchant_sign_order t 	");
         selSql.append(" 	LEFT JOIN fx_merchant m ON t.merchant_id=m.id	");
         selSql.append("  UNION	ALL");
-        selSql.append(" 	SELECT m.id,m.type as merchant_type,m.pos_code,m.unit_name,o.unit_price,0 as price,o.num as buy_month,0 as give_month,0 as sign_type,o.type,t.lib_service,t.sign_time as time,6 as cap_type from fx_merchant_sign t ");
+        selSql.append(" 	SELECT m.id,m.type as merchant_type,m.pos_code,m.unit_name,o.unit_price,o.price as price,o.num as buy_month,0 as give_month,0 as sign_type,o.type,t.lib_service,t.sign_time as time,6 as cap_type from fx_merchant_sign t ");
         selSql.append(" 	LEFT JOIN fx_merchant m ON t.merchant_id=m.id ");
         selSql.append(" 	LEFT JOIN fx_merchant_sign_order o ON t.order_id=o.id ");
         selSql.append("  )as tmp  ");

+ 12 - 12
src/main/java/com/ssj/sys/controller/FxController.java

@@ -3114,7 +3114,7 @@ public class FxController  extends BaseController {
 					}else if("endSignTime".equals(key)){
 						map.put("endSignTimeStr",DateHelper.format(obj.getEndSignTime(), "yyyy-MM-dd"));
 					}else if("contractTime".equals(key)){
-						map.put("contractTimeStr",DateHelper.format(obj.getComputeTime(), "yyyy-MM-dd"));
+						map.put("contractTimeStr",DateHelper.format(obj.getContractTime(), "yyyy-MM-dd"));
 					}else if("nextSummaryTime".equals(key)){
 						map.put(key,DateHelper.format(obj.getNextSummaryTime(), "yyyy-MM-dd"));
 					}else {
@@ -3431,7 +3431,7 @@ public class FxController  extends BaseController {
 				}else if("endSignTime".equals(key)){
 					map.put(key,DateHelper.format(obj.getEndSignTime(), "yyyy-MM-dd"));
 				}else if("contractTime".equals(key)){
-					map.put("contractTimeStr",DateHelper.format(obj.getComputeTime(), "yyyy-MM-dd"));
+					map.put("contractTimeStr",DateHelper.format(obj.getContractTime(), "yyyy-MM-dd"));
 				}else if("nextSummaryTime".equals(key)){
 					map.put(key,DateHelper.format(obj.getNextSummaryTime(), "yyyy-MM-dd"));
 				}else {
@@ -3789,14 +3789,14 @@ public class FxController  extends BaseController {
 	        		map.put("pr_1","");
 	        		map.put("pr_2","");
 	        		map.put("pr_3",map.get("price"));
-	        	}else if(Integer.parseInt(map.get("cap_type").toString())==5) {
-	        		map.put("pr_1", new BigDecimal(new BigDecimal(map.get("unit_price").toString()).doubleValue()*(Integer.parseInt(map.get("buy_month").toString()))/Integer.parseInt(map.get("lib_service").toString())).setScale(2, RoundingMode.UP).doubleValue());
-	        		map.put("pr_2", new BigDecimal(new BigDecimal(map.get("unit_price").toString()).doubleValue()*(Integer.parseInt(map.get("buy_month").toString()))).setScale(2, RoundingMode.UP).doubleValue());
+	        	}else if(Integer.parseInt(map.get("cap_type").toString())==5) { 
+	        		map.put("pr_1", new BigDecimal(new BigDecimal(map.get("price").toString()).doubleValue()*(Integer.parseInt(map.get("buy_month").toString()))/Integer.parseInt(map.get("lib_service").toString())).setScale(2, RoundingMode.UP).doubleValue());
+	        		map.put("pr_2", map.get("price"));
 	        		map.put("pr_3","");
 	        	}else if(Integer.parseInt(map.get("cap_type").toString())==6) {
-	        		map.put("pr_1", new BigDecimal(new BigDecimal(map.get("unit_price").toString()).doubleValue()/Integer.parseInt(map.get("lib_service").toString())).setScale(2, RoundingMode.UP).doubleValue());
+	        		map.put("pr_1", new BigDecimal(new BigDecimal(map.get("price").toString()).doubleValue()/Integer.parseInt(map.get("lib_service").toString())).setScale(2, RoundingMode.UP).doubleValue());
 	        		map.put("pr_2","");
-	        		map.put("pr_3",map.get("unit_price"));
+	        		map.put("pr_3",new BigDecimal(new BigDecimal(map.get("price").toString()).doubleValue()/(Integer.parseInt(map.get("buy_month").toString()))).setScale(2, RoundingMode.UP).doubleValue());
 	        	}
 	        	String remarks="";
 	        	String type="";
@@ -4861,14 +4861,14 @@ public class FxController  extends BaseController {
         		map.put("pr_1","");
         		map.put("pr_2","");
         		map.put("pr_3",map.get("price"));
-        	}else if(Integer.parseInt(map.get("cap_type").toString())==5) {
-        		map.put("pr_1", new BigDecimal(new BigDecimal(map.get("unit_price").toString()).doubleValue()*(Integer.parseInt(map.get("buy_month").toString()))/Integer.parseInt(map.get("lib_service").toString())).setScale(2, RoundingMode.UP).doubleValue());
-        		map.put("pr_2", new BigDecimal(new BigDecimal(map.get("unit_price").toString()).doubleValue()*(Integer.parseInt(map.get("buy_month").toString()))).setScale(2, RoundingMode.UP).doubleValue());
+        	}else if(Integer.parseInt(map.get("cap_type").toString())==5) { 
+        		map.put("pr_1", new BigDecimal(new BigDecimal(map.get("price").toString()).doubleValue()*(Integer.parseInt(map.get("buy_month").toString()))/Integer.parseInt(map.get("lib_service").toString())).setScale(2, RoundingMode.UP).doubleValue());
+        		map.put("pr_2", map.get("price"));
         		map.put("pr_3","");
         	}else if(Integer.parseInt(map.get("cap_type").toString())==6) {
-        		map.put("pr_1", new BigDecimal(new BigDecimal(map.get("unit_price").toString()).doubleValue()/Integer.parseInt(map.get("lib_service").toString())).setScale(2, RoundingMode.UP).doubleValue());
+        		map.put("pr_1", new BigDecimal(new BigDecimal(map.get("price").toString()).doubleValue()/Integer.parseInt(map.get("lib_service").toString())).setScale(2, RoundingMode.UP).doubleValue());
         		map.put("pr_2","");
-        		map.put("pr_3",map.get("unit_price"));
+        		map.put("pr_3",new BigDecimal(new BigDecimal(map.get("price").toString()).doubleValue()/(Integer.parseInt(map.get("buy_month").toString()))).setScale(2, RoundingMode.UP).doubleValue());
         	}
 		}
         model.addAttribute("list", mapList);