⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 savepackingnote.jsp

📁 运输模块代码
💻 JSP
字号:
<%--
  Created by IntelliJ IDEA.
  User: jtgao
  Date: 2006-5-26
  Time: 11:57:45
  To change this template use File | Settings | File Templates.//
--%>
<%@ page contentType="text/html;charset=GBK" %>
<%@ page import="com.hexiesoft.utils.PrintAddPN" %>
<%@ include file="/IncludeBeginMD.jsp" %>

<%
    String strpnno = null;

    String spnno = DataConvert.toRealString(iPostChange, (String) CurPage.getParameter("Pnno"));
    String sgross = DataConvert.toRealString(iPostChange, (String) CurPage.getParameter("gross"));
    String scoils = DataConvert.toRealString(iPostChange, (String) CurPage.getParameter("coils"));
    String sstandno = DataConvert.toRealString(iPostChange, (String) CurPage.getParameter("standno"));
    String sinsertwgt = DataConvert.toRealString(iPostChange, (String) CurPage.getParameter("insertwgt"));
    String sctrno = DataConvert.toRealString(iPostChange, (String) CurPage.getParameter("ctrno"));
    String sctrwgt = DataConvert.toRealString(iPostChange, (String) CurPage.getParameter("ctrwgt"));
    String spaltno = DataConvert.toRealString(iPostChange, (String) CurPage.getParameter("paltno"));
    String spaltwgt = DataConvert.toRealString(iPostChange, (String) CurPage.getParameter("paltwgt"));
    String scaseno = DataConvert.toRealString(iPostChange, (String) CurPage.getParameter("scaseno"));
    //out.println(scaseno);
    String scasewgt = DataConvert.toRealString(iPostChange, (String) CurPage.getParameter("casewgt"));
    String sdividerwgt = DataConvert.toRealString(iPostChange, (String) CurPage.getParameter("dividerwgt"));


    String sUpdSql = "update packnote set gross='" + PrintAddPN.rep0(sgross)
            + "',coils= " + PrintAddPN.rep0(scoils)
            + ", standno='" +  sstandno
            + "', insertwgt=" + PrintAddPN.rep0(sinsertwgt)
            + ", standwgt=isnull(( select top 1 (standwgt) from stands where standno ='" +  sstandno + "'),0)"
            + ", ctrno='" +  sctrno
            + "', ctrwgt=" +  PrintAddPN.rep0(sctrwgt)
            + ", paltno='" +  spaltno
            + "', paltwgt='" +  PrintAddPN.rep0(spaltwgt)
            + "', caseno='" +  scaseno
            + "', casewgt='" +  PrintAddPN.rep0(scasewgt)
            + "', dividerwgt='" +  PrintAddPN.rep0(sdividerwgt)
            + "'  where pnno='" + spnno  + "'";

   //out.println(sUpdSql);


    String sUpdSql2= "update packnote set tare=standwgt+insertwgt+dividerwgt+ctrwgt+paltwgt+casewgt where pnno='" + spnno + "'";
    //out.println(sUpdSql2);
    String sUpdSql3= "update packnote set net = gross-tare where pnno='" + spnno + "'";
    //out.println(sUpdSql3);
	String sUpdSql4="update packnote set packnote.[name] = a.shname from customer a where packnote.account = a.account and packnote.subacct = a.subacct and packnote.pnno = '" + spnno + "'";
    //out.println(" select * from packnote where pnno ='" + spnno + "'");

   // try {
//        Sqlca.conn.setAutoCommit(false);
        Sqlca.executeSQL(sUpdSql);
     Sqlca.conn.commit();
        //out.println("2");
        Sqlca.executeSQL(sUpdSql2);
     Sqlca.conn.commit();
        //out.println("3");
        Sqlca.executeSQL(sUpdSql3);
     Sqlca.conn.commit();
        //out.println("4");
		Sqlca.executeSQL(sUpdSql4);
        strpnno = spnno;
       Sqlca.conn.commit();
   /* } catch (Exception e) {
        e.printStackTrace();
        Sqlca.conn.rollback();
        out.println(e.toString());
        strpnno = null;
   }*/
    //finally{
     //   Sqlca.conn.setAutoCommit(true);
   // }


    //out.println(strpnno);

    //isEmpty = !rs.next();
%>
<script language=javascript>
    self.returnValue = "<%=strpnno%>";
    self.close();
</script>
<%@ include file="/IncludeEnd.jsp" %>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -