📄 exsheetbean.java
字号:
public double getCostAmo() { return this.costAmo; } public void setCostAmo(String sV) { if (sV != null && !"".equals(sV)) { this.costAmo = Double.parseDouble(sV); } } public void setCostAmo(double fV) { this.costAmo = fV; } public double getDiscount() { return this.discount; } public void setDiscount(String sV) { if (sV != null && !"".equals(sV)) { this.discount = Double.parseDouble(sV); } } public void setDiscount(double fV) { this.discount = fV; } public double getRealAmo() { return this.realAmo; } public void setRealAmo(String sV) { if (sV != null && !"".equals(sV)) { this.realAmo = Double.parseDouble(sV); } } public void setRealAmo(double fV) { this.realAmo = fV; } public double getPayAmo() { return this.payAmo; } public void setPayAmo(String sV) { if (sV != null && !"".equals(sV)) { this.payAmo = Double.parseDouble(sV); } } public void setPayAmo(double fV) { this.payAmo = fV; } public double getPreAmo() { return this.preAmo; } public void setPreAmo(String sV) { if (sV != null && !"".equals(sV)) { this.preAmo = Double.parseDouble(sV); } } public void setPreAmo(double fV) { this.preAmo = fV; } public String getLogID() { return this.logID; } public void setLogID(String sV) { if (sV != null) { this.logID = sV; } } public String getFillSheetID() { return this.fillSheetID; } public void setFillSheetID(String sV) { if (sV != null) { this.fillSheetID = sV; } } public String getRemark() { return this.remark; } public void setRemark(String sV) { if (sV != null) { this.remark = sV; } } public double getHaveCheck() { return this.haveCheck; } public void setHaveCheck(double sV) { this.haveCheck = sV; } public void setHaveCheck(String sV) { if (sV != null && !"".equals(sV)) { this.discount = Double.parseDouble(sV); } } public int getUserName() { return this.userName; } public void setUserName(String sV) { if (sV != null && !"".equals(sV)) { this.userName = Integer.parseInt(sV); } } public void setUserName(int nV) { this.userName = nV; } public String getUserTel() { return this.userTel; } public void setUserTel(String sV) { if (sV != null) { this.userTel = sV; } } public String getUserAddress() { return this.userAddress; } public void setUserAddress(String sV) { if (sV != null) { this.userAddress = sV; } } public int getApplyState() { return this.applyState; } public void setApplyState(String sV) { if (sV != null && !"".equals(sV)) { this.applyState = Integer.parseInt(sV); } } public void setApplyState(int nV) { this.applyState = nV; } public String getRecDate() { return this.recDate; } public void setRecDate(String sV) { if (sV != null) { this.recDate = sV; } } public boolean getIsChecked() { return this.isChecked; } public void setIsChecked(String b) { if (b == null) { return; } if ("1".equals(b)) { this.isChecked = true; } else { this.isChecked = false; } } public void setIsChecked(boolean b) { this.isChecked = b; } public String getOpTime() { return this.opTime; } public void setOpTime(String sV) { if (sV != null) { this.opTime = sV; } } private String backRemark = ""; private String checkRemark = ""; private String noteSheetCode = ""; private String notifySheetCode = ""; private String orderMySheetCode = ""; private int sheetPriceType = 0; private String sheetOrderType = ""; public String getBackRemark() { return this.backRemark; } public void setBackRemark(String sV) { if (sV != null) { this.backRemark = sV; } } public String getCheckRemark() { return this.checkRemark; } public void setCheckRemark(String sV) { if (sV != null) { this.checkRemark = sV; } } public String getNoteSheetCode() { return this.noteSheetCode; } public void setNoteSheetCode(String sV) { if (sV != null) { this.noteSheetCode = sV; } } public String getNotifySheetCode() { return this.notifySheetCode; } public void setNotifySheetCode(String sV) { if (sV != null) { this.notifySheetCode = sV; } } public String getOrderMySheetCode() { return this.orderMySheetCode; } public void setOrderMySheetCode(String sV) { if (sV != null) { this.orderMySheetCode = sV; } } public int getSheetPriceType() { return this.sheetPriceType; } public void setSheetPriceType(String sV) { if (sV != null && !"".equals(sV)) { this.sheetPriceType = Integer.parseInt(sV); } } public void setSheetPriceType(int nV) { this.sheetPriceType = nV; } public String getSheetOrderType() { return this.sheetOrderType; } public void setSheetOrderType(String sV) { if (sV != null && !"".equals(sV)) { this.sheetOrderType = sV; } } public boolean getIsRec() { return this.isRec; } public void setIsRec(String b) { if (b == null) { return; } if ("1".equals(b)) { this.isRec = true; } else { this.isRec = false; } } public void setIsRec(boolean b) { this.isRec = b; } public double getRecAmo() { return this.recAmo; } public void setRecAmo(String sV) { if (sV != null && !"".equals(sV)) { this.recAmo = Double.parseDouble(sV); } } public void setRecAmo(double nV) { this.recAmo = nV; } public double getMsAmo() { return this.msAmo; } public void setMsAmo(String sV) { if (sV != null && !"".equals(sV)) { this.msAmo = Double.parseDouble(sV); } } public void setMsAmo(double nV) { this.msAmo = nV; } public boolean insert() { Connection conn = null; PreparedStatement pstmt = null; ResultSet rs = null; try { DatabaseConnection dc = new DatabaseConnection(jndiName); conn = dc.getConnection(); String sql = "insert into exSheet(exSheetCode,computer,operator,createDate,opTime) values (?,?,?,?,getDate())"; pstmt = conn.prepareStatement(sql); pstmt.setString(1, this.exSheetCode); pstmt.setInt(2, this.computer); pstmt.setInt(3, this.operator); pstmt.setString(4, this.createDate); pstmt.execute(); return true; } catch (Exception ex) { new WriteLog(jndiName, 0, 10000, "core", "kernel", "database", this .getClass().getName() + ": " + ex.getMessage(), true, 0); return false; } finally { try { if (rs != null) { rs.close(); } if (pstmt != null) { pstmt.close(); } if (conn != null) { conn.close(); } } catch (Exception ex) { } } } public boolean modify() { Connection conn = null; PreparedStatement pstmt = null; ResultSet rs = null; try { DatabaseConnection dc = new DatabaseConnection(jndiName); conn = dc.getConnection(); String sql = "update exSheet set exSheetCode=?,computer=?,operator=?,compID=?,type=?,redBlue=?,isFill=?,isReg=?,isRegLed=?,isAcc=?,isEnd=?,isPosRec=?,isExt=?,isExtAcc=?,isBack=?,isVou=?,createDate=?,accDate=?,regDate=?,arrDate=?,emplID=?,depID=?,brandID=?,regName=?,auditingName=?,marketName=?,finName=?,custID=?,warehouseCode=?,currency=?,cRate=?,orderID=?,invoNo=?,invoVer=?,qua=?,amo=?,costAmo=?,discount=?,realAmo=?,payAmo=?,preAmo=?,logID=?,fillSheetID=?,remark=?,haveCheck=?,userTel=?,userAddress=?,applyState=?,recDate=?,isChecked=?,opTime=getDate(),userName=?,settleID=?,backRemark=?,checkRemark=?,noteSheetCode=?,notifySheetCode=?,orderMySheetCode=?,sheetPriceType=?,sheetOrderType=?,isRec=?,recAmo=?,msAmo=? where exSheetCode=?"; pstmt = conn.prepareStatement(sql); pstmt.setString(1, this.exSheetCode); pstmt.setInt(2, this.computer); pstmt.setInt(3, this.operator); pstmt.setInt(4, this.compID); pstmt.setInt(5, this.type); pstmt.setBoolean(6, this.redBlue); pstmt.setBoolean(7, this.isFill); pstmt.setBoolean(8, this.isReg); pstmt.setBoolean(9, this.isRegLed); pstmt.setBoolean(10, this.isAcc); pstmt.setBoolean(11, this.isEnd); pstmt.setBoolean(12, this.isPosRec); pstmt.setBoolean(13, this.isExt); pstmt.setBoolean(14, this.isExtAcc); pstmt.setBoolean(15, this.isBack); pstmt.setBoolean(16, this.isVou); pstmt.setString(17, this.createDate); pstmt.setString(18, this.accDate); pstmt.setString(19, this.regDate); pstmt.setString(20, this.arrDate); pstmt.setInt(21, this.emplID); pstmt.setString(22, this.depID); pstmt.setInt(23, this.brandID); pstmt.setDouble(24, this.regName); pstmt.setString(25, this.auditingName); pstmt.setDouble(26, this.marketName); pstmt.setString(27, this.finName); pstmt.setInt(28, this.custID); pstmt.setInt(29, this.warehouseCode); pstmt.setString(30, this.currency); pstmt.setDouble(31, this.cRate); pstmt.setString(32, this.orderID); pstmt.setString(33, this.invoNo); pstmt.setString(34, this.invoVer); pstmt.setDouble(35, this.qua); pstmt.setDouble(36, this.amo); pstmt.setDouble(37, this.costAmo); pstmt.setDouble(38, this.discount); pstmt.setDouble(39, this.realAmo); pstmt.setDouble(40, this.payAmo); pstmt.setDouble(41, this.preAmo); pstmt.setString(42, this.logID); pstmt.setString(43, this.fillSheetID); pstmt.setString(44, this.remark); pstmt.setDouble(45, this.haveCheck); pstmt.setString(46, this.userTel); pstmt.setString(47, this.userAddress); pstmt.setInt(48, this.applyState); pstmt.setString(49, this.recDate); pstmt.setBoolean(50, this.isChecked); pstmt.setInt(51, this.userName); if (this.settleID != 0) { pstmt.setInt(52, this.settleID); } else { pstmt.setNull(52, java.sql.Types.INTEGER); } pstmt.setString(53, this.getBackRemark()); if (this.getIsChecked()) { pstmt.setString(54, this.getCheckRemark()); } else { pstmt.setString(54, ""); } pstmt.setString(55, this.getNoteSheetCode()); pstmt.setString(56, this.getNotifySheetCode()); pstmt.setString(57, this.getOrderMySheetCode()); pstmt.setInt(58, this.getSheetPriceType()); pstmt.setString(59, this.getSheetOrderType()); pstmt.setBoolean(60, this.isRec); pstmt.setDouble(61, this.recAmo); pstmt.setDouble(62, this.msAmo); pstmt.setString(63, this.exSheetCode); pstmt.execute(); return true; } catch (Exception ex) { new WriteLog(jndiName, 0, 10000, "core", "kernel", "database", this .getClass().getName() + ": " + ex.getMessage(), true, 0); return false; } finally { try { if (rs != null) { rs.close(); } if (pstmt != null) { pstmt.close(); } if (conn != null) { conn.close(); } } catch (Exception ex) { } } } public boolean content() { Connection conn = null; PreparedStatement pstmt = null; ResultSet rs = null; try { DatabaseConnection dc = new DatabaseConnection(jndiName); conn = dc.getConnection(); String sql = "select * from exSheet where exSheetCode=?"; pstmt = conn.prepareStatement(sql); pstmt.setString(1, this.exSheetCode); rs = pstmt.executeQuery(); while (rs.next()) { setExSheetCode(rs.getString("exSheetCode")); setComputer(rs.getInt("computer")); setOperator(rs.getInt("operator")); setCompID(rs.getInt("compID")); setType(rs.getInt("type")); setRedBlue(rs.getBoolean("redBlue")); setIsFill(rs.getBoolean("isFill")); setIsReg(rs.getBoolean("isReg")); setIsRegLed(rs.getBoolean("isRegLed")); setIsAcc(rs.getBoolean("isAcc")); setIsEnd(rs.getBoolean("isEnd")); setIsPosRec(rs.getBoolean("isPosRec")); setIsExt(rs.getBoolean("isExt")); setIsExtAcc(rs.getBoolean("isExtAcc")); setIsBack(rs.getBoolean("isBack")); setIsVou(rs.getBoolean("isVou")); setCreateDate(rs.getString("createDate")); setAccDate(rs.getString("accDate")); setRegDate(rs.getString("regDate")); setArrDate(rs.getString("arrDate")); setEmplID(rs.getInt("emplID")); setDepID(rs.getString("depID")); setBrandID(rs.getInt("brandID")); setRegName(rs.getDouble("regName")); setAuditingName(rs.getString("auditingName")); setMarketName(rs.getDouble("marketName")); setFinName(rs.getString("finName")); setCustID(rs.getInt("custID")); setWarehouseCode(rs.getInt("warehouseCode")); setCurrency(rs.getString("currency")); setCRate(rs.getDouble("cRate")); setOrderID(rs.getString("orderID")); setInvoNo(rs.getString("invoNo")); setInvoVer(rs.getString("invoVer")); setQua(rs.getDouble("qua")); setAmo(rs.getDouble("amo")); setCostAmo(rs.getDouble("costAmo")); setDiscount(rs.getDouble("discount")); setRealAmo(rs.getDouble("realAmo")); setPayAmo(rs.getDouble("payAmo")); setPreAmo(rs.getDouble("preAmo")); setLogID(rs.getString("logID")); setFillSheetID(rs.getString("fillSheetID")); setRemark(rs.getString("remark")); setHaveCheck(rs.getDouble("haveCheck")); setUserName(rs.getInt("userName")); setUserTel(rs.getString("userTel")); setUserAddress(rs.getString("userAddress")); setApplyState(rs.getInt("applyState")); setRecDate(rs.getString("recDate")); setIsChecked(rs.getBoolean("isChecked")); setOpTime(rs.getString("opTime")); setBackRemark(rs.getString("backRemark")); setCheckRemark(rs.getString("checkRemark")); setNoteSheetCode(rs.getString("noteSheetCode")); setNotifySheetCode(rs.getString("notifySheetCode")); setOrderMySheetCode(rs.getString("orderMySheetCode")); setSheetPriceType(rs.getInt("sheetPriceType")); setSheetOrderType(rs.getString("sheetOrderType")); setIsRec(rs.getBoolean("isRec")); setRecAmo(rs.getDouble("recAmo")); setMsAmo(rs.getDouble("msAmo")); setSettleID(rs.getInt("settleID")); return true; } return false; } catch (Exception ex) { new WriteLog(jndiName, 0, 10000, "core", "kernel", "database", this .getClass().getName() + ": " + ex.getMessage(), true, 0); return false; } finally { try { if (rs != null) { rs.close(); } if (pstmt != null) { pstmt.close(); } if (conn != null) { conn.close(); } } catch (Exception ex) { } } } public boolean isExistsByCode() { Connection conn = null; PreparedStatement pstmt = null; ResultSet rs = null; try { DatabaseConnection dc = new DatabaseConnection(jndiName); conn = dc.getConnection(); String sql = "select * from exSheet where exSheetCode=?"; pstmt = conn.prepareStatement(sql); pstmt.setString(1, this.exSheetCode); rs = pstmt.executeQuery(); while (rs.next()) { return true; } return false; } catch (Exception ex) { new WriteLog(jndiName, 0, 10000, "core", "kernel", "database", this .getClass().getName() + ": " + ex.getMessage(), true, 0); return false; } finally { try { if (rs != null) { rs.close(); } if (pstmt != null) { pstmt.close(); } if (conn != null) { conn.close(); } } catch (Exception ex) { } } } public boolean delete() { Connection conn = null; PreparedStatement pstmt = null; ResultSet rs = null; try { DatabaseConnection dc = new DatabaseConnection(jndiName); conn = dc.getConnection(); String sql = "delete from exSheet where exSheetCode=?"; pstmt = conn.prepareStatement(sql); pstmt.setString(1, this.exSheetCode); pstmt.execute(); return true; } catch (Exception ex) { new WriteLog(jndiName, 0, 10000, "core", "kernel", "database", this .getClass().getName() + ": " + ex.getMessage(), true, 0); return false; } finally { try { if (rs != null) { rs.close(); } if (pstmt != null) { pstmt.close(); } if (conn != null) { conn.close(); } } catch (Exception ex) { } } } public Object clone() { ExSheetModel ex = null; try { ex = (ExSheetModel) super.clone(); } catch (CloneNotSupportedException e) { e.printStackTrace(); } return ex; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -