yejian016332 3 лет назад
Родитель
Сommit
80f263cd2b

+ 6 - 4
imcs-admin-boot/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/classSchedule/ScheduleUserChangeController.java

@@ -15,6 +15,7 @@ import java.util.Map;
 import java.util.stream.Collectors;
 import com.github.zuihou.base.controller.SuperController;
 import com.github.zuihou.base.R;
+import com.github.zuihou.common.util.StringUtil;
 import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
 import com.github.zuihou.database.mybatis.conditions.query.QueryWrap;
 import com.github.zuihou.log.annotation.SysLog;
@@ -23,6 +24,7 @@ import com.github.zuihou.security.model.SysUser;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 import com.github.zuihou.security.annotation.PreAuth;
@@ -54,10 +56,10 @@ public class ScheduleUserChangeController extends SuperController<ScheduleUserCh
         ScheduleUserChange bean = BeanUtil.toBean(data, ScheduleUserChange.class);
         //Wraps.lbQ(station); 这种写法值 不能和  ${ew.customSqlSegment} 一起使用
         // ${ew.customSqlSegment} 语法一定要手动eq like 等
-        wrapper.like(ScheduleUserChange::getApplyDesc, bean.getApplyDesc())
-                .eq(ScheduleUserChange::getApplyTime, bean.getApplyTime())
-                .eq(ScheduleUserChange::getAuditStatus, bean.getAuditStatus())
-                .orderByDesc(ScheduleUserChange::getCreateTime);
+        wrap.like(StringUtils.isNotBlank(bean.getApplyDesc()) ,"applyDesc", bean.getApplyDesc())
+//                .eq(ScheduleUserChange::getApplyTime, bean.getApplyTime())
+                .eq(StringUtils.isNotBlank(bean.getAuditStatus()),"audit_status", bean.getAuditStatus())
+                .orderByDesc("create_time");
         IPage<ScheduleUserChange> list = baseService.pageList(page, wrapper);
         System.out.println(list);
 

+ 1 - 1
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/classSchedule/dto/ScheduleUserChangePageDTO.java

@@ -80,6 +80,6 @@ public class ScheduleUserChangePageDTO implements Serializable {
      */
     @ApiModelProperty(value = "审核人姓名")
     @Length(max = 32, message = "审核人姓名长度不能超过32")
-    private String auditUserName;
+    private String applyDesc;
 
 }

+ 1 - 18
imcs-admin-boot/imcs-business-entity/src/main/java/com/github/zuihou/business/classSchedule/entity/ScheduleUserChange.java

@@ -46,6 +46,7 @@ import static com.github.zuihou.utils.DateUtils.*;
 @TableName("imcs_s_schedule_user_change")
 @ApiModel(value = "ScheduleUserChange", description = "换班")
 @AllArgsConstructor
+@Builder
 public class ScheduleUserChange extends Entity<Long> {
 
     private static final long serialVersionUID = 1L;
@@ -123,22 +124,4 @@ public class ScheduleUserChange extends Entity<Long> {
     @TableField(exist = false)
     private String changeDictionary;
 
-    @Builder
-    public ScheduleUserChange(Long id, LocalDateTime createTime, Long createUser, LocalDateTime updateTime, Long updateUser,
-                    Long applyUserId, String applyTime, Long changeUserId, String changeTime, String auditStatus,
-                    Long auditUser, LocalDateTime auditTime) {
-        this.id = id;
-        this.createTime = createTime;
-        this.createUser = createUser;
-        this.updateTime = updateTime;
-        this.updateUser = updateUser;
-        this.applyUserId = applyUserId;
-        this.applyTime = applyTime;
-        this.changeUserId = changeUserId;
-        this.changeTime = changeTime;
-        this.auditStatus = auditStatus;
-        this.auditUser = auditUser;
-        this.auditTime = auditTime;
-    }
-
 }