Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-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
hp-smart
Commits
d3fbebea
Commit
d3fbebea
authored
Apr 30, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-04-30 优化报工管理工厂下拉框排序和新增过滤
parent
f670d693
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
26 deletions
+35
-26
HPSB003.xml
src/main/java/com/baosight/hpjx/hp/sb/sql/HPSB003.xml
+2
-2
ServiceHPSC010.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC010.java
+4
-8
ServiceHPSC096.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC096.java
+7
-0
HPSC008.xml
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC008.xml
+1
-1
HPSC010.xml
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC010.xml
+21
-15
No files found.
src/main/java/com/baosight/hpjx/hp/sb/sql/HPSB003.xml
View file @
d3fbebea
...
...
@@ -274,7 +274,7 @@
</update>
<select
id=
"queryFactoryCodeBox"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
SELECT
distinct
SELECT
FACTORY_CODE as "factoryCode",
FACTORY_NAME as "factoryName"
FROM ${platSchema}.txsog01
...
...
@@ -283,7 +283,7 @@
COMPANY_CODE = #companyCode#
<!--and ORG_ID IN (<include refid="queryLoginNameBase"/>)-->
</isNotEmpty>
ORDER BY FACTORY_CODE,REC_CREATE_TIME desc
ORDER BY FACTORY_CODE
asc
,REC_CREATE_TIME desc
</select>
<select
id=
"queryGroupCodeBox"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC010.java
View file @
d3fbebea
...
...
@@ -6,10 +6,7 @@ import com.baosight.hpjx.core.constant.CommonConstant;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.hp.sc.domain.HPSC010
;
import
com.baosight.hpjx.hp.sc.domain.HPSC010A
;
import
com.baosight.hpjx.util.CommonMethod
;
import
com.baosight.hpjx.util.ErrorCodeUtils
;
import
com.baosight.hpjx.util.LogUtils
;
import
com.baosight.hpjx.util.StringUtil
;
import
com.baosight.hpjx.util.*
;
import
com.baosight.hpjx.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
...
...
@@ -165,9 +162,7 @@ public class ServiceHPSC010 extends ServiceEPBase {
public
void
queryFactoryCode
(
EiInfo
inInfo
,
Map
<
String
,
Object
>
queryMap
){
List
<
HPSC010
>
hpsc010List
=
this
.
dao
.
query
(
HPSC010
.
QUERY
,
queryMap
);
if
(
hpsc010List
.
size
()
>
0
)
{
inInfo
.
setDetailMsg
(
"当前数据以存在,添加失败!"
);
throw
new
PlatException
(
"E_Plat_InsertError"
,
new
Exception
(),
inInfo
);
}
AssertUtils
.
isNotEmpty
(
hpsc010List
,
String
.
format
(
"日期[%s]工厂数据以存在,添加失败!"
,
queryMap
.
get
(
HPSC010
.
FIELD_REGISTER_DATE
)));
}
}
\ No newline at end of file
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC096.java
View file @
d3fbebea
...
...
@@ -154,6 +154,10 @@ public class ServiceHPSC096 extends ServiceEPBase {
for
(
Map
map1:
list
)
{
hpsc010A
.
setParentId
((
Long
)
map1
.
get
(
HPSC010
.
FIELD_ID
));
}
/*BigDecimal result = hpsc010A.getWeightJh().add(hpsc010A.getWeight());*/
if
(
hpsc010A
.
getPrdtName
().
trim
().
length
()==
0
){
continue
;
}
DaoUtils
.
insert
(
HPSC010A
.
INSERT
,
hpsc010A
);
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
...
...
@@ -181,6 +185,7 @@ public class ServiceHPSC096 extends ServiceEPBase {
List
<
HPSC010A
>
listHpsc009
=
new
ArrayList
<
HPSC010A
>();
if
(
listFactoryCode
.
size
()>
0
){
queryMap
.
put
(
HPSC010
.
FIELD_FACTORY_CODE
,
listFactoryCode
.
get
(
0
).
get
(
"factoryCode"
));
queryMap
.
put
(
HPSC010
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
queryMap
.
put
(
"registerDates"
,
"select max(REGISTER_DATE) from hpjx.T_HPSC009 where COMPANY_CODE = '"
+
UserSessionUtils
.
getCompanyCode
()+
"' and FACTORY_CODE = '"
+
listFactoryCode
.
get
(
0
).
get
(
"factoryCode"
)+
"' AND DELETE_FLAG = 0"
);
listHpsc009
=
this
.
dao
.
query
(
HPSC010A
.
QUERY
,
queryMap
);
}
...
...
@@ -223,10 +228,12 @@ public class ServiceHPSC096 extends ServiceEPBase {
List
<
HPSC010A
>
resultList
=
this
.
dao
.
query
(
HPSC010A
.
QUERY
,
new
HashMap
<
String
,
Object
>(){{
put
(
HPSC010A
.
FIELD_PARENT_ID
,
id
);
put
(
HPSC010A
.
FIELD_GROUP_TYPE
,
"1"
);
put
(
HPSC010A
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
}},
EiConstant
.
defaultOffset
,
100
);
List
<
HPSC010A
>
detailList
=
this
.
dao
.
query
(
HPSC010A
.
QUERY
,
new
HashMap
<
String
,
Object
>(){{
put
(
HPSC010A
.
FIELD_PARENT_ID
,
id
);
put
(
HPSC010A
.
FIELD_GROUP_TYPE
,
"0"
);
put
(
HPSC010A
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
}},
EiConstant
.
defaultOffset
,
100
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"loginName"
,
UserSession
.
getLoginName
());
...
...
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC008.xml
View file @
d3fbebea
...
...
@@ -364,7 +364,7 @@
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
CREATED_TIM
E desc
FACTORY_COD
E desc
</isEmpty>
</dynamic>
...
...
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC010.xml
View file @
d3fbebea
...
...
@@ -317,26 +317,26 @@
<select
id=
"queryMax"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
SELECT
ID as "id",
<!-- ID -->
COMPANY_CODE as "companyCode",
<!-- 企业编码 -->
DEP_CODE as "depCode",
<!-- 部门编码 -->
CREATED_BY as "createdBy",
<!-- 创建人 -->
CREATED_NAME as "createdName",
<!-- 创建名称 -->
MAX(CREATED_TIME)
as "createdTime",
<!-- 创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 修改人 -->
UPDATED_NAME as "updatedName",
<!-- 修改名称 -->
UPDATED_TIME as "updatedTime",
<!-- 修改时间 -->
DELETE_FLAG as "deleteFlag",
<!-- 是否删除 0-否1-是 -->
REGISTER_DATE as "registerDate",
<!-- 登记日期 -->
FACTORY_CODE as "factoryCode",
<!-- 工厂代码 -->
WEIGHT as "weight",
<!-- 产量 -->
USER_COUNT as "userCount"
<!-- 用工人数 -->
ID as "id",
<!-- ID -->
COMPANY_CODE as "companyCode",
<!-- 企业编码 -->
DEP_CODE as "depCode",
<!-- 部门编码 -->
CREATED_BY as "createdBy",
<!-- 创建人 -->
CREATED_NAME as "createdName",
<!-- 创建名称 -->
CREATED_TIME
as "createdTime",
<!-- 创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 修改人 -->
UPDATED_NAME as "updatedName",
<!-- 修改名称 -->
UPDATED_TIME as "updatedTime",
<!-- 修改时间 -->
DELETE_FLAG as "deleteFlag",
<!-- 是否删除 0-否1-是 -->
REGISTER_DATE as "registerDate",
<!-- 登记日期 -->
FACTORY_CODE as "factoryCode",
<!-- 工厂代码 -->
WEIGHT as "weight",
<!-- 产量 -->
USER_COUNT as "userCount"
<!-- 用工人数 -->
FROM ${hpjxSchema}.T_HPSC008 WHERE 1=1
<include
refid=
"authCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
CREATED_TIME IN (
select MAX(CREATED_TIME)
from
hpjx
.T_HPSC008
from
${hpjxSchema}
.T_HPSC008
where 1=1
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
...
...
@@ -347,6 +347,12 @@
<isNotEmpty
prepend=
" AND "
property=
"factoryCode"
>
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"deleteFlag"
>
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isEmpty
prepend=
" AND "
property=
"deleteFlag"
>
DELETE_FLAG = 0
</isEmpty>
)
</isNotEmpty>
<include
refid=
"condition"
/>
...
...
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