From 228baf7c1c851ee8eba6d4da1e3f459f4d6a98e0 Mon Sep 17 00:00:00 2001
From: whycq0520 <91384184@qq.com>
Date: 星期四, 24 三月 2022 14:11:31 +0800
Subject: [PATCH] # ycq

---
 src/main/webapp/static/js/tableData.js                                   |   31 ++++++++++++++++++++++---------
 src/main/java/zy/cloud/wms/manager/controller/ProjectPlanController.java |    6 +++++-
 src/main/java/zy/cloud/wms/manager/entity/ItemsDTO.java                  |    6 +++++-
 src/main/resources/application.yml                                       |    2 +-
 4 files changed, 33 insertions(+), 12 deletions(-)

diff --git a/src/main/java/zy/cloud/wms/manager/controller/ProjectPlanController.java b/src/main/java/zy/cloud/wms/manager/controller/ProjectPlanController.java
index a21352c..b3bb6a0 100644
--- a/src/main/java/zy/cloud/wms/manager/controller/ProjectPlanController.java
+++ b/src/main/java/zy/cloud/wms/manager/controller/ProjectPlanController.java
@@ -295,6 +295,11 @@
             itemsDTO.setId(item.getName());
             itemsDTO.setStartDay(item.getStartTime$());
             itemsDTO.setEndDay(item.getEndTime$());
+            itemsDTO.setPresaleAmt(item.getPresaleAmt());
+            itemsDTO.setPlandeAmt(item.getPlandeAmt());
+            itemsDTO.setRealdeAmt(item.getRealdeAmt());
+            itemsDTO.setPlaninAmt(item.getPlaninAmt());
+            itemsDTO.setRealinAmt(item.getRealinAmt());
             List<ProjectPlan> allPlans = projectPlanService.selectList(new EntityWrapper<ProjectPlan>()
                     .eq("item_id", item.getId()));
             for (ProjectPlan projectPlan : allPlans) {
@@ -307,7 +312,6 @@
                 flows.add(flowsDTO);
             }
             itemsDTO.setNodes(flows);
-            itemsDTO.setItems(items);
             itemsDTOs.add(itemsDTO);
         }
         return R.ok().add(itemsDTOs);
diff --git a/src/main/java/zy/cloud/wms/manager/entity/ItemsDTO.java b/src/main/java/zy/cloud/wms/manager/entity/ItemsDTO.java
index 274a6dd..6f68f99 100644
--- a/src/main/java/zy/cloud/wms/manager/entity/ItemsDTO.java
+++ b/src/main/java/zy/cloud/wms/manager/entity/ItemsDTO.java
@@ -13,5 +13,9 @@
     private String startDay;
     private String endDay;
     private List<FlowsDTO> nodes;
-    private List<Item> items;
+    private Double presaleAmt;
+    private Double plandeAmt;
+    private Double realdeAmt;
+    private Double planinAmt;
+    private Double realinAmt;
 }
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 27e1ab9..74938e2 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -17,7 +17,7 @@
 #    url: jdbc:sqlserver://127.0.0.1:51433;databasename=zypms
 #    username: sa
 #    password: Zoneyung@zy56$
-    url: jdbc:sqlserver://192.168.4.15:1433;databasename=zypms
+    url: jdbc:sqlserver://localhost:1433;databasename=zypms
     username: sa
     password: sa@123
   mvc:
diff --git a/src/main/webapp/static/js/tableData.js b/src/main/webapp/static/js/tableData.js
index e08c097..0cd8b80 100644
--- a/src/main/webapp/static/js/tableData.js
+++ b/src/main/webapp/static/js/tableData.js
@@ -9,7 +9,7 @@
 	
 	var proData = ["椤圭洰鍚嶇О","鍞墠閲戦鏍哥畻","寮�濮嬫椂闂�","缁撴潫鏃堕棿",
 		"鍚堢害绛捐","鍥鹃潰浼氱","BOM璁捐/浜岀骇BOM涓嬪彂",
-		"鏉愭枡閲囪喘","鐢熶骇鍒朵綔","鍐呴儴瀹夎璋冩暣锛堢爺鍙戠墿鏂欙級","杩涘満瀹夎","绋嬪簭璋冭瘯","绯荤粺鑱旇皟","涓婄嚎杩愯","椤圭洰楠屾敹","杩愯垂"]
+		"鏉愭枡閲囪喘","鐢熶骇鍒朵綔","鍐呴儴瀹夎璋冩暣锛堢爺鍙戠墿鏂欙級","杩涘満瀹夎","绋嬪簭璋冭瘯","绯荤粺鑱旇皟","涓婄嚎杩愯","椤圭洰楠屾敹","杩愯垂","瀹夎璐�"]
 	var getTheaddData = function(){
 			for (var i = 0;i < proData.length; i++) {
 				var str = "<th class='xiangmu'>"+proData[i]+"</th>"
@@ -47,7 +47,6 @@
 			dataType:'JSON',
 			data:{},
 			success:function(res){
-				console.log(res)
 				if(res.code==200){
 					data=res.data
 					// 鍒ゆ柇鏃堕棿鏄惁鏈塶ull  鏈塶ull鐨勬敼涓� ""
@@ -80,11 +79,25 @@
 						}
 						var str2 = '<tr id="row'+i+'" class="row">'
 							+'<th class="projects">'+data[i].id+'</th>'
-							+'<td class="nor-mal">'+data[i].startDay.substring(0,10)+'</td>'
+							+'<td class="nor-mal">'+data[i].presaleAmt+'</td>'
 							+'<td class="nor-mal">'+data[i].startDay.substring(0,10)+'</td>'
 							+'<td class="nor-mal">'+data[i].endDay.substring(0,10)+'</td>'
-						var str3 =  str2 +str +'</tr>'
+						var str9 = '<td class="normal">'+'<p>'+data[i].plandeAmt+'</p>'+'<p>'+data[i].realdeAmt+'</p>'+'</td>'
+								+  '<td class="normal">'+'<p>'+data[i].planinAmt+'</p>'+'<p>'+data[i].realinAmt+'</p>'+'</td>'
+						var str3 =  str2 +str + str9 +'</tr>'
 						$('#tab-body').append(str3)
+						var deAmt = data[i].plandeAmt - data[i].realdeAmt
+						if (deAmt < 0 ) {
+							$("#tab-body").find('tr').eq(i).find("td").eq(14).attr("style","background:#CC3333");
+						} else {
+							$("#tab-body").find('tr').eq(i).find("td").eq(14).attr("style","background:#009966");
+						}
+						var inAmt = data[i].planinAmt - data[i].realinAmt
+						if (inAmt < 0 ) {
+							$("#tab-body").find('tr').eq(i).find("td").eq(15).attr("style","background:#CC3333 ");
+						} else {
+							$("#tab-body").find('tr').eq(i).find("td").eq(15).attr("style","background:#009966");
+						}
 					}
 					var dataLen = data.length
 					for(var t = 0;t < dataLen; t++){
@@ -104,13 +117,13 @@
 								var ExDay = eDay.getTime()-myDate.getTime()
 
 								if(ExDay>-86400000 && ExDay<172800000){
-									$("#tab-body").find('tr').eq(t).find("td").eq(k+2).attr("style","background:#CC9933");
+									$("#tab-body").find('tr').eq(t).find("td").eq(k+3).attr("style","background:#CC9933");
 
 								}else if(ExDay<-86400000){
-									$("#tab-body").find('tr').eq(t).find("td").eq(k+2).attr("style","background:#CC3333");
+									$("#tab-body").find('tr').eq(t).find("td").eq(k+3).attr("style","background:#CC3333");
 
 								}else if(ExDay>172800000){
-									$("#tab-body").find('tr').eq(t).find("td").eq(k+2).attr("style","background:#2e4e7e")
+									$("#tab-body").find('tr').eq(t).find("td").eq(k+3).attr("style","background:#2e4e7e")
 								}
 							}else{
 								function tab(date1,date2){
@@ -118,10 +131,10 @@
 									var oDate2 = new Date(date2);
 									var x = oDate1.getTime()-oDate2.getTime()
 									if(x>=0){
-										$("#tab-body").find('tr').eq(t).find("td").eq(k+2).attr("style","background:#009966")
+										$("#tab-body").find('tr').eq(t).find("td").eq(k+3).attr("style","background:#009966")
 
 									} else {
-										$("#tab-body").find('tr').eq(t).find("td").eq(k+2).attr("style","background:#CC3333");
+										$("#tab-body").find('tr').eq(t).find("td").eq(k+3).attr("style","background:#CC3333");
 
 									}
 								}

--
Gitblit v1.9.1