博客
关于我
OA项目之我的会议(查询)
阅读量:800 次
发布时间: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实现multilayer perceptron classifier多层感知器分类器算法(附完整源码)
    查看>>
    Objective-C实现multiplesThreeAndFive三或五倍数的算法 (附完整源码)
    查看>>
    Objective-C实现n body simulationn体模拟算法(附完整源码)
    查看>>
    Objective-C实现naive string search字符串搜索算法(附完整源码)
    查看>>
    Objective-C实现natural sort自然排序算法(附完整源码)
    查看>>
    Objective-C实现nested brackets嵌套括号算法(附完整源码)
    查看>>
    Objective-C实现nevilles method多项式插值算法(附完整源码)
    查看>>
    Objective-C实现newton raphson牛顿-拉夫森算法(附完整源码)
    查看>>
    Objective-C实现newtons second law of motion牛顿第二运动定律算法(附完整源码)
    查看>>
    Objective-C实现newton_forward_interpolation牛顿前插算法(附完整源码)
    查看>>
    Objective-C实现newton_raphson牛顿拉夫森算法(附完整源码)
    查看>>
    Objective-C实现ngram语言模型算法(附完整源码)
    查看>>
    Objective-C实现NLP中文分词(附完整源码)
    查看>>
    Objective-C实现NLP中文分词(附完整源码)
    查看>>
    Objective-C实现NMS非极大值抑制(附完整源码)
    查看>>
    Objective-C实现NMS非极大值抑制(附完整源码)
    查看>>
    Objective-C实现Node.Js中生成一个UUID/GUID算法(附完整源码)
    查看>>
    Objective-C实现not gate非门算法(附完整源码)
    查看>>
    Objective-C实现NQueen皇后问题算法(附完整源码)
    查看>>
    Objective-C实现number of digits解字符数算法(附完整源码)
    查看>>