会计账簿新增账簿来源字段,电子档案下代码优化

new
parent 45d52f4c95
commit b3caac689c

@ -80,11 +80,12 @@ public class AccountingBookController {
@RequestParam("companyId") Long companyId, @RequestParam("companyId") Long companyId,
@RequestParam("company") String company, @RequestParam("company") String company,
@RequestParam("year") String year, @RequestParam("year") String year,
@RequestParam("period") String period) { @RequestParam("period") String period,
@RequestParam("source") String source) {
try { try {
String uri = fileService.createFile(multipartFile.getOriginalFilename(), null, IoUtil.readBytes(multipartFile.getInputStream())); String uri = fileService.createFile(multipartFile.getOriginalFilename(), null, IoUtil.readBytes(multipartFile.getInputStream()));
AccountingBookCreateReqVO vo = new AccountingBookCreateReqVO(); AccountingBookCreateReqVO vo = new AccountingBookCreateReqVO();
vo.setCompany(company).setCompanyId(companyId).setType(type).setYear(year).setPeriod(period).setUri(uri).setName(multipartFile.getOriginalFilename()); vo.setCompany(company).setCompanyId(companyId).setType(type).setYear(year).setPeriod(period).setUri(uri).setName(multipartFile.getOriginalFilename()).setSource(source);
this.createAccountingBook(vo); this.createAccountingBook(vo);
return uri; return uri;
} catch (Exception e){ } catch (Exception e){

@ -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) {

@ -41,16 +41,6 @@ public class ElectronicContractsServiceImpl implements ElectronicContractsServic
@Resource @Resource
private ElectronicContractsMapper electronicContractsMapper; private ElectronicContractsMapper electronicContractsMapper;
@Resource
private OrganizationMapper organizationMapper;
@Resource
private DepotMapper depotMapper;
@Resource
private DepotCabinetMapper depotCabinetMapper;
@Resource
private AdminUserMapper userMapper;
@Override @Override
public Long createElectronicContracts(ElectronicContractsCreateReqVO createReqVO) { public Long createElectronicContracts(ElectronicContractsCreateReqVO createReqVO) {

@ -41,16 +41,6 @@ public class ElectronicCustomerComplaintServiceImpl implements ElectronicCustome
@Resource @Resource
private ElectronicCustomerComplaintMapper electronicCustomerComplaintMapper; private ElectronicCustomerComplaintMapper electronicCustomerComplaintMapper;
@Resource
private OrganizationMapper organizationMapper;
@Resource
private DepotMapper depotMapper;
@Resource
private DepotCabinetMapper depotCabinetMapper;
@Resource
private AdminUserMapper userMapper;
@Override @Override
public Long createElectronicCustomerComplaint(ElectronicCustomerComplaintCreateReqVO createReqVO) { public Long createElectronicCustomerComplaint(ElectronicCustomerComplaintCreateReqVO createReqVO) {
GetPositionUtils getPositionUtils = new GetPositionUtils(); GetPositionUtils getPositionUtils = new GetPositionUtils();

@ -40,15 +40,6 @@ public class ElectronicEmployeeServiceImpl implements ElectronicEmployeeService
@Resource @Resource
private ElectronicEmployeeMapper electronicEmployeeMapper; private ElectronicEmployeeMapper electronicEmployeeMapper;
@Resource
private OrganizationMapper organizationMapper;
@Resource
private DepotMapper depotMapper;
@Resource
private DepotCabinetMapper depotCabinetMapper;
@Resource
private AdminUserMapper userMapper;
@Override @Override
public Long createElectronicEmployee(ElectronicEmployeeCreateReqVO createReqVO) { public Long createElectronicEmployee(ElectronicEmployeeCreateReqVO createReqVO) {

@ -41,16 +41,6 @@ public class ElectronicOtherServiceImpl implements ElectronicOtherService {
@Resource @Resource
private ElectronicOtherMapper electronicOtherMapper; private ElectronicOtherMapper electronicOtherMapper;
@Resource
private OrganizationMapper organizationMapper;
@Resource
private DepotMapper depotMapper;
@Resource
private DepotCabinetMapper depotCabinetMapper;
@Resource
private AdminUserMapper userMapper;
@Override @Override
public Long createElectronicOther(ElectronicOtherCreateReqVO createReqVO) { public Long createElectronicOther(ElectronicOtherCreateReqVO createReqVO) {
GetPositionUtils getPositionUtils = new GetPositionUtils(); GetPositionUtils getPositionUtils = new GetPositionUtils();

Loading…
Cancel
Save