生产计划自动化-功能优化 5.16

master
zhc077 2 years ago
parent c62e4e7c16
commit 558ecd11e9
  1. 22
      ant-design-vue-jeecg/src/views/message/ZySpeechMessageList.vue
  2. 17
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/service/impl/ZyOrdersServiceImpl.java
  3. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyProductPlanController.java
  4. 22
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/IZyProductPlanAutoServiceImpl.java
  5. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/service/impl/WorkOrderServiceImpl.java

@ -84,6 +84,9 @@
class="j-table-force-nowrap"
@change="handleTableChange">
<span slot="action" slot-scope="text, record">
<a v-if="record.status ==1" @click="reSetStatus(record.id,'0')">重置
<a-divider type="vertical"/>
</a>
<a @click="MySpeak(record)">播放</a>
<a-divider type="vertical"/>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
@ -133,7 +136,7 @@ export default {
dataIndex: 'message'
},
{
title: '播报状态',
title: '播报',
align: "center",
dataIndex: 'status_dictText'
},
@ -223,7 +226,7 @@ export default {
onend: () => {
// console.log("End utterance");
console.log("------------delete----------【" + mess + "】消息播报完成,删除该消息")
this.updateMessageStatus(obj['id']);
this.updateMessageStatus(obj['id'], 1);
},
//
onresume: () => {
@ -257,18 +260,25 @@ export default {
})
},
updateMessageStatus(id) {
reSetStatus(id, ststus) {
this.updateMessageStatus(id, ststus);
// this.getMessageList();
this.loading = false
this.loadData();
},
updateMessageStatus(id, status) {
// console.log("" + id);
let parma = {
"id": id,
"status": '1',
"status": status,
}
putAction(this.url.edit, parma).then((res) => {
if (res.success) {
for (let i = 0; i < this.messageList.length; i++) {
if (this.messageList[i].id === id) {
//datasource
this.messageList.splice(i, 1);
this.messageList.splice(i, '1');
}
}
} else {
@ -288,7 +298,7 @@ export default {
console.log("--------timer is exec,the current time:" + new Date().toLocaleString())
this.getMessageList();
} else {
console.log("-------上次消息列表未处理完---HOLD DOWN")
console.log("-------上次消息列表未处理完---HOLD ON")
}
}, this.millisec)
},

@ -84,7 +84,6 @@ public class ZyOrdersServiceImpl extends ServiceImpl<ZyOrdersMapper, ZyOrders> i
private OrderGoodsAccessoriesMapper zyOrderGoodsAccessoriesMapper;
//顾客地址表
@Autowired
CustomerReceivingAddressMapper customerReceivingAddressMapper;
@ -98,10 +97,9 @@ public class ZyOrdersServiceImpl extends ServiceImpl<ZyOrdersMapper, ZyOrders> i
private ZySpeechMessageMapper zySpeechMessageMapper;
/**
* 大屏数据-获取订单的状态
*
* @return
*/
@Override
@ -131,6 +129,7 @@ public class ZyOrdersServiceImpl extends ServiceImpl<ZyOrdersMapper, ZyOrders> i
/**
* 大屏数据-获取历史订单
*
* @return
*/
@Override
@ -145,6 +144,7 @@ public class ZyOrdersServiceImpl extends ServiceImpl<ZyOrdersMapper, ZyOrders> i
/**
* 获取今日订单及七日订单
*
* @return
*/
@Override
@ -158,7 +158,6 @@ public class ZyOrdersServiceImpl extends ServiceImpl<ZyOrdersMapper, ZyOrders> i
}
/**
*
* @param zyOrdersJk
* @param orderGoodsJkList
* @return
@ -186,8 +185,7 @@ public class ZyOrdersServiceImpl extends ServiceImpl<ZyOrdersMapper, ZyOrders> i
zyOrders.setUserId(zyOrdersJk.getUserId());
zyOrders.setGoodsQuantity(zyOrdersJk.getGoodsQuantity());
//顾客地址
if(zyOrdersJk.getAddressId()!=null&&zyOrdersJk.getAddressId()!="")
{
if (zyOrdersJk.getAddressId() != null && zyOrdersJk.getAddressId() != "") {
CustomerReceivingAddress customerReceivingAddress = customerReceivingAddressMapper.selectById(zyOrdersJk.getAddressId());
zyOrders.setCityId(customerReceivingAddress.getCityId());
zyOrders.setAddress(customerReceivingAddress.getAddress());
@ -197,8 +195,7 @@ public class ZyOrdersServiceImpl extends ServiceImpl<ZyOrdersMapper, ZyOrders> i
}
//顾客发票
if(zyOrdersJk.getInvoiceId()!=null&&zyOrdersJk.getInvoiceId()!="")
{
if (zyOrdersJk.getInvoiceId() != null && zyOrdersJk.getInvoiceId() != "") {
CustomerInvoice customerInvoice = customerInvoiceMapper.selectById(zyOrdersJk.getInvoiceId());
zyOrders.setInvoiceCustomerType(Integer.parseInt(customerInvoice.getCustomerType()));
zyOrders.setInvoiceType(Integer.parseInt(customerInvoice.getInvoiceType()));
@ -325,7 +322,9 @@ public class ZyOrdersServiceImpl extends ServiceImpl<ZyOrdersMapper, ZyOrders> i
// //生产计划工序id
// message.setZyplanprocessId();
//消息
message.setMessage("您有新的订单,订单编号:"+zo.getOrdersNum()+",请及时查看!");
String ordersNum = zo.getOrdersNum();
String code = ordersNum.substring(ordersNum.length() - 6);
message.setMessage("您有新的订单,订单尾号:" + code + ",请及时查看!");
zySpeechMessageMapper.insert(message);
}
}

@ -99,7 +99,7 @@ public class ZyProductPlanController extends JeecgController<ZyProductPlan, IZyP
//保存生产计划语音播报消息
ZySpeechMessage zySpeechMessage = new ZySpeechMessage();
String productCode = zyProductPlan.getProductCode();
String code = productCode.substring(productCode.length() - 10);
String code = productCode.substring(productCode.length() - 6);
String mess = "工单尾号" + code + ",生产计划已完成制定,请跟进后续生产作业.";
zySpeechMessage.setMessage(mess);
zySpeechMessage.setWorkorderId(productCode);

@ -9,9 +9,10 @@ import org.jeecg.modules.demo.pro.entity.ZyProcessMachine;
import org.jeecg.modules.demo.pro.service.IZyProcessMachineService;
import org.jeecg.modules.device.entity.ZyDevice;
import org.jeecg.modules.device.service.IZyDeviceService;
import org.jeecg.modules.message.entity.ZySpeechMessage;
import org.jeecg.modules.message.service.IZySpeechMessageService;
import org.jeecg.modules.operationtool.entity.ZyOperationtool;
import org.jeecg.modules.operationtool.service.IZyOperationtoolService;
import org.jeecg.modules.person.vo.station;
import org.jeecg.modules.productplan.entity.ZyPlanProcess;
import org.jeecg.modules.productplan.entity.ZyPlanProcessAccessories;
import org.jeecg.modules.productplan.entity.ZyPlanProcessFabric;
@ -311,7 +312,7 @@ public class IZyProductPlanAutoServiceImpl extends ServiceImpl<ZyProductPlanMapp
Optional.ofNullable(planProcessList).orElse(new LinkedList<>()).forEach(e -> {
// 5,生成物料单
zyPlanProcessService.createMaterialBill(e);
// 5,发送到仓库
// 6,发送到仓库
zyPlanProcessService.sendToRepository(e);
});
@ -320,10 +321,27 @@ public class IZyProductPlanAutoServiceImpl extends ServiceImpl<ZyProductPlanMapp
//测试需要返回生产计划工序
returnList.add(map);
}
// 7,保存生产计划语音消息
this.addSpeechMessage(k);
});
return returnList;
}
@Autowired
private IZySpeechMessageService iZySpeechMessageService;
@Transactional(rollbackFor = Exception.class, readOnly = false)
public void addSpeechMessage(final ZyProductPlan zyProductPlan) {
//保存生产计划语音播报消息
ZySpeechMessage zySpeechMessage = new ZySpeechMessage();
String productCode = zyProductPlan.getProductCode();
String code = productCode.substring(productCode.length() - 6);
String mess = "工单尾号" + code + ",生产计划已完成制定,请跟进后续生产作业.";
zySpeechMessage.setMessage(mess);
zySpeechMessage.setWorkorderId(productCode);
iZySpeechMessageService.save(zySpeechMessage);
}
/**
* 匹配设备&工具&工人
* <p>

@ -258,7 +258,9 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
//订单商品id
message.setWorkorderId(workOrder.getId());
//消息
message.setMessage("您的工单已生成,工单编号:"+workOrder.getProductCode()+",请及时查看!");
String productCode = workOrder.getProductCode();
String code = productCode.substring(productCode.length() - 6);
message.setMessage("您的工单已生成,工单尾号:"+code+",请及时查看!");
zySpeechMessageMapper.insert(message);
//保存产品

Loading…
Cancel
Save