Browse Source

1、解决工单分页搜索;2、解决任务重新提交问题;

tags/v1.0.0^2^2
wanjing 1 year ago
parent
commit
8c3ff06f4d
3 changed files with 3 additions and 15 deletions
  1. +0
    -5
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/request/inspection/EditInspectionRequest.java
  2. +2
    -9
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/resubmit/ResubmitInspectionService.java
  3. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/resources/mapper/WorkOrderMapper.xml

+ 0
- 5
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/request/inspection/EditInspectionRequest.java View File

*/ */
private String userId; private String userId;


/**
* 租户id
*/
private Integer tenantId;

/** /**
* 任务编码 * 任务编码
*/ */

+ 2
- 9
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/resubmit/ResubmitInspectionService.java View File

*/ */
public JsonResult resubmit(EditInspectionRequest request) { public JsonResult resubmit(EditInspectionRequest request) {
log.info("进入重新提交任务业务"); log.info("进入重新提交任务业务");
String userId = CurrentUserUtil.getUserId();
String tenantId = CurrentUserUtil.getTenantId();
User user = CurrentUserUtil.getUserInfo();
String tenantId = user.getTenantId();
JsonResult result = this.checkParam(tenantId, request); JsonResult result = this.checkParam(tenantId, request);
if (0 != result.getCode()) { if (0 != result.getCode()) {
log.info("重新提交任务业务:校验参数失败:{}", result.getMsg()); log.info("重新提交任务业务:校验参数失败:{}", result.getMsg());
return result; return result;
} }
User user = userMapper.selectOne(new LambdaQueryWrapper<User>()
.eq(User::getTenantId, tenantId)
.eq(User::getId, userId)
.eq(User::getMark, 1));
if (null == user) {
return JsonResult.error(ResubmitInspectionCodeEnum.USER_IS_NOT_EXIST.getCode(), ResubmitInspectionCodeEnum.USER_IS_NOT_EXIST.getMsg());
}
// 构造inspection对象 // 构造inspection对象
result = this.buildInspection(user, tenantId, request); result = this.buildInspection(user, tenantId, request);
if (0 != result.getCode()) { if (0 != result.getCode()) {

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/resources/mapper/WorkOrderMapper.xml View File

<where> <where>
<if test="1 == 1"> and mark = 1 </if> <if test="1 == 1"> and mark = 1 </if>
<if test="request.tenantId != null and request.tenantId != ''"> and tenant_id = #{request.tenantId} </if> <if test="request.tenantId != null and request.tenantId != ''"> and tenant_id = #{request.tenantId} </if>
<if test="request.code != null and request.code != 0"> and code = #{request.code} </if>
<if test="request.code != null and request.code != ''"> and code = #{request.code} </if>
<if test="request.status != null and request.status != ''"> and status = #{request.status} </if> <if test="request.status != null and request.status != ''"> and status = #{request.status} </if>
<if test="(request.userDeptId != null and request.userDeptId != '') or (request.deptIdList != null and request.deptIdList.size() > 0)"> <if test="(request.userDeptId != null and request.userDeptId != '') or (request.deptIdList != null and request.deptIdList.size() > 0)">
and ( and (

Loading…
Cancel
Save