Procházet zdrojové kódy

财务管理付费打印(注销)

wangzhuo před 2 roky
rodič
revize
faa2cfa483

+ 21 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/finance/TPaymentController.java

@@ -222,4 +222,25 @@ public class TPaymentController extends BaseController {
         return getDataTable(list);
     }
 
+    /**
+     * 付费打印
+     */
+    @PreAuthorize("@ss.hasPermi('finance:payment:printTFeeB')")
+    @GetMapping("/print/{fId}")
+    public AjaxResult print(@PathVariable("fId") Long fId) {
+        return tFeeService.print(fId);
+    }
+
+    /**
+     * 确认打印修改打印次数与打印时间
+     */
+    @PreAuthorize("@ss.hasPermi('finance:payment:printTFeeB')")
+    @PostMapping("/setPrintTime")
+    public AjaxResult setPrintTime(@RequestBody() Map<String, String> data) {
+        String id = data.get("id");
+        Long fId = Long.valueOf(id);
+        String printDate = data.get("printDate");
+        return toAjax(tFeeService.setPrintTime(fId, printDate));
+    }
+
 }

+ 180 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/documents/TFeeDoc.java

@@ -0,0 +1,180 @@
+package com.ruoyi.finance.documents;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class TFeeDoc {
+
+    private Long fId;
+    private Integer fNumberPrint;
+    private Date fPrintTime;
+    private Long fCorpid;
+    private Date fAccbilldate;
+    private Date fBsdateStart;
+    private Date fBsdateEnd;
+    private String fBillno;
+    private Long fCtrlcorpidLong;
+    private String createBy;
+    private Date createTime;
+    private String bank;
+    private String invoiceNo;
+    private String waterBillNo;
+    private String fRemarks;
+    private BigDecimal fAmtdr;
+    private BigDecimal fAmtcr;
+    private String fAmtdrB;
+    private String fAmtcrB;
+
+
+    public Long getfId() {
+        return fId;
+    }
+
+    public void setfId(Long fId) {
+        this.fId = fId;
+    }
+
+    public Integer getfNumberPrint() {
+        return fNumberPrint;
+    }
+
+    public void setfNumberPrint(Integer fNumberPrint) {
+        this.fNumberPrint = fNumberPrint;
+    }
+
+    public Date getfPrintTime() {
+        return fPrintTime;
+    }
+
+    public void setfPrintTime(Date fPrintTime) {
+        this.fPrintTime = fPrintTime;
+    }
+
+    public Long getfCorpid() {
+        return fCorpid;
+    }
+
+    public void setfCorpid(Long fCorpid) {
+        this.fCorpid = fCorpid;
+    }
+
+    public Date getfAccbilldate() {
+        return fAccbilldate;
+    }
+
+    public void setfAccbilldate(Date fAccbilldate) {
+        this.fAccbilldate = fAccbilldate;
+    }
+
+    public Date getfBsdateStart() {
+        return fBsdateStart;
+    }
+
+    public void setfBsdateStart(Date fBsdateStart) {
+        this.fBsdateStart = fBsdateStart;
+    }
+
+    public Date getfBsdateEnd() {
+        return fBsdateEnd;
+    }
+
+    public void setfBsdateEnd(Date fBsdateEnd) {
+        this.fBsdateEnd = fBsdateEnd;
+    }
+
+    public String getfBillno() {
+        return fBillno;
+    }
+
+    public void setfBillno(String fBillno) {
+        this.fBillno = fBillno;
+    }
+
+    public Long getfCtrlcorpidLong() {
+        return fCtrlcorpidLong;
+    }
+
+    public void setfCtrlcorpidLong(Long fCtrlcorpidLong) {
+        this.fCtrlcorpidLong = fCtrlcorpidLong;
+    }
+
+    public String getCreateBy() {
+        return createBy;
+    }
+
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getBank() {
+        return bank;
+    }
+
+    public void setBank(String bank) {
+        this.bank = bank;
+    }
+
+    public String getInvoiceNo() {
+        return invoiceNo;
+    }
+
+    public void setInvoiceNo(String invoiceNo) {
+        this.invoiceNo = invoiceNo;
+    }
+
+    public String getWaterBillNo() {
+        return waterBillNo;
+    }
+
+    public void setWaterBillNo(String waterBillNo) {
+        this.waterBillNo = waterBillNo;
+    }
+
+    public String getfRemarks() {
+        return fRemarks;
+    }
+
+    public void setfRemarks(String fRemarks) {
+        this.fRemarks = fRemarks;
+    }
+
+    public BigDecimal getfAmtdr() {
+        return fAmtdr;
+    }
+
+    public void setfAmtdr(BigDecimal fAmtdr) {
+        this.fAmtdr = fAmtdr;
+    }
+
+    public BigDecimal getfAmtcr() {
+        return fAmtcr;
+    }
+
+    public void setfAmtcr(BigDecimal fAmtcr) {
+        this.fAmtcr = fAmtcr;
+    }
+
+    public String getfAmtdrB() {
+        return fAmtdrB;
+    }
+
+    public void setfAmtdrB(String fAmtdrB) {
+        this.fAmtdrB = fAmtdrB;
+    }
+
+    public String getfAmtcrB() {
+        return fAmtcrB;
+    }
+
+    public void setfAmtcrB(String fAmtcrB) {
+        this.fAmtcrB = fAmtcrB;
+    }
+}

+ 1 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/domain/TFee.java

@@ -72,6 +72,7 @@ public class TFee extends BaseEntity {
     /**
      * 打印时间
      */
+    @JsonFormat(pattern = "yyy-MM-dd hh:mm:ss")
     private Date fPrintTime;
 
     public Integer getfNumberPrint() {

+ 8 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/mapper/TFeeMapper.java

@@ -193,4 +193,12 @@ public interface TFeeMapper {
      * @return
      */
     String getNameByFId(Long fId);
+
+    /**
+     * 确认打印修改打印次数与打印时间
+     * @param fId id
+     * @param printDate 时间
+     * @return sql执行成功次数
+     */
+    int setPrintTime(@Param("fId") Long fId, @Param("printDate") String printDate);
 }

+ 15 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/service/ITFeeService.java

@@ -305,4 +305,19 @@ public interface ITFeeService {
      * @return
      */
     String getNameByFId(Long fId);
+
+    /**
+     * 打印
+     * @param fId
+     * @return
+     */
+    AjaxResult print(Long fId);
+
+    /**
+     * 确认打印修改打印次数与打印时间
+     * @param fId id
+     * @param printDate 时间
+     * @return sql执行成功次数
+     */
+    int setPrintTime(Long fId, String printDate);
 }

+ 63 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/service/impl/TFeeServiceImpl.java

@@ -15,9 +15,11 @@ import com.ruoyi.basicData.mapper.TFeesMapper;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.entity.SysDictData;
 import com.ruoyi.common.core.domain.model.LoginUser;
+import com.ruoyi.common.core.text.Convert;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.finance.documents.TFeeDoc;
 import com.ruoyi.finance.domain.TFee;
 import com.ruoyi.finance.domain.TFeeDo;
 import com.ruoyi.finance.domain.TWareHouseFees;
@@ -208,6 +210,67 @@ public class TFeeServiceImpl implements ITFeeService {
         return map;
     }
 
+    /**
+     * 打印数据查询
+     * @param fId
+     * @return
+     */
+    @Override
+    public AjaxResult print(Long fId) {
+
+        TFee tFee = tFeeMapper.selectTFeeById(fId);
+
+        TFeeDoc doc = new TFeeDoc();
+        doc.setfId(tFee.getfId());
+        doc.setfNumberPrint(tFee.getfNumberPrint());
+        doc.setfCorpid(tFee.getfCorpid());
+        doc.setfAccbilldate(tFee.getfAccbilldate());
+        doc.setfBsdateStart(tFee.getfBsdateStart());
+        doc.setfBsdateEnd(tFee.getfBsdateEnd());
+        doc.setfBillno(tFee.getfBillno());
+
+        String fCtrlcorpid = tFee.getfCtrlcorpid();
+        if (fCtrlcorpid != null && !"".equals(fCtrlcorpid)) {
+            Long aLong = Long.valueOf(fCtrlcorpid);
+            doc.setfCtrlcorpidLong(aLong);
+        }
+
+        doc.setCreateBy(tFee.getCreateBy());
+        doc.setCreateTime(tFee.getCreateTime());
+        doc.setBank(tFee.getBank());
+        doc.setInvoiceNo(tFee.getInvoiceNo());
+        doc.setWaterBillNo(tFee.getWaterBillNo());
+        doc.setfRemarks(tFee.getfRemarks());
+
+        BigDecimal fAmtdr = tFee.getfAmtdr();
+        doc.setfAmtdr(fAmtdr);
+        // 转大写
+        String fAmtdrB = Convert.digitUppercase(fAmtdr.doubleValue());
+        doc.setfAmtdrB(fAmtdrB);
+
+        BigDecimal fAmtcr = tFee.getfAmtcr();
+        doc.setfAmtcr(tFee.getfAmtcr());
+        // 转大写
+        doc.setfAmtdr(fAmtdr);
+        String fAmtcrB = Convert.digitUppercase(fAmtcr.doubleValue());
+        doc.setfAmtcrB(fAmtcrB);
+
+
+
+        return AjaxResult.success(doc);
+    }
+
+    /**
+     * 确认打印修改打印次数与打印时间
+     * @param fId id
+     * @param printDate 时间
+     * @return sql执行成功次数
+     */
+    @Override
+    public int setPrintTime(Long fId, String printDate) {
+        return tFeeMapper.setPrintTime(fId, printDate);
+    }
+
     @Override
     public Map<String, Object> selectTFeeByIdNew(Long fId) {
         Map<String, Object> map = new HashMap<>();

+ 8 - 1
ruoyi-warehouse/src/main/resources/mapper/finance/TFeeMapper.xml

@@ -90,7 +90,9 @@
                f_pdfUnsignedUrl,
                f_bsdate_start,
                f_bsdate_end,
-               f_audit_type
+               f_audit_type,
+               f_number_print,
+               f_print_time
         from t_fee
     </sql>
 
@@ -109,6 +111,8 @@
         ware.f_amtcr,
         ware.f_bsdate_start,
         ware.f_bsdate_end,
+        ware.f_number_print,
+        ware.f_print_time,
         c.f_name AS fCorpidName,
         cb.f_name as fCtrlcorpName,
         ware.f_billtype,
@@ -2605,6 +2609,9 @@
     <update id="reviewTheAmountAssignment">
         update t_fee_do set audit_money = #{fAmt}, is_audit = 1 where f_id = #{fId}
     </update>
+    <update id="setPrintTime">
+        update t_fee set f_number_print = f_number_print + 1, f_print_time = #{printDate} where f_id = #{fId}
+    </update>
     <select id="getProjectId" parameterType="Long" resultType="Long">
         SELECT
             DISTINCT