Commit 537b47f1 by 朱天成

会议修改

parent ed082ac0
......@@ -45,12 +45,11 @@ var is_column = [ [
{field : 'MEETING_NAME',title : '会议名称',width : 100,align : 'center'},
{field : 'MEETING_CONTENT',title : '会议内容',width : 300,align : 'center'},
{field : 'VENUE',title : '会议地址',width : 300,align : 'center'},
{field : 'HOST',title : '主持人',width : 80,align : 'center'},
{field : 'START_TIME',title : '开始时间',width : 150,align : 'center'},
{field : 'END_TIME',title : '结束时间',width : 150,align : 'center'},
{field : 'CREATE_ID',title : '创建人',width : 80,align : 'center'},
{field : 'CREATE_TIME',title : '创建时间',width : 150,align : 'center'},
{field : 'UPDATE_ID',title : '修改人',width : 80,align : 'center'},
{field : 'UPDATE_TIME',title : '修改时间',width : 150,align : 'center'}
{field : 'CHECK_START_TIME',title : '签到开始时间',width : 150,align : 'center'},
{field : 'CHECK_END_TIME',title : '签到结束时间',width : 150,align : 'center'}
] ];
//列表加载完成回调
function dataOnLoadSuccess(){
......
......@@ -11,6 +11,15 @@
<input class="easyui-textbox" id="MEETING_NAME" name="FIELD_MEETING_NAME" style="width:600px" required=true value="${is_row.MEETING_NAME}"/>
</td>
</tr>
<tr>
<td style="width: 15%;" class="tableStyleLable">
<span>主持人:</span>
</td>
<td style="width: 85%">
<input class="easyui-textbox" id="HOST" name="FIELD_HOST" style="width:600px" required=true value="${is_row.HOST}"/>
</td>
</tr>
<tr>
<tr>
<td class="tableStyleLable" valign="top" style="height:160px">
<span>会议内容:</span>
......@@ -39,5 +48,17 @@
<input id="END_TIME" name="FIELD_END_TIME" type="text" value="${is_row.END_TIME}" >
</td>
</tr>
<tr>
<td style="width: 20%;" class="tableStyleLable">
<span>
会议签到时间:
</span>
</td>
<td style="width: 80%">
<input class="easyui-datetimebox" required id="CHECK_START_TIME" name="FIELD_CHECK_START_TIME" value="${is_row.CHECK_START_TIME}" />
<span>到</span>
<input class="easyui-datetimebox" required id="CHECK_END_TIME" name="FIELD_CHECK_END_TIME" type="text" value="${is_row.CHECK_END_TIME}" >
</td>
</tr>
</table>
</form>
\ No newline at end of file
package com.jw.app.business.meeting;
import java.sql.SQLException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
......@@ -13,6 +16,7 @@ import org.apache.ibatis.session.RowBounds;
import com.jw.app.business.MeetingBusiness;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.Page;
import com.gaowj.business.util.QueryParamUtil;
import com.gaowj.business.util.SessionUtil;
import com.gaowj.standard.utils.CacheKit;
......@@ -55,31 +59,44 @@ public class MeetingBusinessImpl implements MeetingBusiness {
@Override
public void insert_check_in(Map<String, Object> entity) throws BusinessException {
List<Map<String, Object>> items = meetingDAO.list_check_in(entity);
if (items.size() == 0) {
entity.put("UUID", java.util.UUID.randomUUID().toString());
entity.put("PARTICIPANTS_ID", SessionUtil.getCode());
entity.put("PARTICIPANTS_NAME", SessionUtil.getEmname());
entity.put("CHECK_IN_TIME", new Date());
entity.put("CREATE_ID", SessionUtil.getCode());
entity.put("CREATE_TIME", new Date());
entity.put("UPDATE_ID", SessionUtil.getCode());
entity.put("UPDATE_TIME", new Date());
// 动态传值插入
List<String> infoListKey = new ArrayList<String>();
List<Object> infoList = new ArrayList<Object>();
if (entity.keySet() != null) {
Set<String> key = entity.keySet();
// 将map集合中的key和value 取出来分别放到list集合里
for (String str : key) {
infoList.add(entity.get(str));
infoListKey.add(str);
List<Map<String, Object>> timeList = meetingDAO.list_checkTime(entity);
Map<String, Object> timeMap = timeList.get(0);
SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
try {
Date startTime=sf.parse((String)timeMap.get("CHECK_START_TIME"));
Date endTime=sf.parse((String)timeMap.get("CHECK_END_TIME"));
Date thistime = new Date();
if (thistime.after(startTime) && thistime.before(endTime)) {
List<Map<String, Object>> items = meetingDAO.list_check_in(entity);
if (items.size() == 0) {
entity.put("UUID", java.util.UUID.randomUUID().toString());
entity.put("PARTICIPANTS_ID", SessionUtil.getCode());
entity.put("PARTICIPANTS_NAME", SessionUtil.getEmname());
entity.put("CHECK_IN_TIME", new Date());
entity.put("CREATE_ID", SessionUtil.getCode());
entity.put("CREATE_TIME", new Date());
entity.put("UPDATE_ID", SessionUtil.getCode());
entity.put("UPDATE_TIME", new Date());
// 动态传值插入
List<String> infoListKey = new ArrayList<String>();
List<Object> infoList = new ArrayList<Object>();
if (entity.keySet() != null) {
Set<String> key = entity.keySet();
// 将map集合中的key和value 取出来分别放到list集合里
for (String str : key) {
infoList.add(entity.get(str));
infoListKey.add(str);
}
entity.put("infoListKey", infoListKey);
entity.put("infoList", infoList);
// 插入
meetingDAO.insert_check_in(entity);
}
}
entity.put("infoListKey", infoListKey);
entity.put("infoList", infoList);
// 插入
meetingDAO.insert_check_in(entity);
}
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
......@@ -173,10 +190,9 @@ public class MeetingBusinessImpl implements MeetingBusiness {
@Override
public List<Map<String, Object>> list_meeting(Map<String, Object> query) throws BusinessException {
List<Map<String, Object>> list_data = CacheKit.get("ehcache10", "meeting" + query);
List<Map<String, Object>> list_data = null;
if (list_data == null || list_data.size() == 0) {
list_data = meetingDAO.list_meeting(query);
CacheKit.put("ehcache10", "kqmk" + query, list_data);
}
return list_data;
}
......
......@@ -30,5 +30,7 @@ public interface meetingDAO {
List<Map<String, Object>> list_check_in(Map<String, Object> query) throws BusinessException;
int listCount_check_in(Map<String, Object> query) throws BusinessException;
List<Map<String, Object>> list_checkTime(Map<String, Object> query) throws BusinessException;
}
......@@ -166,6 +166,12 @@
) f
<include refid="WHERE"></include>
</select>
<select id="list_checkTime" parameterType="map" resultType="upperCaseKeyMap">
select *
from MEETING_MANAGE
where UUID=#{MEETING_ID}
</select>
<select id="list_check_in" parameterType="map" resultType="upperCaseKeyMap">
select check_in.*,info.real_name,unit.name,info.telephone
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment