Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
QisdaNew
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit afe0c59c
由
sunke
编写于
2021-03-09 16:53:04 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
优化条码解析失败时的错误消息
最后一个补料需求单任务为0时,对工单进行解绑 清理库位添加清理记录
1 个父辈
8e0bf381
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
95 行增加
和
26 行删除
myproject/src/main/java/com/myproject/util/QisdaApi.java
myproject/src/main/java/com/myproject/webapp/controller/qisda/util/OutInfoCache.java
myproject/src/main/java/com/myproject/webapp/controller/storage/StoragePosUpdateController.java
myproject/src/main/java/com/myproject/webapp/controller/webService/DataCache.java
myproject/src/main/java/com/myproject/webapp/controller/webService/TaskService.java
myproject/src/main/webapp/WEB-INF/pages/updateHistory.jsp
myproject/src/main/webapp/decorators/metro.jsp
myproject/src/main/java/com/myproject/util/QisdaApi.java
查看文件 @
afe0c59
...
...
@@ -368,7 +368,7 @@ public class QisdaApi {
//TODO:需要重新绑定
}
catch
(
Exception
e
){
log
.
error
(
"纯入库判定出错"
,
e
);
}
}
...
...
@@ -596,7 +596,7 @@ public class QisdaApi {
Map
<
String
,
Object
>
resultMap
=
JsonUtil
.
toMap
(
result
);
String
msg
=
resultMap
.
get
(
"msg"
).
toString
();
if
(
msg
.
startsWith
(
"0"
)){
String
errorMsg
=
"从Qisda获取料号["
+
vdPartNum
+
"]转换
出错
:"
+
msg
;
String
errorMsg
=
"从Qisda获取料号["
+
vdPartNum
+
"]转换
NG
:"
+
msg
;
log
.
info
(
errorMsg
);
throw
new
ApiException
(
errorMsg
);
}
...
...
myproject/src/main/java/com/myproject/webapp/controller/qisda/util/OutInfoCache.java
查看文件 @
afe0c59
...
...
@@ -521,7 +521,7 @@ public class OutInfoCache {
List
<
OutInfo
>
outInfoList
=
Lists
.
newArrayList
();
long
now
=
System
.
currentTimeMillis
();
for
(
OutInfo
outInfo
:
outInfoMap
.
values
())
{
if
(
outInfo
.
isClosed
()
||
outInfo
.
isSendEnd
()
){
if
(
outInfo
.
isClosed
()
/*|| outInfo.isSendEnd()*/
){
removeFromCache
(
outInfo
.
gethSerial
());
}
else
{
if
(
outInfo
!=
null
){
...
...
@@ -1061,6 +1061,10 @@ public class OutInfoCache {
}
else
{
msg
=
"需求单"
+
outInfo
.
gethSerial
()+
"本次出库料盘数量为0"
;
if
(
outInfo
.
isEndOutInfo
()){
log
.
info
(
"需求单["
+
outInfo
.
gethSerial
()+
"]是工单的最后一个需求单,关闭工单"
+
outInfo
.
getSo
()+
"["
+
outInfo
.
getSoseq
()+
"]"
);
closeSoSeq
(
outInfo
.
getSoseq
());
}
}
if
(
outInfo
.
isReelCutAction
()
||
outInfo
.
isFirstReelAction
()){
...
...
myproject/src/main/java/com/myproject/webapp/controller/storage/StoragePosUpdateController.java
查看文件 @
afe0c59
...
...
@@ -3,6 +3,7 @@ package com.myproject.webapp.controller.storage;
import
com.google.common.base.Strings
;
import
com.myproject.bean.form.Message
;
import
com.myproject.bean.update.Barcode
;
import
com.myproject.bean.update.Storage
;
import
com.myproject.bean.update.StoragePos
;
import
com.myproject.dao.mongo.IBarcodeDao
;
import
com.myproject.exception.ValidateException
;
...
...
@@ -11,6 +12,8 @@ import com.myproject.manager.IStoragePosManager;
import
com.myproject.util.QisdaApi
;
import
com.myproject.util.StorageConstants
;
import
com.myproject.webapp.controller.webService.DataCache
;
import
com.myproject.webapp.controller.webService.ITaskService
;
import
com.myproject.webapp.controller.webService.StorageDataController
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
...
...
@@ -31,11 +34,10 @@ public class StoragePosUpdateController extends BaseUpdateController {
private
IStoragePosManager
storagePosManager
;
@Autowired
private
IBarcodeManager
barcodeManager
;
@Autowired
private
DataCache
dataCache
;
private
final
static
String
UPDATE_VIEW
=
"storage/storagePosUpdate"
;
@Autowired
private
ITaskService
taskService
;
@RequestMapping
(
"/storage/getStoragePos"
)
@ResponseBody
...
...
@@ -70,17 +72,20 @@ public class StoragePosUpdateController extends BaseUpdateController {
if
(
barcode
!=
null
){
log
.
info
(
"清理库位["
+
storagePos
.
getPosName
()+
"]中的库存"
+
barcode
.
getBarcode
());
barcode
=
barcodeManager
.
findByBarcode
(
barcode
.
getBarcode
());
barcode
.
setPosName
(
""
);
barcodeManager
.
save
(
barcode
);
storagePos
.
setBarcode
(
null
);
storagePos
.
setUsed
(
false
);
storagePosManager
.
save
(
storagePos
);
dataCache
.
updateInventory
(
storagePos
,
barcode
);
String
opUser
=
StorageDataController
.
getLoginUsername
();
log
.
info
(
opUser
+
"清理库位["
+
storagePos
.
getPosName
()+
"]中的库存"
+
barcode
.
getBarcode
());
taskService
.
addTaskToFinished
(
storagePos
,
null
,
opUser
+
"-clear"
);
// barcode = barcodeManager.findByBarcode(barcode.getBarcode());
// barcode.setPosName("");
// barcodeManager.save(barcode);
// storagePos.setBarcode(null);
// storagePos.setUsed(false);
// storagePosManager.save(storagePos);
// dataCache.updateInventory(storagePos,barcode);
}
return
""
;
}
catch
(
Validate
Exception
e
)
{
}
catch
(
Exception
e
)
{
return
e
.
getMessage
();
}
}
...
...
@@ -102,6 +107,8 @@ public class StoragePosUpdateController extends BaseUpdateController {
pos
.
setEnabled
(
enabled
);
try
{
storagePosManager
.
save
(
pos
);
Storage
storage
=
dataCache
.
getStorageById
(
pos
.
getStorageId
());
dataCache
.
reloadStorage
(
storage
);
return
""
;
}
catch
(
Exception
e
){
return
e
.
getMessage
();
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/DataCache.java
查看文件 @
afe0c59
...
...
@@ -380,6 +380,7 @@ public class DataCache{
}
Collection
<
CodeBean
>
codeBeans
=
resolveCodeStr
(
codeStr
);
Barcode
barcode
=
null
;
String
errorMsg
=
""
;
for
(
CodeBean
codeBean
:
codeBeans
)
{
if
(
codeBean
.
isValid
()){
Barcode
barcodeFromRule
=
codeBean
.
getBarcode
();
...
...
@@ -412,11 +413,13 @@ public class DataCache{
}
else
{
throw
new
ValidateException
(
"找到多个有效的条码"
);
}
}
else
{
errorMsg
=
codeBean
.
getError
();
}
}
if
(
barcode
==
null
){
throw
new
ValidateException
(
"未找到有效的条码
"
);
throw
new
ValidateException
(
"未找到有效的条码
:"
+
errorMsg
);
}
return
barcode
;
}
...
...
@@ -428,11 +431,13 @@ public class DataCache{
String
[]
barcodeItemStrs
=
codeStr
.
split
(
"##"
);
for
(
String
barcodeItemStr
:
barcodeItemStrs
){
CodeBean
codeBean
=
resolveSingleCode
(
barcodeItemStr
);
if
(
codeBean
==
null
){
continue
;
if
(!
barcodeItemStr
.
isEmpty
()){
CodeBean
codeBean
=
resolveSingleCode
(
barcodeItemStr
);
if
(
codeBean
==
null
){
continue
;
}
codeBeans
.
add
(
codeBean
);
}
codeBeans
.
add
(
codeBean
);
}
}
return
codeBeans
;
...
...
myproject/src/main/java/com/myproject/webapp/controller/webService/TaskService.java
查看文件 @
afe0c59
...
...
@@ -511,9 +511,9 @@ public class TaskService implements ITaskService {
for
(
Storage
storage
:
storageList
){
StatusBean
status
=
getStatus
(
storage
.
getCid
());
if
(
status
.
timeOut
()){
continue
;
}
//
if(status.timeOut()){
//
continue;
//
}
// if(!status.isBoxCanPutIn()){
// //料仓不可入库
// continue;
...
...
@@ -568,9 +568,21 @@ public class TaskService implements ITaskService {
return
pos
;
}
}
catch
(
Exception
e
){
log
.
info
(
"尝试从["
+
storage
.
getCid
()+
"]中为["
+
barcode
.
getBarcode
()+
"]查找空位失败:"
+
e
.
getMessage
());
log
.
error
(
"尝试从["
+
storage
.
getCid
()+
"]中为["
+
barcode
.
getBarcode
()+
"]查找空位失败:"
+
e
.
getMessage
());
}
}
try
{
String
cids
=
""
;
for
(
Storage
storage
:
availbleStorageList
)
{
cids
=
cids
+
storage
.
getCid
()
+
","
;
}
log
.
info
(
barcode
.
getBarcode
()+
" 未找到可用库位,可用料仓:"
+
cids
);
}
catch
(
Exception
e
){
log
.
error
(
"打印可用料仓出错"
,
e
);
}
return
null
;
}
/**
...
...
@@ -743,7 +755,9 @@ public class TaskService implements ITaskService {
StoragePos
pos
=
storagePosManager
.
get
(
task
.
getPosId
());
pos
.
setEnabled
(
false
);
storagePosManager
.
save
(
pos
);
}
catch
(
ValidateException
e
)
{
Storage
storage
=
dataCache
.
getStorage
(
task
.
getCid
());
dataCache
.
reloadStorage
(
storage
);
}
catch
(
Exception
e
)
{
log
.
error
(
"入库任务取消时,禁用库位出错"
,
e
);
}
}
...
...
@@ -797,8 +811,11 @@ public class TaskService implements ITaskService {
StoragePos
pos
=
storagePosManager
.
get
(
task
.
getPosId
());
pos
.
setEnabled
(
false
);
storagePosManager
.
save
(
pos
);
}
catch
(
ValidateException
e
)
{
Storage
storage
=
dataCache
.
getStorage
(
task
.
getCid
());
dataCache
.
reloadStorage
(
storage
);
}
catch
(
ValidateException
e
)
{
log
.
error
(
"禁用库位出错:"
,
e
);
}
}
...
...
myproject/src/main/webapp/WEB-INF/pages/updateHistory.jsp
查看文件 @
afe0c59
...
...
@@ -12,6 +12,42 @@
<div class="row">
<div class="col-md-12">
<ul class="timeline">
<li class="timeline-blue">
<div class="timeline-time">
<span class="date">2021 </span>
<span class="time">03-09 </span>
</div>
<div class="timeline-icon">
<i class="fa fa-clock-o"></i>
</div>
<div class="timeline-body">
<h2>版本: V2021030918</h2>
<div class="timeline-content">
<ul>
<li>库位禁用时同步更新显示数量</li>
<li>清理库位添加清理记录</li>
</ul>
</div>
</div>
</li>
<li class="timeline-yellow">
<div class="timeline-time">
<span class="date">2021 </span>
<span class="time">03-02 </span>
</div>
<div class="timeline-icon">
<i class="fa fa-clock-o"></i>
</div>
<div class="timeline-body">
<h2>版本: V2021030211</h2>
<div class="timeline-content">
<ul>
<li>优化条码解析失败时的错误消息</li>
<li>最后一个补料需求单任务为0时,对工单进行解绑</li>
</ul>
</div>
</div>
</li>
<li class="timeline-grey">
<div class="timeline-time">
<span class="date">2021</span>
...
...
myproject/src/main/webapp/decorators/metro.jsp
查看文件 @
afe0c59
...
...
@@ -239,7 +239,7 @@
<div
class=
"page-footer-inner"
>
2016
©
<a
href=
"${ctx}/updateHistory.html"
>
SMD BOX
</a>
</div>
<span
class=
"right"
style=
"color: #a3a3a3;"
>
Version: 2021.0
2.04
</span>
<span
class=
"right"
style=
"color: #a3a3a3;"
>
Version: 2021.0
3.02
</span>
<div
class=
"scroll-to-top"
>
<i
class=
"icon-arrow-up"
></i>
</div>
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论