Commit 1c4e1494 authored by tangwei's avatar tangwei

修改接口

parent b5bd46e7
......@@ -126,6 +126,11 @@ public class CheckController extends AbstractBaseController {
ReginParams reginParams = getSelectedOrgInfo();
param.setBizOrgCode(reginParams.getPersonIdentity().getCompanyBizOrgCode());
param.setOrderBy("checkDate desc");
if(commonPageable !=null){
param.setPageNumber(commonPageable.getPageNumber()-1);
param.setPageSize(commonPageable.getPageSize());
}
Page<CheckInfoVo> list = checkService.getCheckInfo(null,null,null,param);
return CommonResponseUtil.success(list);
}
......
......@@ -84,6 +84,12 @@ public class InputItemController extends AbstractBaseController {
//查询向上查询所属单位的bizOrgCode
String bizOrgCode = ((Map<String, Object>) companyByBizOrgCodeList.getResult()).get("bizOrgCode").toString();
criterias.setBizOrgCode(bizOrgCode);
if (pageable != null) {
criterias.setPageNumber(pageable.getPageNumber()-1);
criterias.setPageSize(pageable.getPageSize());
}
Page<InputItemVo> page = inputItemService.queryInputItemByPageNew(criterias);
return CommonResponseUtil.success(page);
}
......
......@@ -100,6 +100,11 @@ public class MsgController extends AbstractBaseController {
try {
ReginParams reginParams = getSelectedOrgInfo();
param.setBizOrgCode(reginParams.getPersonIdentity().getCompanyBizOrgCode());
if (commonPageable != null) {
param.setPageNumber(commonPageable.getPageNumber());
param.setPageSize(commonPageable.getPageSize());
}
Page<MsgVo> dataList = iMsgService.queryMsgInfoList(param);
return CommonResponseUtil.success(dataList);
} catch (Exception e) {
......
......@@ -46,7 +46,10 @@ public class PlanController extends AbstractBaseController {
ReginParams reginParams = getSelectedOrgInfo();
queryRequests.setBizOrgCode(reginParams.getPersonIdentity().getCompanyBizOrgCode());
if(commonPageable !=null){
queryRequests.setPageNumber(commonPageable.getPageNumber()-1);
queryRequests.setPageSize(commonPageable.getPageSize());
}
Page<HashMap<String, Object>> list = planService.getPlanInfo(queryRequests);
return CommonResponseUtil.success(list);
}
......
......@@ -64,6 +64,42 @@ public class PlanTaskController extends AbstractBaseController {
/* @Autowired
private IUserService userService;*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "计划执行查询", notes = "计划执行查询")
@RequestMapping(value = "/listNew", produces = "application/json;charset=UTF-8", method = RequestMethod.POST)
public CommonResponse getPlanTaskListNew(
@ApiParam(value = "查询条件", required = false) @RequestBody(required = false) PlanTaskPageParam params,
@ApiParam(value = "分页参数", required = true) CommonPageable commonPageable) {
ReginParams reginParams = getSelectedOrgInfo();
params.setBizOrgCode(reginParams.getPersonIdentity().getCompanyBizOrgCode());
if (!ObjectUtils.isEmpty(commonPageable)) {
params.setPageNumber(commonPageable.getPageNumber()-1);
params.setPageSize(commonPageable.getPageSize());
}
Page<HashMap<String, Object>> list = planTaskService.getPlanTaskInfoNew(params);
return CommonResponseUtil.success(list);
}
/**
* 计划执行查询
*
......
......@@ -1247,12 +1247,12 @@ public class PointController extends AbstractBaseController {
@ApiParam(value = "区域") @RequestParam(value = "riskSourceId", required = false) Long riskSourceId,
@ApiParam(value = "点编号") @RequestParam(value = "pointNo", required = false) String pointNo,
@ApiParam(value = "点名称") @RequestParam(value = "name", required = false) String name,
@RequestParam(value = "current", defaultValue = "1") int current,
@RequestParam(value = "size", defaultValue = "10") int size) {
@RequestParam(value = "pageNumber", defaultValue = "0") int pageNumber,
@RequestParam(value = "pageSize", defaultValue = "10") int pageSize) {
ReginParams reginParams = getSelectedOrgInfo();
String companyBizOrgCode = reginParams.getPersonIdentity().getCompanyBizOrgCode();
return CommonResponseUtil.success(iPointService.queryPointList4RouteNew(companyBizOrgCode,riskSourceId, pointNo, name, current, size));
return CommonResponseUtil.success(iPointService.queryPointList4RouteNew(companyBizOrgCode,riskSourceId, pointNo, name, pageNumber-1, pageSize));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
......
......@@ -89,7 +89,10 @@ public class RouteController extends AbstractBaseController {
//获取所在公司code
String bizOrgCode=reginParams.getPersonIdentity().getCompanyBizOrgCode();
queryRequests.setBizOrgCode(bizOrgCode);
if(commonPageable !=null){
queryRequests.setPageNumber(commonPageable.getPageNumber()-1);
queryRequests.setPageSize(commonPageable.getPageSize());
}
Page<HashMap<String, Object>> routeList = routeService.getRouteInfo(null,null,null,queryRequests);
......
......@@ -48,6 +48,20 @@ public class PlanTaskPageParam extends CommonPageable {
*/
private String userId;
/**
* 单位
* */
private String bizOrgCode;
public String getBizOrgCode() {
return bizOrgCode;
}
public void setBizOrgCode(String bizOrgCode) {
this.bizOrgCode = bizOrgCode;
}
public String getPointNo() {
return pointNo;
}
......
......@@ -249,6 +249,14 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
@Override
public Page<HashMap<String, Object>> getPlanTaskInfoNew(PlanTaskPageParam params) {
long total = planTaskMapper.countPlanTask(params);
List<HashMap<String, Object>> content = planTaskMapper.getPlanTaskInfo(params);
Page<HashMap<String, Object>> result = new PageImpl<HashMap<String, Object>>(content, params, total);
return result;
}
@Override
@Transactional(rollbackFor = Exception.class)
public void reGenPlanTask(HashMap<String, Object> param) throws ParseException {
//1.公共参数准备
......
......@@ -25,6 +25,15 @@ public interface IPlanTaskService {
*/
Page<HashMap<String, Object>> getPlanTaskInfo(String toke,String product,String appKey,PlanTaskPageParam params);
/**
* 计划执行查询新
*/
Page<HashMap<String, Object>> getPlanTaskInfoNew(PlanTaskPageParam params);
/**
* 计划执行重做
*/
......
......@@ -13,21 +13,37 @@
<where>
<if test="pointNo!=null"> and d.point_no like concat('%',#{pointNo},'%')</if>
<if test="pointName!=null"> and d.name like concat('%',#{pointName},'%')</if>
AND
((<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[>=]]> #{beginDate} AND a.end_Time <![CDATA[<=]]> #{endDate}</if>)
OR
(<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[<=]]> #{beginDate} AND a.end_Time <![CDATA[>=]]> #{beginDate}</if>)
OR
(<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[<=]]> #{endDate} AND a.end_Time <![CDATA[>=]]> #{endDate}</if>)
OR
(<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[<=]]> #{beginDate} AND a.end_Time <![CDATA[>=]]> #{endDate}</if>)
)
<!-- AND-->
<!-- ((<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[>=]]> #{beginDate} AND a.end_Time <![CDATA[<=]]> #{endDate}</if>)-->
<!-- OR-->
<!-- (<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[<=]]> #{beginDate} AND a.end_Time <![CDATA[>=]]> #{beginDate}</if>)-->
<!-- OR-->
<!-- (<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[<=]]> #{endDate} AND a.end_Time <![CDATA[>=]]> #{endDate}</if>)-->
<!-- OR-->
<!-- (<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[<=]]> #{beginDate} AND a.end_Time <![CDATA[>=]]> #{endDate}</if>)-->
<!-- )-->
<if test="beginDate!=null and endDate!=null">
and a.begin_Time <![CDATA[>=]]> #{beginDate} AND a.end_Time <![CDATA[<=]]> #{endDate}
</if>
<if test="beginDate==null and endDate != null">
AND a.end_Time <![CDATA[<=]]> #{endDate}
</if>
<if test="beginDate!=null and endDate == null">
and a.begin_Time <![CDATA[>=]]> #{beginDate}
</if>
<if test="status!=null"> and b.is_finish = #{status}</if>
<if test="planId!=null"> and a.plan_id = #{planId}</if>
<if test="routeId!=null"> and a.route_id = #{routeId}</if>
<if test="orgCode!=null">
and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})
</if>
<if test="bizOrgCode!=null"> and d.biz_org_code = #{bizOrgCode}</if>
</where>
order by b.id) t
</select>
......@@ -66,18 +82,34 @@
<where>
<if test="pointNo!=null"> and d.point_no like concat('%',#{pointNo},'%')</if>
<if test="pointName!=null"> and d.name like concat('%',#{pointName},'%')</if>
AND
((<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[>=]]> #{beginDate} AND a.end_Time <![CDATA[<=]]> #{endDate}</if>)
OR
(<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[<=]]> #{beginDate} AND a.end_Time <![CDATA[>=]]> #{beginDate}</if>)
OR
(<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[<=]]> #{endDate} AND a.end_Time <![CDATA[>=]]> #{endDate}</if>)
OR
(<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[<=]]> #{beginDate} AND a.end_Time <![CDATA[>=]]> #{endDate}</if>)
)
<!-- AND-->
<!-- ((<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[>=]]> #{beginDate} AND a.end_Time <![CDATA[<=]]> #{endDate}</if>)-->
<!-- OR-->
<!-- (<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[<=]]> #{beginDate} AND a.end_Time <![CDATA[>=]]> #{beginDate}</if>)-->
<!-- OR-->
<!-- (<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[<=]]> #{endDate} AND a.end_Time <![CDATA[>=]]> #{endDate}</if>)-->
<!-- OR-->
<!-- (<if test="beginDate!=null and endDate!=null">a.begin_Time <![CDATA[<=]]> #{beginDate} AND a.end_Time <![CDATA[>=]]> #{endDate}</if>)-->
<!-- )-->
<if test="beginDate!=null and endDate!=null">
and a.begin_Time <![CDATA[>=]]> #{beginDate} AND a.end_Time <![CDATA[<=]]> #{endDate}
</if>
<if test="beginDate==null and endDate != null">
AND a.end_Time <![CDATA[<=]]> #{endDate}
</if>
<if test="beginDate!=null and endDate == null">
and a.begin_Time <![CDATA[>=]]> #{beginDate}
</if>
<if test="status!=null"> and b.is_finish = #{status}</if>
<if test="routeId!=null"> and a.route_id = #{routeId}</if>
<if test="planId!=null"> and a.plan_id = #{planId}</if>
<if test="bizOrgCode!=null"> and d.biz_org_code = #{bizOrgCode}</if>
<if test="orgCode!=null">
and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})
</if>
......
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