新增任务修改

main
dongdingding 5 months ago
parent 5b46c29c38
commit 61b7102a3c

@ -17,13 +17,14 @@ import java.util.List;
public interface AssetBasicNetWorkCpMapper extends BaseMapper<AssetBasicNetworkCpPo> { public interface AssetBasicNetWorkCpMapper extends BaseMapper<AssetBasicNetworkCpPo> {
/** /**
* idid * idid
* *
* @param taskId id * @param id id
* @return * @return
*/ */
@Select("select a.* from asset_basic_network a left join asset_current_cp b on a.asset_id =b.id where b.task_id=#{taskId} ") // @Select("select a.* from asset_basic_network a left join asset_current_cp b on a.asset_id =b.id where b.task_id=#{taskId} ")
List<AssetBasicNetworkCpPo> findByassetId(String taskId); @Select("select * from asset_basic_network where asset_id=#{id} ")
List<AssetBasicNetworkCpPo> findByassetId(@Param("id") Long id);

@ -23,8 +23,9 @@ public interface AssetBusinessFormCpMapper extends BaseMapper<AssetBusinessFormC
* @param taskId id * @param taskId id
* @return * @return
*/ */
@Select("select a.* from asset_business_form a left join asset_current_cp b on a.asset_id =b.id where b.task_id=#{taskId} ") // @Select("select a.* from asset_business_form a left join asset_current_cp b on a.asset_id =b.id where b.task_id=#{taskId} ")
List<AssetBusinessFormCpPo> findByassetId(String taskId); @Select("select * from asset_business_form where asset_id =#{id}")
List<AssetBusinessFormCpPo> findByassetId(@Param("id") Long id);

@ -18,13 +18,14 @@ public interface AssetSupplyChainCpMapper extends BaseMapper<AssetSupplyChainCpP
/** /**
* idid * idid
* *
* @param taskId id * @param id id
* @return * @return
*/ */
@Select("select a.* from asset_supply_chain a left join asset_current_cp b on a.asset_id =b.id where b.task_id=#{taskId}") // @Select("select a.* from asset_supply_chain a left join asset_current_cp b on a.asset_id =b.id where b.task_id=#{taskId}")
List<AssetSupplyChainCpPo> findByassetId(String taskId); @Select("select * from asset_supply_chain where asset_id=#{id}")
List<AssetSupplyChainCpPo> findByassetId(@Param("id") Long id);

@ -17,13 +17,14 @@ public interface UnitOtherConcatCpMapper extends BaseMapper<UnitOtherConcatCpPo>
/** /**
* idid * idid
* *
* @param taskId id * @param id id
* @return * @return
*/ */
@Select("select a.* from unit_other_contact a left join asset_current_cp b on a.asset_id =b.id where b.task_id =#{taskId}") //@Select("select a.* from unit_other_contact a left join asset_current_cp b on a.asset_id =b.id where b.task_id =#{taskId}")
List<UnitOtherConcatCpPo> findByassetId( String taskId); @Select("select * from unit_other_contact where asset_id=#{id}")
List<UnitOtherConcatCpPo> findByassetId(@Param("id") Long id);
/** /**

@ -14,12 +14,12 @@ import java.util.List;
public interface AssetBasicNetworkCpService extends IService<AssetBasicNetworkCpPo> { public interface AssetBasicNetworkCpService extends IService<AssetBasicNetworkCpPo> {
/** /**
* idid * idid
* *
* @param taskId id * @param id id
* @return * @return
*/ */
List<AssetBasicNetworkCpPo> findByassetId(String taskId); List<AssetBasicNetworkCpPo> findByassetId(Long id);
/** /**

@ -14,12 +14,12 @@ import java.util.List;
public interface AssetBusinessFormCpService extends IService<AssetBusinessFormCpPo> { public interface AssetBusinessFormCpService extends IService<AssetBusinessFormCpPo> {
/** /**
* idid * idid
* *
* @param taskId id * @param id id
* @return * @return
*/ */
List<AssetBusinessFormCpPo> findByassetId(String taskId); List<AssetBusinessFormCpPo> findByassetId(Long id);
/** /**

@ -14,12 +14,12 @@ import java.util.List;
public interface AssetSupplyChainCpService extends IService<AssetSupplyChainCpPo> { public interface AssetSupplyChainCpService extends IService<AssetSupplyChainCpPo> {
/** /**
* idid * idid
* *
* @param taskId id * @param id id
* @return * @return
*/ */
List<AssetSupplyChainCpPo> findByassetId(String taskId); List<AssetSupplyChainCpPo> findByassetId(Long id);
/** /**

@ -16,10 +16,10 @@ public interface UnitOtherConcatCpService extends IService<UnitOtherConcatCpPo>
/** /**
* idid * idid
* *
* @param taskId id * @param id id
* @return * @return
*/ */
List<UnitOtherConcatCpPo> findByassetId(String taskId); List<UnitOtherConcatCpPo> findByassetId(Long id);
/** /**

@ -22,8 +22,8 @@ public class AssetBasicNetworkCpServiceImpl extends ServiceImpl<AssetBasicNetWor
private AssetBasicNetWorkCpMapper assetBasicNetWorkCpMapper; private AssetBasicNetWorkCpMapper assetBasicNetWorkCpMapper;
@Override @Override
public List<AssetBasicNetworkCpPo> findByassetId(String taskId) { public List<AssetBasicNetworkCpPo> findByassetId(Long id) {
return assetBasicNetWorkCpMapper.findByassetId(taskId); return assetBasicNetWorkCpMapper.findByassetId(id);
} }
@Override @Override

@ -22,8 +22,8 @@ public class AssetBusinessFormCpServiceImpl extends ServiceImpl<AssetBusinessFor
private AssetBusinessFormCpMapper assetBusinessFormCpMapper; private AssetBusinessFormCpMapper assetBusinessFormCpMapper;
@Override @Override
public List<AssetBusinessFormCpPo> findByassetId(String taskId) { public List<AssetBusinessFormCpPo> findByassetId(Long id) {
return assetBusinessFormCpMapper.findByassetId(taskId); return assetBusinessFormCpMapper.findByassetId(id);
} }
@Override @Override

@ -22,8 +22,8 @@ public class AssetSupplyChainCpServiceImpl extends ServiceImpl<AssetSupplyChainC
@Resource @Resource
private AssetSupplyChainCpMapper assetSupplyChainCpMapper; private AssetSupplyChainCpMapper assetSupplyChainCpMapper;
@Override @Override
public List<AssetSupplyChainCpPo> findByassetId(String taskId) { public List<AssetSupplyChainCpPo> findByassetId(Long id) {
return assetSupplyChainCpMapper.findByassetId(taskId); return assetSupplyChainCpMapper.findByassetId(id);
} }
@Override @Override

@ -203,21 +203,43 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
assetCurrentResponse.setBtgyy(null); assetCurrentResponse.setBtgyy(null);
assetCurrentResponse.setUpdateTime(null); assetCurrentResponse.setUpdateTime(null);
} }
});
assetCurrentCpService.saveBatch(list);
//新增新监管业务形态 //新增新监管业务形态
List<AssetBusinessFormCpPo> bussList = assetBusinessFormCpService.findByassetId(assetTask.getTaskId()); List<AssetBusinessFormCpPo> bussList = assetBusinessFormCpService.findByassetId(assetCurrentResponse.getId());
bussList.stream()
.forEach(assetBusinessFormCp -> {
assetBusinessFormCp.setBusinessId(null);
assetBusinessFormCp.setTaskId(id);
});
assetBusinessFormCpService.saveBatch(bussList); assetBusinessFormCpService.saveBatch(bussList);
//新增供应 //新增供应
List<AssetSupplyChainCpPo> supplyChainList = assetSupplyChainCpService.findByassetId(assetTask.getTaskId()); List<AssetSupplyChainCpPo> supplyChainList = assetSupplyChainCpService.findByassetId(assetCurrentResponse.getId());
supplyChainList.stream()
.forEach(assetSupplyChainCpPo ->{
assetSupplyChainCpPo.setSupplyId(null);
assetSupplyChainCpPo.setTaskId(id);
} );
assetSupplyChainCpService.saveBatch(supplyChainList); assetSupplyChainCpService.saveBatch(supplyChainList);
//新增基础网络 //新增基础网络
List<AssetBasicNetworkCpPo> BasicNetworkCpList = assetBasicNetworkCpService.findByassetId(assetTask.getTaskId()); List<AssetBasicNetworkCpPo> BasicNetworkCpList = assetBasicNetworkCpService.findByassetId(assetCurrentResponse.getId());
BasicNetworkCpList.stream()
.forEach(assetBasicNetworkCpPo -> {
assetBasicNetworkCpPo.setNetworkId(null);
assetBasicNetworkCpPo.setTaskId(id);
});
assetBasicNetworkCpService.saveBatch(BasicNetworkCpList); assetBasicNetworkCpService.saveBatch(BasicNetworkCpList);
//新增其他联系人 //新增其他联系人
List<UnitOtherConcatCpPo> unitOtherConcatList = unitOtherConcatCpService.findByassetId(assetTask.getTaskId()); List<UnitOtherConcatCpPo> unitOtherConcatList = unitOtherConcatCpService.findByassetId(assetCurrentResponse.getId());
unitOtherConcatList.stream()
.forEach(unitOtherConcatCpPo -> {
unitOtherConcatCpPo.setConcatId(null);
unitOtherConcatCpPo.setTaskId(id);
});
unitOtherConcatCpService.saveBatch(unitOtherConcatList); unitOtherConcatCpService.saveBatch(unitOtherConcatList);
});
assetCurrentCpService.saveBatch(list);
} }
} else if (assetPart.equals("1")) { } else if (assetPart.equals("1")) {
//遍历小程序资产单位 //遍历小程序资产单位
@ -395,7 +417,10 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
JSONObject jsonObject = JSONObject.parseObject(o.toString()); JSONObject jsonObject = JSONObject.parseObject(o.toString());
acomma.setKey(jsonObject.get("key").toString()); acomma.setKey(jsonObject.get("key").toString());
acomma.setIpType(jsonObject.get("ipType").toString()); acomma.setIpType(jsonObject.get("ipType").toString());
acomma.setPort(jsonObject.get("port").toString()); Object portValue = jsonObject.get("port");
if (portValue != null && !portValue.toString().isEmpty()) {
acomma.setPort(portValue.toString());
}
a2.add(acomma); a2.add(acomma);
} }
byId.setGlIpList(a2); byId.setGlIpList(a2);

@ -21,8 +21,8 @@ public class UnitOtherConcatCpServiceImpl extends ServiceImpl<UnitOtherConcatCpM
private UnitOtherConcatCpMapper unitOtherConcatCpMapper; private UnitOtherConcatCpMapper unitOtherConcatCpMapper;
@Override @Override
public List<UnitOtherConcatCpPo> findByassetId(String taskId) { public List<UnitOtherConcatCpPo> findByassetId(Long id) {
return unitOtherConcatCpMapper.findByassetId(taskId); return unitOtherConcatCpMapper.findByassetId(id);
} }
@Override @Override

Loading…
Cancel
Save