pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/client/ClientCtrl.java
@@ -50,6 +50,7 @@ /** * 获取农户列表 * * @param vo * @return */ @@ -76,6 +77,7 @@ /** * 根据主键获取一个农户对象 * * @param id * @return */ @@ -103,6 +105,7 @@ /** * 添加一个农户对象 * * @param po * @param bindingResult * @return @@ -213,6 +216,7 @@ /** * 修改农户对象(虚拟卡号、禁止标志、逻辑删除标识不参与修改) * * @param po 农户对象 * @param bindingResult * @return @@ -282,6 +286,7 @@ /** * 根据农户ID逻辑删除农户 * * @param id * @return */ @@ -312,6 +317,7 @@ /** * 获取用水方式列表 * * @param * @return */ @@ -336,6 +342,7 @@ /** * 发送验证码 * * @param phoneNumber * @return */ @@ -375,6 +382,7 @@ /** * 校验验证码 * * @param phoneNumber * @param code * @return @@ -414,6 +422,7 @@ /** * 根据村ID获取12位行政区划 * * @param villageId * @return */ @@ -445,9 +454,19 @@ // 生成12位5级行政区划编码串及名称串 Long districtNum = Long.parseLong(provinceNum + cityNum + countyNum + townNum + villageNum); //获取项目编码 String projectNo = clientSv.getItemValue("projectNo"); //转为int Integer projectNo1 = Integer.valueOf(projectNo); //转为16进制 // String projectNo2 = Integer.toHexString(projectNo1); // log.info(projectNo2); String projectNo3 = String.format("%02x", projectNo1); log.info(projectNo3); Map map = new HashMap(); map.put("districtNum", districtNum); map.put("projectNo",projectNo3); return BaseResponseUtils.buildSuccess(map) ; } } 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,8 +31,12 @@ @Autowired private BaDistrictMapper baDistrictMapper; @Autowired private BaSettingsMapper baSettingsMapper; /** * 根据指定条件获取农户数据 * * @param queryVo * @return */ @@ -50,6 +56,7 @@ /** * 根据主键获取农户对象 * * @param id 农户主键 * @return 农户对象 */ @@ -58,8 +65,10 @@ VoClient voClient = SeClientToVoClient.INSTANCT.po2vo(seClient); return voClient; } /** * 增开农户 * * @param po * @return */ @@ -69,6 +78,7 @@ /** * 根据6位区划串模糊查询农户编号 * * @param district6 * @return */ @@ -78,6 +88,7 @@ /** * 根据村编号获取5级区划信息 * * @param villageId 村编号(主键) * @return 5级行政区划信息 */ @@ -94,6 +105,7 @@ /** * 修改农户对象 * * @param po 农户对象 * @return 修改记录条数 */ @@ -103,6 +115,7 @@ /** * 根据主键获取村ID * * @param id * @return */ @@ -112,6 +125,7 @@ /** * 获取虚拟卡号最大值 * * @return */ public Long getMa1xVirtualId() { @@ -120,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); } }