时间格式序列化

This commit is contained in:
syruan 2023-12-24 01:51:42 +08:00
parent f7501db4a5
commit 7e06bc88b2
5 changed files with 19 additions and 2 deletions

View File

@ -1,5 +1,6 @@
package com.bonus.sgzb.base.api.domain; package com.bonus.sgzb.base.api.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -63,6 +64,12 @@ public class LeaseApplyDetails implements Serializable {
@ApiModelProperty(value = "已领数量") @ApiModelProperty(value = "已领数量")
private Double alNum; private Double alNum;
/**
* 此数量是剩余需要出库的数量preNum - alNum
*/
@ApiModelProperty(value = "剩余最大出库数量")
private Double outNum;
/** 审批数量 */ /** 审批数量 */
@ApiModelProperty(value = "审批数量") @ApiModelProperty(value = "审批数量")
private Double auditNum; private Double auditNum;
@ -84,6 +91,7 @@ public class LeaseApplyDetails implements Serializable {
*/ */
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime; private Date createTime;
/** /**
@ -97,6 +105,7 @@ public class LeaseApplyDetails implements Serializable {
*/ */
@ApiModelProperty(value = "更新时间 ") @ApiModelProperty(value = "更新时间 ")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime; private Date updateTime;
/** /**

View File

@ -1,5 +1,6 @@
package com.bonus.sgzb.base.api.domain; package com.bonus.sgzb.base.api.domain;
import com.alibaba.fastjson2.annotation.JSONField;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -121,6 +122,7 @@ public class LeaseApplyInfo implements Serializable {
*/ */
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date createTime; private Date createTime;
/** /**
@ -134,6 +136,7 @@ public class LeaseApplyInfo implements Serializable {
*/ */
@ApiModelProperty(value = "更新时间") @ApiModelProperty(value = "更新时间")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date updateTime; private Date updateTime;
/** /**

View File

@ -1,5 +1,6 @@
package com.bonus.sgzb.base.api.domain; package com.bonus.sgzb.base.api.domain;
import com.alibaba.fastjson2.annotation.JSONField;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -62,6 +63,7 @@ public class LeaseOutDetails implements Serializable {
/** 创建时间 */ /** 创建时间 */
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date createTime; private Date createTime;
/** 更新者 */ /** 更新者 */
@ -70,6 +72,7 @@ public class LeaseOutDetails implements Serializable {
/** 更新时间 */ /** 更新时间 */
@ApiModelProperty(value = "更新时间") @ApiModelProperty(value = "更新时间")
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date updateTime; private Date updateTime;
/** 备注 */ /** 备注 */

View File

@ -1,5 +1,6 @@
package com.bonus.sgzb.base.api.domain; package com.bonus.sgzb.base.api.domain;
import com.alibaba.fastjson2.annotation.JSONField;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@ -83,6 +84,7 @@ public class TmTask implements Serializable {
*/ */
@ApiModelProperty(value="创建时间") @ApiModelProperty(value="创建时间")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date createTime; private Date createTime;
/** /**
@ -96,6 +98,7 @@ public class TmTask implements Serializable {
*/ */
@ApiModelProperty(value="更新时间") @ApiModelProperty(value="更新时间")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date updateTime; private Date updateTime;
/** /**
@ -197,7 +200,6 @@ public class TmTask implements Serializable {
@ApiModelProperty(value="公司审批备注") @ApiModelProperty(value="公司审批备注")
private String companyAuditRemark; private String companyAuditRemark;
@ApiModelProperty(value="分管审批人") @ApiModelProperty(value="分管审批人")
private String deptAuditBy; private String deptAuditBy;

View File

@ -512,7 +512,7 @@
SELECT SELECT
lad.*, mt.type_name AS typeModelName, mt1.type_name AS typeName,mt.unit_name as unitName, mt.manage_type as manageType, lad.*, mt.type_name AS typeModelName, mt1.type_name AS typeName,mt.unit_name as unitName, mt.manage_type as manageType,
case WHEN mt.manage_type = '0' then '编号' else '计数' end manageTypeName, case WHEN mt.manage_type = '0' then '编号' else '计数' end manageTypeName,
mt.num mt.num, (lad.pre_num - IF(lad.al_num IS NULL,'0',lad.al_num)) AS outNum
FROM FROM
lease_apply_details lad lease_apply_details lad
LEFT JOIN ma_type mt ON lad.type_id = mt.type_id LEFT JOIN ma_type mt ON lad.type_id = mt.type_id