Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cloud-fb
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王衍超
cloud-fb
Commits
41336cc5
Commit
41336cc5
authored
Apr 02, 2021
by
王衍超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of gitlab.beecode.cn:kunlun/xyst_dinas/xyst_dinas_backend into develop
parents
b415eab0
7e829d5b
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
80 additions
and
17 deletions
+80
-17
Contract.mk
.../main/model/com/xyst/dinas/contract/datamodel/Contract.mk
+6
-6
Contract.mk
.../src/main/model/com/xyst/dinas/contract/query/Contract.mk
+2
-2
Contract$contractDetail.jmx
...xyst/dinas/contract/datamodel/Contract$contractDetail.jmx
+4
-4
Contract.jmx
...main/resources/com/xyst/dinas/contract/query/Contract.jmx
+2
-2
Contract.hbm.xml
...dinas.contract/src/main/resources/config/Contract.hbm.xml
+4
-3
ProjectFiledConstant.java
...com/xyst/dinas/project/constant/ProjectFiledConstant.java
+2
-0
ProjectFiledDao.java
...main/java/com/xyst/dinas/project/dao/ProjectFiledDao.java
+5
-0
ProjectFiledDaoImpl.java
.../xyst/dinas/project/internal/dao/ProjectFiledDaoImpl.java
+22
-0
ProjectFiledServiceImpl.java
...nas/project/internal/service/ProjectFiledServiceImpl.java
+17
-0
ProjectFiledService.java
...a/com/xyst/dinas/project/service/ProjectFiledService.java
+4
-0
ProjectFiledController.java
...va/com/xyst/dinas/project/web/ProjectFiledController.java
+12
-0
No files found.
backend/xyst.dinas.contract/src/main/model/com/xyst/dinas/contract/datamodel/Contract.mk
View file @
41336cc5
...
@@ -29,11 +29,11 @@
...
@@ -29,11 +29,11 @@
<annotation id='ea154cb8-f939-4e9f-9793-9673d984161f' attributeId='ffc0a199-4038-4ebf-a94f-a0f12bfc76dd' name='length' value='50'>
<annotation id='ea154cb8-f939-4e9f-9793-9673d984161f' attributeId='ffc0a199-4038-4ebf-a94f-a0f12bfc76dd' name='length' value='50'>
</annotation>
</annotation>
</attribute>
</attribute>
<attribute id='c4154a1b-f727-48cf-9ef0-ad1bee512504' name='purchaseSandUnit' columnName='purchase_sand_
u
nit_id' title='购砂单位' type='com.xyst.dinas.project.datamodel.PurchaseSandCompany' default='' precision='' isArray='false'>
<attribute id='c4154a1b-f727-48cf-9ef0-ad1bee512504' name='purchaseSandUnit' columnName='purchase_sand_
U
nit_id' title='购砂单位' type='com.xyst.dinas.project.datamodel.PurchaseSandCompany' default='' precision='' isArray='false'>
<annotation id='00caecc1-35aa-4342-90c8-250f84609fe4' attributeId='55efd3f5-036a-4ac4-83c9-14e22cf5465a' name='length' value='undefined'></annotation>
<annotation id='00caecc1-35aa-4342-90c8-250f84609fe4' attributeId='55efd3f5-036a-4ac4-83c9-14e22cf5465a' name='length' value='undefined'></annotation>
<annotation id='95a6dd6d-c676-4265-9c8b-d115c13b472f' attributeId='43768653-e259-4b0f-8c9d-8739f030675b' name='mappingType' value='many-to-one'></annotation>
<annotation id='95a6dd6d-c676-4265-9c8b-d115c13b472f' attributeId='43768653-e259-4b0f-8c9d-8739f030675b' name='mappingType' value='many-to-one'></annotation>
</attribute>
</attribute>
<attribute id='cbb5b983-299b-4259-97d9-6470651bb18b' name='purchaseSandUnitName' columnName='purchase_sand_
u
nit_name' title='购砂单位名称' type='string' default='' precision='' isArray='false'>
<attribute id='cbb5b983-299b-4259-97d9-6470651bb18b' name='purchaseSandUnitName' columnName='purchase_sand_
U
nit_name' title='购砂单位名称' type='string' default='' precision='' isArray='false'>
<annotation id='ea154cb8-f939-4e9f-9793-9673d984161f' attributeId='ffc0a199-4038-4ebf-a94f-a0f12bfc76dd' name='length' value='50'>
<annotation id='ea154cb8-f939-4e9f-9793-9673d984161f' attributeId='ffc0a199-4038-4ebf-a94f-a0f12bfc76dd' name='length' value='50'>
</annotation>
</annotation>
</attribute>
</attribute>
...
@@ -127,15 +127,15 @@
...
@@ -127,15 +127,15 @@
<attribute id='77e202d5-a342-436c-8042-adcaa8dde410' name='purchaseAmount' columnName='purchase_amount' title='砂石量(吨)' type='fixnum' default='' precision='' isArray='false'>
<attribute id='77e202d5-a342-436c-8042-adcaa8dde410' name='purchaseAmount' columnName='purchase_amount' title='砂石量(吨)' type='fixnum' default='' precision='' isArray='false'>
<annotation id='b203f8fa-0ad3-4837-a023-0ef742a74f29' attributeId='ff41e7d3-9fba-4a9b-811a-9b66ab87950d' name='length' value='100'>
<annotation id='b203f8fa-0ad3-4837-a023-0ef742a74f29' attributeId='ff41e7d3-9fba-4a9b-811a-9b66ab87950d' name='length' value='100'>
</annotation>
</annotation>
<annotation id='4d1596bd-ae0a-4d7e-8258-5dad66493239' attributeId='7b049c9a-56e4-4791-a0a3-451237fd38a1' name='precision' value='1
0
'>
<annotation id='4d1596bd-ae0a-4d7e-8258-5dad66493239' attributeId='7b049c9a-56e4-4791-a0a3-451237fd38a1' name='precision' value='1
2
'>
</annotation>
</annotation>
<annotation id='1a25ed97-846e-4847-aa21-1a0b025c01ed' attributeId='52a3d8ee-92ab-45dc-b668-46408143254d' name='scale' value='
2
'>
<annotation id='1a25ed97-846e-4847-aa21-1a0b025c01ed' attributeId='52a3d8ee-92ab-45dc-b668-46408143254d' name='scale' value='
4
'>
</annotation>
</annotation>
</attribute>
</attribute>
<attribute id='77e202d5-a342-436c-8042-adcaa8dde410' name='price' columnName='price' title='单价' type='fixnum' default='' precision='' isArray='false'>
<attribute id='77e202d5-a342-436c-8042-adcaa8dde410' name='price' columnName='price' title='单价' type='fixnum' default='' precision='' isArray='false'>
<annotation id='b203f8fa-0ad3-4837-a023-0ef742a74f29' attributeId='ff41e7d3-9fba-4a9b-811a-9b66ab87950d' name='length' value='100'>
<annotation id='b203f8fa-0ad3-4837-a023-0ef742a74f29' attributeId='ff41e7d3-9fba-4a9b-811a-9b66ab87950d' name='length' value='100'>
</annotation>
</annotation>
<annotation id='4d1596bd-ae0a-4d7e-8258-5dad66493239' attributeId='7b049c9a-56e4-4791-a0a3-451237fd38a1' name='precision' value='1
0
'>
<annotation id='4d1596bd-ae0a-4d7e-8258-5dad66493239' attributeId='7b049c9a-56e4-4791-a0a3-451237fd38a1' name='precision' value='1
2
'>
</annotation>
</annotation>
<annotation id='1a25ed97-846e-4847-aa21-1a0b025c01ed' attributeId='52a3d8ee-92ab-45dc-b668-46408143254d' name='scale' value='2'>
<annotation id='1a25ed97-846e-4847-aa21-1a0b025c01ed' attributeId='52a3d8ee-92ab-45dc-b668-46408143254d' name='scale' value='2'>
</annotation>
</annotation>
...
@@ -143,7 +143,7 @@
...
@@ -143,7 +143,7 @@
<attribute id='77e202d5-a342-436c-8042-adcaa8dde410' name='amount' columnName='amount' title='总价' type='fixnum' default='' precision='' isArray='false'>
<attribute id='77e202d5-a342-436c-8042-adcaa8dde410' name='amount' columnName='amount' title='总价' type='fixnum' default='' precision='' isArray='false'>
<annotation id='b203f8fa-0ad3-4837-a023-0ef742a74f29' attributeId='ff41e7d3-9fba-4a9b-811a-9b66ab87950d' name='length' value='100'>
<annotation id='b203f8fa-0ad3-4837-a023-0ef742a74f29' attributeId='ff41e7d3-9fba-4a9b-811a-9b66ab87950d' name='length' value='100'>
</annotation>
</annotation>
<annotation id='4d1596bd-ae0a-4d7e-8258-5dad66493239' attributeId='7b049c9a-56e4-4791-a0a3-451237fd38a1' name='precision' value='1
0
'>
<annotation id='4d1596bd-ae0a-4d7e-8258-5dad66493239' attributeId='7b049c9a-56e4-4791-a0a3-451237fd38a1' name='precision' value='1
2
'>
</annotation>
</annotation>
<annotation id='1a25ed97-846e-4847-aa21-1a0b025c01ed' attributeId='52a3d8ee-92ab-45dc-b668-46408143254d' name='scale' value='2'>
<annotation id='1a25ed97-846e-4847-aa21-1a0b025c01ed' attributeId='52a3d8ee-92ab-45dc-b668-46408143254d' name='scale' value='2'>
</annotation>
</annotation>
...
...
backend/xyst.dinas.contract/src/main/model/com/xyst/dinas/contract/query/Contract.mk
View file @
41336cc5
...
@@ -80,7 +80,7 @@
...
@@ -80,7 +80,7 @@
</field>
</field>
<field title='购砂单位'>
<field title='购砂单位'>
<name>purchaseSand
Unit
.id</name>
<name>purchaseSand
Company
.id</name>
<type>uuid</type>
<type>uuid</type>
<ref>
<ref>
<type></type>
<type></type>
...
@@ -89,7 +89,7 @@
...
@@ -89,7 +89,7 @@
<description></description>
<description></description>
</field>
</field>
<field title='购砂单位名称'>
<field title='购砂单位名称'>
<name>purchaseSand
Unit
.name</name>
<name>purchaseSand
Company
.name</name>
<type>string</type>
<type>string</type>
<description></description>
<description></description>
</field>
</field>
...
...
backend/xyst.dinas.contract/src/main/resources/com/xyst/dinas/contract/datamodel/Contract$contractDetail.jmx
View file @
41336cc5
...
@@ -42,11 +42,11 @@
...
@@ -42,11 +42,11 @@
<m:properties>
<m:properties>
<m:property>
<m:property>
<m:key>
precision
</m:key>
<m:key>
precision
</m:key>
<m:value>
1
0
</m:value>
<m:value>
1
2
</m:value>
</m:property>
</m:property>
<m:property>
<m:property>
<m:key>
scale
</m:key>
<m:key>
scale
</m:key>
<m:value>
2
</m:value>
<m:value>
4
</m:value>
</m:property>
</m:property>
</m:properties>
</m:properties>
</m:annotation>
</m:annotation>
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
<m:properties>
<m:properties>
<m:property>
<m:property>
<m:key>
precision
</m:key>
<m:key>
precision
</m:key>
<m:value>
1
0
</m:value>
<m:value>
1
2
</m:value>
</m:property>
</m:property>
<m:property>
<m:property>
<m:key>
scale
</m:key>
<m:key>
scale
</m:key>
...
@@ -88,7 +88,7 @@
...
@@ -88,7 +88,7 @@
<m:properties>
<m:properties>
<m:property>
<m:property>
<m:key>
precision
</m:key>
<m:key>
precision
</m:key>
<m:value>
1
0
</m:value>
<m:value>
1
2
</m:value>
</m:property>
</m:property>
<m:property>
<m:property>
<m:key>
scale
</m:key>
<m:key>
scale
</m:key>
...
...
backend/xyst.dinas.contract/src/main/resources/com/xyst/dinas/contract/query/Contract.jmx
View file @
41336cc5
...
@@ -90,7 +90,7 @@
...
@@ -90,7 +90,7 @@
<m:desc></m:desc>
<m:desc></m:desc>
</m:field>
</m:field>
<m:field>
<m:field>
<m:name>
purchaseSand
Unit
.id
</m:name>
<m:name>
purchaseSand
Company
.id
</m:name>
<m:title>
购砂单位
</m:title>
<m:title>
购砂单位
</m:title>
<m:type>
uuid
</m:type>
<m:type>
uuid
</m:type>
<m:ref>
<m:ref>
...
@@ -100,7 +100,7 @@
...
@@ -100,7 +100,7 @@
<m:desc></m:desc>
<m:desc></m:desc>
</m:field>
</m:field>
<m:field>
<m:field>
<m:name>
purchaseSand
Unit
.name
</m:name>
<m:name>
purchaseSand
Company
.name
</m:name>
<m:title>
购砂单位名称
</m:title>
<m:title>
购砂单位名称
</m:title>
<m:type>
string
</m:type>
<m:type>
string
</m:type>
<m:ref>
<m:ref>
...
...
backend/xyst.dinas.contract/src/main/resources/config/Contract.hbm.xml
View file @
41336cc5
...
@@ -143,13 +143,13 @@
...
@@ -143,13 +143,13 @@
<column
name=
"dinas_type_id"
not-null=
"false"
/>
<column
name=
"dinas_type_id"
not-null=
"false"
/>
</many-to-one>
</many-to-one>
<property
name=
"purchaseAmount"
type=
"big_decimal"
not-null=
"false"
>
<property
name=
"purchaseAmount"
type=
"big_decimal"
not-null=
"false"
>
<column
name=
"purchase_amount"
precision=
"1
0"
scale=
"2
"
></column>
<column
name=
"purchase_amount"
precision=
"1
2"
scale=
"4
"
></column>
</property>
</property>
<property
name=
"price"
type=
"big_decimal"
not-null=
"false"
>
<property
name=
"price"
type=
"big_decimal"
not-null=
"false"
>
<column
name=
"price"
precision=
"1
0
"
scale=
"2"
></column>
<column
name=
"price"
precision=
"1
2
"
scale=
"2"
></column>
</property>
</property>
<property
name=
"amount"
type=
"big_decimal"
not-null=
"false"
>
<property
name=
"amount"
type=
"big_decimal"
not-null=
"false"
>
<column
name=
"amount"
precision=
"1
0
"
scale=
"2"
></column>
<column
name=
"amount"
precision=
"1
2
"
scale=
"2"
></column>
</property>
</property>
</class>
</class>
</hibernate-mapping>
</hibernate-mapping>
\ No newline at end of file
backend/xyst.dinas.project/src/main/java/com/xyst/dinas/project/constant/ProjectFiledConstant.java
View file @
41336cc5
...
@@ -6,5 +6,7 @@ public interface ProjectFiledConstant {
...
@@ -6,5 +6,7 @@ public interface ProjectFiledConstant {
* 实体名
* 实体名
*/
*/
String
PROJECTFILED_NTITY
=
"com.xyst.dinas.project.datamodel.ProjectFiled"
;
String
PROJECTFILED_NTITY
=
"com.xyst.dinas.project.datamodel.ProjectFiled"
;
String
PROJECTFILED_DINASTYPE_ENTITY
=
"com.xyst.dinas.project.datamodel.ProjectFiled$ProjectFiledDinasDetail"
;
}
}
backend/xyst.dinas.project/src/main/java/com/xyst/dinas/project/dao/ProjectFiledDao.java
View file @
41336cc5
package
com
.
xyst
.
dinas
.
project
.
dao
;
package
com
.
xyst
.
dinas
.
project
.
dao
;
import
java.util.List
;
import
java.util.List
;
import
java.util.UUID
;
import
com.beecode.bcp.type.KObject
;
import
com.beecode.bcp.type.KObject
;
public
interface
ProjectFiledDao
{
public
interface
ProjectFiledDao
{
List
<
KObject
>
queryProjectFiledByName
(
String
name
);
List
<
KObject
>
queryProjectFiledByName
(
String
name
);
KObject
load
(
UUID
id
);
List
<
KObject
>
loadDinasTypeDetail
(
UUID
id
);
}
}
backend/xyst.dinas.project/src/main/java/com/xyst/dinas/project/internal/dao/ProjectFiledDaoImpl.java
View file @
41336cc5
package
com
.
xyst
.
dinas
.
project
.
internal
.
dao
;
package
com
.
xyst
.
dinas
.
project
.
internal
.
dao
;
import
java.util.List
;
import
java.util.List
;
import
java.util.UUID
;
import
org.hibernate.HibernateException
;
import
org.hibernate.HibernateException
;
import
org.hibernate.Session
;
import
org.hibernate.Session
;
...
@@ -31,4 +32,25 @@ public class ProjectFiledDaoImpl implements ProjectFiledDao, ProjectFiledConstan
...
@@ -31,4 +32,25 @@ public class ProjectFiledDaoImpl implements ProjectFiledDao, ProjectFiledConstan
});
});
}
}
@Override
public
KObject
load
(
UUID
id
)
{
return
(
KObject
)
template
.
load
(
PROJECTFILED_NTITY
,
id
);
}
private
static
final
String
getProjectDinasDetailById
=
"from "
+
PROJECTFILED_DINASTYPE_ENTITY
+
" as v where v.master.id=:id and (v.master.discard is null or v.master.discard = 0)"
;
@Override
public
List
<
KObject
>
loadDinasTypeDetail
(
UUID
id
)
{
return
template
.
execute
(
new
HibernateCallback
<
List
<
KObject
>>()
{
@Override
public
List
<
KObject
>
doInHibernate
(
Session
session
)
throws
HibernateException
{
Query
<
KObject
>
query
=
session
.
createQuery
(
getProjectDinasDetailById
,
KObject
.
class
);
query
.
setParameter
(
"id"
,
id
);
return
query
.
getResultList
();
}
});
}
}
}
backend/xyst.dinas.project/src/main/java/com/xyst/dinas/project/internal/service/ProjectFiledServiceImpl.java
View file @
41336cc5
package
com
.
xyst
.
dinas
.
project
.
internal
.
service
;
package
com
.
xyst
.
dinas
.
project
.
internal
.
service
;
import
java.util.List
;
import
java.util.List
;
import
java.util.UUID
;
import
org.json.JSONArray
;
import
org.json.JSONObject
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
com.beecode.bcp.type.KObject
;
import
com.beecode.bcp.type.KObject
;
...
@@ -24,4 +27,18 @@ public class ProjectFiledServiceImpl implements ProjectFiledService {
...
@@ -24,4 +27,18 @@ public class ProjectFiledServiceImpl implements ProjectFiledService {
return
flag
;
return
flag
;
}
}
@Override
public
JSONArray
getDinasTypeByProjectId
(
String
id
)
{
List
<
KObject
>
detail
=
projectFiledDao
.
loadDinasTypeDetail
(
UUID
.
fromString
(
id
));
JSONArray
result
=
new
JSONArray
();
for
(
KObject
item
:
detail
)
{
JSONObject
obj
=
new
JSONObject
();
obj
.
put
(
"dinasTypeId"
,
item
.
get
(
"dinasType"
).
getUuid
(
"id"
));
obj
.
put
(
"dinasTypeName"
,
item
.
get
(
"dinasType"
).
getString
(
"dinasTypeName"
));
obj
.
put
(
"weight"
,
item
.
getFloat
(
"weight"
));
result
.
put
(
obj
);
}
return
result
;
}
}
}
backend/xyst.dinas.project/src/main/java/com/xyst/dinas/project/service/ProjectFiledService.java
View file @
41336cc5
package
com
.
xyst
.
dinas
.
project
.
service
;
package
com
.
xyst
.
dinas
.
project
.
service
;
import
org.json.JSONArray
;
public
interface
ProjectFiledService
{
public
interface
ProjectFiledService
{
Boolean
verifyName
(
String
name
);
Boolean
verifyName
(
String
name
);
JSONArray
getDinasTypeByProjectId
(
String
id
);
}
}
backend/xyst.dinas.project/src/main/java/com/xyst/dinas/project/web/ProjectFiledController.java
View file @
41336cc5
...
@@ -41,4 +41,16 @@ public class ProjectFiledController {
...
@@ -41,4 +41,16 @@ public class ProjectFiledController {
}
}
return
null
;
return
null
;
}
}
/**
* @Description: 根据项目id查询砂石种类
* @param id
* @return return_type
* @throws
*/
@ResponseBody
@RequestMapping
(
value
=
"/project/projectFiled/getDinasTypeByProjectId"
,
method
=
RequestMethod
.
GET
)
public
String
getDinasTypeByProjectId
(
@RequestParam
(
"id"
)
String
id
)
{
return
projectFiledService
.
getDinasTypeByProjectId
(
id
).
toString
();
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment