Bläddra i källkod

Merge branch 'master' of http://139.196.39.194:9021/pancy/menchuang.git

yaoyu 11 månader sedan
förälder
incheckning
af9bc8aa9d

+ 17 - 3
mmpac/mmpac/src/private/u8c/impl/mmpac/mmpac/InvAddImpl.java

@@ -123,7 +123,7 @@ public class InvAddImpl extends BaseServlet implements IHttpServletAdaptor{
 				//主计量单位
 				String invMeas = GetBaseDAOUtil.getMeasidByName(bodyObject.getString("invMeas"));
 				//税目
-				String invTaxitems = GetBaseDAOUtil.gettaxitemid(bodyObject.getString("invTaxitems"));
+				String invTaxitems = GetBaseDAOUtil.gettaxitemid("4001");
 				//图号
 				String graphid = bodyObject.getString("graphid");
 				//长度
@@ -144,6 +144,8 @@ public class InvAddImpl extends BaseServlet implements IHttpServletAdaptor{
 				Object dc = bodyObject.getString("dc");
 				//标准
 				Object bz = bodyObject.getString("bz");
+				//辅计量管理
+				Object assistunit = bodyObject.getString("assistunit");
 				
 				if(!ys.equals("")&&ys != null) {
 					String yspk = GetBaseDAOUtil.getdefdocid(colordeflist, ys.toString());
@@ -202,6 +204,12 @@ public class InvAddImpl extends BaseServlet implements IHttpServletAdaptor{
 					if(!bz.equals("")) {
 						invbasVo.setFree4(standard);
 					}
+					if(assistunit.toString().equals("Y")) {
+						invbasVo.setAssistunit(UFBoolean.TRUE);
+					}
+					else {
+						invbasVo.setAssistunit(UFBoolean.FALSE);
+					}
 					ivo.updateVO(invbasVo);
 				}
 				else {
@@ -251,6 +259,12 @@ public class InvAddImpl extends BaseServlet implements IHttpServletAdaptor{
 					if(!bz.equals("")) {
 						invbasVo.setFree4(standard);
 					}
+					if(assistunit.toString().equals("Y")) {
+						invbasVo.setAssistunit(UFBoolean.TRUE);
+					}
+					else {
+						invbasVo.setAssistunit(UFBoolean.FALSE);
+					}
 					pk_inv = ivo.insertVO(invbasVo);
 				}
 				//查看当前存货是否有对应的存货管理档案
@@ -329,12 +343,12 @@ public class InvAddImpl extends BaseServlet implements IHttpServletAdaptor{
 		String invName = "invName";//存货名称
 		String invCl = "invCl";//存货分类
 		String invMeas = "invMeas";//主计量单位
-		String invTaxitems = "invTaxitems";//税目
 		String wholemanaflag = "wholemanaflag";
+		String assistunit = "assistunit";//辅计量管理
  
 		for(int i = 0; i < oprepObjectBs.size(); i++) {
 			JSONObject oprepJsonObjectB = oprepObjectBs.getJSONObject(i);
-			String[] HeadKey = {pk_corp,invCode,invName,invCl,invMeas,invTaxitems,wholemanaflag};
+			String[] HeadKey = {pk_corp,invCode,invName,invCl,invMeas,wholemanaflag,assistunit};
 			int num = i+1;
 			
 			mags.append("第"+num+"块:{");

+ 11 - 2
mmpac/mmpac/src/private/u8c/impl/mmpac/mmpac/OrderAddImpl.java

@@ -36,6 +36,7 @@ import java.sql.SQLException;
 
 import nc.vo.pub.BusinessException;
 import nc.vo.pub.lang.UFDate;
+import nc.vo.pub.lang.UFDouble;
 import nc.vo.trade.pub.IBillStatus;
 import u8c.bs.servlet.service.BaseServlet;
 import u8c.bs.servlet.service.GetBaseDAOUtil;
@@ -122,8 +123,8 @@ public class OrderAddImpl extends BaseServlet implements IHttpServletAdaptor{
 				headvo.setBillstatus(IBillStatus.FREE);
 				String pk_order = dao.insertVO(headvo);
 				//入库赋值
-				if(bodyObject.getJSONArray("in")!=null) {
-					JSONArray inArray = bodyObject.getJSONArray("in");
+				if(bodyObject.getJSONArray("product")!=null) {
+					JSONArray inArray = bodyObject.getJSONArray("product");
 					for(int i = 0;i < inArray.size();i++) {
 						Object inobj = inArray.get(i);
 						JSONObject injsobj = JSONObject.parseObject(inobj.toString());
@@ -133,6 +134,7 @@ public class OrderAddImpl extends BaseServlet implements IHttpServletAdaptor{
 						String prjtypename = GetBaseDAOUtil.getprjtypename(prjcode);
 						String vbatchcode = injsobj.getString("vbatchcode");
 						String cmaterialcode = injsobj.getString("cmaterialcode");
+						
 						String invname = GetBaseDAOUtil.getinvname(cmaterialcode);
 						String invspec = GetBaseDAOUtil.getinvspec(cmaterialcode);
 						String invtype = GetBaseDAOUtil.getinvtype(cmaterialcode);
@@ -154,6 +156,10 @@ public class OrderAddImpl extends BaseServlet implements IHttpServletAdaptor{
 						invo.setUnitid(measname);
 						invo.setPk_order(pk_order);
 						invo.setDr(0);
+						if(injsobj.getString("num")!=null) {
+							invo.setNum(new UFDouble(injsobj.getString("num")));
+						}
+						
 						dao.insertVO(invo);
 					}
 				}
@@ -190,6 +196,9 @@ public class OrderAddImpl extends BaseServlet implements IHttpServletAdaptor{
 						issuevo.setUnitid(measname);
 						issuevo.setPk_order(pk_order);
 						issuevo.setDr(0);
+						if(issuejsobj.getString("num")!=null) {
+							issuevo.setNum(new UFDouble(issuejsobj.getString("num")));
+						}
 						dao.insertVO(issuevo);
 					}
 				}

+ 2 - 1
xc/cg/src/client/u8c/ui/mytest/action/DemandAddAction.java

@@ -27,7 +27,8 @@ public class DemandAddAction extends AddAction{
 		DemandTestUI ui = (DemandTestUI) this.getFrameUI();
 		
 		ui.getBillCardPanel().setHeadItem(DemandVO.PK_CORP, PubEnv.getPk_corp()); // 默认当前公司
-		ui.getBillCardPanel().setHeadItem(DemandVO.BILLSTATUS, IBillStatus.COMMIT); // 增加时状态设自由编写态
+		ui.getBillCardPanel().setHeadItem(DemandVO.BILLSTATUS, IBillStatus.FREE); // 增加时状态设自由编写态
+		ui.getBillCardPanel().setHeadItem(DemandVO.DBILLDATE, PubEnv.getServerDate()); // 默认单据日期
 		ui.getBillCardPanel().setTailItem(DemandVO.MAKEDATE, PubEnv.getServerDate());//默认当前时间
 		ui.getBillCardPanel().setTailItem(DemandVO.BILLMAKER, PubEnv.getPk_user());//默认当前登录用户