模板管理修改接口
This commit is contained in:
@@ -42,4 +42,8 @@ public class TemplateManage extends BaseEntity {
|
||||
* 删除标志(0代表存在 2代表删除)
|
||||
*/
|
||||
private Integer delFlag;
|
||||
/**
|
||||
* 机构关联id
|
||||
*/
|
||||
private String identifyName;
|
||||
}
|
||||
|
||||
+25
-10
@@ -412,16 +412,18 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
|
||||
return AjaxResult.error();
|
||||
}
|
||||
try {
|
||||
String filePath = RuoYiConfig.getUploadPath();
|
||||
// 上传
|
||||
String fileName = FileUploadUtils.upload(filePath, file);
|
||||
String prefix = "/profile";
|
||||
int startIndex = fileName.indexOf(prefix);
|
||||
startIndex += prefix.length();
|
||||
String annexPath = "home/ruoyi/uploadPath" + fileName.substring(startIndex);
|
||||
templateManage.setTemOrigPath(annexPath);
|
||||
String format = getFileExtension(fileName);
|
||||
templateManage.setTemFormat(format);
|
||||
if (file != null && file.getSize() > 0) {
|
||||
String filePath = RuoYiConfig.getUploadPath();
|
||||
// 上传
|
||||
String fileName = FileUploadUtils.upload(filePath, file);
|
||||
String prefix = "/profile";
|
||||
int startIndex = fileName.indexOf(prefix);
|
||||
startIndex += prefix.length();
|
||||
String annexPath = "home/ruoyi/uploadPath" + fileName.substring(startIndex);
|
||||
templateManage.setTemOrigPath(annexPath);
|
||||
String format = getFileExtension(fileName);
|
||||
templateManage.setTemFormat(format);
|
||||
}
|
||||
templateManage.setUpdateBy(getUsername());
|
||||
int i = templateManageMapper.updateTemplateManage(templateManage);
|
||||
if (i > 0) {
|
||||
@@ -450,6 +452,19 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
|
||||
TemplateManage templateManage = new TemplateManage();
|
||||
templateManage.setIdentifyId(deptIdentify.getId());
|
||||
List<TemplateManage> templateManages = templateManageMapper.selectTemplateList(templateManage);
|
||||
if (templateManages != null && templateManages.size() > 0) {
|
||||
for (TemplateManage manage : templateManages) {
|
||||
//根据机构id查询机构名称
|
||||
Long identifyId = manage.getIdentifyId();
|
||||
if (identifyId != null) {
|
||||
deptIdentify.setId(identifyId);
|
||||
List<DeptIdentify> deptIdentifies = deptIdentifyMapper.selectDeptIdentify(deptIdentify);
|
||||
if (deptIdentifies != null && deptIdentifies.size() > 0) {
|
||||
manage.setIdentifyName(deptIdentifies.get(0).getIdentifyName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return templateManages;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user