bug修复

This commit is contained in:
马三炮 2025-10-23 17:37:19 +08:00
parent 77c3923827
commit 235582756c
1 changed files with 34 additions and 11 deletions

View File

@ -3,6 +3,7 @@ package com.bonus.bmw.controller;
import com.bonus.bmw.domain.dto.*;
import com.bonus.bmw.domain.po.PmProject;
import com.bonus.bmw.service.RepairCardApplyService;
import com.bonus.common.core.utils.StringUtils;
import com.bonus.common.core.utils.encryption.Sm4Utils;
import com.bonus.common.core.utils.json.FastJsonHelper;
import com.bonus.common.core.utils.poi.ExcelUtil;
@ -150,11 +151,21 @@ public class RepairCardApplyController extends BaseController {
*/
@PostMapping("/saveRepairCardApply")
public AjaxResult saverepairCardApply(@RequestParam(value = "file", required = false) MultipartFile[] files, @RequestParam(value = "fileMsg", required = false) String fileMsg, @RequestParam(value = "params") String params) {
params= Sm4Utils.decrypt(params);
fileMsg= Sm4Utils.decrypt(fileMsg);
List<WebFileDto> listFile = FastJsonHelper.jsonArrStrToBeanList(fileMsg, WebFileDto.class);
RepairCardApplyDto cardApplyDto = FastJsonHelper.jsonStrToBean(params, RepairCardApplyDto.class);
return repairCardApplyMapper.saverepairCardApply(cardApplyDto, new FileBasicMsgDto(listFile, files));
try{
params= Sm4Utils.decrypt(params);
fileMsg= Sm4Utils.decrypt(fileMsg);
List<WebFileDto> listFile = FastJsonHelper.jsonArrStrToBeanList(fileMsg, WebFileDto.class);
RepairCardApplyDto cardApplyDto = FastJsonHelper.jsonStrToBean(params, RepairCardApplyDto.class);
if (StringUtils.isNull(cardApplyDto)){
return AjaxResult.error("补卡人员信息为空");
}
return repairCardApplyMapper.saverepairCardApply(cardApplyDto, new FileBasicMsgDto(listFile, files));
}catch (Exception e){
logger.error(e.toString(), e);
return AjaxResult.error("新增失败");
}
}
/**
@ -176,11 +187,18 @@ public class RepairCardApplyController extends BaseController {
*/
@PostMapping("/updateRepairCardApply")
public AjaxResult updateRepairCardApply(@RequestParam(value = "file", required = false) MultipartFile[] files, @RequestParam(value = "fileMsg", required = false) String fileMsg, @RequestParam(value = "params") String params) {
params= Sm4Utils.decrypt(params);
fileMsg= Sm4Utils.decrypt(fileMsg);
List<WebFileDto> listFile = FastJsonHelper.jsonArrStrToBeanList(fileMsg, WebFileDto.class);
RepairCardApplyDto cardApplyDto = FastJsonHelper.jsonStrToBean(params, RepairCardApplyDto.class);
return repairCardApplyMapper.updateRepairCardApply(cardApplyDto, new FileBasicMsgDto(listFile, files));
try {
params= Sm4Utils.decrypt(params);
fileMsg= Sm4Utils.decrypt(fileMsg);
List<WebFileDto> listFile = FastJsonHelper.jsonArrStrToBeanList(fileMsg, WebFileDto.class);
RepairCardApplyDto cardApplyDto = FastJsonHelper.jsonStrToBean(params, RepairCardApplyDto.class);
return repairCardApplyMapper.updateRepairCardApply(cardApplyDto, new FileBasicMsgDto(listFile, files));
}catch (Exception e){
logger.error(e.toString(), e);
return AjaxResult.error("修改失败");
}
}
/**
@ -203,7 +221,12 @@ public class RepairCardApplyController extends BaseController {
*/
@PostMapping("/audit")
public AjaxResult audit(@RequestBody RepairCardApplyDto cardApplyDto) {
return repairCardApplyMapper.audit(cardApplyDto);
try {
return repairCardApplyMapper.audit(cardApplyDto);
}catch (Exception e){
logger.error(e.toString(), e);
return AjaxResult.error("审核失败");
}
}
/**