| | |
| | | package com.product.administration.service; |
| | | |
| | | import cn.hutool.core.date.DateUnit; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.google.errorprone.annotations.Var; |
| | | import com.google.zxing.BarcodeFormat; |
| | | import com.google.zxing.EncodeHintType; |
| | | import com.google.zxing.MultiFormatWriter; |
| | |
| | | import java.io.IOException; |
| | | import java.text.DecimalFormat; |
| | | import java.text.Format; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public String ConferenceSign(FieldSetEntity fse) throws BaseException, ParseException { |
| | | |
| | | |
| | | JSONObject jsonObject = new JSONObject(); |
| | | /* if(!StringUtils.isEmpty(fse.getString("uuid"))&&!StringUtils.isEmpty(fse.getString("date"))){*/ |
| | | /*String uuid = fse.getString("uuid"); |
| | | String date = fse.getString("date"); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | Date parseDate = dateFormat.parse(date); |
| | | long between = DateUtil.between(parseDate, new Date(), DateUnit.SECOND);*/ |
| | | String uuid="5591f2ea-b7bd-49c4-999a-9a1045edc717"; |
| | | /* if(between>20){ |
| | | jsonObject.put("code","200"); |
| | | jsonObject.put("msg","二维码已失效"); |
| | | jsonObject.put("status","fail"); |
| | | |
| | | }else {*/ |
| | | |
| | | SystemUser currentUser = SpringMVCContextHolder.getCurrentUser(); |
| | | FieldSetEntity fieldSetEntity = new FieldSetEntity(); |
| | | fieldSetEntity.setTableName("product_oa_conference_sign"); |
| | | fieldSetEntity.setValue("sign_user",currentUser.getUser_name()); |
| | | fieldSetEntity.setValue("user_id",currentUser.getUser_id()); |
| | | fieldSetEntity.setValue("org_level_uuid","00000000-0000-0000-0000-000000000000"); |
| | | fieldSetEntity.setValue("organization",currentUser.getDept_uuid()); |
| | | fieldSetEntity.setValue("organization_name",currentUser.getCurrentDept().getString("org_level_name")); |
| | | fieldSetEntity.setValue("sign_date",new Date()); |
| | | fieldSetEntity.setValue("sign_status","已签到"); |
| | | fieldSetEntity.setValue("meeting_uuid",uuid); |
| | | |
| | | // BaseUtil.createCreatorAndCreationTime(SpringMVCContextHolder.getCurrentUser(), fse); |
| | | baseDao.add(fieldSetEntity); |
| | | jsonObject.put("code","200"); |
| | | jsonObject.put("msg","签到成功"); |
| | | jsonObject.put("status","sucess"); |
| | | /* }*/ |
| | | /* }*/ |
| | | |
| | | return jsonObject.toString(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 会议室使用情况 |