| | |
| | | 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 com.product.core.dao.BaseDao; |
| | | import com.product.core.entity.DataTableEntity; |
| | | import com.product.core.entity.FieldSetEntity; |
| | | import com.product.core.entity.RequestParameterEntity; |
| | | import com.product.core.exception.BaseException; |
| | | import com.product.core.permission.PermissionService; |
| | | import com.product.core.service.support.AbstractBaseService; |
| | | import com.product.core.service.support.QueryFilterService; |
| | | import com.product.core.spring.context.SpringMVCContextHolder; |
| | | import com.product.core.transfer.Transactional; |
| | | import com.product.core.util.QuickResponUtil; |
| | | import com.product.core.websocket.service.WebsocketMesssageServiceThread; |
| | | import com.product.module.sys.entity.SystemUser; |
| | | import com.product.util.BaseUtil; |
| | | import org.apache.poi.hssf.usermodel.HSSFCellStyle; |
| | | import org.omg.CORBA.OBJ_ADAPTER; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.imageio.ImageIO; |
| | | import java.awt.image.BufferedImage; |
| | | import java.io.File; |
| | | |
| | | import java.io.IOException; |
| | | import java.text.DecimalFormat; |
| | | import java.text.Format; |
| | |
| | | |
| | | String meeting_uuid = fse.getString("meeting_uuid"); |
| | | //type=1就是签到数据,type=2就是访问数据 |
| | | String type = fse.getString("type"); |
| | | String type = fse.getString("type"); |
| | | List<Object> params=new ArrayList<>(); |
| | | params.add(meeting_uuid); |
| | | params.add(meeting_uuid); |
| | |
| | | return hashMapResult; |
| | | } |
| | | |
| | | @Override |
| | | public void sendMsg(FieldSetEntity fse) throws BaseException { |
| | | |
| | | String meeting_uuid= fse.getString("meeting_uuid"); |
| | | String type = fse.getString("type"); |
| | | FieldSetEntity product_oa_conference_apply = baseDao.getFieldSetEntity("product_oa_conference_apply", meeting_uuid, false); |
| | | |
| | | List<Object> params=new ArrayList<>(); |
| | | params.add(meeting_uuid); |
| | | params.add(meeting_uuid); |
| | | |
| | | StringBuilder sb=new StringBuilder(); |
| | | sb.append(" SELECT c.* FROM ( "); |
| | | sb.append(" SELECT b.staff_id,b.uuid as meeting_uuid,f.show_name,l.uuid as dept_uuid,l.org_level_name,"); |
| | | if(type.equals("1")){ |
| | | sb.append(" n.sign_status"); |
| | | }else { |
| | | sb.append(" n.visit_status"); |
| | | } |
| | | sb.append(" FROM (" ); |
| | | sb.append(" SELECT y.*, "); |
| | | sb.append(" SUBSTRING_INDEX( SUBSTRING_INDEX( participator, ',', n ), ',', - 1 ) AS staff_id"); |
| | | sb.append(" FROM product_oa_conference_apply y, "); |
| | | sb.append(" ( SELECT @rownum := @rownum + 1 AS n FROM ( SELECT @rownum := 0 ) r, product_oa_conference_apply ) x "); |
| | | sb.append(" WHERE 1 = 1 "); |
| | | sb.append(" AND n <= ( LENGTH( participator ) - LENGTH( REPLACE ( participator, ',', '' ) ) + 1 )"); |
| | | sb.append(" and y.uuid= ? "); |
| | | sb.append(" )b "); |
| | | sb.append(" LEFT JOIN product_sys_staffs f on b.staff_id=f.user_id "); |
| | | sb.append(" LEFT JOIN product_sys_org_levels l on f.dept_uuid=l.uuid "); |
| | | if(type.equals("1")){ |
| | | sb.append(" LEFT JOIN product_oa_conference_sign n "); |
| | | }else { |
| | | sb.append(" LEFT JOIN product_oa_conference_visit n "); |
| | | } |
| | | sb.append(" on b.staff_id=n.user_id and n.meeting_uuid=? "); |
| | | sb.append(" )c"); |
| | | if(type.equals("1")){ |
| | | sb.append(" where c.sign_status is NULL"); |
| | | }else { |
| | | sb.append(" where c.visit_status is NULL"); |
| | | } |
| | | |
| | | DataTableEntity dataTableEntity = baseDao.listTable(sb.toString(), params.toArray()); |
| | | String user_ids = ""; |
| | | for (int i = 0; i < dataTableEntity.getRows(); i++) { |
| | | FieldSetEntity fieldSetEntity = dataTableEntity.getFieldSetEntity(i); |
| | | if((i+1)==dataTableEntity.getRows()){ |
| | | user_ids=user_ids+fieldSetEntity.getString("staff_id"); |
| | | }else { |
| | | user_ids=user_ids+fieldSetEntity.getString("staff_id")+","; |
| | | } |
| | | |
| | | } |
| | | String content=""; |
| | | if(type.equals("1")){ |
| | | content="会议将开始签到,"+product_oa_conference_apply.getString("meeting_topic")+"-"+product_oa_conference_apply.getString("start_time")+",请按时签到"; |
| | | }else { |
| | | content="您有场会议需要参与,"+product_oa_conference_apply.getString("meeting_topic")+"-"+product_oa_conference_apply.getString("start_time")+",请查看会议详情"; |
| | | } |
| | | SystemUser currentUser = SpringMVCContextHolder.getCurrentUser(); |
| | | int user_id = currentUser.getUser_id(); |
| | | String send_user=user_id+""; |
| | | String reminder_mode = product_oa_conference_apply.getString("reminder_mode"); |
| | | /* //短信 |
| | | if(reminder_mode.equals("0")){ |
| | | } |
| | | //邮件 |
| | | if(reminder_mode.equals("1")){ |
| | | |
| | | } |
| | | //系统消息 |
| | | if(reminder_mode.equals("2")){ |
| | | |
| | | }*/ |
| | | WebsocketMesssageServiceThread.getInstance().appendMessage(user_ids, content, "会议提醒", 1,"1", "", "", send_user, 1, 0, 0); |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 会议室使用情况 |