Ver Fonte

客户收款

fubin há 2 anos atrás
pai
commit
467252d52c

+ 12 - 7
src/main/java/com/dk/mdm/mapper/mac/AccountItemMapper.xml

@@ -139,7 +139,7 @@
     <select id="selectByCond" resultMap="BaseResultMap">
         SELECT
         <include refid="Base_Column_List"/>
-        FROM t_mac_account_item
+        FROM dkic_b.t_mac_account_item
         <include refid="Condition"/>
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
             limit #{end} offset #{start}
@@ -150,7 +150,7 @@
     <select id="countByCond" resultType="Long">
         SELECT
         count(1)
-        FROM t_mac_account_item
+        FROM dkic_b.t_mac_account_item
         <include refid="Condition"/>
     </select>
 
@@ -158,7 +158,7 @@
     <select id="selectById" resultMap="BaseResultMap">
         SELECT
         <include refid="Base_Column_List"/>
-        FROM t_mac_account_item
+        FROM dkic_b.t_mac_account_item
         WHERE item_id = #{itemId}::uuid
     </select>
 
@@ -166,7 +166,7 @@
     <select id="selectByIdForUpdate" resultMap="BaseResultMap">
         SELECT
         <include refid="Base_Column_List"/>
-        FROM t_mac_account_item
+        FROM dkic_b.t_mac_account_item
         WHERE item_id = #{id}::uuid
         for update
     </select>
@@ -175,13 +175,13 @@
     <select id="selectByIdsForUpdate" resultMap="BaseResultMap">
         SELECT
         <include refid="Base_Column_List"/>
-        FROM t_mac_account_item
+        FROM dkic_b.t_mac_account_item
         <include refid="idsForeach"/>
         for update
     </select>
 
     <insert id="insertBatch">
-        insert into t_mac_account_item
+        insert into dkic_b.t_mac_account_item
         (
         <trim suffixOverrides=",">
             acc_item_type,
@@ -237,9 +237,14 @@
 
     <!-- 查询收款总额 -->
     <select id="getSumAmtRec" resultType="java.util.Map">
-        SELECT sum(tmai.amt_rec) as sumAmtRec
+        SELECT sum(tmai.amt_rec) as "sumAmtRec"
         FROM dkic_b.t_mac_account_item as tmai
         where tmai.flg_valid
           and tmai.object_id = #{id}::uuid
     </select>
+
+    <delete id="deleteById">
+        DELETE FROM dkic_b.t_mac_account_item
+        WHERE item_id = #{id}::uuid;
+    </delete>
 </mapper>

+ 6 - 6
src/main/java/com/dk/mdm/mapper/mac/AccountMapper.xml

@@ -107,7 +107,7 @@
     <select id="selectByCond" resultMap="BaseResultMap">
         SELECT
         <include refid="Base_Column_List"/>
-        FROM t_mac_account
+        FROM dkic_b.t_mac_account
         <include refid="Condition"/>
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
             limit #{end} offset #{start}
@@ -118,7 +118,7 @@
     <select id="countByCond" resultType="Long">
         SELECT
         count(1)
-        FROM t_mac_account
+        FROM dkic_b.t_mac_account
         <include refid="Condition"/>
     </select>
 
@@ -126,7 +126,7 @@
     <select id="selectById" resultMap="BaseResultMap">
         SELECT
         <include refid="Base_Column_List"/>
-        FROM t_mac_account
+        FROM dkic_b.t_mac_account
         WHERE object_id = #{objectId}::uuid
     </select>
 
@@ -134,7 +134,7 @@
     <select id="selectByIdForUpdate" resultMap="BaseResultMap">
         SELECT
         <include refid="Base_Column_List"/>
-        FROM t_mac_account
+        FROM dkic_b.t_mac_account
         WHERE object_id = #{id}::uuid
         for update
     </select>
@@ -143,13 +143,13 @@
     <select id="selectByIdsForUpdate" resultMap="BaseResultMap">
         SELECT
         <include refid="Base_Column_List"/>
-        FROM t_mac_account
+        FROM dkic_b.t_mac_account
         <include refid="idsForeach"/>
         for update
     </select>
 
     <insert id="insertBatch">
-        insert into t_mac_account
+        insert into dkic_b.t_mac_account
         (
         <trim suffixOverrides=",">
             object_type,

+ 10 - 10
src/main/java/com/dk/mdm/mapper/mac/RecPayItemMapper.xml

@@ -5,7 +5,7 @@
     <!-- 通用设置 -->
     <!-- 通用查询列 -->
     <sql id="Base_Column_List">
-        item_id , rp_id, mac_id, amt_rec, amt_pay, acc_item_id, acc_date, remarks, make_staff, make_time, flg_valid, cp_id, op_create_time, op_create_user_id, op_update_time, op_update_user_id, op_app_code, op_timestamp, op_db_user
+        item_id , rp_id, mac_id, amt_rec, amt_pay, acc_item_id, acc_date, remarks, make_staff, make_time, flg_valid, cp_id
     </sql>
 
     <!-- 通用查询映射结果 -->
@@ -102,7 +102,7 @@
                t.make_time,
                t.flg_valid,
                t.cp_id
-        FROM t_mac_rec_pay_item as t
+        FROM dkic_b.t_mac_rec_pay_item as t
                  inner join dkic_b.t_mst_money_account tmma on tmma.mac_id = t.mac_id
         <include refid="Condition"/>
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
@@ -114,7 +114,7 @@
     <select id="countByCond" resultType="Long">
         SELECT
         count(1)
-        FROM t_mac_rec_pay_item as t
+        FROM dkic_b.t_mac_rec_pay_item as t
                  inner join dkic_b.t_mst_money_account tmma on tmma.mac_id = t.mac_id
         <include refid="Condition"/>
     </select>
@@ -123,7 +123,7 @@
     <select id="selectById" resultMap="BaseResultMap">
         SELECT
         <include refid="Base_Column_List"/>
-        FROM t_mac_rec_pay_item
+        FROM dkic_b.t_mac_rec_pay_item
         WHERE item_id = #{itemId}::uuid
     </select>
 
@@ -131,7 +131,7 @@
     <select id="selectByIdForUpdate" resultMap="BaseResultMap">
         SELECT
         <include refid="Base_Column_List"/>
-        FROM t_mac_rec_pay_item
+        FROM dkic_b.t_mac_rec_pay_item
         WHERE item_id = #{id}::uuid
         for update
     </select>
@@ -140,13 +140,13 @@
     <select id="selectByIdsForUpdate" resultMap="BaseResultMap">
         SELECT
         <include refid="Base_Column_List"/>
-        FROM t_mac_rec_pay_item
+        FROM dkic_b.t_mac_rec_pay_item
         <include refid="idsForeach"/>
         for update
     </select>
 
     <insert id="insertBatch">
-        insert into t_mac_rec_pay_item
+        insert into dkic_b.t_mac_rec_pay_item
         (
         <trim suffixOverrides=",">
             rp_id,
@@ -186,13 +186,13 @@
     <select id="selectByZIdForUpdate" resultMap="BaseResultMap">
         SELECT
         <include refid="Base_Column_List"/>
-        FROM dkic_b.t_psi_order_item
+        FROM dkic_b.t_mac_rec_pay_item
         WHERE rp_id = #{id}::uuid
         for update
     </select>
 
     <delete id="deleteById">
-        DELETE FROM dkic_b.t_psi_order_item
-        WHERE item_id = #{id}::UUID;
+        DELETE FROM dkic_b.t_mac_rec_pay_item
+        WHERE item_id = #{id}::uuid;
     </delete>
 </mapper>

+ 3 - 3
src/main/java/com/dk/mdm/mapper/mac/RecPayMapper.xml

@@ -269,7 +269,7 @@
     <select id="selectByIdForUpdate" resultMap="BaseResultMap">
         SELECT
         <include refid="Base_Column_List"/>
-        FROM t_mac_rec_pay
+        FROM dkic_b.t_mac_rec_pay
         WHERE rp_id = #{id}::uuid
         for update
     </select>
@@ -278,13 +278,13 @@
     <select id="selectByIdsForUpdate" resultMap="BaseResultMap">
         SELECT
         <include refid="Base_Column_List"/>
-        FROM t_mac_rec_pay
+        FROM dkic_b.t_mac_rec_pay
         <include refid="idsForeach"/>
         for update
     </select>
 
     <insert id="insertBatch">
-        insert into t_mac_rec_pay
+        insert into dkic_b.t_mac_rec_pay
         (
         <trim suffixOverrides=",">
             rp_no,

+ 1 - 1
src/main/java/com/dk/mdm/mapper/mst/MoneyAccountItemMapper.xml

@@ -182,7 +182,7 @@
 
     <!-- 查询收款总额 -->
     <select id="getSumAmtInflow" resultType="java.util.Map">
-        SELECT sum(tmmai.amt_inflow) as sumAmtInflow
+        SELECT sum(tmmai.amt_inflow) as "sumAmtInflow"
         FROM dkic_b.t_mst_money_account_item as tmmai
         where tmmai.flg_valid
           and tmmai.mac_id = #{id}::uuid

+ 0 - 75
src/main/java/com/dk/mdm/model/pojo/mac/RecPayItem.java

@@ -143,81 +143,6 @@ public class RecPayItem extends PageInfo<RecPayItem> implements Serializable {
     private Integer cpId;
 
 
-    /**
-     * 创建时间 (触发器自动处理)
-     */
-    @Excel(name = "创建时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
-    @ApiModelProperty(value = "创建时间 (触发器自动处理)")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-    @TableField(typeHandler = TimestampTypeHandler.class)
-    private LocalDateTime opCreateTime;
-
-
-    /**
-     * 创建用户 (触发器自动处理)
-     */
-    @Excel(name = "创建用户 (触发器自动处理)")
-    @ApiModelProperty(value = "创建用户 (触发器自动处理)")
-    @TableField(typeHandler = UuidTypeHandler.class)
-    private String opCreateUserId;
-
-
-    /**
-     * 修改时间 (触发器自动处理)
-     */
-    @Excel(name = "修改时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
-    @ApiModelProperty(value = "修改时间 (触发器自动处理)")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-    @TableField(typeHandler = TimestampTypeHandler.class)
-    private LocalDateTime opUpdateTime;
-
-
-    /**
-     * 修改用户 (触发器自动处理)
-     */
-    @Excel(name = "修改用户 (触发器自动处理)")
-    @ApiModelProperty(value = "修改用户 (触发器自动处理)")
-    @TableField(typeHandler = UuidTypeHandler.class)
-    private String opUpdateUserId;
-
-
-    /**
-     * 数据操作应用 (触发器自动处理)
-     */
-    @Excel(name = "数据操作应用 (触发器自动处理)")
-    @ApiModelProperty(value = "数据操作应用 (触发器自动处理)")
-    private String opAppCode;
-
-
-    /**
-     * 数据时间戳 (触发器自动处理)
-     */
-    @Excel(name = "数据时间戳 (触发器自动处理)")
-    @ApiModelProperty(value = "数据时间戳 (触发器自动处理)")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
-    @TableField(typeHandler = TimestampTypeHandler.class)
-    private LocalDateTime opTimestamp;
-
-
-    /**
-     * 数据操作数据库用户 (触发器自动处理)
-     */
-    @Excel(name = "数据操作数据库用户 (触发器自动处理)")
-    @ApiModelProperty(value = "数据操作数据库用户 (触发器自动处理)")
-    private String opDbUser;
-
-
-    /*
-     * 相关属性
-     * @TableField(exist = false)
-     */
-
-    /*
-     * 关联属性 + 查询条件
-     * @TableField(exist = false)
-     */
-
-
     private static final long serialVersionUID = 1L;
 
 }

+ 1 - 1
src/main/java/com/dk/mdm/service/mac/AccountService.java

@@ -73,7 +73,7 @@ public class AccountService extends BaseService<Account> {
      * @date : 2024-03-22 11:08
      */
     public void updateMac(String macId) {
-
+        // 查询当前账户流水合计
         Map<String, Object> mapSumAmtInflow = moneyAccountItemMapper.getSumAmtInflow(macId);
         BigDecimal sumAmtInflow = new BigDecimal(mapSumAmtInflow.get("sumAmtInflow").toString());
 

+ 0 - 1
src/main/java/com/dk/mdm/service/mac/RecPayService.java

@@ -279,7 +279,6 @@ public class RecPayService extends BaseService<RecPay> {
             rollbackFor = {Exception.class}
     )
     public ResponseResultVO<?> update(RecPayVO recPayVO) {
-
         // 将之前的明细全部删除
         List<RecPayItem> recPayItemOriginalList = recPayItemMapper.selectByZIdForUpdate(recPayVO.getRpId());
         // 需要重新计算的资金账户