|
|
|
@ -486,39 +486,42 @@ public class BaseInvoiceManualCheckServiceImpl extends MpBaseServiceImpl<BaseTDx |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int curr = (int) pramsMap.get("curr"); |
|
|
|
|
int size = (int) pramsMap.get("size"); |
|
|
|
|
|
|
|
|
|
String hjsl = "0"; |
|
|
|
|
String hjje = "0"; |
|
|
|
|
String hjse = "0"; |
|
|
|
|
List<BaseTDxRecordInvoice> hjList = super.baseMapper.selectChooseHj(pramsMap); |
|
|
|
|
BaseTDxRecordInvoice hjxx = hjList.get(0); |
|
|
|
|
hjsl = hjxx.getSfygx(); |
|
|
|
|
if (!"0".equals(hjsl)) { |
|
|
|
|
hjje = AmountFormatUtil.fmtMicrometer(MathUtil.round(hjxx.getInvoiceAmount().toPlainString())); |
|
|
|
|
hjse = AmountFormatUtil.fmtMicrometer(MathUtil.round(hjxx.getTaxAmount().toPlainString())); |
|
|
|
|
} |
|
|
|
|
json.put("hjsl", AmountFormatUtil.fmtMicrometer(hjsl)); |
|
|
|
|
json.put("hjje", hjje); |
|
|
|
|
json.put("hjse", hjse); |
|
|
|
|
if ("0".equals(hjsl)) { |
|
|
|
|
json.put("message", "无可操作的数据"); |
|
|
|
|
json.put("code", "501"); |
|
|
|
|
return super.responseResult(json); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String isChooseAll = (String) pramsMap.get("isChooseAll"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//如果不是勾选所有进行统计和分页
|
|
|
|
|
if ("N".equalsIgnoreCase(isChooseAll)){ |
|
|
|
|
int curr = (int) pramsMap.get("curr"); |
|
|
|
|
int size = (int) pramsMap.get("size"); |
|
|
|
|
|
|
|
|
|
// 合计信息,仅第一页时需要统计,减少数据库压力
|
|
|
|
|
if (curr == 1) { |
|
|
|
|
String hjsl = "0"; |
|
|
|
|
String hjje = "0"; |
|
|
|
|
String hjse = "0"; |
|
|
|
|
List<BaseTDxRecordInvoice> hjList = super.baseMapper.selectChooseHj(pramsMap); |
|
|
|
|
BaseTDxRecordInvoice hjxx = hjList.get(0); |
|
|
|
|
hjsl = hjxx.getSfygx(); |
|
|
|
|
if (!"0".equals(hjsl)) { |
|
|
|
|
hjje = AmountFormatUtil.fmtMicrometer(MathUtil.round(hjxx.getInvoiceAmount().toPlainString())); |
|
|
|
|
hjse = AmountFormatUtil.fmtMicrometer(MathUtil.round(hjxx.getTaxAmount().toPlainString())); |
|
|
|
|
} |
|
|
|
|
json.put("hjsl", AmountFormatUtil.fmtMicrometer(hjsl)); |
|
|
|
|
json.put("hjje", hjje); |
|
|
|
|
json.put("hjse", hjse); |
|
|
|
|
if ("0".equals(hjsl)) { |
|
|
|
|
json.put("message", "无可操作的数据"); |
|
|
|
|
json.put("code", "501"); |
|
|
|
|
return super.responseResult(json); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
int total = Integer.parseInt(hjsl); |
|
|
|
|
|
|
|
|
|
int totalPage = total % size == 0?total/size:total/size+1; |
|
|
|
|
|
|
|
|
|
PageHelper.startPage(curr, size); |
|
|
|
|
if (curr<1){ |
|
|
|
|
curr =1; |
|
|
|
|
} |
|
|
|
|
if (curr>totalPage){ |
|
|
|
|
curr = totalPage; |
|
|
|
|
} |
|
|
|
|
curr = (curr -1)*size; |
|
|
|
|
pramsMap.put("curr",curr); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<BaseTDxRecordInvoice> pageList = super.baseMapper.selectInTellingCheck(pramsMap); |
|
|
|
|
|
|
|
|
|