2023-12-25 朱宝民 挂失、注销、解锁、冲正重构,4个记录查询改为参数传递
| | |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/20 14:48 |
| | | * @LastEditTime 2023/12/20 14:48 |
| | | * @date 2023-12-25 14:32 |
| | | * @LastEditTime 2023-12-25 14:32 |
| | | * @Description |
| | | */ |
| | | |
| | |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/19 15:08 |
| | | * @LastEditTime 2023/12/19 15:08 |
| | | * @date 2023-12-25 13:52 |
| | | * @LastEditTime 2023-12-25 13:52 |
| | | * @Description |
| | | */ |
| | | |
| | |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/20 16:52 |
| | | * @LastEditTime 2023/12/20 16:52 |
| | | * @date 2023-12-25 15:13 |
| | | * @LastEditTime 2023-12-25 15:13 |
| | | * @Description |
| | | */ |
| | | |
| | | @Mapper |
| | | public interface SeReversalMapper extends BaseMapper<SeReversal> { |
| | | int deleteByPrimaryKey(Long id); |
| | |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/20 16:05 |
| | | * @LastEditTime 2023/12/20 16:05 |
| | | * @date 2023-12-25 14:51 |
| | | * @LastEditTime 2023-12-25 14:51 |
| | | * @Description |
| | | */ |
| | | |
| | | @Mapper |
| | | public interface SeUnlockMapper extends BaseMapper<SeUnlock> { |
| | | int deleteByPrimaryKey(Long id); |
| | |
| | | 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 jakarta.validation.constraints.NotNull; |
| | | import jakarta.validation.constraints.Positive; |
| | | import lombok.*; |
| | | import org.hibernate.validator.constraints.Length; |
| | |
| | | * 水卡编号 |
| | | */ |
| | | @Schema(description = "水卡编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotBlank(message = "水卡编号不能为空") |
| | | private String cardnum; |
| | | @NotNull(message = "水卡编号不能为空") |
| | | private Long cardid; |
| | | |
| | | /** |
| | | * 农户编号 |
| | | */ |
| | | @Schema(description = "农户编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotBlank(message = "农户编号不能为空") |
| | | private String clientnum; |
| | | @NotNull(message = "农户编号不能为空") |
| | | private Long clientid; |
| | | |
| | | /** |
| | | * 退款金额 |
| | |
| | | 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 jakarta.validation.constraints.NotNull; |
| | | import jakarta.validation.constraints.Positive; |
| | | import lombok.*; |
| | | import org.hibernate.validator.constraints.Length; |
| | |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/9 8:55 |
| | | * @LastEditTime 2023/12/19 15:14 |
| | | * @date 2023-12-25 13:52 |
| | | * @LastEditTime 2023-12-25 13:52 |
| | | * @Description |
| | | */ |
| | | |
| | | /** |
| | | * 水卡挂失表 |
| | | */ |
| | | |
| | | @TableName(value="se_loss", autoResultMap = true) |
| | | @Data |
| | | @Builder |
| | |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @Schema(name = "挂失实体") |
| | | |
| | | public class SeLoss implements BaseEntity { |
| | | public static final long serialVersionUID = 20231191728001L; |
| | | /** |
| | |
| | | * 水卡编号 |
| | | */ |
| | | @Schema(description = "水卡编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotBlank(message = "水卡编号不能为空") |
| | | private String cardnum; |
| | | @NotNull(message = "水卡编号不能为空") |
| | | private Long cardid; |
| | | |
| | | /** |
| | | * 农户编号 |
| | | */ |
| | | @Schema(description = "农户编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotBlank(message = "农户编号不能为空") |
| | | private String clientnum; |
| | | @NotNull(message = "农户编号不能为空") |
| | | private Long clientid; |
| | | |
| | | /** |
| | | * 余额 |
| | |
| | | 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 jakarta.validation.constraints.NotNull; |
| | | import jakarta.validation.constraints.Positive; |
| | | import lombok.*; |
| | | import org.hibernate.validator.constraints.Length; |
| | |
| | | * 水卡编号 |
| | | */ |
| | | @Schema(description = "水卡编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotBlank(message = "水卡编号不能为空") |
| | | private String cardnum; |
| | | @NotNull(message = "水卡编号不能为空") |
| | | private Long cardid; |
| | | |
| | | /** |
| | | * 农户编号 |
| | | */ |
| | | @Schema(description = "农户编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotBlank(message = "农户编号不能为空") |
| | | private String clientnum; |
| | | @NotNull(message = "农户编号不能为空") |
| | | private Long clientid; |
| | | |
| | | /** |
| | | * 卡片余额 |
| | |
| | | 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 jakarta.validation.constraints.NotNull; |
| | | import jakarta.validation.constraints.Positive; |
| | | import lombok.*; |
| | | import org.hibernate.validator.constraints.Length; |
| | |
| | | * 水卡编号 |
| | | */ |
| | | @Schema(description = "水卡编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotBlank(message = "水卡编号不能为空") |
| | | private String cardnum; |
| | | @NotNull(message = "水卡编号不能为空") |
| | | private Long cardid; |
| | | |
| | | /** |
| | | * 农户编号 |
| | | */ |
| | | @Schema(description = "农户编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotBlank(message = "农户编号不能为空") |
| | | private String clientnum; |
| | | @NotNull(message = "农户编号不能为空") |
| | | private Long clientid; |
| | | |
| | | /** |
| | | * 剩余金额 |
| | |
| | | <!--@mbg.generated--> |
| | | <!--@Table se_cancel--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="cardNum" jdbcType="VARCHAR" property="cardnum" /> |
| | | <result column="clientNum" jdbcType="VARCHAR" property="clientnum" /> |
| | | <result column="cardId" jdbcType="BIGINT" property="cardid" /> |
| | | <result column="clientId" jdbcType="BIGINT" property="clientid" /> |
| | | <result column="refund" jdbcType="FLOAT" property="refund" /> |
| | | <result column="refundType" jdbcType="TINYINT" property="refundtype" /> |
| | | <result column="remarks" jdbcType="VARCHAR" property="remarks" /> |
| | |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, cardNum, clientNum, refund, refundType, remarks, `operator`, operateDt |
| | | id, cardId, clientId, refund, refundType, remarks, `operator`, operateDt |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | |
| | | |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeCancel"> |
| | | <!--@mbg.generated--> |
| | | insert into se_cancel (id, cardNum, clientNum, refund, |
| | | insert into se_cancel (id, cardId, clientId, refund, |
| | | refundType, remarks, `operator`, |
| | | operateDt) |
| | | values (#{id,jdbcType=BIGINT}, #{cardnum,jdbcType=VARCHAR}, #{clientnum,jdbcType=VARCHAR}, #{refund,jdbcType=FLOAT}, |
| | | values (#{id,jdbcType=BIGINT}, #{cardid,jdbcType=BIGINT}, #{clientid,jdbcType=BIGINT}, #{refund,jdbcType=FLOAT}, |
| | | #{refundtype,jdbcType=TINYINT}, #{remarks,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, |
| | | #{operatedt,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | |
| | | <!--@mbg.generated--> |
| | | insert into se_cancel |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="cardnum != null"> |
| | | cardNum, |
| | | <if test="cardid != null"> |
| | | cardId, |
| | | </if> |
| | | <if test="clientnum != null"> |
| | | clientNum, |
| | | <if test="clientid != null"> |
| | | clientId, |
| | | </if> |
| | | <if test="refund != null"> |
| | | refund, |
| | |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="cardnum != null"> |
| | | #{cardnum,jdbcType=VARCHAR}, |
| | | <if test="cardid != null"> |
| | | #{cardid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="clientnum != null"> |
| | | #{clientnum,jdbcType=VARCHAR}, |
| | | <if test="clientid != null"> |
| | | #{clientid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="refund != null"> |
| | | #{refund,jdbcType=FLOAT}, |
| | |
| | | <!--@mbg.generated--> |
| | | update se_cancel |
| | | <set> |
| | | <if test="cardnum != null"> |
| | | cardNum = #{cardnum,jdbcType=VARCHAR}, |
| | | <if test="cardid != null"> |
| | | cardId = #{cardid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="clientnum != null"> |
| | | clientNum = #{clientnum,jdbcType=VARCHAR}, |
| | | <if test="clientid != null"> |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="refund != null"> |
| | | refund = #{refund,jdbcType=FLOAT}, |
| | |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoSe.SeCancel"> |
| | | <!--@mbg.generated--> |
| | | update se_cancel |
| | | set cardNum = #{cardnum,jdbcType=VARCHAR}, |
| | | clientNum = #{clientnum,jdbcType=VARCHAR}, |
| | | set cardId = #{cardid,jdbcType=BIGINT}, |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | refund = #{refund,jdbcType=FLOAT}, |
| | | refundType = #{refundtype,jdbcType=TINYINT}, |
| | | remarks = #{remarks,jdbcType=VARCHAR}, |
| | |
| | | SELECT |
| | | COUNT(*) AS recordCount |
| | | FROM se_cancel can |
| | | INNER JOIN se_client_card card ON can.cardNum = card.cardNum |
| | | INNER JOIN ba_client cli ON can.clientNum = cli.num |
| | | , (SELECT @i:=0) AS itable |
| | | INNER JOIN se_client_card card ON can.cardId = card.id |
| | | INNER JOIN se_client cli ON can.clientId = cli.id |
| | | , (SELECT @i:=0) AS itable |
| | | <where> |
| | | <if test = "clientName != null and clientName !=''"> |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | |
| | | SELECT |
| | | (@i:=@i+1) AS id, |
| | | cli.`name` AS clientName, |
| | | cli.num AS clientNum, |
| | | cli.clientNum, |
| | | card.cardNum, |
| | | can.refund, |
| | | (CASE |
| | | WHEN can.refundType = 1 THEN "现金" |
| | | WHEN can.refundType = 1 THEN "现金" |
| | | END) AS refundTypeName, |
| | | can.refundType, |
| | | (SELECT `name` FROM ba_user WHERE id = can.operator) AS operator, |
| | | can.operateDt |
| | | FROM se_cancel can |
| | | INNER JOIN se_client_card card ON can.cardNum = card.cardNum |
| | | INNER JOIN ba_client cli ON can.clientNum = cli.num |
| | | INNER JOIN se_client_card card ON can.cardId = card.id |
| | | INNER JOIN se_client cli ON can.clientId = cli.id |
| | | , (SELECT @i:=0) AS itable |
| | | <where> |
| | | <if test = "clientName != null and clientName !=''"> |
| | |
| | | <!--@mbg.generated--> |
| | | <!--@Table se_loss--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="cardNum" jdbcType="VARCHAR" property="cardnum" /> |
| | | <result column="clientNum" jdbcType="VARCHAR" property="clientnum" /> |
| | | <result column="cardId" jdbcType="BIGINT" property="cardid" /> |
| | | <result column="clientId" jdbcType="BIGINT" property="clientid" /> |
| | | <result column="money" jdbcType="FLOAT" property="money" /> |
| | | <result column="refund" jdbcType="FLOAT" property="refund" /> |
| | | <result column="remarks" jdbcType="VARCHAR" property="remarks" /> |
| | |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, cardNum, clientNum, money, refund, remarks, `operator`, operateDt |
| | | id, cardId, clientId, money, refund, remarks, `operator`, operateDt |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | |
| | | |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeLoss"> |
| | | <!--@mbg.generated--> |
| | | insert into se_loss (id, cardNum, clientNum, money, |
| | | insert into se_loss (id, cardId, clientId, money, |
| | | refund, remarks, `operator`, |
| | | operateDt) |
| | | values (#{id,jdbcType=BIGINT}, #{cardnum,jdbcType=VARCHAR}, #{clientnum,jdbcType=VARCHAR}, #{money,jdbcType=FLOAT}, |
| | | values (#{id,jdbcType=BIGINT}, #{cardid,jdbcType=BIGINT}, #{clientid,jdbcType=BIGINT}, #{money,jdbcType=FLOAT}, |
| | | #{refund,jdbcType=FLOAT}, #{remarks,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, |
| | | #{operatedt,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | |
| | | <!--@mbg.generated--> |
| | | insert into se_loss |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="cardnum != null"> |
| | | cardNum, |
| | | <if test="cardid != null"> |
| | | cardId, |
| | | </if> |
| | | <if test="clientnum != null"> |
| | | clientNum, |
| | | <if test="clientid != null"> |
| | | clientId, |
| | | </if> |
| | | <if test="money != null"> |
| | | money, |
| | |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="cardnum != null"> |
| | | #{cardnum,jdbcType=VARCHAR}, |
| | | <if test="cardid != null"> |
| | | #{cardid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="clientnum != null"> |
| | | #{clientnum,jdbcType=VARCHAR}, |
| | | <if test="clientid != null"> |
| | | #{clientid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="money != null"> |
| | | #{money,jdbcType=FLOAT}, |
| | |
| | | <!--@mbg.generated--> |
| | | update se_loss |
| | | <set> |
| | | <if test="cardnum != null"> |
| | | cardNum = #{cardnum,jdbcType=VARCHAR}, |
| | | <if test="cardid != null"> |
| | | cardId = #{cardid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="clientnum != null"> |
| | | clientNum = #{clientnum,jdbcType=VARCHAR}, |
| | | <if test="clientid != null"> |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="money != null"> |
| | | money = #{money,jdbcType=FLOAT}, |
| | |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoSe.SeLoss"> |
| | | <!--@mbg.generated--> |
| | | update se_loss |
| | | set cardNum = #{cardnum,jdbcType=VARCHAR}, |
| | | clientNum = #{clientnum,jdbcType=VARCHAR}, |
| | | set cardId = #{cardid,jdbcType=BIGINT}, |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | money = #{money,jdbcType=FLOAT}, |
| | | refund = #{refund,jdbcType=FLOAT}, |
| | | remarks = #{remarks,jdbcType=VARCHAR}, |
| | |
| | | SELECT |
| | | COUNT(*) AS recordCount |
| | | FROM se_loss loss |
| | | INNER JOIN se_client_card card ON loss.cardNum = card.cardNum |
| | | INNER JOIN ba_client cli ON loss.clientNum = cli.num |
| | | INNER JOIN se_client_card card ON loss.cardId = card.id |
| | | INNER JOIN se_client cli ON loss.clientId = cli.id |
| | | , (SELECT @i:=0) AS itable |
| | | <where> |
| | | <if test = "clientName != null and clientName !=''"> |
| | |
| | | SELECT |
| | | (@i:=@i+1) AS id, |
| | | cli.`name` AS clientName, |
| | | cli.num AS clientNum, |
| | | cli.clientNum, |
| | | card.cardNum, |
| | | loss.money, |
| | | (SELECT `name` FROM ba_user WHERE id = loss.operator) AS operator, |
| | | loss.operateDt |
| | | FROM se_loss loss |
| | | INNER JOIN se_client_card card ON loss.cardNum = card.cardNum |
| | | INNER JOIN ba_client cli ON loss.clientNum = cli.num |
| | | INNER JOIN se_client_card card ON loss.cardId = card.id |
| | | INNER JOIN se_client cli ON loss.clientId = cli.id |
| | | , (SELECT @i:=0) AS itable |
| | | <where> |
| | | <if test = "clientName != null and clientName !=''"> |
| | |
| | | <!--@mbg.generated--> |
| | | <!--@Table se_reversal--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="cardNum" jdbcType="VARCHAR" property="cardnum" /> |
| | | <result column="clientNum" jdbcType="VARCHAR" property="clientnum" /> |
| | | <result column="cardId" jdbcType="BIGINT" property="cardid" /> |
| | | <result column="clientId" jdbcType="BIGINT" property="clientid" /> |
| | | <result column="cardBalance" jdbcType="FLOAT" property="cardbalance" /> |
| | | <result column="systemBalance" jdbcType="FLOAT" property="systembalance" /> |
| | | <result column="remarks" jdbcType="VARCHAR" property="remarks" /> |
| | |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, cardNum, clientNum, cardBalance, systemBalance, remarks, `operator`, operateDt |
| | | id, cardId, clientId, cardBalance, systemBalance, remarks, `operator`, operateDt |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | |
| | | |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeReversal"> |
| | | <!--@mbg.generated--> |
| | | insert into se_reversal (id, cardNum, clientNum, cardBalance, |
| | | insert into se_reversal (id, cardId, clientId, cardBalance, |
| | | systemBalance, remarks, `operator`, |
| | | operateDt) |
| | | values (#{id,jdbcType=BIGINT}, #{cardnum,jdbcType=VARCHAR}, #{clientnum,jdbcType=VARCHAR}, #{cardbalance,jdbcType=FLOAT}, |
| | | values (#{id,jdbcType=BIGINT}, #{cardid,jdbcType=BIGINT}, #{clientid,jdbcType=BIGINT}, #{cardbalance,jdbcType=FLOAT}, |
| | | #{systembalance,jdbcType=FLOAT}, #{remarks,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, |
| | | #{operatedt,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | |
| | | <!--@mbg.generated--> |
| | | insert into se_reversal |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="cardnum != null"> |
| | | cardNum, |
| | | <if test="cardid != null"> |
| | | cardId, |
| | | </if> |
| | | <if test="clientnum != null"> |
| | | clientNum, |
| | | <if test="clientid != null"> |
| | | clientId, |
| | | </if> |
| | | <if test="cardbalance != null"> |
| | | cardBalance, |
| | |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="cardnum != null"> |
| | | #{cardnum,jdbcType=VARCHAR}, |
| | | <if test="cardid != null"> |
| | | #{cardid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="clientnum != null"> |
| | | #{clientnum,jdbcType=VARCHAR}, |
| | | <if test="clientid != null"> |
| | | #{clientid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="cardbalance != null"> |
| | | #{cardbalance,jdbcType=FLOAT}, |
| | |
| | | <!--@mbg.generated--> |
| | | update se_reversal |
| | | <set> |
| | | <if test="cardnum != null"> |
| | | cardNum = #{cardnum,jdbcType=VARCHAR}, |
| | | <if test="cardid != null"> |
| | | cardId = #{cardid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="clientnum != null"> |
| | | clientNum = #{clientnum,jdbcType=VARCHAR}, |
| | | <if test="clientid != null"> |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="cardbalance != null"> |
| | | cardBalance = #{cardbalance,jdbcType=FLOAT}, |
| | |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoSe.SeReversal"> |
| | | <!--@mbg.generated--> |
| | | update se_reversal |
| | | set cardNum = #{cardnum,jdbcType=VARCHAR}, |
| | | clientNum = #{clientnum,jdbcType=VARCHAR}, |
| | | set cardId = #{cardid,jdbcType=BIGINT}, |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | cardBalance = #{cardbalance,jdbcType=FLOAT}, |
| | | systemBalance = #{systembalance,jdbcType=FLOAT}, |
| | | remarks = #{remarks,jdbcType=VARCHAR}, |
| | |
| | | operateDt = #{operatedt,jdbcType=TIMESTAMP} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | <!--根据指定的条件获取冲正记录数--> |
| | | <select id="getRecordCount" parameterType="java.util.Map" resultType="java.lang.Long"> |
| | | SELECT |
| | | COUNT(*) AS recordCount |
| | | FROM se_reversal rev |
| | | INNER JOIN se_client_card card ON rev.cardNum = card.cardNum |
| | | INNER JOIN ba_client cli ON rev.clientNum = cli.num |
| | | , (SELECT @i:=0) AS itable |
| | | INNER JOIN se_client_card card ON rev.cardId = card.id |
| | | INNER JOIN se_client cli ON rev.clientId = cli.id |
| | | , (SELECT @i:=0) AS itable |
| | | <where> |
| | | <if test = "clientName != null and clientName !=''"> |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | |
| | | <!--根据指定的条件获取冲正记录--> |
| | | <select id="getReversals" resultType="com.dy.pipIrrGlobal.voSe.VoReversal"> |
| | | SELECT |
| | | (@i:=@i+1) AS id, |
| | | cli.`name` AS clientName, |
| | | cli.num AS clientNum, |
| | | card.cardNum, |
| | | rev.cardBalance, |
| | | (SELECT `name` FROM ba_user WHERE id = rev.operator) AS operator, |
| | | rev.operateDt |
| | | (@i:=@i+1) AS id, |
| | | cli.`name` AS clientName, |
| | | cli.clientNum, |
| | | card.cardNum, |
| | | rev.cardBalance, |
| | | (SELECT `name` FROM ba_user WHERE id = rev.operator) AS operator, |
| | | rev.operateDt |
| | | FROM se_reversal rev |
| | | INNER JOIN se_client_card card ON rev.cardNum = card.cardNum |
| | | INNER JOIN ba_client cli ON rev.clientNum = cli.num |
| | | , (SELECT @i:=0) AS itable |
| | | INNER JOIN se_client_card card ON rev.cardId = card.id |
| | | INNER JOIN se_client cli ON rev.clientId = cli.id |
| | | , (SELECT @i:=0) AS itable |
| | | <where> |
| | | <if test = "clientName != null and clientName !=''"> |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | |
| | | <!--@mbg.generated--> |
| | | <!--@Table se_unlock--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="cardNum" jdbcType="VARCHAR" property="cardnum" /> |
| | | <result column="clientNum" jdbcType="VARCHAR" property="clientnum" /> |
| | | <result column="cardId" jdbcType="BIGINT" property="cardid" /> |
| | | <result column="clientId" jdbcType="BIGINT" property="clientid" /> |
| | | <result column="money" jdbcType="FLOAT" property="money" /> |
| | | <result column="remarks" jdbcType="VARCHAR" property="remarks" /> |
| | | <result column="operator" jdbcType="BIGINT" property="operator" /> |
| | |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, cardNum, clientNum, money, remarks, `operator`, operateDt |
| | | id, cardId, clientId, money, remarks, `operator`, operateDt |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | |
| | | |
| | | <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeUnlock"> |
| | | <!--@mbg.generated--> |
| | | insert into se_unlock (id, cardNum, clientNum, money, |
| | | insert into se_unlock (id, cardId, clientId, money, |
| | | remarks, `operator`, operateDt |
| | | ) |
| | | values (#{id,jdbcType=BIGINT}, #{cardnum,jdbcType=VARCHAR}, #{clientnum,jdbcType=VARCHAR}, #{money,jdbcType=FLOAT}, |
| | | values (#{id,jdbcType=BIGINT}, #{cardid,jdbcType=BIGINT}, #{clientid,jdbcType=BIGINT}, #{money,jdbcType=FLOAT}, |
| | | #{remarks,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, #{operatedt,jdbcType=TIMESTAMP} |
| | | ) |
| | | </insert> |
| | |
| | | <!--@mbg.generated--> |
| | | insert into se_unlock |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="cardnum != null"> |
| | | cardNum, |
| | | <if test="cardid != null"> |
| | | cardId, |
| | | </if> |
| | | <if test="clientnum != null"> |
| | | clientNum, |
| | | <if test="clientid != null"> |
| | | clientId, |
| | | </if> |
| | | <if test="money != null"> |
| | | money, |
| | |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="cardnum != null"> |
| | | #{cardnum,jdbcType=VARCHAR}, |
| | | <if test="cardid != null"> |
| | | #{cardid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="clientnum != null"> |
| | | #{clientnum,jdbcType=VARCHAR}, |
| | | <if test="clientid != null"> |
| | | #{clientid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="money != null"> |
| | | #{money,jdbcType=FLOAT}, |
| | |
| | | <!--@mbg.generated--> |
| | | update se_unlock |
| | | <set> |
| | | <if test="cardnum != null"> |
| | | cardNum = #{cardnum,jdbcType=VARCHAR}, |
| | | <if test="cardid != null"> |
| | | cardId = #{cardid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="clientnum != null"> |
| | | clientNum = #{clientnum,jdbcType=VARCHAR}, |
| | | <if test="clientid != null"> |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="money != null"> |
| | | money = #{money,jdbcType=FLOAT}, |
| | |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoSe.SeUnlock"> |
| | | <!--@mbg.generated--> |
| | | update se_unlock |
| | | set cardNum = #{cardnum,jdbcType=VARCHAR}, |
| | | clientNum = #{clientnum,jdbcType=VARCHAR}, |
| | | set cardId = #{cardid,jdbcType=BIGINT}, |
| | | clientId = #{clientid,jdbcType=BIGINT}, |
| | | money = #{money,jdbcType=FLOAT}, |
| | | remarks = #{remarks,jdbcType=VARCHAR}, |
| | | `operator` = #{operator,jdbcType=BIGINT}, |
| | |
| | | SELECT |
| | | COUNT(*) AS recordCount |
| | | FROM se_unlock unl |
| | | INNER JOIN se_client_card card ON unl.cardNum = card.cardNum |
| | | INNER JOIN ba_client cli ON unl.clientNum = cli.num |
| | | , (SELECT @i:=0) AS itable |
| | | INNER JOIN se_client_card card ON unl.cardId = card.id |
| | | INNER JOIN se_client cli ON unl.clientId = cli.id |
| | | , (SELECT @i:=0) AS itable |
| | | <where> |
| | | <if test = "clientName != null and clientName !=''"> |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | |
| | | SELECT |
| | | (@i:=@i+1) AS id, |
| | | cli.`name` AS clientName, |
| | | cli.num AS clientNum, |
| | | cli.clientNum, |
| | | card.cardNum, |
| | | unl.money, |
| | | (SELECT `name` FROM ba_user WHERE id = unl.operator) AS operator, |
| | | unl.operateDt |
| | | FROM se_unlock unl |
| | | INNER JOIN se_client_card card ON unl.cardNum = card.cardNum |
| | | INNER JOIN ba_client cli ON unl.clientNum = cli.num |
| | | , (SELECT @i:=0) AS itable |
| | | INNER JOIN se_client_card card ON unl.cardId = card.id |
| | | INNER JOIN se_client cli ON unl.clientId = cli.id |
| | | , (SELECT @i:=0) AS itable |
| | | <where> |
| | | <if test = "clientName != null and clientName !=''"> |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | |
| | | |
| | | /** |
| | | * cardId 水卡编号(非传入参数,由cardAddr反查,修改农户卡使用) |
| | | * clientId 农户编号(非传入参数,由cardNum反查) |
| | | * cardNum 水卡编号 |
| | | * clientNum 农户编号(非传入参数,由cardNum反查,添加注销使用) |
| | | * refund 退款金额 |
| | | * refundType 退款方式 |
| | | * remarks 备注 |
| | |
| | | */ |
| | | Long cardId = 0L; |
| | | String cardNum = po.getCardNum(); |
| | | String clientNum = ""; |
| | | Long clientId = 0L; |
| | | Float refund = po.getRefund(); |
| | | Byte refundType = po.getRefundType(); |
| | | String remarks = po.getRemarks(); |
| | |
| | | return BaseResponseUtils.buildFail(SellResultCode.CARD_NUMBER_MISTAKE.getMessage()); |
| | | } |
| | | cardId = Long.parseLong(map.get("cardId").toString()); |
| | | clientNum = map.get("clientNum").toString(); |
| | | clientId = Long.parseLong(map.get("clientId").toString()); |
| | | |
| | | /** |
| | | * 修改农户卡信息: |
| | |
| | | * 添加挂失记录 |
| | | */ |
| | | SeCancel seCancel = new SeCancel(); |
| | | seCancel.setCardnum(cardNum); |
| | | seCancel.setClientnum(clientNum); |
| | | //seCancel.setCardnum(cardNum); |
| | | //seCancel.setClientnum(clientNum); |
| | | seCancel.setCardid(cardId); |
| | | seCancel.setClientid(clientId); |
| | | seCancel.setRefund(refund); |
| | | seCancel.setRefundtype(refundType); |
| | | seCancel.setRemarks(remarks); |
| | |
| | | schema = @Schema(implementation = VoLoss.class))} |
| | | ) |
| | | }) |
| | | @GetMapping(path = "/getLosses", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @GetMapping(path = "/getLosses") |
| | | @SsoAop() |
| | | public BaseResponse<QueryResultVo<List<VoLoss>>> getLosses(@RequestBody @Parameter(description = "查询form表单json数据", required = true) QueryVo vo){ |
| | | public BaseResponse<QueryResultVo<List<VoLoss>>> getLosses(QueryVo vo){ |
| | | try { |
| | | QueryResultVo<List<VoLoss>> res = lossSv.getLosses(vo); |
| | | return BaseResponseUtils.buildSuccess(res); |
| | |
| | | |
| | | /** |
| | | * cardId 水卡编号(非传入参数,由cardNum反查) |
| | | * clientId 农户编号(非传入参数,由cardNum反查) |
| | | * cardNum 水卡编号 |
| | | * clientNum 农户编号(非传入参数,由cardNum反查,添加挂失使用) |
| | | * money 余额 |
| | | * refund 退款金额 |
| | | * remarks 备注 |
| | |
| | | */ |
| | | Long cardId = 0L; |
| | | String cardNum = po.getCardNum(); |
| | | String clientNum = ""; |
| | | Long clientId = 0L; |
| | | Float money = po.getMoney(); |
| | | Float refund = po.getRefund(); |
| | | String remarks = po.getRemarks(); |
| | |
| | | return BaseResponseUtils.buildFail(SellResultCode.CARD_NUMBER_MISTAKE.getMessage()); |
| | | } |
| | | cardId = Long.parseLong(map.get("cardId").toString()); |
| | | clientNum = map.get("clientNum").toString(); |
| | | clientId = Long.parseLong(map.get("clientId").toString()); |
| | | |
| | | /** |
| | | * 修改农户卡信息: |
| | |
| | | * 添加挂失记录 |
| | | */ |
| | | SeLoss seLoss = new SeLoss(); |
| | | seLoss.setCardnum(cardNum); |
| | | seLoss.setClientnum(clientNum); |
| | | //seLoss.setCardnum(cardNum); |
| | | //seLoss.setClientnum(clientNum); |
| | | seLoss.setCardid(cardId); |
| | | seLoss.setClientid(clientId); |
| | | seLoss.setMoney(money); |
| | | seLoss.setRefund(refund); |
| | | seLoss.setRemarks(remarks); |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | //完善查询挂失记录的起止时间 |
| | | DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | |
| | | LocalDateTime lossTimeStart = queryVo.lossTimeStart; |
| | | LocalDateTime lossTimeStop = queryVo.lossTimeStop; |
| | | //LocalDateTime lossTimeStart = queryVo.lossTimeStart; |
| | | //LocalDateTime lossTimeStop = queryVo.lossTimeStop; |
| | | //if(lossTimeStart != null) { |
| | | // lossTimeStart = LocalDateTime.parse(df.format(lossTimeStart) + " 00:00:00", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | | // queryVo.setLossTimeStart(lossTimeStart); |
| | | //} |
| | | // |
| | | //if(lossTimeStop != null) { |
| | | // lossTimeStop = LocalDateTime.parse(df.format(lossTimeStop) + " 23:59:59", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | | // queryVo.setLossTimeStop(lossTimeStop); |
| | | //} |
| | | |
| | | String lossTimeStart = queryVo.lossTimeStart; |
| | | String lossTimeStop = queryVo.lossTimeStop; |
| | | if(lossTimeStart != null) { |
| | | lossTimeStart = LocalDateTime.parse(df.format(lossTimeStart) + " 00:00:00", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | | lossTimeStart = lossTimeStart + " 00:00:00"; |
| | | queryVo.setLossTimeStart(lossTimeStart); |
| | | } |
| | | |
| | | if(lossTimeStop != null) { |
| | | lossTimeStop = LocalDateTime.parse(df.format(lossTimeStop) + " 23:59:59", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | | lossTimeStop = lossTimeStop + " 23:59:59"; |
| | | queryVo.setLossTimeStop(lossTimeStop); |
| | | } |
| | | |
| | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.*; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/6 9:43 |
| | |
| | | @Schema(description = "农户姓名") |
| | | public String clientName; |
| | | |
| | | @Schema(description = "IC卡号") |
| | | public String cardAddr; |
| | | @Schema(description = "水卡ID") |
| | | //public String cardAddr; |
| | | public Long cardNum; |
| | | |
| | | @Schema(description = "挂失时间_开始") |
| | | public LocalDateTime lossTimeStart; |
| | | public String lossTimeStart; |
| | | |
| | | @Schema(description = "挂失时间_结束") |
| | | public LocalDateTime lossTimeStop; |
| | | public String lossTimeStop; |
| | | } |
| | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.*; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/4 17:20 |
| | |
| | | @Schema(description = "付款方式") |
| | | public Integer paymentId; |
| | | |
| | | //@Schema(description = "充值时间_开始") |
| | | //public LocalDateTime rechargeTimeStart; |
| | | // |
| | | //@Schema(description = "充值时间_结束") |
| | | //public LocalDateTime rechargeTimeStop; |
| | | |
| | | @Schema(description = "充值时间_开始") |
| | | //public DateTime rechargeTimeStart; |
| | | public LocalDateTime rechargeTimeStart; |
| | | public String rechargeTimeStart; |
| | | |
| | | @Schema(description = "充值时间_结束") |
| | | //public DateTime rechargeTimeStop; |
| | | public LocalDateTime rechargeTimeStop; |
| | | public String rechargeTimeStop; |
| | | } |
| | |
| | | schema = @Schema(implementation = VoRecharge.class))} |
| | | ) |
| | | }) |
| | | @GetMapping(path = "/getRecharges", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | //@GetMapping(path = "/getRecharges", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @GetMapping(path = "/getRecharges") |
| | | @SsoAop() |
| | | public BaseResponse<QueryResultVo<List<VoRecharge>>> get(@RequestBody @Parameter(description = "查询form表单json数据", required = true) QueryVo vo){ |
| | | public BaseResponse<QueryResultVo<List<VoRecharge>>> get(QueryVo vo){ |
| | | try { |
| | | QueryResultVo<List<VoRecharge>> res = rechargeSv.getRecharges(vo); |
| | | return BaseResponseUtils.buildSuccess(res); |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | //完善查询充值记录的起止时间 |
| | | DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | |
| | | LocalDateTime rechargeTimeStart = queryVo.rechargeTimeStart; |
| | | LocalDateTime rechargeTimeStop = queryVo.rechargeTimeStop; |
| | | //LocalDateTime rechargeTimeStart = queryVo.rechargeTimeStart; |
| | | //LocalDateTime rechargeTimeStop = queryVo.rechargeTimeStop; |
| | | //if(rechargeTimeStart != null) { |
| | | // rechargeTimeStart = LocalDateTime.parse(df.format(rechargeTimeStart) + " 00:00:00", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | | // queryVo.setRechargeTimeStart(rechargeTimeStart); |
| | | //} |
| | | // |
| | | //if(rechargeTimeStop != null) { |
| | | // rechargeTimeStop = LocalDateTime.parse(df.format(rechargeTimeStop) + " 23:59:59", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | | // queryVo.setRechargeTimeStop(rechargeTimeStop); |
| | | //} |
| | | |
| | | String rechargeTimeStart = queryVo.rechargeTimeStart; |
| | | String rechargeTimeStop = queryVo.rechargeTimeStop; |
| | | if(rechargeTimeStart != null) { |
| | | rechargeTimeStart = LocalDateTime.parse(df.format(rechargeTimeStart) + " 00:00:00", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | | rechargeTimeStart = rechargeTimeStart + " 00:00:00"; |
| | | queryVo.setRechargeTimeStart(rechargeTimeStart); |
| | | } |
| | | |
| | | if(rechargeTimeStop != null) { |
| | | rechargeTimeStop = LocalDateTime.parse(df.format(rechargeTimeStop) + " 23:59:59", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | | rechargeTimeStop = rechargeTimeStop + " 23:59:59"; |
| | | queryVo.setRechargeTimeStop(rechargeTimeStop); |
| | | } |
| | | |
| | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.*; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/6 15:57 |
| | |
| | | |
| | | |
| | | @Schema(description = "冲正时间_开始") |
| | | public LocalDateTime reversalTimeStart; |
| | | public String reversalTimeStart; |
| | | |
| | | @Schema(description = "冲正时间_结束") |
| | | public LocalDateTime reversalTimeStop; |
| | | public String reversalTimeStop; |
| | | } |
| | |
| | | schema = @Schema(implementation = VoReversal.class))} |
| | | ) |
| | | }) |
| | | @GetMapping(path = "/getReversals", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @GetMapping(path = "/getReversals") |
| | | @SsoAop() |
| | | public BaseResponse<QueryResultVo<List<VoReversal>>> getReversals(@RequestBody @Parameter(description = "查询form表单json数据", required = true) QueryVo vo){ |
| | | public BaseResponse<QueryResultVo<List<VoReversal>>> getReversals(QueryVo vo){ |
| | | try { |
| | | QueryResultVo<List<VoReversal>> res = reversalSv.getReversals(vo); |
| | | return BaseResponseUtils.buildSuccess(res); |
| | |
| | | |
| | | /** |
| | | * cardId 水卡编号(非传入参数,由cardAddr反查,修改农户卡使用) |
| | | * clientId 农户编号(非传入参数,由cardNum反查) |
| | | * cardNum 水卡地址 |
| | | * clientNum 农户编号(非传入参数,由cardNum反查,添加冲正使用) |
| | | * cardBalance 卡片余额 |
| | | * systemBalance 系统余额 |
| | | * remarks 备注 |
| | |
| | | */ |
| | | Long cardId = 0L; |
| | | String cardNum = po.getCardNum(); |
| | | String clientNum = ""; |
| | | Long clientId = 0L; |
| | | Float cardBalance = po.getCardBalance(); |
| | | Float systemBalance = po.getSystemBalance(); |
| | | String remarks = po.getRemarks(); |
| | |
| | | return BaseResponseUtils.buildFail(SellResultCode.CARD_NUMBER_MISTAKE.getMessage()); |
| | | } |
| | | cardId = Long.parseLong(map.get("cardId").toString()); |
| | | clientNum = map.get("clientNum").toString(); |
| | | clientId = Long.parseLong(map.get("clientId").toString()); |
| | | |
| | | /** |
| | | * 修改农户卡信息: |
| | |
| | | * 添加冲正记录 |
| | | */ |
| | | SeReversal reversal = new SeReversal(); |
| | | reversal.setCardnum(cardNum); |
| | | reversal.setClientnum(clientNum); |
| | | //reversal.setCardnum(cardNum); |
| | | //reversal.setClientnum(clientNum); |
| | | reversal.setCardid(cardId); |
| | | reversal.setClientid(clientId); |
| | | reversal.setCardbalance(cardBalance); |
| | | reversal.setSystembalance(systemBalance); |
| | | reversal.setRemarks(remarks); |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | //完善查询注销记录的起止时间 |
| | | DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | |
| | | LocalDateTime reversalTimeStart = queryVo.reversalTimeStart; |
| | | LocalDateTime reversalTimeStop = queryVo.reversalTimeStop; |
| | | String reversalTimeStart = queryVo.reversalTimeStart; |
| | | String reversalTimeStop = queryVo.reversalTimeStop; |
| | | if(reversalTimeStart != null) { |
| | | reversalTimeStart = LocalDateTime.parse(df.format(reversalTimeStart) + " 00:00:00", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | | reversalTimeStart = reversalTimeStart + " 00:00:00"; |
| | | queryVo.setReversalTimeStart (reversalTimeStart); |
| | | } |
| | | |
| | | if(reversalTimeStop != null) { |
| | | reversalTimeStop = LocalDateTime.parse(df.format(reversalTimeStop) + " 23:59:59", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | | reversalTimeStop = reversalTimeStop + " 23:59:59"; |
| | | queryVo.setReversalTimeStop(reversalTimeStop); |
| | | } |
| | | |
| | |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.*; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2023/12/6 15:00 |
| | |
| | | public String clientName; |
| | | |
| | | @Schema(description = "IC卡号") |
| | | public String cardAddr; |
| | | public Long cardNum; |
| | | |
| | | |
| | | @Schema(description = "解锁时间_开始") |
| | | public LocalDateTime unlocklTimeStart; |
| | | public String unlocklTimeStart; |
| | | |
| | | @Schema(description = "解锁时间_结束") |
| | | public LocalDateTime unlockTimeStop; |
| | | public String unlockTimeStop; |
| | | } |
| | |
| | | schema = @Schema(implementation = VoUnlock.class))} |
| | | ) |
| | | }) |
| | | @GetMapping(path = "/getUnlocks", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @GetMapping(path = "/getUnlocks") |
| | | @SsoAop() |
| | | public BaseResponse<QueryResultVo<List<VoUnlock>>> getUnlocks(@RequestBody @Parameter(description = "查询form表单json数据", required = true) QueryVo vo){ |
| | | public BaseResponse<QueryResultVo<List<VoUnlock>>> getUnlocks(QueryVo vo){ |
| | | try { |
| | | QueryResultVo<List<VoUnlock>> res = unlockSv.getUnlocks(vo); |
| | | return BaseResponseUtils.buildSuccess(res); |
| | |
| | | |
| | | /** |
| | | * cardId 水卡编号(非传入参数,由cardAddr反查,修改农户卡使用) |
| | | * clientId 农户编号(非传入参数,由cardNum反查) |
| | | * cardNum 水卡地址 |
| | | * clientNum 农户编号(非传入参数,由cardNum反查,添加解锁使用) |
| | | * money 余额 |
| | | * remarks 备注 |
| | | * operator 操作人编号 |
| | |
| | | */ |
| | | Long cardId = 0L; |
| | | String cardNum = po.getCardNum(); |
| | | String clientNum = ""; |
| | | Long clientId = 0L; |
| | | Float money = po.getMoney(); |
| | | String remarks = po.getRemarks(); |
| | | Long operator = po.getOperator(); |
| | |
| | | return BaseResponseUtils.buildFail(SellResultCode.CARD_NUMBER_MISTAKE.getMessage()); |
| | | } |
| | | cardId = Long.parseLong(map.get("cardId").toString()); |
| | | clientNum = map.get("clientNum").toString(); |
| | | clientId = Long.parseLong(map.get("clientId").toString()); |
| | | |
| | | /** |
| | | * 修改农户卡信息: |
| | |
| | | * 添加解锁记录 |
| | | */ |
| | | SeUnlock seUnlock = new SeUnlock(); |
| | | seUnlock.setCardnum(cardNum); |
| | | seUnlock.setClientnum(clientNum); |
| | | //seUnlock.setCardnum(cardNum); |
| | | //seUnlock.setClientnum(clientNum); |
| | | seUnlock.setCardid(cardId); |
| | | seUnlock.setClientid(clientId); |
| | | seUnlock.setMoney(money); |
| | | seUnlock.setRemarks(remarks); |
| | | seUnlock.setOperator(operator); |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | //完善查询注销记录的起止时间 |
| | | DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
| | | |
| | | LocalDateTime unlocklTimeStart = queryVo.unlocklTimeStart; |
| | | LocalDateTime unlockTimeStop = queryVo.unlockTimeStop; |
| | | String unlocklTimeStart = queryVo.unlocklTimeStart; |
| | | String unlockTimeStop = queryVo.unlockTimeStop; |
| | | if(unlocklTimeStart != null) { |
| | | unlocklTimeStart = LocalDateTime.parse(df.format(unlocklTimeStart) + " 00:00:00", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | | unlocklTimeStart = unlocklTimeStart + " 00:00:00"; |
| | | queryVo.setUnlocklTimeStart(unlocklTimeStart); |
| | | } |
| | | |
| | | if(unlockTimeStop != null) { |
| | | unlockTimeStop = LocalDateTime.parse(df.format(unlockTimeStop) + " 23:59:59", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | | unlockTimeStop = unlockTimeStop + " 23:59:59"; |
| | | queryVo.setUnlockTimeStop(unlockTimeStop); |
| | | } |
| | | |