Merge branch 'hjb' of SH-Arbitrate/Arbitrate-Backend into dev
This commit was merged in pull request #222.
This commit is contained in:
+1
-1
@@ -138,7 +138,7 @@ public class DeptIdentifyController extends BaseController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/updateTemplate")
|
@PostMapping("/updateTemplate")
|
||||||
public AjaxResult updateTemplate(@RequestBody TemplateManage templateManage,@RequestParam("file") MultipartFile file){
|
public AjaxResult updateTemplate(TemplateManage templateManage,@RequestParam("file") MultipartFile file){
|
||||||
return deptIdentifyService.updateTemplate(templateManage,file);
|
return deptIdentifyService.updateTemplate(templateManage,file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,4 +42,8 @@ public class TemplateManage extends BaseEntity {
|
|||||||
* 删除标志(0代表存在 2代表删除)
|
* 删除标志(0代表存在 2代表删除)
|
||||||
*/
|
*/
|
||||||
private Integer delFlag;
|
private Integer delFlag;
|
||||||
|
/**
|
||||||
|
* 机构关联id
|
||||||
|
*/
|
||||||
|
private String identifyName;
|
||||||
}
|
}
|
||||||
|
|||||||
+25
-10
@@ -412,16 +412,18 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
|
|||||||
return AjaxResult.error();
|
return AjaxResult.error();
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
String filePath = RuoYiConfig.getUploadPath();
|
if (file != null && file.getSize() > 0) {
|
||||||
// 上传
|
String filePath = RuoYiConfig.getUploadPath();
|
||||||
String fileName = FileUploadUtils.upload(filePath, file);
|
// 上传
|
||||||
String prefix = "/profile";
|
String fileName = FileUploadUtils.upload(filePath, file);
|
||||||
int startIndex = fileName.indexOf(prefix);
|
String prefix = "/profile";
|
||||||
startIndex += prefix.length();
|
int startIndex = fileName.indexOf(prefix);
|
||||||
String annexPath = "home/ruoyi/uploadPath" + fileName.substring(startIndex);
|
startIndex += prefix.length();
|
||||||
templateManage.setTemOrigPath(annexPath);
|
String annexPath = "home/ruoyi/uploadPath" + fileName.substring(startIndex);
|
||||||
String format = getFileExtension(fileName);
|
templateManage.setTemOrigPath(annexPath);
|
||||||
templateManage.setTemFormat(format);
|
String format = getFileExtension(fileName);
|
||||||
|
templateManage.setTemFormat(format);
|
||||||
|
}
|
||||||
templateManage.setUpdateBy(getUsername());
|
templateManage.setUpdateBy(getUsername());
|
||||||
int i = templateManageMapper.updateTemplateManage(templateManage);
|
int i = templateManageMapper.updateTemplateManage(templateManage);
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
@@ -450,6 +452,19 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
|
|||||||
TemplateManage templateManage = new TemplateManage();
|
TemplateManage templateManage = new TemplateManage();
|
||||||
templateManage.setIdentifyId(deptIdentify.getId());
|
templateManage.setIdentifyId(deptIdentify.getId());
|
||||||
List<TemplateManage> templateManages = templateManageMapper.selectTemplateList(templateManage);
|
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;
|
return templateManages;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user