Parcourir la source

调整物资类型的数据显示,修改user_name字段为username等

车车 il y a 2 mois
Parent
commit
3eff4eae97

+ 16 - 2
yudao-module-iscs/src/main/java/cn/iocoder/yudao/module/iscs/controller/admin/materials/vo/MaterialsRespVO.java

@@ -3,11 +3,12 @@ package cn.iocoder.yudao.module.iscs.controller.admin.materials.vo;
 import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 import com.alibaba.excel.annotation.ExcelProperty;
 import com.baomidou.mybatisplus.annotation.TableField;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
-import java.time.LocalDate;
 import java.time.LocalDateTime;
+import java.util.Date;
 
 @Schema(description = "管理后台 - 物资 Response VO")
 @Data
@@ -56,7 +57,8 @@ public class MaterialsRespVO {
 
     @Schema(description = "有效期")
     @ExcelProperty("有效期")
-    private LocalDate expirationDate;
+    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd")
+    private Date expirationDate;
 
     @Schema(description = "物资RFID", example = "8812")
     @ExcelProperty("物资RFID")
@@ -111,4 +113,16 @@ public class MaterialsRespVO {
     @Schema(description = "物资柜Name")
     private String cabinetName;
 
+    @Schema(description = "物资类型Name")
+    private String materialsTypeName;
+
+    @Schema(description = "物资规格id")
+    private String propertiesValueId;
+
+    @Schema(description = "物资规格种类id")
+    private String propertiesPropertyId;
+
+    @Schema(description = "最近借取人id")
+    private Long loanUserId;
+
 }

+ 4 - 1
yudao-module-iscs/src/main/java/cn/iocoder/yudao/module/iscs/controller/admin/materialscheckrecord/vo/MaterialsCheckRecordRespVO.java

@@ -2,10 +2,12 @@ package cn.iocoder.yudao.module.iscs.controller.admin.materialscheckrecord.vo;
 
 import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 import com.alibaba.excel.annotation.ExcelProperty;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
 import java.time.LocalDateTime;
+import java.util.Date;
 
 @Schema(description = "管理后台 - 物资检查记录 Response VO")
 @Data
@@ -38,7 +40,8 @@ public class MaterialsCheckRecordRespVO {
 
     @Schema(description = "检查时间")
     @ExcelProperty("检查时间")
-    private LocalDateTime checkDate;
+    @JsonFormat(timezone="GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date checkDate;
 
     @Schema(description = "异常原因(字典exceptions_status)", example = "不对")
     @ExcelProperty("异常原因(字典exceptions_status)")

+ 6 - 0
yudao-module-iscs/src/main/java/cn/iocoder/yudao/module/iscs/controller/admin/materialsloan/vo/MaterialsLoanRespVO.java

@@ -99,4 +99,10 @@ public class MaterialsLoanRespVO {
     @Schema(description = "借出时长")
     private String loanDuration;
 
+    @Schema(description = "物资编号")
+    private String materialsCode;
+
+    @Schema(description = "物资名称")
+    private String materialsName;
+
 }

+ 2 - 2
yudao-module-iscs/src/main/resources/mapper/BlacklistMapper.xml

@@ -16,10 +16,10 @@
         <where>
             b.deleted = 0
             <if test="vo.userName != null and vo.userName.trim != ''">
-                and u.user_name like concat('%',#{vo.userName},'%')
+                and u.username like concat('%',#{vo.userName},'%')
             </if>
             <if test="vo.nickName != null and vo.nickName.trim != ''">
-                and u.nick_name like concat('%',#{vo.nickName},'%')
+                and u.nickname like concat('%',#{vo.nickName},'%')
             </if>
             <if test="vo.userId != null">
                 and b.user_id = #{vo.userId}

+ 1 - 1
yudao-module-iscs/src/main/resources/mapper/ExceptionMapper.xml

@@ -59,7 +59,7 @@
                 and e.exception_level = #{vo.exceptionLevel}
             </if>
             <if test="vo.raiserName != null and vo.raiserName.trim != ''">
-                and u.nick_name like concat('%',#{vo.raiserName},'%')
+                and u.nickname like concat('%',#{vo.raiserName},'%')
             </if>
             <if test="vo.startRaiseTime != null and vo.startRaiseTime.trim != ''">
                 and e.raise_time &gt;= #{vo.startRaiseTime}

+ 3 - 3
yudao-module-iscs/src/main/resources/mapper/MaterialsChangeRecordMapper.xml

@@ -16,8 +16,8 @@
         t.materials_type_name,
         t.materials_type_icon,
         t.materials_type_picture,
-        u.nick_name as change_user_name,
-        mc.cabinet_id,
+        u.nickname as change_user_name,
+        mc.id as cabinet_id,
         mc.cabinet_name,
         m.materials_name as new_materials_name,
         m2.materials_name as old_materials_name
@@ -43,7 +43,7 @@
                 and c.change_user_id = #{vo.changeUserId}
             </if>
             <if test="vo.changeUserName != null and vo.changeUserName.trim != ''">
-                and u.nick_name like concat('%',#{vo.changeUserName},'%')
+                and u.nickname like concat('%',#{vo.changeUserName},'%')
             </if>
             <if test="vo.startTime != null and vo.startTime.trim != ''">
                 and c.change_date &gt;= #{vo.startTime}

+ 1 - 1
yudao-module-iscs/src/main/resources/mapper/MaterialsCheckPlanMapper.xml

@@ -29,7 +29,7 @@
                 and p.plan_date &lt;= #{vo.endTime}
             </if>
             <if test="vo.checkUserName != null and vo.checkUserName.trim != ''">
-                and u.nick_name like concat('%',#{vo.checkUserName},'%')
+                and u.nickname like concat('%',#{vo.checkUserName},'%')
             </if>
             <if test="vo.status != null and vo.status.trim != ''">
                 and p.status = #{vo.status}

+ 2 - 2
yudao-module-iscs/src/main/resources/mapper/MaterialsCheckRecordMapper.xml

@@ -20,7 +20,7 @@
         m.materials_rfid,
         mc.cabinet_name,
         p.plan_name,
-        u.nick_name as check_user_name
+        u.nickname as check_user_name
         FROM
         isc_materials_check_record r
         LEFT JOIN isc_materials_check_plan p ON p.id = r.plan_id
@@ -61,7 +61,7 @@
                 and r.reason = #{vo.reason}
             </if>
         </where>
-        order by r.record_id desc
+        order by r.id desc
 
 
 

+ 4 - 4
yudao-module-iscs/src/main/resources/mapper/MaterialsLoanMapper.xml

@@ -17,8 +17,8 @@
         m.materials_name,
         c1.cabinet_name as loan_from_name,
         c2.cabinet_name as restitution_to_name,
-        u.user_name as loan_user_name,
-        u1.user_name as restitution_user_name,
+        u.username as loan_user_name,
+        u1.username as restitution_user_name,
         m.materials_type_id,
         mt.materials_type_name,
         mt.materials_type_icon,
@@ -61,7 +61,7 @@
                 and m.materials_type_id = #{vo.materialsTypeId}
             </if>
             <if test="vo.loanUserName != null and vo.loanUserName.trim != ''">
-                and u.user_name like concat('%',#{vo.loanUserName},'%')
+                and u.username like concat('%',#{vo.loanUserName},'%')
             </if>
             <if test="vo.loanTimeStart != null and vo.loanTimeStart.trim != ''">
                 and l.loan_time &gt;= #{vo.loanTimeStart}
@@ -70,7 +70,7 @@
                 and l.loan_time &lt;= #{vo.loanTimeEnd}
             </if>
             <if test="vo.restitutionUserName != null and vo.restitutionUserName.trim != ''">
-                and u1.user_name like concat('%',#{vo.restitutionUserName},'%')
+                and u1.username like concat('%',#{vo.restitutionUserName},'%')
             </if>
             <if test="vo.restitutionTimeStart != null and vo.restitutionTimeStart.trim != ''">
                 and l.actual_restitution_time &gt;= #{vo.restitutionTimeStart}

+ 1 - 1
yudao-module-iscs/src/main/resources/mapper/StatisticsMapper.xml

@@ -194,7 +194,7 @@
         order by t.id asc
     </select>
     <select id="getUserLoanStatistics" resultType="cn.iocoder.yudao.module.iscs.controller.admin.statistics.vo.UserLoanStatisticsVO">
-        SELECT a.user_id, a.user_name, a.nick_name,
+        SELECT a.user_id, a.user_name, a.nickname,
         ( CASE WHEN b.all_count IS NULL THEN 0 ELSE b.all_count END ) AS all_count,
         ( CASE WHEN c.normal_count IS NULL THEN 0 ELSE c.normal_count END ) AS normal_count,
         ( CASE WHEN d.timeout_count IS NULL THEN 0 ELSE d.timeout_count END ) AS timeout_count