|
|
@ -28,6 +28,7 @@ package com.yxt.anrui.oa.biz.adreimbursedassetapply; |
|
|
|
import cn.hutool.core.bean.BeanUtil; |
|
|
|
import com.yxt.anrui.oa.biz.adreimbursedassetdetails.AdReimbursedAssetDetailsService; |
|
|
|
import com.yxt.anrui.oa.biz.adreimbursedassetdetails.AdReimbursedAssetDetailsVo; |
|
|
|
import com.yxt.anrui.oa.biz.adreimbursedassetdetails.AssetObjDetailsVo; |
|
|
|
import com.yxt.anrui.oa.biz.adreimbursedassetdetails.AssetObjVo; |
|
|
|
import com.yxt.anrui.oa.biz.oaappendix.OaAppendixService; |
|
|
|
import com.yxt.anrui.oa.biz.oaform.*; |
|
|
@ -108,8 +109,14 @@ public class AdReimbursedAssetApplyService extends MybatisBaseService<AdReimburs |
|
|
|
List<AdReimbursedAssetDetailsVo> list = adReimbursedAssetDetailsService.getUpdateInit(sid); |
|
|
|
list.removeAll(Collections.singleton(null)); |
|
|
|
if (!list.isEmpty()) { |
|
|
|
Map<String, List<AdReimbursedAssetDetailsVo>> extra = new HashMap<>(); |
|
|
|
extra.put("list", list); |
|
|
|
Map<String, AssetObjDetailsVo> extra = new HashMap<>(); |
|
|
|
AssetObjDetailsVo objDetailsVo = new AssetObjDetailsVo(); |
|
|
|
objDetailsVo.setList(list); |
|
|
|
objDetailsVo.setAssetTypeKey(apply.getAssetTypeKey()); |
|
|
|
objDetailsVo.setAssetTypeValue(apply.getAssetTypeValue()); |
|
|
|
objDetailsVo.setIsStationKey(apply.getIsStationKey()); |
|
|
|
objDetailsVo.setIsStationValue(apply.getIsStationValue()); |
|
|
|
extra.put("obj", objDetailsVo); |
|
|
|
assetObj.setExtra(extra); |
|
|
|
} |
|
|
|
applyVo.setAssetListObj(assetObj); |
|
|
@ -132,7 +139,7 @@ public class AdReimbursedAssetApplyService extends MybatisBaseService<AdReimburs |
|
|
|
sourceBillNo = assetListObj.getDictValue(); |
|
|
|
} |
|
|
|
} |
|
|
|
Map<String, List<AdReimbursedAssetDetailsVo>> extra = assetListObj.getExtra(); |
|
|
|
Map<String, AssetObjDetailsVo> extra = assetListObj.getExtra(); |
|
|
|
if (StringUtils.isBlank(sid)) { |
|
|
|
// 新建操作
|
|
|
|
AdReimbursedAssetApply entity = new AdReimbursedAssetApply(); |
|
|
@ -159,11 +166,15 @@ public class AdReimbursedAssetApplyService extends MybatisBaseService<AdReimburs |
|
|
|
baseMapper.updateById(entity); |
|
|
|
} |
|
|
|
if (null != extra) { |
|
|
|
List<AdReimbursedAssetDetailsVo> list = extra.get("list"); |
|
|
|
if (!list.isEmpty()) { |
|
|
|
adReimbursedAssetDetailsService.saveDetails(list, sid); |
|
|
|
AssetObjDetailsVo objDetailsVo = extra.get("obj"); |
|
|
|
if (null != objDetailsVo) { |
|
|
|
List<AdReimbursedAssetDetailsVo> list = objDetailsVo.getList(); |
|
|
|
if (!list.isEmpty()) { |
|
|
|
adReimbursedAssetDetailsService.saveDetails(list, sid); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return rb.success().setData(sid); |
|
|
|
} |
|
|
|
|
|
|
|