pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/client/ClientSv.java
@@ -2,11 +2,13 @@
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pipIrrGlobal.daoBa.BaDistrictMapper;
import com.dy.pipIrrGlobal.daoBa.BaSettingsMapper;
import com.dy.pipIrrGlobal.daoSe.SeClientMapper;
import com.dy.pipIrrGlobal.pojoSe.SeClient;
import com.dy.pipIrrGlobal.voSe.VoClient;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.common.utils.PojoUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -29,37 +31,32 @@
    @Autowired
    private BaDistrictMapper baDistrictMapper;
    @Autowired
    private BaSettingsMapper baSettingsMapper;
    /**
     * 根据指定条件获取农户数据
     *
     * @param queryVo
     * @return
     */
    public QueryResultVo<List<VoClient>> getClients(QueryVo queryVo){
        Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo) ;
    public QueryResultVo<List<VoClient>> getClients(QueryVo queryVo) {
        Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo);
        Long itemTotal = seClientMapper.getRecordCount(params);
        QueryResultVo<List<VoClient>> rsVo = new QueryResultVo<>() ;
        Integer pageCurr = 0;
        Integer pageSize = 10000;
        rsVo.pageCurr = 1;
        rsVo.pageSize = 10000;
        if(queryVo.pageSize != null && queryVo.pageCurr != null) {
            rsVo.pageSize = queryVo.pageSize ;
            rsVo.pageCurr = queryVo.pageCurr;
            pageSize = queryVo.pageSize ;
            pageCurr = (Integer.parseInt(params.get("pageCurr").toString()) - 1) * Integer.parseInt(params.get("pageSize").toString());
        }
        params.put("pageCurr", pageCurr);
        params.put("pageSize", pageSize);
        QueryResultVo<List<VoClient>> rsVo = new QueryResultVo<>();
        rsVo.pageSize = queryVo.pageSize;
        rsVo.pageCurr = queryVo.pageCurr;
        rsVo.calculateAndSet(itemTotal, params);
        rsVo.obj = seClientMapper.getClients(params);
        return rsVo ;
        return rsVo;
    }
    /**
     * 根据主键获取农户对象
     *
     * @param id 农户主键
     * @return 农户对象
     */
@@ -68,8 +65,10 @@
        VoClient voClient = SeClientToVoClient.INSTANCT.po2vo(seClient);
        return voClient;
    }
    /**
     * 增开农户
     *
     * @param po
     * @return
     */
@@ -79,6 +78,7 @@
    /**
     * 根据6位区划串模糊查询农户编号
     *
     * @param district6
     * @return
     */
@@ -88,6 +88,7 @@
    /**
     * 根据村编号获取5级区划信息
     *
     * @param villageId 村编号(主键)
     * @return 5级行政区划信息
     */
@@ -104,6 +105,7 @@
    /**
     * 修改农户对象
     *
     * @param po 农户对象
     * @return 修改记录条数
     */
@@ -113,6 +115,7 @@
    /**
     * 根据主键获取村ID
     *
     * @param id
     * @return
     */
@@ -122,6 +125,7 @@
    /**
     * 获取虚拟卡号最大值
     *
     * @return
     */
    public Long getMa1xVirtualId() {
@@ -130,9 +134,19 @@
    /**
     * 获取用水方式列表
     *
     * @return
     */
    public List<Map<String, Object>> getWaterTypes() {
        return seClientMapper.getWaterTypes();
    }
    /**
     * 根据配置项获取配置项值
     * @param itemName
     * @return
     */
    public String getItemValue(String itemName) {
        return baSettingsMapper.getItemValue(itemName);
    }
}