Merge remote-tracking branch 'origin/ah-simple' into ah-simple

This commit is contained in:
hayu 2025-11-16 16:19:44 +08:00
commit 61fa7f53fd
3 changed files with 13 additions and 15 deletions

View File

@ -8,6 +8,7 @@ import java.util.Date;
/** /**
* 设备详情 * 设备详情
*
* @author ma_sh * @author ma_sh
*/ */
@Data @Data
@ -88,4 +89,9 @@ public class BackCsDeviceInfo {
* 创建人 * 创建人
*/ */
private String createUser; private String createUser;
private String changeStatus;
private String changeUnit;
} }

View File

@ -89,7 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
set status = #{maStatus}, set status = #{maStatus},
in_num = IFNULL(in_num, 0) - 1, in_num = IFNULL(in_num, 0) - 1,
available_num = IFNULL(available_num, 0) + 1 available_num = IFNULL(available_num, 0) + 1
WHERE code = #{devCode} WHERE tool_code = #{devCode}
</update> </update>
<update id="updateToolInfoNum"> <update id="updateToolInfoNum">
@ -105,7 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
set status = #{maStatus}, set status = #{maStatus},
in_num = IFNULL(in_num, 0) - 1, in_num = IFNULL(in_num, 0) - 1,
repair_num = IFNULL(repair_num, 0) + 1 repair_num = IFNULL(repair_num, 0) + 1
WHERE code = #{devCode} WHERE tool_code = #{devCode}
</update> </update>
<update id="updateToolInfoRepairNum"> <update id="updateToolInfoRepairNum">

View File

@ -321,16 +321,8 @@
mdi.unit AS unit, mdi.unit AS unit,
mdq.next_check_time AS nextMaintenanceDate, mdq.next_check_time AS nextMaintenanceDate,
mdi.max_working_hours AS maxServiceLifeYears, mdi.max_working_hours AS maxServiceLifeYears,
( SELECT COUNT(*) FROM cs_device_change_details WHERE dev_id = mdi.ma_id AND repair_time IS NOT NULL ) AS 0 AS repairCount,
repairCount, 0 AS usageCount,
(
SELECT
COUNT(*)
FROM
cs_device_change_details
WHERE
dev_id = mdi.ma_id
AND `status` IN ( 2, 3 )) AS usageCount,
sc.name AS province sc.name AS province
from ma_dev_info mdi from ma_dev_info mdi
INNER JOIN ma_type_view mtv ON mtv.typeId = mdi.type_id INNER JOIN ma_type_view mtv ON mtv.typeId = mdi.type_id