编码格式转为GBK
This commit is contained in:
parent
6e7f80cab5
commit
939614c2e2
|
@ -34,7 +34,8 @@ public class GatheringbillEditSaveBatchBSAction extends BillUpdateBatchBSAction
|
||||||
this.validatorCode.remove(44);
|
this.validatorCode.remove(44);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void doBeforeUpdate(AggregatedValueObject[] bills, AggregatedValueObject[] orginBills) throws BusinessException {
|
protected void doBeforeUpdate(AggregatedValueObject[] bills, AggregatedValueObject[] orginBills)
|
||||||
|
throws BusinessException {
|
||||||
ArapBillPubUtil.fillTradeTypeInfo(bills);
|
ArapBillPubUtil.fillTradeTypeInfo(bills);
|
||||||
|
|
||||||
for (AggregatedValueObject bill : bills) {
|
for (AggregatedValueObject bill : bills) {
|
||||||
|
@ -42,42 +43,45 @@ public class GatheringbillEditSaveBatchBSAction extends BillUpdateBatchBSAction
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 收款单保存校验关联的销售订单实际收款金额是否超过价税合计
|
* 收款单保存校验关联的销售订单实际收款金额是否超过价税合计
|
||||||
*/
|
*/
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
for (AggregatedValueObject bill : bills) {
|
for (AggregatedValueObject bill : bills) {
|
||||||
AggregatedValueObject oriBill = orginBills[i++];
|
AggregatedValueObject oriBill = orginBills[i++];
|
||||||
BaseBillVO billVO = (BaseBillVO) bill.getParentVO(); //修改的收款单
|
BaseBillVO billVO = (BaseBillVO) bill.getParentVO(); // 修改的收款单
|
||||||
BaseBillVO billOriVO = (BaseBillVO) oriBill.getParentVO(); //之前的收款单
|
BaseBillVO billOriVO = (BaseBillVO) oriBill.getParentVO(); // 之前的收款单
|
||||||
UFDouble money = billVO.getMoney(); //修改后的金额
|
UFDouble money = billVO.getMoney(); // 修改后的金额
|
||||||
UFDouble oriMoney = billOriVO.getMoney(); //修改前的金额
|
UFDouble oriMoney = billOriVO.getMoney(); // 修改前的金额
|
||||||
String pk_tradetype = billVO.getPk_tradetype();
|
String pk_tradetype = billVO.getPk_tradetype();
|
||||||
if (!"F2-Cxx-02".equals(pk_tradetype)) {
|
if (!"F2-Cxx-02".equals(pk_tradetype)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
String def3 = billVO.getDef3(); //收款单对应的销售订单id
|
String def3 = billVO.getDef3(); // 收款单对应的销售订单id
|
||||||
if (StringUtil.isEmpty(def3) || "N".equals(def3) || "~".equals(def3)) {
|
if (StringUtil.isEmpty(def3) || "N".equals(def3) || "~".equals(def3)) {
|
||||||
//无绑定的销售订单则下一次循环
|
// 无绑定的销售订单则下一次循环
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//计算收款单金额差值
|
// 计算收款单金额差值
|
||||||
UFDouble changeMoney = money.sub(oriMoney);
|
UFDouble changeMoney = money.sub(oriMoney);
|
||||||
//根据销售订单id去查询销售订单
|
// 根据销售订单id去查询销售订单
|
||||||
BaseDAO dao = new BaseDAO();
|
BaseDAO dao = new BaseDAO();
|
||||||
String sql = "select nreceivedmny,ntotalorigmny from so_saleorder where dr = 0 and csaleorderid = '" +def3+"'";
|
String sql = "select nreceivedmny,ntotalorigmny from so_saleorder where dr = 0 and csaleorderid = '" + def3
|
||||||
|
+ "'";
|
||||||
Map saleMap = (Map) dao.executeQuery(sql, new MapProcessor());
|
Map saleMap = (Map) dao.executeQuery(sql, new MapProcessor());
|
||||||
//销售订单价税合计
|
// 销售订单价税合计
|
||||||
UFDouble ntotalorigmny = UFDouble.ZERO_DBL;
|
UFDouble ntotalorigmny = UFDouble.ZERO_DBL;
|
||||||
//销售订单实际收款金额
|
// 销售订单实际收款金额
|
||||||
UFDouble nreceivedmny = UFDouble.ZERO_DBL;
|
UFDouble nreceivedmny = UFDouble.ZERO_DBL;
|
||||||
if (saleMap != null) {
|
if (saleMap != null) {
|
||||||
nreceivedmny = new UFDouble(saleMap.get("nreceivedmny") == null ? "0" : saleMap.get("nreceivedmny").toString());
|
nreceivedmny = new UFDouble(
|
||||||
ntotalorigmny = new UFDouble(saleMap.get("ntotalorigmny") == null ? "0" : saleMap.get("ntotalorigmny").toString());
|
saleMap.get("nreceivedmny") == null ? "0" : saleMap.get("nreceivedmny").toString());
|
||||||
|
ntotalorigmny = new UFDouble(
|
||||||
|
saleMap.get("ntotalorigmny") == null ? "0" : saleMap.get("ntotalorigmny").toString());
|
||||||
}
|
}
|
||||||
UFDouble moreMoney = nreceivedmny.add(changeMoney).sub(ntotalorigmny);
|
UFDouble moreMoney = nreceivedmny.add(changeMoney).sub(ntotalorigmny);
|
||||||
if (nreceivedmny.add(changeMoney).compareTo(ntotalorigmny) > 0) {
|
if (nreceivedmny.add(changeMoney).compareTo(ntotalorigmny) > 0) {
|
||||||
throw new BusinessException("【该笔收款已超销售订单"+ moreMoney +"元,无法传输!请检查订单累计收款金额!】");
|
throw new BusinessException("【该笔收款已超销售订单" + moreMoney + "元,无法传输!请检查订单累计收款金额!】");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,29 +59,29 @@ public class GatheringbillSaveBatchBSAction extends BillInsertBatchBSAction {
|
||||||
ArapBillVOUtils.setDefaultSettleFlag(bills);
|
ArapBillVOUtils.setDefaultSettleFlag(bills);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 收款单保存校验关联的销售订单实际收款金额是否超过价税合计
|
* 收款单保存校验关联的销售订单实际收款金额是否超过价税合计
|
||||||
*/
|
*/
|
||||||
|
|
||||||
for(AggregatedValueObject bill : bills) {
|
for(AggregatedValueObject bill : bills) {
|
||||||
BaseBillVO billVO = (BaseBillVO) bill.getParentVO(); //修改的收款单
|
BaseBillVO billVO = (BaseBillVO) bill.getParentVO(); //修改的收款单
|
||||||
UFDouble money = billVO.getMoney(); //金额
|
UFDouble money = billVO.getMoney(); //金额
|
||||||
String pk_tradetype = billVO.getPk_tradetype();
|
String pk_tradetype = billVO.getPk_tradetype();
|
||||||
if(!"F2-Cxx-02".equals(pk_tradetype)){
|
if(!"F2-Cxx-02".equals(pk_tradetype)){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
String def3 = billVO.getDef3(); //收款单对应的销售订单id
|
String def3 = billVO.getDef3(); //收款单对应的销售订单id
|
||||||
if(StringUtil.isEmpty(def3) || "N".equals(def3) || "~".equals(def3)){
|
if(StringUtil.isEmpty(def3) || "N".equals(def3) || "~".equals(def3)){
|
||||||
//无绑定的销售订单则下一次循环
|
//无绑定的销售订单则下一次循环
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
//根据销售订单id去查询销售订单
|
//根据销售订单id去查询销售订单
|
||||||
BaseDAO dao = new BaseDAO();
|
BaseDAO dao = new BaseDAO();
|
||||||
String sql = "select nreceivedmny,ntotalorigmny from so_saleorder where dr = 0 and csaleorderid = '" +def3+"'";
|
String sql = "select nreceivedmny,ntotalorigmny from so_saleorder where dr = 0 and csaleorderid = '" +def3+"'";
|
||||||
Map saleMap = (Map)dao.executeQuery(sql, new MapProcessor());
|
Map saleMap = (Map)dao.executeQuery(sql, new MapProcessor());
|
||||||
//销售订单价税合计
|
//销售订单价税合计
|
||||||
UFDouble ntotalorigmny = UFDouble.ZERO_DBL;
|
UFDouble ntotalorigmny = UFDouble.ZERO_DBL;
|
||||||
//销售订单实际收款金额
|
//销售订单实际收款金额
|
||||||
UFDouble nreceivedmny = UFDouble.ZERO_DBL;
|
UFDouble nreceivedmny = UFDouble.ZERO_DBL;
|
||||||
if(saleMap != null) {
|
if(saleMap != null) {
|
||||||
nreceivedmny = new UFDouble(saleMap.get("nreceivedmny") == null ? "0" : saleMap.get("nreceivedmny").toString());
|
nreceivedmny = new UFDouble(saleMap.get("nreceivedmny") == null ? "0" : saleMap.get("nreceivedmny").toString());
|
||||||
|
@ -89,7 +89,7 @@ public class GatheringbillSaveBatchBSAction extends BillInsertBatchBSAction {
|
||||||
}
|
}
|
||||||
UFDouble moreMoney = nreceivedmny.add(money).sub(ntotalorigmny);
|
UFDouble moreMoney = nreceivedmny.add(money).sub(ntotalorigmny);
|
||||||
if(nreceivedmny.add(money).compareTo(ntotalorigmny) > 0){
|
if(nreceivedmny.add(money).compareTo(ntotalorigmny) > 0){
|
||||||
throw new BusinessException("【该笔收款已超销售订单"+ moreMoney +"元,无法传输!请检查订单累计收款金额!】");
|
throw new BusinessException("【该笔收款已超销售订单"+ moreMoney +"元,无法传输!请检查订单累计收款金额!】");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue