Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit cd7de45d
由
LN
编写于
2023-05-05 10:39:47 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1.锡膏料仓概览页面显示回温区和冷藏区库位容量。2.锡膏管理设置页面增加温度范围设置。
1 个父辈
78f0a8b9
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
57 行增加
和
29 行删除
src/main/java/com/neotel/smfcore/core/device/util/DataCache.java
src/main/java/com/neotel/smfcore/core/kanban/rest/BoxKanbanController.java
src/main/java/com/neotel/smfcore/core/solder/rest/SpSolderController.java
src/main/java/com/neotel/smfcore/core/solder/rest/bean/dto/SpSettingsDto.java
src/main/java/com/neotel/smfcore/core/device/util/DataCache.java
查看文件 @
cd7de45
...
...
@@ -105,6 +105,9 @@ public class DataCache {
public
static
String
warmPosUseCount
=
"warmPosUseCount"
;
public
static
String
coldingPosUseCount
=
"coldingPosUseCount"
;
public
static
String
warmPosCount
=
"warmPosCount"
;
public
static
String
coldingPosCount
=
"coldingPosCount"
;
/**
* 禁用库位名称列表
...
...
@@ -862,24 +865,38 @@ public class DataCache {
private
void
LoadStorageUsePosCount
(
String
cid
)
{
Storage
storage
=
getStorage
(
cid
);
int
waramCount
=
0
;
int
coldingCount
=
0
;
int
warmCount
=
0
;
int
coldingCount
=
0
;
int
warmUseCount
=
0
;
int
coldingUseCount
=
0
;
if
(
ObjectUtil
.
isNotEmpty
(
storage
))
{
List
<
StoragePos
>
allPos
=
storagePosManager
.
findUsedPosNameByStorageId
(
storage
.
getId
());
//
List<StoragePos> allPos = storagePosManager.findUsedPosNameByStorageId(storage.getId());
List
<
StoragePos
>
allPos
=
storagePosManager
.
findByStorage
(
storage
.
getId
());
for
(
StoragePos
pos
:
allPos
)
{
if
(
pos
.
isWarmPos
())
{
waramCount
++;
warmCount
++;
if
(
pos
.
isUsed
()){
warmUseCount
++;
}
}
else
{
coldingCount
++;
if
(
pos
.
isUsed
()){
coldingUseCount
++;
}
}
}
}
Map
<
String
,
Integer
>
map
=
new
HashMap
<>();
map
.
put
(
warmPosUseCount
,
waramCount
);
map
.
put
(
coldingPosUseCount
,
coldingCount
);
map
.
put
(
warmPosUseCount
,
warmUseCount
);
map
.
put
(
coldingPosUseCount
,
coldingUseCount
);
map
.
put
(
warmPosCount
,
warmCount
);
map
.
put
(
coldingPosCount
,
coldingCount
);
spUsedPosCountMap
.
put
(
cid
,
map
);
}
...
...
src/main/java/com/neotel/smfcore/core/kanban/rest/BoxKanbanController.java
查看文件 @
cd7de45
...
...
@@ -487,6 +487,11 @@ public class BoxKanbanController {
Integer
coldingUseCount
=
dataCache
.
getSpUsePosCount
(
storage
.
getCid
(),
DataCache
.
coldingPosUseCount
);
boxDto
.
getData
().
put
(
DataCache
.
warmPosUseCount
,
warmUseCount
.
toString
());
boxDto
.
getData
().
put
(
DataCache
.
coldingPosUseCount
,
coldingUseCount
.
toString
());
Integer
warmCount
=
dataCache
.
getSpUsePosCount
(
storage
.
getCid
(),
DataCache
.
warmPosCount
);
Integer
coldingCount
=
dataCache
.
getSpUsePosCount
(
storage
.
getCid
(),
DataCache
.
coldingPosCount
);
boxDto
.
getData
().
put
(
DataCache
.
warmPosCount
,
warmCount
.
toString
());
boxDto
.
getData
().
put
(
DataCache
.
coldingPosCount
,
coldingCount
.
toString
());
}
return
boxDto
;
}
...
...
src/main/java/com/neotel/smfcore/core/solder/rest/SpSolderController.java
查看文件 @
cd7de45
package
com
.
neotel
.
smfcore
.
core
.
solder
.
rest
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.google.common.base.Strings
;
import
com.neotel.smfcore.common.bean.PageData
;
import
com.neotel.smfcore.common.bean.ResultBean
;
import
com.neotel.smfcore.common.exception.ValidateException
;
import
com.neotel.smfcore.common.utils.Constants
;
import
com.neotel.smfcore.common.utils.DateUtil
;
import
com.neotel.smfcore.common.utils.QueryHelp
;
import
com.neotel.smfcore.core.barcode.enums.COMPONENT_TYPE
;
import
com.neotel.smfcore.core.barcode.enums.SOLDER_STATUS
;
import
com.neotel.smfcore.core.barcode.rest.bean.dto.ComponentDto
;
import
com.neotel.smfcore.core.barcode.rest.bean.mapstruct.ComponentMapper
;
import
com.neotel.smfcore.core.barcode.rest.bean.query.ComponentQueryCriteria
;
import
com.neotel.smfcore.core.barcode.service.manager.IBarcodeManager
;
import
com.neotel.smfcore.core.barcode.service.manager.IComponentManager
;
import
com.neotel.smfcore.core.barcode.service.po.Barcode
;
import
com.neotel.smfcore.core.barcode.service.po.Component
;
import
com.neotel.smfcore.core.device.util.DataCache
;
import
com.neotel.smfcore.core.msd.bean.MSDSettiings
;
import
com.neotel.smfcore.core.solder.bean.SpSettings
;
import
com.neotel.smfcore.core.solder.rest.bean.dto.SpSettingsDto
;
import
com.neotel.smfcore.core.solder.rest.bean.mapstruct.SpSettingsMapper
;
import
com.neotel.smfcore.core.storage.rest.dto.CheckOutDto
;
import
com.neotel.smfcore.core.storage.rest.dto.InventoryItemDto
;
import
com.neotel.smfcore.core.storage.rest.dto.StoragePosDto
;
import
com.neotel.smfcore.core.storage.rest.mapstruct.StoragePosMapper
;
import
com.neotel.smfcore.core.storage.rest.query.StoragePosFindCriteria
;
import
com.neotel.smfcore.core.storage.service.manager.IStoragePosManager
;
import
com.neotel.smfcore.core.storage.service.po.Storage
;
import
com.neotel.smfcore.core.storage.service.po.StoragePos
;
import
com.neotel.smfcore.core.system.util.TaskService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -36,16 +24,11 @@ import lombok.RequiredArgsConstructor;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.domain.Sort
;
import
org.springframework.data.mongodb.core.query.Criteria
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.*
;
@Slf4j
...
...
@@ -102,7 +85,7 @@ public class SpSolderController {
return
new
ResponseEntity
<>(
HttpStatus
.
OK
);
}
@ApiOperation
(
"获取
冷藏
区温度设置"
)
@ApiOperation
(
"获取
錫膏設置:冷藏区和回温
区温度设置"
)
@GetMapping
(
"/settings"
)
public
SpSettingsDto
getSettings
()
{
SpSettings
spSettings
=
dataCache
.
getCache
(
Constants
.
CACHE_spSettings
);
...
...
@@ -111,21 +94,38 @@ public class SpSolderController {
dataCache
.
updateCache
(
Constants
.
CACHE_spSettings
,
spSettings
);
log
.
info
(
"默认MSD:CACHE_spTempSettings="
+
spSettings
.
toString
());
}
MSDSettiings
msdSettiings
=
dataCache
.
getCache
(
Constants
.
CACHE_msdSetting
);
if
(
msdSettiings
==
null
){
msdSettiings
=
new
MSDSettiings
()
;
}
SpSettingsDto
dto
=
mapper
.
toDto
(
spSettings
);
dto
.
setMinTemperature
(
msdSettiings
.
getMinTemperature
());
dto
.
setMaxTemperature
(
msdSettiings
.
getMaxTemperature
());
return
dto
;
}
@ApiOperation
(
"修改
冷藏
区温度设置"
)
@ApiOperation
(
"修改
锡膏设置:冷藏区和回温
区温度设置"
)
@PutMapping
(
"/updateSettings"
)
public
ResultBean
updateSettings
(
@Validated
@RequestBody
SpSettingsDto
dto
)
{
SpSettings
settings
=
mapper
.
toEntity
(
dto
);
if
(
settings
.
getMaxColdAreaTemp
()<=
settings
.
getMinColdAreaTemp
())
{
if
(
dto
.
getMaxColdAreaTemp
()<=
dto
.
getMinColdAreaTemp
())
{
throw
new
ValidateException
(
"smfcore.humidityValueError"
,
"温度范围数据错误"
);
}
if
(
dto
.
getMaxTemperature
()
<=
dto
.
getMinTemperature
())
{
throw
new
ValidateException
(
"smfcore.temperatureValueError"
,
"湿度范围数据错误"
);
}
SpSettings
settings
=
mapper
.
toEntity
(
dto
);
dataCache
.
updateCache
(
Constants
.
CACHE_spSettings
,
settings
);
log
.
info
(
"更改MSD:CACHE_spTempSettings="
+
settings
.
toString
());
MSDSettiings
msdSettiings
=
dataCache
.
getCache
(
Constants
.
CACHE_msdSetting
);
if
(
msdSettiings
==
null
){
msdSettiings
=
new
MSDSettiings
()
;
}
msdSettiings
.
setMinTemperature
(
dto
.
getMinTemperature
());
msdSettiings
.
setMaxTemperature
(
dto
.
getMaxTemperature
());
dataCache
.
updateCache
(
Constants
.
CACHE_msdSetting
,
msdSettiings
);
log
.
info
(
"更改MSD:CACHE_msdSetting="
+
msdSettiings
.
toString
());
return
ResultBean
.
newOkResult
(
"保存成功"
);
}
}
src/main/java/com/neotel/smfcore/core/solder/rest/bean/dto/SpSettingsDto.java
查看文件 @
cd7de45
...
...
@@ -18,4 +18,10 @@ public class SpSettingsDto {
@ApiModelProperty
(
"搅拌速度倍数:搅拌自转是公转的多少倍"
)
private
float
spMixSpeedFactor
=
1.5
F
;
@ApiModelProperty
(
"最低温度"
)
private
float
minTemperature
=
22.0
F
;
@ApiModelProperty
(
"最高温度"
)
private
float
maxTemperature
=
38.0
F
;
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论