|
|
@ -51,37 +51,9 @@ public class ElectronicAssetsServiceImpl implements ElectronicAssetsService {
|
|
|
|
|
|
|
|
|
|
|
|
createReqVO.setPosition(positionDo.getPosition())
|
|
|
|
createReqVO.setPosition(positionDo.getPosition())
|
|
|
|
.setCreateBy(positionDo.getCreateBy()).setDeptName(positionDo.getDeptName());
|
|
|
|
.setCreateBy(positionDo.getCreateBy()).setDeptName(positionDo.getDeptName());
|
|
|
|
// if (ObjectUtil.isNotNull(createReqVO.getDeptId())){
|
|
|
|
|
|
|
|
// GetElectronicDept getElectronicDept = new GetElectronicDept();
|
|
|
|
|
|
|
|
// createReqVO.setDeptName(getElectronicDept.getDeptName(createReqVO.getDeptId()));
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// 插入
|
|
|
|
// 插入
|
|
|
|
ElectronicAssetsDO electronicAssets = ElectronicAssetsConvert.INSTANCE.convert(createReqVO);
|
|
|
|
ElectronicAssetsDO electronicAssets = ElectronicAssetsConvert.INSTANCE.convert(createReqVO);
|
|
|
|
// Long organizationId = createReqVO.getOrganizationId();
|
|
|
|
|
|
|
|
// Long depotId = createReqVO.getDepotId();
|
|
|
|
|
|
|
|
// Long cabinetId = createReqVO.getCabinetId();
|
|
|
|
|
|
|
|
// OrganizationDO organizationDO = organizationMapper.selectById(organizationId);
|
|
|
|
|
|
|
|
// DepotDO depotDO = depotMapper.selectById(depotId);
|
|
|
|
|
|
|
|
// DepotCabinetDO depotCabinetDO = depotCabinetMapper.selectById(cabinetId);
|
|
|
|
|
|
|
|
// String position="";
|
|
|
|
|
|
|
|
// if (organizationDO != null){
|
|
|
|
|
|
|
|
// position=position+organizationDO.getOrganizationName();
|
|
|
|
|
|
|
|
// if (depotDO != null){
|
|
|
|
|
|
|
|
// position=position+"/"+depotDO.getName();
|
|
|
|
|
|
|
|
// if (depotCabinetDO != null){
|
|
|
|
|
|
|
|
// position= position+"/"+depotCabinetDO.getName();
|
|
|
|
|
|
|
|
// }else {
|
|
|
|
|
|
|
|
// position= position+"/默认档案柜";
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }else {
|
|
|
|
|
|
|
|
// position=position+"/默认库房/默认档案柜";
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// electronicAssets.setPosition(position);
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
|
|
|
|
|
|
|
// AdminUserDO adminUserDO = userMapper.selectById(loginUser.getId());
|
|
|
|
|
|
|
|
// electronicAssets.setCreateBy(adminUserDO.getUsername());
|
|
|
|
|
|
|
|
electronicAssetsMapper.insert(electronicAssets);
|
|
|
|
electronicAssetsMapper.insert(electronicAssets);
|
|
|
|
// 返回
|
|
|
|
// 返回
|
|
|
|
return electronicAssets.getId();
|
|
|
|
return electronicAssets.getId();
|
|
|
@ -99,8 +71,7 @@ public class ElectronicAssetsServiceImpl implements ElectronicAssetsService {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void deleteElectronicAssets(Long[] id) {
|
|
|
|
public void deleteElectronicAssets(Long[] id) {
|
|
|
|
// 删除
|
|
|
|
// 删除
|
|
|
|
ArrayList<Long> listId = new ArrayList(Arrays.asList(id)) ;
|
|
|
|
electronicAssetsMapper.deleteBatchIds(Arrays.asList(id));
|
|
|
|
electronicAssetsMapper.deleteBatchIds(listId);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void validateElectronicAssetsExists(Long id) {
|
|
|
|
private void validateElectronicAssetsExists(Long id) {
|
|
|
|