一些问题修改
This commit is contained in:
parent
b181c48583
commit
380bd86a8e
@ -64,6 +64,8 @@ public class UserConstants
|
||||
/** InnerLink组件标识 */
|
||||
public final static String INNER_LINK = "InnerLink";
|
||||
|
||||
public final static String WEBSOCKET_HEARTBEAT = "-heartbeat-";
|
||||
|
||||
/** 校验返回结果码 */
|
||||
public final static String UNIQUE = "0";
|
||||
public final static String NOT_UNIQUE = "1";
|
||||
|
@ -12,6 +12,7 @@ import javax.websocket.server.ServerEndpoint;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.TypeReference;
|
||||
import com.ktg.common.constant.UserConstants;
|
||||
import com.ktg.common.core.domain.entity.SysUser;
|
||||
import com.ktg.common.core.domain.model.LoginUser;
|
||||
import com.ktg.common.utils.StringUtils;
|
||||
@ -124,6 +125,7 @@ public class WebSocketServer
|
||||
@OnMessage
|
||||
public void onMessage(String message, Session session)
|
||||
{
|
||||
if(!UserConstants.WEBSOCKET_HEARTBEAT.equals(message)){
|
||||
try{
|
||||
SysMessage msg = JSON.parseObject(message, new TypeReference<SysMessage>(){});
|
||||
if(StringUtils.isNotNull(msg.getRecipientName())){
|
||||
@ -134,5 +136,7 @@ public class WebSocketServer
|
||||
LOGGER.error("\n 错误的websocket信息格式 - {}", message);
|
||||
}
|
||||
}
|
||||
LOGGER.debug("\n 收到客户端发送的消息 - {}", message);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -79,6 +79,10 @@ public class MdProductBomController extends BaseController
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody MdProductBom mdProductBom)
|
||||
{
|
||||
if(mdProductBom.getBomItemId() == mdProductBom.getItemId()){
|
||||
return AjaxResult.error("产品不能作为自身的BOM物料!");
|
||||
}
|
||||
|
||||
return toAjax(mdProductBomService.insertMdProductBom(mdProductBom));
|
||||
}
|
||||
|
||||
|
@ -120,7 +120,7 @@ public class ProTaskController extends BaseController
|
||||
}
|
||||
BigDecimal produced = workorder.getQuantityProduced();
|
||||
BigDecimal quantitiy = workorder.getQuantity();
|
||||
wdata.setProgress( produced.divide(quantitiy).floatValue());
|
||||
wdata.setProgress( produced.divide(quantitiy,BigDecimal.ROUND_HALF_UP).floatValue());
|
||||
wdata.setDuration(0L);
|
||||
wdata.setType(UserConstants.GANTT_TASK_TYPE_PROJECT);
|
||||
ganttData.add(wdata);
|
||||
|
Loading…
Reference in New Issue
Block a user