Forráskód Böngészése

食堂就餐统计BUG修改

yanliming 4 éve
szülő
commit
fc7a5a7447

+ 0 - 1
common/src/main/java/com/jpsoft/shinestar/modules/base/dao/CanteenDiningRecordDAO.java

@@ -32,5 +32,4 @@ public interface CanteenDiningRecordDAO {
 
 	List<Map> canteenHqPersonList(Map<String,Object> searchParams,List<Sort> sortList);
 
-
 }

+ 2 - 0
common/src/main/java/com/jpsoft/shinestar/modules/base/dao/PersonInfoDAO.java

@@ -71,5 +71,7 @@ public interface PersonInfoDAO {
 
 	PersonInfo findJobNumber(String jobNumber);
 
+	List<PersonInfo> findByHq();
+
 	int updateNullForHqSortNo(Long personId);
 }

+ 2 - 0
common/src/main/java/com/jpsoft/shinestar/modules/base/service/PersonInfoService.java

@@ -77,5 +77,7 @@ public interface PersonInfoService {
 
 	PersonInfo findJobNumber(String jobNumber);
 
+	List<PersonInfo> findByHq();
+
 	int updateNullForHqSortNo(Long personId);
 }

+ 5 - 0
common/src/main/java/com/jpsoft/shinestar/modules/base/service/impl/PersonInfoServiceImpl.java

@@ -525,4 +525,9 @@ public class PersonInfoServiceImpl implements PersonInfoService {
         return personInfoDAO.updateNullForHqSortNo(personId);
     }
 
+    @Override
+    public List<PersonInfo> findByHq(){
+        return personInfoDAO.findByHq();
+    }
+
 }

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

@@ -115,6 +115,7 @@
 	<select id="findByPersonId" resultMap="CanteenDiningRecordMap">
 		select * from base_canteen_dining_record where del_flag=false and person_id = #{0}
 	</select>
+
 	<select id="findCountByPersonIdAndAddress" resultType="int">
 		select count(*) from base_canteen_dining_record
 		<where>

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

@@ -769,6 +769,8 @@
     <select id="findJobNumber" resultMap="PersonInfoMap">
         select * from base_person_info where del_flag=false and job_number = #{0} limit 1
     </select>
-
+    <select id="findByHq" resultMap="PersonInfoMap">
+        select * from base_person_info where del_flag=false and hq_status='1' or hq_status='2'
+    </select>
 
 </mapper>

+ 7 - 8
web/src/main/java/com/jpsoft/shinestar/modules/base/controller/CanteenDiningRecordController.java

@@ -71,6 +71,7 @@ public class CanteenDiningRecordController {
     @Autowired
     private UserCompanyService userCompanyService;
 
+
     @Autowired
     private PersonDeviceLogService personDeviceLogService;
 
@@ -260,7 +261,7 @@ public class CanteenDiningRecordController {
             Map<String, Object> searchParams = new HashMap<>();
 
             List<Sort> sortList = new ArrayList<>();
-            sortList.add(new Sort("a.record_time", "desc"));
+            sortList.add(new Sort("a.create_time", "desc"));
 
             if (personId != null) {
                 searchParams.put("personId", personId);
@@ -349,10 +350,7 @@ public class CanteenDiningRecordController {
                     }
                 }
 
-                if(canteenDiningRecord.getRecordTime()!=null) {
-                    map.put("recordTime", sdf.format(canteenDiningRecord.getRecordTime()));
-                }
-
+                map.put("createTime",sdf.format(canteenDiningRecord.getCreateTime()));
                 map.put("categoryAmount",canteenDiningRecord.getCategoryAmount());
                 map.put("address",canteenDiningRecord.getAddress());
                 map.put("personName",personName);
@@ -1031,7 +1029,7 @@ public class CanteenDiningRecordController {
 
         return messageResult;
     }
-    
+
     @GetMapping("batchUpdate")
     @ApiOperation(value="更新食堂就餐记录")
     public MessageResult<Integer> batchUpdate(Long personId,String deviceNo,
@@ -1083,11 +1081,12 @@ public class CanteenDiningRecordController {
         }
         catch (Exception ex){
             logger.error(ex.getMessage(),ex);
-    
+
             messageResult.setResult(false);
             messageResult.setMessage(ex.getMessage());
         }
-    
+
         return messageResult;
+
     }
 }

+ 1 - 1
web/src/main/java/com/jpsoft/shinestar/modules/base/controller/CanteenOutsourcerBalanceController.java

@@ -429,7 +429,7 @@ public class CanteenOutsourcerBalanceController {
                     }
                 }
 
-                map.put("createTime",sdf.format(canteenDiningRecord.getCreateTime()));
+                map.put("recordTime",sdf.format(canteenDiningRecord.getRecordTime()));
                 map.put("categoryAmount",canteenDiningRecord.getCategoryAmount());
                 map.put("address",canteenDiningRecord.getAddress());
                 map.put("personName",personName);