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
72b79adc
Commit
72b79adc
authored
Jun 17, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-06-17 app查询工序月产量
parent
6a8e49bf
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
12 deletions
+55
-12
HGSqlConstant.java
...ain/java/com/baosight/hggp/hg/constant/HGSqlConstant.java
+2
-0
HGSC007.java
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC007.java
+1
-0
ServiceHGSC007.java
.../java/com/baosight/hggp/hg/sc/service/ServiceHGSC007.java
+33
-12
HGSC007.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC007.xml
+19
-0
No files found.
src/main/java/com/baosight/hggp/hg/constant/HGSqlConstant.java
View file @
72b79adc
...
@@ -569,6 +569,8 @@ public class HGSqlConstant {
...
@@ -569,6 +569,8 @@ public class HGSqlConstant {
public
static
final
String
QUERY_PARENT
=
"HGXSOrg.queryParent"
;
public
static
final
String
QUERY_PARENT
=
"HGXSOrg.queryParent"
;
// 查询用户组织机构
// 查询用户组织机构
public
static
final
String
QUERY_BY_USER
=
"HGXSOrg.queryByUser"
;
public
static
final
String
QUERY_BY_USER
=
"HGXSOrg.queryByUser"
;
// 查询用户组织机构
public
static
final
String
QUERY_BY_FACTORY
=
"HGXSOrg.queryFactoryComboBox"
;
}
}
}
}
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC007.java
View file @
72b79adc
...
@@ -115,6 +115,7 @@ public class HGSC007 extends DaoEPBase {
...
@@ -115,6 +115,7 @@ public class HGSC007 extends DaoEPBase {
public
static
final
String
UPDATE
=
"HGSC007.update"
;
public
static
final
String
UPDATE
=
"HGSC007.update"
;
public
static
final
String
DELETE
=
"HGSC007.delete"
;
public
static
final
String
DELETE
=
"HGSC007.delete"
;
public
static
final
String
QUERY_SUM_WT
=
"HGSC007.querySumWt"
;
/*查询累计产量*/
public
static
final
String
QUERY_SUM_WT
=
"HGSC007.querySumWt"
;
/*查询累计产量*/
public
static
final
String
QUERY_WT
=
"HGSC007.queryWt"
;
/*查询日工序产量*/
public
static
final
String
QUERY_DAY_WT
=
"HGSC007.queryDayWt"
;
/*查询工序日产量*/
public
static
final
String
QUERY_DAY_WT
=
"HGSC007.queryDayWt"
;
/*查询工序日产量*/
public
static
final
String
QUERY_MONTH_WT
=
"HGSC007.queryMonthWt"
;
/*查询工序月产量*/
public
static
final
String
QUERY_MONTH_WT
=
"HGSC007.queryMonthWt"
;
/*查询工序月产量*/
public
static
final
String
QUERY_PROJ_CODE_WT
=
"HGSC007.queryProjCodeWt"
;
/*查询项目产量*/
public
static
final
String
QUERY_PROJ_CODE_WT
=
"HGSC007.queryProjCodeWt"
;
/*查询项目产量*/
...
...
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC007.java
View file @
72b79adc
...
@@ -6,8 +6,11 @@ import com.baosight.hggp.core.dao.DaoBase;
...
@@ -6,8 +6,11 @@ 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.enums.OrgTypeEnum
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.constant.HGSqlConstant
;
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.sb.domain.HGSB002
;
import
com.baosight.hggp.hg.sb.tools.HGSBTools
;
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.hg.xs.domain.Org
;
import
com.baosight.hggp.hg.xs.domain.Org
;
...
@@ -89,17 +92,8 @@ import java.util.*;
...
@@ -89,17 +92,8 @@ import java.util.*;
public
List
<
Map
>
getRoleFactory
(
EiInfo
inInfo
)
{
public
List
<
Map
>
getRoleFactory
(
EiInfo
inInfo
)
{
List
<
Map
>
factoryCodes
=
new
ArrayList
<>();
List
<
Map
>
factoryCodes
=
new
ArrayList
<>();
try
{
try
{
List
<
Org
>
orgs
=
HGXSTools
.
XsOrg
.
queryByUser
();
List
<
Map
<
String
,
Object
>>
mapList
=
getOrg
();
if
(
CollectionUtils
.
isEmpty
(
orgs
))
{
factoryCodes
.
addAll
(
mapList
);
return
new
ArrayList
<>();
}
for
(
Org
org
:
orgs
)
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
Org
.
FIELD_ORG_ID
,
org
.
getFactoryCode
());
map
.
put
(
Org
.
FIELD_ORG_CNAME
,
org
.
getFactoryName
());
factoryCodes
.
add
(
map
);
}
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"APP查询工厂失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"APP查询工厂失败"
);
}
}
...
@@ -137,7 +131,7 @@ import java.util.*;
...
@@ -137,7 +131,7 @@ import java.util.*;
if
(
StringUtils
.
isEmpty
(
companyCode
))
{
if
(
StringUtils
.
isEmpty
(
companyCode
))
{
queryRow
.
setCell
(
ACConstants
.
ROW_CODE_0
,
HGSC007
.
FIELD_company_code
,
userVO
.
getUsercode
());
queryRow
.
setCell
(
ACConstants
.
ROW_CODE_0
,
HGSC007
.
FIELD_company_code
,
userVO
.
getUsercode
());
}
}
inInfo
=
super
.
query
(
inInfo
,
HGSC007
.
QUERY_
DAY_
WT
);
inInfo
=
super
.
query
(
inInfo
,
HGSC007
.
QUERY_WT
);
}
catch
(
PlatException
e
)
{
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
}
...
@@ -212,6 +206,33 @@ import java.util.*;
...
@@ -212,6 +206,33 @@ import java.util.*;
return
inInfo
;
return
inInfo
;
}
}
public
static
List
<
Map
<
String
,
Object
>>
getOrg
()
{
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
List
<
Org
>
orgList
=
HGXSTools
.
XsOrg
.
queryByUser
();
if
(
CollectionUtils
.
isNotEmpty
(
orgList
))
{
for
(
Org
org:
orgList
)
{
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<>();
if
(!
org
.
getOrgType
().
equals
(
OrgTypeEnum
.
COMPANY
.
getCode
()))
{
//Org org1 = HGXSTools.XsOrg.queryCompany(org.getOrgId());
objectMap
.
put
(
Org
.
FIELD_FACTORY_CODE
,
org
.
getFactoryCode
());
objectMap
.
put
(
Org
.
FIELD_FACTORY_NAME
,
org
.
getFactoryName
());
}
else
{
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
Org
.
FIELD_PARENT_ORG_ID
,
org
.
getOrgId
());
List
<
Map
>
results
=
DaoBase
.
getInstance
().
query
(
HGSqlConstant
.
HgXsOrg
.
QUERY_BY_FACTORY
,
map
);
if
(
results
.
size
()>
0
)
{
Map
org1
=
results
.
get
(
0
);
objectMap
.
put
(
Org
.
FIELD_FACTORY_CODE
,
org1
.
get
(
Org
.
FIELD_ORG_ID
));
objectMap
.
put
(
Org
.
FIELD_FACTORY_NAME
,
org1
.
get
(
Org
.
FIELD_ORG_CNAME
));
}
}
list
.
add
(
objectMap
);
}
}
return
list
;
}
}
}
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC007.xml
View file @
72b79adc
...
@@ -581,6 +581,25 @@
...
@@ -581,6 +581,25 @@
group by a.factoryCode , a.factoryName
group by a.factoryCode , a.factoryName
</select>
</select>
<!--查询工序日产量-->
<!--查询工序日产量-->
<select
id=
"queryWt"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
select
h.DEPOSIT_DATE as "completeDate",
h2.factory_code as "factoryCode",
h2.factory_name as "factoryName",
h2.process_code as "processCode",
h2.process_name as "processName",
SUM(h.INV_WEIGHT) "totalWeight"
from ${hggpSchema}.hgkc003 h inner join ${hggpSchema}.hgzl002 h2 on h.QUALITY_ID = h2.id
where 1 = 1 and h.DELETE_FLAG = '0' and h.SUBMIT_STATUS = '1'
<include
refid=
"appCondition"
/>
<include
refid=
"appOrderCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"depositDate"
>
h.DEPOSIT_DATE = #depositDate#
</isNotEmpty>
group by h.DEPOSIT_DATE, h2.factory_code, h2.factory_name, h2.process_code, h2.process_name
order by h.DEPOSIT_DATE asc
</select>
<!--查询工序日产量-->
<select
id=
"queryDayWt"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
<select
id=
"queryDayWt"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
select
select
h.DEPOSIT_DATE as "completeDate",
h.DEPOSIT_DATE as "completeDate",
...
...
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