# Conflicts:
#	jsowell-pile/src/main/java/com/jsowell/pile/mapper/OrderBasicInfoMapper.java
#	jsowell-pile/src/main/java/com/jsowell/pile/service/OrderBasicInfoService.java
#	jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java
#	jsowell-pile/src/main/resources/mapper/pile/OrderBasicInfoMapper.xml
This commit is contained in:
Lemon
2025-11-14 14:01:56 +08:00
12 changed files with 233 additions and 51 deletions

View File

@@ -1988,6 +1988,12 @@
#{stationDeptId}
</foreach>
</if>
<if test="excludeStationIdList != null and excludeStationIdList.size() != 0">
and t1.station_id not in
<foreach close=")" collection="excludeStationIdList" item="excludeStationId" open="(" separator=",">
#{excludeStationId}
</foreach>
</if>
order by t1.create_time desc
</select>
@@ -3474,4 +3480,19 @@
group by
`trade_date`
</select>
<select id="selectOrderCountAndInsuranceByMonth"
parameterType="com.jsowell.pile.dto.QueryOrderDTO"
resultType="com.jsowell.pile.vo.web.OrderMonthStatVO">
SELECT
DATE_FORMAT(create_time, '%Y-%m') AS month,
COUNT(*) AS orderCount,
IFNULL(SUM(insurance_amount), 0) AS insuranceAmount
FROM order_basic_info
WHERE create_time <![CDATA[ >= ]]> #{dto.startTime}
AND create_time <![CDATA[ < ]]> #{dto.endTime}
GROUP BY DATE_FORMAT(create_time, '%Y-%m')
ORDER BY month ASC
</select>
</mapper>