24282 1 жил өмнө
parent
commit
90a2e714d0

+ 1 - 1
sd-business/src/main/java/com/sd/business/entity/in/emums/InDetailTypeEnum.java

@@ -35,7 +35,7 @@ public enum InDetailTypeEnum {
     public static InDetailTypeEnum getInDetailType(Integer key) {
         InDetailTypeEnum inDetailTypeEnum = map.get(key);
         if (inDetailTypeEnum == null) {
-            throw new ServiceException("未知入库类型");
+            throw new ServiceException("未知入库类型");
         }
         return inDetailTypeEnum;
     }

+ 1 - 1
sd-business/src/main/java/com/sd/business/entity/in/emums/OutDetailTypeEnum.java

@@ -35,7 +35,7 @@ public enum OutDetailTypeEnum {
     public static OutDetailTypeEnum getOutDetailType(Integer key) {
         OutDetailTypeEnum outDetailTypeEnum = map.get(key);
         if (outDetailTypeEnum == null) {
-            throw new ServiceException("未知出库类型");
+            throw new ServiceException("未知出库类型");
         }
         return outDetailTypeEnum;
     }

+ 10 - 13
sd-business/src/main/java/com/sd/business/service/statement/impl/StatementOfAccountMergeServiceImpl.java

@@ -78,25 +78,28 @@ public class StatementOfAccountMergeServiceImpl implements StatementOfAccountMer
 
             // 季度
             case 2:
-                wrapper.select("department_id AS departmentId", "GROUP_CONCAT(id) AS idGroupConcat",
-                        "DATE_FORMAT(time_period,'%Y/%m月') AS dimensionality",
+                wrapper.select("department_id AS departmentId",
+                        "GROUP_CONCAT(id) AS idGroupConcat",
                         "CONCAT(YEAR(time_period),'/第',QUARTER(time_period),'季度') AS dimensionality");
-
                 wrapper.groupBy("dimensionality");
                 break;
 
             // 年度
             case 3:
-                wrapper.select("department_id AS departmentId", "GROUP_CONCAT(id) AS idGroupConcat",
-                        "DATE_FORMAT(time_period,'%Y/%m月') AS dimensionality",
+                wrapper.select("department_id AS departmentId",
+                        "GROUP_CONCAT(id) AS idGroupConcat",
                         "YEAR(time_period) AS dimensionality");
                 wrapper.groupBy("dimensionality");
                 break;
 
             // 自定义
             case 4:
-                wrapper.select("department_id AS departmentId", "GROUP_CONCAT(id) AS idGroupConcat",
-                        "DATE_FORMAT(time_period,'%Y/%m月') AS dimensionality");
+                String beginTime = dto.getBeginTime() == null ? StringPool.EMPTY : DateUtil.formatDate(dto.getBeginTime());
+                String endTime = dto.getEndTime() == null ? StringPool.EMPTY : DateUtil.formatDate(dto.getEndTime());
+
+                wrapper.select("department_id AS departmentId",
+                        "GROUP_CONCAT(id) AS idGroupConcat",
+                        "'" + beginTime + " - " + endTime + "' AS dimensionality");
                 wrapper.ge(ObjectUtil.isNotNull(dto.getBeginTime()), "time_period", dto.getBeginTime());
                 wrapper.le(ObjectUtil.isNotNull(dto.getEndTime()), "time_period", dto.getEndTime());
                 break;
@@ -128,12 +131,6 @@ public class StatementOfAccountMergeServiceImpl implements StatementOfAccountMer
 
         for (StatementOfAccountMergePageVo record : records) {
 
-            if (dto.getType().equals(4)) {
-                String beginTime = dto.getBeginTime() == null ? StringPool.EMPTY : DateUtil.formatDate(dto.getBeginTime());
-                String endTime = dto.getEndTime() == null ? StringPool.EMPTY : DateUtil.formatDate(dto.getEndTime());
-                record.setDimensionality(beginTime + StringPool.DASH + endTime);
-            }
-
             String[] tempStatementOfAccountIdList = record.getIdGroupConcat().split(",");
 
             record.setReconcilingAmount(BigDecimal.ZERO);