Bladeren bron

添加凭证号 图片id字段

Qchen 2 jaren geleden
bovenliggende
commit
6f2f23ecec

+ 8 - 0
src/main/java/com/ydtech/modules/admin/model/SysDeptAccountWithdraw.java

@@ -63,4 +63,12 @@ public class SysDeptAccountWithdraw implements Serializable {
     @JsonFormat(pattern = "yyyy-MM-dd")
     @JsonDeserialize(using = LocalDateTimeDeserializer.class)
     private LocalDateTime createTime;
+
+    @TableField(value = "voucher_id")
+    @ApiModelProperty(value = "凭证号")
+    private String voucherId;
+
+    @TableField(value = "pic_id")
+    @ApiModelProperty(value = "图片id")
+    private String picId;
 }

+ 8 - 0
src/main/java/com/ydtech/modules/admin/model/vo/SysDeptAccountWithdrawVo.java

@@ -34,6 +34,14 @@ public class SysDeptAccountWithdrawVo implements Serializable {
     @ApiModelProperty(value = "备注")
     private String remark;
 
+    @TableField(value = "voucher_id")
+    @ApiModelProperty(value = "凭证号")
+    private String voucherId;
+
+    @TableField(value = "pic_id")
+    @ApiModelProperty(value = "图片id")
+    private String picId;
+
     @TableField(value = "create_time")
     @ApiModelProperty(value = "创建时间")
     private String createTime;

+ 1 - 0
src/main/java/com/ydtech/modules/admin/service/impl/SysDeptAccountWithdrawServiceImpl.java

@@ -72,6 +72,7 @@ public class SysDeptAccountWithdrawServiceImpl extends ServiceImpl<SysDeptAccoun
             sysDeptAccount.setManagementFee(sysDeptAccount.getManagementFee().add(sysDeptAccountWithdraw.getAmount()));
             sysDeptAccountService.updateById(sysDeptAccount);
         }
+        sysDeptAccountWithdraw.setVoucherId(sysDeptAccountWithdraw.getVoucherId());
         sysDeptAccountWithdraw.setAuditUserid(BaseController.getUser().getName());
         sysDeptAccountWithdraw.setAuditName(BaseController.getUser().getId());
         sysDeptAccountWithdrawService.updateById(sysDeptAccountWithdraw);

+ 10 - 3
src/main/resources/mapper/modules/admin/SysDeptAccountWithdrawMapper.xml

@@ -8,6 +8,8 @@
         <result property="amount" column="amount" jdbcType="DECIMAL"/>
         <result property="status" column="status" jdbcType="VARCHAR"/>
         <result property="remark" column="remark" jdbcType="VARCHAR"/>
+        <result property="voucherId" column="voucher_id" jdbcType="VARCHAR"/>
+        <result property="picId" column="pic_id" jdbcType="VARCHAR"/>
         <result property="createTime" column="create_date" jdbcType="TIMESTAMP"/>
         <result property="createTimeStart" column="createTimeStart" jdbcType="VARCHAR"/>
         <result property="createTimeEnd" column="createTimeEnd" jdbcType="VARCHAR"/>
@@ -22,6 +24,8 @@
         amount,
         status,
         remark,
+        voucher_id,
+        pic_id,
         DATE(create_time) as create_date
         from sys_dept_account_withdraw
         where
@@ -29,13 +33,16 @@
              status = #{sysDeptAccountWithdrawVo.status}
         </if>
         <if test="sysDeptAccountWithdrawVo.deptId != null and sysDeptAccountWithdrawVo.deptId != ''">
-            and dept_id  = #{sysDeptAccountWithdrawVo.deptId}
+            and dept_id = #{sysDeptAccountWithdrawVo.deptId}
+        </if>
+        <if test="sysDeptAccountWithdrawVo.voucherId != null and sysDeptAccountWithdrawVo.voucherId != ''">
+            and voucher_id = #{sysDeptAccountWithdrawVo.voucherId}
         </if>
         <if test="sysDeptAccountWithdrawVo.createTimeStart != null and sysDeptAccountWithdrawVo.createTimeStart != ''">
-            and create_time &gt;= #{sysDeptAccountWithdrawVo.createTimeStart}
+            and DATE(create_time) &gt;= #{sysDeptAccountWithdrawVo.createTimeStart}
         </if>
         <if test="sysDeptAccountWithdrawVo.createTimeEnd != null and sysDeptAccountWithdrawVo.createTimeEnd != ''">
-            and create_time &lt;= #{sysDeptAccountWithdrawVo.createTimeEnd}
+            and DATE(create_time) &lt;= #{sysDeptAccountWithdrawVo.createTimeEnd}
         </if>
     </select>