Browse Source

日期查询

XMTT 7 years ago
parent
commit
1849f41c54

+ 5 - 5
src/main/java/com/ekexiu/console/system/service/DemandService.java

7
import org.jfw.apt.annotation.Autowrie;
7
import org.jfw.apt.annotation.Autowrie;
8
import org.jfw.apt.annotation.DefaultValue;
8
import org.jfw.apt.annotation.DefaultValue;
9
import org.jfw.apt.annotation.Nullable;
9
import org.jfw.apt.annotation.Nullable;
10
import org.jfw.apt.orm.annotation.dao.param.Alias;
11
import org.jfw.apt.orm.annotation.dao.param.GtEq;
12
import org.jfw.apt.orm.annotation.dao.param.Like;
13
import org.jfw.apt.orm.annotation.dao.param.LtEq;
14
import org.jfw.apt.web.annotation.Path;
10
import org.jfw.apt.web.annotation.Path;
15
import org.jfw.apt.web.annotation.operate.Get;
11
import org.jfw.apt.web.annotation.operate.Get;
16
import org.jfw.apt.web.annotation.operate.Post;
12
import org.jfw.apt.web.annotation.operate.Post;
59
55
60
    @Get
56
    @Get
61
    @Path("/pq")
57
    @Path("/pq")
62
    public PageQueryResult<DemandInfo> pageQuery(@JdbcConn Connection con, @Nullable @Like String demandTitle, @Nullable @Like String professorName, @Nullable @Like String demandAim, @Nullable @GtEq @Alias("createTime") String bt, @Nullable @Alias("createTime") @LtEq String et, @DefaultValue("5") int pageSize, @DefaultValue("1") int pageNo)throws SQLException {
58
    public PageQueryResult<DemandInfo> pageQuery(@JdbcConn Connection con, @Nullable String demandTitle, @Nullable String professorName, @Nullable String demandAim, @Nullable String bt, @Nullable String et, @DefaultValue("5") int pageSize, @DefaultValue("1") int pageNo)throws SQLException {
63
        String title =null;
59
        String title =null;
64
        if(demandTitle!=null)
60
        if(demandTitle!=null)
65
        {
61
        {
75
        {
71
        {
76
            aim="%"+demandAim+"%";
72
            aim="%"+demandAim+"%";
77
        }
73
        }
74
        if (bt != null)
75
            bt = bt + "000000";
76
        if (et != null)
77
            et = et + "235959";
78
        return this.demandDao.pageQuery(con,title, name, aim,bt,et, pageNo, pageSize);
78
        return this.demandDao.pageQuery(con,title, name, aim,bt,et, pageNo, pageSize);
79
    }
79
    }
80
80

+ 7 - 0
src/main/java/com/ekexiu/console/system/service/ProfessorService.java

97
        if (name != null) {
97
        if (name != null) {
98
            pname = "%" + name + "%";
98
            pname = "%" + name + "%";
99
        }
99
        }
100
        if (et!=null) {
101
            et = et + "235959";
102
        }
100
        return this.professorDao.pageQuery(con,enter, oName, pname, professorState, bt, et, pageSize, pageNo);
103
        return this.professorDao.pageQuery(con,enter, oName, pname, professorState, bt, et, pageSize, pageNo);
101
    }
104
    }
102
105
111
        if (name != null) {
114
        if (name != null) {
112
            pname = "%" + name + "%";
115
            pname = "%" + name + "%";
113
        }
116
        }
117
        if (bt != null)
118
            bt = bt + "000000";
119
        if (et != null)
120
            et = et + "235959";
114
        return this.professorDao.pageQueryPerson(con,cau.getId(),oName, pname, professorState, bt, et, pageSize, pageNo);
121
        return this.professorDao.pageQueryPerson(con,cau.getId(),oName, pname, professorState, bt, et, pageSize, pageNo);
115
    }
122
    }
116
123