tomatozq пре 5 година
родитељ
комит
8920842617

+ 1 - 1
common/src/main/resources/mapper/base/PersonDeviceFilterLog.xml

@@ -146,7 +146,7 @@
 
     <select id="search" parameterType="hashmap" resultMap="PersonDeviceFilterLogMap">
         <![CDATA[
-			select * from base_person_device_filter_log a left join base_device_info b
+			select a.* from base_person_device_filter_log a left join base_device_info b
 			on  a.device_no = b.device_no left join base_person_info c
 			on a.person_id = c.id_
 		]]>

+ 1 - 1
common/src/main/resources/mapper/base/PersonDeviceLog.xml

@@ -85,7 +85,7 @@
 
     <select id="search" parameterType="hashmap" resultMap="PersonDeviceLogMap">
         <![CDATA[
-			select * from base_person_device_log a left join base_device_info b
+			select a.* from base_person_device_log a left join base_device_info b
 			on  a.device_no = b.device_no left join base_person_info c
 			on a.person_id = c.id_
 		]]>

+ 2 - 3
web/src/main/java/com/jpsoft/smart/modules/mobile/controller/IndividualLogApiController.java

@@ -201,7 +201,7 @@ public class IndividualLogApiController {
             SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
             SimpleDateFormat f = new SimpleDateFormat("MM-dd");
 
-            for (int j = 0; j < 3;j++) {
+            for (int j = 2; j >=0;j--) {
 
                 Map<String, Object> map = new HashMap<>();
 
@@ -210,8 +210,7 @@ public class IndividualLogApiController {
 
                 List<Map<String, Object>> list1 = new ArrayList<>();
 
-                for (int i = 0; i < 14; i++) {
-
+                for (int i = 13; i >=0; i--) {
                     Map<String, Object> map1 = new HashMap<>();
 
                     String startDate = sdf.format(DateTime.now().plusDays( - i-(j*14)).toDate());

+ 1 - 1
web/src/main/java/com/jpsoft/smart/modules/mobile/controller/PersonDeviceFilterLogController.java

@@ -108,7 +108,7 @@ public class PersonDeviceFilterLogController {
 
         try {
             List<Sort> sortList = new ArrayList<>();
-            sortList.add(new Sort("a.id_","asc"));
+            sortList.add(new Sort("a.record_time","desc"));
 
             Map<String,Object> searchParams = new HashMap<>();
             searchParams.put("personId",subject);