📄 drpmonthitemsbean.java
字号:
public double getOutAmoO() { return this.outAmoO; } public void setOutAmoO(String sV) { if (sV != null && !"".equals(sV)) { this.outAmoO = Double.parseDouble(sV); } } public void setOutAmoO(double nV) { this.outAmoO = nV; } public double getOutPriceO() { return this.outPriceO; } public void setOutPriceO(String sV) { if (sV != null && !"".equals(sV)) { this.outPriceO = Double.parseDouble(sV); } } public void setOutPriceO(double nV) { this.outPriceO = nV; } public int getInitQua() { return this.initQua; } public void setInitQua(String sV) { if (sV != null && !"".equals(sV)) { this.initQua = Integer.parseInt(sV); } } public void setInitQua(int nV) { this.initQua = nV; } public double getInitAmo() { return this.initAmo; } public void setInitAmo(String sV) { if (sV != null && !"".equals(sV)) { this.initAmo = Double.parseDouble(sV); } } public void setInitAmo(double nV) { this.initAmo = nV; } public double getInitPrice() { return this.initPrice; } public void setInitPrice(String sV) { if (sV != null && !"".equals(sV)) { this.initPrice = Double.parseDouble(sV); } } public void setInitPrice(double nV) { this.initPrice = nV; } public int getInvQua() { return this.invQua; } public void setInvQua(String sV) { if (sV != null && !"".equals(sV)) { this.invQua = Integer.parseInt(sV); } } public void setInvQua(int nV) { this.invQua = nV; } public double getInvAmo() { return this.invAmo; } public void setInvAmo(String sV) { if (sV != null && !"".equals(sV)) { this.invAmo = Double.parseDouble(sV); } } public void setInvAmo(double nV) { this.invAmo = nV; } public int getExamQua() { return this.examQua; } public void setExamQua(String sV) { if (sV != null && !"".equals(sV)) { this.examQua = Integer.parseInt(sV); } } public void setExamQua(int nV) { this.examQua = nV; } public int getOther() { return this.other; } public void setOther(String sV) { if (sV != null && !"".equals(sV)) { this.other = Integer.parseInt(sV); } } public void setOther(int nV) { this.other = nV; } public String getRemark() { return this.remark; } public void setRemark(String sV) { if (sV != null) { this.remark = sV; } } public double getShortAmo() { return this.shortAmo; } public void setShortAmo(String sV) { if (sV != null && !"".equals(sV)) { this.shortAmo = Double.parseDouble(sV); } } public void setShortAmo(double nV) { this.shortAmo = nV; } public double getShortPrice() { return this.shortPrice; } public void setShortPrice(String sV) { if (sV != null && !"".equals(sV)) { this.shortPrice = Double.parseDouble(sV); } } public void setShortPrice(double nV) { this.shortPrice = nV; } public int getShortQua() { return this.shortQua; } public void setShortQua(String sV) { if (sV != null && !"".equals(sV)) { this.shortQua = Integer.parseInt(sV); } } public void setShortQua(int nV) { this.shortQua = nV; } public boolean getStatus() { return this.status; } public void setStatus(String b) { if (b == null) { return; } if ("1".equals(b)) { this.status = true; } else { this.status = false; } } public void setStatus(boolean b) { this.status = b; } public String getProduceSheetCode() { return this.produceSheetCode; } public void setProduceSheetCode(String sV) { if (sV != null) { this.produceSheetCode = sV; } } public int getGoodsID() { return this.goodsID; } public void setGoodsID(String sV) { if (sV != null && !"".equals(sV)) { this.goodsID = Integer.parseInt(sV); } } public void setGoodsID(int nV) { this.goodsID = nV; } public String getOpTime() { return this.opTime; } public void setOpTime(String sV) { if (sV != null) { this.opTime = sV; } } 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 drpMonthItems(drpMonthItemsCode,drpMonthCode,sYear,sMonth,custID,custNo,custName,prevShortAmo,prevShortPrice,prevShortQua,inQuaB,inAmoB,inPriceB,inQuaH,inAmoH,inPriceH,inQuaT,inAmoT,inPriceT,inQuaO,inAmoO,inPriceO,outQuaB,outAmoB,outPriceB,outQuaH,outAmoH,outPriceH,outQuaT,outAmoT,outPriceT,outQuaO,outAmoO,outPriceO,initQua,initAmo,initPrice,invQua,invAmo,examQua,other,remark,shortAmo,shortPrice,shortQua,status,produceSheetCode,goodsID,opTime) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; pstmt = conn.prepareStatement(sql); pstmt.setInt(1, this.drpMonthItemsCode); pstmt.setString(2, this.drpMonthCode); pstmt.setDouble(3, this.sYear); pstmt.setDouble(4, this.sMonth); pstmt.setInt(5, this.custID); pstmt.setString(6, this.custNo); pstmt.setString(7, this.custName); pstmt.setDouble(8, this.prevShortAmo); pstmt.setDouble(9, this.prevShortPrice); pstmt.setInt(10, this.prevShortQua); pstmt.setInt(11, this.inQuaB); pstmt.setDouble(12, this.inAmoB); pstmt.setDouble(13, this.inPriceB); pstmt.setInt(14, this.inQuaH); pstmt.setDouble(15, this.inAmoH); pstmt.setDouble(16, this.inPriceH); pstmt.setInt(17, this.inQuaT); pstmt.setDouble(18, this.inAmoT); pstmt.setDouble(19, this.inPriceT); pstmt.setInt(20, this.inQuaO); pstmt.setDouble(21, this.inAmoO); pstmt.setDouble(22, this.inPriceO); pstmt.setInt(23, this.outQuaB); pstmt.setDouble(24, this.outAmoB); pstmt.setDouble(25, this.outPriceB); pstmt.setInt(26, this.outQuaH); pstmt.setDouble(27, this.outAmoH); pstmt.setDouble(28, this.outPriceH); pstmt.setInt(29, this.outQuaT); pstmt.setDouble(30, this.outAmoT); pstmt.setDouble(31, this.outPriceT); pstmt.setInt(32, this.outQuaO); pstmt.setDouble(33, this.outAmoO); pstmt.setDouble(34, this.outPriceO); pstmt.setInt(35, this.initQua); pstmt.setDouble(36, this.initAmo); pstmt.setDouble(37, this.initPrice); pstmt.setInt(38, this.invQua); pstmt.setDouble(39, this.invAmo); pstmt.setInt(40, this.examQua); pstmt.setInt(41, this.other); pstmt.setString(42, this.remark); pstmt.setDouble(43, this.shortAmo); pstmt.setDouble(44, this.shortPrice); pstmt.setInt(45, this.shortQua); pstmt.setBoolean(46, this.status); pstmt.setString(47, this.produceSheetCode); pstmt.setInt(48, this.goodsID); pstmt.setString(49, this.opTime); 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 drpMonthItems set drpMonthItemsCode=?,drpMonthCode=?,sYear=?,sMonth=?,custID=?,custNo=?,custName=?,prevShortAmo=?,prevShortPrice=?,prevShortQua=?,inQuaB=?,inAmoB=?,inPriceB=?,inQuaH=?,inAmoH=?,inPriceH=?,inQuaT=?,inAmoT=?,inPriceT=?,inQuaO=?,inAmoO=?,inPriceO=?,outQuaB=?,outAmoB=?,outPriceB=?,outQuaH=?,outAmoH=?,outPriceH=?,outQuaT=?,outAmoT=?,outPriceT=?,outQuaO=?,outAmoO=?,outPriceO=?,initQua=?,initAmo=?,initPrice=?,invQua=?,invAmo=?,examQua=?,other=?,remark=?,shortAmo=?,shortPrice=?,shortQua=?,status=?,produceSheetCode=?,goodsID=?,opTime=? where drpMonthItemsCode=?"; pstmt = conn.prepareStatement(sql); pstmt.setInt(1, this.drpMonthItemsCode); pstmt.setString(2, this.drpMonthCode); pstmt.setDouble(3, this.sYear); pstmt.setDouble(4, this.sMonth); pstmt.setInt(5, this.custID); pstmt.setString(6, this.custNo); pstmt.setString(7, this.custName); pstmt.setDouble(8, this.prevShortAmo); pstmt.setDouble(9, this.prevShortPrice); pstmt.setInt(10, this.prevShortQua); pstmt.setInt(11, this.inQuaB); pstmt.setDouble(12, this.inAmoB); pstmt.setDouble(13, this.inPriceB); pstmt.setInt(14, this.inQuaH); pstmt.setDouble(15, this.inAmoH); pstmt.setDouble(16, this.inPriceH); pstmt.setInt(17, this.inQuaT); pstmt.setDouble(18, this.inAmoT); pstmt.setDouble(19, this.inPriceT); pstmt.setInt(20, this.inQuaO); pstmt.setDouble(21, this.inAmoO); pstmt.setDouble(22, this.inPriceO); pstmt.setInt(23, this.outQuaB); pstmt.setDouble(24, this.outAmoB); pstmt.setDouble(25, this.outPriceB); pstmt.setInt(26, this.outQuaH); pstmt.setDouble(27, this.outAmoH); pstmt.setDouble(28, this.outPriceH); pstmt.setInt(29, this.outQuaT); pstmt.setDouble(30, this.outAmoT); pstmt.setDouble(31, this.outPriceT); pstmt.setInt(32, this.outQuaO); pstmt.setDouble(33, this.outAmoO); pstmt.setDouble(34, this.outPriceO); pstmt.setInt(35, this.initQua); pstmt.setDouble(36, this.initAmo); pstmt.setDouble(37, this.initPrice); pstmt.setInt(38, this.invQua); pstmt.setDouble(39, this.invAmo); pstmt.setInt(40, this.examQua); pstmt.setInt(41, this.other); pstmt.setString(42, this.remark); pstmt.setDouble(43, this.shortAmo); pstmt.setDouble(44, this.shortPrice); pstmt.setInt(45, this.shortQua); pstmt.setBoolean(46, this.status); pstmt.setString(47, this.produceSheetCode); pstmt.setInt(48, this.goodsID); pstmt.setString(49, this.opTime); pstmt.setInt(50, this.drpMonthItemsCode); 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 drpMonthItems where drpMonthItemsCode=?"; pstmt = conn.prepareStatement(sql); pstmt.setInt(1, this.drpMonthItemsCode); rs = pstmt.executeQuery(); while (rs.next()) { setDrpMonthItemsCode(rs.getInt("drpMonthItemsCode")); setDrpMonthCode(rs.getString("drpMonthCode")); setSYear(rs.getDouble("sYear")); setSMonth(rs.getDouble("sMonth")); setCustID(rs.getInt("custID")); setCustNo(rs.getString("custNo")); setCustName(rs.getString("custName")); setPrevShortAmo(rs.getDouble("prevShortAmo")); setPrevShortPrice(rs.getDouble("prevShortPrice")); setPrevShortQua(rs.getInt("prevShortQua")); setInQuaB(rs.getInt("inQuaB")); setInAmoB(rs.getDouble("inAmoB")); setInPriceB(rs.getDouble("inPriceB")); setInQuaH(rs.getInt("inQuaH")); setInAmoH(rs.getDouble("inAmoH")); setInPriceH(rs.getDouble("inPriceH")); setInQuaT(rs.getInt("inQuaT")); setInAmoT(rs.getDouble("inAmoT")); setInPriceT(rs.getDouble("inPriceT")); setInQuaO(rs.getInt("inQuaO")); setInAmoO(rs.getDouble("inAmoO")); setInPriceO(rs.getDouble("inPriceO")); setOutQuaB(rs.getInt("outQuaB")); setOutAmoB(rs.getDouble("outAmoB")); setOutPriceB(rs.getDouble("outPriceB")); setOutQuaH(rs.getInt("outQuaH")); setOutAmoH(rs.getDouble("outAmoH")); setOutPriceH(rs.getDouble("outPriceH")); setOutQuaT(rs.getInt("outQuaT")); setOutAmoT(rs.getDouble("outAmoT")); setOutPriceT(rs.getDouble("outPriceT")); setOutQuaO(rs.getInt("outQuaO")); setOutAmoO(rs.getDouble("outAmoO")); setOutPriceO(rs.getDouble("outPriceO")); setInitQua(rs.getInt("initQua")); setInitAmo(rs.getDouble("initAmo")); setInitPrice(rs.getDouble("initPrice")); setInvQua(rs.getInt("invQua")); setInvAmo(rs.getDouble("invAmo")); setExamQua(rs.getInt("examQua")); setOther(rs.getInt("other")); setRemark(rs.getString("remark")); setShortAmo(rs.getDouble("shortAmo")); setShortPrice(rs.getDouble("shortPrice")); setShortQua(rs.getInt("shortQua")); setStatus(rs.getBoolean("status")); setProduceSheetCode(rs.getString("produceSheetCode")); setGoodsID(rs.getInt("goodsID")); setOpTime(rs.getString("opTime")); 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 drpMonthItems where drpMonthItemsCode=?"; pstmt = conn.prepareStatement(sql); pstmt.setInt(1, this.drpMonthItemsCode); 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 drpMonthItems where drpMonthItemsCode=?"; pstmt = conn.prepareStatement(sql); pstmt.setInt(1, this.drpMonthItemsCode); 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() { DrpMonthItemsModel f = null; try { f = (DrpMonthItemsModel) super.clone(); } catch (CloneNotSupportedException e) { e.printStackTrace(); } return f; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -