|
@@ -44,6 +44,7 @@ import java.io.IOException;
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
import java.net.URLDecoder;
|
|
|
import java.text.ParseException;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
@@ -135,7 +136,9 @@ public class MaterialInfoController {
|
|
|
queryWrapper = QueryGenerator.initQueryWrapper(materialInfo, req.getParameterMap());
|
|
|
if (!Check.isNull(createTime)) {
|
|
|
try {
|
|
|
- Map<String, Object> map = DateUtils.getStartEndTime(createTime.toString());
|
|
|
+ SimpleDateFormat sim = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ String format = sim.format(createTime);
|
|
|
+ Map<String, Object> map = DateUtils.getStartEndTime(format);
|
|
|
queryWrapper.ge("create_time", map.get("start"));
|
|
|
queryWrapper.lt("create_time", map.get("end"));
|
|
|
} catch (ParseException e) {
|
|
@@ -156,11 +159,14 @@ public class MaterialInfoController {
|
|
|
public Result<IPage<MaterialInfo>> queryPageList(MaterialInfo materialInfo,
|
|
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
|
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
|
|
- HttpServletRequest req) {
|
|
|
+ HttpServletRequest req) throws ParseException {
|
|
|
|
|
|
Result<IPage<MaterialInfo>> result = new Result<>();
|
|
|
QueryWrapper<MaterialInfo> queryWrapper = new QueryWrapper<>();
|
|
|
Object createTime = materialInfo.getCreateTime();
|
|
|
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ String date = simpleDateFormat.format(createTime.toString());
|
|
|
+
|
|
|
materialInfo.setCreateTime(null);
|
|
|
if (!Check.isNull(materialInfo.getUserId())) {
|
|
|
String roleCode = materialInfoService.getRoleCodeByUserId(materialInfo.getUserId());
|
|
@@ -187,7 +193,7 @@ public class MaterialInfoController {
|
|
|
}
|
|
|
if (!Check.isNull(createTime)) {
|
|
|
try {
|
|
|
- Map<String, Object> map = DateUtils.getStartEndTime(createTime.toString());
|
|
|
+ Map<String, Object> map = DateUtils.getStartEndTime(date);
|
|
|
queryWrapper.ge("create_time", map.get("start"));
|
|
|
queryWrapper.lt("create_time", map.get("end"));
|
|
|
} catch (ParseException e) {
|