|
@@ -1,11 +1,13 @@
|
|
|
package cn.fastfun.service.mapper;
|
|
|
|
|
|
+import cn.fastfun.controller.dto.asset.AssetConfDto;
|
|
|
import cn.fastfun.service.entity.AppAssetConf;
|
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
import org.apache.ibatis.annotations.Select;
|
|
|
|
|
|
import java.util.List;
|
|
|
+import java.util.Set;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -17,59 +19,59 @@ import java.util.List;
|
|
|
*/
|
|
|
public interface AppAssetConfMapper extends BaseMapper<AppAssetConf> {
|
|
|
|
|
|
-// @Select("<script>" +
|
|
|
-// "SELECT" +
|
|
|
-// "d.sn," +
|
|
|
-// "d.amount," +
|
|
|
-// "CASE" +
|
|
|
-// "CONCAT( d.table_order, d.type ) " +
|
|
|
-// "WHEN ( 21 ) THEN" +
|
|
|
-// "'故障花费' " +
|
|
|
-// "WHEN ( 22 ) THEN" +
|
|
|
-// "'平台服务费' " +
|
|
|
-// "WHEN ( 31 ) THEN" +
|
|
|
-// "'赔偿花费' " +
|
|
|
-// "WHEN ( 51 ) THEN" +
|
|
|
-// "'仓储费用' " +
|
|
|
-// "WHEN ( 52 ) THEN" +
|
|
|
-// "'运输费用' " +
|
|
|
-// "WHEN ( 53 ) THEN" +
|
|
|
-// "'销售费用' " +
|
|
|
-// "WHEN ( 54 ) THEN" +
|
|
|
-// "'平台费用' " +
|
|
|
-// "WHEN ( 61 ) THEN" +
|
|
|
-// "'已支付金融成本' " +
|
|
|
-// "WHEN ( 62 ) THEN" +
|
|
|
-// "'未支付金融成本' " +
|
|
|
-// "WHEN ( 71 ) THEN" +
|
|
|
-// "'翻新金额-支' " +
|
|
|
-// "WHEN ( 72 ) THEN" +
|
|
|
-// "'处置支出' " +
|
|
|
-// "WHEN ( 73 ) THEN" +
|
|
|
-// "'处置收益' " +
|
|
|
-// "WHEN ( 81 ) THEN" +
|
|
|
-// "'其他支出项目' " +
|
|
|
-// "WHEN ( 82 ) THEN" +
|
|
|
-// "'其他收入项目' ELSE '其他' " +
|
|
|
-// "END AS type " +
|
|
|
-// "FROM" +
|
|
|
-// "app_asset_conf d " +
|
|
|
-// "where sn = #{sn} " +
|
|
|
-// "and table_order = #{tableOrder} " +
|
|
|
-// "<when test='type!=null'>" +
|
|
|
-// "and type in (" +
|
|
|
-// "<foreach item='item' collection='type' index='index' open='(' separator=',' close=')'>#{item}</foreach>" +
|
|
|
-// ")" +
|
|
|
-// "</when>" +
|
|
|
-// "<when test='timeStart!=null'>" +
|
|
|
-// "and time > #{timeStart} " +
|
|
|
-// "</when>" +
|
|
|
-// "<when test='timeEnd!=null'>" +
|
|
|
-// "and time < #{timeEnd} " +
|
|
|
-// "</when>" +
|
|
|
-// "limit #{offset}, #{length}" +
|
|
|
-// "</script")
|
|
|
-// List<AppAssetConf> getAssetConf(@Param("sn") String sn, @Param("tableOrder") Integer tableOrder, @Param("type") String[] type,
|
|
|
-// @Param("timeStart") String timeStart,@Param("timeEnd") String timeEnd, @Param("offset") Integer offset, @Param("length") Integer length);
|
|
|
+ @Select({"<script>" +
|
|
|
+ " SELECT" +
|
|
|
+ " d.sn," +
|
|
|
+ " d.amount," +
|
|
|
+ " d.time," +
|
|
|
+ " CASE" +
|
|
|
+ " CONCAT( d.table_order, d.type ) " +
|
|
|
+ " WHEN ( '21' ) THEN" +
|
|
|
+ " '故障花费' " +
|
|
|
+ " WHEN ( '22' ) THEN" +
|
|
|
+ " '平台服务费' " +
|
|
|
+ " WHEN ( '31' ) THEN" +
|
|
|
+ " '赔偿花费' " +
|
|
|
+ " WHEN ( '51' ) THEN" +
|
|
|
+ " '仓储费用' " +
|
|
|
+ " WHEN ( '52' ) THEN" +
|
|
|
+ " '运输费用' " +
|
|
|
+ " WHEN ( '53' ) THEN" +
|
|
|
+ " '销售费用' " +
|
|
|
+ " WHEN ( '54' ) THEN" +
|
|
|
+ " '平台费用' " +
|
|
|
+ " WHEN ( '61' ) THEN" +
|
|
|
+ " '已支付金融成本' " +
|
|
|
+ " WHEN ( '62' ) THEN" +
|
|
|
+ " '未支付金融成本' " +
|
|
|
+ " WHEN ( '71' ) THEN" +
|
|
|
+ " '翻新金额-支' " +
|
|
|
+ " WHEN ( '72' ) THEN" +
|
|
|
+ " '处置支出' " +
|
|
|
+ " WHEN ( '73' ) THEN" +
|
|
|
+ " '处置收益' " +
|
|
|
+ " WHEN ( '81' ) THEN" +
|
|
|
+ " '其他支出项目' " +
|
|
|
+ " WHEN ( '82' ) THEN" +
|
|
|
+ " '其他收入项目' ELSE '其他' " +
|
|
|
+ " END AS typeText " +
|
|
|
+ " FROM" +
|
|
|
+ " app_asset_conf d " +
|
|
|
+ " where sn = #{sn} " +
|
|
|
+ " and table_order = #{tableOrder} " +
|
|
|
+ "<when test='type!=null'>" +
|
|
|
+ " and type in " +
|
|
|
+ "<foreach item='id' collection='type' index='index' open='(' separator=',' close=')'>#{id}</foreach>" +
|
|
|
+ "</when>" +
|
|
|
+ "<when test='timeStart!=null'>" +
|
|
|
+ " and time > #{timeStart} " +
|
|
|
+ "</when>" +
|
|
|
+ "<when test='timeEnd!=null'>" +
|
|
|
+ " and time < #{timeEnd} " +
|
|
|
+ "</when>" +
|
|
|
+ " limit #{offset}, #{length}" +
|
|
|
+ "</script>"})
|
|
|
+ List<AssetConfDto> getAssetConf(@Param("sn") String sn, @Param("tableOrder") Integer tableOrder, @Param("type") List<String> type,
|
|
|
+ @Param("timeStart") String timeStart, @Param("timeEnd") String timeEnd, @Param("offset") Integer offset, @Param("length") Integer length);
|
|
|
|
|
|
}
|