Commit 6ef4e5b5 authored by chenzhao's avatar chenzhao

修改代码

parent f5c7a501
......@@ -59,7 +59,7 @@
left join privilege_company pc on sta.regional_companies_code = pc.ORG_CODE
<where>
<if test="dto.snCode != null and dto.snCode != ''">
hjc.sn_code = #{dto.snCode}
hjc.sn_code like #{dto.snCode}
</if>
<if test="dto.type != null and dto.type !=''">
hjc.type = #{dto.type}
......@@ -80,7 +80,7 @@
left join privilege_company pc on sta.regional_companies_code = pc.ORG_CODE
<where>
<if test="dto.snCode != null and dto.snCode != ''">
hjc.sn_code = #{dto.snCode}
hjc.sn_code like #{dto.snCode}
</if>
<if test="dto.type != null and dto.type !=''">
hjc.type = #{dto.type}
......
......@@ -5,6 +5,7 @@ import com.yeejoin.amos.boot.module.hygf.api.config.UserLimits;
import com.yeejoin.amos.boot.module.hygf.api.dto.JpInverterDto;
import com.yeejoin.amos.boot.module.hygf.api.entity.JpInverter;
import com.yeejoin.amos.boot.module.hygf.biz.service.impl.JpInverterServiceImpl;
import org.apache.commons.lang.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
......@@ -185,6 +186,11 @@ public class JpCollectorController extends BaseController {
Page<JpCollectorDto> page = new Page<JpCollectorDto>();
page.setCurrent(current);
page.setSize(size);
if (StringUtils.isNotEmpty(jpCollectorDto.getSnCode())){
jpCollectorDto.setSnCode("%"+jpCollectorDto.getSnCode()+"%");
}
page.setTotal(jpCollectorServiceImpl.selectPageDataTota(jpCollectorDto));
page.setRecords(jpCollectorServiceImpl.selectPageData(jpCollectorDto,(current-1)*size,size));
return ResponseHelper.buildResponse(page);
......
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