|
|
|
@ -140,6 +140,20 @@ public class InvRemindSetServiceImpl implements InvRemindSetService {
|
|
|
|
|
public BaseResponse getInfoByInvId(Integer invId) {
|
|
|
|
|
InvRemindSetResponse response = invRemindSetDao.selectInfoByInvId(invId);
|
|
|
|
|
if (null != response) {
|
|
|
|
|
//查询是否已有库存预警设置信息,若已存在预警设置,则回显旧数据
|
|
|
|
|
InvRemindSetEntity invRemindSetEntity = invRemindSetDao.selectOne(new QueryWrapper<InvRemindSetEntity>()
|
|
|
|
|
.eq("deptCode", response.getDeptCode())
|
|
|
|
|
.eq("invCode", response.getInvCode())
|
|
|
|
|
.eq("relId", response.getRelId())
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
if (null != invRemindSetEntity) {
|
|
|
|
|
response.setLackStock(invRemindSetEntity.getLackStock());
|
|
|
|
|
response.setLowStock(invRemindSetEntity.getLowStock());
|
|
|
|
|
response.setOverStock(invRemindSetEntity.getOverStock());
|
|
|
|
|
response.setExpireDate(invRemindSetEntity.getExpireDate());
|
|
|
|
|
response.setRecentDate(invRemindSetEntity.getRecentDate());
|
|
|
|
|
}
|
|
|
|
|
if (response.getIsDateBy() == 1 && null != response.getRecentDateTime()) {
|
|
|
|
|
//将近效期预警值由小时换算成天
|
|
|
|
|
response.setRecentDateTime(response.getRecentDateTime() / 24);
|
|
|
|
|