?? stockmanagementdata.java
字號(hào):
//根據(jù)地區(qū)取得記錄
detail = stockManagementData.getSuppliersBySupplierZone(supplierZone);
}catch(Exception ex){
ex.printStackTrace();
}
return detail;
}
//創(chuàng)建客戶的方法
public int createCustomer(String[] customerArray) {
int result = 0;
if(customerArray.length != 17){
return result;
}
try {
//創(chuàng)建客戶
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;
}
//根據(jù)客戶名字取得記錄的方法
public String[][] getCustomersByCustomerName(String customerName){
String[][] detail = new String[0][17];
try{
//根據(jù)客戶名字取得記錄
detail = stockManagementData.getCustomersByCustomerName(customerName);
}catch(Exception ex){
ex.printStackTrace();
}
return detail;
}
//根據(jù)地區(qū)取得客戶記錄的方法
public String[][] getCustomersByCustomerZone(String customerZone){
String[][] detail = new String[0][17];
try{
//根據(jù)地區(qū)取得記錄
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;
}
//設(shè)置客戶信用的方法
public int setCreditCustomer(String customerName, double creditlimit) {
int result = 0;
try {
//設(shè)置客戶的信用
result = stockManagementData.setCreditCustomer(customerName, creditlimit);
}catch (Exception ex) {
ex.printStackTrace();
}
return result;
}
//創(chuàng)建倉(cāng)庫(kù)
public int createWarehouse(String[] warehouseArray) {
int result = 0;
if(warehouseArray.length != 4){
return result;
}
try {
//創(chuàng)建倉(cāng)庫(kù)
result = stockManagementData.createWarehouse(warehouseArray);
}catch (Exception ex) {
ex.printStackTrace();
}
return result;
}
//更新倉(cāng)庫(kù)
public int updateWarehouse(String[] warehouseArray) {
int result = 0;
if(warehouseArray.length != 4){
return result;
}
try {
//更新倉(cāng)庫(kù)
result = stockManagementData.updateWarehouse(warehouseArray);
}catch (Exception ex) {
ex.printStackTrace();
}
return result;
}
//刪除倉(cāng)庫(kù)
public int deleteWarehouse(String warehouseName) {
int result = 0;
try {
result = stockManagementData.deleteWarehouse(warehouseName);
}catch (Exception ex) {
ex.printStackTrace();
}
return result;
}
//取得所有倉(cāng)庫(kù)
public String[][] getAllWarehouse() {
String[][] detail = new String[0][4];
try{
//取得所有倉(cāng)庫(kù)記錄
detail = stockManagementData.getAllWarehouse();
}catch(Exception ex){
ex.printStackTrace();
}
return detail;
}
//創(chuàng)建會(huì)計(jì)科目
public int createAccountName(int parentId, String accountNameStr) {
int result = 0;
try {
result = stockManagementData.createAccountName(parentId, accountNameStr);
}catch (Exception ex) {
ex.printStackTrace();
}
return result;
}
//更新會(huì)計(jì)科目
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;
}
//刪除會(huì)計(jì)科目
public int deleteAccountName(int accountId) {
int result = 0;
try {
result = stockManagementData.deleteAccountName(accountId);
}catch (Exception ex) {
ex.printStackTrace();
}
return result;
}
//根據(jù)父標(biāo)識(shí)取得會(huì)計(jì)科目
public String[][] getAccountNameByParentid(int parentId) {
String[][] detail = new String[0][3];
try{
detail = stockManagementData.getAccountNameByParentid(parentId);
}catch(Exception ex){
ex.printStackTrace();
}
return detail;
}
//取得所有會(huì)計(jì)科目
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;
}
//根據(jù)操作程序名字取得日志記錄的方法
public String[][] getUserLogByProgramName(String programName) {
String[][] detail = new String[0][5];
try{
detail = stockManagementData.getUserLogByProgramName(programName);
}catch(Exception ex){
ex.printStackTrace();
}
return detail;
}
//根據(jù)操作內(nèi)容取得日志記錄的方法
public String[][] getUserLogByOperationContent(String operationContent) {
String[][] detail = new String[0][5];
try{
detail = stockManagementData.getUserLogByOperationContent(operationContent);
}catch(Exception ex){
ex.printStackTrace();
}
return detail;
}
//根據(jù)用戶名字取得日志記錄的方法
public String[][] getUserLogByUserName(String userName) {
String[][] detail = new String[0][5];
try{
detail = stockManagementData.getUserLogByUserName(userName);
}catch(Exception ex){
ex.printStackTrace();
}
return detail;
}
//根據(jù)操作時(shí)間取得日志記錄的方法
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;
}
//根據(jù)單據(jù)編號(hào)或者請(qǐng)購(gòu)員名字或者倉(cāng)庫(kù)名字取得庫(kù)存賬套數(shù)據(jù)表記錄的方法
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;
}
//根據(jù)訂單日期取得庫(kù)存賬套數(shù)據(jù)表記錄的方法
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;
}
//根據(jù)單據(jù)編號(hào)取得庫(kù)存賬套明細(xì)數(shù)據(jù)表的記錄
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;
}
//創(chuàng)建庫(kù)存賬套數(shù)據(jù)表和庫(kù)存賬套明細(xì)數(shù)據(jù)表記錄的方法
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;
}
//更新庫(kù)存賬套數(shù)據(jù)表和庫(kù)存賬套明細(xì)數(shù)據(jù)表記錄的方法
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;
}
//撤消庫(kù)存賬套數(shù)據(jù)表記錄的方法
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;
}
//檢查供應(yīng)商的方法
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;
}
//檢查倉(cāng)庫(kù)的方法
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;
}
//恢復(fù)庫(kù)存賬套數(shù)據(jù)表完成狀態(tài)的方法
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;
}
//庫(kù)存賬套數(shù)據(jù)表電子簽名的方法
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;
}
//根據(jù)完成狀態(tài)取得庫(kù)存賬套數(shù)據(jù)表的記錄
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;
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -