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
8354d1c3
Commit
8354d1c3
authored
Feb 06, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.fixBug:修复加载厂区下拉框时报错问题
parent
a047bd71
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
312 additions
and
339 deletions
+312
-339
HPSqlConstant.java
...ain/java/com/baosight/hpjx/hp/constant/HPSqlConstant.java
+14
-0
ServiceHPKC001.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC001.java
+2
-2
ServiceHPKC003.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC003.java
+5
-25
ServiceHPKC003A.java
...java/com/baosight/hpjx/hp/kc/service/ServiceHPKC003A.java
+9
-6
ServiceHPKC005.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC005.java
+2
-2
ServiceHPKC006.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC006.java
+1
-1
ServiceHPKC007.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC007.java
+2
-2
ServiceHPKC008.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC008.java
+2
-2
ServiceHPKC009.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC009.java
+2
-2
ServiceHPPZ006.java
.../java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ006.java
+2
-2
ServiceHPPZ011.java
.../java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ011.java
+1
-1
HPPZ011.xml
src/main/java/com/baosight/hpjx/hp/pz/sql/HPPZ011.xml
+4
-2
HPPZTools.java
src/main/java/com/baosight/hpjx/hp/pz/tools/HPPZTools.java
+140
-111
ServiceHPSC002.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002.java
+1
-1
HPSC003.xml
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC003.xml
+1
-70
HPSC004.xml
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC004.xml
+31
-102
HPSCTools.java
src/main/java/com/baosight/hpjx/hp/sc/tools/HPSCTools.java
+87
-2
SecurityUserStandardImpl.java
.../baosight/xservices/xs/impl/SecurityUserStandardImpl.java
+1
-1
HPKC003A.jsp
src/main/webapp/HP/KC/HPKC003A.jsp
+5
-5
No files found.
src/main/java/com/baosight/hpjx/hp/constant/HPSqlConstant.java
View file @
8354d1c3
...
...
@@ -217,6 +217,20 @@ public class HPSqlConstant {
}
/**
* HPSC004 SQL名称定义
*
* @author:songx
* @date:2024/2/5,10:16
*/
public
class
HPSC004
{
// 锁
public
static
final
String
LOCK
=
"HPSC004.lock"
;
// 更新时间完工情况
public
static
final
String
UPDATE_COMPLETE
=
"HPSC004.updateComplete"
;
}
/**
* @author:songx
* @date:2024/2/5,10:16
*/
...
...
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC001.java
View file @
8354d1c3
...
...
@@ -182,9 +182,9 @@ public class ServiceHPKC001 extends ServiceBase {
// 去除日期字符串中的-
fKc001
.
setReceiptDate
(
StringUtil
.
removeHorizontalLine
(
fKc001
.
getReceiptDate
()));
// 仓库名称
fKc001
.
setWhName
(
HPPZTools
.
getPz007
ByCode
(
fKc001
.
getWhCode
()).
getWhName
());
fKc001
.
setWhName
(
HPPZTools
.
HpPz007
.
get
ByCode
(
fKc001
.
getWhCode
()).
getWhName
());
// 存货名称
fKc001
.
setInventName
(
HPPZTools
.
getPz004
ByCode
(
fKc001
.
getInventCode
()).
getInventName
());
fKc001
.
setInventName
(
HPPZTools
.
HpPz004
.
get
ByCode
(
fKc001
.
getInventCode
()).
getInventName
());
}
/**
...
...
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC003.java
View file @
8354d1c3
...
...
@@ -85,8 +85,11 @@ public class ServiceHPKC003 extends ServiceBase {
try
{
List
<
Map
>
resultRows
=
eiInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
List
<
String
>
prodNos
=
ObjectUtils
.
listKey
(
resultRows
,
"prodNo"
);
// 锁
List
<
String
>
prodOrderNos
=
ObjectUtils
.
listKey
(
resultRows
,
"prodOrderNo"
);
// 锁库存
HPKCTools
.
HpKc003
.
lock
(
prodNos
);
// 锁生产计划明细
HPSCTools
.
HpSc004
.
lock
(
prodOrderNos
);
// 查询数据
Map
<
String
,
HPKC003
>
dbKc003Map
=
HPKCTools
.
HpKc003
.
map
(
prodNos
);
for
(
Map
resultRow
:
resultRows
)
{
...
...
@@ -103,7 +106,7 @@ public class ServiceHPKC003 extends ServiceBase {
newKc003
.
setProdNo
(
SequenceGenerator
.
getNextSequence
(
HPConstant
.
SequenceId
.
HPKC003_PROD_NO
));
DaoUtils
.
insert
(
HPKC003
.
INSERT
,
newKc003
);
// 同步生产计划
DaoUtils
.
update
(
"HPSC004.update"
,
this
.
synchronousPlan
(
newKc003
));
HPSCTools
.
syncPlan
(
newKc003
.
getProdOrderNo
(),
newKc003
.
getAmount
(
));
// 更新生产任务已完成数量
HPSCTools
.
HpSc005a
.
updateCompleteNum
(
newKc003
.
getProdTaskNo
(),
newKc003
.
getAmount
());
// 修改库存
...
...
@@ -118,27 +121,4 @@ public class ServiceHPKC003 extends ServiceBase {
return
eiInfo
;
}
/**
* 新增入库及删除入库单做同步计划订单
* @param hpkc003
*/
public
HPSC004
synchronousPlan
(
HPKC003
hpkc003
)
{
HPSC004
hpsc004
=
(
HPSC004
)
this
.
dao
.
get
(
"HPSC004.queryDetail"
,
"productionOrderNo"
,
hpkc003
.
getProdOrderNo
());
AssertUtils
.
isNull
(
hpsc004
,
String
.
format
(
"生产订单[%s]对应的任务计划不存在"
,
hpkc003
.
getProdOrderNo
()));
BigDecimal
actualCompletionNum
=
hpkc003
.
getAmount
().
add
(
hpsc004
.
getActualCompletionNum
());
BigDecimal
actualCompletionUnitWt
=
hpkc003
.
getWeight
().
add
(
hpsc004
.
getActualCompletionUnitWt
());
hpsc004
.
setActualCompletionNum
(
actualCompletionNum
);
hpsc004
.
setActualCompletionUnitWt
(
actualCompletionUnitWt
);
//计算是否生产完成
if
(
hpsc004
.
getNum
().
compareTo
(
actualCompletionNum
)
<
0
&&
hpsc004
.
getUnitWt
().
compareTo
(
actualCompletionUnitWt
)
<
0
)
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
hpsc004
.
setActualCompletionDate
(
DateUtils
.
toDateStr
(
new
Date
(),
DateUtils
.
DEFAULT_DATETIME_PATTERN
));
}
else
{
hpsc004
.
setActualCompletionDate
(
""
);
}
return
hpsc004
;
}
}
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC003A.java
View file @
8354d1c3
...
...
@@ -88,11 +88,13 @@ public class ServiceHPKC003A extends ServiceEPBase {
List
<
String
>
prodOrderNos
=
ObjectUtils
.
listKey
(
resultRows
,
"prodOrderNo"
);
// 任务号
List
<
String
>
prodTaskNos
=
ObjectUtils
.
listKey
(
resultRows
,
"prodTaskNo"
);
// 锁订单
// 锁生产计划
HPSCTools
.
HpSc004
.
lock
(
prodOrderNos
);
// 锁生产订单
HPSCTools
.
HpSc005
.
lock
(
prodOrderNos
);
// 锁任务
// 锁
生产
任务
HPSCTools
.
HpSc005a
.
lock
(
prodTaskNos
);
// 查询任务信息
// 查询
生产
任务信息
Map
<
String
,
HPSC005B
>
dbSc005bMap
=
HPSCTools
.
HpSc005b
.
map
(
prodTaskNos
);
// 数据校验
for
(
Map
row
:
resultRows
)
{
...
...
@@ -100,8 +102,7 @@ public class ServiceHPKC003A extends ServiceEPBase {
BigDecimal
applyNum
=
MapUtils
.
getBigDecimal
(
row
,
"applyNum"
);
HPSC005B
fSc005b
=
new
HPSC005B
();
fSc005b
.
fromMap
(
row
);
AssertUtils
.
isEmpty
(
whCode
,
String
.
format
(
"任务号[%s]的仓库不存在为空"
,
fSc005b
.
getProdTaskNo
()));
AssertUtils
.
isEmpty
(
whCode
,
String
.
format
(
"任务号[%s]的仓库不存在为空"
,
fSc005b
.
getProdTaskNo
()));
HPSC005B
dbSc005b
=
dbSc005bMap
.
get
(
fSc005b
.
getProdTaskNo
());
AssertUtils
.
isTrue
(
ProdOrderStatusEnum
.
NOT_ASSIGN
.
getCode
().
equals
(
dbSc005b
.
getStatus
()),
String
.
format
(
"生产任务ID[%s]状态不是已分派,不允许操作"
,
fSc005b
.
getId
()));
...
...
@@ -127,11 +128,13 @@ public class ServiceHPKC003A extends ServiceEPBase {
newKc003
.
setProdNo
(
SequenceGenerator
.
getNextSequence
(
HPConstant
.
SequenceId
.
HPKC003_PROD_NO
));
newKc003
.
setDocumentDate
(
DateUtils
.
shortDate
());
newKc003
.
setWhCode
(
whCode
);
newKc003
.
setWhName
(
HPPZTools
.
getPz007
ByCode
(
whCode
).
getWhName
());
newKc003
.
setWhName
(
HPPZTools
.
HpPz007
.
get
ByCode
(
whCode
).
getWhName
());
newKc003
.
setAmount
(
applyNum
);
newKc003
.
setWeight
(
applyNum
.
multiply
(
dbSc005b
.
getUnitWt
()));
newKc003
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
DaoUtils
.
insert
(
HPKC003
.
INSERT
,
newKc003
);
// 同步生产计划
HPSCTools
.
syncPlan
(
newKc003
.
getProdOrderNo
(),
newKc003
.
getAmount
());
// 更新生产任务已完成数量
HPSCTools
.
HpSc005a
.
updateCompleteNum
(
fSc005b
.
getProdTaskNo
(),
applyNum
);
// 修改库存
...
...
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC005.java
View file @
8354d1c3
...
...
@@ -141,9 +141,9 @@ public class ServiceHPKC005 extends ServiceBase {
// 去除日期字符串中的-
fKc005
.
setReceiptDate
(
StringUtil
.
removeHorizontalLine
(
fKc005
.
getReceiptDate
()));
// 仓库名称
fKc005
.
setWhName
(
HPPZTools
.
getPz007
ByCode
(
fKc005
.
getWhCode
()).
getWhName
());
fKc005
.
setWhName
(
HPPZTools
.
HpPz007
.
get
ByCode
(
fKc005
.
getWhCode
()).
getWhName
());
// 存货名称
fKc005
.
setInventName
(
HPPZTools
.
getPz004
ByCode
(
fKc005
.
getInventCode
()).
getInventName
());
fKc005
.
setInventName
(
HPPZTools
.
HpPz004
.
get
ByCode
(
fKc005
.
getInventCode
()).
getInventName
());
// 差异数量
fKc005
.
setDiffAmount
(
fKc005
.
getEntityAmount
().
subtract
(
fKc005
.
getBookAmount
()));
// 差异重量
...
...
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC006.java
View file @
8354d1c3
...
...
@@ -198,7 +198,7 @@ public class ServiceHPKC006 extends ServiceBase {
// 去除日期字符串中的-
fKc006
.
setReceiptDate
(
StringUtil
.
removeHorizontalLine
(
fKc006
.
getReceiptDate
()));
// 仓库名称
fKc006
.
setWhName
(
HPPZTools
.
getPz007
ByCode
(
fKc006
.
getWhCode
()).
getWhName
());
fKc006
.
setWhName
(
HPPZTools
.
HpPz007
.
get
ByCode
(
fKc006
.
getWhCode
()).
getWhName
());
// 存货名称
//fKc006.setInventName(HPPZTools.getPz004ByCode(fKc006.getInventCode()).getInventName());
}
...
...
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC007.java
View file @
8354d1c3
...
...
@@ -183,9 +183,9 @@ public class ServiceHPKC007 extends ServiceBase {
// 去除日期字符串中的-
fKc007
.
setReceiptDate
(
StringUtil
.
removeHorizontalLine
(
fKc007
.
getReceiptDate
()));
// 仓库名称
fKc007
.
setWhName
(
HPPZTools
.
getPz007
ByCode
(
fKc007
.
getWhCode
()).
getWhName
());
fKc007
.
setWhName
(
HPPZTools
.
HpPz007
.
get
ByCode
(
fKc007
.
getWhCode
()).
getWhName
());
// 存货名称
fKc007
.
setInventName
(
HPPZTools
.
getPz004
ByCode
(
fKc007
.
getInventCode
()).
getInventName
());
fKc007
.
setInventName
(
HPPZTools
.
HpPz004
.
get
ByCode
(
fKc007
.
getInventCode
()).
getInventName
());
}
/**
...
...
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC008.java
View file @
8354d1c3
...
...
@@ -89,7 +89,7 @@ public class ServiceHPKC008 extends ServiceBase {
// 去除日期字符串中的-
fKc008
.
setDateMonth
(
StringUtil
.
removeHorizontalLine
(
fKc008
.
getDateMonth
()));
// 存货名称
fKc008
.
setInventName
(
HPPZTools
.
getPz004
ByCode
(
fKc008
.
getInventCode
()).
getInventName
());
fKc008
.
setInventName
(
HPPZTools
.
HpPz004
.
get
ByCode
(
fKc008
.
getInventCode
()).
getInventName
());
// 计算总金额
fKc008
.
setTotalPrice
(
fKc008
.
getAmount
().
multiply
(
fKc008
.
getPrice
()));
// 生成单据号
...
...
@@ -120,7 +120,7 @@ public class ServiceHPKC008 extends ServiceBase {
// 去除日期字符串中的-
fKc008
.
setDateMonth
(
StringUtil
.
removeHorizontalLine
(
fKc008
.
getDateMonth
()));
// 存货名称
fKc008
.
setInventName
(
HPPZTools
.
getPz004
ByCode
(
fKc008
.
getInventCode
()).
getInventName
());
fKc008
.
setInventName
(
HPPZTools
.
HpPz004
.
get
ByCode
(
fKc008
.
getInventCode
()).
getInventName
());
// 计算总金额
fKc008
.
setTotalPrice
(
fKc008
.
getAmount
().
multiply
(
fKc008
.
getPrice
()));
DaoUtils
.
update
(
HPKC008
.
UPDATE
,
fKc008
);
...
...
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC009.java
View file @
8354d1c3
...
...
@@ -285,10 +285,10 @@ public class ServiceHPKC009 extends ServiceBase {
private
void
setBaseInfo
(
List
<
HPKC009
>
kc009s
)
{
// 仓库名称
List
<
String
>
whCodes
=
kc009s
.
stream
().
map
(
HPKC009:
:
getWhCode
).
collect
(
Collectors
.
toList
());
Map
<
String
,
HPPZ007
>
mapPz007
=
HPPZTools
.
mapPz007
(
whCodes
);
Map
<
String
,
HPPZ007
>
mapPz007
=
HPPZTools
.
HpPz007
.
map
(
whCodes
);
// 存货名称
List
<
String
>
inventCodes
=
kc009s
.
stream
().
map
(
HPKC009:
:
getInventCode
).
collect
(
Collectors
.
toList
());
Map
<
String
,
HPPZ004
>
mapPz004
=
HPPZTools
.
mapPz004
(
inventCodes
);
Map
<
String
,
HPPZ004
>
mapPz004
=
HPPZTools
.
HpPz004
.
map
(
inventCodes
);
for
(
HPKC009
kc009
:
kc009s
)
{
// 仓库名称
String
whCode
=
kc009
.
getWhCode
();
...
...
src/main/java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ006.java
View file @
8354d1c3
...
...
@@ -77,7 +77,7 @@ public class ServiceHPPZ006 extends ServiceBase {
HPPZ006
fPz006
=
new
HPPZ006
();
fPz006
.
fromMap
(
resultRows
.
get
(
i
));
// 存货名称
fPz006
.
setInventName
(
HPPZTools
.
getPz004
ByCode
(
fPz006
.
getInventCode
()).
getInventName
());
fPz006
.
setInventName
(
HPPZTools
.
HpPz004
.
get
ByCode
(
fPz006
.
getInventCode
()).
getInventName
());
fPz006
.
setSpec
(
HPPZTools
.
jointSpec
(
fPz006
.
getLength
(),
fPz006
.
getWidth
(),
fPz006
.
getThick
()));
DaoUtils
.
insert
(
HPPZ006
.
INSERT
,
fPz006
);
}
...
...
@@ -126,7 +126,7 @@ public class ServiceHPPZ006 extends ServiceBase {
HPPZ006
fPz006
=
new
HPPZ006
();
fPz006
.
fromMap
(
resultRows
.
get
(
i
));
// 存货名称
fPz006
.
setInventName
(
HPPZTools
.
getPz004
ByCode
(
fPz006
.
getInventCode
()).
getInventName
());
fPz006
.
setInventName
(
HPPZTools
.
HpPz004
.
get
ByCode
(
fPz006
.
getInventCode
()).
getInventName
());
fPz006
.
setSpec
(
HPPZTools
.
jointSpec
(
fPz006
.
getLength
(),
fPz006
.
getWidth
(),
fPz006
.
getThick
()));
DaoUtils
.
update
(
HPPZ006
.
UPDATE
,
fPz006
);
}
...
...
src/main/java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ011.java
View file @
8354d1c3
...
...
@@ -116,7 +116,7 @@ public class ServiceHPPZ011 extends ServiceBase {
*/
private
void
add
(
HPPZ011
fPz011
)
{
// 校验厂区名是否存在
HPPZ011
dbPz011
=
HPPZTools
.
getPz011
ByName
(
fPz011
.
getFactoryName
());
HPPZ011
dbPz011
=
HPPZTools
.
HpPz011
.
get
ByName
(
fPz011
.
getFactoryName
());
if
(
dbPz011
!=
null
)
{
fPz011
.
setFactoryCode
(
dbPz011
.
getFactoryCode
());
}
else
{
...
...
src/main/java/com/baosight/hpjx/hp/pz/sql/HPPZ011.xml
View file @
8354d1c3
...
...
@@ -142,7 +142,9 @@
FACTORY_NAME as "factoryName"
<!-- 厂区名称 -->
FROM ${hpjxSchema}.T_HPPZ011
WHERE DELETE_FLAG = 0
<include
refid=
"condition"
/>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
ORDER BY FACTORY_CODE ASC
</select>
...
...
@@ -175,7 +177,7 @@
<isNotEmpty
prepend=
" AND "
property=
"factoryCode"
>
A.FACTORY_CODE = #factoryCode#
</isNotEmpty>
ORDER BY FACTORY_CODE ASC
ORDER BY
A.
FACTORY_CODE ASC
</select>
</sqlMap>
src/main/java/com/baosight/hpjx/hp/pz/tools/HPPZTools.java
View file @
8354d1c3
...
...
@@ -53,138 +53,167 @@ public class HPPZTools {
AssertUtils
.
isEmpty
(
results
,
String
.
format
(
"厂区生产组ID[%s]不存在"
,
id
));
return
results
.
get
(
0
);
}
}
/**
* 查询存货
*
* @param inventCode
* @return
*/
public
static
HPPZ004
getPz004ByCode
(
String
inventCode
)
{
AssertUtils
.
isEmpty
(
inventCode
,
"存货编码不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"inventCode"
,
inventCode
);
List
<
HPPZ004
>
pz004s
=
DaoBase
.
getInstance
().
query
(
"HPPZ004.query"
,
queryMap
);
AssertUtils
.
isNull
(
pz004s
,
String
.
format
(
"存货编码[%s]不存在"
,
inventCode
));
return
pz004s
.
get
(
0
);
}
/**
* 查询仓库
*
* @param whCode
* @return
*/
public
static
HPPZ007
getPz007ByCode
(
String
whCode
)
{
AssertUtils
.
isEmpty
(
whCode
,
"仓库编码不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"whCode"
,
whCode
);
List
<
HPPZ007
>
pz007s
=
DaoBase
.
getInstance
().
query
(
"HPPZ007.queryByWhCode"
,
queryMap
);
AssertUtils
.
isNull
(
pz007s
,
String
.
format
(
"仓库编码[%s]不存在"
,
whCode
));
return
pz007s
.
get
(
0
);
}
/**
* 查询存货信息
*
* @param inventCodes
* @return
*/
public
static
List
<
HPPZ004
>
listPz004
(
List
<
String
>
inventCodes
)
{
if
(
CollectionUtils
.
isEmpty
(
inventCodes
))
{
return
null
;
/**
* 查询厂区信息
*
* @param factoryName
* @return
*/
public
static
HPPZ011
getByName
(
String
factoryName
)
{
AssertUtils
.
isEmpty
(
factoryName
,
"厂区名称不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"factoryName"
,
factoryName
);
List
<
HPPZ011
>
dbPz011s
=
DaoBase
.
getInstance
().
query
(
HPSqlConstant
.
HPPZ011
.
GET
,
queryMap
);
return
CollectionUtils
.
isEmpty
(
dbPz011s
)
?
null
:
dbPz011s
.
get
(
0
);
}
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"inventCodes"
,
inventCodes
);
return
DaoBase
.
getInstance
().
query
(
HPPZ004
.
QUERY
,
queryMap
);
}
/**
*
查询存货信息
*
HPPZ004 公共DAO定义
*
* @
param inventCodes
* @
return
* @
author:songx
* @
date:2024/2/6,13:37
*/
public
static
Map
<
String
,
HPPZ004
>
mapPz004
(
List
<
String
>
inventCodes
)
{
List
<
HPPZ004
>
pz004s
=
listPz004
(
inventCodes
);
if
(
CollectionUtils
.
isEmpty
(
pz004s
))
{
return
null
;
public
static
class
HpPz004
{
/**
* 查询存货
*
* @param inventCode
* @return
*/
public
static
HPPZ004
getByCode
(
String
inventCode
)
{
AssertUtils
.
isEmpty
(
inventCode
,
"存货编码不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"inventCode"
,
inventCode
);
List
<
HPPZ004
>
pz004s
=
DaoBase
.
getInstance
().
query
(
HPPZ004
.
QUERY
,
queryMap
);
AssertUtils
.
isNull
(
pz004s
,
String
.
format
(
"存货编码[%s]不存在"
,
inventCode
));
return
pz004s
.
get
(
0
);
}
return
pz004s
.
stream
().
collect
(
Collectors
.
toMap
(
HPPZ004:
:
getInventCode
,
item
->
item
));
}
/**
* 查询仓库信息
*
* @param whCodes
* @return
*/
public
static
List
<
HPPZ007
>
listPz007
(
List
<
String
>
whCodes
)
{
if
(
CollectionUtils
.
isEmpty
(
whCodes
))
{
return
null
;
/**
* 查询存货信息
*
* @param inventCodes
* @return
*/
public
static
List
<
HPPZ004
>
list
(
List
<
String
>
inventCodes
)
{
if
(
CollectionUtils
.
isEmpty
(
inventCodes
))
{
return
null
;
}
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"inventCodes"
,
inventCodes
);
return
DaoBase
.
getInstance
().
query
(
HPPZ004
.
QUERY
,
queryMap
);
}
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"whCodes"
,
whCodes
);
return
DaoBase
.
getInstance
().
query
(
"HPPZ007.query"
,
queryMap
);
}
/**
* 查询仓库信息
*
* @param whCodes
* @return
*/
public
static
Map
<
String
,
HPPZ007
>
mapPz007
(
List
<
String
>
whCodes
)
{
List
<
HPPZ007
>
pz007s
=
listPz007
(
whCodes
);
if
(
CollectionUtils
.
isEmpty
(
pz007s
))
{
return
null
;
/**
* 查询存货信息
*
* @param inventCodes
* @return
*/
public
static
Map
<
String
,
HPPZ004
>
map
(
List
<
String
>
inventCodes
)
{
List
<
HPPZ004
>
pz004s
=
list
(
inventCodes
);
if
(
CollectionUtils
.
isEmpty
(
pz004s
))
{
return
null
;
}
return
pz004s
.
stream
().
collect
(
Collectors
.
toMap
(
HPPZ004:
:
getInventCode
,
item
->
item
));
}
return
pz007s
.
stream
().
collect
(
Collectors
.
toMap
(
HPPZ007:
:
getWhCode
,
item
->
item
));
}
/**
*
查询企业信息
*
HPPZ007 公共DAO定义
*
* @param companyCode
* @return
*/
public
static
HPPZ009
getPz009
(
String
companyCode
)
{
AssertUtils
.
isEmpty
(
companyCode
,
"企业编码不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"companyCode"
,
companyCode
);
List
<
HPPZ009
>
pz009s
=
DaoBase
.
getInstance
().
query
(
"HPPZ009.query"
,
queryMap
);
return
CollectionUtils
.
isEmpty
(
pz009s
)
?
null
:
pz009s
.
get
(
0
);
}
/**
* 查询厂区信息
*
* @param factoryName
* @return
* @author:songx
* @date:2024/2/6,13:37
*/
public
static
HPPZ011
getPz011ByName
(
String
factoryName
)
{
AssertUtils
.
isEmpty
(
factoryName
,
"厂区名称不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"factoryName"
,
factoryName
);
List
<
HPPZ011
>
dbPz011s
=
DaoBase
.
getInstance
().
query
(
HPSqlConstant
.
HPPZ011
.
GET
,
queryMap
);
return
CollectionUtils
.
isEmpty
(
dbPz011s
)
?
null
:
dbPz011s
.
get
(
0
);
public
static
class
HpPz007
{
/**
* 查询仓库
*
* @param whCode
* @return
*/
public
static
HPPZ007
getByCode
(
String
whCode
)
{
AssertUtils
.
isEmpty
(
whCode
,
"仓库编码不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"whCode"
,
whCode
);
List
<
HPPZ007
>
pz007s
=
DaoBase
.
getInstance
().
query
(
HPPZ007
.
QUERY
,
queryMap
);
AssertUtils
.
isNull
(
pz007s
,
String
.
format
(
"仓库编码[%s]不存在"
,
whCode
));
return
pz007s
.
get
(
0
);
}
/**
* 查询仓库信息
*
* @param whCodes
* @return
*/
public
static
List
<
HPPZ007
>
list
(
List
<
String
>
whCodes
)
{
if
(
CollectionUtils
.
isEmpty
(
whCodes
))
{
return
null
;
}
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"whCodes"
,
whCodes
);
return
DaoBase
.
getInstance
().
query
(
"HPPZ007.query"
,
queryMap
);
}
/**
* 查询仓库信息
*
* @param whCodes
* @return
*/
public
static
Map
<
String
,
HPPZ007
>
map
(
List
<
String
>
whCodes
)
{
List
<
HPPZ007
>
pz007s
=
list
(
whCodes
);
if
(
CollectionUtils
.
isEmpty
(
pz007s
))
{
return
null
;
}
return
pz007s
.
stream
().
collect
(
Collectors
.
toMap
(
HPPZ007:
:
getWhCode
,
item
->
item
));
}
}
/**
*
企业是否启用
*
HPPZ009 公共DAO定义
*
* @
param companyCode
* @
return
* @
author:songx
* @
date:2024/2/6,13:37
*/
public
static
boolean
isValid
(
String
companyCode
)
{
HPPZ009
pz009
=
getPz009
(
companyCode
);
if
(
pz009
==
null
)
{
return
false
;
public
static
class
HpPz009
{
/**
* 查询企业信息
*
* @param companyCode
* @return
*/
public
static
HPPZ009
getByCode
(
String
companyCode
)
{
AssertUtils
.
isEmpty
(
companyCode
,
"企业编码不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"companyCode"
,
companyCode
);
List
<
HPPZ009
>
pz009s
=
DaoBase
.
getInstance
().
query
(
"HPPZ009.query"
,
queryMap
);
return
CollectionUtils
.
isEmpty
(
pz009s
)
?
null
:
pz009s
.
get
(
0
);
}
/**
* 企业是否启用
*
* @param companyCode
* @return
*/
public
static
boolean
isValid
(
String
companyCode
)
{
HPPZ009
pz009
=
getByCode
(
companyCode
);
if
(
pz009
==
null
)
{
return
false
;
}
return
CommonConstant
.
YesNo
.
YES_1
.
equals
(
pz009
.
getValidFlag
());
}
return
CommonConstant
.
YesNo
.
YES_1
.
equals
(
pz009
.
getValidFlag
());
}
/**
* 拼接规格
* @param length
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002.java
View file @
8354d1c3
...
...
@@ -132,7 +132,7 @@ public class ServiceHPSC002 extends ServiceBase {
hppz002
.
setDelStatus
(
CommonConstant
.
YesNo
.
NO_0
.
intValue
());
hppz002
.
setTotalWt
(
totalWt
);
if
(
StringUtils
.
isNotEmpty
(
hppz002
.
getPrdtCode
())
&&
!
hppz002
.
getParentId
().
equals
(
"root"
))
{
hppz002
.
setPrdtName
(
HPPZTools
.
getPz004
ByCode
(
hppz002
.
getPrdtCode
()).
getInventName
());
hppz002
.
setPrdtName
(
HPPZTools
.
HpPz004
.
get
ByCode
(
hppz002
.
getPrdtCode
()).
getInventName
());
}
DaoUtils
.
update
(
"HPSC002.update"
,
hppz002
.
toMap
());
}
...
...
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC003.xml
View file @
8354d1c3
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<!-- table information
Generate time : 2024-01-17 10:33:49
Version : 1.0
schema : hpjx
tableName : T_HPSC003
ID BIGINT NOT NULL primarykey,
COMPANY_CODE VARCHAR NOT NULL,
PROJ_TYPE TINYINT,
PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR,
PLAN_INFO_NO VARCHAR,
PRDT_CODE VARCHAR,
PRDT_NAME VARCHAR,
PLAN_COMPLETION_DATE VARCHAR,
STATUS TINYINT,
CREATED_BY VARCHAR,
CREATED_TIME DATETIME,
UPDATED_BY VARCHAR,
UPDATED_TIME DATETIME,
DEP_CODE VARCHAR,
REMARK VARCHAR
-->
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"HPSC003"
>
<sql
id=
"condition"
>
...
...
@@ -128,54 +107,6 @@
<include
refid=
"condition"
/>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projType">
PROJ_TYPE = #projType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planInfoNo">
PLAN_INFO_NO = #planInfoNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode">
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME LIKE ('%$prdtName$%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planCompletionDate">
PLAN_COMPLETION_DATE = #planCompletionDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remark">
REMARK = #remark#
</isNotEmpty>
-->
<insert
id=
"insert"
>
INSERT INTO hpjx.T_HPSC003 (ID,
COMPANY_CODE,
<!-- 企业编码 预留 -->
...
...
src/main/java/com/baosight/hpjx/hp/sc/sql/HPSC004.xml
View file @
8354d1c3
...
...
@@ -110,6 +110,13 @@
</isNotEmpty>
</sql>
<!-- 公共修改字段 -->
<sql
id=
"updateRevise"
>
UPDATED_BY = #updatedBy#,
<!-- 修改人 -->
UPDATED_NAME = #updatedName#,
<!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#
<!-- 修改时间 -->
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.sc.domain.HPSC004"
>
SELECT
...
...
@@ -170,108 +177,6 @@
<include
refid=
"condition"
/>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deptCode">
DEPT_CODE = #deptCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentPrdtName">
PARENT_PRDT_NAME = #parentPrdtName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="type">
TYPE = #type#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="leaf">
LEAF = #leaf#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="sort">
SORT = #sort#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="icon">
ICON = #icon#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode">
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME = #prdtName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="num">
NUM = #num#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unitWt">
UNIT_WT = #unitWt#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalWt">
TOTAL_WT = #totalWt#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath1">
FILE_PATH1 = #filePath1#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath2">
FILE_PATH2 = #filePath2#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath3">
FILE_PATH3 = #filePath3#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath4">
FILE_PATH4 = #filePath4#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="filePath5">
FILE_PATH5 = #filePath5#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planCommentDate">
PLAN_COMMENT_DATE = #planCommentDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="planCompletionDate">
PLAN_COMPLETION_DATE = #planCompletionDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="actualCompletionDate">
ACTUAL_COMPLETION_DATE = #actualCompletionDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="actualCompletionNum">
ACTUAL_COMPLETION_NUM = #actualCompletionNum#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="actualCompletionUnitWt">
ACTUAL_COMPLETION_UNIT_WT = #actualCompletionUnitWt#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="delStatus">
DEL_STATUS = #delStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remark">
REMARK = #remark#
</isNotEmpty>
-->
<insert
id=
"insert"
>
INSERT INTO hpjx.T_HPSC004 (ID,
COMPANY_CODE,
<!-- 企业编码 预留 -->
...
...
@@ -382,6 +287,17 @@
ID = #id#
</update>
<!-- 更新完成数量、重量、时间 -->
<update
id=
"updateComplete"
>
UPDATE hpjx.T_HPSC004
SET
ACTUAL_COMPLETION_DATE = #actualCompletionDate#,
<!-- 实际完工日期 -->
ACTUAL_COMPLETION_NUM = #actualCompletionNum#,
<!-- 实际完工数量 -->
ACTUAL_COMPLETION_UNIT_WT = #actualCompletionUnitWt#,
<!-- 实际完工重量 -->
<include
refid=
"updateRevise"
/>
WHERE ID = #id#
</update>
<select
id=
"queryDetail"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.sc.domain.HPSC004"
>
SELECT
...
...
@@ -447,6 +363,19 @@
ID = #id#
</update>
<!-- 行锁 -->
<update
id=
"lock"
>
UPDATE ${hpjxSchema}.T_HPSC004
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"prodOrderNo"
>
PRODUCTION_ORDER_NO = #prodOrderNo#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"prodOrderNos"
>
PRODUCTION_ORDER_NO IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"prodOrderNos"
>
#prodOrderNos[]#
</iterate>
</isNotEmpty>
</update>
<!-- 零部件下拉框 -->
<select
id=
"queryInventComboBox"
parameterClass=
"java.util.HashMap"
resultClass=
"java.util.HashMap"
>
SELECT DISTINCT
...
...
src/main/java/com/baosight/hpjx/hp/sc/tools/HPSCTools.java
View file @
8354d1c3
package
com
.
baosight
.
hpjx
.
hp
.
sc
.
tools
;
import
com.baosight.hpjx.core.dao.DaoBase
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.hp.constant.HPSqlConstant
;
import
com.baosight.hpjx.hp.kc.domain.HPKC001
;
import
com.baosight.hpjx.hp.kc.domain.HPKC003
;
import
com.baosight.hpjx.hp.kc.domain.HPKC005
;
import
com.baosight.hpjx.hp.kc.domain.HPKC010
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ004
;
import
com.baosight.hpjx.hp.sc.domain.HPSC001
;
import
com.baosight.hpjx.hp.sc.domain.HPSC002
;
import
com.baosight.hpjx.hp.sc.domain.HPSC004
;
import
com.baosight.hpjx.hp.sc.domain.HPSC005
;
import
com.baosight.hpjx.hp.sc.domain.HPSC005A
;
import
com.baosight.hpjx.hp.sc.domain.HPSC005B
;
import
com.baosight.hpjx.util.AssertUtils
;
import
com.baosight.hpjx.util.DateUtils
;
import
com.baosight.hpjx.util.StringUtils
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
org.apache.commons.collections.CollectionUtils
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -62,7 +68,33 @@ public class HPSCTools {
}
else
{
updateMap
.
put
(
"status"
,
0
);
}
DaoBase
.
getInstance
().
update
(
HPSqlConstant
.
HPSC005
.
UPDATE_ASSIGN_NUM
,
updateMap
);
DaoUtils
.
update
(
HPSqlConstant
.
HPSC005
.
UPDATE_ASSIGN_NUM
,
updateMap
);
}
/**
* 新增入库及删除入库单做同步计划订单
*
* @param prodOrderNo
* @param num
*/
public
static
void
syncPlan
(
String
prodOrderNo
,
BigDecimal
num
)
{
HPSC004
dbSc004
=
HPSCTools
.
HpSc004
.
get
(
prodOrderNo
);
AssertUtils
.
isNull
(
dbSc004
,
String
.
format
(
"生产订单计划[%s]不存在"
,
prodOrderNo
));
BigDecimal
completionNum
=
num
.
add
(
dbSc004
.
getActualCompletionNum
());
AssertUtils
.
isGt
(
BigDecimal
.
ZERO
,
completionNum
,
"更新后的生产计划完成数量小于0,请检查"
);
BigDecimal
completionUnitWt
=
num
.
multiply
(
dbSc004
.
getUnitWt
());
// 计算重量
HPSC004
newSc004
=
new
HPSC004
();
newSc004
.
setId
(
dbSc004
.
getId
());
newSc004
.
setActualCompletionNum
(
completionNum
);
newSc004
.
setActualCompletionUnitWt
(
completionUnitWt
);
// 计算是否生产完成
if
(
dbSc004
.
getNum
().
compareTo
(
completionNum
)
==
0
)
{
newSc004
.
setActualCompletionDate
(
DateUtils
.
shortDateTime
());
}
else
{
newSc004
.
setActualCompletionDate
(
""
);
}
DaoUtils
.
update
(
HPSqlConstant
.
HPSC004
.
UPDATE_COMPLETE
,
newSc004
);
}
/**
...
...
@@ -113,6 +145,59 @@ public class HPSCTools {
}
}
/**
* HPSC005公共DAO定义
*
* @author:songx
* @date:2024/2/4,10:17
*/
public
static
class
HpSc004
{
/**
* 锁
*
* @param prodOrderNo
* @return
*/
public
static
void
lock
(
String
prodOrderNo
)
{
if
(
StringUtils
.
isBlank
(
prodOrderNo
))
{
return
;
}
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"prodOrderNo"
,
prodOrderNo
);
DaoBase
.
getInstance
().
update
(
HPSqlConstant
.
HPSC004
.
LOCK
,
queryMap
);
}
/**
* 锁
*
* @param prodOrderNos
* @return
*/
public
static
void
lock
(
List
<
String
>
prodOrderNos
)
{
if
(
CollectionUtils
.
isEmpty
(
prodOrderNos
))
{
return
;
}
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"prodOrderNos"
,
prodOrderNos
);
DaoBase
.
getInstance
().
update
(
HPSqlConstant
.
HPSC004
.
LOCK
,
queryMap
);
}
/**
* 查询
*
* @param prodOrderNo
* @return
*/
public
static
HPSC004
get
(
String
prodOrderNo
)
{
AssertUtils
.
isNull
(
prodOrderNo
,
"生产订单号不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"productionOrderNo"
,
prodOrderNo
);
List
<
HPSC004
>
results
=
DaoBase
.
getInstance
().
query
(
HPSC004
.
QUERY
,
queryMap
);
AssertUtils
.
isNull
(
results
,
String
.
format
(
"生产订单号[%s]信息不存在"
,
prodOrderNo
));
return
results
.
get
(
0
);
}
}
/**
* HPSC005公共DAO定义
...
...
@@ -162,7 +247,7 @@ public class HPSCTools {
AssertUtils
.
isNull
(
id
,
"生产任务ID不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"id"
,
id
);
List
<
HPSC005
>
results
=
DaoBase
.
getInstance
().
query
(
"HPSC005.query"
,
queryMap
);
List
<
HPSC005
>
results
=
DaoBase
.
getInstance
().
query
(
HPSC005
.
QUERY
,
queryMap
);
AssertUtils
.
isNull
(
results
,
String
.
format
(
"生产任务ID[%s]信息不存在"
,
id
));
return
results
.
get
(
0
);
}
...
...
src/main/java/com/baosight/xservices/xs/impl/SecurityUserStandardImpl.java
View file @
8354d1c3
...
...
@@ -128,7 +128,7 @@ public class SecurityUserStandardImpl extends ServiceEPBase implements ISecurity
}
else
if
(!
"-1"
.
equals
(
userMap
.
get
(
"isLocked"
))
&&
!
"-1"
.
equals
(
userMap
.
get
(
"status"
)))
{
// 登录校验增加企业是否启用 modify by songx at 2024-01-16
String
dbCompanyCode
=
(
String
)
userMap
.
get
(
"companyCode"
);
if
(
StringUtils
.
isBlank
(
dbCompanyCode
)
||
HPPZTools
.
isValid
(
dbCompanyCode
))
{
if
(
StringUtils
.
isBlank
(
dbCompanyCode
)
||
HPPZTools
.
HpPz009
.
isValid
(
dbCompanyCode
))
{
String
pwdExpireDateString
=
(
String
)
userMap
.
get
(
"pwdExpireDate"
);
String
accountExpireDateString
=
(
String
)
userMap
.
get
(
"accountExpireDate"
);
String
nowDateString
=
DateUtils
.
curDateStr8
();
...
...
src/main/webapp/HP/KC/HPKC003A.jsp
View file @
8354d1c3
...
...
@@ -26,6 +26,7 @@
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
checkMode=
"row"
>
<EF:EFColumn
ename=
"id"
cname=
"生产订单ID"
enable=
"false"
width=
"90"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"childId"
cname=
"生产任务ID"
enable=
"false"
width=
"90"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"projCode"
cname=
"项目号"
enable=
"false"
width=
"140"
align=
"center"
/>
<EF:EFColumn
ename=
"projName"
cname=
"项目名称"
enable=
"false"
width=
"140"
align=
"center"
/>
<EF:EFColumn
ename=
"prdtName"
cname=
"部件名称"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"partName"
cname=
"零部件名称"
enable=
"false"
width=
"120"
align=
"center"
/>
...
...
@@ -41,11 +42,10 @@
<EF:EFColumn
ename=
"factoryName"
cname=
"厂区名称"
enable=
"false"
width=
"150"
align=
"center"
/>
<EF:EFColumn
ename=
"orgName"
cname=
"生产组名称"
enable=
"false"
width=
"150"
align=
"center"
/>
<EF:EFColumn
ename=
"remark"
cname=
"备注"
enable=
"false"
width=
"150"
/>
<EF:EFColumn
ename=
"projCode"
cname=
"项目号"
enable=
"false"
width=
"140"
align=
"center"
/>
<EF:EFColumn
ename=
"prdtCode"
cname=
"部件编码"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"partCode"
cname=
"零部件编码"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"factoryCode"
cname=
"厂区编码"
enable=
"false"
width=
"150"
/>
<EF:EFColumn
ename=
"orgNo"
cname=
"生产组编码"
enable=
"false"
width=
"150"
/>
<EF:EFColumn
ename=
"prdtCode"
cname=
"部件编码"
enable=
"false"
width=
"120"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"partCode"
cname=
"零部件编码"
enable=
"false"
width=
"120"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"factoryCode"
cname=
"厂区编码"
enable=
"false"
width=
"150"
hidden=
"true"
/>
<EF:EFColumn
ename=
"orgNo"
cname=
"生产组编码"
enable=
"false"
width=
"150"
hidden=
"true"
/>
<EF:EFColumn
ename=
"prodTaskNo"
cname=
"生产任务号"
enable=
"false"
width=
"150"
align=
"center"
/>
<EF:EFColumn
ename=
"prodOrderNo"
cname=
"生产订单号"
enable=
"false"
width=
"140"
align=
"center"
/>
</EF:EFGrid>
...
...
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