Commit e4001b5a authored by tangwei's avatar tangwei

增加时间格式化,以及时间过滤条件

parent 14a1df8a
...@@ -2,6 +2,9 @@ package com.yeejoin.amos.boot.module.jcs.api.entity; ...@@ -2,6 +2,9 @@ package com.yeejoin.amos.boot.module.jcs.api.entity;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date; import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -42,8 +45,9 @@ public class FirefightersContract extends BaseEntity { ...@@ -42,8 +45,9 @@ public class FirefightersContract extends BaseEntity {
private String partyB; private String partyB;
@ApiModelProperty(value = "签订日期") @ApiModelProperty(value = "签订日期")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date signedTime; private Date signedTime;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value = "到期时间") @ApiModelProperty(value = "到期时间")
private Date expireTime; private Date expireTime;
...@@ -60,7 +64,6 @@ public class FirefightersContract extends BaseEntity { ...@@ -60,7 +64,6 @@ public class FirefightersContract extends BaseEntity {
@ApiModelProperty(value = "人员id") @ApiModelProperty(value = "人员id")
private Long firefightersId; private Long firefightersId;
@ApiModelProperty(value = "更新时间") @ApiModelProperty(value = "更新时间")
@TableField(fill=FieldFill.UPDATE) @TableField(fill=FieldFill.UPDATE)
private Date updateTime; private Date updateTime;
......
...@@ -2,6 +2,9 @@ package com.yeejoin.amos.boot.module.jcs.api.entity; ...@@ -2,6 +2,9 @@ package com.yeejoin.amos.boot.module.jcs.api.entity;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date; import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -51,6 +54,7 @@ public class FirefightersJacket extends BaseEntity { ...@@ -51,6 +54,7 @@ public class FirefightersJacket extends BaseEntity {
private String equipmentTypeName; private String equipmentTypeName;
@ApiModelProperty(value = "配发日期") @ApiModelProperty(value = "配发日期")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date allotmentTime; private Date allotmentTime;
@ApiModelProperty(value = "更新时间") @ApiModelProperty(value = "更新时间")
......
...@@ -2,6 +2,9 @@ package com.yeejoin.amos.boot.module.jcs.api.entity; ...@@ -2,6 +2,9 @@ package com.yeejoin.amos.boot.module.jcs.api.entity;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date; import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -34,7 +37,7 @@ public class FirefightersThought extends BaseEntity { ...@@ -34,7 +37,7 @@ public class FirefightersThought extends BaseEntity {
@ApiModelProperty(value = "消防救援人员") @ApiModelProperty(value = "消防救援人员")
private Long firefightersId; private Long firefightersId;
@DateTimeFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty(value = "谈话时间") @ApiModelProperty(value = "谈话时间")
private Date talkingTime; private Date talkingTime;
......
...@@ -25,6 +25,7 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation; ...@@ -25,6 +25,7 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date;
/** /**
...@@ -139,6 +140,9 @@ public class FirefightersContractController extends BaseController { ...@@ -139,6 +140,9 @@ public class FirefightersContractController extends BaseController {
} else if (type.equals(String.class)) { } else if (type.equals(String.class)) {
String fileValue = (String) field.get(firefightersContract); String fileValue = (String) field.get(firefightersContract);
firefightersContractQueryWrapper.eq(name, fileValue); firefightersContractQueryWrapper.eq(name, fileValue);
}else if (type.equals(Date.class)) {
Date fileValue = (Date) field.get(firefightersContract);
firefightersContractQueryWrapper.eq(name, fileValue);
} else { } else {
String fileValue = (String) field.get(firefightersContract); String fileValue = (String) field.get(firefightersContract);
firefightersContractQueryWrapper.eq(name, fileValue); firefightersContractQueryWrapper.eq(name, fileValue);
......
...@@ -23,6 +23,7 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation; ...@@ -23,6 +23,7 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date;
/** /**
* 消防人员配装记录 * 消防人员配装记录
...@@ -128,7 +129,10 @@ public class FirefightersJacketController extends BaseController { ...@@ -128,7 +129,10 @@ public class FirefightersJacketController extends BaseController {
} else if (type.equals(String.class)) { } else if (type.equals(String.class)) {
String fileValue = (String) field.get(firefightersJacket); String fileValue = (String) field.get(firefightersJacket);
firefightersJacketQueryWrapper.eq(name, fileValue); firefightersJacketQueryWrapper.eq(name, fileValue);
} else { } else if (type.equals(Date.class)) {
Date fileValue = (Date) field.get(firefightersJacket);
firefightersJacketQueryWrapper.eq(name, fileValue);
}else {
String fileValue = (String) field.get(firefightersJacket); String fileValue = (String) field.get(firefightersJacket);
firefightersJacketQueryWrapper.eq(name, fileValue); firefightersJacketQueryWrapper.eq(name, fileValue);
} }
......
...@@ -24,6 +24,7 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation; ...@@ -24,6 +24,7 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date;
/** /**
...@@ -132,6 +133,9 @@ public class FirefightersThoughtController extends BaseController { ...@@ -132,6 +133,9 @@ public class FirefightersThoughtController extends BaseController {
} else if (type.equals(String.class)) { } else if (type.equals(String.class)) {
String fileValue = (String) field.get(firefightersThought); String fileValue = (String) field.get(firefightersThought);
firefightersThoughtQueryWrapper.eq(name, fileValue); firefightersThoughtQueryWrapper.eq(name, fileValue);
}else if (type.equals(Date.class)) {
Date fileValue = (Date) field.get(firefightersThought);
firefightersThoughtQueryWrapper.eq(name, fileValue);
} else { } else {
String fileValue = (String) field.get(firefightersThought); String fileValue = (String) field.get(firefightersThought);
firefightersThoughtQueryWrapper.eq(name, fileValue); firefightersThoughtQueryWrapper.eq(name, fileValue);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment