| | |
| | | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.mongodb.client.result.DeleteResult; |
| | | import com.ycl.calculate.CalculationStrategy; |
| | | import com.ycl.factory.IndexCalculationFactory; |
| | | import com.ycl.platform.domain.param.HK.*; |
| | | import com.ycl.platform.domain.result.BaseResult; |
| | | import com.ycl.platform.domain.result.HK.*; |
| | | import com.ycl.platform.service.ICheckIndexCarService; |
| | | import com.ycl.platform.service.ICheckIndexFaceService; |
| | |
| | | import org.springframework.data.mongodb.core.query.Query; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.unit.DataUnit; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | |
| | | //解析数据 |
| | | private <T> List<T> getDataList(JSONObject faceJsonObject, Class<T> resultClass, String message) { |
| | | if (faceJsonObject != null && ApiConstants.successCode.equals(faceJsonObject.getString("code"))) { |
| | | if (faceJsonObject != null && ApiConstants.HKSuccessCode.equals(faceJsonObject.getString("code"))) { |
| | | JSONObject data = faceJsonObject.getJSONObject("data"); |
| | | if (data == null) { |
| | | log.error(message, faceJsonObject); |
| | |
| | | if (CollectionUtils.isEmpty(list)) { |
| | | log.error(message, data); |
| | | return null; |
| | | } |
| | | for (T t : list) { |
| | | if (t instanceof BaseResult) { |
| | | ((BaseResult) t).setCreateTime(new Date()); |
| | | } |
| | | } |
| | | return list; |
| | | } else { |