huwhois vor 5 Jahren
Ursprung
Commit
75969f25e9

+ 18 - 26
src/main/java/io/renren/modules/admin/controller/EmployeeController.java

6
import java.util.List;
6
import java.util.List;
7
import java.util.Map;
7
import java.util.Map;
8

8

9
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
10

11
import org.apache.commons.lang.StringUtils;
12
import org.apache.shiro.authz.annotation.RequiresPermissions;
9
import org.apache.shiro.authz.annotation.RequiresPermissions;
13
import org.springframework.beans.factory.annotation.Autowired;
10
import org.springframework.beans.factory.annotation.Autowired;
14
import org.springframework.web.bind.annotation.GetMapping;
11
import org.springframework.web.bind.annotation.GetMapping;
40
    @Autowired
37
    @Autowired
41
    private EmployeeService employeeService;
38
    private EmployeeService employeeService;
42

39

43
//    /**
44
//     * 列表
45
//     */
46
//    @RequestMapping("/list")
47
//    @RequiresPermissions("generator:employee:list")
48
//    public  Map<String,Object> SelectMyPage (Page page,@RequestBody EmployeeEntity employeeEntity){
49
//        Map<String,Object> map = new HashMap<>();
50
//        QueryWrapper<EmployeeEntity> queryWrapper = new QueryWrapper<>();
51
//        if(StrUtil.isNotBlank(employeeEntity.getUsername())){
52
//            queryWrapper.like("e.username",employeeEntity.getUsername());
53
//        }
54
//        if(StrUtil.isNotBlank(employeeEntity.getTruename())){
55
//            queryWrapper.like("e.truename",employeeEntity.getTruename());
56
//        }
57
//
58
//        IPage<EmployeeEntity> selectMyPage = employeeService.selectMyPage(page, queryWrapper);
59
//        map.put("page",selectMyPage);
60
//        return map ;
61
//    }
62
    /**
40
    /**
63
     * 列表
41
     * 列表
64
     */
42
     */
70
        return R.ok().put("page", page);
48
        return R.ok().put("page", page);
71
    }
49
    }
72

50

73

74
    /**
51
    /**
75
     * 列表
52
     * 列表
76
     */
53
     */
84
        return R.ok().put("page",page);
61
        return R.ok().put("page",page);
85
    }
62
    }
86

63

87

88

89

90
    /**
64
    /**
91
     * findAll
65
     * findAll
92
     */
66
     */
235
        List<Map<String, Object>> list = employeeService.selectNameList(truename);
209
        List<Map<String, Object>> list = employeeService.selectNameList(truename);
236
        return  R.ok().put("list", list);
210
        return  R.ok().put("list", list);
237
    }
211
    }
212

213
    /**
214
     * 模糊查询company_id获取 employee id,name(获得id在分配人员时使用)
215
     */
216
    
217
    @GetMapping("/listbycid/{cid}")
218
    @RequiresPermissions("admin:employee:list")
219
    public R selectNameListByCompanyId(@PathVariable("cid") Long cid) {
220
        List<Map<String, Object>> list = employeeService.selectNameListByCompanyId(cid);
221
        return  R.ok().put("list", list);
222
    }
223
    // 默认单位id1
224
    @GetMapping("/listbycid")
225
    @RequiresPermissions("admin:employee:list")
226
    public R selectNameListByCompanyId() {
227
        List<Map<String, Object>> list = employeeService.selectNameListByCompanyId(1L);
228
        return  R.ok().put("list", list);
229
    }
238
}
230
}

+ 9 - 0
src/main/java/io/renren/modules/admin/dao/EmployeeDao.java

48
     */
48
     */
49
    @Select("select id,truename from employee where truename like '%${truename}%'")
49
    @Select("select id,truename from employee where truename like '%${truename}%'")
50
    List<Map<String, Object>> selectNameList(String truename);
50
    List<Map<String, Object>> selectNameList(String truename);
51

52
    @Select("SELECT `id`,`truename` FROM `employee` WHERE `company_id`=#{companyId};")
53
    List<Map<String, Object>> selectNameListByCompanyId(Long companyId);
54

55
    /**
56
     * 获取联系工作人员联系方式
57
     */
58
    @Select("SELECT `id`,`truename`,`phone` FROM `employee` WHERE `id` IN(${ids});")
59
    List<Map<String, Object>> getContact(String ids);
51
}
60
}

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

76
	/**
76
	/**
77
	 * 会议负责人ids
77
	 * 会议负责人ids
78
	 */
78
	 */
79
	private Long serviceIds;
79
	private String serviceIds;
80
	/**
80
	/**
81
	 * 线上报名截止时间
81
	 * 线上报名截止时间
82
	 */
82
	 */

+ 16 - 7
src/main/java/io/renren/modules/admin/service/EmployeeService.java

9
import javafx.scene.control.Pagination;
9
import javafx.scene.control.Pagination;
10
import org.apache.ibatis.annotations.Param;
10
import org.apache.ibatis.annotations.Param;
11

11

12

13
import java.util.List;
12
import java.util.List;
14
import java.util.Map;
13
import java.util.Map;
15

14

28

27

29
    /**
28
    /**
30
     * 根据真实姓名模糊查询
29
     * 根据真实姓名模糊查询
30
     * 
31
     * @param truename
31
     * @param truename
32
     * @return
32
     * @return
33
     */
33
     */
37

37

38
    void delete(Long[] ids);
38
    void delete(Long[] ids);
39

39

40
    // 多表联查 + 分页
41
    PageUtils queryList(int page, int limit, String key);
40

42

41
    //多表联查 + 分页
42
   PageUtils queryList(int page,int limit,String key);
43
    
44
   /**
43
    /**
45
     * 根据真实姓名模糊查询id
44
     * 根据真实姓名模糊查询id
45
     * 
46
     * @param truename
46
     * @param truename
47
     * @return
47
     * @return
48
     */
48
     */
49
   List<Map<String, Object>> selectNameList(String truename);
50
}
49
    List<Map<String, Object>> selectNameList(String truename);
50

51
    /**
52
     * 根据单位获取员工列表
53
     * 
54
     * @param companyId
55
     * @return
56
     */
57
    List<Map<String, Object>> selectNameListByCompanyId(Long companyId);
51

58

59
    List<Map<String, Object>> getContact(String ids);
60
}

+ 10 - 0
src/main/java/io/renren/modules/admin/service/impl/EmployeeServiceImpl.java

81
    public List<Map<String, Object>> selectNameList(String truename) {
81
    public List<Map<String, Object>> selectNameList(String truename) {
82
        return baseMapper.selectNameList(truename);
82
        return baseMapper.selectNameList(truename);
83
    }
83
    }
84

85
    @Override
86
    public List<Map<String, Object>> selectNameListByCompanyId(Long companyId) {
87
        return baseMapper.selectNameListByCompanyId(companyId);
88
    }
89

90
    @Override
91
    public List<Map<String, Object>> getContact(String ids) {
92
        return baseMapper.getContact(ids);
93
    }
84
}
94
}

+ 42 - 0
src/main/java/io/renren/modules/app/controller/AppMeetingController.java

3
import io.renren.common.utils.R;
3
import io.renren.common.utils.R;
4
import io.renren.modules.admin.entity.MeetingEntity;
4
import io.renren.modules.admin.entity.MeetingEntity;
5
import io.renren.modules.admin.entity.MoneyAccountEntity;
5
import io.renren.modules.admin.entity.MoneyAccountEntity;
6
import io.renren.modules.admin.service.EmployeeService;
6
import io.renren.modules.admin.service.MeetingService;
7
import io.renren.modules.admin.service.MeetingService;
7
import io.renren.modules.admin.service.MoneyAccountService;
8
import io.renren.modules.admin.service.MoneyAccountService;
8
import io.renren.modules.admin.entity.PaperRequireEntity;
9
import io.renren.modules.admin.entity.PaperRequireEntity;
9
import io.renren.modules.admin.service.PaperRequireService;
10
import io.renren.modules.admin.service.PaperRequireService;
10
11
12
import java.util.Date;
13
import java.util.List;
14
import java.util.Map;
15
11
import org.springframework.beans.factory.annotation.Autowired;
16
import org.springframework.beans.factory.annotation.Autowired;
12
import org.springframework.web.bind.annotation.GetMapping;
17
import org.springframework.web.bind.annotation.GetMapping;
13
import org.springframework.web.bind.annotation.PathVariable;
18
import org.springframework.web.bind.annotation.PathVariable;
29
    private MoneyAccountService moneyAccountService;
34
    private MoneyAccountService moneyAccountService;
30
    @Autowired
35
    @Autowired
31
    private PaperRequireService paperRequireService;
36
    private PaperRequireService paperRequireService;
37
    @Autowired
38
    private EmployeeService employeeService;
32
39
33
    /**
40
    /**
34
     * 获取会议信息
41
     * 获取会议信息
40
        return R.ok().put("meeting", meeting);
47
        return R.ok().put("meeting", meeting);
41
    }
48
    }
42
49
50
    /**
51
     * 获取会议联系方式
52
     */
53
    @GetMapping("/contact/{id}")
54
    public R contact(@PathVariable("id") Long id) {
55
        MeetingEntity meeting = meetingService.getById(id);
56
        String serviceIds = meeting.getServiceIds();
57
58
        List<Map<String, Object>> list = employeeService.getContact(serviceIds);
59
        return R.ok().put("list", list);
60
    }
61
62
63
    /**
64
     * 会议提示
65
     */
66
    @GetMapping("/tips/{id}")
67
    public R tips(@PathVariable("id") Long id) {
68
        MeetingEntity meeting = meetingService.getById(id);
69
        // 线上报名截止时间
70
        Date onlineRegDeadline = meeting.getOnlineRegDeadline();
71
       
72
        // 现场报名截止时间
73
        Date onsiteRegDeadline = meeting.getOnsiteRegDeadline();
74
        
75
        PaperRequireEntity paperRequir = paperRequireService.getOneByMeetingId(id);
76
        // 征文截止时间
77
        Date paperDealine = paperRequir.getDeadline();
78
79
        return R.ok().put("onlineRegDeadline", onlineRegDeadline)
80
            .put("onsiteRegDeadline", onsiteRegDeadline).put("paperDealine", paperDealine);
81
    }
82
43
    /**
83
    /**
44
     * 根据meetingId信息获取对公账号
84
     * 根据meetingId信息获取对公账号
85
     * @param mid
86
     * @return
45
     */
87
     */
46
    @GetMapping("/accountinfo/{mid}")
88
    @GetMapping("/accountinfo/{mid}")
47
    public R infoByMid(@PathVariable("mid") Long mid){
89
    public R infoByMid(@PathVariable("mid") Long mid){