Compare commits
5 Commits
039b84258b
...
a425fd5ea4
Author | SHA1 | Date | |
---|---|---|---|
a425fd5ea4 | |||
9736e66955 | |||
60357038df | |||
55b1024f4d | |||
c10fd69aa3 |
@ -16,6 +16,8 @@ import com.ktg.mes.md.service.IAP0AEService;
|
||||
import com.ktg.mes.md.service.IMdItemService;
|
||||
import com.ktg.mes.md.service.IWmsBusinessTypeService;
|
||||
import com.ktg.mes.md.service.IWmsOutPlanService;
|
||||
import com.ktg.system.domain.SysMessage;
|
||||
import com.ktg.system.service.ISysMessageService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
@ -40,6 +42,7 @@ public class WmsOutPlanController extends BaseController {
|
||||
private final IWmsOutPlanService wmsOutPlanService;
|
||||
private final IWmsBusinessTypeService wmsBusinessTypeService;
|
||||
private final IMdItemService mdItemService;
|
||||
private final ISysMessageService sysMessageService;
|
||||
|
||||
/**
|
||||
* 查询出库计划管理列表
|
||||
@ -95,6 +98,9 @@ public class WmsOutPlanController extends BaseController {
|
||||
try {
|
||||
int i = wmsOutPlanService.insertWmsOutPlanAndRun(wmsOutPlan);
|
||||
if (i > 0) {
|
||||
// 创建消息通知
|
||||
sysMessageService.insertSysPromptMessage("出库任务","整刀出库: " + wmsOutboundOrderDto.getMaterialCode());
|
||||
|
||||
return AjaxResult.success("出库任务创建成功");
|
||||
} else {
|
||||
return AjaxResult.error("出库任务创建失败,原因:数据库插入失败");
|
||||
|
@ -67,8 +67,11 @@ public class WmsInPlanDetailEntityServiceImpl implements IWmsInPlanDetailEntityS
|
||||
wmsInPlanDetailEntityList.forEach(entity -> {
|
||||
// 获取入库计划信息
|
||||
WmsInPlan wmsInPlan = wmsInPlanMapper.selectWmsInPlanByPlanId(entity.getPlanId());
|
||||
// 获取入库计划
|
||||
WmsBusinessType wmsBusinessType = wmsBusinessTypeMapper.selectWmsBusinessTypeByTypeId(wmsInPlan.getPlanTypeId().toString());
|
||||
if (Objects.isNull(wmsInPlan)) {
|
||||
throw new RuntimeException("入库计划查询失败, planId: " + entity.getPlanId());
|
||||
}
|
||||
// 获取入库计划类型
|
||||
WmsBusinessType wmsBusinessType = wmsBusinessTypeMapper.selectWmsBusinessTypeByCode(wmsInPlan.getPlanTypeCode());
|
||||
|
||||
for (WmsInPlanDetail detail : wmsInPlan.getWmsInPlanDetailList()) {
|
||||
// 匹配入库明细
|
||||
|
@ -12,6 +12,7 @@ import com.ktg.mes.md.mapper.*;
|
||||
import com.ktg.mes.wm.domain.*;
|
||||
import com.ktg.mes.wm.mapper.*;
|
||||
import com.ktg.mes.wm.service.IWmsInPlanService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ktg.mes.wm.service.IWmsZdTaskService;
|
||||
@ -28,49 +29,21 @@ import static org.apache.commons.lang3.SystemUtils.getUserName;
|
||||
* @date 2024-11-01
|
||||
*/
|
||||
@Service
|
||||
public class WmsZdTaskServiceImpl implements IWmsZdTaskService
|
||||
{
|
||||
@Autowired
|
||||
private BaseKnifeMapper baseKnifeMapper;
|
||||
|
||||
@Autowired
|
||||
private BomRouteMapper bomRouteMapper;
|
||||
|
||||
@Autowired
|
||||
private MdItemMapper mdItemMapper;
|
||||
|
||||
@Autowired
|
||||
private BaseTechnologyBomMapper baseTechnologyBomMapper;
|
||||
|
||||
@Autowired
|
||||
private WmsZdTaskMapper wmsZdTaskMapper;
|
||||
|
||||
@Autowired
|
||||
private WmStorageAreaMapper wmStorageAreaMapper;
|
||||
|
||||
@Autowired
|
||||
private IWmsInPlanService wmsInPlanService;
|
||||
|
||||
@Autowired
|
||||
private WmsInTaskMapper wmsInTaskMapper;
|
||||
|
||||
@Autowired
|
||||
private WmsOutPlanMapper wmsOutPlanMapper;
|
||||
|
||||
@Autowired
|
||||
private WmsOutPlanDetailEntityMapper wmsOutPlanDetailEntityMapper;
|
||||
|
||||
@Autowired
|
||||
private WmsOutTaskMapper wmsOutTaskMapper;
|
||||
|
||||
@Autowired
|
||||
private ProductionArrangementsMapper productionArrangementsMapper;
|
||||
|
||||
@Autowired
|
||||
private BaseKnifeLockedMapper baseKnifeLockedMapper;
|
||||
|
||||
@Autowired
|
||||
private MyConfig myConfig;
|
||||
@RequiredArgsConstructor
|
||||
public class WmsZdTaskServiceImpl implements IWmsZdTaskService {
|
||||
private final BaseKnifeMapper baseKnifeMapper;
|
||||
private final BomRouteMapper bomRouteMapper;
|
||||
private final MdItemMapper mdItemMapper;
|
||||
private final BaseTechnologyBomMapper baseTechnologyBomMapper;
|
||||
private final WmsZdTaskMapper wmsZdTaskMapper;
|
||||
private final WmStorageAreaMapper wmStorageAreaMapper;
|
||||
private final IWmsInPlanService wmsInPlanService;
|
||||
private final WmsInTaskMapper wmsInTaskMapper;
|
||||
private final WmsOutPlanMapper wmsOutPlanMapper;
|
||||
private final WmsOutPlanDetailEntityMapper wmsOutPlanDetailEntityMapper;
|
||||
private final WmsOutTaskMapper wmsOutTaskMapper;
|
||||
private final ProductionArrangementsMapper productionArrangementsMapper;
|
||||
private final BaseKnifeLockedMapper baseKnifeLockedMapper;
|
||||
|
||||
/**
|
||||
* 查询组装任务
|
||||
@ -79,8 +52,7 @@ public class WmsZdTaskServiceImpl implements IWmsZdTaskService
|
||||
* @return 组装任务
|
||||
*/
|
||||
@Override
|
||||
public WmsZdTask selectWmsZdTaskByWmsZdTaskId(String wmsZdTaskId)
|
||||
{
|
||||
public WmsZdTask selectWmsZdTaskByWmsZdTaskId(String wmsZdTaskId) {
|
||||
return wmsZdTaskMapper.selectWmsZdTaskByWmsZdTaskId(wmsZdTaskId);
|
||||
}
|
||||
|
||||
@ -91,8 +63,7 @@ public class WmsZdTaskServiceImpl implements IWmsZdTaskService
|
||||
* @return 组装任务
|
||||
*/
|
||||
@Override
|
||||
public List<WmsZdTask> selectWmsZdTaskList(WmsZdTask wmsZdTask)
|
||||
{
|
||||
public List<WmsZdTask> selectWmsZdTaskList(WmsZdTask wmsZdTask) {
|
||||
return wmsZdTaskMapper.selectWmsZdTaskList(wmsZdTask);
|
||||
}
|
||||
|
||||
@ -103,8 +74,7 @@ public class WmsZdTaskServiceImpl implements IWmsZdTaskService
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWmsZdTask(WmsZdTask wmsZdTask)
|
||||
{
|
||||
public int insertWmsZdTask(WmsZdTask wmsZdTask) {
|
||||
wmsZdTask.setCreateTime(DateUtils.getNowDate());
|
||||
wmsZdTask.setCreateBy(getUserName());
|
||||
return wmsZdTaskMapper.insertWmsZdTask(wmsZdTask);
|
||||
@ -117,8 +87,7 @@ public class WmsZdTaskServiceImpl implements IWmsZdTaskService
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWmsZdTask(WmsZdTask wmsZdTask)
|
||||
{
|
||||
public int updateWmsZdTask(WmsZdTask wmsZdTask) {
|
||||
wmsZdTask.setUpdateTime(DateUtils.getNowDate());
|
||||
wmsZdTask.setUpdateBy(getUserName());
|
||||
return wmsZdTaskMapper.updateWmsZdTask(wmsZdTask);
|
||||
@ -131,8 +100,7 @@ public class WmsZdTaskServiceImpl implements IWmsZdTaskService
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWmsZdTaskByWmsZdTaskIds(String[] wmsZdTaskIds)
|
||||
{
|
||||
public int deleteWmsZdTaskByWmsZdTaskIds(String[] wmsZdTaskIds) {
|
||||
return wmsZdTaskMapper.deleteWmsZdTaskByWmsZdTaskIds(wmsZdTaskIds);
|
||||
}
|
||||
|
||||
@ -143,8 +111,7 @@ public class WmsZdTaskServiceImpl implements IWmsZdTaskService
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWmsZdTaskByWmsZdTaskId(String wmsZdTaskId)
|
||||
{
|
||||
public int deleteWmsZdTaskByWmsZdTaskId(String wmsZdTaskId) {
|
||||
return wmsZdTaskMapper.deleteWmsZdTaskByWmsZdTaskId(wmsZdTaskId);
|
||||
}
|
||||
|
||||
@ -383,7 +350,7 @@ public class WmsZdTaskServiceImpl implements IWmsZdTaskService
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
public String getProductRfid(Long itemId, int i){
|
||||
public String getProductRfid(Long itemId, int i) {
|
||||
MdItem mdItem = mdItemMapper.selectMdItemById(itemId);
|
||||
|
||||
// 获取最大的RFID 然后加1 : RFID为物料的编码加序号
|
||||
|
@ -2,6 +2,8 @@ package com.ktg.system.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ktg.common.annotation.Excel;
|
||||
@ -13,6 +15,8 @@ import com.ktg.common.core.domain.BaseEntity;
|
||||
* @author yinjinlu
|
||||
* @date 2023-03-06
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
public class SysMessage extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -89,178 +93,6 @@ public class SysMessage extends BaseEntity
|
||||
/** 预留字段4 */
|
||||
private Long attr4;
|
||||
|
||||
public void setMessageId(Long messageId)
|
||||
{
|
||||
this.messageId = messageId;
|
||||
}
|
||||
|
||||
public Long getMessageId()
|
||||
{
|
||||
return messageId;
|
||||
}
|
||||
public void setMessageType(String messageType)
|
||||
{
|
||||
this.messageType = messageType;
|
||||
}
|
||||
|
||||
public String getMessageType()
|
||||
{
|
||||
return messageType;
|
||||
}
|
||||
public void setMessageLevel(String messageLevel)
|
||||
{
|
||||
this.messageLevel = messageLevel;
|
||||
}
|
||||
|
||||
public String getMessageLevel()
|
||||
{
|
||||
return messageLevel;
|
||||
}
|
||||
public void setMessageTitle(String messageTitle)
|
||||
{
|
||||
this.messageTitle = messageTitle;
|
||||
}
|
||||
|
||||
public String getMessageTitle()
|
||||
{
|
||||
return messageTitle;
|
||||
}
|
||||
public void setMessageContent(String messageContent)
|
||||
{
|
||||
this.messageContent = messageContent;
|
||||
}
|
||||
|
||||
public String getMessageContent()
|
||||
{
|
||||
return messageContent;
|
||||
}
|
||||
public void setSenderId(Long senderId)
|
||||
{
|
||||
this.senderId = senderId;
|
||||
}
|
||||
|
||||
public Long getSenderId()
|
||||
{
|
||||
return senderId;
|
||||
}
|
||||
public void setSenderName(String senderName)
|
||||
{
|
||||
this.senderName = senderName;
|
||||
}
|
||||
|
||||
public String getSenderName()
|
||||
{
|
||||
return senderName;
|
||||
}
|
||||
public void setSenderNick(String senderNick)
|
||||
{
|
||||
this.senderNick = senderNick;
|
||||
}
|
||||
|
||||
public String getSenderNick()
|
||||
{
|
||||
return senderNick;
|
||||
}
|
||||
public void setRecipientId(Long recipientId)
|
||||
{
|
||||
this.recipientId = recipientId;
|
||||
}
|
||||
|
||||
public Long getRecipientId()
|
||||
{
|
||||
return recipientId;
|
||||
}
|
||||
public void setRecipientName(String recipientName)
|
||||
{
|
||||
this.recipientName = recipientName;
|
||||
}
|
||||
|
||||
public String getRecipientName()
|
||||
{
|
||||
return recipientName;
|
||||
}
|
||||
public void setRecipientNick(String recipientNick)
|
||||
{
|
||||
this.recipientNick = recipientNick;
|
||||
}
|
||||
|
||||
public String getRecipientNick()
|
||||
{
|
||||
return recipientNick;
|
||||
}
|
||||
public void setProcessTime(Date processTime)
|
||||
{
|
||||
this.processTime = processTime;
|
||||
}
|
||||
|
||||
public Date getProcessTime()
|
||||
{
|
||||
return processTime;
|
||||
}
|
||||
public void setCallBack(String callBack)
|
||||
{
|
||||
this.callBack = callBack;
|
||||
}
|
||||
|
||||
public String getCallBack()
|
||||
{
|
||||
return callBack;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setDeletedFlag(String deletedFlag)
|
||||
{
|
||||
this.deletedFlag = deletedFlag;
|
||||
}
|
||||
|
||||
public String getDeletedFlag()
|
||||
{
|
||||
return deletedFlag;
|
||||
}
|
||||
public void setAttr1(String attr1)
|
||||
{
|
||||
this.attr1 = attr1;
|
||||
}
|
||||
|
||||
public String getAttr1()
|
||||
{
|
||||
return attr1;
|
||||
}
|
||||
public void setAttr2(String attr2)
|
||||
{
|
||||
this.attr2 = attr2;
|
||||
}
|
||||
|
||||
public String getAttr2()
|
||||
{
|
||||
return attr2;
|
||||
}
|
||||
public void setAttr3(Long attr3)
|
||||
{
|
||||
this.attr3 = attr3;
|
||||
}
|
||||
|
||||
public Long getAttr3()
|
||||
{
|
||||
return attr3;
|
||||
}
|
||||
public void setAttr4(Long attr4)
|
||||
{
|
||||
this.attr4 = attr4;
|
||||
}
|
||||
|
||||
public Long getAttr4()
|
||||
{
|
||||
return attr4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
|
@ -35,6 +35,15 @@ public interface ISysMessageService
|
||||
*/
|
||||
public int insertSysMessage(SysMessage sysMessage);
|
||||
|
||||
/**
|
||||
* 新增消息提示
|
||||
*
|
||||
* @param title 标题
|
||||
* @param content 内容
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysPromptMessage(String title,String content);
|
||||
|
||||
/**
|
||||
* 修改消息
|
||||
*
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.ktg.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ktg.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -15,8 +16,7 @@ import com.ktg.system.service.ISysMessageService;
|
||||
* @date 2023-03-06
|
||||
*/
|
||||
@Service
|
||||
public class SysMessageServiceImpl implements ISysMessageService
|
||||
{
|
||||
public class SysMessageServiceImpl implements ISysMessageService {
|
||||
@Autowired
|
||||
private SysMessageMapper sysMessageMapper;
|
||||
|
||||
@ -27,8 +27,7 @@ public class SysMessageServiceImpl implements ISysMessageService
|
||||
* @return 消息
|
||||
*/
|
||||
@Override
|
||||
public SysMessage selectSysMessageByMessageId(Long messageId)
|
||||
{
|
||||
public SysMessage selectSysMessageByMessageId(Long messageId) {
|
||||
return sysMessageMapper.selectSysMessageByMessageId(messageId);
|
||||
}
|
||||
|
||||
@ -39,8 +38,7 @@ public class SysMessageServiceImpl implements ISysMessageService
|
||||
* @return 消息
|
||||
*/
|
||||
@Override
|
||||
public List<SysMessage> selectSysMessageList(SysMessage sysMessage)
|
||||
{
|
||||
public List<SysMessage> selectSysMessageList(SysMessage sysMessage) {
|
||||
return sysMessageMapper.selectSysMessageList(sysMessage);
|
||||
}
|
||||
|
||||
@ -51,12 +49,26 @@ public class SysMessageServiceImpl implements ISysMessageService
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSysMessage(SysMessage sysMessage)
|
||||
{
|
||||
public int insertSysMessage(SysMessage sysMessage) {
|
||||
sysMessage.setCreateTime(DateUtils.getNowDate());
|
||||
return sysMessageMapper.insertSysMessage(sysMessage);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSysPromptMessage(String title, String content) {
|
||||
// 创建消息通知
|
||||
SysMessage sysMessage = new SysMessage();
|
||||
sysMessage.setMessageType("PROMPT");
|
||||
sysMessage.setMessageLevel("A");
|
||||
sysMessage.setMessageTitle(title);
|
||||
sysMessage.setMessageContent(content);
|
||||
// TODO 当前仅向admin用户推送消息,后续会指定用户
|
||||
sysMessage.setRecipientId(1L);
|
||||
sysMessage.setRecipientName("admin");
|
||||
sysMessage.setRecipientNick("若依");
|
||||
return sysMessageMapper.insertSysMessage(sysMessage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改消息
|
||||
*
|
||||
@ -64,8 +76,7 @@ public class SysMessageServiceImpl implements ISysMessageService
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSysMessage(SysMessage sysMessage)
|
||||
{
|
||||
public int updateSysMessage(SysMessage sysMessage) {
|
||||
sysMessage.setUpdateTime(DateUtils.getNowDate());
|
||||
return sysMessageMapper.updateSysMessage(sysMessage);
|
||||
}
|
||||
@ -77,8 +88,7 @@ public class SysMessageServiceImpl implements ISysMessageService
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysMessageByMessageIds(Long[] messageIds)
|
||||
{
|
||||
public int deleteSysMessageByMessageIds(Long[] messageIds) {
|
||||
return sysMessageMapper.deleteSysMessageByMessageIds(messageIds);
|
||||
}
|
||||
|
||||
@ -89,8 +99,7 @@ public class SysMessageServiceImpl implements ISysMessageService
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysMessageByMessageId(Long messageId)
|
||||
{
|
||||
public int deleteSysMessageByMessageId(Long messageId) {
|
||||
return sysMessageMapper.deleteSysMessageByMessageId(messageId);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user