| | |
| | | comment on column lf.sys_apply.entities is '实体名'; |
| | | comment on column lf.sys_apply.wkt is 'WKT'; |
| | | comment on column lf.sys_apply.pwd is '密码'; |
| | | comment on column lf.sys_apply.status is '状态:-10-作废,-1-打回,0-待审核,1~9,审核中,10-通过'; |
| | | comment on column lf.sys_apply.status is '状态:-10-作废,-1-打回,0~9-审核中,10-通过'; |
| | | comment on column lf.sys_apply.count is '审核总数'; |
| | | comment on column lf.sys_apply.descr is '描述'; |
| | | comment on column lf.sys_apply.create_user is '创建人id'; |
| | |
| | | select * from lf.sys_apply; |
| | | select * from lf.sys_flow; |
| | | |
| | | select a.*, b.uname, (select count(*) from lf.sys_flow c where c.applyid = a.id and c.status = 0 and c.userid = 2) isVerify |
| | | from lf.sys_apply a inner join lf.sys_user b on a.userid = b.id |
| | | where 1 = 1 and b.uname like '%员%' and a.status between 1 and 9 |
| | | |
| | | select * from lf.sys_apply a inner join lf.sys_flow b on a.id = b.applyid |
| | | where a.status between 0 and 9 and b.status = 0 and b.userid = 2 |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | select a.*, b.uname, fn_rec_query(a.depid, 'dep') depName from lf.sys_flow a inner join lf.sys_user b on a.userid = b.id |
| | | |
| | | |
| | | |
| | |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.ctrl.DownloadReqEntity; |
| | | import com.lf.server.entity.show.ApplyEntity; |
| | | import com.lf.server.entity.show.FlowEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.helper.AesHelper; |
| | | import com.lf.server.helper.StringHelper; |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "查询待审核数") |
| | | @GetMapping(value = "/selectSubmits") |
| | | public ResponseMsg<Object> selectSubmits(HttpServletRequest req) { |
| | | try { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | int rows = applyService.selectSubmits(ue.getId()); |
| | | |
| | | return success(rows); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "查询流程") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "applyId", value = "数据申请ID", dataType = "Integer", paramType = "query", example = "1") |
| | |
| | | @GetMapping(value = "/selectFlows") |
| | | public ResponseMsg<Object> selectFlows(Integer applyId) { |
| | | try { |
| | | // |
| | | List<FlowEntity> rs = applyService.selectFlows(applyId); |
| | | |
| | | return success(null); |
| | | return success(rs); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | |
| | | |
| | | private Timestamp updateTime; |
| | | |
| | | private String uname; |
| | | |
| | | private String depName; |
| | | |
| | | public FlowEntity() { |
| | | } |
| | | |
| | |
| | | public void setUpdateTime(Timestamp updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | |
| | | public String getUname() { |
| | | return uname; |
| | | } |
| | | |
| | | public void setUname(String uname) { |
| | | this.uname = uname; |
| | | } |
| | | |
| | | public String getDepName() { |
| | | return depName; |
| | | } |
| | | |
| | | public void setDepName(String depName) { |
| | | this.depName = depName; |
| | | } |
| | | } |
| | |
| | | package com.lf.server.mapper.show; |
| | | |
| | | import com.lf.server.entity.show.ApplyEntity; |
| | | import com.lf.server.entity.show.FlowEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | |
| | | public UserEntity selectUserByDepid(Integer depid); |
| | | |
| | | /** |
| | | * 查询待审核数 |
| | | * |
| | | * @param userid 用户ID |
| | | * @return 待审核数 |
| | | */ |
| | | public Integer selectSubmits(Integer userid); |
| | | |
| | | /** |
| | | * 查询流程 |
| | | * |
| | | * @param applyid 数据申请ID |
| | | * @return 数据流程 |
| | | */ |
| | | public List<FlowEntity> selectFlows(Integer applyid); |
| | | |
| | | /** |
| | | * 插入一条 |
| | | * |
| | | * @param entity |
| | |
| | | |
| | | @Override |
| | | public Integer selectCount(String uname, Integer status, Timestamp start, Timestamp end) { |
| | | return null; |
| | | uname = StringHelper.getLikeStr(uname); |
| | | |
| | | return applyMapper.selectCount(uname, status, start, end); |
| | | } |
| | | |
| | | @Override |
| | | public List<ApplyEntity> selectByPage(Integer userid, String uname, Integer status, Timestamp start, Timestamp end, Integer limit, Integer offset) { |
| | | return null; |
| | | uname = StringHelper.getLikeStr(uname); |
| | | |
| | | return applyMapper.selectByPage(userid, uname, status, start, end, limit, offset); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Integer selectSubmits(Integer userid) { |
| | | return applyMapper.selectSubmits(userid); |
| | | } |
| | | |
| | | @Override |
| | | public List<FlowEntity> selectFlows(Integer applyid) { |
| | | return applyMapper.selectFlows(applyid); |
| | | } |
| | | |
| | | @Override |
| | | public Integer insert(ApplyEntity entity) { |
| | | return applyMapper.insert(entity); |
| | | } |
| | |
| | | and b.uname like #{uname} |
| | | </if> |
| | | <choose> |
| | | <when test="status == 1"> |
| | | and a.status between 1 and 9 |
| | | <when test="status == 0"> |
| | | and a.status between 0 and 9 |
| | | </when> |
| | | <otherwise> |
| | | and a.status = #{status} |
| | |
| | | and b.uname like #{uname} |
| | | </if> |
| | | <choose> |
| | | <when test="status == 1"> |
| | | and a.status between 1 and 9 |
| | | <when test="status == 0"> |
| | | and a.status between 0 and 9 |
| | | </when> |
| | | <otherwise> |
| | | and a.status = #{status} |
| | |
| | | where a.is_admin = 2 and a.depid = #{depid} |
| | | order by c.id limit 1 |
| | | </select> |
| | | |
| | | <select id="selectSubmits"> |
| | | select count(*) from lf.sys_apply a inner join lf.sys_flow b on a.id = b.applyid |
| | | where a.status between 0 and 9 and b.status = 0 and b.userid = #{userid} |
| | | </select> |
| | | |
| | | <select id="selectFlows" resultType="com.lf.server.entity.show.FlowEntity"> |
| | | select a.*, b.uname, fn_rec_query(a.depid, 'dep') depName |
| | | from lf.sys_flow a inner join lf.sys_user b on a.userid = b.id |
| | | where applyid = #{applyid} |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.show.ApplyEntity"> |
| | | <selectKey resultType="java.lang.Integer" order="AFTER" keyProperty="id"> |