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
e5812eac
Commit
e5812eac
authored
Jun 13, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-06-13 app查询产量接口
parent
dea53870
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
218 additions
and
0 deletions
+218
-0
HGSC007.java
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC007.java
+3
-0
ServiceHGSC007.java
.../java/com/baosight/hggp/hg/sc/service/ServiceHGSC007.java
+50
-0
HGSC007.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC007.xml
+165
-0
No files found.
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC007.java
View file @
e5812eac
...
@@ -114,6 +114,9 @@ public class HGSC007 extends DaoEPBase {
...
@@ -114,6 +114,9 @@ public class HGSC007 extends DaoEPBase {
public
static
final
String
INSERT
=
"HGSC007.insert"
;
public
static
final
String
INSERT
=
"HGSC007.insert"
;
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_DAY_WT
=
"HGSC007.queryDayWt"
;
/*查询工序产量*/
public
static
final
String
QUERY_PROJ_CODE_WT
=
"HGSC007.queryProjCodeWt"
;
/*查询项目产量*/
private
Long
id
=
new
Long
(
0
);
private
Long
id
=
new
Long
(
0
);
private
Long
matId
=
new
Long
(
0
);
/* 物料清单ID*/
private
Long
matId
=
new
Long
(
0
);
/* 物料清单ID*/
...
...
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC007.java
View file @
e5812eac
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.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoUtils
;
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.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.util.EiInfoUtils
;
import
com.baosight.hggp.util.EiInfoUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.StringUtil
;
import
com.baosight.hggp.util.StringUtil
;
...
@@ -15,6 +20,7 @@ import com.baosight.iplat4j.core.exception.PlatException;
...
@@ -15,6 +20,7 @@ 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.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -79,6 +85,50 @@ import java.util.Map;
...
@@ -79,6 +85,50 @@ import java.util.Map;
return
companyList
;
return
companyList
;
}
}
/**
* app查询工序产量
*/
@OperationLogAnnotation
(
operModul
=
"生产任务"
,
operType
=
"APP查询产量"
,
operDesc
=
"APP查询产量"
)
public
Map
<
String
,
List
>
getWt
(
EiInfo
inInfo
)
{
Map
<
String
,
List
>
map
=
new
HashMap
<>();
try
{
UserVO
userVO
=
HGCWTools
.
HgCw002
.
getUserCompany
();
Map
queryRow
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
if
(
StringUtils
.
isEmpty
(
queryRow
.
get
(
HGSC007
.
FIELD_company_code
).
toString
()))
{
queryRow
.
put
(
HGSC007
.
FIELD_company_code
,
userVO
.
getUsercode
());
queryRow
.
put
(
HGSC007
.
FIELD_company_name
,
userVO
.
getUsername
());
}
List
sumList
=
DaoBase
.
getInstance
().
query
(
HGSC007
.
QUERY_SUM_WT
,
queryRow
);
List
dayList
=
DaoBase
.
getInstance
().
query
(
HGSC007
.
QUERY_DAY_WT
,
queryRow
);
map
.
put
(
"sumList"
,
sumList
);
map
.
put
(
"dayList"
,
dayList
);
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
map
;
}
/**
* app查询工序产量
*/
@OperationLogAnnotation
(
operModul
=
"生产任务"
,
operType
=
"APP查询项目产量"
,
operDesc
=
"APP查询项目产量"
)
public
List
getProjCodeWt
(
EiInfo
inInfo
)
{
List
sumList
=
null
;
try
{
UserVO
userVO
=
HGCWTools
.
HgCw002
.
getUserCompany
();
Map
queryRow
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
if
(
StringUtils
.
isEmpty
(
queryRow
.
get
(
HGSC007
.
FIELD_company_code
).
toString
()))
{
queryRow
.
put
(
HGSC007
.
FIELD_company_code
,
userVO
.
getUsercode
());
queryRow
.
put
(
HGSC007
.
FIELD_company_name
,
userVO
.
getUsername
());
}
sumList
=
DaoBase
.
getInstance
().
query
(
HGSC007
.
QUERY_PROJ_CODE_WT
,
queryRow
);
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
sumList
;
}
}
}
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC007.xml
View file @
e5812eac
...
@@ -487,4 +487,169 @@
...
@@ -487,4 +487,169 @@
</isNotEmpty>
</isNotEmpty>
</update>
</update>
<!--查询累计完成重量-->
<select
id=
"querySumWt"
parameterClass=
"java.lang.String"
resultClass=
"java.util.Map"
>
select
a.factoryCode ,
a.factoryName ,
sum(a.dayWt) as dayWt,
sum(a.monthWt) as monthWt,
sum(a.yearWt) as yearWt
from (
select
factory_code as factoryCode ,
factory_name as factoryName ,
0 as dayWt,
0 as monthWt,
sum(finish_weight) as yearWt
from hggp.hgsc007 where 1 = 1 and left(created_time,4) = LEFT(#createdTime#,4)
<include
refid=
"HGXSDataAuth.authCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
account_code = #accountCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
company_code = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyName"
>
company_name = #companyName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryCode"
>
factory_code = #factoryCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryName"
>
factory_name = #factoryName#
</isNotEmpty>
group by factory_code , factory_name
union all
select
factory_code as factoryCode ,
factory_name as factoryName ,
0 as dayWt,
sum(finish_weight) as monthWt,
0 as yearWt
from hggp.hgsc007 where 1 = 1 and left(created_time,6) = LEFT(#createdTime#,6)
<include
refid=
"HGXSDataAuth.authCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
account_code = #accountCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
company_code = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyName"
>
company_name = #companyName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryCode"
>
factory_code = #factoryCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryName"
>
factory_name = #factoryName#
</isNotEmpty>
group by factory_code , factory_name
union all
select
factory_code as factoryCode ,
factory_name as factoryName ,
sum(finish_weight) as dayWt,
0 as monthWt,
0 as yearWt
from hggp.hgsc007 where 1 = 1 and left(created_time,8) = LEFT(#createdTime#,8)
<include
refid=
"HGXSDataAuth.authCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
account_code = #accountCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
company_code = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyName"
>
company_name = #companyName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryCode"
>
factory_code = #factoryCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryName"
>
factory_name = #factoryName#
</isNotEmpty>
group by factory_code , factory_name
) a
group by a.factoryCode , a.factoryName
</select>
<!--查询工序日产量-->
<select
id=
"queryDayWt"
parameterClass=
"java.lang.String"
resultClass=
"java.util.Map"
>
select
factory_code as factoryCode ,
factory_name as factoryName ,
process_code as processCode ,
process_name as processName ,
sum(finish_weight) finishWeight
from hggp.HGSC007
where 1 = 1 and left(created_time,8) = #createdTime#
<include
refid=
"HGXSDataAuth.authCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
account_code = #accountCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
company_code = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyName"
>
company_name = #companyName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryCode"
>
factory_code = #factoryCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryName"
>
factory_name = #factoryName#
</isNotEmpty>
group by factory_code , factory_name , process_code , process_name;
</select>
<select
id=
"queryProjCodeWt"
parameterClass=
"java.lang.String"
resultClass=
"java.util.Map"
>
select
b.factory_code as factoryCode ,
b.factory_name as factoryName ,
a.proj_code as projCode,
a.proj_name as projName,
a.plan_end_date as planEndDate,
sum(a.total_weight) as totalWeight,
sum(a.finish_weight) as finishWeight
from hggp.HGSC005a a inner join hggp.HGSC007 b on a.id = b.order_detail_id
where 1 = 1
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
a.account_code = #accountCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
a.company_code = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyName"
>
a.company_name = #companyName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryCode"
>
a.factory_code = #factoryCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"factoryName"
>
a.factory_name = #factoryName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"planEndDate"
>
a.plan_end_date = #planEndDate#
</isNotEmpty>
<!-- 无权限时使用 -->
<isNotEmpty
prepend=
" AND "
property=
"authDepCode"
>
a.DEP_CODE = #authDepCode#
</isNotEmpty>
<!-- 仅本人和部门组合 -->
<isEqual
prepend=
" AND "
property=
"authCombination"
compareValue=
"1"
>
(a.CREATED_BY = #authOnlyPeople# OR a.DEP_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"authDepCodes"
>
#authDepCodes[]#
</iterate>
)
</isEqual>
<!-- 仅本人或部门 -->
<isNotEqual
prepend=
" AND "
property=
"authCombination"
compareValue=
"1"
>
<isNotEmpty
property=
"authOnlyPeople"
>
a.CREATED_BY = #authOnlyPeople#
</isNotEmpty>
<isNotEmpty
property=
"authDepCodes"
>
a.DEP_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"authDepCodes"
>
#authDepCodes[]#
</iterate>
</isNotEmpty>
</isNotEqual>
group by b.factory_code , b.factory_name , a.proj_code , a.proj_name, a.plan_end_date;
</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