销售订单修改提示优化
This commit is contained in:
parent
3e2ba05328
commit
dec8dca610
|
@ -338,6 +338,8 @@ public class APISaleOrderMaitainImpl implements IAPISaleOrderMaitain {
|
|||
if ("0".equals(dr) && num <= 0) {
|
||||
bodydata.put("status", "add");
|
||||
}
|
||||
} else {
|
||||
ExceptionUtils.wrappBusinessException("存在未传合同平台的明细行主键的子表行,请检查传参!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -456,7 +458,7 @@ public class APISaleOrderMaitainImpl implements IAPISaleOrderMaitain {
|
|||
// 订单类型
|
||||
// String ctrantypeid = orderHVO.getAttributeValue("ctrantypeid") + "";
|
||||
String vtrantypecode = orderHVO.getVtrantypecode();
|
||||
NCCForUAPLogger.debug("setOtherId-ccustomerid:" + ccustomerid + ",vtrantypecode:" + vtrantypecode);
|
||||
// NCCForUAPLogger.debug("setOtherId-ccustomerid:" + ccustomerid + ",vtrantypecode:" + vtrantypecode);
|
||||
try {
|
||||
String sql = "";
|
||||
// 部门
|
||||
|
@ -464,7 +466,7 @@ public class APISaleOrderMaitainImpl implements IAPISaleOrderMaitain {
|
|||
sql = " select pk_vid,pk_dept from org_dept where code = '[code]' ";
|
||||
sql = sql.replace("[code]", cdeptvid);
|
||||
Map deptMap = (Map) new BaseDAO().executeQuery(sql, new MapProcessor());
|
||||
NCCForUAPLogger.debug("APISaleOrderMaitainImpl-setOtherId-deptObj:" + deptMap);
|
||||
// NCCForUAPLogger.debug("APISaleOrderMaitainImpl-setOtherId-deptObj:" + deptMap);
|
||||
if (deptMap != null && !deptMap.isEmpty()) {
|
||||
if (!"".equals(deptMap.getOrDefault("pk_dept", "") + "")) {
|
||||
orderHVO.setCdeptid(deptMap.getOrDefault("pk_dept", "") + "");
|
||||
|
@ -479,7 +481,7 @@ public class APISaleOrderMaitainImpl implements IAPISaleOrderMaitain {
|
|||
sql = " select pk_psndoc from bd_psndoc where code = '[code]' ";
|
||||
sql = sql.replace("[code]", cemployeeid);
|
||||
Object staffObj = new BaseDAO().executeQuery(sql, new ColumnProcessor("pk_psndoc"));
|
||||
NCCForUAPLogger.debug("APISaleOrderMaitainImpl-setOtherId-staffObj:" + staffObj);
|
||||
// NCCForUAPLogger.debug("APISaleOrderMaitainImpl-setOtherId-staffObj:" + staffObj);
|
||||
if (staffObj != null) {
|
||||
String id = BFPubTools.getString_TrimAsNull(staffObj);
|
||||
if (!id.isEmpty()) {
|
||||
|
@ -492,7 +494,7 @@ public class APISaleOrderMaitainImpl implements IAPISaleOrderMaitain {
|
|||
sql = " select pk_customer from bd_customer where nvl(dr,0) = 0 and code = '[code]' ";
|
||||
sql = sql.replace("[code]", cinvoicecustid);
|
||||
Object invCustObj = new BaseDAO().executeQuery(sql, new ColumnProcessor("pk_customer"));
|
||||
NCCForUAPLogger.debug("setOtherId-invCustObj:" + invCustObj);
|
||||
// NCCForUAPLogger.debug("setOtherId-invCustObj:" + invCustObj);
|
||||
if (invCustObj != null) {
|
||||
String id = BFPubTools.getString_TrimAsNull(invCustObj);
|
||||
if (!id.isEmpty()) {
|
||||
|
@ -505,7 +507,7 @@ public class APISaleOrderMaitainImpl implements IAPISaleOrderMaitain {
|
|||
sql = " select pk_customer from bd_customer where nvl(dr,0) = 0 and code = '[code]' ";
|
||||
sql = sql.replace("[code]", ccustomerid);
|
||||
Object custObj = new BaseDAO().executeQuery(sql, new ColumnProcessor("pk_customer"));
|
||||
NCCForUAPLogger.debug("setOtherId-custObj:" + custObj);
|
||||
// NCCForUAPLogger.debug("setOtherId-custObj:" + custObj);
|
||||
if (custObj != null) {
|
||||
String id = BFPubTools.getString_TrimAsNull(custObj);
|
||||
if (!id.isEmpty()) {
|
||||
|
@ -518,12 +520,12 @@ public class APISaleOrderMaitainImpl implements IAPISaleOrderMaitain {
|
|||
IBilltypeService billtypeService = NCLocator.getInstance().lookup(IBilltypeService.class);
|
||||
BilltypeVO billtype = billtypeService.getBilltype(vtrantypecode);
|
||||
if (billtype != null && billtype.getPk_billtypeid() != null) {
|
||||
NCCForUAPLogger.debug("setOtherId-pk_billtypeid:" + billtype.getPk_billtypeid());
|
||||
// NCCForUAPLogger.debug("setOtherId-pk_billtypeid:" + billtype.getPk_billtypeid());
|
||||
orderHVO.setCtrantypeid(billtype.getPk_billtypeid());
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
NCCForUAPLogger.debug("APISaleOrderMaitainImpl-setOtherId-exp:" + e.getMessage());
|
||||
Logger.error("APISaleOrderMaitainImpl-setOtherId-exp:" + e.getMessage());
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
@ -725,19 +727,6 @@ public class APISaleOrderMaitainImpl implements IAPISaleOrderMaitain {
|
|||
targetBVO.setVbdef19(sourceBVO.getVbdef19()); // 计划开工日期
|
||||
targetBVO.setVbdef20(sourceBVO.getVbdef20()); // 计划完工日期
|
||||
|
||||
// 更新日志输出(按需添加字段)
|
||||
NCCForUAPLogger.debug(String.format(
|
||||
"cmaterialvid = [%S], vbdef1 = [%S], vbdef5 = [%S], vbdef10 = [%S], vbdef13 = [%S], "
|
||||
+ " vbdef18 = [%S], vbdef19 = [%S], vbdef20 = [%S]",
|
||||
cmaterialvid,
|
||||
targetBVO.getVbdef1(),
|
||||
targetBVO.getVbdef5(),
|
||||
targetBVO.getVbdef10(),
|
||||
targetBVO.getVbdef13(),
|
||||
targetBVO.getVbdef18(), // 是否定制
|
||||
targetBVO.getVbdef19(), // 计划开工日期
|
||||
targetBVO.getVbdef20() // 计划完工日期
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -991,7 +980,7 @@ public class APISaleOrderMaitainImpl implements IAPISaleOrderMaitain {
|
|||
// 税码
|
||||
bVO.setAttributeValue("ctaxcodeid", o_pk_project);
|
||||
} catch (BusinessException e) {
|
||||
NCCForUAPLogger.debug("APISaleOrderMaitainImpl-setMaterl:" + e.getMessage());
|
||||
Logger.error("APISaleOrderMaitainImpl-setMaterl:" + e.getMessage());
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
@ -1249,7 +1238,7 @@ public class APISaleOrderMaitainImpl implements IAPISaleOrderMaitain {
|
|||
*/
|
||||
|
||||
} catch (Exception e) {
|
||||
NCCForUAPLogger.debug("APISaleOrderMaitainImpl-addBvo:" + e.getMessage());
|
||||
Logger.error("APISaleOrderMaitainImpl-addBvo:" + e.getMessage());
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue