合并李正代码
This commit is contained in:
parent
deeca7d760
commit
95272d6827
|
|
@ -26,9 +26,11 @@ import nc.vo.pmpub.project.ProjectHeadVO;
|
||||||
import nc.vo.pub.BusinessException;
|
import nc.vo.pub.BusinessException;
|
||||||
import nc.vo.pub.CircularlyAccessibleValueObject;
|
import nc.vo.pub.CircularlyAccessibleValueObject;
|
||||||
import nc.vo.pub.lang.UFBoolean;
|
import nc.vo.pub.lang.UFBoolean;
|
||||||
|
import nc.vo.pub.lang.UFDate;
|
||||||
import nc.vo.pub.lang.UFDateTime;
|
import nc.vo.pub.lang.UFDateTime;
|
||||||
import nc.vo.pub.lang.UFDouble;
|
import nc.vo.pub.lang.UFDouble;
|
||||||
import nc.vo.pubapp.pattern.pub.MathTool;
|
import nc.vo.pubapp.pattern.pub.MathTool;
|
||||||
|
import nc.vo.pubapp.pattern.pub.SqlBuilder;
|
||||||
import nc.vo.so.m30.entity.SaleOrderBVO;
|
import nc.vo.so.m30.entity.SaleOrderBVO;
|
||||||
import nc.vo.so.m30.entity.SaleOrderHVO;
|
import nc.vo.so.m30.entity.SaleOrderHVO;
|
||||||
import nccloud.api.rest.utils.NCCRestUtils;
|
import nccloud.api.rest.utils.NCCRestUtils;
|
||||||
|
|
@ -1346,6 +1348,50 @@ public class GatheringbillRestResource extends ArapBaseRestResource {
|
||||||
if(pkBalatype != null && ("02".equals(pkBalatype) || "03".equals(pkBalatype) || "04".equals(pkBalatype) || "05".equals(pkBalatype))){
|
if(pkBalatype != null && ("02".equals(pkBalatype) || "03".equals(pkBalatype) || "04".equals(pkBalatype) || "05".equals(pkBalatype))){
|
||||||
itemvo.setRecaccount(null);
|
itemvo.setRecaccount(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//2025年10月13日10点22分--翻译checkno-原先为票据号--将票据号翻译成票据登记主键 start
|
||||||
|
UFDate billdate = headvo.getBilldate();
|
||||||
|
String checkno = itemvo.getCheckno();
|
||||||
|
String billrangestart = itemvo.getBillrangestart();
|
||||||
|
String billrangeend = itemvo.getBillrangeend();
|
||||||
|
if (StringUtils.isNotEmpty(checkno)) {
|
||||||
|
SqlBuilder querySql = new SqlBuilder();
|
||||||
|
querySql.append("select pk_register from fbm_register ");
|
||||||
|
querySql.append("where ");
|
||||||
|
querySql.append("fbmbillno", checkno);
|
||||||
|
querySql.append(" and ");
|
||||||
|
if(StringUtils.isEmpty(billrangestart)){
|
||||||
|
querySql.append("(");
|
||||||
|
querySql.appendNumberIsNull("billrangestart");
|
||||||
|
querySql.append(" or ");
|
||||||
|
querySql.appendIDIsNull("billrangestart");
|
||||||
|
querySql.append(")");
|
||||||
|
}else{
|
||||||
|
querySql.append("billrangestart", billrangestart);
|
||||||
|
}
|
||||||
|
querySql.append(" and ");
|
||||||
|
if(StringUtils.isEmpty(billrangeend)){
|
||||||
|
querySql.append("(");
|
||||||
|
querySql.appendNumberIsNull("billrangeend");
|
||||||
|
querySql.append(" or ");
|
||||||
|
querySql.appendIDIsNull("billrangeend");
|
||||||
|
querySql.append(")");
|
||||||
|
}else{
|
||||||
|
querySql.append("billrangeend", billrangeend);
|
||||||
|
}
|
||||||
|
querySql.append(" and ");
|
||||||
|
querySql.append("gatherdate", String.valueOf(billdate));
|
||||||
|
//查询票据登记
|
||||||
|
List<Object> pks = (List<Object>) dao.executeQuery(querySql.toString(),new nc.bs.cmp.util.ListResultSetProcessor());
|
||||||
|
if(pks==null || pks.size()==0){
|
||||||
|
throw new BusinessException("SQL【"+querySql+"】未查询到票据信息,请检查");
|
||||||
|
}else if(pks.size()>1){
|
||||||
|
throw new BusinessException("SQL【"+querySql+"】查询到多个票据信息,请检查设定的查询票据逻辑");
|
||||||
|
}else{
|
||||||
|
itemvo.setCheckno(pks.get(0).toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//2025年10月13日10点22分--翻译checkno-原先为票据号--将票据号翻译成票据登记主键 end
|
||||||
// 票据类型 checktype 结算方式:银行承兑汇票-电子、银行承兑汇票-纸质=银行承兑汇票;商业承兑汇票-电子、商业承兑汇票-纸质=商业承兑汇票
|
// 票据类型 checktype 结算方式:银行承兑汇票-电子、银行承兑汇票-纸质=银行承兑汇票;商业承兑汇票-电子、商业承兑汇票-纸质=商业承兑汇票
|
||||||
String checktypeName = "";
|
String checktypeName = "";
|
||||||
if ("银行承兑汇票-电子".equals(balatypeName)) {
|
if ("银行承兑汇票-电子".equals(balatypeName)) {
|
||||||
|
|
@ -1357,7 +1403,7 @@ public class GatheringbillRestResource extends ArapBaseRestResource {
|
||||||
} else if ("银行承兑汇票-纸质".equals(balatypeName)) {
|
} else if ("银行承兑汇票-纸质".equals(balatypeName)) {
|
||||||
checktypeName = "银行承兑汇票";
|
checktypeName = "银行承兑汇票";
|
||||||
}
|
}
|
||||||
|
// itemvo.setCustomer(headvo.getCustomer());
|
||||||
// objtype 往来对象0-客户 2-部门 3-业务员
|
// objtype 往来对象0-客户 2-部门 3-业务员
|
||||||
itemvo.setObjtype(headvo.getObjtype());
|
itemvo.setObjtype(headvo.getObjtype());
|
||||||
csaleorderid = itemvo.getDef37();
|
csaleorderid = itemvo.getDef37();
|
||||||
|
|
@ -1365,16 +1411,17 @@ public class GatheringbillRestResource extends ArapBaseRestResource {
|
||||||
"csaleorderid = '" + csaleorderid + "' ");
|
"csaleorderid = '" + csaleorderid + "' ");
|
||||||
if(vbillcode != null){
|
if(vbillcode != null){
|
||||||
// 客户
|
// 客户
|
||||||
Object customerid = hybo.findColValue("so_saleorder", "ccustomerid",
|
// Object customerid = hybo.findColValue("so_saleorder", "ccustomerid",
|
||||||
"csaleorderid = '" + csaleorderid + "' ");
|
// "csaleorderid = '" + csaleorderid + "' ");
|
||||||
Object customerCode = hybo.findColValue("bd_customer", "code", "pk_customer = '" + customerid + "' ");
|
// Object customerCode = hybo.findColValue("bd_customer", "code", "pk_customer = '" + customerid + "' ");
|
||||||
if (customerid != null || customerCode != null) {
|
// if (customerid != null || customerCode != null) {
|
||||||
itemvo.setCustomer(customerid.toString());
|
// itemvo.setCustomer(customerid.toString());
|
||||||
}else{
|
// }else{
|
||||||
// itemvo.setCustomer(headvo.getCustomer());
|
// itemvo.setCustomer(headvo.getCustomer());
|
||||||
Object custorm = hybo.findColValue("bd_customer", "pk_customer", "code = '" + itemvo.getCustomer() + "' ");
|
// Object custorm = hybo.findColValue("bd_customer", "pk_customer", "code = '" + itemvo.getCustomer() + "' ");
|
||||||
itemvo.setCustomer((String) custorm);
|
// itemvo.setCustomer((String) custorm);
|
||||||
}
|
// }
|
||||||
|
// itemvo.setCustomer(headvo.getCustomer());
|
||||||
// 税码
|
// 税码
|
||||||
Object ctaxcodeid = hybo.findColValue("so_saleorder_b", "ctaxcodeid",
|
Object ctaxcodeid = hybo.findColValue("so_saleorder_b", "ctaxcodeid",
|
||||||
"csaleorderid = '" + csaleorderid + "' ");
|
"csaleorderid = '" + csaleorderid + "' ");
|
||||||
|
|
@ -1406,8 +1453,8 @@ public class GatheringbillRestResource extends ArapBaseRestResource {
|
||||||
}else{
|
}else{
|
||||||
// Object custorm = hybo.findColValue("bd_customer", "pk_customer", "code = '" + "K31102276" + "' ");
|
// Object custorm = hybo.findColValue("bd_customer", "pk_customer", "code = '" + "K31102276" + "' ");
|
||||||
|
|
||||||
Object custorm = hybo.findColValue("bd_customer", "pk_customer", "code = '" + itemvo.getCustomer() + "' ");
|
// Object custorm = hybo.findColValue("bd_customer", "pk_customer", "code = '" + itemvo.getCustomer() + "' ");
|
||||||
itemvo.setCustomer((String) custorm);
|
// itemvo.setCustomer((String) custorm);
|
||||||
Object deptid = hybo.findColValue("org_dept", "pk_dept", "code = '" + itemvo.getPk_deptid() + "' ");
|
Object deptid = hybo.findColValue("org_dept", "pk_dept", "code = '" + itemvo.getPk_deptid() + "' ");
|
||||||
itemvo.setPk_deptid((String) deptid);
|
itemvo.setPk_deptid((String) deptid);
|
||||||
Object psndoc = hybo.findColValue("bd_psndoc", "pk_psndoc", "code = '" + itemvo.getPk_psndoc() + "' ");
|
Object psndoc = hybo.findColValue("bd_psndoc", "pk_psndoc", "code = '" + itemvo.getPk_psndoc() + "' ");
|
||||||
|
|
@ -1534,6 +1581,7 @@ public class GatheringbillRestResource extends ArapBaseRestResource {
|
||||||
// headvo.setRate(new UFDouble(1));
|
// headvo.setRate(new UFDouble(1));
|
||||||
headvo.setLocal_money(money.multiply(headvo.getRate()).setScale(2, UFDouble.ROUND_HALF_UP));
|
headvo.setLocal_money(money.multiply(headvo.getRate()).setScale(2, UFDouble.ROUND_HALF_UP));
|
||||||
AggGatheringBillVO bill = new AggGatheringBillVO();
|
AggGatheringBillVO bill = new AggGatheringBillVO();
|
||||||
|
headvo.setCustomer(itemvos.get(0).getCustomer());
|
||||||
bill.setParentVO(headvo);
|
bill.setParentVO(headvo);
|
||||||
bill.setChildrenVO((CircularlyAccessibleValueObject[]) itemvos.toArray(new GatheringBillItemVO[0]));
|
bill.setChildrenVO((CircularlyAccessibleValueObject[]) itemvos.toArray(new GatheringBillItemVO[0]));
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue