|
|
@@ -267,7 +267,9 @@ public class AssetService extends BaseService<Asset> implements AccountFeeBusine
|
|
|
for (AssetItemVO item:assetVO.getAssetItem()
|
|
|
) {
|
|
|
item.setDisplayNo(displayNo);
|
|
|
- item.setAmtCalcMonth(asset.getSumAmtCalcMonth().multiply(item.getFeeCalcRate()));
|
|
|
+ if(asset.getSumAmtCalcMonth()!=null){
|
|
|
+ item.setAmtCalcMonth(asset.getSumAmtCalcMonth().multiply(item.getFeeCalcRate()));
|
|
|
+ }
|
|
|
displayNo++;
|
|
|
}
|
|
|
//保存明细
|
|
|
@@ -305,14 +307,19 @@ public class AssetService extends BaseService<Asset> implements AccountFeeBusine
|
|
|
if(assetMapper.checkNameDuplicated(asset) > 0){
|
|
|
return ResponseResultUtil.error(ErrorCodeEnum.ASSET_HAS_SAME_NAME);
|
|
|
}
|
|
|
+ if(asset.getAccCalcBegin()!=null){
|
|
|
+ asset.setAccCalcEnd(asset.getAccCalcBegin().plusMonths(asset.getTotalCalcNo()));
|
|
|
+ }
|
|
|
super.updateByUuid(asset);
|
|
|
int displayNo = 1;
|
|
|
- for (AssetItemVO item:assetVO.getAssetItem()
|
|
|
- ) {
|
|
|
- item.setDisplayNo(displayNo);
|
|
|
- item.setAmtCalcMonth(asset.getSumAmtCalcMonth().multiply(item.getFeeCalcRate()));
|
|
|
- displayNo++;
|
|
|
- }
|
|
|
+ for (AssetItemVO item:assetVO.getAssetItem()
|
|
|
+ ) {
|
|
|
+ item.setDisplayNo(displayNo);
|
|
|
+ if(asset.getSumAmtCalcMonth()!=null){
|
|
|
+ item.setAmtCalcMonth(asset.getSumAmtCalcMonth().multiply(item.getFeeCalcRate()));
|
|
|
+ }
|
|
|
+ displayNo++;
|
|
|
+ }
|
|
|
//编辑明细
|
|
|
updateDetail(assetVO,asset.getDocId());
|
|
|
//审批共通
|
|
|
@@ -340,15 +347,20 @@ public class AssetService extends BaseService<Asset> implements AccountFeeBusine
|
|
|
return ResponseResultUtil.error(ErrorCodeEnum.INVENTORY_ADJUST_STATUS_CHANGE);
|
|
|
}
|
|
|
Asset asset = assetConvert.assetVO2PO(assetVO);
|
|
|
+ if(asset.getAccCalcBegin()!=null){
|
|
|
+ asset.setAccCalcEnd(asset.getAccCalcBegin().plusMonths(asset.getTotalCalcNo()));
|
|
|
+ }
|
|
|
//编辑总单
|
|
|
super.updateByUuid(asset);
|
|
|
int displayNo = 1;
|
|
|
- for (AssetItemVO item:assetVO.getAssetItem()
|
|
|
- ) {
|
|
|
- item.setDisplayNo(displayNo);
|
|
|
- item.setAmtCalcMonth(asset.getSumAmtCalcMonth().multiply(item.getFeeCalcRate()));
|
|
|
- displayNo++;
|
|
|
- }
|
|
|
+ for (AssetItemVO item:assetVO.getAssetItem()
|
|
|
+ ) {
|
|
|
+ item.setDisplayNo(displayNo);
|
|
|
+ if(asset.getSumAmtCalcMonth()!=null){
|
|
|
+ item.setAmtCalcMonth(asset.getSumAmtCalcMonth().multiply(item.getFeeCalcRate()));
|
|
|
+ }
|
|
|
+ displayNo++;
|
|
|
+ }
|
|
|
//编辑明细
|
|
|
updateDetail(assetVO, assetVO.getDocId());
|
|
|
List<AssetItem> recHandleItemListGT = assetItemMapper.selectList(new QueryWrapper<AssetItem>().lambda()
|