Browse Source

未测人员姓名显示修复

M墨鱼—_mo 5 năm trước cách đây
mục cha
commit
fe53695f95

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

@@ -31,4 +31,6 @@ public interface PersonInfoDAO {
     long countByCompanyListAndPopedom(@Param("type") String type, @Param("list") List<CompanyInfo> list);
 
 	long countStudentByCompanyListAndPopedom(@Param("type") String type, @Param("list")List<CompanyInfo> list);
+
+	PersonInfo findById(long id);
 }

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

@@ -30,4 +30,6 @@ public interface PersonInfoService {
 	long countByCompanyList(List<CompanyInfo> list);
 
 	long countByCompanyListAndPopedom(String type ,List<CompanyInfo> list);
+
+	PersonInfo findById(long longValue);
 }

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

@@ -111,6 +111,11 @@ public class PersonInfoServiceImpl implements PersonInfoService {
 		return 0L;
 	}
 
+	@Override
+	public PersonInfo findById(long longValue) {
+		return personInfoDAO.findById(longValue);
+	}
+
 	@Override
 	public PersonInfo getIgnoreDelFlag(Long id) {
 		return personInfoDAO.getIgnoreDelFlag(id);

+ 7 - 0
common/src/main/resources/mapper/base/PersonInfo.xml

@@ -320,4 +320,11 @@
         </foreach>
 
     </select>
+
+    <select id="findById" resultMap="PersonInfoMap">
+        select a.* from base_person_info a
+        where
+        a.id_=#{id} and a.del_flag = 0
+        order by a.id_ asc
+    </select>
 </mapper>

+ 2 - 2
web/src/main/java/com/jpsoft/smart/modules/base/controller/ReportController.java

@@ -53,7 +53,7 @@ public class ReportController {
     @ApiImplicitParams({
             @ApiImplicitParam(name = "timeRanges",value = "时间范围", paramType = "query")
     })
-    public MessageResult<Map> getCompanyRecordReport(@RequestParam(value="timeRanges") String timeRanges,@RequestAttribute String subject) {
+    public MessageResult<Map> getCompanyRecordReport(@RequestParam(value="timeRanges",defaultValue = "") String timeRanges,@RequestAttribute String subject) {
 
         MessageResult<Map> msgResult = new MessageResult<>();
         HashMap<String, Object> map = new HashMap<>();
@@ -112,7 +112,7 @@ public class ReportController {
                     List<PersonInfo> checkPersonList = new ArrayList<>();
                     if (personDeviceFilterLogs.size()>0){
                         for (PersonDeviceFilterLog personDeviceFilterLog : personDeviceFilterLogs){
-                            PersonInfo personInfo = personInfoService.get(personDeviceFilterLog.getPersonId().longValue());
+                            PersonInfo personInfo = personInfoService.findById(personDeviceFilterLog.getPersonId().longValue());
                             if (personInfo != null){
                                 checkPersonList.add(personInfo);
                             }