2023-05-17-01-大屏

master
喻忠伟 2 years ago
parent 1f7dda1573
commit 89ae331599
  1. 6
      ant-design-vue-jeecg/.env.production
  2. 2
      ant-design-vue-jeecg/src/views/productrecord/ProductRecordList.vue
  3. 10
      jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/CommonUtils.java
  4. 2
      jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/XJobUtils.java
  5. 3
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/service/impl/ZyOrdersServiceImpl.java
  6. 8
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/hangerlocation/service/impl/HangerLocationServiceImpl.java
  7. 86
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/largeScreen/controller/LargeScreenController.java
  8. 41
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/largeScreen/vo/LargeOrderVo.java
  9. 3
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/service/impl/WorkOrderServiceImpl.java

@ -1,4 +1,4 @@
NODE_ENV=production
VUE_APP_API_BASE_URL=http://182.92.169.222:10085/jeecg-boot
VUE_APP_CAS_BASE_URL=http://182.92.169.222:10085/jeecg-boot/cas
VUE_APP_ONLINE_BASE_URL=http://182.92.169.222:8012
VUE_APP_API_BASE_URL=http://10.100.200.112:10085/jeecg-boot
VUE_APP_CAS_BASE_URL=http://10.100.200.112:10085/jeecg-boot/cas
VUE_APP_ONLINE_BASE_URL=http://10.100.200.112:8012

@ -157,7 +157,7 @@
{
title:'工单编号',
align:"center",
dataIndex: 'orderId_dictText'
dataIndex: 'orderCode'
},
{
title:'生产开始时间',

@ -212,4 +212,14 @@ public class CommonUtils {
return DB_TYPE;
}
/** 截取后6字符串 */
public static String getLastSixChars(String str,int num) {
if (!str.isEmpty() && str.length() > num) {
return str.substring(str.length() - num);
} else {
// 字符串为空或长度不足6位,返回原字符串
return str;
}
}
}

@ -30,7 +30,7 @@ public class XJobUtils{
//将时间转为long类型
long start=start_Date.getTime();
//获取30-180秒对应毫秒
long intervalTime=randInt(s*60,s*60)*1000;
long intervalTime=randInt(s*60,e*60)*1000;
//总共花费时长
long timeMillis =start+intervalTime;

@ -1,6 +1,7 @@
package org.jeecg.modules.demo.zyorders.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.jeecg.common.util.CommonUtils;
import org.jeecg.modules.demo.customerinvoice.entity.CustomerInvoice;
import org.jeecg.modules.demo.customerinvoice.mapper.CustomerInvoiceMapper;
import org.jeecg.modules.demo.customerreceivingaddress.entity.CustomerReceivingAddress;
@ -323,7 +324,7 @@ public class ZyOrdersServiceImpl extends ServiceImpl<ZyOrdersMapper, ZyOrders> i
// message.setZyplanprocessId();
//消息
String ordersNum = zo.getOrdersNum();
String code = ordersNum.substring(ordersNum.length() - 6);
String code =CommonUtils.getLastSixChars(ordersNum,6);
message.setMessage("您有新的订单,订单尾号:" + code + ",请及时查看!");
zySpeechMessageMapper.insert(message);
}

@ -178,7 +178,7 @@ public class HangerLocationServiceImpl extends ServiceImpl<HangerLocationMapper,
Sensor sr=senIn.get(0);
SensorRecord srmodel=new SensorRecord();
//传感器编号
srmodel.setSensorCode(sr.getSensorCode());
srmodel.setSensorCode(sr.getId());
//网络地址
srmodel.setSensorIp(sr.getSensorIp());
//工位
@ -186,7 +186,7 @@ public class HangerLocationServiceImpl extends ServiceImpl<HangerLocationMapper,
//进出标记
srmodel.setIiOsign("1");
//产品标识
//srmodel.setProductIdenti();
srmodel.setProductIdenti(item.getProductCode());
//触发时间
srmodel.setTriggerTime(str01);
arrSR.add(srmodel);
@ -200,7 +200,7 @@ public class HangerLocationServiceImpl extends ServiceImpl<HangerLocationMapper,
Sensor sr=senIn.get(0);
SensorRecord srmodel=new SensorRecord();
//传感器编号
srmodel.setSensorCode(sr.getSensorCode());
srmodel.setSensorCode(sr.getId());
//网络地址
srmodel.setSensorIp(sr.getSensorIp());
//工位
@ -208,7 +208,7 @@ public class HangerLocationServiceImpl extends ServiceImpl<HangerLocationMapper,
//进出标记
srmodel.setIiOsign("1");
//产品标识
//srmodel.setProductIdenti();
srmodel.setProductIdenti(item.getProductCode());
//触发时间
srmodel.setTriggerTime(str01);
arrSR.add(srmodel);

@ -6,16 +6,27 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.modules.demo.customermeasure.entity.CustomerMeasure;
import org.jeecg.modules.demo.customermeasure.service.ICustomerMeasureService;
import org.jeecg.modules.demo.ordergoods.entity.OrderGoods;
import org.jeecg.modules.demo.ordergoods.service.IOrderGoodsService;
import org.jeecg.modules.demo.zyorders.entity.ZyOrders;
import org.jeecg.modules.demo.zyorders.service.IZyOrdersService;
import org.jeecg.modules.largeScreen.vo.LargeOrderVo;
import org.jeecg.modules.orderbymakeclothplan.vo.TodayOrderAndQIriVo;
import org.jeecg.modules.shop.vo.OrderSales;
import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.service.ISysDepartService;
import org.jeecg.modules.system.service.ISysUserService;
import org.jeecg.modules.zystylemodule.entity.NewStyleModule;
import org.jeecg.modules.zystylemodule.entity.ZyStyleModule;
import org.jeecg.modules.zystylemodule.service.IZyStyleModuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
@ -27,10 +38,25 @@ import java.util.List;
@RestController
@Slf4j
public class LargeScreenController {
//订单
@Autowired
private IZyOrdersService zyOrdersService;
//商品
@Autowired
private IOrderGoodsService orderGoodsService;
//用户
@Autowired
private IZyOrdersService zyOrdersService;
private ISysUserService sysUserService;
// 测体
@Autowired
private ICustomerMeasureService customerMeasureService;
//模块
@Autowired
private IZyStyleModuleService zyStyleModuleService;
@Autowired
private ISysDepartService sysDepartService;
@ -114,5 +140,63 @@ public class LargeScreenController {
return Result.OK(list);
}
@AutoLog(value = "获取最新订单")
@ApiOperation(value = "获取最新订单", notes = "获取最新订单")
@GetMapping("/getNewOder")
public Result<?> getNewOder() {
LargeOrderVo vo=new LargeOrderVo();
//最新订单
QueryWrapper<ZyOrders> queryWrapper=new QueryWrapper();
queryWrapper.eq("ischild",1);
queryWrapper.eq("payment_status",1);
queryWrapper.orderByDesc("order_time");
List<ZyOrders> list=zyOrdersService.list(queryWrapper);
//取最新一條數據
if(list.size()>0)
{
ZyOrders orders_model=list.get(0);
vo.setOrders(orders_model);
//顾客信息-性别只能查询用户表
SysUser user=sysUserService.getById(orders_model.getUserId());
vo.setUser(user);
//测体数据,可能有多条,只能取最新的
QueryWrapper<CustomerMeasure> cmqw=new QueryWrapper();
cmqw.eq("user_id",orders_model.getUserId());
cmqw.orderByDesc("create_time");
List<CustomerMeasure> cmList=customerMeasureService.list(cmqw);
CustomerMeasure cmModel=new CustomerMeasure();
if(cmList.size()>0)
{
cmModel=cmList.get(0);
vo.setCustomerMeasure(cmModel);
}
//订单商品
QueryWrapper<OrderGoods> ogqw=new QueryWrapper();
ogqw.eq("orders_id",orders_model.getId());
List<OrderGoods> ogList=orderGoodsService.list(ogqw);
OrderGoods ogModel= new OrderGoods();
//订单中找款式
if(ogList.size()>0)
{
ogModel=ogList.get(0);
String[] picArr=ogModel.getGoodsPicture().split(",");
java.util.ArrayList<String> picList = new ArrayList<>(Arrays.asList(picArr));
vo.setPictureList(picList);
vo.setOrderGoods(ogModel);
//服装款式-模块
QueryWrapper<ZyStyleModule> smqw=new QueryWrapper();
smqw.eq("style_id",ogModel.getStyleId());
List<ZyStyleModule> smList=zyStyleModuleService.list(smqw);
List<NewStyleModule> newStyleModuleList =zyStyleModuleService.changeList(smList);
vo.setModuleList(newStyleModuleList);
System.out.println("");
}
}
return Result.OK(vo);
}
}

@ -0,0 +1,41 @@
package org.jeecg.modules.largeScreen.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecg.modules.demo.customermeasure.entity.CustomerMeasure;
import org.jeecg.modules.demo.ordergoods.entity.OrderGoods;
import org.jeecg.modules.demo.zyorders.entity.ZyOrders;
import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.zystylemodule.entity.NewStyleModule;
import org.jeecgframework.poi.excel.annotation.Excel;
import java.io.Serializable;
import java.util.List;
@Data
public class LargeOrderVo implements Serializable {
private static final long serialVersionUID = 1L;
//订单用户
private SysUser user;
//订单
private ZyOrders orders;
//商品
private OrderGoods orderGoods;
//测体
private CustomerMeasure customerMeasure;
//模块
private List<NewStyleModule> moduleList;
//商品图片
private List<String> pictureList;
}

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.util.CommonUtils;
import org.jeecg.modules.demo.base.mapper.ZyProcessMapper;
import org.jeecg.modules.demo.customermeasure.entity.CustomerMeasure;
import org.jeecg.modules.demo.customermeasure.mapper.CustomerMeasureMapper;
@ -259,7 +260,7 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
message.setWorkorderId(workOrder.getId());
//消息
String productCode = workOrder.getProductCode();
String code = productCode.substring(productCode.length() - 6);
String code = CommonUtils.getLastSixChars(productCode,6);
message.setMessage("您的工单已生成,工单尾号:"+code+",请及时查看!");
zySpeechMessageMapper.insert(message);

Loading…
Cancel
Save