小程序-机构加盟-申请驳回再提交增加验证:无信息变更时提示无需提交

This commit is contained in:
1378012178@qq.com 2025-10-20 09:36:37 +08:00
parent b2be83a8b2
commit 4a09cfb609
3 changed files with 18 additions and 7 deletions

View File

@ -402,8 +402,19 @@ public class OrgApplyInfoServiceImpl extends ServiceImpl<OrgApplyInfoMapper, Org
public boolean validateChanged(OrgApplyInfoApiEntity orgApplyInfoApiEntity) { public boolean validateChanged(OrgApplyInfoApiEntity orgApplyInfoApiEntity) {
QueryWrapper<OrgApplyInfo> qw = new QueryWrapper<>(); QueryWrapper<OrgApplyInfo> qw = new QueryWrapper<>();
qw.eq("pk_id", orgApplyInfoApiEntity.getPkId()); qw.eq("pk_id", orgApplyInfoApiEntity.getPkId());
qw.eq("status", "2"); if ("1".equals(orgApplyInfoApiEntity.getStatus())) {
qw.eq("status", "3");
} else if ("4".equals(orgApplyInfoApiEntity.getStatus())) {
qw.eq("status", "2");
} else {
qw.eq("status", "-1314");
}
OrgApplyInfo dbRecord = baseMapper.selectOne(qw); OrgApplyInfo dbRecord = baseMapper.selectOne(qw);
if ("1".equals(orgApplyInfoApiEntity.getStatus())) {
if (dbRecord == null) {
return true;
}
}
OrgApplyInfo inputRecord = new OrgApplyInfo(); OrgApplyInfo inputRecord = new OrgApplyInfo();
BeanUtils.copyProperties(orgApplyInfoApiEntity, inputRecord); BeanUtils.copyProperties(orgApplyInfoApiEntity, inputRecord);

View File

@ -71,7 +71,7 @@ public class WxNoticeServiceImpl extends ServiceImpl<WxNoticeMapper, WxNotice> i
qw.select("id"); qw.select("id");
qw.eq("open_id", openId); qw.eq("open_id", openId);
qw.eq("iz_read", "1"); qw.eq("iz_read", "1");
qw.eq("client_type", clientType);//哪个端(机构?员工家属) qw.eq("client_type", clientType);//哪个端(1机构2员工3家属)
List<WxNotice> wxNotices = baseMapper.selectList(qw); List<WxNotice> wxNotices = baseMapper.selectList(qw);
return wxNotices == null ? 0 : wxNotices.size(); return wxNotices == null ? 0 : wxNotices.size();
} }

View File

@ -31,14 +31,14 @@ public class OrgApplyInfoApi {
*/ */
@AutoLog(value = "新增/编辑机构加盟申请信息") @AutoLog(value = "新增/编辑机构加盟申请信息")
@PostMapping("/save") @PostMapping("/save")
public Result<Object> save(@RequestParam("ukey") String ukey,@RequestBody OrgApplyInfoApiEntity orgApplyInfoApiEntity) { public Result<Object> save(@RequestParam("ukey") String ukey, @RequestBody OrgApplyInfoApiEntity orgApplyInfoApiEntity) {
//变更信息时 验证是否有变化 没有变化不允许提交 //变更信息时 验证是否有变化 没有变化不允许提交
if ("4".equals(orgApplyInfoApiEntity.getStatus())) { if ("1".equals(orgApplyInfoApiEntity.getStatus()) || "4".equals(orgApplyInfoApiEntity.getStatus())) {
if(!orgApplyInfoApi.validateChanged(orgApplyInfoApiEntity)){ if (!orgApplyInfoApi.validateChanged(orgApplyInfoApiEntity)) {
return Result.ok("未做变更"); return Result.ok("未做变更");
} }
} }
if(NuRedisUtils.existKey(ukey)){ if (NuRedisUtils.existKey(ukey)) {
return Result.ok("重复提交"); return Result.ok("重复提交");
} }
System.out.println("-----------新增/编辑机构加盟申请信息--------tel------------" + orgApplyInfoApiEntity.getTel()); System.out.println("-----------新增/编辑机构加盟申请信息--------tel------------" + orgApplyInfoApiEntity.getTel());
@ -73,7 +73,7 @@ public class OrgApplyInfoApi {
if (StringUtils.isBlank(openId)) { if (StringUtils.isBlank(openId)) {
return Result.error("未填写openId"); return Result.error("未填写openId");
} }
return Result.ok(orgApplyInfoApi.queryAuditInfo(openId, id,status)); return Result.ok(orgApplyInfoApi.queryAuditInfo(openId, id, status));
} }
} }