|
@@ -6,6 +6,7 @@ import com.jpsoft.smart.modules.base.entity.*;
|
|
|
import com.jpsoft.smart.modules.base.service.*;
|
|
|
import com.jpsoft.smart.modules.common.dto.MessageResult;
|
|
|
import com.jpsoft.smart.modules.common.dto.Sort;
|
|
|
+import com.jpsoft.smart.modules.common.utils.JwtUtil;
|
|
|
import com.jpsoft.smart.modules.common.utils.PojoUtils;
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
@@ -15,16 +16,21 @@ import org.joda.time.DateTime;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.format.annotation.DateTimeFormat;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
+import java.net.URLDecoder;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
|
|
|
@RestController
|
|
|
@RequestMapping("/mobile/PersonDeviceFilterLog")
|
|
|
public class PersonDeviceFilterLogController {
|
|
|
+ @Value("${jwt.secret}")
|
|
|
+ private String jwtSecret;
|
|
|
+
|
|
|
private Logger logger = LoggerFactory.getLogger(getClass());
|
|
|
|
|
|
@Autowired
|
|
@@ -168,22 +174,23 @@ public class PersonDeviceFilterLogController {
|
|
|
@ApiImplicitParam(name="companyId",value = "公司编号",required = false,paramType = "form"),
|
|
|
@ApiImplicitParam(name = "queryDate",value = "查询日期(yyyy-MM-dd)",required = true, paramType = "form"),
|
|
|
@ApiImplicitParam(name="alarmConfigId",value = "考勤设置编号",required = false,paramType = "form"),
|
|
|
- @ApiImplicitParam(name="token",value = "令牌",required = true,paramType = "form"),
|
|
|
- @ApiImplicitParam(name="subject",value = "目标(不传)",paramType = "form")
|
|
|
+ @ApiImplicitParam(name="token",value = "令牌",required = false,paramType = "form")
|
|
|
})
|
|
|
public MessageResult<Map> queryUnmeasureGroupList(
|
|
|
String companyId,
|
|
|
@DateTimeFormat(pattern = "yyyy-MM-dd") Date queryDate,
|
|
|
String alarmConfigId,
|
|
|
- @RequestAttribute String subject,
|
|
|
String token){
|
|
|
MessageResult<Map> msgResult = new MessageResult<>();
|
|
|
Map<String,Object> dataMap = new HashMap<>();
|
|
|
|
|
|
try{
|
|
|
- PersonInfo personInfo = personInfoService.get(Long.valueOf(subject));
|
|
|
-
|
|
|
if (StringUtils.isEmpty(companyId)){
|
|
|
+ token = URLDecoder.decode(token,"UTF-8");
|
|
|
+
|
|
|
+ String subject = JwtUtil.decodeToken(jwtSecret,token);
|
|
|
+
|
|
|
+ PersonInfo personInfo = personInfoService.get(Long.valueOf(subject));
|
|
|
companyId = personInfo.getCompanyId();
|
|
|
}
|
|
|
|