Commit d5f2e56e authored by 王果's avatar 王果

合并列表查询修改

parent 0bf685ca
...@@ -52,6 +52,9 @@ ...@@ -52,6 +52,9 @@
<if test="jyjcOpeningApplicationRequstDto.type == 'supervision'"> <if test="jyjcOpeningApplicationRequstDto.type == 'supervision'">
and a.status not in ('6610') and a.status not in ('6610')
</if> </if>
<if test="jyjcOpeningApplicationRequstDto.unitCode != '' and jyjcOpeningApplicationRequstDto.unitCode != null">
and a.unit_code = #{jyjcOpeningApplicationRequstDto.unitCode}
</if>
</where> </where>
order by sequence_nbr desc order by sequence_nbr desc
......
...@@ -161,23 +161,23 @@ public class JyjcOpeningApplicationController extends BaseController { ...@@ -161,23 +161,23 @@ public class JyjcOpeningApplicationController extends BaseController {
} }
/** // /**
* 列表分页查询 // * 列表分页查询
* // *
* @param current 当前页 // * @param current 当前页
* @param current 每页大小 // * @param current 每页大小
* @return // * @return
*/ // */
@TycloudOperation(ApiLevel = UserType.AGENCY) // @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/pageForCompany") // @GetMapping(value = "/pageForCompany")
@ApiOperation(httpMethod = "GET",value = "分页查询-公司", notes = "分页查询-公司") // @ApiOperation(httpMethod = "GET",value = "分页查询-公司", notes = "分页查询-公司")
public ResponseModel<Page<JyjcOpeningApplicationModel>> querypageForCompany(@RequestParam(value = "current") int current, @RequestParam // public ResponseModel<Page<JyjcOpeningApplicationModel>> querypageForCompany(@RequestParam(value = "current") int current, @RequestParam
(value = "size") int size, JyjcOpeningApplicationRequstDto jyjcOpeningApplicationRequstDto) { // (value = "size") int size, JyjcOpeningApplicationRequstDto jyjcOpeningApplicationRequstDto) {
Page<JyjcOpeningApplication> page = new Page<JyjcOpeningApplication>(); // Page<JyjcOpeningApplication> page = new Page<JyjcOpeningApplication>();
page.setCurrent(current); // page.setCurrent(current);
page.setSize(size); // page.setSize(size);
return ResponseHelper.buildResponse(jyjcOpeningApplicationServiceImpl.querypageForCompany(page,jyjcOpeningApplicationRequstDto)); // return ResponseHelper.buildResponse(jyjcOpeningApplicationServiceImpl.querypageForCompany(page,jyjcOpeningApplicationRequstDto));
} // }
/** /**
* 列表全部数据查询 * 列表全部数据查询
......
...@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; ...@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.yeejoin.amos.boot.biz.common.bo.CompanyBo; import com.yeejoin.amos.boot.biz.common.bo.CompanyBo;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey; import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto; import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto;
...@@ -321,36 +322,42 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp ...@@ -321,36 +322,42 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
return this.queryForList("", false); return this.queryForList("", false);
} }
public Page<JyjcOpeningApplicationModel> queryForJyjcOpeningApplicationPage(Page<JyjcOpeningApplication> page, JyjcOpeningApplicationRequstDto jyjcOpeningApplicationRequstDto) { public Page<JyjcOpeningApplicationModel> queryForJyjcOpeningApplicationPage(Page<JyjcOpeningApplication> page, JyjcOpeningApplicationRequstDto dto) {
String applyStartTime = ""; ReginParams reginParams = commonserviceImpl.getReginParamsOfCurrentUser();
String applyEndTime = ""; String level = reginParams.getCompany().getLevel();
if (ObjectUtils.isNotEmpty(jyjcOpeningApplicationRequstDto.getApplyTime())) { if (BaseController.COMPANY_TYPE_COMPANY.equals(level)) {
String date = jyjcOpeningApplicationRequstDto.getApplyTime(); dto.setType("enterprise");
applyStartTime = date + " 00:00:00"; dto.setUnitCode(reginParams.getCompany().getCompanyCode());
applyEndTime = date + " 23:59:59"; } else {
} dto.setType("supervision");
// 设置为监管端
jyjcOpeningApplicationRequstDto.setType("supervision");
return jyjcOpeningApplicationMapper.selectJyjcOpeningApplicationList(page, jyjcOpeningApplicationRequstDto, applyStartTime, applyEndTime);
} }
public Page<JyjcOpeningApplicationModel> querypageForCompany(Page<JyjcOpeningApplication> page, JyjcOpeningApplicationRequstDto jyjcOpeningApplicationRequstDto) {
//根据申请单中的单位信息对于列表数据进行过滤
CompanyBo companyBo = commonserviceImpl.getReginParamsOfCurrentUser().getCompany();
// if (companyBo.getLevel().equals("company")) {
jyjcOpeningApplicationRequstDto.setUnitCode(companyBo.getCompanyCode());
// }
String applyStartTime = ""; String applyStartTime = "";
String applyEndTime = ""; String applyEndTime = "";
if (ObjectUtils.isNotEmpty(jyjcOpeningApplicationRequstDto.getApplyTime())) { if (ObjectUtils.isNotEmpty(dto.getApplyTime())) {
String date = jyjcOpeningApplicationRequstDto.getApplyTime(); String date = dto.getApplyTime();
applyStartTime = date + " 00:00:00"; applyStartTime = date + " 00:00:00";
applyEndTime = date + " 23:59:59"; applyEndTime = date + " 23:59:59";
} }
jyjcOpeningApplicationRequstDto.setType("enterprise"); return jyjcOpeningApplicationMapper.selectJyjcOpeningApplicationList(page, dto, applyStartTime, applyEndTime);
return jyjcOpeningApplicationMapper.selectJyjcOpeningApplicationList(page, jyjcOpeningApplicationRequstDto, applyStartTime, applyEndTime); }
}
// public Page<JyjcOpeningApplicationModel> querypageForCompany(Page<JyjcOpeningApplication> page, JyjcOpeningApplicationRequstDto jyjcOpeningApplicationRequstDto) {
// //根据申请单中的单位信息对于列表数据进行过滤
// CompanyBo companyBo = commonserviceImpl.getReginParamsOfCurrentUser().getCompany();
//// if (companyBo.getLevel().equals("company")) {
// jyjcOpeningApplicationRequstDto.setUnitCode(companyBo.getCompanyCode());
//// }
//
// String applyStartTime = "";
// String applyEndTime = "";
// if (ObjectUtils.isNotEmpty(jyjcOpeningApplicationRequstDto.getApplyTime())) {
// String date = jyjcOpeningApplicationRequstDto.getApplyTime();
// applyStartTime = date + " 00:00:00";
// applyEndTime = date + " 23:59:59";
// }
// jyjcOpeningApplicationRequstDto.setType("enterprise");
// return jyjcOpeningApplicationMapper.selectJyjcOpeningApplicationList(page, jyjcOpeningApplicationRequstDto, applyStartTime, applyEndTime);
// }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment