From cf2abed0458be6b97c36d650804fcbc655b50af4 Mon Sep 17 00:00:00 2001
From: whycrzh <ruanzhigang@whycst.com>
Date: 星期五, 08 一月 2021 17:19:46 +0800
Subject: [PATCH] update interface

---
 src/main/java/com/fgkj/services/User_task_changeService.java |  184 +++++++++++++++++++++++++++++++++++++--------
 1 files changed, 150 insertions(+), 34 deletions(-)

diff --git a/src/main/java/com/fgkj/services/User_task_changeService.java b/src/main/java/com/fgkj/services/User_task_changeService.java
index a0a603d..6ff7df2 100644
--- a/src/main/java/com/fgkj/services/User_task_changeService.java
+++ b/src/main/java/com/fgkj/services/User_task_changeService.java
@@ -2,6 +2,7 @@
 
 import com.fgkj.dto.ServiceModel;
 import com.fgkj.dto.Task_Batt_Test;
+import com.fgkj.dto.User_task_change;
 import com.fgkj.mapper.TestDaoFactory;
 import com.fgkj.mapper.UtilityFactory;
 import com.fgkj.mapper.impl.User_task_changeMapper;
@@ -18,7 +19,7 @@
 	private User_task_changeMapper mapper;
 	
 	//4.1浣滀笟鍙樻洿鐢宠
-	public ServiceModel add(Object obj) {
+	public ServiceModel add(User_task_change obj) {
 		ServiceModel model = new ServiceModel();
 		Boolean bl=mapper.add(obj);
 		if(bl){
@@ -32,7 +33,7 @@
 		
 	}
 	//4.5浣滀笟鍙樻洿鏌ヨ(瀹℃壒)
-	public ServiceModel update(Object obj) {
+	public ServiceModel update(User_task_change obj) {
 		ServiceModel model = new ServiceModel();
 		Boolean bl=mapper.update(obj);
 		if(bl){
@@ -45,7 +46,7 @@
 		return model;	
 	}
 	//4.5浣滀笟鍙樻洿鏌ヨ(鍒犻櫎璁板綍)
-	public ServiceModel delete(Object obj) {
+	public ServiceModel delete(User_task_change obj) {
 		ServiceModel model = new ServiceModel();
 		Boolean bl=mapper.del(obj);
 		if(bl){
@@ -58,45 +59,160 @@
 		return model;	
 	}
 	//4.5浣滀笟鍙樻洿鏌ヨ
-    public ServiceModel serchByCondition(Object obj){
+    public ServiceModel serchByCondition(Task_Batt_Test obj) {
 		ServiceModel model = new ServiceModel();
-		List<Task_Batt_Test> list=mapper.serchByCondition(obj);
-		if(list!=null&&list.size()>0){
-		for(int i=0;i<list.size();i++){
-			
-			String Uname=UtilityFactory.UidsToUnames(list.get(i).getUchange().getUsr_id().toString());
-			list.get(i).getBinf().setStationName2(Uname);
-			
-			String Cname=UtilityFactory.UidsToUnames(list.get(i).getUchange().getCopy_uids());
-			list.get(i).getBinf().setStationName3(Cname);
-			
-			String Aname=UtilityFactory.UidsToUnames(list.get(i).getUchange().getAppoint_uid().toString());
-			list.get(i).getBinf().setStationName4(Aname);		 
-			//  System.out.println(Uname+"  "+Cname+"   "+Aname);
-		    String task_type= TestDaoFactory.getTaskType(list.get(i).getUchange().getTask_type_id());
-		    list.get(i).getBinf().setStationName5(task_type);
-		    
-		    String change_type=TestDaoFactory.getChangeType(list.get(i).getUchange().getChange_type_id());
-		    list.get(i).getBinf().setStationName6(change_type);
-		    
-		    String Oname=UtilityFactory.UidsToUnames(list.get(i).getUchange().getOld_executor_ids());
-			list.get(i).getBinf().setStationName7(Oname);
-			
-			String Nname=UtilityFactory.UidsToUnames(list.get(i).getUchange().getNew_executor_ids());
-			list.get(i).getBinf().setStationName8(Nname);
-			
-		    String approve_res=TestDaoFactory.getApprove_res(list.get(i).getUchange().getTask_change_approve_res());
-		    list.get(i).getBinf().setStationName9(approve_res);
-		    }
+		List<Task_Batt_Test> list = mapper.serchByCondition(obj);
+		if (list != null && list.size() > 0) {
+			for (int i = 0; i < list.size(); i++) {
+				System.out.println("list = " + list.get(i));
+/***
+ * {
+ *   utask=null,
+ *   utest=null,
+ *   ulist=null,
+ *   binf=BattInf{
+ *     num=null,
+ *     stationId='null',
+ *     stationName='灞辫タ鐪�-澶師甯�-杩庢辰鍖�-灞�鏈烘埧119-灞�鏈烘埧绔�-1',
+ *     stationName1='null',
+ *     stationName2='null',
+ *     stationName3='null',
+ *     stationName4='null',
+ *     stationName5='null',
+ *     stationName6='null',
+ *     stationName7='null',
+ *     stationName8='null',
+ *     stationName9='null',
+ *     stationIp='null',
+ *     fbsDeviceId=null,
+ *     fbsDeviceIp='null',
+ *     fbsDeviceIp_YM='null',
+ *     fbsDeviceIp_WG='null',
+ *     fbsDeviceIp_old='null',
+ *     fbsDeviceIp_YM_old='null',
+ *     fbsDeviceIp_WG_old='null',
+ *     fbsDeviceName='null',
+ *     groupIndexInFBSDevice=null,
+ *     battModel='null',
+ *     battGroupId=1000001,
+ *     battGroupNum=null,
+ *     battGroupName='鐢垫睜缁�1',
+ *     battGroupName1='null',
+ *     battGroupName2='null',
+ *     battGroupName3='null',
+ *     battGroupName4='null',
+ *     battGroupName5='null',
+ *     battGroupName6='null',
+ *     floatVolLevel=null,
+ *     offlineVolLevel=null,
+ *     battFloatCurrent=null,
+ *     deviceId='null',
+ *     deviceName='null',
+ *     monCount=null,
+ *     monCapStd=null,
+ *     monResStd=null,
+ *     monSerStd=null,
+ *     monTmpStd=null,
+ *     monVolStd=null,
+ *     monVolLowToAvg=null,
+ *     monNum=null,
+ *     battProducer='null',
+ *     battProductDate=null,
+ *     battProductDate1=null,
+ *     battInUseDate=null,
+ *     battInUseDate1=null,
+ *     battGuarantDayCount=null,
+ *     signalId='null',
+ *     cInterFaceId=null,
+ *     load_curr=null,
+ *     disCurrMax=null,
+ *     signalName='null',
+ *     startNum=null,
+ *     size=null,
+ *     station_phone='null',
+ *     install_user='null',
+ *     station_install=null,
+ *     stationId_ex='null',
+ *     videoOrImage='null',
+ *     vol_grade=null,
+ *     manufacturers='null',
+ *     assetequipment='null',
+ *     deviceclasspath='null',
+ *     deviceoperationdepartment='null',
+ *     propertyRightUnit='null',
+ *     propertyAttribute='null',
+ *     factoryNumber='null',
+ *     operationTeam='null',
+ *     deviceIdentityCode='null',
+ *     projectType='null',
+ *     batteryApplicationType='null',
+ *     singleRatedVoltage=null,
+ *     remoteMonitor='null',
+ *     batttIndependentPlaced='null',
+ *     junChargeVoltageValue=null
+ *   },
+ *   ucheck=null,
+ *   mcheck=null,
+ *   uchange=User_task_change[
+ *     num=1,
+ *     usr_id=1001,
+ *     master_id=0,
+ *     appoint_uid=1001,
+ *     copy_uids=1001,
+ *     change_type_id=0,
+ *     task_type_id=0,
+ *     task_rc_num=10580,
+ *     BattgroupId=1000001,
+ *     change_reason=鏈夋柊鐨勪换鍔�,
+ *     old_executor_ids=1001,
+ *     old_task_exe_time=ThuSep0800: 00: 00CST2016,
+ *     new_executor_ids=0,
+ *     new_task_exe_time=TueSep0600: 00: 00CST2016,
+ *     change_ask_time=ThuSep0811: 32: 02CST2016,
+ *     change_ask_time1=null,
+ *     change_ask_time_limit=ThuSep0811: 32: 02CST2016,
+ *     task_change_approve_time=SatOct2217: 13: 55CST2016,
+ *     task_change_approve_time1=null,
+ *     task_change_approve_res=1,
+ *     remark=閫氳繃
+ *   ],
+ *   uinf=null,
+ *   pageBean=null
+ * }
+ */
+				String Uname = UtilityFactory.UidsToUnames(list.get(i).getUchange().getUsr_id().toString());//TODO 寰呭畬鎴�
+				list.get(i).getBinf().setStationName2(Uname);
+
+				String Cname = UtilityFactory.UidsToUnames(list.get(i).getUchange().getCopy_uids());
+				list.get(i).getBinf().setStationName3(Cname);
+
+				String Aname = UtilityFactory.UidsToUnames(list.get(i).getUchange().getAppoint_uid().toString());
+				list.get(i).getBinf().setStationName4(Aname);
+				//  System.out.println(Uname+"  "+Cname+"   "+Aname);
+				String task_type = TestDaoFactory.getTaskType(list.get(i).getUchange().getTask_type_id());
+				list.get(i).getBinf().setStationName5(task_type);
+
+				String change_type = TestDaoFactory.getChangeType(list.get(i).getUchange().getChange_type_id());
+				list.get(i).getBinf().setStationName6(change_type);
+
+				String Oname = UtilityFactory.UidsToUnames(list.get(i).getUchange().getOld_executor_ids());
+				list.get(i).getBinf().setStationName7(Oname);
+
+				String Nname = UtilityFactory.UidsToUnames(list.get(i).getUchange().getNew_executor_ids());
+				list.get(i).getBinf().setStationName8(Nname);
+
+				String approve_res = TestDaoFactory.getApprove_res(list.get(i).getUchange().getTask_change_approve_res());
+				list.get(i).getBinf().setStationName9(approve_res);
+			}
 		}
 //		for (Task_Batt_Test t : list) {
 //			System.out.println(t.getBinf());
 //		}
-		if(list!=null && list.size()>0){
+		if (list != null && list.size() > 0) {
 			model.setCode(1);
 			model.setData(list);
 		}
-         // System.out.println(model);		
+		// System.out.println(model);
 		return model;
 	} 
 

--
Gitblit v1.9.1