|
|
@ -4,6 +4,12 @@ import cn.hutool.core.io.IoUtil;
|
|
|
|
import cn.iocoder.yudao.framework.common.util.FileUtils;
|
|
|
|
import cn.iocoder.yudao.framework.common.util.FileUtils;
|
|
|
|
import cn.iocoder.yudao.framework.common.util.barcode.BarcodeUtil;
|
|
|
|
import cn.iocoder.yudao.framework.common.util.barcode.BarcodeUtil;
|
|
|
|
import cn.iocoder.yudao.module.infra.service.file.FileService;
|
|
|
|
import cn.iocoder.yudao.module.infra.service.file.FileService;
|
|
|
|
|
|
|
|
import cn.iocoder.yudao.module.setting.dal.dataobject.depot.DepotDO;
|
|
|
|
|
|
|
|
import cn.iocoder.yudao.module.setting.dal.dataobject.depotcabinet.DepotCabinetDO;
|
|
|
|
|
|
|
|
import cn.iocoder.yudao.module.setting.dal.dataobject.organization.OrganizationDO;
|
|
|
|
|
|
|
|
import cn.iocoder.yudao.module.setting.dal.mysql.depot.DepotMapper;
|
|
|
|
|
|
|
|
import cn.iocoder.yudao.module.setting.dal.mysql.depotcabinet.DepotCabinetMapper;
|
|
|
|
|
|
|
|
import cn.iocoder.yudao.module.setting.dal.mysql.organization.OrganizationMapper;
|
|
|
|
import me.zhyd.oauth.log.Log;
|
|
|
|
import me.zhyd.oauth.log.Log;
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
@ -39,6 +45,12 @@ public class PackagesServiceImpl implements PackagesService {
|
|
|
|
private FileService fileService;
|
|
|
|
private FileService fileService;
|
|
|
|
@Value("${yudao.web.admin-ui.url}")
|
|
|
|
@Value("${yudao.web.admin-ui.url}")
|
|
|
|
private String webUrl;
|
|
|
|
private String webUrl;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private OrganizationMapper organizationMapper;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private DepotMapper depotMapper;
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
|
|
|
private DepotCabinetMapper depotCabinetMapper;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
@ -48,6 +60,27 @@ public class PackagesServiceImpl implements PackagesService {
|
|
|
|
String url = getUrl(packages);
|
|
|
|
String url = getUrl(packages);
|
|
|
|
packages.setCodeUrl(url);
|
|
|
|
packages.setCodeUrl(url);
|
|
|
|
packages.setCodeValue(packages.getCaseNum()+"-"+packages.getCatalogNum()+"-"+packages.getFilesNum());
|
|
|
|
packages.setCodeValue(packages.getCaseNum()+"-"+packages.getCatalogNum()+"-"+packages.getFilesNum());
|
|
|
|
|
|
|
|
//位置
|
|
|
|
|
|
|
|
Long organizationId = packages.getCompanyId();
|
|
|
|
|
|
|
|
Long depotId = packages.getDepotId();
|
|
|
|
|
|
|
|
Long cabinetId = packages.getCabinetId();
|
|
|
|
|
|
|
|
OrganizationDO organizationDO = organizationMapper.selectById(organizationId);
|
|
|
|
|
|
|
|
DepotDO depotDO = depotMapper.selectById(depotId);
|
|
|
|
|
|
|
|
DepotCabinetDO depotCabinetDO = depotCabinetMapper.selectById(cabinetId);
|
|
|
|
|
|
|
|
String position = "";
|
|
|
|
|
|
|
|
if (organizationDO != null) {
|
|
|
|
|
|
|
|
packages.setCompany(organizationDO.getOrganizationName());
|
|
|
|
|
|
|
|
if (depotDO != null) {
|
|
|
|
|
|
|
|
packages.setDepotName(depotDO.getName());
|
|
|
|
|
|
|
|
if (depotCabinetDO != null) {
|
|
|
|
|
|
|
|
packages.setCabinetName(depotCabinetDO.getName());
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
packages.setCabinetName("默认档案柜");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
packages.setDepotName("默认库房");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
packagesMapper.insert(packages);
|
|
|
|
packagesMapper.insert(packages);
|
|
|
|
// 返回
|
|
|
|
// 返回
|
|
|
|
return packages.getId();
|
|
|
|
return packages.getId();
|
|
|
|