Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-smart
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
platform
hg-smart
Commits
44261c77
Commit
44261c77
authored
Jun 14, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-06-13 app查询产量接口
parent
e5812eac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
15 deletions
+41
-15
ServiceHGSC007.java
.../java/com/baosight/hggp/hg/sc/service/ServiceHGSC007.java
+35
-9
HGSC007.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC007.xml
+6
-6
No files found.
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC007.java
View file @
44261c77
package
com
.
baosight
.
hggp
.
hg
.
sc
.
service
;
package
com
.
baosight
.
hggp
.
hg
.
sc
.
service
;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.enums.OrgTypeEnum
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
import
com.baosight.hggp.hg.cw.vo.UserVO
;
import
com.baosight.hggp.hg.cw.vo.UserVO
;
import
com.baosight.hggp.hg.sc.domain.HGSC007
;
import
com.baosight.hggp.hg.sc.domain.HGSC007
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.util.BeanUtils
;
import
com.baosight.hggp.hg.xs.domain.Org
;
import
com.baosight.hggp.util.EiInfoUtils
;
import
com.baosight.hggp.hg.xs.tools.HGXSTools
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.StringUtil
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -85,6 +88,28 @@ import java.util.Map;
...
@@ -85,6 +88,28 @@ import java.util.Map;
return
companyList
;
return
companyList
;
}
}
@OperationLogAnnotation
(
operModul
=
"生产任务"
,
operType
=
"APP查询工厂"
,
operDesc
=
"APP查询当前登录用户角色所属工厂"
)
public
List
<
Map
>
getRoleFactory
(
EiInfo
inInfo
)
{
List
<
Map
>
factoryCodes
=
new
ArrayList
<>();
try
{
List
<
Org
>
orgs
=
HGXSTools
.
XsOrg
.
queryByUser
();
if
(
CollectionUtils
.
isEmpty
(
orgs
))
{
return
new
ArrayList
<>();
}
for
(
Org
org
:
orgs
)
{
List
<
Map
>
org1
=
DaoBase
.
getInstance
().
query
(
"HGXSOrg.queryFactoryComboBox"
,
new
HashMap
<
String
,
Object
>(){{
put
(
Org
.
FIELD_PARENT_ORG_ID
,
org
.
getOrgId
());
}});
factoryCodes
.
addAll
(
org1
);
}
}
catch
(
Exception
e
){
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"APP查询工厂失败"
);
}
return
factoryCodes
;
}
/**
/**
* app查询工序产量
* app查询工序产量
*/
*/
...
@@ -92,12 +117,12 @@ import java.util.Map;
...
@@ -92,12 +117,12 @@ import java.util.Map;
public
Map
<
String
,
List
>
getWt
(
EiInfo
inInfo
)
{
public
Map
<
String
,
List
>
getWt
(
EiInfo
inInfo
)
{
Map
<
String
,
List
>
map
=
new
HashMap
<>();
Map
<
String
,
List
>
map
=
new
HashMap
<>();
try
{
try
{
UserVO
userVO
=
HGCWTools
.
HgCw002
.
getUserCompany
();
UserVO
userVO
=
HGCWTools
.
HgCw002
.
getUserCompany
();
Map
queryRow
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
Map
queryRow
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
if
(
StringUtils
.
isEmpty
(
queryRow
.
get
(
HGSC007
.
FIELD_company_code
).
toString
()))
{
Object
companyCode
=
queryRow
.
get
(
HGSC007
.
FIELD_company_code
);
if
(
companyCode
==
null
)
{
queryRow
.
put
(
HGSC007
.
FIELD_company_code
,
userVO
.
getUsercode
());
queryRow
.
put
(
HGSC007
.
FIELD_company_code
,
userVO
.
getUsercode
());
queryRow
.
put
(
HGSC007
.
FIELD_company_name
,
userVO
.
getUsername
());
//
queryRow.put(HGSC007.FIELD_company_name,userVO.getUsername());
}
}
List
sumList
=
DaoBase
.
getInstance
().
query
(
HGSC007
.
QUERY_SUM_WT
,
queryRow
);
List
sumList
=
DaoBase
.
getInstance
().
query
(
HGSC007
.
QUERY_SUM_WT
,
queryRow
);
List
dayList
=
DaoBase
.
getInstance
().
query
(
HGSC007
.
QUERY_DAY_WT
,
queryRow
);
List
dayList
=
DaoBase
.
getInstance
().
query
(
HGSC007
.
QUERY_DAY_WT
,
queryRow
);
...
@@ -118,9 +143,10 @@ import java.util.Map;
...
@@ -118,9 +143,10 @@ import java.util.Map;
try
{
try
{
UserVO
userVO
=
HGCWTools
.
HgCw002
.
getUserCompany
();
UserVO
userVO
=
HGCWTools
.
HgCw002
.
getUserCompany
();
Map
queryRow
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
Map
queryRow
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
if
(
StringUtils
.
isEmpty
(
queryRow
.
get
(
HGSC007
.
FIELD_company_code
).
toString
()))
{
Object
companyCode
=
queryRow
.
get
(
HGSC007
.
FIELD_company_code
);
if
(
companyCode
==
null
)
{
queryRow
.
put
(
HGSC007
.
FIELD_company_code
,
userVO
.
getUsercode
());
queryRow
.
put
(
HGSC007
.
FIELD_company_code
,
userVO
.
getUsercode
());
queryRow
.
put
(
HGSC007
.
FIELD_company_name
,
userVO
.
getUsername
());
//
queryRow.put(HGSC007.FIELD_company_name,userVO.getUsername());
}
}
sumList
=
DaoBase
.
getInstance
().
query
(
HGSC007
.
QUERY_PROJ_CODE_WT
,
queryRow
);
sumList
=
DaoBase
.
getInstance
().
query
(
HGSC007
.
QUERY_PROJ_CODE_WT
,
queryRow
);
}
catch
(
PlatException
e
)
{
}
catch
(
PlatException
e
)
{
...
...
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC007.xml
View file @
44261c77
...
@@ -488,7 +488,7 @@
...
@@ -488,7 +488,7 @@
</update>
</update>
<!--查询累计完成重量-->
<!--查询累计完成重量-->
<select
id=
"querySumWt"
parameterClass=
"java.
lang.String"
resultClass=
"java.util.
Map"
>
<select
id=
"querySumWt"
parameterClass=
"java.
util.HashMap"
resultClass=
"java.util.Hash
Map"
>
select
select
a.factoryCode ,
a.factoryCode ,
a.factoryName ,
a.factoryName ,
...
@@ -574,7 +574,7 @@
...
@@ -574,7 +574,7 @@
group by a.factoryCode , a.factoryName
group by a.factoryCode , a.factoryName
</select>
</select>
<!--查询工序日产量-->
<!--查询工序日产量-->
<select
id=
"queryDayWt"
parameterClass=
"java.
lang.String"
resultClass=
"java.util.
Map"
>
<select
id=
"queryDayWt"
parameterClass=
"java.
util.HashMap"
resultClass=
"java.util.Hash
Map"
>
select
select
factory_code as factoryCode ,
factory_code as factoryCode ,
factory_name as factoryName ,
factory_name as factoryName ,
...
@@ -602,7 +602,7 @@
...
@@ -602,7 +602,7 @@
group by factory_code , factory_name , process_code , process_name;
group by factory_code , factory_name , process_code , process_name;
</select>
</select>
<select
id=
"queryProjCodeWt"
parameterClass=
"java.
lang.String"
resultClass=
"java.util.
Map"
>
<select
id=
"queryProjCodeWt"
parameterClass=
"java.
util.HashMap"
resultClass=
"java.util.Hash
Map"
>
select
select
b.factory_code as factoryCode ,
b.factory_code as factoryCode ,
b.factory_name as factoryName ,
b.factory_name as factoryName ,
...
@@ -623,10 +623,10 @@
...
@@ -623,10 +623,10 @@
a.company_name = #companyName#
a.company_name = #companyName#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryCode"
>
<isNotEmpty
prepend=
" AND "
property=
"factoryCode"
>
a
.factory_code = #factoryCode#
b
.factory_code = #factoryCode#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryName"
>
<isNotEmpty
prepend=
" AND "
property=
"factoryName"
>
a
.factory_name = #factoryName#
b
.factory_name = #factoryName#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"planEndDate"
>
<isNotEmpty
prepend=
" AND "
property=
"planEndDate"
>
a.plan_end_date = #planEndDate#
a.plan_end_date = #planEndDate#
...
@@ -650,6 +650,6 @@
...
@@ -650,6 +650,6 @@
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"authDepCodes"
>
#authDepCodes[]#
</iterate>
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"authDepCodes"
>
#authDepCodes[]#
</iterate>
</isNotEmpty>
</isNotEmpty>
</isNotEqual>
</isNotEqual>
group by b.factory_code , b.factory_name , a.proj_code , a.proj_name, a.plan_end_date
;
group by b.factory_code , b.factory_name , a.proj_code , a.proj_name, a.plan_end_date
</select>
</select>
</sqlMap>
</sqlMap>
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