|
@@ -328,13 +328,6 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
|
|
HttpHeaders headers = new HttpHeaders();
|
|
HttpHeaders headers = new HttpHeaders();
|
|
ResponseEntity<byte[]> entity = restTemplate.exchange(url, HttpMethod.GET, new HttpEntity<>(headers), byte[].class);
|
|
ResponseEntity<byte[]> entity = restTemplate.exchange(url, HttpMethod.GET, new HttpEntity<>(headers), byte[].class);
|
|
byte[] body = entity.getBody();
|
|
byte[] body = entity.getBody();
|
|
- HttpHeaders respHeader = entity.getHeaders();
|
|
|
|
- System.out.println("================开始处理文件==========body size=" + body.length);
|
|
|
|
- System.out.println(respHeader.getContentType());
|
|
|
|
- System.out.println(respHeader.getContentLength());
|
|
|
|
- System.out.println(respHeader.getContentDisposition().getName());
|
|
|
|
- ContentDisposition contentDisposition = respHeader.getContentDisposition();
|
|
|
|
- System.out.println("文件名==" + contentDisposition.getFilename());
|
|
|
|
//写入文件
|
|
//写入文件
|
|
String fileName = mediaId + ".jpg";
|
|
String fileName = mediaId + ".jpg";
|
|
FileOutputStream fileOutputStream = new FileOutputStream(new File(path + fileName));
|
|
FileOutputStream fileOutputStream = new FileOutputStream(new File(path + fileName));
|
|
@@ -652,16 +645,7 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
|
|
UserCorpwxTime userCorpwxTime=new UserCorpwxTime();
|
|
UserCorpwxTime userCorpwxTime=new UserCorpwxTime();
|
|
userCorpwxTime.setCorpwxUserid((String) objects[i]);
|
|
userCorpwxTime.setCorpwxUserid((String) objects[i]);
|
|
userCorpwxTime.setCompanyId(corpInfo.getCompanyId());
|
|
userCorpwxTime.setCompanyId(corpInfo.getCompanyId());
|
|
- for (Integer integer : upList) {
|
|
|
|
- if(objects[i].equals("woy9TkCAAArkpTq76GOJYsbYGgzk1g1w")){
|
|
|
|
- System.out.println("上班"+DateTimeUtil.getTimeFromSeconds(integer));
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- for (Integer integer : downList) {
|
|
|
|
- if(objects[i].equals("woy9TkCAAArkpTq76GOJYsbYGgzk1g1w")){
|
|
|
|
- System.out.println("下班"+DateTimeUtil.getTimeFromSeconds(integer));
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
System.out.println(upList);
|
|
System.out.println(upList);
|
|
System.out.println(downList);
|
|
System.out.println(downList);
|
|
if(upList.isEmpty()||downList.isEmpty()){
|
|
if(upList.isEmpty()||downList.isEmpty()){
|
|
@@ -685,7 +669,11 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
|
|
userCorpwxTime.setWeekDayTxt(DateTimeUtil.getWeekDayTxt(userCorpwxTime.getWeekDay()));
|
|
userCorpwxTime.setWeekDayTxt(DateTimeUtil.getWeekDayTxt(userCorpwxTime.getWeekDay()));
|
|
BigDecimal bigDecimal=new BigDecimal(Duration.between(LocalTime.parse(minTime,df).plusHours(8),LocalTime.parse(maxTime,df).plusHours(8)).toMinutes());
|
|
BigDecimal bigDecimal=new BigDecimal(Duration.between(LocalTime.parse(minTime,df).plusHours(8),LocalTime.parse(maxTime,df).plusHours(8)).toMinutes());
|
|
bigDecimal=bigDecimal.divide(BigDecimal.valueOf(60),0,BigDecimal.ROUND_HALF_UP).subtract(new BigDecimal(restTime));
|
|
bigDecimal=bigDecimal.divide(BigDecimal.valueOf(60),0,BigDecimal.ROUND_HALF_UP).subtract(new BigDecimal(restTime));
|
|
- userCorpwxTime.setWorkHours(bigDecimal.doubleValue());
|
|
|
|
|
|
+ double time = bigDecimal.doubleValue();
|
|
|
|
+ if (time < 0) {
|
|
|
|
+ time = 0;
|
|
|
|
+ }
|
|
|
|
+ userCorpwxTime.setWorkHours(time);
|
|
System.out.println(userCorpwxTime);
|
|
System.out.println(userCorpwxTime);
|
|
UserCorpwxTime item;
|
|
UserCorpwxTime item;
|
|
if(userId!=null){
|
|
if(userId!=null){
|