|
|
|
@ -170,6 +170,26 @@ public class MesEarlyWarningServiceImpl implements IMesEarlyWarningService {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void savePicture(KanBanPictureModel model) {
|
|
|
|
|
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(model.getOrganizeCode());
|
|
|
|
|
DdlPreparedPack.getOrderBy("createDatetime",CommonEnumUtil.ASC_OR_DESC.DESC.getValue(), ddlPackBean);
|
|
|
|
|
List<MesEarlyWarningScreen> screenList = screenRao.findByHqlWhere(ddlPackBean);
|
|
|
|
|
if (!screenList.isEmpty()) {
|
|
|
|
|
//5分钟内只记录一次,防止前端不断刷数据
|
|
|
|
|
MesEarlyWarningScreen mesEarlyWarningScreen = screenList.get(0);
|
|
|
|
|
try {
|
|
|
|
|
Date date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(mesEarlyWarningScreen.getCreateDatetime());
|
|
|
|
|
Calendar dateC = Calendar.getInstance();
|
|
|
|
|
dateC.setTime(date);
|
|
|
|
|
dateC.add(Calendar.MINUTE,5);
|
|
|
|
|
Calendar now = Calendar.getInstance();
|
|
|
|
|
now.setTime(new Date());
|
|
|
|
|
if (dateC.before(now)){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
} catch (ParseException e) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
MesEarlyWarningScreen mesEarlyWarningScreen = new MesEarlyWarningScreen();
|
|
|
|
|
mesEarlyWarningScreen.setPicture(model.getPicture());
|
|
|
|
|
if (model.getId() != null){
|
|
|
|
@ -177,7 +197,7 @@ public class MesEarlyWarningServiceImpl implements IMesEarlyWarningService {
|
|
|
|
|
}
|
|
|
|
|
mesEarlyWarningScreen.setOrganizeCode(model.getOrganizeCode());
|
|
|
|
|
ConvertBean.saveOrUpdate(mesEarlyWarningScreen, AuthUtil.getSessionUser().getUserName());
|
|
|
|
|
screenRao.insert(mesEarlyWarningScreen);
|
|
|
|
|
screenRao.insert(mesEarlyWarningScreen);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -422,9 +442,9 @@ public class MesEarlyWarningServiceImpl implements IMesEarlyWarningService {
|
|
|
|
|
}
|
|
|
|
|
mesKanBanShowModel.setRealProductionBuffer(realProductionBuffer);
|
|
|
|
|
Long productionYellowBuffer = kanBan.getProductionYellowBuffer();
|
|
|
|
|
if (realProductionBuffer < productionRedBuffer){
|
|
|
|
|
if (realProductionBuffer < productionYellowBuffer){
|
|
|
|
|
mesKanBanShowModel.setRealProductionBufferColor("RED");
|
|
|
|
|
}else if (realProductionBuffer < productionYellowBuffer){
|
|
|
|
|
}else if (realProductionBuffer < productionRedBuffer){
|
|
|
|
|
mesKanBanShowModel.setRealProductionBufferColor("YELLOW");
|
|
|
|
|
}
|
|
|
|
|
//声音信息
|
|
|
|
|