From 0e420d68f407fde240709ac1800da20b0bb99490 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期二, 09 六月 2026 16:06:16 +0800
Subject: [PATCH] feat:反审核操作。可以对已审核的订单进行反审核,反审核的时候可以选择作废还是重新生成一条,并记录反审核描述。选择作废的话则不生成新增订单。选择重新生成的话则跳转到新增台账页面对反审核的销售产品进行编辑保存重新生成一条新增的订单。反审核的订单即使是发货了还是可以反审核,并且需要将对应的入库、出库、发货进行作废。
---
src/main/resources/mapper/measuringinstrumentledger/MeasuringInstrumentLedgerMapper.xml | 68 +++++++++++++++++++--------------
1 files changed, 39 insertions(+), 29 deletions(-)
diff --git a/src/main/resources/mapper/measuringinstrumentledger/MeasuringInstrumentLedgerMapper.xml b/src/main/resources/mapper/measuringinstrumentledger/MeasuringInstrumentLedgerMapper.xml
index 78aaaa6..e4200af 100644
--- a/src/main/resources/mapper/measuringinstrumentledger/MeasuringInstrumentLedgerMapper.xml
+++ b/src/main/resources/mapper/measuringinstrumentledger/MeasuringInstrumentLedgerMapper.xml
@@ -2,48 +2,58 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.measuringinstrumentledger.mapper.MeasuringInstrumentLedgerMapper">
- <select id="listPage" resultType="com.ruoyi.measuringinstrumentledger.dto.MeasuringInstrumentLedgerPageDto">
+ <select id="listPage" resultType="com.ruoyi.measuringinstrumentledger.pojo.MeasuringInstrumentLedger">
SELECT
- mil.id,
- mil.user_id,
- mil.user_name,
- mil.code,
- sd.dept_name,
- mil.installation_location,
- mil.unit,
- mil.cycle,
- mil.name,
- mil.model,
- mil.most_date,
- mil.valid,
- mil.next_date,
- mil.record_date,
- mil.create_user,
- mil.create_time,
- mil.update_user,
- mil.update_time,
- mil.tenant_id
+ id,
+ user_id,
+ user_name,
+ code,
+ name,
+ model,
+ most_date,
+ valid,
+ next_date,
+ record_date,
+ CASE
+ WHEN most_date >= DATE_FORMAT(now(),'%Y-%m-%d') THEN 1
+ ELSE 2
+ END AS status,
+ create_user,
+ create_time,
+ update_user,
+ update_time,
+ tenant_id,
+ unit,
+ dept_id,
+ instation_location,
+ cycle
FROM
- measuring_instrument_ledger mil
- left join sys_dept sd on sd.id = mil.dept_id
+ measuring_instrument_ledger
<where>
<!-- 鏌ヨ鏉′欢鍚屼笂 -->
<if test="req.code != null and req.code != ''">
- AND mil.code LIKE CONCAT('%', #{req.code}, '%')
+ AND code LIKE CONCAT('%', #{req.code}, '%')
</if>
<if test="req.name != null and req.name != ''">
- AND mil.name LIKE CONCAT('%', #{req.name}, '%')
+ AND name LIKE CONCAT('%', #{req.name}, '%')
</if>
<if test="req.status != null">
- AND mil.status = #{req.status}
+ <choose>
+ <when test="req.status == 1">
+ AND most_date >= DATE_FORMAT(now(),'%Y-%m-%d')
+ </when>
+ <when test="req.status == 2">
+ AND most_date < DATE_FORMAT(now(),'%Y-%m-%d')
+ </when>
+ </choose>
</if>
<if test="req.tenantId != null">
- AND mil.tenant_id = #{req.tenantId}
+ AND tenant_id = #{req.tenantId}
</if>
<if test="req.recordDate != null">
- AND mil.record_date = DATE_FORMAT(#{req.recordDate},'%Y-%m-%d')
+ AND record_date = DATE_FORMAT(#{req.recordDate},'%Y-%m-%d')
</if>
</where>
- ORDER BY mil.update_time DESC
+ ORDER BY update_time DESC
</select>
-</mapper>
\ No newline at end of file
+</mapper>
--
Gitblit v1.9.3