人员岗位补负责人/线路维护,并同步后台人员、机器人回复与看板页改动。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
linmianxun
2026-09-15 11:12:13 +08:00
co-authored by Cursor
parent a7a8487eb3
commit 58b3c2f3e6
7 changed files with 425 additions and 155 deletions
@@ -114,7 +114,25 @@ public class InquiryStaffRoleController extends JeecgController<InquiryStaffRole
}
normalize(body);
body.setUpdateTime(new Date());
staffRoleService.updateById(body);
// 销售岗位需把 is_leader 写成 NULL;updateById 默认跳过 null,故用 UpdateWrapper
if ("sales".equals(body.getRoleCode())) {
staffRoleService.lambdaUpdate()
.eq(InquiryStaffRole::getId, body.getId())
.set(InquiryStaffRole::getName, body.getName())
.set(InquiryStaffRole::getWecomId, body.getWecomId())
.set(InquiryStaffRole::getMobile, body.getMobile())
.set(InquiryStaffRole::getDepartName, body.getDepartName())
.set(InquiryStaffRole::getRoleCode, body.getRoleCode())
.set(InquiryStaffRole::getRoleLabel, body.getRoleLabel())
.set(InquiryStaffRole::getRoutes, "")
.set(InquiryStaffRole::getIsLeader, null)
.set(InquiryStaffRole::getNotifyEventException, body.getNotifyEventException())
.set(InquiryStaffRole::getStatus, body.getStatus())
.set(InquiryStaffRole::getUpdateTime, body.getUpdateTime())
.update();
} else {
staffRoleService.updateById(body);
}
return Result.OK("更新成功");
}
@@ -214,5 +232,18 @@ public class InquiryStaffRoleController extends JeecgController<InquiryStaffRole
if (body.getNotifyEventException() == null) {
body.setNotifyEventException(0);
}
// 销售无负责人/线路;产品与航线须维护(与旧项目 admin-staff 一致)
String role = body.getRoleCode();
if ("sales".equals(role)) {
body.setIsLeader(null);
body.setRoutes("");
} else if ("air".equals(role) || "sea".equals(role) || "land".equals(role)) {
if (body.getIsLeader() == null) {
throw new IllegalArgumentException("请选择是否负责人");
}
if (StringUtils.isBlank(body.getRoutes())) {
throw new IllegalArgumentException("请选择负责线路");
}
}
}
}
@@ -50,9 +50,18 @@ public class InquiryStaffRole implements Serializable {
@ApiModelProperty("角色展示名")
private String roleLabel;
@ApiModelProperty("负责线路")
@ApiModelProperty("负责线路(逗号分隔;销售可空)")
private String routes;
/**
* 是否线路/产品负责人。
* <p>
* 仅航线·空运 / 产品·海运 / 产品·陆运有意义:1=是、0=否;销售岗位为 null。
* 成交/未成交等通知可按线路找负责人(后台维护,智能体后续读取)。
*/
@ApiModelProperty("是否负责人 1是0否,销售为空")
private Integer isLeader;
@ApiModelProperty("是否接收事件异常提醒 0/1")
private Integer notifyEventException;