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

📄 stockmanagementdata.java

📁 一个使用java 写的进销存代码 使用了ejb 等技术 是学习j2ee的好
💻 JAVA
📖 第 1 页 / 共 4 页
字号:
      //根据地区取得记录
      detail = stockManagementData.getSuppliersBySupplierZone(supplierZone);
    }catch(Exception ex){
      ex.printStackTrace();
    }
    return detail;
  }
  //创建客户的方法
  public int createCustomer(String[] customerArray) {
     int result = 0;
     if(customerArray.length != 17){
       return result;
     }
     try {
       //创建客户
       result = stockManagementData.createCustomer(customerArray);
     }catch (Exception ex) {
       ex.printStackTrace();
     }
     return result;
  }
  //更新客户的方法
  public int updateCustomer(String[] customerArray) {
     int result = 0;
     if(customerArray.length != 17){
       return result;
     }
     try {
       //更新客户
       result = stockManagementData.updateCustomer(customerArray);
     }catch (Exception ex) {
       ex.printStackTrace();
     }
     return result;
  }
  //删除客户的方法
  public int deleteCustomer(String customerName) {
     int result = 0;
     try {
       result = stockManagementData.deleteCustomer(customerName);
     }catch (Exception ex) {
       ex.printStackTrace();
     }
     return result;
  }
  //根据客户名字取得记录的方法
  public String[][] getCustomersByCustomerName(String customerName){
    String[][] detail = new String[0][17];
    try{
      //根据客户名字取得记录
      detail = stockManagementData.getCustomersByCustomerName(customerName);
    }catch(Exception ex){
      ex.printStackTrace();
    }
    return detail;
  }
  //根据地区取得客户记录的方法
  public String[][] getCustomersByCustomerZone(String customerZone){
    String[][] detail = new String[0][17];
    try{
      //根据地区取得记录
      detail = stockManagementData.getCustomersByCustomerZone(customerZone);
    }catch(Exception ex){
      ex.printStackTrace();
    }
    return detail;
  }
  //取得信用客户的方法
  public String[][] getCreditCustomer() {
    String[][] detail = new String[0][17];
    try{
      //取得信用客户记录
      detail = stockManagementData.getCreditCustomer();
    }catch(Exception ex){
      ex.printStackTrace();
    }
    return detail;
  }
  //设置客户信用的方法
  public int setCreditCustomer(String customerName, double creditlimit) {
    int result = 0;
    try {
      //设置客户的信用
      result = stockManagementData.setCreditCustomer(customerName, creditlimit);
    }catch (Exception ex) {
      ex.printStackTrace();
    }
    return result;
  }
  //创建仓库
  public int createWarehouse(String[] warehouseArray) {
    int result = 0;
    if(warehouseArray.length != 4){
      return result;
    }
    try {
      //创建仓库
      result = stockManagementData.createWarehouse(warehouseArray);
    }catch (Exception ex) {
      ex.printStackTrace();
    }
    return result;
  }
  //更新仓库
  public int updateWarehouse(String[] warehouseArray) {
    int result = 0;
    if(warehouseArray.length != 4){
      return result;
    }
    try {
      //更新仓库
      result = stockManagementData.updateWarehouse(warehouseArray);
    }catch (Exception ex) {
      ex.printStackTrace();
    }
    return result;
  }
  //删除仓库
  public int deleteWarehouse(String warehouseName) {
    int result = 0;
    try {
      result = stockManagementData.deleteWarehouse(warehouseName);
    }catch (Exception ex) {
      ex.printStackTrace();
    }
    return result;
  }
  //取得所有仓库
  public String[][] getAllWarehouse() {
    String[][] detail = new String[0][4];
    try{
      //取得所有仓库记录
      detail = stockManagementData.getAllWarehouse();
    }catch(Exception ex){
      ex.printStackTrace();
    }
    return detail;
  }
  //创建会计科目
  public int createAccountName(int parentId, String accountNameStr) {
    int result = 0;
    try {
      result = stockManagementData.createAccountName(parentId, accountNameStr);
    }catch (Exception ex) {
      ex.printStackTrace();
    }
    return result;
  }
  //更新会计科目
  public int updateAccountName(int accountId, int parentId, String accountName) {
    int result = 0;
    try {
      result = stockManagementData.updateAccountName(accountId, parentId, accountName);
    }catch (Exception ex) {
      ex.printStackTrace();
    }
    return result;
  }
  //删除会计科目
  public int deleteAccountName(int accountId) {
    int result = 0;
    try {
      result = stockManagementData.deleteAccountName(accountId);
    }catch (Exception ex) {
      ex.printStackTrace();
    }
    return result;
  }
  //根据父标识取得会计科目
  public String[][] getAccountNameByParentid(int parentId) {
    String[][] detail = new String[0][3];
    try{
      detail = stockManagementData.getAccountNameByParentid(parentId);
    }catch(Exception ex){
      ex.printStackTrace();
    }
    return detail;
  }
  //取得所有会计科目
  public String[][] getAllAccountName() {
    String[][] detail = new String[0][3];
    try{
      detail = stockManagementData.getAllAccountName();
    }catch(Exception ex){
      ex.printStackTrace();
    }
    return detail;
  }
  //取得科目余额的方法
  public String[][] getAccountBalance(String ledgerDate, int onProcess) {
    String[][] data = new String[0][3];
    try {
     data = stockManagementData.getAccountBalance(ledgerDate, onProcess);
    }
    catch (Exception ex) {
      ex.printStackTrace();
    }
    return data;
  }
  //根据操作程序名字取得日志记录的方法
  public String[][] getUserLogByProgramName(String programName) {
    String[][] detail = new String[0][5];
    try{
      detail = stockManagementData.getUserLogByProgramName(programName);
    }catch(Exception ex){
      ex.printStackTrace();
    }
    return detail;
  }
  //根据操作内容取得日志记录的方法
  public String[][] getUserLogByOperationContent(String operationContent) {
    String[][] detail = new String[0][5];
    try{
      detail = stockManagementData.getUserLogByOperationContent(operationContent);
    }catch(Exception ex){
      ex.printStackTrace();
    }
    return detail;
  }
  //根据用户名字取得日志记录的方法
  public String[][] getUserLogByUserName(String userName) {
    String[][] detail = new String[0][5];
    try{
      detail = stockManagementData.getUserLogByUserName(userName);
    }catch(Exception ex){
      ex.printStackTrace();
    }
    return detail;
  }
  //根据操作时间取得日志记录的方法
  public String[][] getUserLogByOperationDate(java.sql.Timestamp startDate,
                                              java.sql.Timestamp endDate) {
    String[][] detail = new String[0][5];
    try{
      detail = stockManagementData.getUserLogByOperationDate(startDate, endDate);
    }catch(Exception ex){
      ex.printStackTrace();
    }
    return detail;
  }
  //根据单据编号或者请购员名字或者仓库名字取得库存账套数据表记录的方法
  public String[][] getStockLedgerByStringField(String ledgerDate,
                                                String fieldName,
                                                String fieldValue,
                                                int orderType) {
    String[][] data = new String[0][13];
    try {
      data = stockManagementData.getStockLedgerByStringField(ledgerDate,
          fieldName, fieldValue, orderType);
    }catch (Exception ex) {
      ex.printStackTrace();
    }
    return data;
  }
  //根据订单日期取得库存账套数据表记录的方法
  public String[][] getStockLedgerByOrderDate(String ledgerDate,
                                              java.sql.Timestamp startDate,
                                              java.sql.Timestamp endDate,
                                              int orderType) {
    String[][] data = new String[0][13];
    try {
      data = stockManagementData.getStockLedgerByOrderDate(ledgerDate,
          startDate, endDate, orderType);
    } catch (Exception ex) {
      ex.printStackTrace();
    }
    return data;
  }
  //根据单据编号取得库存账套明细数据表的记录
  public String[][] getStockSubLedgerByOrderId(String ledgerDate,
                                               String orderId) {
    String[][] data = new String[0][6];
    try {
      data = stockManagementData.getStockSubLedgerByOrderId(ledgerDate, orderId);
    }catch (Exception ex) {
      ex.printStackTrace();
    }
    return data;
  }
  //创建库存账套数据表和库存账套明细数据表记录的方法
  public int createStockLedgerAndSub(String ledgerDate, String[] stockLedger,
                                     String[][] stockSubLedger) {
    int result = 0;
    try{
      result = stockManagementData.createStockLedgerAndSub(ledgerDate,
          stockLedger, stockSubLedger);
    }catch(Exception ex){
      ex.printStackTrace();
    }
    return result;
  }
  //更新库存账套数据表和库存账套明细数据表记录的方法
  public int updateStockLedgerAndSub(String ledgerDate, String[] stockLedger,
                                     String[][] stockSubLedger) {
    int result = 0;
    try{
      result = stockManagementData.updateStockLedgerAndSub(ledgerDate,
          stockLedger, stockSubLedger);
    }catch(Exception ex){
      ex.printStackTrace();
    }
    return result;
  }
  //撤消库存账套数据表记录的方法
  public int cancelStockLedgerAndSub(String ledgerDate, String orderId,
                                     String remark) {
    int result = 0;
    try{
      result = stockManagementData.cancelStockLedgerAndSub(ledgerDate, orderId, remark);
    }catch(Exception ex){
      ex.printStackTrace();
    }
    return result;
  }
  //检查供应商的方法
  public int checkSupplier(String supplier){
    int result = 0;
    String[][] detail = this.getSuppliersBySupplierName(supplier);
    for(int i = 0; i < detail.length; i++){
      if(detail[i][0].equals(supplier)){
        result = 1;
        break;
      }
    }
    return result;
  }
  //检查仓库的方法
  public int checkWarehouse(String warehouse){
    int result = 0;
    String[][] detail = this.getAllWarehouse();
    for(int i = 0; i < detail.length; i++){
      if(detail[i][0].equals(warehouse)){
        result = 1;
        break;
      }
    }
    return result;
  }
  //检查商品条形码的方法
  public int checkGoodsBarCode(String goodsBarCode){
    int result = 0;
    String[][] detail = this.getGoodsByGoodsBarCode(goodsBarCode);
    for(int i = 0; i < detail.length; i++){
      if(detail[i][0].equals(goodsBarCode)){
        result = 1;
        break;
      }
    }
    return result;
  }
  //检查打开账套是否最新账套的方法
  public int isCurrentLedger(String ledgerDate){
    int result = 0;
    String[] ledgerDates = this.getLedgerNames();
    if(ledgerDates.length > 0){
      if(ledgerDates[ledgerDates.length -1].equals(ledgerDate)){
        result = 1;
      }
    }
    return result;
  }
  //恢复库存账套数据表完成状态的方法
  public int restoreStockLedgerAndSub(String ledgerDate, String orderId,
                                      String remark) {
    int result = 0;
    try {
      result = stockManagementData.restoreStockLedgerAndSub(ledgerDate, orderId,
          remark);
    }catch (Exception ex) {
      ex.printStackTrace();
    }
    return result;
  }
  //库存账套数据表电子签名的方法
  public int signStockLedgerAndSub(String ledgerDate, String fieldName, String userName,
                                   String orderId, String remark) {
    int result = 0;
    try {
      result = stockManagementData.signStockLedgerAndSub(ledgerDate, fieldName,
          userName, orderId, remark);
    }catch (Exception ex) {
      ex.printStackTrace();
    }
    return result;
  }
  //根据完成状态取得库存账套数据表的记录
  public String[][] getStockLedgerByOnProcess(String ledgerDate, int orderType,
                                              int onProcess) {
    String[][] data = new String[0][13];
    try {
      data = stockManagementData.getStockLedgerByOnProcess(ledgerDate,
          orderType, onProcess);
    }catch (Exception ex) {
      ex.printStackTrace();
    }
    return data;
  }

⌨️ 快捷键说明

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