|
@@ -35,17 +35,22 @@ import nc.vo.pub.workflownote.WorkflownoteVO;
|
|
import net.sf.json.JSONArray;
|
|
import net.sf.json.JSONArray;
|
|
import net.sf.json.JSONObject;
|
|
import net.sf.json.JSONObject;
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * 采购发票
|
|
|
|
+ *
|
|
|
|
+ *
|
|
|
|
+ */
|
|
public class InvoiceAddImpl extends BaseServlet implements IHttpServletAdaptor {
|
|
public class InvoiceAddImpl extends BaseServlet implements IHttpServletAdaptor {
|
|
IUAPQueryBS iuap = (IUAPQueryBS) NCLocator.getInstance().lookup(IUAPQueryBS.class.getName());
|
|
IUAPQueryBS iuap = (IUAPQueryBS) NCLocator.getInstance().lookup(IUAPQueryBS.class.getName());
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void doAction(HttpServletRequest req, HttpServletResponse resp)throws ServletException, IOException {
|
|
public void doAction(HttpServletRequest req, HttpServletResponse resp)throws ServletException, IOException {
|
|
try {
|
|
try {
|
|
- //InvocationInfoProxy.getInstance().setUserDataSource("NC6337");
|
|
|
|
|
|
+ InvocationInfoProxy.getInstance().setUserDataSource("NC6337");
|
|
NCLocator.getInstance().lookup(ISecurityTokenCallback.class).token("NCSystem".getBytes(),"pfxx".getBytes());
|
|
NCLocator.getInstance().lookup(ISecurityTokenCallback.class).token("NCSystem".getBytes(),"pfxx".getBytes());
|
|
String createStr = buildJson(req, resp, this.getClass().getName());
|
|
String createStr = buildJson(req, resp, this.getClass().getName());
|
|
JSONObject json = JSONObject.fromObject(createStr);
|
|
JSONObject json = JSONObject.fromObject(createStr);
|
|
- NcLog.info(json.toString());
|
|
|
|
|
|
+ NcLog.info("采购发票"+json.toString());
|
|
String vbillcode = "";
|
|
String vbillcode = "";
|
|
vbillcode = json.getString("vbillcode");
|
|
vbillcode = json.getString("vbillcode");
|
|
checkJson(json);//非空判断
|
|
checkJson(json);//非空判断
|
|
@@ -122,6 +127,7 @@ public class InvoiceAddImpl extends BaseServlet implements IHttpServletAdaptor {
|
|
invoiceItemVO.setVbdef17(bodyObject.getString("vbdef17"));//发票分类(0=增值税发票,10=普通发票,20=其它发票)
|
|
invoiceItemVO.setVbdef17(bodyObject.getString("vbdef17"));//发票分类(0=增值税发票,10=普通发票,20=其它发票)
|
|
invoiceItemVO.setVbdef15(bodyObject.getString("vbdef15"));//销售分公司
|
|
invoiceItemVO.setVbdef15(bodyObject.getString("vbdef15"));//销售分公司
|
|
invoiceItemVO.setVbdef14(bodyObject.getString("vbdef14"));//是否一致
|
|
invoiceItemVO.setVbdef14(bodyObject.getString("vbdef14"));//是否一致
|
|
|
|
+ invoiceItemVO.setPk_apfinanceorg(SqlexecuteQuery("pk_financeorg", "org_financeorg", "code", bodyObject.getString("pk_apfinanceorg_v")));
|
|
invoiceItemVO.setPk_apfinanceorg_v(SqlexecuteQuery("pk_vid", "org_financeorg_v", "code", bodyObject.getString("pk_apfinanceorg_v")));//应付财务组织
|
|
invoiceItemVO.setPk_apfinanceorg_v(SqlexecuteQuery("pk_vid", "org_financeorg_v", "code", bodyObject.getString("pk_apfinanceorg_v")));//应付财务组织
|
|
invoiceItemVO.setVmemob(bodyObject.getString("vmemob"));//备注
|
|
invoiceItemVO.setVmemob(bodyObject.getString("vmemob"));//备注
|
|
invoiceItemVO.setFrowtype(0);//行类型(0=货物行,1=折扣行,2=劳务行,3=零数量行)
|
|
invoiceItemVO.setFrowtype(0);//行类型(0=货物行,1=折扣行,2=劳务行,3=零数量行)
|
|
@@ -132,7 +138,7 @@ public class InvoiceAddImpl extends BaseServlet implements IHttpServletAdaptor {
|
|
invoiceItemVO.setCastunitid(invoiceItemVO.getCunitid());//单位
|
|
invoiceItemVO.setCastunitid(invoiceItemVO.getCunitid());//单位
|
|
Map<String,String> map = new HashMap<String,String>();
|
|
Map<String,String> map = new HashMap<String,String>();
|
|
String vfirstcode = bodyObject.getString("vfirstcode");
|
|
String vfirstcode = bodyObject.getString("vfirstcode");
|
|
- if(!"vfirstcode".equals(vfirstcode)) {
|
|
|
|
|
|
+ if(!"".equals(vfirstcode)) {
|
|
String vfirstrowno = bodyObject.getString("vfirstrowno");
|
|
String vfirstrowno = bodyObject.getString("vfirstrowno");
|
|
String cfirsttypecode = bodyObject.getString("cfirsttypecode");
|
|
String cfirsttypecode = bodyObject.getString("cfirsttypecode");
|
|
map = QueryDataUtil.getDataMap(cfirsttypecode, vfirstcode, vfirstrowno);
|
|
map = QueryDataUtil.getDataMap(cfirsttypecode, vfirstcode, vfirstrowno);
|
|
@@ -193,7 +199,7 @@ public class InvoiceAddImpl extends BaseServlet implements IHttpServletAdaptor {
|
|
e.printStackTrace(new PrintWriter(stringWriter));
|
|
e.printStackTrace(new PrintWriter(stringWriter));
|
|
// 获取详细信息
|
|
// 获取详细信息
|
|
String msg = stringWriter.getBuffer().toString();
|
|
String msg = stringWriter.getBuffer().toString();
|
|
- NcLog.info(msg);
|
|
|
|
|
|
+ NcLog.info("采购发票"+msg);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|