|
@@ -19,6 +19,7 @@ import nc.itf.ic.m4n.ITransformMaitain;
|
|
|
import nc.itf.pu.m21.IOrderMaintain;
|
|
|
import nc.itf.uap.IUAPQueryBS;
|
|
|
import nc.itf.uap.pf.IPFBusiAction;
|
|
|
+import nc.itf.xh.m4n.IUtilMaintain;
|
|
|
import nc.jdbc.framework.processor.ColumnProcessor;
|
|
|
import nc.log.NcLog;
|
|
|
import nc.vo.ic.m4n.entity.TransformHeadVO;
|
|
@@ -102,16 +103,20 @@ public class TransformAddImpl extends BaseServlet implements IHttpServletAdaptor
|
|
|
transformbodyvo.setNassistnum(new UFDouble(bodyObject.getString("nassistnum")));
|
|
|
transformbodyvo.setNcostprice(new UFDouble(bodyObject.getString("ncostprice")));
|
|
|
transformbodyvo.setNcostmny(new UFDouble(bodyObject.getString("ncostmny")));
|
|
|
+ transformbodyvo.setVbatchcode(bodyObject.getString("vbatchcode"));//批次号
|
|
|
+ transformbodyvo.setPk_batchcode(QueryBatchCode(transformbodyvo.getCmaterialoid(),transformbodyvo.getVbatchcode()));//批次主键
|
|
|
transformbodyvos[i] = transformbodyvo;
|
|
|
i++;
|
|
|
}
|
|
|
transformvo.setChildrenVO(transformbodyvos);
|
|
|
|
|
|
- ITransformMaitain itransform=(ITransformMaitain)NCLocator.getInstance().lookup(ITransformMaitain.class);
|
|
|
- itransform.insert(transformvos);
|
|
|
- IPFBusiAction service = NCLocator.getInstance().lookup(IPFBusiAction.class);
|
|
|
- service.processAction("APPROVE",
|
|
|
- "4N", null, transformvos[0], null, null);
|
|
|
+// ITransformMaitain itransform=(ITransformMaitain)NCLocator.getInstance().lookup(ITransformMaitain.class);
|
|
|
+// itransform.insert(transformvos);
|
|
|
+// IPFBusiAction service = NCLocator.getInstance().lookup(IPFBusiAction.class);
|
|
|
+// service.processAction("APPROVE",
|
|
|
+// "4N", null, transformvos[0], null, null);
|
|
|
+ IUtilMaintain iUtilMaintain = NCLocator.getInstance().lookup(IUtilMaintain.class);
|
|
|
+ iUtilMaintain.ZK_RequiresNew(transformvo);
|
|
|
out.print(formatRSJsonData("成功","",vbillcode));
|
|
|
|
|
|
} catch (Exception e) {
|
|
@@ -202,6 +207,17 @@ public class TransformAddImpl extends BaseServlet implements IHttpServletAdaptor
|
|
|
return object.toString();
|
|
|
}
|
|
|
|
|
|
+ public String QueryBatchCode(String cmaterialoid,String vbillcode) throws Exception {
|
|
|
+ String sql = "select pk_batchcode from scm_batchcode where cmaterialoid = '"+cmaterialoid+"' and vbatchcode = '"+vbillcode+"' and dr=0";
|
|
|
+ Object object;
|
|
|
+ object = iuap.executeQuery(sql, new ColumnProcessor());
|
|
|
+ if (object==null) {
|
|
|
+ return null;
|
|
|
+ }else {
|
|
|
+ return object.toString();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/*
|
|
|
* 查询转换类型pk
|
|
|
*/
|