Commit f0edbff5 authored by chenzhao's avatar chenzhao

修改代码

parent 7f627600
...@@ -734,7 +734,10 @@ public class PointController extends AbstractBaseController { ...@@ -734,7 +734,10 @@ public class PointController extends AbstractBaseController {
return CommonResponseUtil.failure("用户session过期"); return CommonResponseUtil.failure("用户session过期");
} }
try { try {
PointImportQueryParam pointImportQueryParam = PointParamUtils.fillPointImportQuery(queryRequests); PointImportQueryParam pointImportQueryParam = PointParamUtils.fillPointImportQuery(queryRequests);
pointImportQueryParam.setOrgCode(orgCode); pointImportQueryParam.setOrgCode(orgCode);
List<PointVo> pointList = iPointService.queryPointInfoListByIds(pointImportQueryParam); List<PointVo> pointList = iPointService.queryPointInfoListByIds(pointImportQueryParam);
if (exportType == 0) { if (exportType == 0) {
...@@ -749,6 +752,37 @@ public class PointController extends AbstractBaseController { ...@@ -749,6 +752,37 @@ public class PointController extends AbstractBaseController {
} }
} }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "查询巡检点信息", notes = "查询巡检点信息")
@PostMapping(value = "/exportListPointNew", produces = "application/json;charset=UTF-8")
public CommonResponse exportListPointNew(@ApiParam(value = "查询条件", required = false) @RequestBody(required = false) List<CommonRequest> queryRequests,
@RequestParam(value="exportType",required = false) int exportType,
HttpServletResponse response) {
ReginParams reginParams = getSelectedOrgInfo();
String companyBizOrgCode = reginParams.getPersonIdentity().getCompanyBizOrgCode();
if (ObjectUtils.isEmpty(reginParams)) {
return CommonResponseUtil.failure("用户session过期");
}
try {
PointImportQueryParam pointImportQueryParam = new PointImportQueryParam();
pointImportQueryParam.setBizOrgCode(companyBizOrgCode);
List<PointVo> pointList = iPointService.queryPointInfoListByIds(pointImportQueryParam);
if (exportType == 0) {
FileHelper.exportExcel(pointList, "巡检点列表", "巡检点信息", PointVo.class, "巡检点.xls", response);
} else if (exportType == 1) {
FileHelper.exportQRCode(pointList, "巡检点二维码", response);
}
return CommonResponseUtil.success("导出成功");
} catch (Exception e) {
log.error(e.getMessage(), e);
return CommonResponseUtil.failure("查询巡检点信息失败");
}
}
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "查询巡检点信息", notes = "查询巡检点信息") @ApiOperation(value = "查询巡检点信息", notes = "查询巡检点信息")
@GetMapping(value = "/exportListPointByIds", produces = "application/json;charset=UTF-8") @GetMapping(value = "/exportListPointByIds", produces = "application/json;charset=UTF-8")
......
...@@ -7,9 +7,19 @@ public class PointImportQueryParam { ...@@ -7,9 +7,19 @@ public class PointImportQueryParam {
private List<Long> pointIds; private List<Long> pointIds;
private String orgCode; private String orgCode;
private String bizOrgCode;
private String pointNo; private String pointNo;
public String getBizOrgCode() {
return bizOrgCode;
}
public void setBizOrgCode(String bizOrgCode) {
this.bizOrgCode = bizOrgCode;
}
private String name; private String name;
private String isFixed; private String isFixed;
......
...@@ -950,6 +950,9 @@ ...@@ -950,6 +950,9 @@
<if test="orgCode !=null and orgCode !=''"> <if test="orgCode !=null and orgCode !=''">
and p.org_code = #{orgCode} and p.org_code = #{orgCode}
</if> </if>
<if test="bizOrgCode !=null and bizOrgCode !=''">
and p.biz_org_code like CONCAT(#{bizOrgCode},'%')
</if>
<if test="pointNo !=null and pointNo !=''"> <if test="pointNo !=null and pointNo !=''">
and p.point_no like concat(concat("%",#{pointNo}),"%") and p.point_no like concat(concat("%",#{pointNo}),"%")
</if> </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