فهرست منبع

Update 调整quota的排序

yue 1 ماه پیش
والد
کامیت
b725ef8d8b

+ 1 - 1
SourceCode/IntelligentRailwayCosting/.script/cmd/Mysql_BuildRcApp_1.x.run.xml

@@ -2,7 +2,7 @@
   <configuration default="false" name="Mysql_BuildRcApp_1.x" type="docker-deploy" factoryName="dockerfile" server-name="104">
     <deployment type="dockerfile">
       <settings>
-        <option name="imageTag" value="railway_costing-app_mysql:1.0.6" />
+        <option name="imageTag" value="railway_costing-app_mysql:1.0.7" />
         <option name="buildOnly" value="true" />
         <option name="contextFolderPath" value="." />
         <option name="sourceFilePath" value="docker/Dockerfile" />

+ 1 - 1
SourceCode/IntelligentRailwayCosting/Docker/docker-compose_mysql.yml

@@ -22,7 +22,7 @@ services:
     build:
       context: ../
       dockerfile: .
-    image: railway_costing-app_mysql:1.0.6
+    image: railway_costing-app_mysql:1.0.7
     container_name: railway_costing-app_mysql
     depends_on:
       - rc-mysql

+ 5 - 3
SourceCode/IntelligentRailwayCosting/app/stores/railway_costing_mysql/project_quota.py

@@ -1,4 +1,4 @@
-from sqlalchemy import and_, or_, desc
+from sqlalchemy import and_, or_, desc, func, Integer
 from datetime import datetime
 from typing import Optional
 
@@ -115,8 +115,10 @@ class ProjectQuotaStore:
 
             # 分页
             query = (
-                query.order_by(ProjectQuotaModel.item_code.asc())
-                .order_by(ProjectQuotaModel.sort.asc())
+                query.order_by(
+                    func.cast(func.substr(ProjectQuotaModel.ex_cell, 2), Integer).asc(),
+                    ProjectQuotaModel.sort.asc(),
+                )
                 .offset((page - 1) * page_size)
                 .limit(page_size)
             )

+ 5 - 5
SourceCode/IntelligentRailwayCosting/app/views/static/project/quota_info.js

@@ -463,11 +463,11 @@ function LoadQuotaTable(table) {
 			return row.copy_quota_id > 0 || row.copy_quota_id === -1 ? 'tr-primary' : row.note || !row.quota_code ? 'tr-warning' : ''
 		},
 		columns: [
-			{
-				title: '序号',
-				data: 'id',
-				width: '80px',
-			},
+			// {
+			// 	title: '序号',
+			// 	data: 'id',
+			// 	width: '80px',
+			// },
 			{
 				title: '条⽬编号',
 				data: 'item_code',