📄 stockmanagementdata.java~719~
字号:
}
//撤消库存账套数据表记录的方法
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;
}
//验收员进行库存账套数据表电子签名的方法
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;
}
//根据相关联票据标识取得往来账套数据表的记录
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;
}
//根据票据编号、开票据的用户名、供应商名字取得往来账套数据表记录的方法
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;
}
//根据完成状态取得往来账套数据表记录的方法
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;
}
//根据开票据日期取得往来账套数据表记录的方法
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;
}
//现金管理员进行电子签名的方法
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;
}
//根据关联票据标识、记账用户取得现金账套数据表记录的方法
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;
}
//根据发生日期取得现金账套数据表记录的方法
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;
}
//现金管理员收取退款进行电子签名的方法
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;
}
//根据会计分录账套数据表的序号取得会计分录明细数据表的记录
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;
}
//根据会计科目、关联的票据标识、记账用户、审核用户取得会计分录账套数据表记录的方法
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;
}
//根据会计科目、完成状态取得会计分录账套数据表记录的方法
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;
}
//根据会计科目、记账日期取得会计分录账套数据表记录的方法
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;
}
//撤消和恢复会计分录账套数据表完成状态的方法
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;
}
//审核用户对会计分录进行电子签名的方法
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;
}
//创建会计分录的方法
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;
}
//创建商品调拔单的方法
public int createTransferOrder(String ledgerDate, String[] stockLedger,
String[][] stockSubLedger){
int result = 0;
try{
//创建商品调入单数组
String[] orderInLedger = new String[stockLedger.length];
//创建商品调入单明细数组
String[][] orderInSubLedger = new String[stockSubLedger.length][stockSubLedger[0].length];
//更新商品调入单明细数组
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];
//将商品数量更改为正数
orderInSubLedger[i][4] = String.valueOf(-Integer.parseInt(stockSubLedger[i][4]));
orderInSubLedger[i][5] = stockSubLedger[i][5];
}
System.arraycopy(stockLedger, 0, orderInLedger, 0, stockLedger.length);
//更新商品调入单数组,3表示商品调入单
orderInLedger[1] = "3";
orderInLedger[4] = stockLedger[8]; //调出仓库
orderInLedger[8] = stockLedger[4]; //调入仓库
//创建商品调入单
stockManagementData.createStockLedgerAndSub(ledgerDate, orderInLedger, orderInSubLedger);
//根据商品调出用户名字取得商品调入单
String[][] orderInLedgers = stockManagementData.
getStockLedgerByStringField(ledgerDate, "submitUser", orderInLedger[3], 3);
//取得商品调入单标识,最后一条记录便是新创建的商品调入单
String orderInId = orderInLedgers[orderInLedgers.length -1][0];
//创建商品调出单数组
String[] orderOutLedger = stockLedger;
//将商品调入单标识放在供应商字段
orderOutLedger[2] = orderInId;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -