huwhois 3 年之前
父节点
当前提交
20cb09fdda

+ 36 - 0
src/main/java/io/renren/modules/admin/controller/SignController.java

@ -341,4 +341,40 @@ public class SignController {
341 341
342 342
        return R.ok().put("total", total).put("normal", normal).put("student", student);
343 343
    }
344
345
    /**
346
     * 打印成功后记录打印信息,并添加签到信息
347
     */
348
    @PostMapping("/printcode/{aid}")
349
    @RequiresPermissions("admin:sign:update")
350
    public R printCode(@PathVariable("aid") Long aid) {
351
        SignviewEntity signinfo = signviewService.getByAid(aid);
352
353
        if (signinfo == null) {
354
            return R.error("用户不存在");
355
        }
356
        
357
        SignEntity sign = new SignEntity();
358
359
        if (signinfo.getId()==null || signinfo.getId()==0L) {
360
            String token = MyUtils.md5(aid + signinfo.getSymbol());
361
            sign.setToken(token);
362
            sign.setAttendersId(aid);
363
            sign.setStatus(1);
364
            sign.setBadge(1);
365
            sign.setPrintNum(1);
366
            sign.setPrintTime(new Date());
367
            sign.setCreateTime(new Date());
368
            signService.save(sign);
369
        } else {
370
            // sign.setId(signinfo.getId());
371
            sign = signService.getById(signinfo.getId());
372
            Integer printNum = sign.getPrintNum() == null ? 1 : sign.getPrintNum() + 1;
373
            sign.setPrintNum(printNum);
374
            sign.setPrintTime(new Date());
375
            signService.updateById(sign);
376
        }
377
378
        return R.ok();
379
    }
344 380
}

+ 50 - 50
src/main/java/io/renren/modules/admin/entity/HotalEntity.java

@ -17,56 +17,56 @@ import lombok.Data;
17 17
@Data
18 18
@TableName("hotal")
19 19
public class HotalEntity implements Serializable {
20
	private static final long serialVersionUID = 1L;
20
    private static final long serialVersionUID = 1L;
21 21
22
	/**
23
	 * id
24
	 */
25
	@TableId
26
	private Long aid;
27
	/**
28
	 * 会议id
29
	 */
30
	private Long meetingId;
31
	/**
32
	 * 名字
33
	 */
34
	private String truename;
35
	/**
36
	 * 电话
37
	 */
38
	private String phone;
39
	/**
40
	 * 单位名称
41
	 */
42
	private String organization;
43
	/**
44
	 * 职位
45
	 */
46
	private String position;
47
	/**
48
	 * 会员id
49
	 */
50
	private Long memberId;
51
	/**
52
	 * 酒店入住时间
53
	 */
54
	private Date checkInDate;
55
	/**
56
	 * 酒店离店时间
57
	 */
58
	private Date checkOutDate;
59
	/**
60
	 * 0不合住, 1可合住
61
	 */
62
	private Integer isShare;
63
	/**
64
	 * 房 型
65
	 */
66
	private Integer roomType;
67
	/**
68
	 * 酒店 1,会议合作; 2,其他
69
	 */
70
	private Integer hotelType;
22
    /**
23
     * id
24
     */
25
    @TableId
26
    private Long aid;
27
    /**
28
     * 会议id
29
     */
30
    private Long meetingId;
31
    /**
32
     * 名字
33
     */
34
    private String truename;
35
    /**
36
     * 电话
37
     */
38
    private String phone;
39
    /**
40
     * 单位名称
41
     */
42
    private String organization;
43
    /**
44
     * 职位
45
     */
46
    private String position;
47
    /**
48
     * 会员id
49
     */
50
    private Long memberId;
51
    /**
52
     * 酒店入住时间
53
     */
54
    private Date checkInDate;
55
    /**
56
     * 酒店离店时间
57
     */
58
    private Date checkOutDate;
59
    /**
60
     * 0不合住, 1可合住
61
     */
62
    private Integer isShare;
63
    /**
64
     * 房 型
65
     */
66
    private Integer roomType;
67
    /**
68
     * 酒店 1,会议合作; 2,其他
69
     */
70
    private Integer hotelType;
71 71
72 72
}