Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
QisdaNew
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 6a3dc070
由
sunke
编写于
2020-05-12 13:16:34 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
更新数量导致字段数据丢失问题
1 个父辈
37974856
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
22 行增加
和
12 行删除
myproject/src/main/java/com/myproject/dao/mongo/qisda/impl/OutItemDaoImpl.java
myproject/src/main/java/com/myproject/webapp/controller/qisda/util/OutInfoCache.java
myproject/src/main/java/com/myproject/webapp/controller/qisda/util/SoseqCache.java
myproject/src/main/java/com/myproject/webapp/controller/webService/MainTimer.java
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaApiController.java
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaBindService.java
myproject/src/main/java/com/myproject/dao/mongo/qisda/impl/OutItemDaoImpl.java
查看文件 @
6a3dc07
...
@@ -53,28 +53,35 @@ public class OutItemDaoImpl extends AbstractMongoDao implements IOutItemDao {
...
@@ -53,28 +53,35 @@ public class OutItemDaoImpl extends AbstractMongoDao implements IOutItemDao {
@Override
@Override
public
void
updateQty
(
String
outItemId
,
int
outQty
,
int
sendQty
){
public
void
updateQty
(
String
outItemId
,
int
outQty
,
int
sendQty
){
Update
update
=
new
Update
();
if
(
outQty
>
0
){
if
(
outQty
>
0
){
Update
update
=
new
Update
();
update
.
set
(
"outQty"
,
outQty
);
update
.
set
(
"outQty"
,
outQty
);
update
(
outItemId
,
update
);
}
}
if
(
sendQty
>
0
){
if
(
sendQty
>
0
){
Update
update
=
new
Update
();
update
.
set
(
"sendQty"
,
sendQty
);
update
.
set
(
"sendQty"
,
sendQty
);
}
update
(
outItemId
,
update
);
update
(
outItemId
,
update
);
}
}
}
@Override
@Override
public
void
updateLockQty
(
String
outItemId
,
int
preLockQty
,
int
realLockQty
){
public
void
updateLockQty
(
String
outItemId
,
int
preLockQty
,
int
realLockQty
){
Update
update
=
new
Update
();
if
(
preLockQty
>
0
){
if
(
preLockQty
>
0
){
Update
update
=
new
Update
();
update
.
set
(
"lockQty"
,
preLockQty
);
update
.
set
(
"lockQty"
,
preLockQty
);
update
(
outItemId
,
update
);
}
}
if
(
realLockQty
>
0
){
if
(
realLockQty
>
0
){
Update
update
=
new
Update
();
update
.
set
(
"realLockQty"
,
realLockQty
);
update
.
set
(
"realLockQty"
,
realLockQty
);
}
update
(
outItemId
,
update
);
update
(
outItemId
,
update
);
}
}
}
@Override
@Override
public
OutItem
findCutItem
(
String
soseq
,
int
slotSeq
){
public
OutItem
findCutItem
(
String
soseq
,
int
slotSeq
){
return
findActionItem
(
"分盘"
,
soseq
,
slotSeq
);
return
findActionItem
(
"分盘"
,
soseq
,
slotSeq
);
...
...
myproject/src/main/java/com/myproject/webapp/controller/qisda/util/OutInfoCache.java
查看文件 @
6a3dc07
...
@@ -357,7 +357,7 @@ public class OutInfoCache {
...
@@ -357,7 +357,7 @@ public class OutInfoCache {
}
}
}
}
p
rivate
OutInfo
getOutInfoFromCache
(
String
hSerial
){
p
ublic
OutInfo
getOutInfoFromCache
(
String
hSerial
){
OutInfo
outInfo
=
outInfoMap
.
get
(
hSerial
);
OutInfo
outInfo
=
outInfoMap
.
get
(
hSerial
);
if
(
outInfo
==
null
){
if
(
outInfo
==
null
){
log
.
info
(
"未找到需求单["
+
hSerial
+
"]的缓存信息,从数据库中加载"
);
log
.
info
(
"未找到需求单["
+
hSerial
+
"]的缓存信息,从数据库中加载"
);
...
@@ -795,10 +795,13 @@ public class OutInfoCache {
...
@@ -795,10 +795,13 @@ public class OutInfoCache {
List
<
StoragePos
>
bindPosList
=
storagePosDao
.
findBindList
(
outItem
.
getSoseq
(),
outItem
.
getSlotlocation
());
List
<
StoragePos
>
bindPosList
=
storagePosDao
.
findBindList
(
outItem
.
getSoseq
(),
outItem
.
getSlotlocation
());
StoragePos
maxQtyReelPos
=
null
;
StoragePos
maxQtyReelPos
=
null
;
OutItem
totalOutInfo
=
soseqCache
.
getCutOutItem
(
outItem
.
getSoseq
(),
outItem
.
getSlotlocation
());
OutItem
totalOutInfo
=
soseqCache
.
getCutOutItem
(
outItem
.
getSoseq
(),
outItem
.
getSlotlocation
());
if
(
totalOutInfo
!=
null
){
if
(
totalOutInfo
.
getOutQty
()
==
0
){
if
(
totalOutInfo
.
getOutQty
()
==
0
){
//首盘未出,需要预留一盘最大的给首盘
//首盘未出,需要预留一盘最大的给首盘
maxQtyReelPos
=
storagePosDao
.
findMaxQtyBindReel
(
outItem
.
getSoseq
(),
outItem
.
getSlotlocation
());
maxQtyReelPos
=
storagePosDao
.
findMaxQtyBindReel
(
outItem
.
getSoseq
(),
outItem
.
getSlotlocation
());
}
}
}
//没有顺序
//没有顺序
int
sendQty
=
outItem
.
getSendQty
();
int
sendQty
=
outItem
.
getSendQty
();
int
fixQty
=
outItem
.
getFixedQty
();
int
fixQty
=
outItem
.
getFixedQty
();
...
...
myproject/src/main/java/com/myproject/webapp/controller/qisda/util/SoseqCache.java
查看文件 @
6a3dc07
...
@@ -62,7 +62,7 @@ public class SoseqCache {
...
@@ -62,7 +62,7 @@ public class SoseqCache {
boolean
allItemsBindOk
=
true
;
boolean
allItemsBindOk
=
true
;
for
(
OutItem
outItem
:
outInfo
.
getOutItems
())
{
for
(
OutItem
outItem
:
outInfo
.
getOutItems
())
{
if
(
outItem
.
getRealLockQty
()
>
0
&&
!
outItem
.
isCutMaterial
()){
if
(
outItem
.
getRealLockQty
()
>
0
&&
outItem
.
isCutMaterial
()){
hasBindItem
=
true
;
hasBindItem
=
true
;
}
}
...
@@ -91,7 +91,6 @@ public class SoseqCache {
...
@@ -91,7 +91,6 @@ public class SoseqCache {
if
(
outInfo
!=
null
){
if
(
outInfo
!=
null
){
OutItem
cutOutItem
=
getCutOutItem
(
outItem
.
getSoseq
(),
outItem
.
getSlotlocation
());
OutItem
cutOutItem
=
getCutOutItem
(
outItem
.
getSoseq
(),
outItem
.
getSlotlocation
());
if
(
cutOutItem
!=
null
){
if
(
cutOutItem
!=
null
){
if
(
cutOutItem
!=
null
){
int
totalSendQty
=
cutOutItem
.
getSendQty
();
int
totalSendQty
=
cutOutItem
.
getSendQty
();
totalSendQty
=
totalSendQty
+
sendQty
;
totalSendQty
=
totalSendQty
+
sendQty
;
int
outQty
=
0
;
int
outQty
=
0
;
...
@@ -109,7 +108,6 @@ public class SoseqCache {
...
@@ -109,7 +108,6 @@ public class SoseqCache {
}
}
}
}
}
}
}
/**
/**
...
@@ -142,6 +140,7 @@ public class SoseqCache {
...
@@ -142,6 +140,7 @@ public class SoseqCache {
if
(
totalRealLockQty
>
0
){
if
(
totalRealLockQty
>
0
){
cutOutItem
.
setRealLockQty
(
totalRealLockQty
);
cutOutItem
.
setRealLockQty
(
totalRealLockQty
);
}
}
outItemDao
.
updateLockQty
(
cutOutItem
.
getId
(),
totalPreLockQty
,
totalRealLockQty
);
outItemDao
.
updateLockQty
(
cutOutItem
.
getId
(),
totalPreLockQty
,
totalRealLockQty
);
outInfo
.
updateItem
(
cutOutItem
);
outInfo
.
updateItem
(
cutOutItem
);
soSeqCacheMap
.
put
(
outInfo
.
getSoseq
(),
outInfo
);
soSeqCacheMap
.
put
(
outInfo
.
getSoseq
(),
outInfo
);
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/MainTimer.java
查看文件 @
6a3dc07
...
@@ -56,6 +56,8 @@ public class MainTimer {
...
@@ -56,6 +56,8 @@ public class MainTimer {
InquiryShelfBean
.
initShelfMap
();
InquiryShelfBean
.
initShelfMap
();
outInfoCache
.
loadUnEndOutInfos
();
outInfoCache
.
loadUnEndOutInfos
();
log
.
info
(
"主定时器开启,60秒后开始执行, 每10s执行一次"
);
log
.
info
(
"主定时器开启,60秒后开始执行, 每10s执行一次"
);
//1 分钟之后执行,每秒钟执行一次
//1 分钟之后执行,每秒钟执行一次
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaApiController.java
查看文件 @
6a3dc07
...
@@ -49,9 +49,6 @@ public class QisdaApiController extends BaseController {
...
@@ -49,9 +49,6 @@ public class QisdaApiController extends BaseController {
private
IOutInfoDao
outInfoDao
;
private
IOutInfoDao
outInfoDao
;
@Autowired
@Autowired
private
DataCache
dataCache
;
@Autowired
private
OutInfoCache
outInfoCache
;
private
OutInfoCache
outInfoCache
;
...
@@ -114,6 +111,8 @@ public class QisdaApiController extends BaseController {
...
@@ -114,6 +111,8 @@ public class QisdaApiController extends BaseController {
@ResponseBody
@ResponseBody
public
String
executeOut
(
HttpServletRequest
request
){
public
String
executeOut
(
HttpServletRequest
request
){
String
hSerial
=
request
.
getParameter
(
"hSerial"
);
String
hSerial
=
request
.
getParameter
(
"hSerial"
);
OutInfo
outInfo
=
outInfoCache
.
getOutInfoFromCache
(
hSerial
);
qisdaBindService
.
realBindOutInfo
(
outInfo
);
ResultBean
resultBean
=
outInfoCache
.
checkOutOutItems
(
hSerial
);
ResultBean
resultBean
=
outInfoCache
.
checkOutOutItems
(
hSerial
);
return
resultBean
.
getMsg
();
return
resultBean
.
getMsg
();
}
}
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/QisdaBindService.java
查看文件 @
6a3dc07
...
@@ -44,7 +44,7 @@ public class QisdaBindService {
...
@@ -44,7 +44,7 @@ public class QisdaBindService {
*/
*/
public
void
realBindOutInfo
(
OutInfo
outInfo
){
public
void
realBindOutInfo
(
OutInfo
outInfo
){
//只对分盘需求单进行绑定(分盘料,未关闭,未绑定OK,未发料完成)
//只对分盘需求单进行绑定(分盘料,未关闭,未绑定OK,未发料完成)
if
(
outInfo
.
isReelCutAction
()
&&
!
outInfo
.
isClosed
()
&&
!
outInfo
.
isRealBindOk
()
&&
!
outInfo
.
isSendEnd
()){
if
(!
outInfo
.
isClosed
()
&&
!
outInfo
.
isRealBindOk
()
&&
!
outInfo
.
isSendEnd
()){
log
.
info
(
"需求单["
+
outInfo
+
"]开始进行真实绑定"
);
log
.
info
(
"需求单["
+
outInfo
+
"]开始进行真实绑定"
);
for
(
OutItem
outItem
:
outInfo
.
getOutItems
())
{
for
(
OutItem
outItem
:
outInfo
.
getOutItems
())
{
firstBindCutReel
(
outItem
);
firstBindCutReel
(
outItem
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论