これをできるだけシンプルにしようとしました。私は春のバッチを初めて使用します。特に複数ステップのジョブに関しては、春のアイテムを関連付ける方法を理解するのに小さな問題がありますが、これはコードではなく私のロジック(単純化されたもの) であり、春のバッチでそれを実装することを知りませんだから私はこれが正しい構造かもしれないと思った
- 読者_お金
- リーダーの詳細
- タスクレット
- 読者_利益
- tasklet_calculation
- ライター
ただし、間違っている場合は修正し、可能であればコードを提供してください。どうもありがとうございます
論理:
sql = "select * from MONEY where id= user input"; //the user will input the condition
while (records are available) { 
    int currency= resultset(currency column);
    sql= "select * from DETAILS where D_currency = currency";
    while (records are available) {
        int amount= resultset(amount column);
        string money_flag= resultset(money_type column);
        sql= "select * from PROFIT where Mtypes = money_type";
        while (records are available) {
            int revenue= resultset(revenue);
            if (money_type== 1) {
                int net_profit= revenue * 3.75;
                sql = "update PROFIT set Nprofit = net_profit";
            }
            else (money_type== 2) {
                int net_profit = (revenue - 5 ) * 3.7 ;
                sql = "update PROFIT set Nprofit = net_profit";
            }
        }
    sql="update DETAILS set detail_falg = 001 ";
    }
sql = "update MONEY set currency_flag = 009";
}