This commit is contained in:
1378012178@qq.com 2025-07-30 13:39:19 +08:00
commit c41bdb2a9c
7 changed files with 64 additions and 2 deletions

View File

@ -137,7 +137,17 @@ public class OrgApplyInfoController extends JeecgController<OrgApplyInfo, IOrgAp
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody OrgApplyInfo orgApplyInfo) {
orgApplyInfoService.audit(orgApplyInfo);
return Result.OK("保存成功!");
return Result.OK("审核完成!");
}
@AutoLog(value = "上传合同-保存为草稿")
@ApiOperation(value = "上传合同-保存为草稿", notes = "上传合同-保存为草稿")
@RequiresPermissions("orgapplyinfo:nu_org_apply_info:edit")
@RequestMapping(value = "/editCg", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> editCg(@RequestBody OrgApplyInfo orgApplyInfo) {
orgApplyInfoService.audit(orgApplyInfo);
return Result.OK("操作完成!");
}
/**

View File

@ -235,6 +235,7 @@ public class OrgApplyInfo implements Serializable {
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "审核时间")
private java.util.Date auditTime;
private String auditBy;
/**加盟时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")

View File

@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.nu.dto.OrgApplyInfoMQDto;
@ -181,9 +182,11 @@ public class OrgApplyInfoServiceImpl extends ServiceImpl<OrgApplyInfoMapper, Org
@Override
public void audit(OrgApplyInfo orgApplyInfo) {
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
//机构加盟审核时传过来的status是2/3
//机构信息变更时传过来的status是modifyPass和modifyFail
orgApplyInfo.setAuditTime(new Date());
orgApplyInfo.setAuditBy(user.getUsername());
OrgApplyInfo usedData = new OrgApplyInfo();
//机构信息变更审核通过
if ("modifyPass".equals(orgApplyInfo.getStatus())) {
@ -247,8 +250,16 @@ public class OrgApplyInfoServiceImpl extends ServiceImpl<OrgApplyInfoMapper, Org
//推送机构信息变更申请消息小程序
sendOrgAuthInfo(orgApplyInfo.getOpenId(),orgApplyInfo.getId(),"2",orgApplyInfo.getComName());
}
//机构加盟审批流程
baseMapper.updateById(orgApplyInfo);
if(StringUtils.equals("2", orgApplyInfo.getStatus()) && StringUtils.isNotBlank(orgApplyInfo.getContent())){
UpdateWrapper<OrgApplyInfo> updateWrapper = new UpdateWrapper<>();
updateWrapper.set("content",null);
updateWrapper.eq("id", orgApplyInfo.getId());
update(updateWrapper);
}
}
}
@ -317,6 +328,9 @@ public class OrgApplyInfoServiceImpl extends ServiceImpl<OrgApplyInfoMapper, Org
orgApplyInfoMQDto.setOperateBy(sysUser.getRealname());
orgApplyInfoMQDto.setOperateTelephone(sysUser.getPhone());
orgApplyInfoMQDto.setOperateEmail(sysUser.getEmail());
orgApplyInfoMQDto.setAuditStatus("审核成功");
// orgApplyInfoMQDto.setAuditBy(sysUser.getRealname());
// orgApplyInfoMQDto.setAuditTime(orgApplyInfo.getAuditTime());
//运维mq收到后 1自动创建新的机构机构附加信息 2生成运维平台工单
rabbitMQUtil.sendToExchange("hldy.orgApply.build", "hldy.orgApply.build", orgApplyInfoMQDto);
}

View File

@ -87,6 +87,7 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/iot/tq/api/waterMeter/**", "anon"); //水表回调
filterChainDefinitionMap.put("/sys/cas/client/validateLogin", "anon"); //cas验证登录
filterChainDefinitionMap.put("/sys/randomImage/**", "anon"); //登录验证码接口排除
filterChainDefinitionMap.put("/sys/randomInputCode/**", "anon"); //登录验证码接口排除
filterChainDefinitionMap.put("/sys/checkCaptcha", "anon"); //登录验证码接口排除
filterChainDefinitionMap.put("/sys/smsCheckCaptcha", "anon"); //短信次数发送太多验证码排除
filterChainDefinitionMap.put("/sys/login", "anon"); //登录接口排除

View File

@ -213,5 +213,8 @@ public class OrgApplyInfoMQDto implements Serializable {
//加盟上传合同操作人邮箱
private String operateEmail;
private String auditBy;
private String auditStatus;
}

View File

@ -560,6 +560,39 @@ public class LoginController {
return res;
}
/**
* 后台生成图形验证码 有效
* @param response
* @param key
*/
@ApiOperation("获取验证码")
@GetMapping(value = "/randomInputCode/{key}")
public Result<String> randomInputCode(HttpServletResponse response,@PathVariable("key") String key){
Result<String> res = new Result<String>();
try {
//生成验证码
String code = RandomUtil.randomString(BASE_CHECK_CODES,4);
//存到redis中
String lowerCaseCode = code.toLowerCase();
//update-begin-author:taoyan date:2022-9-13 for: VUEN-2245 漏洞发现新漏洞待处理20220906
// 加入密钥作为混淆避免简单的拼接被外部利用用户自定义该密钥即可
String origin = lowerCaseCode+key+jeecgBaseConfig.getSignatureSecret();
String realKey = Md5Util.md5Encode(origin, "utf-8");
//update-end-author:taoyan date:2022-9-13 for: VUEN-2245 漏洞发现新漏洞待处理20220906
redisUtil.set(realKey, lowerCaseCode, 60);
log.info("获取验证码Redis key = {}checkCode = {}", realKey, code);
res.setSuccess(true);
res.setResult(code);
} catch (Exception e) {
log.error(e.getMessage(), e);
res.error500("获取验证码失败,请检查redis配置!");
return res;
}
return res;
}
/**
* 切换菜单表为vue3的表
*/

View File

@ -1950,7 +1950,7 @@ public class SysUserController {
orgApplyInfo.setBuildStatus("5");
orgApplyInfoService.updateById(orgApplyInfo);
result.success("添加成功!");
result.success("初始化成功!账号:" + jsonObject.getString("userName") + " 密码123456");
} catch (Exception e) {
log.error(e.getMessage(), e);
result.error500("操作失败");