博客
关于我
OA项目之我的会议(查询)
阅读量:795 次
发布时间: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/

    你可能感兴趣的文章
    NuttX 构建系统
    查看>>
    NutUI:京东风格的轻量级 Vue 组件库
    查看>>
    NutzCodeInsight 2.0.7 发布,为 nutz-sqltpl 提供友好的 ide 支持
    查看>>
    NutzWk 5.1.5 发布,Java 微服务分布式开发框架
    查看>>
    NUUO网络视频录像机 css_parser.php 任意文件读取漏洞复现
    查看>>
    Nuxt Time 使用指南
    查看>>
    NuxtJS 接口转发详解:Nitro 的用法与注意事项
    查看>>
    NVDIMM原理与应用之四:基于pstore 和 ramoops保存Kernel panic日志
    查看>>
    NVelocity标签使用详解
    查看>>
    NVelocity标签设置缓存的解决方案
    查看>>
    Nvidia Cudatoolkit 与 Conda Cudatoolkit
    查看>>
    NVIDIA GPU 的状态信息输出,由 `nvidia-smi` 命令生成
    查看>>
    nvidia 各种卡
    查看>>
    Nvidia 系列显卡大解析 B100、A40、A100、A800、H100、H800、V100 该如何选择,各自的配置详细与架构详细介绍,分别运用于哪些项目场景
    查看>>
    NVIDIA-cuda-cudnn下载地址
    查看>>
    nvidia-htop 使用教程
    查看>>
    nvidia-smi 参数详解
    查看>>
    Nvidia驱动失效,采用官方的方法重装更快
    查看>>
    nvmw安装node-v4.0.0之后版本的临时解决办法
    查看>>
    nvm切换node版本
    查看>>