Commit 91c4ad09 authored by maliang's avatar maliang

类属性修改

parent 5e776311
......@@ -23,7 +23,7 @@ import org.springframework.security.web.authentication.www.BasicAuthenticationFi
*
* @author maliang
*
* 2017年10月16
* 2020年04月20
*
*/
@EnableGlobalMethodSecurity(prePostEnabled = true)
......
......@@ -9,12 +9,13 @@ import java.util.List;
@Mapper
public interface CopyrightDao {
List<BaseSettlement> selectTableListMonth(List<BaseSettlement> copyrightIdList);
List<BaseSettlement> selectTableListMonth(@Param("copyrightIdList") List<BaseSettlement> copyrightIdList);
List<BaseSettlement> selectCopyrightAll();
BaseSettlement selectUnSettlementCount(@Param("copyrightId") Integer copyrightId);
@Update("update settlement_status set status=#{status},status_name=#{statusName} where report_time=#{reportTime} and copyright_id=#{copyrightId}")
int updateSettlementStatus(@Param("copyrightId") Integer copyrightId,@Param("report_time") String reportTime,@Param("status") Integer status,@Param("statusName") String statusName);
List<BaseSettlement> selectBookDetail(@Param("copyrightIdList") List<BaseSettlement> copyrightIdList,@Param("bookId") Long bookId,@Param("bookName") String bookName);
@Update("update report_book_settlement_month 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);
}
......@@ -7,13 +7,10 @@
SELECT
a.report_date AS report_date,a.copyright_id,a.copyright_name,
a.total_amount,IFNULL(b.total_ad_amount,0) total_ad_amount,c.status_name
a.total_amount,IFNULL(b.total_ad_amount,0) total_ad_amount,jiesuan_status_name,jiesuan_status
FROM report_book_settlement_month a
LEFT JOIN 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
left join
settlement_status c
on a.report_date=c.report_date and a.copyright_id=c.copyright_id
<if test="copyrightIdList != null and copyrightIdList.size>0">
WHERE
a.copyright_id in
......@@ -24,25 +21,64 @@
ORDER BY a.total_amount DESC ;
</select>
<select id="selectUnSettlementCount" resultType="com.boot.security.server.model.BaseSettlement" >
SELECT
if (b.jiesuan_ad_amount is null,a.jiesuan_amount,a.jiesuan_amount+b.jiesuan_ad_amount) as all_consume
FROM report_book_settlement_month a
LEFT JOIN 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
left join
settlement_status c
on a.report_date=c.report_date and a.copyright_id=c.copyright_id
WHERE c.status=0
<if test="copyrightId != null">
a.copyright_id =#{copyrightId}
</if>
ORDER BY a.total_amount DESC ;
</select>
<select id="selectCopyrightAll" resultType="com.boot.security.server.model.BaseSettlement" >
SELECT a.copyright_id,a.copyright_name
FROM book_banquanweihu group by copyright_id,copyright_name;
</select>
<select id="selectBookDetail" resultType="com.boot.security.server.model.BaseSettlement" parameterType="java.util.List">
select * from
(SELECT
a.report_date,a.copyright_id,a.copyright_name,a.copyright_start_date,a.copyright_end_date,a.fencheng_ratio,a.kouliang_ratio,
a.batch_id,a.batch_name,a.book_id,a.book_name,a.authors,a.total_amount,a.jiesuan_amount,a.kouliang_amount
, ifnull(b.total_ad_amount,0) total_ad_amount
, ifnull(b.jiesuan_ad_amount,0) jiesuan_ad_amount
, ifnull(b.kouliang_ad_amount,0) kouliang_ad_amount
,if (b.jiesuan_ad_amount is null,a.jiesuan_amount,a.jiesuan_amount+b.jiesuan_ad_amount) as all_consume
FROM report_book_settlement a
left join report_book_advert b
on a.report_date=b.report_date and a.book_id=b.book_id and a.batch_id=b.batch_id and a.batch_name=b.batch_name
WHERE
<![CDATA[
a.report_date >= #{startTime} and a.report_date <= #{endTime}
]]>
<if test="bookId != null and bookId!='' ">
and a.book_id = #{bookId}
</if>
<if test=" bookName != null and bookName !='' ">
and a.book_name like #{bookName}
</if>
<if test="copyrightIdList != null and copyrightIdList.size>0">
and a.copyright_id in
<foreach collection="copyrightIdList" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
UNION
SELECT
b.report_date,b.copyright_id,b.copyright_name,b.batch_id,b.batch_name,b.book_id,b.book_name,b.authors,IFNULL(a.total_amount,0),IFNULL(b.total_ad_amount,0) total_ad_amount
FROM report_book_settlement a
RIGHT JOIN report_book_advert b
ON a.report_date=b.report_date AND a.book_id=b.book_id AND a.batch_id=b.batch_id AND a.batch_name=b.batch_name
WHERE b.jiesuan_ad_amount>0
<![CDATA[
and
b.report_date >= #{startTime} and b.report_date <= #{endTime}
]]>
<if test="bookId != null and bookId!='' ">
and b.book_id = #{bookId}
</if>
<if test=" bookName != null and bookName !='' ">
and b.book_name like #{bookName}
</if>
<if test="copyrightIdList != null and copyrightIdList.size>0">
and b.copyright_id in
<foreach collection="copyrightIdList" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>) t
ORDER BY t.total_amount desc
</select>
</mapper>
\ No newline at end of file
......@@ -4,7 +4,7 @@
.site-tree{width: 220px; min-height: 900px; padding: 5px 0 20px;}
.site-content{width: 899px; min-height: 900px; padding: 20px 0 10px 20px;}
/* 头部 */admin-side-toggle
/* 头部393D49 */admin-side-toggle
.header{height: 65px; border-bottom: 1px solid #404553; background-color: #393D49; color: #fff;}
.logo{position: absolute; left: 0; top: 18px;}
.logo img{width: 82px; height: 31px;}
......
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