Commit 91682e0a zshaohui

1.生产日期解析修改

2.没有别名的,看板出入库趋势不展示
1 个父辈 c1ccdf48
...@@ -427,8 +427,16 @@ public class BarcodeRule { ...@@ -427,8 +427,16 @@ public class BarcodeRule {
String value = getStrValue(codeArr); String value = getStrValue(codeArr);
if(!Strings.isNullOrEmpty(value)){ if(!Strings.isNullOrEmpty(value)){
try{ try{
if (value.startsWith("00")){
value = value.substring(2);
return DateUtil.toDate(value,formatStr);
} else {
String format = "yyMMdd";
value = value.substring(2,value.length()-2);
return DateUtil.toDate(value,format);
}
//阳光电源有可能是年周,需要转换一下 //阳光电源有可能是年周,需要转换一下
if(value.endsWith("00")){ /*if(value.endsWith("00")){
log.info("转换日期"); log.info("转换日期");
Date time = DateUtil.toDate(value.substring(0,2),"yy"); Date time = DateUtil.toDate(value.substring(0,2),"yy");
Calendar c = Calendar.getInstance(); Calendar c = Calendar.getInstance();
...@@ -437,7 +445,7 @@ public class BarcodeRule { ...@@ -437,7 +445,7 @@ public class BarcodeRule {
c.set(Calendar.WEEK_OF_YEAR,weekOfYear); c.set(Calendar.WEEK_OF_YEAR,weekOfYear);
return c.getTime(); return c.getTime();
} }
return DateUtil.toDate(value,formatStr); return DateUtil.toDate(value,formatStr);*/
}catch (Exception ex){ }catch (Exception ex){
log.warn(value + " is not a validate date"); log.warn(value + " is not a validate date");
} }
......
...@@ -12,6 +12,7 @@ import lombok.extern.slf4j.Slf4j; ...@@ -12,6 +12,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -61,6 +62,7 @@ public class HikTaskCountManagerImpl implements IHikTaskCountManager { ...@@ -61,6 +62,7 @@ public class HikTaskCountManagerImpl implements IHikTaskCountManager {
@Override @Override
public List<TaskCount> findTaskCountByDate(Date date) { public List<TaskCount> findTaskCountByDate(Date date) {
List<TaskCount> resultList = new ArrayList<>();
List<TaskCount> taskCountList = hikTaskCountDao.findTaskCountByDate(date); List<TaskCount> taskCountList = hikTaskCountDao.findTaskCountByDate(date);
if (taskCountList != null && !taskCountList.isEmpty()) { if (taskCountList != null && !taskCountList.isEmpty()) {
for (TaskCount taskCount : taskCountList) { for (TaskCount taskCount : taskCountList) {
...@@ -68,9 +70,10 @@ public class HikTaskCountManagerImpl implements IHikTaskCountManager { ...@@ -68,9 +70,10 @@ public class HikTaskCountManagerImpl implements IHikTaskCountManager {
User user = userManager.findByUserName(name); User user = userManager.findByUserName(name);
if (user != null && StringUtils.isNotBlank(user.getOtherName())) { if (user != null && StringUtils.isNotBlank(user.getOtherName())) {
taskCount.setName(user.getOtherName()); taskCount.setName(user.getOtherName());
resultList.add(taskCount);
} }
} }
} }
return taskCountList; return resultList;
} }
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!