diff --git a/src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java b/src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java index e423a387..8e069922 100644 --- a/src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java +++ b/src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java @@ -1040,6 +1040,7 @@ public class DepositoryRecordController { map.remove("depositoryId"); } } + if (PublicConfig.roleAdminorgList.contains(maindeparment)) { list = depositoryRecordService.findApplicationOutRecordPByCondition(map, userByPort, userKey, token); countBy = depositoryRecordService.findApplicationOutRecordPCountByCondition(map); diff --git a/src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml b/src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml index b9c670f3..4796730c 100644 --- a/src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml +++ b/src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml @@ -413,11 +413,12 @@ and aircode like CONCAT('%', #{code}, '%') + - and applicant_time >= #{startDate} + and applicant_time = ]]> #{startDate} - and applicant_time <= #{endDate} + and applicant_time #{endDate} and airtoGroupId is null @@ -466,10 +467,10 @@ and aircode like CONCAT('%', #{code}, '%') - and applicant_time >= #{startDate} + and applicant_time = ]]> #{startDate} - and applicant_time <= #{endDate} + and applicant_time #{endDate} and airtoGroupId is null @@ -502,6 +503,12 @@ and applicant_time >= #{applicantTime} + + and applicant_time = ]]> #{startDate} + + + and applicant_time #{endDate} + and mversion = #{version} @@ -554,14 +561,20 @@ and applicantTime >= #{applicantTime} + + and applicantTime = ]]> #{startDate} + + + and applicantTime #{endDate} + AND aorstate LIKE CONCAT('%', #{state}, '%') and applyRemark like CONCAT('%', #{applyRemark}, '%') - - and aorcode = #{aorcode} + + and aorcode = #{code} and departmenthead = #{departmenthead} @@ -596,8 +609,8 @@ and mversion = #{version} - - and mcode = #{code} + + and mcode = #{mcode} and placeId = #{placeId} @@ -659,10 +672,10 @@ and aorcode = #{code} - and applicantTime >= #{startDate} + and applicantTime = ]]> #{startDate} - and applicantTime <= #{endDate} + and applicantTime #{endDate} and adminorgid = #{adminorgid} @@ -711,10 +724,10 @@ and aorcode = #{code} - and applicantTime >= #{startDate} + and applicantTime = ]]> #{startDate} - and applicantTime <= #{endDate} + and applicantTime #{endDate} and adminorgid = #{adminorgid} @@ -874,6 +887,12 @@ and applicant_time >= #{applicantTime} + + and applicant_time = ]]> #{startDate} + + + and applicant_time #{endDate} + and airtoGroupId is null @@ -909,13 +928,19 @@ and applicantTime >= #{applicantTime} + + and applicantTime = ]]> #{startDate} + + + and applicantTime #{endDate} + AND aorstate LIKE CONCAT('%', #{state}, '%') and applyRemark like CONCAT('%', #{applyRemark}, '%') - + and aorcode = #{code} @@ -951,8 +976,8 @@ and mversion = #{version} - - and mcode = #{code} + + and mcode = #{mcode} and placeId = #{placeId} @@ -963,6 +988,7 @@ and constructionunitid = #{constructionunitid} + diff --git a/src/main/java/com/dreamchaser/depository_manage/service/impl/DepositoryRecordServiceImpl.java b/src/main/java/com/dreamchaser/depository_manage/service/impl/DepositoryRecordServiceImpl.java index 78b95226..2dd0dcd5 100644 --- a/src/main/java/com/dreamchaser/depository_manage/service/impl/DepositoryRecordServiceImpl.java +++ b/src/main/java/com/dreamchaser/depository_manage/service/impl/DepositoryRecordServiceImpl.java @@ -4247,6 +4247,16 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { String applyTime = (String) map.get("applyTime"); map.put("applicantTime", DateUtil.DateTimeByDayToTimeStamp(applyTime)); } + + if (map.containsKey("startDate")) { + String startDate = (String) map.get("startDate"); + map.put("startDate", DateUtil.DateTimeToTimeStamp(startDate)); + } + if (map.containsKey("endDate")) { + String endDate = (String) map.get("endDate"); + map.put("endDate", DateUtil.DateTimeToTimeStamp(endDate)); + } + List list = depositoryRecordMapper.findApplicationInRecordPByCondition(map); List result = new ArrayList<>(); @@ -4290,12 +4300,12 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { map.put("begin", (page - 1) * size); } if (map.containsKey("startDate")) { - String applyTime = (String) map.get("startDate"); - map.put("startDate", DateUtil.DateTimeByDayToTimeStamp(applyTime)); + String startDate = (String) map.get("startDate"); + map.put("startDate", DateUtil.DateTimeToTimeStamp(startDate)); } if (map.containsKey("endDate")) { - String applyTime = (String) map.get("endDate"); - map.put("endDate", DateUtil.DateTimeByDayToTimeStamp(applyTime)); + String endDate = (String) map.get("endDate"); + map.put("endDate", DateUtil.DateTimeToTimeStamp(endDate)); } List depositoryIdList = roleService.findDepositoryIdForUserHas(userByPort); if (depositoryIdList.size() == 0) { @@ -4358,9 +4368,17 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { if (map.size() <= 2) { map.put("applicantId", userByPort.getId()); } + if (map.containsKey("startDate")) { + String startDate = (String) map.get("startDate"); + map.put("startDate", DateUtil.DateTimeToTimeStamp(startDate)); + } + if (map.containsKey("endDate")) { + String endDate = (String) map.get("endDate"); + map.put("endDate", DateUtil.DateTimeToTimeStamp(endDate)); + } if (map.containsKey("depositoryId")) { depositoryIdList.add(ObjectFormatUtil.toInteger(map.get("depositoryId"))); - } else if (!map.containsKey("depositoryIdList")) { + } else if (!map.containsKey("depositoryIdList")) { List depositoryAndRole = roleService.findDepositoryAndRole(userByPort.getId()); depositoryAndRole.addAll(roleService.findDepositoryAndRole(userByPort.getPosition())); for (RoleAndDepository depository : depositoryAndRole @@ -4372,6 +4390,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { } map.put("depositoryIdList", depositoryIdList); } + List list = depositoryRecordMapper.findApplicationOutRecordPByUser(map); List result = new ArrayList<>(); for (ApplicationOutRecord record : list) { @@ -4440,9 +4459,13 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService { page = ObjectFormatUtil.toInteger(map.get("page")); map.put("begin", (page - 1) * size); } - if (map.containsKey("applyTime")) { - String applyTime = (String) map.get("applyTime"); - map.put("applicantTime", DateUtil.DateTimeByDayToTimeStamp(applyTime)); + if (map.containsKey("startDate")) { + String startDate = (String) map.get("startDate"); + map.put("startDate", DateUtil.DateTimeToTimeStamp(startDate)); + } + if (map.containsKey("endDate")) { + String endDate = (String) map.get("endDate"); + map.put("endDate", DateUtil.DateTimeToTimeStamp(endDate)); } List list = depositoryRecordMapper.findApplicationOutRecordPByCondition(map); List result = new ArrayList<>(); diff --git a/src/main/java/com/dreamchaser/depository_manage/utils/DateUtil.java b/src/main/java/com/dreamchaser/depository_manage/utils/DateUtil.java index c5d5702b..ddce2f69 100644 --- a/src/main/java/com/dreamchaser/depository_manage/utils/DateUtil.java +++ b/src/main/java/com/dreamchaser/depository_manage/utils/DateUtil.java @@ -93,6 +93,10 @@ public class DateUtil { return date.getTime(); } + + + + // 将日期转为时间戳 public static Long DateTimeByMonthToTimeStamp(String dateTime){ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM"); diff --git a/src/main/resources/templates/pages/depository/table-in.html b/src/main/resources/templates/pages/depository/table-in.html index 2610a309..d530bfac 100644 --- a/src/main/resources/templates/pages/depository/table-in.html +++ b/src/main/resources/templates/pages/depository/table-in.html @@ -24,9 +24,9 @@
- + - - +
@@ -133,10 +133,12 @@ //日期 laydate.render({ - elem: '#startDate' + elem: '#startDate', + type: 'datetime' }); //日期 laydate.render({ - elem: '#endDate' + elem: '#endDate', + type: 'datetime' }); table.render({ elem: "#currentTableId", diff --git a/src/main/resources/templates/pages/depository/table-in_mobile.html b/src/main/resources/templates/pages/depository/table-in_mobile.html index 3f1a9922..71a8df45 100644 --- a/src/main/resources/templates/pages/depository/table-in_mobile.html +++ b/src/main/resources/templates/pages/depository/table-in_mobile.html @@ -31,11 +31,11 @@
- - -
@@ -173,10 +173,12 @@ //日期 laydate.render({ - elem: '#startDate' + elem: '#startDate', + type: 'datetime' }); //日期 laydate.render({ - elem: '#endDate' + elem: '#endDate', + type: 'datetime' }); diff --git a/src/main/resources/templates/pages/depository/table-out.html b/src/main/resources/templates/pages/depository/table-out.html index d5d31ce6..32cf68ef 100644 --- a/src/main/resources/templates/pages/depository/table-out.html +++ b/src/main/resources/templates/pages/depository/table-out.html @@ -24,10 +24,10 @@
- - -
@@ -206,10 +206,12 @@ //日期 laydate.render({ - elem: '#startDate' + elem: '#startDate', + type: 'datetime' }); //日期 laydate.render({ - elem: '#endDate' + elem: '#endDate', + type: 'datetime' }); table.render({ elem: "#currentTableId", diff --git a/src/main/resources/templates/pages/depository/table-out_mobile.html b/src/main/resources/templates/pages/depository/table-out_mobile.html index c870fd66..fc600746 100644 --- a/src/main/resources/templates/pages/depository/table-out_mobile.html +++ b/src/main/resources/templates/pages/depository/table-out_mobile.html @@ -26,11 +26,11 @@
- - -
@@ -202,10 +202,12 @@ //日期 laydate.render({ - elem: '#startDate' + elem: '#startDate', + type: 'datetime' }); //日期 laydate.render({ - elem: '#endDate' + elem: '#endDate', + type: 'datetime' });