|
@@ -13,6 +13,7 @@ import com.jpsoft.smart.modules.common.utils.BASE64DecodedMultipartFile;
|
|
import com.jpsoft.smart.modules.common.utils.Base64;
|
|
import com.jpsoft.smart.modules.common.utils.Base64;
|
|
import com.jpsoft.smart.modules.common.utils.LApiUtil;
|
|
import com.jpsoft.smart.modules.common.utils.LApiUtil;
|
|
import com.jpsoft.smart.modules.common.utils.OSSUtil;
|
|
import com.jpsoft.smart.modules.common.utils.OSSUtil;
|
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
@@ -35,6 +36,7 @@ import java.util.UUID;
|
|
* @author 墨鱼_mo
|
|
* @author 墨鱼_mo
|
|
* @date 2020-3-15 14:12
|
|
* @date 2020-3-15 14:12
|
|
*/
|
|
*/
|
|
|
|
+@Slf4j
|
|
@Transactional
|
|
@Transactional
|
|
@Component(value="personDeviceLogService")
|
|
@Component(value="personDeviceLogService")
|
|
public class PersonDeviceLogServiceImpl implements PersonDeviceLogService {
|
|
public class PersonDeviceLogServiceImpl implements PersonDeviceLogService {
|
|
@@ -88,15 +90,28 @@ public class PersonDeviceLogServiceImpl implements PersonDeviceLogService {
|
|
PersonDeviceLog personDeviceLog = new PersonDeviceLog();
|
|
PersonDeviceLog personDeviceLog = new PersonDeviceLog();
|
|
personDeviceLog.setId(UUID.randomUUID().toString());
|
|
personDeviceLog.setId(UUID.randomUUID().toString());
|
|
personDeviceLog.setDeviceNo(deviceNo);
|
|
personDeviceLog.setDeviceNo(deviceNo);
|
|
- if (!StringUtils.isBlank(matchPersonInfo.getStr("PersonCode"))){
|
|
|
|
|
|
+ if (!libMatInfoListJson.getStr("MatchPersonID").equals("0") && StringUtils.isNotBlank(matchPersonInfo.getStr("PersonCode"))){
|
|
personDeviceLog.setPersonId(matchPersonInfo.getInt("PersonCode"));
|
|
personDeviceLog.setPersonId(matchPersonInfo.getInt("PersonCode"));
|
|
- }else {
|
|
|
|
|
|
+ }else if (!libMatInfoListJson.getStr("MatchPersonID").equals("0") && StringUtils.isBlank(matchPersonInfo.getStr("PersonCode")) && StringUtils.isNotBlank(matchPersonInfo.getStr("PersonName"))){
|
|
|
|
+ String personName = matchPersonInfo.getStr("PersonName");
|
|
|
|
+ if (personName.contains("_")){
|
|
|
|
+ log.warn(personName+"校验成功但未找到personCode");
|
|
|
|
+ Integer personId =Integer.valueOf(personName.substring(personName.indexOf("_")+1)) ;
|
|
|
|
+ personDeviceLog.setPersonId(personId);
|
|
|
|
+ }else {
|
|
|
|
+ log.warn(personName+"校验成功但姓名中无personCode后缀");
|
|
|
|
+ personDeviceLog.setPersonId(0);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ else {
|
|
personDeviceLog.setPersonId(0);
|
|
personDeviceLog.setPersonId(0);
|
|
}
|
|
}
|
|
|
|
|
|
personDeviceLog.setTemperature(temperature);
|
|
personDeviceLog.setTemperature(temperature);
|
|
if (StringUtils.isNotBlank(libMatInfoListJson.getStr("MatchStatus"))){
|
|
if (StringUtils.isNotBlank(libMatInfoListJson.getStr("MatchStatus"))){
|
|
- System.out.println();
|
|
|
|
personDeviceLog.setMatchStatus(libMatInfoListJson.getInt("MatchStatus"));
|
|
personDeviceLog.setMatchStatus(libMatInfoListJson.getInt("MatchStatus"));
|
|
personDeviceLog.setMatchMsg(LApiUtil.getMatchMsg(libMatInfoListJson.getInt("MatchStatus")));
|
|
personDeviceLog.setMatchMsg(LApiUtil.getMatchMsg(libMatInfoListJson.getInt("MatchStatus")));
|
|
personDeviceLog.setMatchFaceId(libMatInfoListJson.getInt("MatchFaceID"));
|
|
personDeviceLog.setMatchFaceId(libMatInfoListJson.getInt("MatchFaceID"));
|