博客
关于我
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/

    你可能感兴趣的文章
    No 'Access-Control-Allow-Origin' header is present on the requested resource.
    查看>>
    No Datastore Session bound to thread, and configuration does not allow creation of non-transactional
    查看>>
    No fallbackFactory instance of type class com.ruoyi---SpringCloud Alibaba_若依微服务框架改造---工作笔记005
    查看>>
    No module named cv2
    查看>>
    No module named tensorboard.main在安装tensorboardX的时候遇到的问题
    查看>>
    No module named ‘MySQLdb‘错误解决No module named ‘MySQLdb‘错误解决
    查看>>
    No new migrations found. Your system is up-to-date.
    查看>>
    No qualifying bean of type XXX found for dependency XXX.
    查看>>
    No resource identifier found for attribute 'srcCompat' in package的解决办法
    查看>>
    No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android
    查看>>
    NO.23 ZenTaoPHP目录结构
    查看>>
    NoClassDefFoundError: org/springframework/boot/context/properties/ConfigurationBeanFactoryMetadata
    查看>>
    Node JS: < 一> 初识Node JS
    查看>>
    Node-RED中使用JSON数据建立web网站
    查看>>
    Node-RED中使用node-red-browser-utils节点实现选择Windows操作系统中的文件并实现图片预览
    查看>>
    Node-RED中实现HTML表单提交和获取提交的内容
    查看>>
    Node.js 实现类似于.php,.jsp的服务器页面技术,自动路由
    查看>>
    node.js 怎么新建一个站点端口
    查看>>
    Node.js 文件系统的各种用法和常见场景
    查看>>
    node.js 配置首页打开页面
    查看>>