新增非空判断, 调整日志位置
This commit is contained in:
parent
b7ca5fcffd
commit
3d5a53ef71
@ -200,10 +200,10 @@ public class PunchTheClockServiceImpl implements PunchTheClockService {
|
||||
public String recordFace(String json){
|
||||
//解析收到的数据
|
||||
JSONObject jsonObject = JSONObject.parseObject(json);
|
||||
log.info("获取打卡信息{}", jsonObject.toString());
|
||||
String userId = jsonObject.getString("user_id");
|
||||
String sn = jsonObject.getString("sn");
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
SimpleDateFormat sdfd = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Date date = null; //打卡时间
|
||||
try{
|
||||
date = sdf.parse(jsonObject.getString("recog_time"));
|
||||
@ -219,7 +219,6 @@ public class PunchTheClockServiceImpl implements PunchTheClockService {
|
||||
//根据顺序获取打卡规则
|
||||
EqButton eqButton = bt_list.get(Integer.parseInt(button)-1);
|
||||
String rules = eqButton.getName(); //打卡规则
|
||||
log.info("获取打卡信息{}", jsonObject.toString());
|
||||
Map<String, PunchTheClockStrategyExchangeProcessor> mqttRequestExchangeProcessorMap = applicationContext.getBeansOfType(PunchTheClockStrategyExchangeProcessor.class);
|
||||
for (PunchTheClockStrategyExchangeProcessor processor : mqttRequestExchangeProcessorMap.values()) {
|
||||
if(processor.accept(sn)){
|
||||
|
||||
@ -112,14 +112,16 @@ public class KingdeeRequestUtils {
|
||||
Map<String, Object> resultMap = Collections.emptyMap();
|
||||
if(resultArray != null && resultArray.size() > 0){
|
||||
JSONObject result = resultArray.getJSONObject(0);
|
||||
resultMap.put("FSTAFFID", result.getInteger("FSTAFFID"));
|
||||
if(result != null){
|
||||
resultMap.put("FSTAFFID", result.getInteger("FSTAFFID"));
|
||||
}
|
||||
}
|
||||
return JSON.toJSONString(resultMap);
|
||||
}
|
||||
|
||||
|
||||
private static JSONArray request(Map<String, String> params, BaseEnum paramEnum){
|
||||
log.error("{}====> 接口调用, 参数为:{} ", paramEnum.getDes(), JSON.toJSONString(params));
|
||||
log.info("{}====> 接口调用, 参数为:{} ", paramEnum.getDes(), JSON.toJSONString(params));
|
||||
String requestParam = buildParams(params, paramEnum);
|
||||
String resultJson = "";
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user