当前位置: 首页 > news >正文

蚌埠网站建设中心网站正能量网站不用下载直接进入

蚌埠网站建设中心,网站正能量网站不用下载直接进入,用VS做的网站怎么连接数据库,门户网站seo前期我感觉有必要分享一下,历时2周搁置的功能 应该有很多小伙伴都在找的问题 祝你们好运 关键代码 集团id一定要填 , 两周的时间就是栽在这id上 try {BaseDAO bd new BaseDAO();nc.vo.so.m4331.entity.DeliveryHVO deliveryHVOnew nc.vo.so.m4331.entity.DeliveryHVO();//fst…我感觉有必要分享一下,历时2周搁置的功能  应该有很多小伙伴都在找的问题  祝你们好运 关键代码 集团id一定要填 , 两周的时间就是栽在这id上 try {BaseDAO bd new BaseDAO();nc.vo.so.m4331.entity.DeliveryHVO deliveryHVOnew nc.vo.so.m4331.entity.DeliveryHVO();//fstatusflag //1自由2审批通过3冻结4关闭7审批中8审批不通过5失效//获取销售发货单(4331) 进行审批 产生 销售出库单 (4C)deliveryHVO (nc.vo.so.m4331.entity.DeliveryHVO) bd.executeQuery(select * from jpncdb1.so_delivery where dr0 and vbillcode vsourcebillcode2, new BeanProcessor(nc.vo.so.m4331.entity.DeliveryHVO.class));if (deliveryHVO ! null){String so_delivery_pkdeliveryHVO.getAttributeValue(cdeliveryid).toString();//主键SuperVO[] deliveryBVO HYPubBO_Client.queryByCondition(DeliveryBVO.class, cdeliveryid so_delivery_pk);// 30 4331 4C//String flag2 PfUtilTools.approveSilently(4331,so_delivery_pk, Y, 批准,hcj,null);IplatFormEntry iIplatFormEntry (IplatFormEntry) NCLocator.getInstance().lookup(IplatFormEntry.class.getName());//这是集团ID 一般每个表都有 随便找 pk_group 字段InvocationInfoProxy.getInstance().setGroupId(00013910000000000N4S); //这个字段很重要AggregatedValueObject deliveryVO new nc.vo.so.m4331.entity.DeliveryVO();deliveryVO.setParentVO(deliveryHVO);deliveryVO.setChildrenVO(deliveryBVO);HashMap map new HashMap();map.put(notechecked, notechecked);// 审批动作 ,审批单据类型 , null ,billvo,null, 环境 ,Object processAction iIplatFormEntry.processAction(APPROVE, 4331, null, deliveryVO,null, map);}} catch (Exception e1) {e1.printStackTrace();} package nc.impl.jpncinterface;import java.awt.event.ActionEvent; import java.math.BigDecimal; import java.math.RoundingMode; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.regex.Pattern;import nc.bs.dao.BaseDAO; import nc.bs.dao.DAOException; import nc.bs.framework.common.InvocationInfoProxy; import nc.bs.framework.common.NCLocator; import nc.bs.ic.general.businessevent.ICGeneralCommonEvent; import nc.bs.pub.pf.PfUtilTools; import nc.impl.pubapp.pattern.data.bill.BillQuery; import nc.itf.uap.pf.IPFBusiAction; import nc.itf.uap.pf.IplatFormEntry; import nc.jdbc.framework.processor.BeanListProcessor; import nc.jdbc.framework.processor.BeanProcessor; import nc.jdbc.framework.processor.ColumnProcessor; import nc.md.persist.framework.IMDPersistenceQueryService; import nc.ui.so.m30.billui.action.SaleOrderMESApproveAction; import nc.ui.so.m4331.billui.action.DeliveryApproveAction; import nc.ui.trade.business.HYPubBO_Client; import nc.vo.ic.m4c.entity.SaleOutBodyVO; import nc.vo.ic.m4c.entity.SaleOutHeadVO; import nc.vo.pu.m21.entity.OrderItemVO; import nc.vo.pub.AggregatedValueObject; import nc.vo.pub.SuperVO; import nc.vo.pub.pf.workflow.IPFActionName; import nc.vo.rmex.rmupload.deliverybill.DeliveryBillHVO; import nc.vo.so.m4331.entity.DeliveryBVO; import nc.vo.so.m4331.entity.DeliveryVO;import org.apache.commons.lang3.StringUtils;import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject;public class GetIcSaleout {//库存销售出库单public String getExecute(String operation,String orderform){String resultstrnull; if (operation.equals(Insert)){//插入if(isJsonObject(orderform)){//验证入参resultstr insert(operation, orderform);}else{JSONObject backinfojsonnew JSONObject();backinfojson.put($successful, N);backinfojson.put(sendresult, JSON格式错误);resultstrbackinfojson.toString();}}else if (operation.equals(Update)){//修改resultstrupdate(operation, orderform);}else if (operation.equals(Delete)){//删除resultstrdelete(operation, orderform);}else if (operation.equals(Search)){//查询resultstr search(operation, orderform);}else {JSONObject backinfojsonnew JSONObject();backinfojson.put($successful, N);backinfojson.put(sendresult, 未开放);resultstrbackinfojson.toString();}return resultstr;}/*** 插入* param operation* param orderform* return*/public String insert(String operation,String orderform){JSONObject orderjson JSON.parseObject(orderform);StringBuffer xml_sbnew StringBuffer();//String vbillcode orderjson.getString(vbillcode);//单String vsourcebillcode2 orderjson.getString(vsourcebillcode);//销售发货单号/** -- 订单类型select * from jpncdb1.bd_billtype where billtypename like %整车销售% and parentbilltype 4C-- 销售发货单 单据号审批 产生销售出库单* *///String flag1 PfUtilTools.approveSilently(交易类型编码或单据类型,主表主键, 是否通过, 审批批语, ,用户组, 动作);try {BaseDAO bd new BaseDAO();nc.vo.so.m4331.entity.DeliveryHVO deliveryHVOnew nc.vo.so.m4331.entity.DeliveryHVO();//nc.vo.so.m4331.entity.DeliveryBVO deliveryBVO[]null;//ListDeliveryBVO deliveryBVOnew ArrayListDeliveryBVO();//fstatusflag //1自由2审批通过3冻结4关闭7审批中8审批不通过5失效//获取销售发货单(4331) 进行审批 产生 销售出库单 (4C)deliveryHVO (nc.vo.so.m4331.entity.DeliveryHVO) bd.executeQuery(select * from jpncdb1.so_delivery where dr0 and vbillcode vsourcebillcode2, new BeanProcessor(nc.vo.so.m4331.entity.DeliveryHVO.class));if (deliveryHVO ! null){String so_delivery_pkdeliveryHVO.getAttributeValue(cdeliveryid).toString();//主键//deliveryBVO[0] (nc.vo.so.m4331.entity.DeliveryBVO) bd.executeQuery(select * from jpncdb1.so_delivery_b where dr0 and cdeliveryid so_delivery_pk, new BeanProcessor(nc.vo.so.m4331.entity.DeliveryBVO.class));SuperVO[] deliveryBVO HYPubBO_Client.queryByCondition(DeliveryBVO.class, cdeliveryid so_delivery_pk);//deliveryBVO(ListDeliveryBVO) bd.executeQuery(select * from jpncdb1.so_delivery_b where dr0 and cdeliveryid so_delivery_pk, new BeanListProcessor(DeliveryBVO.class));String[] users {hcj};// 30 4331 4C//String flag2 PfUtilTools.approveSilently(4331,so_delivery_pk, Y, 批准,hcj,null);//String flag2 PfUtilTools.approveSilently(4C-Cxx-001,so_delivery_pk, Y, , APPROVE,null);//String flag2 PfUtilTools.approveSilently(4331,so_delivery_pk,null, null, APPROVE,null);//System.out.println(flag2);//IplatFormEntry iIplatFormEntry NCLocator.getInstance().lookup(IplatFormEntry.class);IplatFormEntry iIplatFormEntry (IplatFormEntry) NCLocator.getInstance().lookup(IplatFormEntry.class.getName());InvocationInfoProxy.getInstance().setGroupId(00013910000000000N4S);AggregatedValueObject deliveryVO new nc.vo.so.m4331.entity.DeliveryVO();//deliveryVO//nc.vo.so.m4331.entity.DeliveryVOdeliveryVO.setParentVO(deliveryHVO);deliveryVO.setChildrenVO(deliveryBVO);HashMap map new HashMap();map.put(notechecked, notechecked);Object processAction iIplatFormEntry.processAction(APPROVE, 4331, null, deliveryVO,null, map);System.out.println(processAction);//流程平台动作处理 服务接口//destBill是aggvo/*BillQueryDeliveryBillHVO billquery new BillQuery(DeliveryBillHVO.class);DeliveryBillHVO[] aggvobillquery.query(new String[] {so_delivery_pk});*//*IMDPersistenceQueryService serviceNCLocator.getInstance().lookup(IMDPersistenceQueryService.class);QueryCondition queryConditionnew QueryCondition(src_class);queryCondition.addCondition(Restrictions.and(Restrictions.eq(vbillcode, billcode), Restrictions.eq(dr, 0)));service.queryBillOfVOByCond(queryCondition, false);*///DeliveryBillHVO[] obj (DeliveryBillHVO[]) ifbaction.processAction(WRITE, 4331, null, aggvo, null, null);//Object retObj new PfUtilBO().processAction(APPROVE, 4331, 2005-05-30 12:23:44, null, billVo, userObj );}} catch (Exception e1) {e1.printStackTrace();}String resultstr2 ; JSONObject backinfojson2new JSONObject();backinfojson2.put($successful, Y);backinfojson2.put(sendresult, );resultstr2backinfojson2.toString();boolean flag true;if(flag){return resultstr2;}String pk_org orderjson.getString(pk_orgcode); //库存组织 10202 pk_orgcodeString vtrantypecode orderjson.getString(ctrantypecode); //出入库类型编码 4C-Cxx-001 ctrantypecodeString cwarehouseid orderjson.getString(cwarehousecode); //仓库 X06 cwarehousecodeString cwhsmanagerid orderjson.getString(cwhsmanagercode); //库管员 08708 cwhsmanagercodeString cbizid orderjson.getString(cbizcode); //业务员 0110 cbizcodeString cdptvid orderjson.getString(cdptcode); //部门 cdptcodeString ccustomerid orderjson.getString(ccustomercode); //订单客户 070204 ccustomercode//String ntotalnum orderjson.getString(ntotalnum); //总数量会自动计算String cfanaceorgoid orderjson.getString(cfanaceorgcode); //结算财务组织 100 cfanaceorgcodeString cbiztype orderjson.getString(cbiztype); //业务流程 Cxx-001String dbilldate orderjson.getString(dbilldate); //单据日期 2021-09-07 08:33:49String trafficorgoid orderjson.getString(trafficorgoid); //物流组织 101String freplenishflag orderjson.getString(freplenishflag);// 销售退货 NString boutretflag orderjson.getString(boutretflag); //销售退回 NString fbillflag orderjson.getString(fbillflag); //单据状态 2String vnote orderjson.getString(vnote); //备注String vdef2 orderjson.getString(vdef2); //表头自定义项2 02String creator orderjson.getString(creator); //创建人 hcjString billmaker orderjson.getString(billmaker); //制单人 hcjString csaleorgoid orderjson.getString(csaleorgoid); //销售组织 101String creceivfinorgoid orderjson.getString(creceivfinorgoid); //应收财务组织 100String ctrantypeid orderjson.getString(ctrantypeid); //出入库类型 4C-Cxx-001String creationtime getDateStr(new Date(),yyyy-MM-dd HH:mm:ss); //制单日期//子表JSONArray body (JSONArray) orderjson.get(body);StringBuffer body_sbnew StringBuffer();for (int i 0;ibody.size();i){JSONObject tmpb body.getJSONObject(i);String crowno tmpb.getString(crowno); // 行号10 crownoString cmaterialoid tmpb.getString(cmaterialoid); //物料编码 91812160String cunitid tmpb.getString(cunitid); // 主单位 012String vfree1 tmpb.getString(vfree1); //自由辅助属性1 10014910000000002J0Q 颜色 0002 String nshouldnum tmpb.getString(nshouldnum); //应发主数量 5 String nnum tmpb.getString(nnum); //实发主数量 5 String price tmpb.getString(price);// 单价 1000//String money tmpb.getString(money); //金额 5000 String dbizdate tmpb.getString(dbizdate);//出库日期 2021-10-09 10:12:22String cinvoicecustid tmpb.getString(cinvoicecustid); //开票客户 350135 String csourcebillhid tmpb.getString(csourcebillhid); //来源单据表头主键 1001AZ10000001C3AK7JString csourcebillbid tmpb.getString(csourcebillbid); //来源单据表体主键 1001AZ10000001C3AK7KString csourcetype tmpb.getString(csourcetype); //来源单据类型 4331String csourcetranstype tmpb.getString(csourcetranstype); //来源交易类型 4331-Cxx-001String vsourcebillcode tmpb.getString(vsourcebillcode); //来源单据号 GFH210900002String vsourcerowno tmpb.getString(vsourcerowno); //来源单据行号 10String casscustid tmpb.getString(casscustid); //客户 350135String cfirsttype tmpb.getString(cfirsttype); //源头单据类型 30String cfirsttranstype tmpb.getString(cfirsttranstype); //源头交易类型 30String cfirstbillhid tmpb.getString(cfirstbillhid); //源头单据号pk //1001AZ10000001C3AK6UString cfirstbillbid tmpb.getString(cfirstbillbid); //源头单据行号pk //1001AZ10000001C3AK6ZString vfirstbillcode tmpb.getString(vfirstbillcode); //源头单据号 GXD210900006String vfirstrowno tmpb.getString(vfirstrowno); //源头单据行号 10String vnotebody tmpb.getString(vnotebody); //行备注 String flargess tmpb.getString(flargess); //赠品 NString bsourcelargess tmpb.getString(bsourcelargess); //上游赠品行 N String bonroadflag tmpb.getString(bonroadflag); //在途 NString cbodytranstypecode tmpb.getString(cbodytranstypecode); //出入库类型 4C-Cxx-001String cbodywarehouseid tmpb.getString(cbodywarehouseid); //库存仓库 X06//String pk_org tmpb.getString(pk_org); //库存组织 10202String ddeliverdate tmpb.getString(ddeliverdate); //要求收货日期 2021-09-07 08:33:49String norignetprice tmpb.getString(norignetprice); //主无税净价 1000String norigtaxnetprice tmpb.getString(norigtaxnetprice); // 主含税净价 1000String csourcebilldate tmpb.getString(csourcebilldate); //来源单据日期 2021-09-07 08:33:49String cfirstbilldate tmpb.getString(cfirstbilldate); //源头单据日期 2021-09-07 08:33:49//总价//金额 数量*单价BigDecimal bd_num new BigDecimal(nnum);//数量BigDecimal bd_price new BigDecimal(price).setScale(3, RoundingMode.HALF_UP);//单价BigDecimal bd_total bd_num.multiply(bd_price);//总价BaseDAO bd_color new BaseDAO();String pk_defdoc ;try {//颜色代码查询pk_defdoc (String) bd_color.executeQuery(SELECT pk_defdoc FROM bd_defdoc WHERE pk_defdoclist 10014910000000002GJJ and code vfree1, new ColumnProcessor());} catch (DAOException e) {e.printStackTrace();}StringBuffer body_sb2 new StringBuffer();JSONArray body2 (JSONArray) tmpb.get(body);for (int j 0;jbody2.size();j){JSONObject tmpb2 body2.getJSONObject(j);//String nnum_2 tmpb2.getString(nnum);String nnum_2 nnum; //主数量 2 body_sb2.append(SetIcSaleoutXml.setPoOrderBody2(nnum_2));}body_sb.append(SetIcSaleoutXml.setPoOrderBody(body_sb2.toString(), crowno, cmaterialoid, cunitid, vfree1, nshouldnum, nnum, price, bd_total.toString(), dbizdate, cinvoicecustid, csourcebillhid, csourcebillbid, csourcetype, csourcetranstype, vsourcebillcode, vsourcerowno, casscustid, cfirsttype, cfirsttranstype, cfirstbillhid,cfirstbillbid, vfirstbillcode, vfirstrowno, vnotebody, flargess, bsourcelargess, bonroadflag, cbodytranstypecode, cbodywarehouseid, pk_org, ddeliverdate, norignetprice, norigtaxnetprice, csourcebilldate, cfirstbilldate));}xml_sb SetIcSaleoutXml.setPoOrderHead(body_sb.toString(), , , cbiztype, dbilldate, vtrantypecode, pk_org, cwarehouseid, trafficorgoid,cwhsmanagerid, cbizid, ccustomerid, freplenishflag, boutretflag, fbillflag, vnote, vdef2, creator, billmaker, creationtime, cdptvid, csaleorgoid, cfanaceorgoid, creceivfinorgoid, ctrantypeid);//GetXChangeService gtxchangeservicenew GetXChangeService();Object ovbillcode ;JSONObject backinfojsongtxchangeservice.getXChangeservice(xml_sb.toString());if(backinfojson.getString($successful).equals(Y)){String pkbackinfojson.getJSONObject(sendresult).getString(content);BaseDAO bd new BaseDAO();try {//获取插入的订单单号 ovbillcode bd.executeQuery(select vbillcode from ic_saleout_h where cgeneralhid pk, new ColumnProcessor());backinfojson.put($vbillcode, ovbillcode);} catch (Exception e) {e.printStackTrace();}}else if(backinfojson.getString($successful).equals(N)) {backinfojson.put($vbillcode,ovbillcode);}return backinfojson.toJSONString();}/*** 修改* param operation* param orderform* return*/public String update(String operation,String orderform){JSONObject orderjson JSON.parseObject(orderform);String vbillcode orderjson.getString(vbillcode);//单据号 String pk ;JSONObject backinfojsonnew JSONObject();if (StringUtils.isBlank(vbillcode)){backinfojson.put(sendresult, vbillcode为空);backinfojson.put($successful, N);}else{BaseDAO bd new BaseDAO();SaleOutHeadVO saleOutHeadVOnew SaleOutHeadVO();try {saleOutHeadVO (SaleOutHeadVO) bd.executeQuery(select * from ic_saleout_h where dr0 and fbillflag 1 and vbillcode vbillcode, new BeanProcessor(SaleOutHeadVO.class));} catch (Exception e1) {e1.printStackTrace();}if (saleOutHeadVO ! null){pksaleOutHeadVO.getAttributeValue(cgeneralhid).toString();if(StringUtils.isBlank(pk)){backinfojson.put(sendresult, 查询不到单据);backinfojson.put($successful, N);}else{StringBuffer xml_sbnew StringBuffer();//String vbillcode orderjson.getString(vbillcode);//单String pk_org orderjson.getString(pk_orgcode); //库存组织 10202 pk_orgcodeString vtrantypecode orderjson.getString(ctrantypecode); //出入库类型编码 4C-Cxx-001 ctrantypecodeString cwarehouseid orderjson.getString(cwarehousecode); //仓库 X06 cwarehousecodeString cwhsmanagerid orderjson.getString(cwhsmanagercode); //库管员 08708 cwhsmanagercodeString cbizid orderjson.getString(cbizcode); //业务员 0110 cbizcodeString cdptvid orderjson.getString(cdptcode); //部门 cdptcodeString ccustomerid orderjson.getString(ccustomercode); //订单客户 070204 ccustomercode//String ntotalnum orderjson.getString(ntotalnum); //总数量会自动计算String cfanaceorgoid orderjson.getString(cfanaceorgcode); //结算财务组织 100 cfanaceorgcodeString cbiztype orderjson.getString(cbiztype); //业务流程 Cxx-001String dbilldate orderjson.getString(dbilldate); //单据日期 2021-09-07 08:33:49String trafficorgoid orderjson.getString(trafficorgoid); //物流组织 101String freplenishflag orderjson.getString(freplenishflag);// 销售退货 NString boutretflag orderjson.getString(boutretflag); //销售退回 NString fbillflag orderjson.getString(fbillflag); //单据状态 2String vnote orderjson.getString(vnote); //备注String vdef2 orderjson.getString(vdef2); //表头自定义项2 02String creator orderjson.getString(creator); //创建人 hcjString billmaker orderjson.getString(billmaker); //制单人 hcjString csaleorgoid orderjson.getString(csaleorgoid); //销售组织 101String creceivfinorgoid orderjson.getString(creceivfinorgoid); //应收财务组织 100String ctrantypeid orderjson.getString(ctrantypeid); //出入库类型 4C-Cxx-001String creationtime getDateStr(new Date(),yyyy-MM-dd HH:mm:ss); //制单日期//子表JSONArray body (JSONArray) orderjson.get(body);StringBuffer body_sbnew StringBuffer();for (int i 0;ibody.size();i){JSONObject tmpb body.getJSONObject(i);String crowno tmpb.getString(crowno); // 行号10 crownoString cmaterialoid tmpb.getString(cmaterialoid); //物料编码 91812160String cunitid tmpb.getString(cunitid); // 主单位 012String vfree1 tmpb.getString(vfree1); //自由辅助属性1 10014910000000002J0Q 颜色 0002 String nshouldnum tmpb.getString(nshouldnum); //应发主数量 5 String nnum tmpb.getString(nnum); //实发主数量 5 String price tmpb.getString(price);// 单价 1000//String money tmpb.getString(money); //金额 5000 String dbizdate tmpb.getString(dbizdate);//出库日期 2021-10-09 10:12:22String cinvoicecustid tmpb.getString(cinvoicecustid); //开票客户 350135 String csourcebillhid tmpb.getString(csourcebillhid); //来源单据表头主键 1001AZ10000001C3AK7JString csourcebillbid tmpb.getString(csourcebillbid); //来源单据表体主键 1001AZ10000001C3AK7KString csourcetype tmpb.getString(csourcetype); //来源单据类型 4331String csourcetranstype tmpb.getString(csourcetranstype); //来源交易类型 4331-Cxx-001String vsourcebillcode tmpb.getString(vsourcebillcode); //来源单据号 GFH210900002String vsourcerowno tmpb.getString(vsourcerowno); //来源单据行号 10String casscustid tmpb.getString(casscustid); //客户 350135String cfirsttype tmpb.getString(cfirsttype); //源头单据类型 30String cfirsttranstype tmpb.getString(cfirsttranstype); //源头交易类型 30String cfirstbillhid tmpb.getString(cfirstbillhid); //源头单据号pk //1001AZ10000001C3AK6UString cfirstbillbid tmpb.getString(cfirstbillbid); //源头单据行号pk //1001AZ10000001C3AK6ZString vfirstbillcode tmpb.getString(vfirstbillcode); //源头单据号 GXD210900006String vfirstrowno tmpb.getString(vfirstrowno); //源头单据行号 10String vnotebody tmpb.getString(vnotebody); //行备注 String flargess tmpb.getString(flargess); //赠品 NString bsourcelargess tmpb.getString(bsourcelargess); //上游赠品行 N String bonroadflag tmpb.getString(bonroadflag); //在途 NString cbodytranstypecode tmpb.getString(cbodytranstypecode); //出入库类型 4C-Cxx-001String cbodywarehouseid tmpb.getString(cbodywarehouseid); //库存仓库 X06//String pk_org tmpb.getString(pk_org); //库存组织 10202String ddeliverdate tmpb.getString(ddeliverdate); //要求收货日期 2021-09-07 08:33:49String norignetprice tmpb.getString(norignetprice); //主无税净价 1000String norigtaxnetprice tmpb.getString(norigtaxnetprice); // 主含税净价 1000String csourcebilldate tmpb.getString(csourcebilldate); //来源单据日期 2021-09-07 08:33:49String cfirstbilldate tmpb.getString(cfirstbilldate); //源头单据日期 2021-09-07 08:33:49//总价//金额 数量*单价BigDecimal bd_num new BigDecimal(nnum);//数量BigDecimal bd_price new BigDecimal(price).setScale(3, RoundingMode.HALF_UP);//单价BigDecimal bd_total bd_num.multiply(bd_price);//总价BaseDAO bd_color new BaseDAO();String pk_defdoc ;try {//颜色代码查询pk_defdoc (String) bd_color.executeQuery(SELECT pk_defdoc FROM bd_defdoc WHERE pk_defdoclist 10014910000000002GJJ and code vfree1, new ColumnProcessor());} catch (DAOException e) {e.printStackTrace();}StringBuffer body_sb2 new StringBuffer();JSONArray body2 (JSONArray) tmpb.get(body);for (int j 0;jbody2.size();j){JSONObject tmpb2 body2.getJSONObject(j);//String nnum_2 tmpb2.getString(nnum);String nnum_2 nnum; //主数量 2 body_sb2.append(SetIcSaleoutXml.setPoOrderBody2(nnum_2));}body_sb.append(SetIcSaleoutXml.setPoOrderBody(body_sb2.toString(), crowno, cmaterialoid, cunitid, vfree1, nshouldnum, nnum, price, bd_total.toString(), dbizdate, cinvoicecustid, csourcebillhid, csourcebillbid, csourcetype, csourcetranstype, vsourcebillcode, vsourcerowno, casscustid, cfirsttype, cfirsttranstype, cfirstbillhid,cfirstbillbid, vfirstbillcode, vfirstrowno, vnotebody, flargess, bsourcelargess, bonroadflag, cbodytranstypecode, cbodywarehouseid, pk_org, ddeliverdate, norignetprice, norigtaxnetprice, csourcebilldate, cfirstbilldate));}xml_sb SetIcSaleoutXml.setPoOrderHead(body_sb.toString(), pk,vbillcode , cbiztype, dbilldate, vtrantypecode, pk_org, cwarehouseid, trafficorgoid,cwhsmanagerid, cbizid, ccustomerid, freplenishflag, boutretflag, fbillflag, vnote, vdef2, creator, billmaker, creationtime, cdptvid, csaleorgoid, cfanaceorgoid, creceivfinorgoid, ctrantypeid);//GetXChangeService gtxchangeservicenew GetXChangeService();backinfojsongtxchangeservice.getXChangeservice(xml_sb.toString());backinfojson.put($vbillcode, vbillcode);if(backinfojson.getString($successful).equals(Y)){String oldpkbackinfojson.getJSONObject(sendresult).getString(bdocid);try {bd.deleteByClause(SaleOutHeadVO.class, cgeneralhidoldpk);bd.deleteByClause(SaleOutBodyVO.class, cgeneralhidoldpk);} catch (Exception e) {// TODO Auto-generated catch blocke.printStackTrace();}String newpkbackinfojson.getJSONObject(sendresult).getString(content);try {String sqlupdate ic_saleout_h set vbillcodevbillcode where cgeneralhidnewpk;bd.executeUpdate(sql);} catch (Exception e) {// TODO Auto-generated catch blocke.printStackTrace();}}}}else{backinfojson.put(sendresult, 查询不到单据);backinfojson.put($successful, N);}}return backinfojson.toJSONString();}/*** 删除* param operation* param orderform* return*/public String delete(String operation,String orderform){JSONObject orderjsonJSON.parseObject(orderform);String vbillcodeorderjson.getString(vbillcode);String pknull;JSONObject backinfojsonnew JSONObject();BaseDAO bd new BaseDAO();if (vbillcode null || .equals(vbillcode)){backinfojson.put(sendresult, vbillcode为空);backinfojson.put($successful, N);}else{SaleOutHeadVO saleOutHeadVO new SaleOutHeadVO();try {String sqlselect * from ic_saleout_h where vbillcode vbillcode and dr0 and fbillflag 1 ;saleOutHeadVO (SaleOutHeadVO) bd.executeQuery(sql, new BeanProcessor(SaleOutHeadVO.class));} catch (Exception e1) {e1.printStackTrace();}if (saleOutHeadVO ! null){pksaleOutHeadVO.getAttributeValue(cgeneralhid).toString();if(pk null || .equals(pk)){backinfojson.put(sendresult, 查询不到单据);backinfojson.put($successful, N);}else{//单据状态if(saleOutHeadVO.getAttributeValue(fbillflag).toString().equals(2) || saleOutHeadVO.getAttributeValue(fbillflag).toString().equals(6)){//orderHeaderVO.setAttributeValue(dr, 1);saleOutHeadVO.setFbillflag(1);try {bd.updateVO(saleOutHeadVO);} catch (Exception e) {e.printStackTrace();}ListSaleOutBodyVO orderItemVOListnew ArrayListSaleOutBodyVO();try {String sqlselect * from ic_generalout_b where cgeneralhid pk and dr0 and fbillflag 1 ;orderItemVOList(ListSaleOutBodyVO) bd.executeQuery(sql, new BeanListProcessor(SaleOutBodyVO.class));} catch (Exception e) {// TODO Auto-generated catch blocke.printStackTrace();}for (int i0;iorderItemVOList.size();i){orderItemVOList.get(i).setAttributeValue(dr, 1);}try {bd.updateVOList(orderItemVOList);} catch (Exception e) {// TODO Auto-generated catch blocke.printStackTrace();}backinfojson.put($successful, Y);backinfojson.put(sendresult, 单据删除成功);}else{backinfojson.put($successful, N);backinfojson.put(sendresult, 单据状态不允许删除);}}}}return backinfojson.toString();}/*** 查询* param operation* param orderform* return*/public String search(String operation,String orderform){JSONObject backinfojsonnew JSONObject();backinfojson.put($successful, N);backinfojson.put(sendresult, 未开放);return backinfojson.toString();}/*** 判断字符串是否为JsonObject {link org.json.JSONObject}* param jsonStr {link java.lang.String}* return boolean*/public static boolean isJsonObject(final String jsonStr) {if (StringUtils.isBlank(jsonStr)) return false;return Pattern.matches(^\\{.*\\}$, jsonStr.trim());}/*** 日期转换为字符串* param date 日期* param format 日期格式* return 字符串*/public static String getDateStr(Date date,String format) {if (null date) {return null;}SimpleDateFormat sdf new SimpleDateFormat(format);return sdf.format(date);}}
http://www.zqtcl.cn/news/979558/

相关文章:

  • 公司网站是别人做的如何换logo北京网站设计浩森宇特
  • 直播网站制作做阿里巴巴网站电话
  • 免费建一个自己的网站做国内网站花费
  • 苏州手机网站搭建郑州建设网站制作公司
  • 贵阳网站建设kuhugz沽源网站建设
  • 深圳网站seo推广河北建设工程信息网停用公告
  • 给公司建网站 深圳wordpress去掉cat
  • 网站建设推荐华网天下土巴兔装修平台怎么收费
  • 微网站 网页成品网站模块
  • soap公司网站wordpress 相关推荐
  • 浙江质监站网址固始网站建设公司
  • 济南 外贸网站建设怎么知道网站是哪个公司做的
  • 分享wordpress优秀主题东莞百度seo找谁
  • 顺德网站制作案例价位超兽vps群
  • 网站建设 搜狐号电脑赚钱的项目有哪些
  • 做生意的网站广州互联网企业100强
  • 网站单页支付宝支付怎么做网站制作公司套路
  • 本网站维护升级官方网站建设滞后
  • 网站上漂亮的甘特图是怎么做的江门seo方法
  • 局域网建设网站seo优化查询
  • 网站安装模板wordpress多个函数文件
  • 网站建设飠金手指排名十二毕业设计论文网
  • 高密哪里做网站好网络营销的四大特点
  • 网站锚文本怎么做怎么在网上接网站建设
  • php做公司网站中国大工程建设需要什么样的人才
  • 优化公司怎么优化网站的技能网站建设项目需求
  • wordpress怎么修改主页网站改版seo
  • 做视频网站需要多少带宽lnmp wordpress 数据库
  • 网站速度慢wordpress徐州网络推广公司
  • 网站建设增城seo外链是什么意思