|
|
|
@ -147,12 +147,12 @@ public class AssetOfficialAccountServiceImpl extends ServiceImpl<AssetOfficialAc
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public Boolean edit(AssetOfficialAccount assetOfficialAccount) {
|
|
|
|
|
List<AssetOfficialAccount> list4= lambdaQuery()
|
|
|
|
|
.eq(AssetOfficialAccount::getSsdw, assetOfficialAccount.getSsdw())
|
|
|
|
|
.eq(AssetOfficialAccount::getGzhmc, assetOfficialAccount.getGzhmc()).list();
|
|
|
|
|
if (list4 != null&& !list4.isEmpty()){
|
|
|
|
|
throw new ServiceException("不允许新增重复资产!");
|
|
|
|
|
}
|
|
|
|
|
// List<AssetOfficialAccount> list4= lambdaQuery()
|
|
|
|
|
// .eq(AssetOfficialAccount::getSsdw, assetOfficialAccount.getSsdw())
|
|
|
|
|
// .eq(AssetOfficialAccount::getGzhmc, assetOfficialAccount.getGzhmc()).list();
|
|
|
|
|
// if (list4 != null&& !list4.isEmpty()){
|
|
|
|
|
// throw new ServiceException("不允许新增重复资产!");
|
|
|
|
|
// }
|
|
|
|
|
if (assetOfficialAccount.getCdList() != null && !assetOfficialAccount.getCdList().isEmpty()) {
|
|
|
|
|
StringBuilder a = new StringBuilder();
|
|
|
|
|
StringBuilder b = new StringBuilder();
|
|
|
|
@ -198,21 +198,6 @@ public class AssetOfficialAccountServiceImpl extends ServiceImpl<AssetOfficialAc
|
|
|
|
|
assetOfficialAccountCpService.updateById(x);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// //根据修改的单位名称查询任务表中是否有此单位的任务,如果有修改资产中的任务id,如果没有删除
|
|
|
|
|
// AssetTask assetTask = assetTaskService.findByDwmc(assetOfficialAccount.getGzhmc());
|
|
|
|
|
// if (assetTask == null) {
|
|
|
|
|
// assetOfficialAccountCpService.deletByAssetId(assetOfficialAccount.getId());
|
|
|
|
|
// } else {
|
|
|
|
|
// //根据资产id查询旧资产
|
|
|
|
|
// AssetOfficialAccountCpPo assetOfficialAccountCpPo = assetOfficialAccountCpService.findDwmc(assetOfficialAccount.getId());
|
|
|
|
|
// if (assetOfficialAccountCpPo!=null){
|
|
|
|
|
// assetOfficialAccountCpPo.setGzhmc(assetOfficialAccount.getGzhmc());
|
|
|
|
|
// assetOfficialAccountCpPo.setTaskId(assetTask.getId());
|
|
|
|
|
// //修改
|
|
|
|
|
// assetOfficialAccountCpService.updateById(assetOfficialAccountCpPo);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|