Commit eecde597 authored by maliang's avatar maliang

上传bug修复

parent 37c2d500
...@@ -52,8 +52,8 @@ public class CopyrightBookController { ...@@ -52,8 +52,8 @@ public class CopyrightBookController {
@ApiOperation(value = "获取总的未结算数据") @ApiOperation(value = "获取总的未结算数据")
@ResponseBody @ResponseBody
public String getDeductionConfig(@RequestBody PageTableRequest request){ public String getDeductionConfig(@RequestBody PageTableRequest request){
List<BaseSettlement> deductionConfig = copyrightDao.getDeductionConfig(request.getPage(),request.getLimit()); List<BaseSettlement> deductionConfig = copyrightDao.getDeductionConfig(request.getPage()-1,request.getLimit());
List<BaseSettlement> deductionConfigs = copyrightDao.getDeductionConfig(0,1000); List<BaseSettlement> deductionConfigs = copyrightDao.getDeductionConfigCount();
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
jsonObject.put("data",deductionConfig); jsonObject.put("data",deductionConfig);
jsonObject.put("count",deductionConfigs.size()); jsonObject.put("count",deductionConfigs.size());
...@@ -71,7 +71,7 @@ public class CopyrightBookController { ...@@ -71,7 +71,7 @@ public class CopyrightBookController {
List<BaseSettlement> array = request.getArray(); List<BaseSettlement> array = request.getArray();
if(array.size()>0){ if(array.size()>0){
for (BaseSettlement baseSettlement : array) { for (BaseSettlement baseSettlement : array) {
copyrightDao.updateDeductionConfig(baseSettlement.getCopyrightId(),request.getTypeName(),type,request.getContext(),baseSettlement.getReportDate()); copyrightDao.updateDeductionConfig(baseSettlement.getCopyrightId(),request.getTypeName(),type,request.getContext(),baseSettlement.getReportDate(),request.getPage(),request.getLimit());
} }
} }
//copyrightDao.updateDeductionConfig(request.getCopyrightId(),request.getTypeName(),type,request.getContext(),request.getStartTime()); //copyrightDao.updateDeductionConfig(request.getCopyrightId(),request.getTypeName(),type,request.getContext(),request.getStartTime());
......
...@@ -45,9 +45,11 @@ public interface CopyrightDao { ...@@ -45,9 +45,11 @@ public interface CopyrightDao {
int updateUserCopyrightMap(List<BaseSettlement> baseSettlements); int updateUserCopyrightMap(List<BaseSettlement> baseSettlements);
@Select("select create_month reportDate,copyright_id copyrightId,copyright_name copyrightName,type,type_name typeName,context from copyright_data.copyright_deduction limit #{page},#{limit};") @Select("select create_month reportDate,copyright_id copyrightId,copyright_name copyrightName,type,type_name typeName,context from copyright_data.copyright_deduction order by create_month limit #{page},#{limit}")
List<BaseSettlement> getDeductionConfig(@Param("page") Integer page,@Param("limit")Integer limit); List<BaseSettlement> getDeductionConfig(@Param("page") Integer page,@Param("limit")Integer limit);
@Select("select create_month reportDate,copyright_id copyrightId,copyright_name copyrightName,type,type_name typeName,context from copyright_data.copyright_deduction")
List<BaseSettlement> getDeductionConfigCount();
@Update("update copyright_data.copyright_deduction set type=#{type},type_name=#{typeName},context=#{context} where copyright_id=#{copyrightId} and create_month=#{reportDate}") @Update("update copyright_data.copyright_deduction set type=#{type},type_name=#{typeName},context=#{context} where copyright_id=#{copyrightId} and create_month=#{reportDate} limit #{page},#{limit}")
int updateDeductionConfig(@Param("copyrightId") Integer copyrightId,@Param("typeName") String typeName,@Param("type") Integer type,@Param("context") String context,@Param("reportDate") String reportDate); int updateDeductionConfig(@Param("copyrightId") Integer copyrightId,@Param("typeName") String typeName,@Param("type") Integer type,@Param("context") String context,@Param("reportDate") String reportDate,@Param("page") Integer page,@Param("limit") Integer limit);
} }
...@@ -75,8 +75,8 @@ ...@@ -75,8 +75,8 @@
,page: true ,page: true
,toolbar:'true' ,toolbar:'true'
,defaultToolbar: ['exports'] ,defaultToolbar: ['exports']
,limit:20 ,limit:1000
,limits:[20,30,40,50,60,70,80,90] ,limits:[20,30,40,50,60,70,80,90,1000]
,height:500 ,height:500
,cols: [[ ,cols: [[
{type:"checkbox"} {type:"checkbox"}
......
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