2023-12-29 朱宝民 控制器添加、获取水卡状态
New file |
| | |
| | | package com.dy.pipIrrGlobal.daoPr; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrController; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023-12-29 9:59 |
| | | * @LastEditTime 2023-12-29 9:59 |
| | | * @Description |
| | | */ |
| | | |
| | | @Mapper |
| | | public interface PrControllerMapper extends BaseMapper<PrController> { |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | int insert(PrController record); |
| | | |
| | | int insertSelective(PrController record); |
| | | |
| | | PrController selectByPrimaryKey(Long id); |
| | | |
| | | int updateByPrimaryKeySelective(PrController record); |
| | | |
| | | int updateByPrimaryKey(PrController record); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | Float sumRechargeByCardNum(@Param("cardNum") Long cardNum); |
| | | |
| | | /** |
| | | * 根据水卡编号获取卡片状态 |
| | | * @param cardNum |
| | | * @return |
| | | */ |
| | | String getCardStateByCardNum(@Param("cardNum") Long cardNum); |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.pojoPr; |
| | | |
| | | import com.alibaba.fastjson2.annotation.JSONField; |
| | | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.dy.common.po.BaseEntity; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import lombok.*; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023-12-29 9:59 |
| | | * @LastEditTime 2023-12-29 9:59 |
| | | * @Description |
| | | */ |
| | | |
| | | /** |
| | | * 控制器表 |
| | | */ |
| | | |
| | | @TableName(value="pr_controller", autoResultMap = true) |
| | | @Data |
| | | @Builder |
| | | @ToString |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @Schema(name = "控制器实体") |
| | | public class PrController implements BaseEntity { |
| | | public static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | @TableId(type = IdType.INPUT) |
| | | @Schema(description = "实体id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 编号 |
| | | */ |
| | | @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotBlank(message = "控制器编号不能为空") |
| | | @Length(message = "控制器编号不大于{max}字",max = 25) |
| | | private String code; |
| | | |
| | | /** |
| | | * 通讯协议 |
| | | */ |
| | | @Schema(description = "通讯协议", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotBlank(message = "通讯协议不能为空") |
| | | @Length(message = "通讯协议不大于{max}字",max = 25) |
| | | private String protocol; |
| | | |
| | | /** |
| | | * 添加方式;1-系统自动,2-手动 |
| | | */ |
| | | @Schema(description = "添加方式", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Byte addways; |
| | | |
| | | /** |
| | | * 操作人编号 |
| | | */ |
| | | @Schema(description = "操作人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Long operator; |
| | | |
| | | /** |
| | | * 操作时间 |
| | | */ |
| | | @Schema(description = "操作时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Date operatedt; |
| | | |
| | | /** |
| | | * 逻辑删除标识;0-未删除,1-删除 |
| | | */ |
| | | @Schema(description = "删除标识", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Byte deleted; |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.voPr; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.annotation.write.style.ColumnWidth; |
| | | import com.dy.common.po.BaseEntity; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023-12-29 10:27 |
| | | * @LastEditTime 2023-12-29 10:27 |
| | | * @Description |
| | | */ |
| | | |
| | | @Data |
| | | @Schema(title = "控制器视图对象") |
| | | public class VoController implements BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @Schema(title = "ID") |
| | | @ExcelProperty("ID") |
| | | @ColumnWidth(10) |
| | | private Long id; |
| | | |
| | | @Schema(title = "控制器编号") |
| | | @ExcelProperty("控制器编号") |
| | | @ColumnWidth(15) |
| | | private String code; |
| | | |
| | | @Schema(title = "在线状态") |
| | | @ExcelProperty("在线状态") |
| | | @ColumnWidth(15) |
| | | private String state; |
| | | |
| | | @Schema(title = "绑定取水口") |
| | | @ExcelProperty("绑定取水口") |
| | | @ColumnWidth(10) |
| | | private String intakeName; |
| | | |
| | | @Schema(title = "绑定次数") |
| | | @ExcelProperty("绑定次数") |
| | | @ColumnWidth(10) |
| | | private Integer bindings; |
| | | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @Schema(title = "最近上报时间") |
| | | @ExcelProperty("最近上报时间") |
| | | @ColumnWidth(30) |
| | | private Date operateDt; |
| | | } |
| | |
| | | actutorPort: 9085 |
| | | idSuffix: 7 |
| | | |
| | | #项目编号 |
| | | projectCode: |
| | | ym: 100 |
| | | pj: 101 |
| | | pj: 101 |
| | | |
| | | #通讯协议 |
| | | protocol: DYJS_2023,DYJS_2024 |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dy.pipIrrGlobal.daoPr.PrControllerMapper"> |
| | | <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoPr.PrController"> |
| | | <!--@mbg.generated--> |
| | | <!--@Table pr_controller--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="code" jdbcType="VARCHAR" property="code" /> |
| | | <result column="protocol" jdbcType="VARCHAR" property="protocol" /> |
| | | <result column="addWays" jdbcType="TINYINT" property="addways" /> |
| | | <result column="operator" jdbcType="BIGINT" property="operator" /> |
| | | <result column="operateDt" jdbcType="TIMESTAMP" property="operatedt" /> |
| | | <result column="deleted" jdbcType="TINYINT" property="deleted" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, code, protocol, addWays, `operator`, operateDt, deleted |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from pr_controller |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | <!--@mbg.generated--> |
| | | delete from pr_controller |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoPr.PrController"> |
| | | <!--@mbg.generated--> |
| | | insert into pr_controller (id, code, protocol, |
| | | addWays, `operator`, operateDt, |
| | | deleted) |
| | | values (#{id,jdbcType=BIGINT}, #{code,jdbcType=VARCHAR}, #{protocol,jdbcType=VARCHAR}, |
| | | #{addways,jdbcType=TINYINT}, #{operator,jdbcType=BIGINT}, #{operatedt,jdbcType=TIMESTAMP}, |
| | | #{deleted,jdbcType=TINYINT}) |
| | | </insert> |
| | | |
| | | <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoPr.PrController"> |
| | | <!--@mbg.generated--> |
| | | insert into pr_controller |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | id, |
| | | </if> |
| | | <if test="code != null"> |
| | | code, |
| | | </if> |
| | | <if test="protocol != null"> |
| | | protocol, |
| | | </if> |
| | | <if test="addways != null"> |
| | | addWays, |
| | | </if> |
| | | <if test="operator != null"> |
| | | `operator`, |
| | | </if> |
| | | <if test="operatedt != null"> |
| | | operateDt, |
| | | </if> |
| | | <if test="deleted != null"> |
| | | deleted, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | #{id,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="code != null"> |
| | | #{code,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="protocol != null"> |
| | | #{protocol,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="addways != null"> |
| | | #{addways,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="operator != null"> |
| | | #{operator,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="operatedt != null"> |
| | | #{operatedt,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="deleted != null"> |
| | | #{deleted,jdbcType=TINYINT}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoPr.PrController"> |
| | | <!--@mbg.generated--> |
| | | update pr_controller |
| | | <set> |
| | | <if test="code != null"> |
| | | code = #{code,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="protocol != null"> |
| | | protocol = #{protocol,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="addways != null"> |
| | | addWays = #{addways,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="operator != null"> |
| | | `operator` = #{operator,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="operatedt != null"> |
| | | operateDt = #{operatedt,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="deleted != null"> |
| | | deleted = #{deleted,jdbcType=TINYINT}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoPr.PrController"> |
| | | <!--@mbg.generated--> |
| | | update pr_controller |
| | | set code = #{code,jdbcType=VARCHAR}, |
| | | protocol = #{protocol,jdbcType=VARCHAR}, |
| | | addWays = #{addways,jdbcType=TINYINT}, |
| | | `operator` = #{operator,jdbcType=BIGINT}, |
| | | operateDt = #{operatedt,jdbcType=TIMESTAMP}, |
| | | deleted = #{deleted,jdbcType=TINYINT} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
| | |
| | | INNER JOIN se_client_card card ON his.cardId = card.id |
| | | WHERE card.cardNum = ${cardNum} |
| | | </select> |
| | | |
| | | <!--根据水卡编号获取卡片状态:1-开卡,2-补卡,3-充值,4-挂失,5-注销,6-解锁,7-冲正,8-消费--> |
| | | <select id="getCardStateByCardNum" resultType="java.lang.String"> |
| | | SELECT |
| | | (CASE |
| | | WHEN lastOper = 1 THEN "开卡" |
| | | WHEN lastOper = 2 THEN "补卡" |
| | | WHEN lastOper = 3 THEN "充值" |
| | | WHEN lastOper = 4 THEN "挂失" |
| | | WHEN lastOper = 5 THEN "注销" |
| | | WHEN lastOper = 6 THEN "解锁" |
| | | WHEN lastOper = 7 THEN "冲正" |
| | | WHEN lastOper = 8 THEN "消费" |
| | | END) AS stateName |
| | | FROM se_client_card |
| | | WHERE cardNum = ${cardNum} |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | package com.dy.pipIrrProject.controller; |
| | | |
| | | import com.dy.common.aop.SsoAop; |
| | | import com.dy.common.webUtil.BaseResponse; |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | | import com.dy.common.webUtil.ResultCodeMsg; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrController; |
| | | import com.dy.pipIrrProject.result.ProjectResultCode; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.media.Content; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import io.swagger.v3.oas.annotations.responses.ApiResponse; |
| | | import io.swagger.v3.oas.annotations.responses.ApiResponses; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import jakarta.validation.Valid; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.validation.BindingResult; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.Date; |
| | | import java.util.Objects; |
| | | import java.util.Optional; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023-12-29 10:06 |
| | | * @LastEditTime 2023-12-29 10:06 |
| | | * @Description |
| | | */ |
| | | |
| | | @Slf4j |
| | | @Tag(name = "控制器管理", description = "控制器操作") |
| | | @RestController |
| | | @RequestMapping(path="controller") |
| | | @RequiredArgsConstructor |
| | | public class ControllerCtrl { |
| | | private final ControllerSv controllerSv; |
| | | |
| | | @Operation(summary = "添加控制器记录", description = "添加控制器记录") |
| | | @ApiResponses(value = { |
| | | @ApiResponse( |
| | | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, |
| | | description = "操作结果:true:成功,false:失败(BaseResponse.content)", |
| | | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, |
| | | schema = @Schema(implementation = Boolean.class))} |
| | | ) |
| | | }) |
| | | @PostMapping(path = "add", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @SsoAop() |
| | | public BaseResponse<Boolean> add(@RequestBody @Parameter(description = "form表单json数据", required = true) @Valid PrController po, @Parameter(hidden = true) BindingResult bindingResult){ |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | | |
| | | Date operateTime = new Date(); |
| | | po.setOperatedt(operateTime); |
| | | po.setDeleted((byte)0); |
| | | Integer rec = Optional.ofNullable(controllerSv.addController(po)).orElse(0); |
| | | if(rec == 0) { |
| | | return BaseResponseUtils.buildFail(ProjectResultCode.CONTROLLER_FAIL.getMessage()); |
| | | } |
| | | return BaseResponseUtils.buildSuccess(true) ; |
| | | } |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrProject.controller; |
| | | |
| | | import com.dy.pipIrrGlobal.daoPr.PrControllerMapper; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrController; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023-12-29 10:06 |
| | | * @LastEditTime 2023-12-29 10:06 |
| | | * @Description |
| | | */ |
| | | |
| | | @Slf4j |
| | | @Service |
| | | public class ControllerSv { |
| | | @Autowired |
| | | private PrControllerMapper prControllerMapper; |
| | | |
| | | /** |
| | | * 添加控制器 |
| | | * @param po |
| | | * @return |
| | | */ |
| | | public Integer addController(PrController po) { |
| | | return prControllerMapper.insert(po); |
| | | } |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrProject.controller; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023-12-29 10:07 |
| | | * @LastEditTime 2023-12-29 10:07 |
| | | * @Description |
| | | */ |
| | | public class QueryVo { |
| | | } |
| | |
| | | /** |
| | | * 分水房 |
| | | */ |
| | | DIVIDE_FAIL(10001, "分水房添加失败"); |
| | | DIVIDE_FAIL(10001, "分水房添加失败"), |
| | | |
| | | /** |
| | | * 取水口 |
| | | */ |
| | | |
| | | /** |
| | | * 控制器 |
| | | */ |
| | | CONTROLLER_FAIL(30001, "控制器添加失败"); |
| | | |
| | | private final Integer code; |
| | | private final String message; |
| | |
| | | } |
| | | |
| | | // 接收村编号(主键) |
| | | Long villageId = po.getVillageid(); |
| | | Long villageId = po.getVillageId(); |
| | | |
| | | /** |
| | | * 获取5级行政区划信息 |
| | |
| | | } |
| | | |
| | | // 接收村编号(主键) |
| | | Long villageId = po.getVillageid(); |
| | | Long villageId = po.getVillageId(); |
| | | |
| | | /** |
| | | * 获取5级行政区划信息 |
| | |
| | | */ |
| | | @Schema(description = "所在村ID", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotNull(message = "所在村不能为空") |
| | | private Long villageid; |
| | | private Long villageId; |
| | | |
| | | /** |
| | | * 片区ID |
| | | */ |
| | | @Schema(description = "所在片区ID", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotNull(message = "所在片区不能为空") |
| | | private Long blockid; |
| | | private Long blockId; |
| | | |
| | | /** |
| | | * 分水房ID |
| | | */ |
| | | @Schema(description = "所在分水房ID", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotNull(message = "所在分水房不能为空") |
| | | private Long divideid; |
| | | private Long divideId; |
| | | |
| | | /** |
| | | * 农户姓名 |
| | |
| | | @Schema(description = "农户身份证号", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotBlank(message = "农户身份证号不能为空") //不能为空也不能为null |
| | | @Length(message = "农户身份证号必须{max}位数据", min = 18, max = 18) |
| | | private String idcard; |
| | | private String idCard; |
| | | |
| | | /** |
| | | * 种植面积 |
| | |
| | | * 用水方式 |
| | | */ |
| | | @Schema(description = "用水方式", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Long typeid; |
| | | private Long typeId; |
| | | |
| | | /** |
| | | * 街道及门牌号 |
| | |
| | | public interface DtoClientToSeClient { |
| | | DtoClientToSeClient INSTANCT = Mappers.getMapper(DtoClientToSeClient.class); |
| | | |
| | | @Mapping(target = "villageid", source = "villageid") |
| | | @Mapping(target = "blockid", source = "blockid") |
| | | @Mapping(target = "divideid", source = "divideid") |
| | | @Mapping(target = "villageid", source = "villageId") |
| | | @Mapping(target = "blockid", source = "blockId") |
| | | @Mapping(target = "divideid", source = "divideId") |
| | | @Mapping(target = "name", source = "name") |
| | | @Mapping(target = "phone", source = "phone") |
| | | @Mapping(target = "idcard", source = "idcard") |
| | | @Mapping(target = "idcard", source = "idCard") |
| | | @Mapping(target = "area", source = "area") |
| | | @Mapping(target = "typeid", source = "typeid") |
| | | @Mapping(target = "typeid", source = "typeId") |
| | | @Mapping(target = "address", source = "address") |
| | | @Mapping(target = "remarks", source = "remarks") |
| | | @Mapping(target = "operator", source = "operator") |
| | |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据水卡编号获取卡片状态 |
| | | * @param cardNum |
| | | * @return |
| | | */ |
| | | @Operation(summary = "根据水卡编号获取卡片状态", description = "根据水卡编号获取卡片状态") |
| | | @ApiResponses(value = { |
| | | @ApiResponse( |
| | | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, |
| | | description = "返回一页农户数据(BaseResponse.content:QueryResultVo[{}])", |
| | | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, |
| | | schema = @Schema(implementation = BaClient.class))} |
| | | ) |
| | | }) |
| | | @GetMapping(path = "/cardstate") |
| | | @SsoAop() |
| | | public BaseResponse<String> getCardStateByCardNum(@RequestParam("cardNum") Long cardNum){ |
| | | try { |
| | | String stateName = clientCardSv.getCardStateByCardNum(cardNum); |
| | | return BaseResponseUtils.buildSuccess(stateName); |
| | | } catch (Exception e) { |
| | | log.error("查询操作记录异常", e); |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | | } |
| | | } |
| | | } |
| | |
| | | map.put("list", list); |
| | | return map; |
| | | } |
| | | |
| | | /** |
| | | * 根据水卡编号获取卡片状态 |
| | | * @param cardNum |
| | | * @return |
| | | */ |
| | | public String getCardStateByCardNum(Long cardNum) { |
| | | String stateName = Optional.ofNullable(seClientCardMapper.getCardStateByCardNum(cardNum)).orElse(""); |
| | | return stateName; |
| | | } |
| | | } |