|
@@ -46,7 +46,7 @@ public class ZywwService {
|
|
|
|
|
|
@Autowired
|
|
|
private ZywwApplyInfoMapper zywwApplyInfoMapper;
|
|
|
- @Resource
|
|
|
+ @Autowired
|
|
|
private JavaMailSender mailSender;
|
|
|
@Autowired
|
|
|
private ServerConfig serverConfig;
|
|
@@ -270,15 +270,24 @@ public class ZywwService {
|
|
|
public Page<ZywwApplyInfo> getDataByPage(Integer approveStatus, String type, JSONObject reqBody){
|
|
|
Integer pageIndex = reqBody.getInteger("pageIndex") == null? 1:reqBody.getInteger("pageIndex");
|
|
|
Integer pageSize = reqBody.getInteger("pageSize") == null? 10:reqBody.getInteger("pageSize");
|
|
|
- // 构造查询条件
|
|
|
+ String applyFormId = reqBody.getString("applyFormId");
|
|
|
+ // 构造查询条件,支持多条件查询
|
|
|
QueryWrapper<ZywwApplyInfo> queryWrapper = new QueryWrapper<>();
|
|
|
// 1.查询当前用户能看到的整个系统中的全量"待审批"的记录,暂不考虑用户所属具体部门的因素
|
|
|
if (approveStatus != null && approveStatus == 0 && "approve".equals(type)){
|
|
|
+ // 匹配列表中的一条,对"待审批"的申请信息做数据回显及提供审批功能
|
|
|
+ if(StringUtils.isNotBlank(applyFormId)){
|
|
|
+ queryWrapper.eq("APPLY_FORM_ID", applyFormId);
|
|
|
+ }
|
|
|
queryWrapper.eq("APPROVE_STATUS_CODE", 0);
|
|
|
}
|
|
|
// 2.查询当前用户提交的全量"审批中"的申请记录(包含待审批记录、审批驳回记录)
|
|
|
SysUser user = SecurityUtils.getLoginUser().getUser();
|
|
|
if (approveStatus != null && approveStatus == 3 && "apply".equals(type)){
|
|
|
+ // 匹配列表中的一条,对"审批中"的申请信息做数据回显及提供修改功能
|
|
|
+ if(StringUtils.isNotBlank(applyFormId)){
|
|
|
+ queryWrapper.eq("APPLY_FORM_ID", applyFormId);
|
|
|
+ }
|
|
|
queryWrapper.eq("CREATE_USER_POLICE_NO", user.getPoliceNo());
|
|
|
queryWrapper.eq("APPROVE_STATUS_CODE", 0); // 待审批
|
|
|
queryWrapper.or();
|
|
@@ -286,6 +295,10 @@ public class ZywwService {
|
|
|
}
|
|
|
// 3.查询当前用户提交的全量"已审批"的申请记录(只包含审批通过记录)
|
|
|
if (approveStatus != null && approveStatus == 1 && "apply".equals(type)){
|
|
|
+ // 匹配列表中的一条,对"已审批"的申请信息做数据回显
|
|
|
+ if(StringUtils.isNotBlank(applyFormId)){
|
|
|
+ queryWrapper.eq("APPLY_FORM_ID", applyFormId);
|
|
|
+ }
|
|
|
queryWrapper.eq("CREATE_USER_POLICE_NO", user.getPoliceNo());
|
|
|
queryWrapper.eq("APPROVE_STATUS_CODE", 1);
|
|
|
}
|