| | |
| | | @ApiOperation(value = "分页", notes = "传入permit") |
| | | public R<IPage<PermitVO>> page(PermitVO permit, Query query) { |
| | | IPage<PermitVO> pages; |
| | | if (permit.getUsetype().equals("0")) { |
| | | pages = permitService.selectPermitPage(Condition.getPage(query), permit, null); |
| | | } else if (permit.getUsetype().equals("1")) { |
| | | String childer = informationService.selJurchilder(permit.getJurisdiction()); |
| | | String[] split = childer.split(","); |
| | | String strArrays = ""; |
| | | for (int j = 0; j < split.length; j++) { |
| | | strArrays += "'" + split[j] + "',"; |
| | | } |
| | | String jurisdiction = strArrays.substring(0, strArrays.length() - 1); |
| | | pages = permitService.selectPermitPage(Condition.getPage(query), permit, jurisdiction); |
| | | } else { |
| | | pages = permitService.selectPermitPage(Condition.getPage(query), permit, null); |
| | | } |
| | | pages = permitService.selectPermitPage(Condition.getPage(query), permit, permit.getJurisdiction()); |
| | | // if (permit.getUsetype().equals("0")) { |
| | | // pages = permitService.selectPermitPage(Condition.getPage(query), permit, null); |
| | | // } else if (permit.getUsetype().equals("1")) { |
| | | // String childer = informationService.selJurchilder(permit.getJurisdiction()); |
| | | // String[] split = childer.split(","); |
| | | // String strArrays = ""; |
| | | // for (int j = 0; j < split.length; j++) { |
| | | // strArrays += "'" + split[j] + "',"; |
| | | // } |
| | | // String jurisdiction = strArrays.substring(0, strArrays.length() - 1); |
| | | // pages = permitService.selectPermitPage(Condition.getPage(query), permit, jurisdiction); |
| | | // } else { |
| | | // pages = permitService.selectPermitPage(Condition.getPage(query), permit, null); |
| | | // } |
| | | return R.data(pages); |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | <select id="selectPermitPage" resultMap="permitResultMap"> |
| | | select * from sys_permit where 1=1 |
| | | select si.* from sys_permit si left join |
| | | sys_jurisdiction sj |
| | | on |
| | | sj.id = si.jurisdiction where 1=1 |
| | | <if test="permit.ptype!=null and permit.ptype!=''"> |
| | | and ptype=#{permit.ptype} |
| | | and si.ptype=#{permit.ptype} |
| | | </if> |
| | | <if test="permit.usetype=='1'.toString()"> |
| | | and jurisdiction in(${jurisdiction}) |
| | | <if test="permit.jurisdiction!=null and permit.jurisdiction != '' and permit.jurisdiction!='1372091709474910209'"> |
| | | and (sj.id = #{permit.jurisdiction} or sj.parent_id = #{permit.jurisdiction}) |
| | | </if> |
| | | <if test="permit.usetype=='2'.toString()"> |
| | | and jurisdiction=#{permit.jurisdiction} |
| | | </if> |
| | | <!-- <if test="permit.usetype=='1'.toString()">--> |
| | | <!-- and si.jurisdiction in(${jurisdiction})--> |
| | | <!-- </if>--> |
| | | <!-- <if test="permit.usetype=='2'.toString()">--> |
| | | <!-- and si.jurisdiction=#{permit.jurisdiction}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="permit.usetype==''.toString()">--> |
| | | <!-- and si.jurisdiction=#{permit.jurisdiction}--> |
| | | <!-- </if>--> |
| | | </select> |
| | | |
| | | <select id="selectIn" resultType="java.util.HashMap"> |
| | |
| | | @ApiOperation(value = "分页", notes = "传入record") |
| | | public R<IPage<RecordVO>> page(RecordVO record, Query query) { |
| | | IPage<RecordVO> pages; |
| | | if (record.getUsetype().equals("0")) { |
| | | pages = recordService.selectRecordPage(Condition.getPage(query), record, null); |
| | | } else if (record.getUsetype().equals("1")) { |
| | | String childer = informationService.selJurchilder(record.getJurisdiction()); |
| | | String[] split = childer.split(","); |
| | | String strArrays = ""; |
| | | for (int j = 0; j < split.length; j++) { |
| | | strArrays += "'" + split[j] + "',"; |
| | | } |
| | | String jurisdiction = strArrays.substring(0, strArrays.length() - 1); |
| | | pages = recordService.selectRecordPage(Condition.getPage(query), record, jurisdiction); |
| | | } else { |
| | | pages = recordService.selectRecordPage(Condition.getPage(query), record, null); |
| | | } |
| | | pages = recordService.selectRecordPage(Condition.getPage(query), record, record.getJurisdiction()); |
| | | // if (record.getUsetype().equals("0")) { |
| | | // pages = recordService.selectRecordPage(Condition.getPage(query), record, null); |
| | | // } else if (record.getUsetype().equals("1")) { |
| | | // String childer = informationService.selJurchilder(record.getJurisdiction()); |
| | | // String[] split = childer.split(","); |
| | | // String strArrays = ""; |
| | | // for (int j = 0; j < split.length; j++) { |
| | | // strArrays += "'" + split[j] + "',"; |
| | | // } |
| | | // String jurisdiction = strArrays.substring(0, strArrays.length() - 1); |
| | | // pages = recordService.selectRecordPage(Condition.getPage(query), record, jurisdiction); |
| | | // } else { |
| | | // pages = recordService.selectRecordPage(Condition.getPage(query), record, null); |
| | | // } |
| | | |
| | | return R.data(pages); |
| | | } |
| | |
| | | |
| | | |
| | | <select id="selectRecordPage" resultMap="recordResultMap"> |
| | | select * from sys_record where 1=1 |
| | | select * from sys_record si left join |
| | | sys_jurisdiction sj |
| | | on |
| | | sj.id = si.jurisdiction where 1=1 |
| | | <if test="record.ptype!=null and record.ptype!=''"> |
| | | and ptype=#{record.ptype} |
| | | and ptype=#{record.ptype} |
| | | </if> |
| | | <if test="record.usetype=='1'.toString()"> |
| | | and jurisdiction in(${jurisdiction}) |
| | | <if test="record.jurisdiction!=null and record.jurisdiction != '' and record.jurisdiction!='1372091709474910209'"> |
| | | and (sj.id = #{record.jurisdiction} or sj.parent_id = #{record.jurisdiction}) |
| | | </if> |
| | | <if test="record.usetype=='2'.toString()"> |
| | | and jurisdiction=#{record.jurisdiction} |
| | | </if> |
| | | <!-- <if test="record.usetype=='1'.toString()">--> |
| | | <!-- and jurisdiction in(${jurisdiction})--> |
| | | <!-- </if>--> |
| | | <!-- <if test="record.usetype=='2'.toString()">--> |
| | | <!-- and jurisdiction=#{record.jurisdiction}--> |
| | | <!-- </if>--> |
| | | <if test="record.papprove!=null and record.papprove!=''"> |
| | | and papprove=#{record.papprove} |
| | | and papprove=#{record.papprove} |
| | | </if> |
| | | <if test="record.xapprove!=null and record.xapprove!=''"> |
| | | and xapprove=#{record.xapprove} |
| | | and xapprove=#{record.xapprove} |
| | | </if> |
| | | <if test="record.sapprove!=null and record.sapprove!=''"> |
| | | and sapprove=#{record.sapprove} |
| | | and sapprove=#{record.sapprove} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectIn" resultType="java.util.HashMap"> |
| | | select * from sys_record where cardid=#{cardid} and ptype=#{type} |
| | | select * |
| | | from sys_record |
| | | where cardid = #{cardid} |
| | | and ptype = #{type} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | @ApiOperation(value = "分页", notes = "传入recordk") |
| | | public R<IPage<RecordkVO>> page(RecordkVO recordk, Query query) { |
| | | IPage<RecordkVO> pages; |
| | | if (recordk.getUsetype().equals("0")) { |
| | | pages = recordkService.selectRecordkPage(Condition.getPage(query), recordk,null); |
| | | } else if (recordk.getUsetype().equals("1")) { |
| | | String childer = informationService.selJurchilder(recordk.getJurisdiction()); |
| | | String[] split = childer.split(","); |
| | | String strArrays = ""; |
| | | for (int j = 0; j < split.length; j++) { |
| | | strArrays += "'" + split[j] + "',"; |
| | | } |
| | | String jurisdiction = strArrays.substring(0, strArrays.length() - 1); |
| | | pages = recordkService.selectRecordkPage(Condition.getPage(query), recordk,jurisdiction); |
| | | } else { |
| | | pages = recordkService.selectRecordkPage(Condition.getPage(query), recordk,null); |
| | | } |
| | | pages = recordkService.selectRecordkPage(Condition.getPage(query), recordk,recordk.getJurisdiction()); |
| | | // if (recordk.getUsetype().equals("0")) { |
| | | // pages = recordkService.selectRecordkPage(Condition.getPage(query), recordk,null); |
| | | // } else if (recordk.getUsetype().equals("1")) { |
| | | // String childer = informationService.selJurchilder(recordk.getJurisdiction()); |
| | | // String[] split = childer.split(","); |
| | | // String strArrays = ""; |
| | | // for (int j = 0; j < split.length; j++) { |
| | | // strArrays += "'" + split[j] + "',"; |
| | | // } |
| | | // String jurisdiction = strArrays.substring(0, strArrays.length() - 1); |
| | | // pages = recordkService.selectRecordkPage(Condition.getPage(query), recordk,jurisdiction); |
| | | // } else { |
| | | // pages = recordkService.selectRecordkPage(Condition.getPage(query), recordk,null); |
| | | // } |
| | | return R.data(pages); |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | <select id="selectRecordkPage" resultMap="recordkResultMap"> |
| | | select * from sys_recordk where 1=1 |
| | | select * from sys_recordk si left join |
| | | sys_jurisdiction sj |
| | | on |
| | | sj.id = si.jurisdiction where 1=1 |
| | | <if test="recordk.ptype!=null and recordk.ptype!=''"> |
| | | and ptype=#{recordk.ptype} |
| | | and ptype=#{recordk.ptype} |
| | | </if> |
| | | <if test="recordk.usetype=='1'.toString()"> |
| | | and jurisdiction in(${jurisdiction}) |
| | | <if test="recordk.jurisdiction!=null and recordk.jurisdiction != '' and recordk.jurisdiction!='1372091709474910209'"> |
| | | and (sj.id = #{recordk.jurisdiction} or sj.parent_id = #{recordk.jurisdiction}) |
| | | </if> |
| | | <if test="recordk.usetype=='2'.toString()"> |
| | | and jurisdiction=#{recordk.jurisdiction} |
| | | </if> |
| | | <!-- <if test="recordk.usetype=='1'.toString()">--> |
| | | <!-- and jurisdiction in(${jurisdiction})--> |
| | | <!-- </if>--> |
| | | <!-- <if test="recordk.usetype=='2'.toString()">--> |
| | | <!-- and jurisdiction=#{recordk.jurisdiction}--> |
| | | <!-- </if>--> |
| | | </select> |
| | | |
| | | <select id="selectIn" resultType="java.util.HashMap"> |
| | | select * from sys_recordk where cardid=#{cardid} and ptype=#{type} |
| | | select * |
| | | from sys_recordk |
| | | where cardid = #{cardid} |
| | | and ptype = #{type} |
| | | </select> |
| | | </mapper> |
| | |
| | | @ApiOperation(value = "分页", notes = "传入revoke") |
| | | public R<IPage<RevokeVO>> page(RevokeVO revoke, Query query) { |
| | | IPage<RevokeVO> pages; |
| | | if (revoke.getUsetype().equals("0")) { |
| | | pages = revokeService.selectRevokePage(Condition.getPage(query), revoke,null); |
| | | } else if (revoke.getUsetype().equals("1")) { |
| | | String childer = informationService.selJurchilder(revoke.getJurisdiction()); |
| | | String[] split = childer.split(","); |
| | | String strArrays = ""; |
| | | for (int j = 0; j < split.length; j++) { |
| | | strArrays += "'" + split[j] + "',"; |
| | | } |
| | | String jurisdiction = strArrays.substring(0, strArrays.length() - 1); |
| | | pages =revokeService.selectRevokePage(Condition.getPage(query), revoke,jurisdiction); |
| | | } else { |
| | | pages =revokeService.selectRevokePage(Condition.getPage(query), revoke,null); |
| | | } |
| | | pages =revokeService.selectRevokePage(Condition.getPage(query), revoke,revoke.getJurisdiction()); |
| | | // if (revoke.getUsetype().equals("0")) { |
| | | // pages = revokeService.selectRevokePage(Condition.getPage(query), revoke,null); |
| | | // } else if (revoke.getUsetype().equals("1")) { |
| | | // String childer = informationService.selJurchilder(revoke.getJurisdiction()); |
| | | // String[] split = childer.split(","); |
| | | // String strArrays = ""; |
| | | // for (int j = 0; j < split.length; j++) { |
| | | // strArrays += "'" + split[j] + "',"; |
| | | // } |
| | | // String jurisdiction = strArrays.substring(0, strArrays.length() - 1); |
| | | // pages =revokeService.selectRevokePage(Condition.getPage(query), revoke,jurisdiction); |
| | | // } else { |
| | | // pages =revokeService.selectRevokePage(Condition.getPage(query), revoke,null); |
| | | // } |
| | | |
| | | return R.data(pages); |
| | | } |
| | |
| | | |
| | | |
| | | <select id="selectRevokePage" resultMap="revokeResultMap"> |
| | | select * from sys_revoke where 1=1 |
| | | select * from sys_revoke si left join |
| | | sys_jurisdiction sj |
| | | on |
| | | sj.id = si.jurisdiction where 1=1 |
| | | <if test="revoke.ptype!=null and revoke.ptype!=''"> |
| | | and ptype=#{revoke.ptype} |
| | | and ptype=#{revoke.ptype} |
| | | </if> |
| | | <if test="revoke.usetype=='1'.toString()"> |
| | | and jurisdiction in(${jurisdiction}) |
| | | <if test="revoke.jurisdiction!=null and revoke.jurisdiction != '' and revoke.jurisdiction!='1372091709474910209'"> |
| | | and (sj.id = #{revoke.jurisdiction} or sj.parent_id = #{revoke.jurisdiction}) |
| | | </if> |
| | | <if test="revoke.usetype=='2'.toString()"> |
| | | and jurisdiction=#{revoke.jurisdiction} |
| | | </if> |
| | | <!-- <if test="revoke.usetype=='1'.toString()">--> |
| | | <!-- and jurisdiction in(${jurisdiction})--> |
| | | <!-- </if>--> |
| | | <!-- <if test="revoke.usetype=='2'.toString()">--> |
| | | <!-- and jurisdiction=#{revoke.jurisdiction}--> |
| | | <!-- </if>--> |
| | | </select> |
| | | <select id="selectIn" resultType="java.util.HashMap"> |
| | | select * from sys_revoke where cardid=#{cardid} and ptype=#{type} |
| | | select * |
| | | from sys_revoke |
| | | where cardid = #{cardid} |
| | | and ptype = #{type} |
| | | </select> |
| | | </mapper> |