huwhois лет назад: 5
Родитель
Сommit
ca984d1ba0

+ 1 - 0
src/main/java/io/renren/modules/admin/controller/AttendersController.java

27
import io.renren.modules.admin.entity.AttendersEntity;
27
import io.renren.modules.admin.entity.AttendersEntity;
28
import io.renren.modules.admin.entity.ExcelEntity;
28
import io.renren.modules.admin.entity.ExcelEntity;
29
import io.renren.modules.admin.entity.MemberEntity;
29
import io.renren.modules.admin.entity.MemberEntity;
30
import io.renren.modules.admin.entity.PaymentEntity;
30
import io.renren.modules.admin.service.AttendersService;
31
import io.renren.modules.admin.service.AttendersService;
31
import io.renren.modules.admin.service.MemberService;
32
import io.renren.modules.admin.service.MemberService;
32
import io.renren.common.utils.ExcelUtils;
33
import io.renren.common.utils.ExcelUtils;

+ 80 - 4
src/main/java/io/renren/modules/admin/controller/SignInfoController.java

68
        return R.ok().put("page", page);
68
        return R.ok().put("page", page);
69
    }
69
    }
70
70
71
    @GetMapping("/listreg")
72
    @RequiresPermissions("admin:signinfo:list")
73
    public R listReg(@RequestParam Map<String, Object> params){
74
        params.put("regflag", 2);      // 现场注册
75
        return list(params);
76
    }
77
71
    /**
78
    /**
72
     * 信息
79
     * 信息
73
     */
80
     */
79
        return R.ok().put("signInfo", signInfo);
86
        return R.ok().put("signInfo", signInfo);
80
    }
87
    }
81
88
82
    @GetMapping("/downloadxls")
89
    public String setStringBoolen(Integer value) {
90
        return (value == 1) ? "是" : "否";
91
    }
92
93
    @GetMapping("/downloadxlssign")
83
    @RequiresPermissions("admin:signinfo:list")
94
    @RequiresPermissions("admin:signinfo:list")
84
    public void makeExcel(HttpServletResponse response, @RequestParam Map<String, Object> params) throws Exception {
95
    public void makeExcel(HttpServletResponse response, @RequestParam Map<String, Object> params) throws Exception {
85
        if (!params.containsKey("meetingId")) {
96
        if (!params.containsKey("meetingId")) {
118
            row.add(signInfoEntity.getPosition());
129
            row.add(signInfoEntity.getPosition());
119
            row.add(signInfoEntity.getPhone());
130
            row.add(signInfoEntity.getPhone());
120
            row.add(signInfoEntity.getTypeAttenders());
131
            row.add(signInfoEntity.getTypeAttenders());
121
            row.add(signInfoEntity.getIsPay());
122
            row.add(signInfoEntity.getStatus());
123
            row.add(signInfoEntity.getBadge());
132
            row.add(setStringBoolen(signInfoEntity.getIsPay()));
133
            row.add(setStringBoolen(signInfoEntity.getStatus()));
134
            row.add(setStringBoolen(signInfoEntity.getBadge()));
124
            row.add(signInfoEntity.getServername());
135
            row.add(signInfoEntity.getServername());
125
            String lastTime = lastdate.format(signInfoEntity.getLastTime());
136
            String lastTime = lastdate.format(signInfoEntity.getLastTime());
126
            row.add(lastTime);
137
            row.add(lastTime);
141
        ExcelUtils.exportExcel(data, response.getOutputStream());
152
        ExcelUtils.exportExcel(data, response.getOutputStream());
142
    }
153
    }
143
154
155
    @GetMapping("/downloadxlsreg")
156
    @RequiresPermissions("admin:signinfo:list")
157
    public void downloadRgeData(HttpServletResponse response, @RequestParam Map<String, Object> params) throws Exception {
158
        if (!params.containsKey("meetingId")) {
159
            throw new Exception("会议id不可为空");
160
        }
161
        String meetingName = params.containsKey("meetingName") ? params.get("meetingName").toString() : "";
162
       
163
        ExcelEntity data = new ExcelEntity();
164
        data.setName(meetingName + "现场注册数据");
165
        //添加表头
166
        List<String> titles = new ArrayList<String>();
167
        titles.add("序号");
168
        titles.add("姓名");
169
        titles.add("所属机构");
170
        titles.add("联系电话");
171
        titles.add("是否缴费");
172
        titles.add("金额");
173
        titles.add("签到状态");
174
        titles.add("胸卡打印");
175
        titles.add("负责人");
176
        titles.add("注册时间");
177
        titles.add("最后签到时间");
178
        data.setTitles(titles);
179
        // 添加列
180
        List<List<Object>> rows = new ArrayList<List<Object>>();
181
        List<Object> row = null;
182
        int i = 0;
183
184
        params.put("regflag", 2);      // 现场注册
185
        List<SignInfoEntity> sEntities = signInfoService.getList(params);
186
        SimpleDateFormat date=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
187
        for (SignInfoEntity signInfoEntity : sEntities) {
188
            row = new ArrayList<Object>();
189
            row.add(i + 1);
190
            row.add(signInfoEntity.getTruename());
191
            row.add(signInfoEntity.getOrganization());
192
            row.add(signInfoEntity.getPhone());
193
            row.add(setStringBoolen(signInfoEntity.getIsPay()));
194
            row.add(signInfoEntity.getMoney());
195
            row.add(setStringBoolen(signInfoEntity.getStatus()));
196
            row.add(setStringBoolen(signInfoEntity.getBadge()));
197
            row.add(signInfoEntity.getServername());
198
            String regtime = date.format(signInfoEntity.getCreateTime());
199
            row.add(regtime);
200
            String lastTime = date.format(signInfoEntity.getLastTime());
201
            row.add(lastTime);
202
            rows.add(row);
203
            row = null;
204
            i++;
205
        }
206
        data.setRows(rows);
207
        SimpleDateFormat fdate=new SimpleDateFormat("yyyyMMddHHmmss");
208
        String fileName=fdate.format(new Date())+".xlsx";
209
210
        // 告诉浏览器用什么软件可以打开此文件
211
        response.setHeader("content-Type", "application/vnd.ms-excel");
212
        // 下载文件的默认名称
213
        response.setHeader("Content-Disposition", "attachment;filename="+URLEncoder.encode(fileName, "utf-8"));
214
        // response.setHeader("Content-Disposition", "attachment;filename="+fileName);
215
216
        ExcelUtils.exportExcel(data, response.getOutputStream());
217
    }
218
144
    /**
219
    /**
145
     * 保存
220
     * 保存
146
     */
221
     */
168
        attenders.setTypeId(signInfo.getTypeId());
243
        attenders.setTypeId(signInfo.getTypeId());
169
        attenders.setServicer(signInfo.getServicer());
244
        attenders.setServicer(signInfo.getServicer());
170
        attenders.setNote(signInfo.getNote());
245
        attenders.setNote(signInfo.getNote());
246
        attenders.setRegflag(2);        // 现场注册
171
        attenders.setCreater(getUserId());
247
        attenders.setCreater(getUserId());
172
        attenders.setCreateTime(nowTime);
248
        attenders.setCreateTime(nowTime);
173
        attendersService.save(attenders);
249
        attendersService.save(attenders);

+ 4 - 0
src/main/java/io/renren/modules/admin/entity/AttendersEntity.java

93
	 * 联系邮箱
93
	 * 联系邮箱
94
	 */
94
	 */
95
	private String emailLx;
95
	private String emailLx;
96
	/**
97
	 * 注册情况
98
	 */
99
	private Integer regflag;
96
	/**
100
	/**
97
	 * 创建时间
101
	 * 创建时间
98
	 */
102
	 */

+ 1 - 1
src/main/java/io/renren/modules/admin/entity/SignInfoEntity.java

88
	/**
88
	/**
89
	 * 注册情况
89
	 * 注册情况
90
	 */
90
	 */
91
	private String regflag;
91
	private Integer regflag;
92
	/**
92
	/**
93
	 * 是否完成胸卡打印
93
	 * 是否完成胸卡打印
94
	 */
94
	 */

+ 9 - 2
src/main/java/io/renren/modules/admin/service/impl/SignInfoServiceImpl.java

25
        String badge = params.containsKey("badge") ? params.get("badge").toString() : null;
25
        String badge = params.containsKey("badge") ? params.get("badge").toString() : null;
26
        String isPay = params.containsKey("isPay") ? params.get("isPay").toString() : null;
26
        String isPay = params.containsKey("isPay") ? params.get("isPay").toString() : null;
27
        String isServer = params.containsKey("isServer") ? params.get("isServer").toString() : null;
27
        String isServer = params.containsKey("isServer") ? params.get("isServer").toString() : null;
28
        // Integer isPay2 = params.containsKey("isPay") ? Integer.valueOf(params.get("isPay").toString()) : null;
28
        Integer regflag = params.containsKey("regflag") ? (Integer) params.get("regflag") : null;
29
 
29
 
30
        QueryWrapper<SignInfoEntity> thatqWrapper = new QueryWrapper<SignInfoEntity>();
30
        QueryWrapper<SignInfoEntity> thatqWrapper = new QueryWrapper<SignInfoEntity>();
31
        thatqWrapper.eq("meeting_id", meetingId);
31
        thatqWrapper.eq("meeting_id", meetingId);
32
        if (regflag != null && regflag !=0) {
33
            thatqWrapper.eq("regflag", regflag);
34
        }
32
        if (StringUtils.isNotBlank(badge)) {
35
        if (StringUtils.isNotBlank(badge)) {
33
            thatqWrapper.eq("badge", Integer.valueOf(badge));
36
            thatqWrapper.eq("badge", Integer.valueOf(badge));
34
        }
37
        }
61
        String badge = params.containsKey("badge") ? params.get("badge").toString() : null;
64
        String badge = params.containsKey("badge") ? params.get("badge").toString() : null;
62
        String isPay = params.containsKey("isPay") ? params.get("isPay").toString() : null;
65
        String isPay = params.containsKey("isPay") ? params.get("isPay").toString() : null;
63
        String isServer = params.containsKey("isServer") ? params.get("isServer").toString() : null;
66
        String isServer = params.containsKey("isServer") ? params.get("isServer").toString() : null;
64
 
67
        Integer regflag = params.containsKey("regflag") ? (Integer) params.get("regflag") : null;
68
65
        QueryWrapper<SignInfoEntity> thatqWrapper = new QueryWrapper<SignInfoEntity>();
69
        QueryWrapper<SignInfoEntity> thatqWrapper = new QueryWrapper<SignInfoEntity>();
66
        thatqWrapper.eq("meeting_id", meetingId);
70
        thatqWrapper.eq("meeting_id", meetingId);
71
        if (regflag != null && regflag !=0) {
72
            thatqWrapper.eq("regflag", regflag);
73
        }
67
        if (StringUtils.isNotBlank(badge)) {
74
        if (StringUtils.isNotBlank(badge)) {
68
            thatqWrapper.eq("badge", Integer.valueOf(badge));
75
            thatqWrapper.eq("badge", Integer.valueOf(badge));
69
        }
76
        }