Commit 40c9046b authored by maliang's avatar maliang

上传bug修复

parent 062cd1bf
...@@ -13,7 +13,7 @@ public interface CopyrightDao { ...@@ -13,7 +13,7 @@ public interface CopyrightDao {
@Select("select roleId from sys_role_user where userId=#{userId}") @Select("select roleId from sys_role_user where userId=#{userId}")
Integer selectRoleId(@Param("userId") Long userId); Integer selectRoleId(@Param("userId") Long userId);
@Select("SELECT a.report_date AS reportDate,a.copyright_id as copyrightId from bi_report.report_book_settlement_month a where a.release_status =1") @Select("SELECT a.report_date AS reportDate,a.copyright_id as copyrightId from bi_report.report_book_settlement_month_copyright a where a.release_status =1")
List<BaseSettlement> selectReleaseCopyright(); List<BaseSettlement> selectReleaseCopyright();
List<Long> selectUserAll(); List<Long> selectUserAll();
...@@ -37,10 +37,10 @@ public interface CopyrightDao { ...@@ -37,10 +37,10 @@ public interface CopyrightDao {
Integer selectBookDetailCount(@Param("copyrightIdList") List<BaseSettlement> copyrightIdList,@Param("bookId") Long bookId,@Param("bookName") String bookName,@Param("startTime") String startTime,@Param("endTime") String endTime); Integer selectBookDetailCount(@Param("copyrightIdList") List<BaseSettlement> copyrightIdList,@Param("bookId") Long bookId,@Param("bookName") String bookName,@Param("startTime") String startTime,@Param("endTime") String endTime);
@Update("update bi_report.report_book_settlement_month set jiesuan_status=#{status},jiesuan_status_name=#{statusName} where report_date=#{reportDate} and copyright_id=#{copyrightId}") @Update("update bi_report.report_book_settlement_month_copyright set jiesuan_status=#{status},jiesuan_status_name=#{statusName} where report_date=#{reportDate} and copyright_id=#{copyrightId}")
int updateSettlementStatus(@Param("copyrightId") Integer copyrightId,@Param("reportDate") String reportDate,@Param("status") Integer status,@Param("statusName") String statusName); int updateSettlementStatus(@Param("copyrightId") Integer copyrightId,@Param("reportDate") String reportDate,@Param("status") Integer status,@Param("statusName") String statusName);
@Update("update bi_report.report_book_settlement_month set release_status=#{releaseStatus},release_status_name=#{releaseStatusName} where report_date=#{reportDate} and copyright_id=#{copyrightId}") @Update("update bi_report.report_book_settlement_month_copyright set release_status=#{releaseStatus},release_status_name=#{releaseStatusName} where report_date=#{reportDate} and copyright_id=#{copyrightId}")
int updateReleaseStatus(@Param("copyrightId") Integer copyrightId,@Param("reportDate") String reportDate,@Param("releaseStatus") Integer releaseStatus,@Param("releaseStatusName") String releaseStatusName); int updateReleaseStatus(@Param("copyrightId") Integer copyrightId,@Param("reportDate") String reportDate,@Param("releaseStatus") Integer releaseStatus,@Param("releaseStatusName") String releaseStatusName);
int updateUserCopyrightMap(List<BaseSettlement> baseSettlements); int updateUserCopyrightMap(List<BaseSettlement> baseSettlements);
......
...@@ -400,7 +400,7 @@ public class CopyrightBookServiceImpl implements CopyrightBookService { ...@@ -400,7 +400,7 @@ public class CopyrightBookServiceImpl implements CopyrightBookService {
} }
Integer count = copyrightDao.selectTableListMonthCount(baseSettlementList,status); Integer count = copyrightDao.selectTableListMonthCount(baseSettlementList,status);
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
jsonObject.put("schema",schema); jsonObject.put("schema",Double.valueOf(df.format(schema)));
return jsonObject.toJSONString(); return jsonObject.toJSONString();
} }
......
...@@ -3,13 +3,31 @@ ...@@ -3,13 +3,31 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.boot.security.server.dao.CopyrightDao"> <mapper namespace="com.boot.security.server.dao.CopyrightDao">
<!--<select id="selectTableListMonth" resultType="com.boot.security.server.model.BaseSettlement" parameterType="com.boot.security.server.model.BaseSettlement">-->
<!--SELECT-->
<!--a.report_date AS reportDate,a.copyright_id as copyrightId,a.copyright_name as copyrightName,-->
<!--a.total_amount as totalAmount,IFNULL(b.total_ad_amount,0) totalAdvertAmount,jiesuan_status_name statusName,jiesuan_status status,release_status_name releaseStatusName,release_status releaseStatus-->
<!--FROM bi_report.report_book_settlement_month a-->
<!--LEFT JOIN bi_report.report_book_advert_month b-->
<!--ON a.report_date=b.report_date AND a.batch_id=b.batch_id AND a.batch_name=b.batch_name-->
<!--WHERE a.report_date>='2020-04'-->
<!--<if test="copyrightId != null">-->
<!--and a.copyright_id in-->
<!--<foreach collection="copyrightId" item="item" index="index" separator="," open="(" close=")">-->
<!--#{item.copyrightId}-->
<!--</foreach>-->
<!--</if>-->
<!--<if test="status != null and status!='' ">-->
<!--and a.release_status = #{status}-->
<!--</if>-->
<!--ORDER BY a.total_amount DESC-->
<!--limit #{page},#{limit};-->
<!--</select>-->
<select id="selectTableListMonth" resultType="com.boot.security.server.model.BaseSettlement" parameterType="com.boot.security.server.model.BaseSettlement"> <select id="selectTableListMonth" resultType="com.boot.security.server.model.BaseSettlement" parameterType="com.boot.security.server.model.BaseSettlement">
SELECT SELECT report_date,copyright_id,copyright_name,total_amount as totalAmount,
a.report_date AS reportDate,a.copyright_id as copyrightId,a.copyright_name as copyrightName, IFNULL(total_ad_amount,0) totalAdvertAmount,jiesuan_status_name statusName,jiesuan_status status,release_status_name releaseStatusName,release_status releaseStatus
a.total_amount as totalAmount,IFNULL(b.total_ad_amount,0) totalAdvertAmount,jiesuan_status_name statusName,jiesuan_status status,release_status_name releaseStatusName,release_status releaseStatus FROM bi_report.report_book_settlement_month_copyright a
FROM bi_report.report_book_settlement_month a
LEFT JOIN bi_report.report_book_advert_month b
ON a.report_date=b.report_date AND a.batch_id=b.batch_id AND a.batch_name=b.batch_name
WHERE a.report_date>='2020-04' WHERE a.report_date>='2020-04'
<if test="copyrightId != null"> <if test="copyrightId != null">
and a.copyright_id in and a.copyright_id in
...@@ -20,17 +38,15 @@ ...@@ -20,17 +38,15 @@
<if test="status != null and status!='' "> <if test="status != null and status!='' ">
and a.release_status = #{status} and a.release_status = #{status}
</if> </if>
ORDER BY a.total_amount DESC ORDER BY a.report_date DESC
limit #{page},#{limit}; limit #{page},#{limit};
</select> </select>
<select id="selectTableListMonthCount" resultType="Integer" parameterType="com.boot.security.server.model.BaseSettlement"> <select id="selectTableListMonthCount" resultType="Integer" parameterType="com.boot.security.server.model.BaseSettlement">
SELECT count(*)
SELECT from(select report_date,copyright_id,copyright_name,total_amount as totalAmount,
count(*) IFNULL(total_ad_amount,0) totalAdvertAmount,jiesuan_status_name statusName,jiesuan_status status,release_status_name releaseStatusName,release_status releaseStatus
FROM bi_report.report_book_settlement_month a FROM bi_report.report_book_settlement_month_copyright a
LEFT JOIN bi_report.report_book_advert_month b
ON a.report_date=b.report_date AND a.batch_id=b.batch_id AND a.batch_name=b.batch_name
WHERE a.report_date>='2020-04' WHERE a.report_date>='2020-04'
<if test="copyrightId != null"> <if test="copyrightId != null">
and a.copyright_id in and a.copyright_id in
...@@ -41,16 +57,53 @@ ...@@ -41,16 +57,53 @@
<if test="status != null and status!='' "> <if test="status != null and status!='' ">
and a.release_status = #{status} and a.release_status = #{status}
</if> </if>
ORDER BY a.total_amount DESC ; ORDER BY a.report_date DESC) t
</select> </select>
<!--<select id="selectTableListMonthCount" resultType="Integer" parameterType="com.boot.security.server.model.BaseSettlement">-->
<!--SELECT-->
<!--count(*)-->
<!--FROM bi_report.report_book_settlement_month a-->
<!--LEFT JOIN bi_report.report_book_advert_month b-->
<!--ON a.report_date=b.report_date AND a.batch_id=b.batch_id AND a.batch_name=b.batch_name-->
<!--WHERE a.report_date>='2020-04'-->
<!--<if test="copyrightId != null">-->
<!--and a.copyright_id in-->
<!--<foreach collection="copyrightId" item="item" index="index" separator="," open="(" close=")">-->
<!--#{item.copyrightId}-->
<!--</foreach>-->
<!--</if>-->
<!--<if test="status != null and status!='' ">-->
<!--and a.release_status = #{status}-->
<!--</if>-->
<!--ORDER BY a.total_amount DESC ;-->
<!--</select>-->
<!--<select id="selectTableListMonthSchema" resultType="com.boot.security.server.model.BaseSettlement" parameterType="com.boot.security.server.model.BaseSettlement">-->
<!--SELECT-->
<!--a.report_date AS reportDate,a.copyright_id as copyrightId,a.copyright_name as copyrightName,-->
<!--a.total_amount as totalAmount,IFNULL(b.total_ad_amount,0) totalAdvertAmount,jiesuan_status_name statusName,jiesuan_status status,release_status_name releaseStatusName,release_status releaseStatus-->
<!--FROM bi_report.report_book_settlement_month a-->
<!--LEFT JOIN bi_report.report_book_advert_month b-->
<!--ON a.report_date=b.report_date AND a.batch_id=b.batch_id AND a.batch_name=b.batch_name-->
<!--WHERE a.report_date>='2020-04'-->
<!--<if test="copyrightId != null">-->
<!--and a.copyright_id in-->
<!--<foreach collection="copyrightId" item="item" index="index" separator="," open="(" close=")">-->
<!--#{item.copyrightId}-->
<!--</foreach>-->
<!--</if>-->
<!--<if test="status != null and status!='' ">-->
<!--and a.release_status = #{status}-->
<!--</if>-->
<!--ORDER BY a.total_amount DESC-->
<!--</select>-->
<select id="selectTableListMonthSchema" resultType="com.boot.security.server.model.BaseSettlement" parameterType="com.boot.security.server.model.BaseSettlement"> <select id="selectTableListMonthSchema" resultType="com.boot.security.server.model.BaseSettlement" parameterType="com.boot.security.server.model.BaseSettlement">
SELECT SELECT report_date,copyright_id,copyright_name,total_amount as totalAmount,
a.report_date AS reportDate,a.copyright_id as copyrightId,a.copyright_name as copyrightName, IFNULL(total_ad_amount,0) totalAdvertAmount,jiesuan_status_name statusName,jiesuan_status status,release_status_name releaseStatusName,release_status releaseStatus
a.total_amount as totalAmount,IFNULL(b.total_ad_amount,0) totalAdvertAmount,jiesuan_status_name statusName,jiesuan_status status,release_status_name releaseStatusName,release_status releaseStatus FROM bi_report.report_book_settlement_month_copyright a
FROM bi_report.report_book_settlement_month a
LEFT JOIN bi_report.report_book_advert_month b
ON a.report_date=b.report_date AND a.batch_id=b.batch_id AND a.batch_name=b.batch_name
WHERE a.report_date>='2020-04' WHERE a.report_date>='2020-04'
<if test="copyrightId != null"> <if test="copyrightId != null">
and a.copyright_id in and a.copyright_id in
...@@ -61,7 +114,7 @@ ...@@ -61,7 +114,7 @@
<if test="status != null and status!='' "> <if test="status != null and status!='' ">
and a.release_status = #{status} and a.release_status = #{status}
</if> </if>
ORDER BY a.total_amount DESC ORDER BY a.report_date DESC
</select> </select>
<select id="selectCopyrightById" resultType="com.boot.security.server.model.BaseSettlement" > <select id="selectCopyrightById" resultType="com.boot.security.server.model.BaseSettlement" >
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment