博客
关于我
OA项目之我的会议(查询)
阅读量:798 次
发布时间:2023-02-17

本文共 3841 字,大约阅读时间需要 12 分钟。

??Java???????????

?????????????????

???????????????????????????????????????????????????????????

1.1 ????????

  • t_oa_meeting_info?????????????????????????????????????????
  • t_oa_user??????????????ID???????????
  • t_oa_meeting_info?t_oa_user???????????????????????????

1.2 SQL????

??????????????????????????????????SQL?????

SELECT     a.id,    a.title,    a.content,    a.canyuze,    a.liexize,    a.zhuchiren,    b.name zhuchirenname,    a.location,    DATE_FORMAT(a.startTime, '%Y-%m-%d %H-%m-%s') startTime,    DATE_FORMAT(a.endTime, '%Y-%m-%d %H-%m-%s') endTime,    a.state,    (        CASE            WHEN a.state = 0 THEN '????'            WHEN a.state = 1 THEN '??'            WHEN a.state = 2 THEN '???'            WHEN a.state = 3 THEN '??'            WHEN a.state = 4 THEN '??'            WHEN a.state = 5 THEN '???'            WHEN a.state = 6 THEN '????'            WHEN a.state = 7 THEN '????'            ELSE '??'        END    ) AS meetingstate,    a.seatPic,    a.remark,    a.auditor,    c.name auditornameFROM t_oa_meeting_info aINNER JOIN t_oa_user b ON a.zhuchiren = b.idLEFT JOIN t_oa_user c ON a.auditor = c.idWHERE 1 = 1

1.3 ??????

????????????????????????????????????????????CASE??????????????????????????????

?????????????

2.1 DAO?????

?????MeetingInfoDao??????????? CRUD ??????????????

public int add(MeetingInfo t) throws Exception {    String sql = "insert into t_oa_meeting_info(...) values(?)";    return super.executeUpdate(sql, t, new String[] { ... });}private String getSQL() {    return "SELECT ... FROM t_oa_meeting_info a ...";}public List
myInfos(MeetingInfo info, PageBean pageBean) throws Exception { String sql = getSQL(); // ?????????? return super.executeQuery(sql, pageBean);}

2.2 ??????

????????????????????

  • ?????????DAO???add???????????????????
  • ?????????updatezt???????ID???????
  • ???????myInfos?????????????????

???????????

3.1 ??????

????Layui????????????????

  • ?????????????????
  • ???????????????????????
  • ?????????????????????????

3.2 JavaScript????

?????myMeeting.js?????????????????

layui.use(['layer', 'table', 'jquery'], function() {    let table = layui.table;    initTable();    $('#btn_search').click(query);});function initTable() {    table.render({        elem: '#tb',        cols: [            {field: 'id', title: '????', width: 90},            {field: 'title', title: '????', width: 120},            {field: 'location', title: '????', width: 140},            {field: 'startTime', title: '????', width: 120},            {field: 'endTime', title: '????', width: 120},            {field: 'meetingState', title: '????', width: 120},            {field: 'seatPic', title: '????', width: 120, template: function(d) { ... }},            {field: 'auditName', title: '???', width: 120},            {field: '', title: '??', width: 200, toolbar: '#tbar'},        ];    });}function query() {    table.reload('tb', {        url: '${ctx}/info.action',        method: 'POST',        where: {            'methodName': 'myInfos',            'title': $('#title').val(),            'zhuchiren': $('#zhuchiren').val()        }    });}

3.3 ????

???????????????????

  • ?????????????????
  • ??????????????????
  • ?????updatezt??????????0??????????

???????????

?????????????????????????????????

  • ??uploads???????????

  • ?resource.properties??????????????

    dirPath=E:/T280/images/serverPath=/test_layui/upload/paizuo/dirPathSign=E:/T280/images/layui/serverPathSign=/test_layui/upload/sign/
  • ??????????????????????????

  • ????????

    ????updatezt?????????????????????????

    public int updatezt(MeetingInfo m) throws Exception {    String sql = "update t_oa_meeting_info set state=? where id = ?";    return super.executeUpdate(sql, m, new String[] {"state", "id"});}

    ??????????????????????????????0??????????

    ????

    ?????????????????????Java???????????????????????????????????????????????????????????????????????????????????

    转载地址:http://wynfk.baihongyu.com/

    你可能感兴趣的文章
    Objective-C实现BCC校验计算(附完整源码)
    查看>>
    Objective-C实现bead sort珠排序算法(附完整源码)
    查看>>
    Objective-C实现BeadSort珠排序算法(附完整源码)
    查看>>
    Objective-C实现bellman ford贝尔曼福特算法(附完整源码)
    查看>>
    Objective-C实现bellman-ford贝尔曼-福特算法(附完整源码)
    查看>>
    Objective-C实现bellman-ford贝尔曼-福特算法(附完整源码)
    查看>>
    Objective-C实现BellmanFord贝尔曼-福特算法(附完整源码)
    查看>>
    Objective-C实现bezier curve贝塞尔曲线算法(附完整源码)
    查看>>
    Objective-C实现bfs 最短路径算法(附完整源码)
    查看>>
    Objective-C实现BF算法 (附完整源码)
    查看>>
    Objective-C实现Bilateral Filter双边滤波器算法(附完整源码)
    查看>>
    Objective-C实现binary exponentiation二进制幂运算算法(附完整源码)
    查看>>
    Objective-C实现binary search二分查找算法(附完整源码)
    查看>>
    Objective-C实现binary tree mirror二叉树镜像算法(附完整源码)
    查看>>
    Objective-C实现binary tree traversal二叉树遍历算法(附完整源码)
    查看>>
    Objective-C实现BinarySearchTreeNode树算法(附完整源码)
    查看>>
    Objective-C实现binomial coefficient二项式系数算法(附完整源码)
    查看>>
    Objective-C实现bisection二分法算法(附完整源码)
    查看>>
    Objective-C实现bisection二等分算法(附完整源码)
    查看>>
    Objective-C实现BitMap算法(附完整源码)
    查看>>