?? stockmanagementdata.java
字號:
//驗(yàn)收員進(jìn)行庫存賬套數(shù)據(jù)表電子簽名的方法
public int checkUserSignStockLedgerAndSub(String ledgerDate, String userName,
String supplierName, String orderId,
String remark) {
int result = 0;
try {
result = stockManagementData.checkUserSignStockLedgerAndSub(ledgerDate, userName,
supplierName, orderId, remark);
}catch (Exception ex) {
ex.printStackTrace();
}
return result;
}
//根據(jù)相關(guān)聯(lián)票據(jù)標(biāo)識取得往來賬套數(shù)據(jù)表的記錄
public String[] getCurrentAccountLedgerBylinkId(String ledgerDate, String linkId){
String[] data = new String[11];
try {
data = stockManagementData.getCurrentAccountLedgerBylinkId(ledgerDate, linkId);
}catch (Exception ex) {
ex.printStackTrace();
}
return data;
}
//根據(jù)票據(jù)編號、開票據(jù)的用戶名、供應(yīng)商名字取得往來賬套數(shù)據(jù)表記錄的方法
public String[][] getCurrentAccountLedgerByStringField(String ledgerDate,
String fieldName, String fieldValue, int documentType) {
String[][] data = new String[0][11];
try {
data = stockManagementData.getCurrentAccountLedgerByStringField(
ledgerDate, fieldName, fieldValue, documentType);
}
catch (Exception ex) {
ex.printStackTrace();
}
return data;
}
//根據(jù)完成狀態(tài)取得往來賬套數(shù)據(jù)表記錄的方法
public String[][] getCurrentAccountLedgerByOnProcess(String ledgerDate,
int documentType, int onProcess) {
String[][] data = new String[0][11];
try {
data = stockManagementData.getCurrentAccountLedgerByOnProcess(
ledgerDate, documentType, onProcess);
}
catch (Exception ex) {
ex.printStackTrace();
}
return data;
}
//根據(jù)開票據(jù)日期取得往來賬套數(shù)據(jù)表記錄的方法
public String[][] getCurrentAccountLedgerByFillDate(String ledgerDate,
java.sql.Timestamp startDate, java.sql.Timestamp endDate,
int documentType) {
String[][] data = new String[0][11];
try {
data = stockManagementData.getCurrentAccountLedgerByFillDate(ledgerDate,
startDate, endDate, documentType);
}
catch (Exception ex) {
ex.printStackTrace();
}
return data;
}
//現(xiàn)金管理員進(jìn)行電子簽名的方法
public int cashUserSignAccountPayable(String ledgerDate, String userName, String[] currentAccountLedger) {
int result = 0;
try{
result = stockManagementData.cashUserSignAccountPayable(ledgerDate,
userName, currentAccountLedger);
}catch(Exception ex){
ex.printStackTrace();
}
return result;
}
//根據(jù)關(guān)聯(lián)票據(jù)標(biāo)識、記賬用戶取得現(xiàn)金賬套數(shù)據(jù)表記錄的方法
public String[][] getCashLedgerByStringField(String ledgerDate,
String fieldName,
String fieldValue) {
String[][] data = new String[0][6];
try {
data = stockManagementData.getCashLedgerByStringField(ledgerDate,
fieldName, fieldValue);
}catch (Exception ex) {
ex.printStackTrace();
}
return data;
}
//根據(jù)發(fā)生日期取得現(xiàn)金賬套數(shù)據(jù)表記錄的方法
public String[][] getCashLedgerByFillDate(String ledgerDate,
java.sql.Timestamp startDate,
java.sql.Timestamp endDate) {
String[][] data = new String[0][6];
try {
data = stockManagementData.getCashLedgerByFillDate(ledgerDate, startDate,
endDate);
}catch (Exception ex) {
ex.printStackTrace();
}
return data;
}
//現(xiàn)金管理員收取退款進(jìn)行電子簽名的方法
public int cashUserSignStockLedgerForStockReturn(String ledgerDate,
String userName, String supplierName, String orderId, String remark,
boolean isPay) {
int result = 0;
try {
result = stockManagementData.cashUserSignStockLedgerForStockReturn(
ledgerDate, userName, supplierName, orderId, remark, isPay);
}catch (Exception ex) {
ex.printStackTrace();
}
return result;
}
//根據(jù)會計分錄賬套數(shù)據(jù)表的序號取得會計分錄明細(xì)數(shù)據(jù)表的記錄
public String[][] getAccountEntrySubLedgerByLinkSerialId(String ledgerDate, int linkSerialId) {
String[][] data = new String[0][5];
try {
data = stockManagementData.getAccountEntrySubLedgerByLinkSerialId(
ledgerDate, linkSerialId);
}
catch (Exception ex) {
ex.printStackTrace();
}
return data;
}
//根據(jù)會計科目、關(guān)聯(lián)的票據(jù)標(biāo)識、記賬用戶、審核用戶取得會計分錄賬套數(shù)據(jù)表記錄的方法
public String[][] getAccountEntryLedgerByStringField(String ledgerDate,
String accountName, String fieldName, String fieldValue) {
String[][] data = new String[0][8];
try {
data = stockManagementData.getAccountEntryLedgerByStringField(ledgerDate,
accountName, fieldName, fieldValue);
}
catch (Exception ex) {
ex.printStackTrace();
}
return data;
}
//根據(jù)會計科目、完成狀態(tài)取得會計分錄賬套數(shù)據(jù)表記錄的方法
public String[][] getAccountEntryLedgerByOnProcess(String ledgerDate,
String accountName, int onProcess) {
String[][] data = new String[0][8];
try {
data = stockManagementData.getAccountEntryLedgerByOnProcess(ledgerDate,
accountName, onProcess);
}
catch (Exception ex) {
ex.printStackTrace();
}
return data;
}
//根據(jù)會計科目、記賬日期取得會計分錄賬套數(shù)據(jù)表記錄的方法
public String[][] getAccountEntryLedgerByFillDate(String ledgerDate,
java.sql.Timestamp startDate, java.sql.Timestamp endDate,
String accountName) {
String[][] data = new String[0][8];
try {
data = stockManagementData.getAccountEntryLedgerByFillDate(ledgerDate,
startDate, endDate, accountName);
}
catch (Exception ex) {
ex.printStackTrace();
}
return data;
}
//撤消和恢復(fù)會計分錄賬套數(shù)據(jù)表完成狀態(tài)的方法
public int cancelOrRestoreAccountEntryLedger(String ledgerDate, int serialId,
int onProcess, String remark) {
int result = 0;
try{
result = stockManagementData.cancelOrRestoreAccountEntryLedger(ledgerDate,
serialId, onProcess, remark);
}catch(Exception ex){
ex.printStackTrace();
}
return result;
}
//審核用戶對會計分錄進(jìn)行電子簽名的方法
public int signAccountEntryLedger(String ledgerDate, String fieldName,
String userName, int serialId,
int onProcess, String remark) {
int result = 0;
try{
result = stockManagementData.signAccountEntryLedger(ledgerDate, fieldName,
userName, serialId, onProcess, remark);
}catch(Exception ex){
ex.printStackTrace();
}
return result;
}
//創(chuàng)建會計分錄的方法
public int createAccountEntry(String ledgerDate, String[] accountEntryLedger,
String[][] accountEntrySubLedger) {
int result = 0;
try{
result = stockManagementData.createAccountEntry(ledgerDate,
accountEntryLedger, accountEntrySubLedger, false, null);
}catch(Exception ex){
ex.printStackTrace();
}
return result;
}
//更新會計分錄的方法
public int updateAccountEntry(String ledgerDate, String[] accountEntryLedger,
String[][] accountEntrySubLedger) {
int result = 0;
try{
result = stockManagementData.updateAccountEntry(ledgerDate,
accountEntryLedger, accountEntrySubLedger);
}catch(Exception ex){
ex.printStackTrace();
}
return result;
}
//創(chuàng)建商品調(diào)拔單的方法
public int createTransferOrder(String ledgerDate, String[] stockLedger,
String[][] stockSubLedger){
int result = 0;
try{
//創(chuàng)建商品調(diào)入單數(shù)組
String[] orderInLedger = new String[stockLedger.length];
//創(chuàng)建商品調(diào)入單明細(xì)數(shù)組
String[][] orderInSubLedger = new String[stockSubLedger.length][stockSubLedger[0].length];
//更新商品調(diào)入單明細(xì)數(shù)組
for(int i = 0; i < orderInSubLedger.length; i++){
orderInSubLedger[i][0] = stockSubLedger[i][0];
orderInSubLedger[i][1] = stockSubLedger[i][1];
orderInSubLedger[i][2] = stockSubLedger[i][2];
orderInSubLedger[i][3] = stockSubLedger[i][3];
//將商品數(shù)量更改為正數(shù)
orderInSubLedger[i][4] = String.valueOf(-Integer.parseInt(stockSubLedger[i][4]));
orderInSubLedger[i][5] = stockSubLedger[i][5];
}
System.arraycopy(stockLedger, 0, orderInLedger, 0, stockLedger.length);
//更新商品調(diào)入單數(shù)組,3表示商品調(diào)入單
orderInLedger[1] = "3";
orderInLedger[4] = stockLedger[8]; //調(diào)出倉庫
orderInLedger[8] = stockLedger[4]; //調(diào)入倉庫
//創(chuàng)建商品調(diào)入單
stockManagementData.createStockLedgerAndSub(ledgerDate, orderInLedger, orderInSubLedger);
//根據(jù)商品調(diào)出用戶名字取得商品調(diào)入單
String[][] orderInLedgers = stockManagementData.
getStockLedgerByStringField(ledgerDate, "submitUser", orderInLedger[3], 3);
//取得商品調(diào)入單標(biāo)識,最后一條記錄便是新創(chuàng)建的商品調(diào)入單
String orderInId = orderInLedgers[orderInLedgers.length -1][0];
//創(chuàng)建商品調(diào)出單數(shù)組
String[] orderOutLedger = stockLedger;
//將商品調(diào)入單標(biāo)識放在供應(yīng)商字段
orderOutLedger[2] = orderInId;
//創(chuàng)建商品調(diào)出單
stockManagementData.createStockLedgerAndSub(ledgerDate, orderOutLedger, stockSubLedger);
//根據(jù)商品調(diào)出用戶名字取得商品調(diào)出單
String[][] orderOutLedgers = stockManagementData.
getStockLedgerByStringField(ledgerDate, "submitUser", orderInLedger[3], 2);
//取得商品調(diào)出單標(biāo)識,最后一條記錄便是新創(chuàng)建的商品調(diào)出單
String orderOutId = orderOutLedgers[orderOutLedgers.length -1][0];
//更新商品調(diào)入單數(shù)組的標(biāo)識和關(guān)聯(lián)標(biāo)識
orderInLedger[0] = orderInId;
orderInLedger[2] = orderOutId;
//根據(jù)標(biāo)識重新取得商品調(diào)入單明細(xì)數(shù)組
orderInSubLedger = stockManagementData.getStockSubLedgerByOrderId(
ledgerDate, orderInLedger[0]);
//更新商品調(diào)入單,將調(diào)出單的關(guān)聯(lián)標(biāo)識寫入調(diào)入單
stockManagementData.updateStockLedgerAndSub(ledgerDate, orderInLedger, orderInSubLedger);
result = 1;
}catch(Exception ex){
ex.printStackTrace();
}
return result;
}
//更新商品調(diào)拔單的方法
public int updateTransferOrder(String ledgerDate, String[] stockLedger,
String[][] stockSubLedger){
int result = 0;
try{
//創(chuàng)建商品調(diào)出單數(shù)組
String[] orderOutLedger = stockLedger;
//更新商品調(diào)出單
stockManagementData.updateStockLedgerAndSub(ledgerDate, orderOutLedger, stockSubLedger);
//創(chuàng)建商品調(diào)入單數(shù)組
String[] orderInLedger = new String[stockLedger.length];
System.arraycopy(stockLedger, 0, orderInLedger, 0, stockLedger.length);
//更新商品調(diào)入單數(shù)組,3表示商品調(diào)入單
orderInLedger[0] = stockLedger[2];
orderInLedger[1] = "3";
orderInLedger[2] = stockLedger[0]; //調(diào)出單的關(guān)聯(lián)標(biāo)識
orderInLedger[4] = stockLedger[8]; //調(diào)出倉庫
//將調(diào)出單的倉庫字段放入調(diào)入單
orderInLedger[8] = stockLedger[4]; //調(diào)入倉庫
//取得商品調(diào)入單明細(xì)數(shù)組
String[][] orderInSubLedger = stockManagementData.
getStockSubLedgerByOrderId(ledgerDate, orderInLedger[0]);
//更新商品調(diào)入單明細(xì)數(shù)組
for(int i = 0; i < orderInSubLedger.length; i++){
orderInSubLedger[i][2] = stockSubLedger[i][2];
orderInSubLedger[i][3] = stockSubLedger[i][3];
//將商品數(shù)量更改為正數(shù)
orderInSubLedger[i][4] = String.valueOf(-Integer.parseInt(stockSubLedger[i][4]));
orderInSubLedger[i][5] = stockSubLedger[i][5];
}
//更新商品調(diào)入單
stockManagementData.updateStockLedgerAndSub(ledgerDate, orderInLedger, orderInSubLedger);
result = 1;
}catch(Exception ex){
ex.printStackTrace();
}
return result;
}
//撤消或者恢復(fù)商品調(diào)拔單的方法
public int cancelOrRestoreTransferOrder(String ledgerDate, String inOrderId,
String outOrderId, int onProcess, String remark){
int result = 0;
try{
if(onProcess == 0){
//恢復(fù)調(diào)入單
stockManagementData.restoreStockLedgerAndSub(ledgerDate, inOrderId, remark);
//恢復(fù)調(diào)出單
stockManagementData.restoreStockLedgerAndSub(ledgerDate, outOrderId, remark);
}else{
//取消調(diào)入單
stockManagementData.cancelStockLedgerAndSub(ledgerDate, inOrderId, remark);
//取消調(diào)出單
stockManagementData.cancelStockLedgerAndSub(ledgerDate, outOrderId, remark);
}
result = 1;
}catch(Exception ex){
ex.printStackTrace();
}
return result;
}
//庫存賬套數(shù)據(jù)表電子簽名和更新完成狀態(tài)的方法
public int signStockLedgerAndSubForFinish(String ledgerDate, String fieldName,
String userName, String orderId,
int onProcess, String remark) {
int result = 0;
try{
result = stockManagementData.signStockLedgerAndSubForFinish(ledgerDate,
fieldName, userName, orderId, onProcess, remark);
}catch(Exception ex){
ex.printStackTrace();
}
return result;
}
//創(chuàng)建商品分拆單的方法
public int createRearrangeOrder(String ledgerDate, String[] stockLedger,
String[][] stockSubLedgerOut, String[][] stockSubLedgerIn){
int result = 0;
try{
//創(chuàng)建商品分拆調(diào)入單數(shù)組
String[] orderInLedger = new String[stockLedger.length];
System.arraycopy(stockLedger, 0, orderInLedger, 0, stockLedger.length);
//創(chuàng)建商品分拆調(diào)入單
stockManagementData.createStockLedgerAndSub(ledgerDate, orderInLedger, stockSubLedgerIn);
//根據(jù)商品組合管理用戶名字取得商品分拆調(diào)入單,10表示商品分拆調(diào)入單
String[][] orderInLedgers = stockManagementData.
getStockLedgerByStringField(ledgerDate, "submitUser", stockLedger[3], 10);
//取得商品分拆調(diào)入單標(biāo)識,最后一條記錄便是新創(chuàng)建的商品分拆調(diào)入單
String orderInId = orderInLedgers[orderInLedgers.length -1][0];
//創(chuàng)建商品分拆調(diào)出單數(shù)組
String[] orderOutLedger = new String[stockLedger.length];
System.arraycopy(stockLedger, 0, orderOutLedger, 0, stockLedger.length);
//更新商品分拆調(diào)出單數(shù)組,將商品調(diào)入單標(biāo)識放在供應(yīng)商字段,9表示商品分拆調(diào)出單
orderOutLedger[2] = orderInId;
orderOutLedger[1] = "9";
orderOutLedger[4] = stockLedger[8]; //調(diào)入倉庫
orderOutLedger[8] = stockLedger[4]; //調(diào)出倉庫
//創(chuàng)建商品分拆調(diào)出單
stockManagementData.createStockLedgerAndSub(ledgerDate, orderOutLedger, stockSubLedgerOut);
//根據(jù)商品組合管理用戶名字取得商品分拆調(diào)出單
String[][] orderOutLedgers = stockManagementData.
getStockLedgerByStringField(ledgerDate, "submitUser", orderOutLedger[3], 9);
//取得商品分拆調(diào)出單標(biāo)識,最后一條記錄便是新創(chuàng)建的商品分拆調(diào)出單
String orderOutId = orderOutLedgers[orderOutLedgers.length -1][0];
//更新商品分拆調(diào)入單數(shù)組的標(biāo)識和關(guān)聯(lián)標(biāo)識
orderInLedger[0] = orderInId;
orderInLedger[2] = orderOutId;
//根據(jù)標(biāo)識重新取得商品分拆調(diào)入單明細(xì)數(shù)組
String[][] orderInSubLedger = stockManagementData.getStockSubLedgerByOrderId(
ledgerDate, orderInLedger[0]);
//更新商品分拆調(diào)入單,將調(diào)出單的關(guān)聯(lián)標(biāo)識寫入調(diào)入單
stockManagementData.updateStockLedgerAndSub(ledgerDate, orderInLedger, orderInSubLedger);
result = 1;
}catch(Exception ex){
ex.printStackTrace();
}
return result;
}
//更新商品分拆單的方法
public int updateRearrangeOrder(String ledgerDate, String[] stockLedger,
String[][] stockSubLedgerOut, String[][] stockSubLedgerIn){
int result = 0;
try{
//更新商品分拆調(diào)入單
stockManagementData.updateStockLedgerAndSub(ledgerDate, stockLedger, stockSubLedgerIn);
//創(chuàng)建商品分拆調(diào)出單數(shù)組
String[] orderOutLedger = new String[stockLedger.length];
System.arraycopy(stockLedger, 0, orderOutLedger, 0, stockLedger.length);
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -