管理端可在资产管理模块编辑资产所属单位信息,并同步至任务中

dongdingding
dongdingding 1 day ago
parent 0f39478fe5
commit c4b3f52ecc

@ -222,22 +222,7 @@ public class AssetAppController extends BaseController {
@Log(title = "编辑app数据", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody AssetApp assetApp) {
//根据资产id查询资产子表,判断是否有此资产进行中的任务,如果资产状态是已关停与修改的数据不符,则修改任务中的资产状态
AssetAppCpPo assetAppCpPo = assetAppCpService.findDwmc(assetApp.getId());
if (assetAppCpPo != null) {
//查询任务是否为进行中
AssetTask assetTask = assetTaskService.findByTaskId(assetAppCpPo.getTaskId());
if (assetTask.getTaskStatus().equals(1)) {
if (assetAppCpPo.getStatus()==5 ) {
//修改任务中资产状态
assetAppCpPo.setStatus(0);
assetAppCpPo.setBtgyy(null);
assetTask.setTaskStatus(1);
assetTaskService.update(assetTask);
assetAppCpService.updateById(assetAppCpPo);
}
}
}
return success(assetAppService.edit(assetApp));
}

@ -682,7 +682,7 @@ public class AssetCurrentController extends BaseController {
});
//根据修改的单位名称查询任务表中是否有此单位的任务如果有修改资产中的任务id如果没有删除
AssetTask assetTask = assetTaskService.findByDwmc(assetCurrent.getDwmc());
if (assetTask != null) {
if (assetTask == null) {
delete(assetCurrent);
} else {
//根据资产id查询旧资产

@ -125,7 +125,6 @@ public class AssetAppServiceImpl extends ServiceImpl<AssetAppMapper, AssetApp> i
*/
@Override
public Boolean edit(AssetApp assetApp) {
AssetApp byId = getById(assetApp.getId());
List<Unit> list2 = unitService.lambdaQuery().eq(Unit::getNickName, assetApp.getSsdw()).eq(Unit::getDelFlag, 0).list();
if (list2 == null || list2.isEmpty()) {
@ -156,7 +155,7 @@ public class AssetAppServiceImpl extends ServiceImpl<AssetAppMapper, AssetApp> i
//根据修改的单位名称查询任务表中是否有此单位的任务如果有修改资产中的任务id如果没有删除
AssetTask assetTask = assetTaskService.findByDwmc(assetApp.getAppName());
if (assetTask != null) {
if (assetTask == null) {
assetAppCpService.deletByAssetId(assetApp.getId());
} else {
//根据资产id查询旧资产

@ -155,7 +155,7 @@ public class AssetEmailServiceImpl extends ServiceImpl<AssetEmailMapper, AssetEm
//根据修改的单位名称查询任务表中是否有此单位的任务如果有修改资产中的任务id如果没有删除
AssetTask assetTask = assetTaskService.findByDwmc(assetEmail.getDzyxhz());
if (assetTask != null) {
if (assetTask == null) {
assetEmailCpService.deletByAssetId(assetEmail.getId());
} else {
//根据资产id查询旧资产

@ -143,7 +143,7 @@ public class AssetMiniProgramsServiceImpl extends ServiceImpl<AssetMiniProgramsM
});
//根据修改的单位名称查询任务表中是否有此单位的任务如果有修改资产中的任务id如果没有删除
AssetTask assetTask = assetTaskService.findByDwmc(assetMiniPrograms.getXcxmc());
if (assetTask != null) {
if (assetTask == null) {
assetMiniProgramsCpService.deletByAssetId(assetMiniPrograms.getId());
} else {
//根据资产id查询旧资产

@ -200,7 +200,7 @@ public class AssetOfficialAccountServiceImpl extends ServiceImpl<AssetOfficialAc
//根据修改的单位名称查询任务表中是否有此单位的任务如果有修改资产中的任务id如果没有删除
AssetTask assetTask = assetTaskService.findByDwmc(assetOfficialAccount.getGzhmc());
if (assetTask != null) {
if (assetTask == null) {
assetOfficialAccountCpService.deletByAssetId(assetOfficialAccount.getId());
} else {
//根据资产id查询旧资产

Loading…
Cancel
Save