qushaowei
2025-05-26 05c50d1f3ccddeffe8d1b5be173d01e553b6d01e
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/mapper/xml/InspectionOrderMapper.xml
@@ -326,13 +326,16 @@
                and t4.num = '-1'
           </if>
           <if test="dataTime != null and dataTime != ''">
                AND SUBSTRING ( CONVERT ( VARCHAR ( 10 ), t1.create_time, 120 ), 1, 7 ) = SUBSTRING ( CONVERT ( VARCHAR ( 10 ), #{dataTime}, 120 ), 2, 7 )
                AND SUBSTRING ( CONVERT ( VARCHAR ( 10 ), t1.create_time, 120 ), 1, 7 ) = #{dataTime}
           </if>
           <if test="dataTime == null and dataTime == ''">
                AND SUBSTRING ( CONVERT ( VARCHAR ( 10 ), t1.create_time, 120 ), 1, 7 ) = SUBSTRING ( CONVERT ( VARCHAR ( 10 ), GETDATE( ), 120 ), 1, 7 )
          </if>
            and t3.name = #{name} and t3.detection_standard = #{detectionStandard}
    </select>
<!--    <if test="dataTime != null and dataTime != ''">-->
<!--        AND SUBSTRING ( CONVERT ( VARCHAR ( 10 ), t1.create_time, 120 ), 1, 7 ) = SUBSTRING ( CONVERT ( VARCHAR ( 10 ), #{dataTime}, 120 ), 2, 7 )-->
<!--    </if>-->
    <select id="getUserQianzi"  parameterType="String" resultType="Map">
        SELECT
@@ -351,11 +354,14 @@
            and t2.num = '-1'
        </if>
        <if test="dataTime != null and dataTime != ''">
            AND SUBSTRING ( CONVERT ( VARCHAR ( 10 ), t1.create_time, 120 ), 1, 7 ) = SUBSTRING ( CONVERT ( VARCHAR ( 10 ), #{dataTime}, 120 ), 2, 7 )
            AND SUBSTRING ( CONVERT ( VARCHAR ( 10 ), t1.create_time, 120 ), 1, 7 ) = #{dataTime}
        </if>
        <if test="dataTime == null and dataTime == ''">
            AND SUBSTRING ( CONVERT ( VARCHAR ( 10 ), t1.create_time, 120 ), 1, 7 ) = SUBSTRING ( CONVERT ( VARCHAR ( 10 ), GETDATE( ), 120 ), 1, 7 )
        </if>
          and t3.cycle_unit = #{cycleUnit}
    </select>
<!--    <if test="dataTime != null and dataTime != ''">-->
<!--        AND SUBSTRING ( CONVERT ( VARCHAR ( 10 ), t1.create_time, 120 ), 1, 7 ) = SUBSTRING ( CONVERT ( VARCHAR ( 10 ), #{dataTime}, 120 ), 2, 7 )-->
<!--    </if>-->
</mapper>