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
08d97908
Commit
08d97908
authored
May 11, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-05-11 优化工序设置多公司无法重复添加并且可以多公司使用,
工序单价导入解析去空格
parent
bb091811
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
33 additions
and
23 deletions
+33
-23
ServiceHGSJ001.java
.../java/com/baosight/hggp/hg/sj/service/ServiceHGSJ001.java
+19
-6
ServiceHGSJ002A.java
...java/com/baosight/hggp/hg/sj/service/ServiceHGSJ002A.java
+1
-1
ServiceHGSJ003.java
.../java/com/baosight/hggp/hg/sj/service/ServiceHGSJ003.java
+3
-2
HGSJ001.xml
src/main/java/com/baosight/hggp/hg/sj/sql/HGSJ001.xml
+3
-0
HGSJ003.xml
src/main/java/com/baosight/hggp/hg/sj/sql/HGSJ003.xml
+3
-7
ExcelUtils.java
src/main/java/com/baosight/hggp/util/ExcelUtils.java
+3
-3
HGSJ001.js
src/main/webapp/HG/SJ/HGSJ001.js
+1
-4
No files found.
src/main/java/com/baosight/hggp/hg/sj/service/ServiceHGSJ001.java
View file @
08d97908
...
@@ -4,9 +4,9 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
...
@@ -4,9 +4,9 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.constant.CommonConstant
;
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.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.sj.domain.HGSJ001
;
import
com.baosight.hggp.hg.sj.domain.HGSJ001
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.ErrorCodeUtils
;
import
com.baosight.hggp.util.ErrorCodeUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.LogUtils
;
...
@@ -80,12 +80,13 @@ public class ServiceHGSJ001 extends ServiceEPBase {
...
@@ -80,12 +80,13 @@ public class ServiceHGSJ001 extends ServiceEPBase {
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
// 写入数据
// 写入数据
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
HGSJ001
hpsc012
=
new
HGSJ001
();
HGSJ001
hpsj001
=
new
HGSJ001
();
hpsc012
.
fromMap
(
resultRows
.
get
(
i
));
hpsj001
.
fromMap
(
resultRows
.
get
(
i
));
if
(
hpsc012
.
getId
()
==
null
||
hpsc012
.
getId
()
==
0
)
{
queryDeviceCode
(
hpsj001
);
this
.
add
(
hpsc012
);
if
(
hpsj001
.
getId
()
==
null
||
hpsj001
.
getId
()
==
0
)
{
this
.
add
(
hpsj001
);
}
else
{
}
else
{
this
.
modify
(
hps
c012
);
this
.
modify
(
hps
j001
);
}
}
}
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
=
this
.
query
(
inInfo
);
...
@@ -134,4 +135,16 @@ public class ServiceHGSJ001 extends ServiceEPBase {
...
@@ -134,4 +135,16 @@ public class ServiceHGSJ001 extends ServiceEPBase {
}
}
return
inInfo
;
return
inInfo
;
}
}
/**
* 工序重复校验
* @param hgsj001 工序设置
*/
public
void
queryDeviceCode
(
HGSJ001
hgsj001
){
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"processName"
,
hgsj001
.
getProcessName
().
trim
());
map
.
put
(
HGSJ001
.
FIELD_DELETE_FLAG
,
hgsj001
.
getDeleteFlag
());
List
<
HGSJ001
>
hgsj001s
=
this
.
dao
.
query
(
HGSJ001
.
QUERY
,
map
);
AssertUtils
.
isNotEmpty
(
hgsj001s
,
String
.
format
(
"工序名称[%s]已存在,添加失败!"
,
hgsj001
.
getProcessName
()));
}
}
}
src/main/java/com/baosight/hggp/hg/sj/service/ServiceHGSJ002A.java
View file @
08d97908
...
@@ -38,7 +38,7 @@ public class ServiceHGSJ002A extends ServiceEPBase {
...
@@ -38,7 +38,7 @@ public class ServiceHGSJ002A extends ServiceEPBase {
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_BOX_BLOCK_ID
),
null
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_BOX_BLOCK_ID
),
null
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
PROCESS_CODE_BLOCK_ID
),
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
PROCESS_CODE_BLOCK_ID
),
new
HashMap
<
String
,
Object
>(){{
new
HashMap
<
String
,
Object
>(){{
put
(
HGSJ002A
.
FIELD_FACTORY_CODE
,
factoryCode
);
//
put(HGSJ002A.FIELD_FACTORY_CODE,factoryCode);
put
(
HGSJ002A
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);}}
put
(
HGSJ002A
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);}}
);
);
return
inInfo
;
return
inInfo
;
...
...
src/main/java/com/baosight/hggp/hg/sj/service/ServiceHGSJ003.java
View file @
08d97908
...
@@ -196,8 +196,9 @@ public class ServiceHGSJ003 extends ServiceEPBase {
...
@@ -196,8 +196,9 @@ public class ServiceHGSJ003 extends ServiceEPBase {
Map
map
=
HGSJTools
.
Hgsj003
.
getCompany
(
UserSession
.
getLoginName
(),
OrgTypeEnum
.
COMPANY
.
getCode
());
Map
map
=
HGSJTools
.
Hgsj003
.
getCompany
(
UserSession
.
getLoginName
(),
OrgTypeEnum
.
COMPANY
.
getCode
());
param
.
put
(
HGSJ003
.
FIELD_FACTORY_CODE
,
map
.
get
(
"orgEname"
));
param
.
put
(
HGSJ003
.
FIELD_FACTORY_CODE
,
map
.
get
(
"orgEname"
));
param
.
put
(
HGSJ003
.
FIELD_FACTORY_NAME
,
map
.
get
(
"orgCname"
));
param
.
put
(
HGSJ003
.
FIELD_FACTORY_NAME
,
map
.
get
(
"orgCname"
));
param
.
put
(
"orgType"
,
OrgTypeEnum
.
COMPANY
.
getCode
());
param
.
put
(
HGSJ003
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
param
.
put
(
"loginName"
,
UserSession
.
getLoginName
());
//param.put("orgType", OrgTypeEnum.COMPANY.getCode());
//param.put("loginName",UserSession.getLoginName());
param
.
put
(
HGSJ003
.
FIELD_ACCOUNT_CODE
,
UserSessionUtils
.
getAccountCode
());
param
.
put
(
HGSJ003
.
FIELD_ACCOUNT_CODE
,
UserSessionUtils
.
getAccountCode
());
List
list
=
new
ArrayList
<>(
Arrays
.
asList
(
HGSJ003
.
FIELD_PROCESS_CODE
,
HGSJ003
.
FIELD_PROCESS_NAME
,
HGSJ003
.
FIELD_PROCESS_CLASS_NAME
,
List
list
=
new
ArrayList
<>(
Arrays
.
asList
(
HGSJ003
.
FIELD_PROCESS_CODE
,
HGSJ003
.
FIELD_PROCESS_NAME
,
HGSJ003
.
FIELD_PROCESS_CLASS_NAME
,
...
...
src/main/java/com/baosight/hggp/hg/sj/sql/HGSJ001.xml
View file @
08d97908
...
@@ -107,6 +107,9 @@
...
@@ -107,6 +107,9 @@
<isNotEmpty
prepend=
" AND "
property=
"status"
>
<isNotEmpty
prepend=
" AND "
property=
"status"
>
STATUS = #status#
STATUS = #status#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"processNames"
>
PROCESS_NAME LIKE CONCAT('%', #processNames#, '%')
</isNotEmpty>
</sql>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
<select
id=
"query"
parameterClass=
"java.util.HashMap"
...
...
src/main/java/com/baosight/hggp/hg/sj/sql/HGSJ003.xml
View file @
08d97908
...
@@ -364,13 +364,9 @@
...
@@ -364,13 +364,9 @@
'' as "thick"
'' as "thick"
from hggp.hggy001
from hggp.hggy001
where ACCOUNT_CODE = #accountCode#
where ACCOUNT_CODE = #accountCode#
AND FACTORY_CODE IN (
<isNotEmpty
prepend=
" AND "
property=
"deleteFlag"
>
select distinct
DELETE_FLAG = #deleteFlag#
ORG_ENAME
</isNotEmpty>
from iplat_hggp.txsog01 A
inner join iplat_hggp.txsog02 B ON A.ORG_ID = B.ORG_ID
where A.ACCOUNT_CODE = #accountCode# and A.ORG_TYPE in (#orgType#) AND B.USER_ID = #loginName#
)
</select>
</select>
<select
id=
"queryCompanyCode"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
<select
id=
"queryCompanyCode"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
...
...
src/main/java/com/baosight/hggp/util/ExcelUtils.java
View file @
08d97908
...
@@ -219,13 +219,13 @@ public class ExcelUtils {
...
@@ -219,13 +219,13 @@ public class ExcelUtils {
break
;
break
;
case
"HGSJ003"
:
case
"HGSJ003"
:
HGSJ003
hgsj003
=
new
HGSJ003
();
HGSJ003
hgsj003
=
new
HGSJ003
();
Map
<
String
,
String
>
mapSmall
=
HGSJTools
.
Hgsj003
.
getSmallCode
(
"hggp.hgsj.processClass"
);
Map
mapSmall
=
HGSJTools
.
Hgsj003
.
getSmallCode
(
"hggp.hgsj.processClass"
);
for
(
Map
<?,
?>
map
:
arrayList
)
{
for
(
Map
<?,
?>
map
:
arrayList
)
{
String
processClass
=
MapUtils
.
getString
(
mapSmall
,
map
.
get
(
HGSJ003
.
FIELD_PROCESS_CLASS_NAME
));
String
processClass
=
MapUtils
.
getString
(
mapSmall
,
StringUtils
.
trimToEmpty
(
map
.
get
(
HGSJ003
.
FIELD_PROCESS_CLASS_NAME
).
toString
()
));
AssertUtils
.
isEmpty
(
processClass
,
String
.
format
(
"工序分类[%s]代码不存在,添加失败!"
,
map
.
get
(
HGSJ003
.
FIELD_PROCESS_CLASS_NAME
)));
AssertUtils
.
isEmpty
(
processClass
,
String
.
format
(
"工序分类[%s]代码不存在,添加失败!"
,
map
.
get
(
HGSJ003
.
FIELD_PROCESS_CLASS_NAME
)));
hgsj003
.
fromMap
(
map
);
hgsj003
.
fromMap
(
map
);
// 设置规格
// 设置规格
if
(
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isBlank
(
hgsj003
.
getSpec
()))
{
if
(
StringUtils
.
isBlank
(
hgsj003
.
getSpec
()))
{
hgsj003
.
setSpec
(
HGSJTools
.
Hgsj003
.
jointSpec
(
hgsj003
.
getLength
(),
hgsj003
.
getWidth
(),
hgsj003
.
getThick
()));
hgsj003
.
setSpec
(
HGSJTools
.
Hgsj003
.
jointSpec
(
hgsj003
.
getLength
(),
hgsj003
.
getWidth
(),
hgsj003
.
getThick
()));
}
}
// 去除空格
// 去除空格
...
...
src/main/webapp/HG/SJ/HGSJ001.js
View file @
08d97908
...
@@ -178,10 +178,7 @@ let save = function (btnNode) {
...
@@ -178,10 +178,7 @@ let save = function (btnNode) {
if
(
flag
)
{
if
(
flag
)
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HGSJ001"
,
"save"
,
true
,
JSUtils
.
submitGridsData
(
"result"
,
"HGSJ001"
,
"save"
,
true
);
function
(
e
)
{
query
();
});
btnNode
.
attr
(
"disabled"
,
false
);
btnNode
.
attr
(
"disabled"
,
false
);
}
}
});
});
...
...
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