-
订单号#{{this.model.orderNum}}|{{this.dingdaninfo.createTime}}
+
订单号#{{this.dingdaninfo.orderNum}}|{{this.dingdaninfo.createTime}}
数量价格总计
配送至
-
河南省
-
驻马店市 驿城区
-
{{this.dingdandh.address}}
-
{{this.dingdandh.zipCode}}
-
{{this.dingdandh.deliveryStatus}}
+
+
+ {{this.dingdaninfo.address}}
+ {{this.dingdaninfo.zipCode}}
+ {{this.dingdaninfo.deliveryStatus}}
+
您的订单已经发出。
尊享免费配送,您的物流单号:
4263882788397
@@ -70,13 +104,13 @@
-
+
{{this.dingdaninfo.goodsName}}
款式:{{this.dingdaninfo.styleNames}}
尺码:{{this.dingdaninfo.modelNumber}}
-
主辅料:{{this.dingdaninfo.name}},{{this.dingdaninfo.typeName}}
+
主辅料:{{this.dingdaninfo.name}}
{{this.dingdaninfo.goodsNum}}{{this.dingdaninfo.unitPrice}}{{this.dingdaninfo.payTotalPrice}}
@@ -117,7 +151,133 @@
-
返回
+
+
+
+
+ 取消
+
+
+ 确定
+
+
+
+
+
+
+
+
+ 个人
+
+
+ 企业
+
+
+
+
+
+
+ 专用增值税发票
+
+
+ 普通增值税发票
+
+
+
+
+
+
+
+
+
+
+
+
+ +86 中国大陆地区
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 支付宝支付
+
+
+
+
+
+
+
总计: ¥{{this.dingdaninfo.payTotalPrice}}
+
请使用支付宝扫描左图二维码进行支付
+
请您在15分钟内付款以免订单被取消,如有疑问,请联系客服。
+
订单发货后您将收到订单发货通知短信
+
+
+
+
+
手机不在身边? 登录账号付款
+
+ 返回
+
+
+
+
+
@@ -132,17 +292,36 @@
components: { Header,Footer },
data() {
return {
+ visible2:false,
+ visible3:false,
+ cityId:"",
+ description:"",
+ defaultPicture:"",
current:0,//目前步骤条在第几步
model:{
id:'',
orderNum:'',
name:'',
- pay:false,
+ pay:'',
receipt:false
},
- dingdaninfo:{},
- dingdandh:{},
-
+ dingdaninfo:{},
+ dingdandh:{},
+ labelCol: { span: 5 },
+ wrapperCol: { span: 19 },
+ form: {
+ customerType:'1',//客户类型
+ id:'',
+ invoiceType: undefined,
+ name: '',
+ addr: '',
+ accountNumber: '',
+ account: '',
+ telephone: '',
+ address:'',
+ card:'',
+ flag:false//是否默认地址
+ },
url: {
list: "/starehouse/starehouse/list",
@@ -154,22 +333,40 @@
},
created() {
this.getallgoods();
- this.getdingdandh();
+ //this.getdingdandh();
this.model.id = this.$route.query.id
this.model.orderNum = this.$route.query.orderNum
- this.model.name = this.$route.query.name
- this.model.pay = JSON.parse(this.$route.query.pay)
+ //this.model.name = this.$route.query.name
+ this.model.pay = this.$route.query.pay
this.model.receipt = JSON.parse(this.$route.query.receipt)
switch (this.$route.query.key) {
- case 'daizhifu':
+ case 'wzf':
this.current=0
break;
- case 'daishouhuo':
+ case 'yzf':
+ this.current=1
+ break;
+ case 'dsc':
+ this.current=2
+ break;
+ case 'scz':
+ this.current=3
+ break;
+ case 'yfh':
this.current=4
break;
- case 'yiwancheng':
+ case 'ydh':
+ this.current=5
+ break;
+ case 'yqs':
this.current=6
break;
+ case 'sqcx':
+ this.current=7
+ break;
+ case 'ycx':
+ this.current=8
+ break;
}
@@ -180,7 +377,12 @@
},
methods: {
+ ljgm(){
+ this.visible3 = true
+ },
+ zhifu() {
+ },
getdingdandh(){
getAction(this.url.getdingdandh,{ id: this.$route.query.id}).then((res) => {
if(res.success) {
@@ -201,12 +403,27 @@
getAction(this.url.getdingdaninfo,{ id: this.$route.query.id}).then((res) => {
if(res.success) {
this.dingdaninfo = res.result;
+ this.defaultPicture = this.dingdaninfo.defaultPicture;
+ this.description=this.dingdaninfo.createTime;
+ this.cityId = this.dingdaninfo.cityId;
this.visible = true;
} else {
console.log("+++++++++++++++++++++")
}
});
- }
+ },
+ showModal() {
+ this.visible2 = true;
+ },
+ handleOk(e) {
+ this.visible2 = false;
+ },
+ handleCancel(e) {
+ this.visible2 = false;
+ },
+ handleCancel2(e) {
+ this.visible3 = false;
+ },
},
@@ -220,155 +437,169 @@
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zygoods/service/IZyGoodsService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zygoods/service/IZyGoodsService.java
index 27f410d7..155b3a19 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zygoods/service/IZyGoodsService.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zygoods/service/IZyGoodsService.java
@@ -3,6 +3,8 @@ package org.jeecg.modules.demo.zygoods.service;
import org.jeecg.modules.demo.ordergoods.entity.OrderGoodsJk;
import org.jeecg.modules.demo.zygoods.entity.ZyGoods;
import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.system.entity.SysDepart;
+import org.jeecg.modules.system.entity.SysUser;
import java.util.List;
@@ -16,5 +18,20 @@ public interface IZyGoodsService extends IService
{
public List selectByMainId(String mainId);
//随机获取商品
List SJgetOrder();
+ /**
+ * 根据商品ID获取销售部门
+ * @return
+ */
+ SysDepart getSalesEnterprise(String goodsId);
+ /**
+ * 根据商品ID获取销售人员
+ * @return
+ */
+ SysUser getSalesperson(String goodsId);
+ /**
+ * 获取物流信息
+ * @return
+ */
+ SysDepart getLogisticsEnterprises();
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zygoods/service/impl/ZyGoodsServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zygoods/service/impl/ZyGoodsServiceImpl.java
index 8e5531e3..6d7b396d 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zygoods/service/impl/ZyGoodsServiceImpl.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zygoods/service/impl/ZyGoodsServiceImpl.java
@@ -5,6 +5,12 @@ import org.jeecg.modules.demo.ordergoods.entity.OrderGoodsJk;
import org.jeecg.modules.demo.zygoods.entity.ZyGoods;
import org.jeecg.modules.demo.zygoods.mapper.ZyGoodsMapper;
import org.jeecg.modules.demo.zygoods.service.IZyGoodsService;
+import org.jeecg.modules.system.entity.SysDepart;
+import org.jeecg.modules.system.entity.SysUser;
+import org.jeecg.modules.system.entity.SysUserDepart;
+import org.jeecg.modules.system.mapper.SysDepartMapper;
+import org.jeecg.modules.system.mapper.SysUserDepartMapper;
+import org.jeecg.modules.system.mapper.SysUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -24,6 +30,19 @@ public class ZyGoodsServiceImpl extends ServiceImpl impl
@Autowired
private ZyGoodsMapper zyGoodsMapper;
+ //部门
+ @Autowired
+ private SysDepartMapper sysDepartMapper;
+ //部门-用户
+ @Autowired
+ private SysUserDepartMapper sysUserDepartMapper;
+
+ //用户
+ @Autowired
+ private SysUserMapper sysUserMapper;
+
+
+
@Override
public List selectByMainId(String mainId) {
return zyGoodsMapper.selectByMainId(mainId);
@@ -67,5 +86,129 @@ public class ZyGoodsServiceImpl extends ServiceImpl impl
return orderGoodsJkList;
}
+ /**
+ * 根据商品ID获取销售部门
+ * @return
+ */
+ @Override
+ public SysDepart getSalesEnterprise(String goodsId) {
+ //根据商品id查找商品
+ ZyGoods goods=zyGoodsMapper.selectById(goodsId);
+ //根据企业id 查找部门id和父id等于企业id的部门列表
+ QueryWrapper queryWrapper=new QueryWrapper();
+ queryWrapper.and(wrapper -> wrapper.eq("id", goods.getEnterprisesId())
+ .or().eq("parent_id", goods.getEnterprisesId())
+ );
+ List depList=sysDepartMapper.selectList(queryWrapper);
+ //如果部门列表中有网店类型返回,如果没有则返回第一个部门
+ if(depList.size()>0)
+ {
+ SysDepart model=depList.get(0);
+ for(SysDepart dep:depList)
+ {
+ if(dep.getOrgCategory().trim().equals("4"))
+ {
+ model=dep;
+ break;
+ }
+ }
+ return model;
+ }
+
+
+ return null;
+ }
+ /**
+ * 根据商品ID获取销售人员
+ * @return
+ */
+ @Override
+ public SysUser getSalesperson(String goodsId) {
+ //根据商品id查找商品
+ ZyGoods goods=zyGoodsMapper.selectById(goodsId);
+ //根据企业id 查找部门id和父id等于企业id的部门列表
+ QueryWrapper queryWrapper=new QueryWrapper();
+
+ //查找网店类型部门
+ queryWrapper.eq("org_category", "4");
+ queryWrapper.and(wrapper -> wrapper.eq("id", goods.getEnterprisesId())
+ .or().eq("parent_id", goods.getEnterprisesId())
+ );
+ List depList=sysDepartMapper.selectList(queryWrapper);
+ List depIdsList=new ArrayList<>();
+ if(depList.size()>0)
+ {//如果存在网店类型部门在根据部门编号查找用户,如果用户不存在则查找所有部门
+ for(SysDepart dep:depList)
+ {
+ depIdsList.add(dep.getId());
+ }
+ //根据部门id查找对应用户
+ QueryWrapper qwUserDepar=new QueryWrapper();
+ //qwUserDepar.select("DISTINCT user_id").in("dep_id",depIdsList);
+ qwUserDepar.in("dep_id",depIdsList);
+ List udList=sysUserDepartMapper.selectList(qwUserDepar);
+ if(udList.size()>0)
+ {//根据查找得到数据 从中查询用户
+ SysUser userModel=sysUserMapper.selectById(udList.get(0).getUserId());
+
+ return userModel;
+ }
+
+
+ }
+ //
+ QueryWrapper queryWrapper1=new QueryWrapper();
+ //所有部门
+ queryWrapper1.and(wrapper -> wrapper.eq("id", goods.getEnterprisesId())
+ .or().eq("parent_id", goods.getEnterprisesId())
+ );
+ depList=sysDepartMapper.selectList(queryWrapper1);
+ if(depList.size()>0)
+ {
+ for(SysDepart dep:depList)
+ {
+ depIdsList.add(dep.getId());
+ }
+ if(depIdsList.size()>0)
+ {
+ //根据部门id查找对应用户
+ QueryWrapper qwUserDepar1=new QueryWrapper();
+ // qwUserDepar1.select("DISTINCT user_id").in("dep_id",depIdsList);
+ qwUserDepar1.in("dep_id",depIdsList);
+ List udList=sysUserDepartMapper.selectList(qwUserDepar1);
+ //该部门所有用户
+
+ if(udList.size()>0)
+ {//根据查找得到数据 从中查询用户
+
+ SysUser userModel=sysUserMapper.selectById(udList.get(0).getUserId());
+
+ return userModel;
+ }
+
+ }
+ }
+
+
+
+ return null;
}
+ /**
+ * 获取物流信息
+ * @return
+ */
+ @Override
+ public SysDepart getLogisticsEnterprises() {
+ //查找物流类型部门
+ QueryWrapper queryWrapper=new QueryWrapper();
+ queryWrapper.eq("org_category", "7");
+ List depList=sysDepartMapper.selectList(queryWrapper);
+ if(depList.size()>0)
+ {
+ return depList.get(0);
+ }
+ return null;
+ }
+
+}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/controller/ZyOrdersController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/controller/ZyOrdersController.java
index a8e3dd25..6c8be146 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/controller/ZyOrdersController.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/controller/ZyOrdersController.java
@@ -138,8 +138,7 @@ public class ZyOrdersController extends JeecgController orderJk(ZyOrdersJk zyOrdersJk,List orderGoodsJkList,HttpServletRequest req) {
+ public List orderJk(ZyOrdersJk zyOrdersJk,List orderGoodsJkList) {
Double actual_payment = 0.00;
Double money = 0.00;
for(int i = 0 ; i < orderGoodsJkList.size() ; i++){
@@ -207,7 +206,7 @@ public class ZyOrdersController extends JeecgController queryWrapperzsm = QueryGenerator.initQueryWrapper(goodsModule, req.getParameterMap());
+ QueryWrapper queryWrapperzsm = new QueryWrapper();
queryWrapperzsm.eq("goods_id",zyGoods.getId());
queryWrapperzsm.eq("style_id",zyGoods.getStyleId());
List listzsm = goodsModuleService.list(queryWrapperzsm);
@@ -221,7 +220,7 @@ public class ZyOrdersController extends JeecgController queryWrapperzsf = QueryGenerator.initQueryWrapper(goodsFabric, req.getParameterMap());
+ QueryWrapper queryWrapperzsf =new QueryWrapper();
queryWrapperzsf.eq("goods_id",zyGoods.getId());
List listzsf = goodsFabricService.list(queryWrapperzsf);
for (int o = 0 ; o < listzsf.size() ; o++){
@@ -232,7 +231,7 @@ public class ZyOrdersController extends JeecgController queryWrapperzsa = QueryGenerator.initQueryWrapper(goodsAccessories, req.getParameterMap());
+ QueryWrapper queryWrapperzsa = new QueryWrapper();
queryWrapperzsa.eq("goods_id",zyGoods.getId());
List listzsa = goodsAccessoriesService.list(queryWrapperzsa);
for (int p = 0 ; p < listzsa.size() ; p++){
@@ -247,14 +246,15 @@ public class ZyOrdersController extends JeecgController ids = new ArrayList<>();
ZyOrders zos = new ZyOrders();
- QueryWrapper queryWrapperzos = QueryGenerator.initQueryWrapper(zos, req.getParameterMap());
+ QueryWrapper queryWrapperzos = new QueryWrapper();
queryWrapperzos.eq("order_id",zyOrders.getId());
List listzos = zyOrdersService.list(queryWrapperzos);
if(listzos.size()>0){
- return Result.error("该订单已经拆分,不可以再次拆单!");
+ //return Result.error("该订单已经拆分,不可以再次拆单!");
+ return null;
}else{
OrderGoods orderGoods = new OrderGoods();
- QueryWrapper queryWrapperog = QueryGenerator.initQueryWrapper(orderGoods, req.getParameterMap());
+ QueryWrapper queryWrapperog = new QueryWrapper();
queryWrapperog.eq("orders_id",zyOrders.getId());
List listog = orderGoodsService.list(queryWrapperog);
if(listog.size()>0){
@@ -279,7 +279,7 @@ public class ZyOrdersController extends JeecgController {
List getOldOrder();
//大屏数据-获取今日订单及七日订单
TodayOrderAndQIriVo getOrder();
+
+ /**
+ *订单和订单商品接口
+ * @param ordersJk
+ * @param ogjkList
+ * @return
+ */
+ List orderJk(ZyOrdersJk ordersJk, List ogjkList);
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/service/impl/ZyOrdersServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/service/impl/ZyOrdersServiceImpl.java
index 351ed7e4..3a89a9f6 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/service/impl/ZyOrdersServiceImpl.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/service/impl/ZyOrdersServiceImpl.java
@@ -1,15 +1,39 @@
package org.jeecg.modules.demo.zyorders.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import org.jeecg.modules.demo.customerinvoice.entity.CustomerInvoice;
+import org.jeecg.modules.demo.customerinvoice.mapper.CustomerInvoiceMapper;
+import org.jeecg.modules.demo.customerreceivingaddress.entity.CustomerReceivingAddress;
+import org.jeecg.modules.demo.customerreceivingaddress.mapper.CustomerReceivingAddressMapper;
+import org.jeecg.modules.demo.goodsaccessories.entity.GoodsAccessories;
+import org.jeecg.modules.demo.goodsaccessories.mapper.GoodsAccessoriesMapper;
+import org.jeecg.modules.demo.goodsfabric.entity.GoodsFabric;
+import org.jeecg.modules.demo.goodsfabric.mapper.GoodsFabricMapper;
+import org.jeecg.modules.demo.goodsmodule.entity.GoodsModule;
+import org.jeecg.modules.demo.goodsmodule.mapper.GoodsModuleMapper;
+import org.jeecg.modules.demo.ordergoods.entity.OrderGoods;
+import org.jeecg.modules.demo.ordergoods.entity.OrderGoodsJk;
+import org.jeecg.modules.demo.ordergoods.mapper.OrderGoodsMapper;
+import org.jeecg.modules.demo.ordergoodsaccessories.entity.OrderGoodsAccessories;
+import org.jeecg.modules.demo.ordergoodsaccessories.mapper.OrderGoodsAccessoriesMapper;
+import org.jeecg.modules.demo.ordergoodsfabric.entity.OrderGoodsFabric;
+import org.jeecg.modules.demo.ordergoodsfabric.mapper.OrderGoodsFabricMapper;
+import org.jeecg.modules.demo.ordergoodsmodule.entity.OrderGoodsModule;
+import org.jeecg.modules.demo.ordergoodsmodule.mapper.OrderGoodsModuleMapper;
+import org.jeecg.modules.demo.zygoods.entity.ZyGoods;
+import org.jeecg.modules.demo.zygoods.mapper.ZyGoodsMapper;
import org.jeecg.modules.demo.zyorders.entity.ZyOrders;
+import org.jeecg.modules.demo.zyorders.entity.ZyOrdersJk;
import org.jeecg.modules.demo.zyorders.mapper.ZyOrdersMapper;
import org.jeecg.modules.demo.zyorders.service.IZyOrdersService;
import org.jeecg.modules.orderbymakeclothplan.vo.TodayOrderAndQIriVo;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.text.SimpleDateFormat;
+import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
@@ -23,6 +47,52 @@ import java.util.List;
@Service
public class ZyOrdersServiceImpl extends ServiceImpl implements IZyOrdersService {
+ //商品
+ @Autowired
+ private ZyGoodsMapper zyGoodsMapper;
+
+ //订单商品表
+ @Autowired
+ private OrderGoodsMapper zyOrderGoodsMapper;
+
+ //商品模块表
+ @Autowired
+ private GoodsModuleMapper zyGoodsModuleMapper;
+
+
+ //订单商品模块表
+ @Autowired
+ private OrderGoodsModuleMapper zyOrderGoodsModuleMapper;
+
+
+ //商品面料表
+ @Autowired
+ private GoodsFabricMapper zyGoodsFabricMapper;
+
+ //订单商品面料表
+ @Autowired
+ private OrderGoodsFabricMapper zyOrderGoodsFabricMapper;
+
+ //商品辅料表
+ @Autowired
+ private GoodsAccessoriesMapper zyGoodsAccessoriesMapper;
+
+ //订单商品辅料表
+ @Autowired
+ private OrderGoodsAccessoriesMapper zyOrderGoodsAccessoriesMapper;
+
+
+
+ //顾客地址表
+ @Autowired
+ CustomerReceivingAddressMapper customerReceivingAddressMapper;
+
+ //客户发票信息
+ @Autowired
+ CustomerInvoiceMapper customerInvoiceMapper;
+
+
+
/**
* 大屏数据-获取订单的状态
* @return
@@ -90,4 +160,175 @@ public class ZyOrdersServiceImpl extends ServiceImpl i
}
}
+ /**
+ *
+ * @param zyOrdersJk
+ * @param orderGoodsJkList
+ * @return
+ */
+ @Override
+ public List orderJk(ZyOrdersJk zyOrdersJk, List orderGoodsJkList) {
+
+ Double actual_payment = 0.00;
+ Double money = 0.00;
+ for(int i = 0 ; i < orderGoodsJkList.size() ; i++){
+ ZyGoods zyGoods = zyGoodsMapper.selectById(orderGoodsJkList.get(i).getGoodsId());
+ money = money + zyGoods.getUnitPrice()*orderGoodsJkList.get(i).getGoodsNum();
+ actual_payment = actual_payment + zyGoods.getPromotionPrice()*orderGoodsJkList.get(i).getGoodsNum();
+ }
+ ZyOrders zyOrders = new ZyOrders();
+ zyOrders.setIschild(0);
+ zyOrders.setOrderTime(new Date());
+ zyOrders.setOrdersNum(getOrdersNum());
+ zyOrders.setMoney(money);
+ zyOrders.setFreight(zyOrdersJk.getFreight());
+ zyOrders.setPromotionPrice(money-actual_payment);
+ zyOrders.setActualPayment(actual_payment);
+ zyOrders.setDeliveryTime(zyOrdersJk.getDeliveryTime());
+ zyOrders.setOrdersType(zyOrdersJk.getOrdersType());
+ zyOrders.setUserId(zyOrdersJk.getUserId());
+ zyOrders.setGoodsQuantity(zyOrdersJk.getGoodsQuantity());
+ CustomerReceivingAddress customerReceivingAddress = customerReceivingAddressMapper.selectById(zyOrdersJk.getAddressId());
+ zyOrders.setCityId(customerReceivingAddress.getCityId());
+ zyOrders.setAddress(customerReceivingAddress.getAddress());
+ zyOrders.setZipCode(customerReceivingAddress.getZipCode());
+ zyOrders.setReceiver(zyOrdersJk.getReceiver());
+ zyOrders.setMobile(customerReceivingAddress.getMobile());
+ CustomerInvoice customerInvoice = customerInvoiceMapper.selectById(zyOrdersJk.getInvoiceId());
+ zyOrders.setInvoiceCustomerType(Integer.parseInt(customerInvoice.getCustomerType()));
+ zyOrders.setInvoiceType(Integer.parseInt(customerInvoice.getInvoiceType()));
+ zyOrders.setTaxIdentificationNumber(customerInvoice.getTaxIdentificationNumber());
+ zyOrders.setAddressBilling(customerInvoice.getAddress());
+ zyOrders.setTelephone(customerInvoice.getTelephone());
+ zyOrders.setBankPublic(customerInvoice.getBankDeposit());
+ zyOrders.setAccountNumber(customerInvoice.getAccountNumber());
+ zyOrders.setSalesEnterpriseId(zyOrdersJk.getSalesEnterpriseId());
+ zyOrders.setSalespersonId(zyOrdersJk.getSalespersonId());
+ zyOrders.setLogisticsEnterprisesId(zyOrdersJk.getLogisticsEnterprisesId());
+ zyOrders.setDeliveryStatus(0);
+ baseMapper.insert(zyOrders);
+ for(int j = 0 ; j < orderGoodsJkList.size() ; j++){
+ ZyGoods zyGoods = zyGoodsMapper.selectById(orderGoodsJkList.get(j).getGoodsId());
+ OrderGoods orderGoods = new OrderGoods();
+ orderGoods.setOrdersId(zyOrders.getId());
+ orderGoods.setGoodsId(orderGoodsJkList.get(j).getGoodsId());
+ orderGoods.setGoodsNum(orderGoodsJkList.get(j).getGoodsNum());
+ orderGoods.setGoodsCode(zyGoods.getGoodsCode());
+ orderGoods.setGoodsName(zyGoods.getGoodsName());
+ orderGoods.setGoodsIntr(zyGoods.getGoodsIntr());
+ orderGoods.setCustomized(zyGoods.getCustomized());
+ orderGoods.setMeasureId(zyOrdersJk.getMeasureId());
+ orderGoods.setGoodsPicture(zyGoods.getGoodsPicture());
+ orderGoods.setDefaultPicture(zyGoods.getDefaultPicture());
+ orderGoods.setGoodsVideo(zyGoods.getGoodsVideo());
+ orderGoods.setClothsTypeId(zyGoods.getClothsTypeId());
+ orderGoods.setStyleId(zyGoods.getStyleId());
+ orderGoods.setModelId(zyGoods.getModelId());
+ orderGoods.setUnit(zyGoods.getUnit());
+ orderGoods.setNumber(zyGoods.getNumber());
+ orderGoods.setUnitPrice(zyGoods.getUnitPrice());
+ orderGoods.setDiscount(zyGoods.getDiscount());
+ orderGoods.setPromotionPrice(zyGoods.getPromotionPrice());
+ orderGoods.setRecommend(zyGoods.getRecommend());
+ orderGoods.setPlaceOrigin(zyGoods.getPlaceOrigin());
+ orderGoods.setStatus(zyGoods.getStatus());
+ orderGoods.setTotalPrice(zyGoods.getUnitPrice()*orderGoodsJkList.get(j).getGoodsNum());
+ orderGoods.setPayTotalPrice(zyGoods.getPromotionPrice()*orderGoodsJkList.get(j).getGoodsNum());
+ zyOrderGoodsMapper.insert(orderGoods);
+ GoodsModule goodsModule = new GoodsModule();
+ QueryWrapper queryWrapperzsm = new QueryWrapper();
+ queryWrapperzsm.eq("goods_id",zyGoods.getId());
+ queryWrapperzsm.eq("style_id",zyGoods.getStyleId());
+ List listzsm = zyGoodsModuleMapper.selectList(queryWrapperzsm);
+ for (int k = 0 ; k < listzsm.size() ; k++){
+ OrderGoodsModule orderGoodsModule = new OrderGoodsModule();
+ orderGoodsModule.setOrderGoodsId(orderGoods.getId());
+ orderGoodsModule.setGoodsId(zyGoods.getId());
+ orderGoodsModule.setStyleId(zyGoods.getStyleId());
+ orderGoodsModule.setStyleModuleId(listzsm.get(k).getStyleModuleId());
+ orderGoodsModule.setModuleId(listzsm.get(k).getModuleId());
+ zyOrderGoodsModuleMapper.insert(orderGoodsModule);
+ }
+ GoodsFabric goodsFabric = new GoodsFabric();
+ QueryWrapper queryWrapperzsf =new QueryWrapper();
+ queryWrapperzsf.eq("goods_id",zyGoods.getId());
+ List listzsf = zyGoodsFabricMapper.selectList(queryWrapperzsf);
+ for (int o = 0 ; o < listzsf.size() ; o++){
+ OrderGoodsFabric orderGoodsFabric = new OrderGoodsFabric();
+ orderGoodsFabric.setOrderGoodsId(orderGoods.getId());
+ orderGoodsFabric.setGoodsId(zyGoods.getId());
+ orderGoodsFabric.setFabricId(listzsf.get(o).getFabricId());
+ zyOrderGoodsFabricMapper.insert(orderGoodsFabric);
+ }
+ GoodsAccessories goodsAccessories = new GoodsAccessories();
+ QueryWrapper queryWrapperzsa = new QueryWrapper();
+ queryWrapperzsa.eq("goods_id",zyGoods.getId());
+ List listzsa = zyGoodsAccessoriesMapper.selectList(queryWrapperzsa);
+ for (int p = 0 ; p < listzsa.size() ; p++){
+ OrderGoodsAccessories orderGoodsAccessories = new OrderGoodsAccessories();
+ orderGoodsAccessories.setOrderGoodsId(orderGoods.getId());
+ orderGoodsAccessories.setGoodsId(zyGoods.getId());
+ orderGoodsAccessories.setAccessoriesId(listzsa.get(p).getAccessoriesId());
+ zyOrderGoodsAccessoriesMapper.insert(orderGoodsAccessories);
+ }
+
+
+ }
+ List ids = new ArrayList<>();
+ ZyOrders zos = new ZyOrders();
+ QueryWrapper queryWrapperzos = new QueryWrapper();
+ queryWrapperzos.eq("order_id",zyOrders.getId());
+ List listzos = baseMapper.selectList(queryWrapperzos);
+ if(listzos.size()>0){
+ //return Result.error("该订单已经拆分,不可以再次拆单!");
+ return null;
+ }else{
+ OrderGoods orderGoods = new OrderGoods();
+ QueryWrapper queryWrapperog = new QueryWrapper();
+ queryWrapperog.eq("orders_id",zyOrders.getId());
+ List listog = zyOrderGoodsMapper.selectList(queryWrapperog);
+ if(listog.size()>0){
+ for (int i = 0 ; i < listog.size() ; i++){
+ ZyOrders zo = new ZyOrders();
+ zo = zyOrders;
+ zo.setId(null);
+ zo.setOrdersNum(getOrdersNum());
+ zo.setFreight(Double.parseDouble("0"));
+ zo.setIschild(1);
+ zo.setOrderId(zyOrders.getId());
+ zo.setMoney(listog.get(i).getTotalPrice());
+ zo.setPromotionPrice(listog.get(i).getPromotionPrice());
+ zo.setActualPayment(listog.get(i).getPayTotalPrice());
+ zo.setGoodsQuantity(1);
+ baseMapper.insert(zo);
+ ids.add(zo.getId());
+ OrderGoods og = new OrderGoods();
+ og = listog.get(i);
+ og.setOrdersId(zo.getId());
+ zyOrderGoodsMapper.updateById(og);
+ }
+ }
+ }
+ return ids;
+ }
+
+
+ /**
+ * 生成订单编号
+ *
+ * @param
+ * @return
+ */
+ public String getOrdersNum() {
+ String mrstr = "000000000000000000";
+ QueryWrapper qw=new QueryWrapper();
+ int listsize = baseMapper.selectCount(qw);
+ int strsize = listsize+1;
+ String str = strsize+"";
+ int strlength = str.length();
+ String substr = mrstr.substring(0,mrstr.length()-strlength);
+ String OrdersNum = substr+str;
+ return OrdersNum;
+ }
+
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/operationtool/entity/ZyOperationtool.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/operationtool/entity/ZyOperationtool.java
index c56c3346..adebaf2e 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/operationtool/entity/ZyOperationtool.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/operationtool/entity/ZyOperationtool.java
@@ -5,6 +5,7 @@ import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@@ -73,8 +74,9 @@ public class ZyOperationtool implements Serializable {
@Dict(dictTable = "zy_tool", dicText = "name", dicCode = "id")
@ApiModelProperty(value = "工具")
private String toolid;
-
+ @TableField (exist = false)
private String processCode;
+ @TableField(exist = false)
private String code;
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysUserController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysUserController.java
index 940d8184..8eec36a2 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysUserController.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysUserController.java
@@ -28,9 +28,20 @@ import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.util.JwtUtil;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.*;
+import org.jeecg.modules.demo.accessories.service.IZyAccessoriesService;
import org.jeecg.modules.demo.collecttype.entity.CollectType;
import org.jeecg.modules.demo.collecttype.service.ICollectTypeService;
+import org.jeecg.modules.demo.customerreceivingaddress.entity.CustomerReceivingAddress;
+import org.jeecg.modules.demo.fabric.service.IZyFabricService;
+import org.jeecg.modules.demo.goodsaccessories.entity.GoodsAccessories;
+import org.jeecg.modules.demo.goodsaccessories.service.IGoodsAccessoriesService;
+import org.jeecg.modules.demo.goodsfabric.entity.GoodsFabric;
+import org.jeecg.modules.demo.goodsfabric.service.IGoodsFabricService;
+import org.jeecg.modules.demo.ordergoods.entity.OrderGoods;
+import org.jeecg.modules.demo.ordergoods.service.IOrderGoodsService;
import org.jeecg.modules.demo.zygoods.entity.ZyGoods;
+import org.jeecg.modules.demo.zyorders.entity.ZyOrders;
+import org.jeecg.modules.demo.zyorders.service.IZyOrdersService;
import org.jeecg.modules.orderbymakeclothplan.service.ZyOrderService;
import org.jeecg.modules.system.entity.*;
import org.jeecg.modules.system.model.DepartIdModel;
@@ -44,6 +55,9 @@ import org.jeecg.modules.team.entity.Groupx;
import org.jeecg.modules.team.entity.Station;
import org.jeecg.modules.team.service.IGroupxService;
import org.jeecg.modules.team.service.IStationService;
+import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
+import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
+import org.jeecg.modules.zystylemodel.service.IZyStyleModelService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
@@ -112,6 +126,8 @@ public class SysUserController {
@Autowired
private IGroupxService iGroupxService;
+ @Autowired
+ private IZyOrdersService zyOrdersService;
@Value("${jeecg.path.upload}")
@@ -120,6 +136,21 @@ public class SysUserController {
@Resource
private BaseCommonService baseCommonService;
+ @Autowired
+ private IOrderGoodsService orderGoodsService;
+ @Autowired
+ private IZyClothsStyleService zyClothsStyleService;
+ @Autowired
+ private IZyStyleModelService zyStyleModelService;
+ @Autowired
+ private IGoodsFabricService goodsFabricService;
+ @Autowired
+ private IGoodsAccessoriesService goodsAccessoriesService;
+ @Autowired
+ private IZyAccessoriesService zyAccessoriesService;
+ @Autowired
+ private IZyFabricService zyFabricService;
+
/**
* 获取用户列表数据
*
@@ -1523,26 +1554,53 @@ public class SysUserController {
* @return
*/
@RequestMapping(value = "/findgoods", method = RequestMethod.GET)
- public Result> findgoods() {
+ public Result> findgoods(HttpServletRequest req) {
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
String userid = loginUser.getId();
- List gr1 = new ArrayList<>();
+ ZyOrders zyOrders = new ZyOrders();
+ QueryWrapper queryWrapperzos = QueryGenerator.initQueryWrapper(zyOrders, req.getParameterMap());
+ queryWrapperzos.eq("user_id",userid);
+ queryWrapperzos.eq("ischild",0);
+ List zyOrdersList = zyOrdersService.list(queryWrapperzos);
List gr2 = new ArrayList<>();
- gr1 =sysUserService.getallgr1(userid);
- for (int i=0;i queryWrapperogs = QueryGenerator.initQueryWrapper(orderGoods, req.getParameterMap());
+ queryWrapperogs.eq("orders_id",zyOrdersList.get(i).getId());
+ List orderGoodsList = orderGoodsService.list(queryWrapperogs);
+ g2.setUrl("http://localhost:10085/jeecg-boot/sys/common/static/"+orderGoodsList.get(0).getDefaultPicture());
+ g2.setName(orderGoodsList.get(0).getGoodsName());
+ g2.setType(zyClothsStyleService.getById(orderGoodsList.get(0).getStyleId()).getStyleNames());
+ ZyStyleModel zyStyleModel = new ZyStyleModel();
+ QueryWrapper queryWrapperzsm = QueryGenerator.initQueryWrapper(zyStyleModel, req.getParameterMap());
+ queryWrapperzsm.eq("style_id",orderGoodsList.get(0).getStyleId());
+ g2.setSize(zyStyleModelService.list(queryWrapperzsm).get(0).getModelNumber());
+ g2.setNum(orderGoodsList.get(0).getGoodsNum()+"");
+ g2.setPrice(orderGoodsList.get(0).getUnitPrice()+"");
+ //主辅料
+ GoodsFabric goodsFabric = new GoodsFabric();
+ QueryWrapper queryWrappergf = QueryGenerator.initQueryWrapper(goodsFabric, req.getParameterMap());
+ queryWrappergf.eq("goods_id",orderGoodsList.get(0).getGoodsId());
+ List listgf = goodsFabricService.list(queryWrappergf);
+ String zlstr = "";
+ for(int j = 0 ; j < listgf.size() ; j++){
+ zlstr = zlstr + zyFabricService.getById(listgf.get(j).getFabricId()).getName()+",";
+ }
+ GoodsAccessories goodsAccessories = new GoodsAccessories();
+ QueryWrapper queryWrapperga = QueryGenerator.initQueryWrapper(goodsAccessories, req.getParameterMap());
+ queryWrapperga.eq("goods_id",orderGoodsList.get(0).getGoodsId());
+ List listga = goodsAccessoriesService.list(queryWrapperga);
+ String flstr = "";
+ for(int k = 0 ; k < listga.size() ; k++){
+ flstr = flstr + zyAccessoriesService.getById(listga.get(k).getAccessoriesId()).getContents()+",";
+ }
+ g2.setMaterial(zlstr+flstr.substring(0,flstr.length()-1));
+ g2.setTotal(orderGoodsList.get(0).getPayTotalPrice()+"");
gr2.add(g2);
}
return Result.ok(gr2);
@@ -1554,11 +1612,75 @@ public class SysUserController {
获取个人中心的订单详情
*/
@RequestMapping(value = "/getdingdaninfo", method = RequestMethod.GET)
- public Result> findgoods(@RequestParam(name="id",required=true) String id) {
+ public Result> findgoods(@RequestParam(name="id",required=true) String id,HttpServletRequest req) {
//这个是获取订单的数据中的商品数据
Grzx1 g1 = new Grzx1();
- g1 = sysUserService.getallg2(id);
-
+ ZyOrders zyOrders = zyOrdersService.getById(id);
+ g1.setId(zyOrders.getId());
+ g1.setOrdersNum(zyOrders.getOrdersNum());
+ OrderGoods orderGoods = new OrderGoods();
+ QueryWrapper queryWrapperogs = QueryGenerator.initQueryWrapper(orderGoods, req.getParameterMap());
+ queryWrapperogs.eq("orders_id",zyOrders.getId());
+ List orderGoodsList = orderGoodsService.list(queryWrapperogs);
+ g1.setGoodsName(orderGoodsList.get(0).getGoodsName());
+ g1.setStyleNames(zyClothsStyleService.getById(orderGoodsList.get(0).getStyleId()).getStyleNames());
+ ZyStyleModel zyStyleModel = new ZyStyleModel();
+ QueryWrapper queryWrapperzsm = QueryGenerator.initQueryWrapper(zyStyleModel, req.getParameterMap());
+ queryWrapperzsm.eq("style_id",orderGoodsList.get(0).getStyleId());
+ g1.setModelNumber(zyStyleModelService.list(queryWrapperzsm).get(0).getModelNumber());
+ g1.setGoodsNum(orderGoodsList.get(0).getGoodsNum()+"");
+ GoodsFabric goodsFabric = new GoodsFabric();
+ QueryWrapper queryWrappergf = QueryGenerator.initQueryWrapper(goodsFabric, req.getParameterMap());
+ queryWrappergf.eq("goods_id",orderGoodsList.get(0).getGoodsId());
+ List listgf = goodsFabricService.list(queryWrappergf);
+ String zlstr = "";
+ for(int j = 0 ; j < listgf.size() ; j++){
+ zlstr = zlstr + zyFabricService.getById(listgf.get(j).getFabricId()).getName()+",";
+ }
+ GoodsAccessories goodsAccessories = new GoodsAccessories();
+ QueryWrapper queryWrapperga = QueryGenerator.initQueryWrapper(goodsAccessories, req.getParameterMap());
+ queryWrapperga.eq("goods_id",orderGoodsList.get(0).getGoodsId());
+ List listga = goodsAccessoriesService.list(queryWrapperga);
+ String flstr = "";
+ for(int k = 0 ; k < listga.size() ; k++){
+ flstr = flstr + zyAccessoriesService.getById(listga.get(k).getAccessoriesId()).getContents()+",";
+ }
+ g1.setName(zlstr+flstr.substring(0,flstr.length()-1));
+ g1.setDefaultPicture("http://localhost:10085/jeecg-boot/sys/common/static/"+orderGoodsList.get(0).getDefaultPicture());
+ g1.setPayTotalPrice(orderGoodsList.get(0).getPayTotalPrice()+"");
+ g1.setUnitPrice(orderGoodsList.get(0).getUnitPrice()+"");
+ g1.setCreateTime(zyOrders.getOrderTime());
+ g1.setCreateBy(sysUserService.getById(zyOrders.getUserId()).getRealname());
+ g1.setCityId(zyOrders.getCityId());
+ g1.setAddress(zyOrders.getAddress());
+ g1.setZipCode(zyOrders.getZipCode());
+ if (zyOrders.getDeliveryStatus()==0){
+ g1.setDeliveryStatus("未支付");
+ }
+ if (zyOrders.getDeliveryStatus()==1){
+ g1.setDeliveryStatus("已支付");
+ }
+ if (zyOrders.getDeliveryStatus()==2){
+ g1.setDeliveryStatus("待生产中");
+ }
+ if (zyOrders.getDeliveryStatus()==3){
+ g1.setDeliveryStatus("生产中");
+ }
+ if (zyOrders.getDeliveryStatus()==4){
+ g1.setDeliveryStatus("已发货");
+ }
+ if (zyOrders.getDeliveryStatus()==5){
+ g1.setDeliveryStatus("已到货");
+ }
+ if (zyOrders.getDeliveryStatus()==6){
+ g1.setDeliveryStatus("已签收");
+ }
+ if (zyOrders.getDeliveryStatus()==8){
+ g1.setDeliveryStatus("申请撤销");
+ }
+ if (zyOrders.getDeliveryStatus()==9){
+ g1.setDeliveryStatus("已撤销");
+ }
return Result.ok(g1);
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java
index fdcba34d..2e55dee0 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java
@@ -192,4 +192,8 @@ public interface SysUserMapper extends BaseMapper {
@Select("select id from customer_invoice where user_id =#{needuname}")
List getuserfapiao(String needuname);
+
+
+ @Select("select id from customer_measure where user_id =#{needuname}")
+ List getusermeasureId(String needuname);
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SysUserMapper.xml b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SysUserMapper.xml
index 86d17a59..f7d6319d 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SysUserMapper.xml
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SysUserMapper.xml
@@ -169,7 +169,7 @@
SELECT og.id, zo.orders_num , zg.goods_name , zcs.style_names,zsm.model_number,og.goods_num,zf.name,za.type_name,zg.default_picture,og.pay_total_price,og.unit_price,og.create_time,og.create_by ,
zo.delivery_status , zo.city_id ,zo.address,zo.zip_code,zo.user_id
FROM zy_orders AS zo
-INNER JOIN order_goods AS og ON zo.id = og.orders_id
+LEFT JOIN order_goods AS og ON zo.id = og.orders_id
LEFT JOIN zy_goods AS zg ON og.goods_id = zg.id
LEFT JOIN zy_cloths_style AS zcs ON og.style_id = zcs.id
LEFT JOIN zy_style_model AS zsm ON og.model_id = zsm.id
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java
index ba74cdb2..6ed62a9e 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java
@@ -580,11 +580,18 @@ public class SysUserServiceImpl extends ServiceImpl impl
String needuname = sysUser.getId();
List dizhi = userMapper.getuserdizhi(needuname);
List fapiao = userMapper.getuserfapiao(needuname);
+ List measureId = userMapper.getusermeasureId(needuname);
SysUserdfVO sdfvo = new SysUserdfVO();
sdfvo.setSysUser(sysUser);
sdfvo.setDizhi(dizhi);
sdfvo.setFapiao(fapiao);
- System.out.println(sdfvo);
+ //量体
+ if(measureId.size()>0)
+ {
+ sdfvo.setMeasureId(measureId.get((measureId.size()-1)));
+ }
+
+ //System.out.println(sdfvo);
return sdfvo;
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/vo/Grzx1.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/vo/Grzx1.java
index 3a265248..919f4b77 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/vo/Grzx1.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/vo/Grzx1.java
@@ -29,7 +29,7 @@ public class Grzx1 {
private String unitPrice;
//创建时间
- private String createTime;
+ private java.util.Date createTime;
//创建人
private String createBy;
//城市
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/vo/SysUserdfVO.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/vo/SysUserdfVO.java
index 323ae9d5..f59c2dda 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/vo/SysUserdfVO.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/vo/SysUserdfVO.java
@@ -1,7 +1,10 @@
package org.jeecg.modules.system.vo;
+import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
+import org.jeecg.common.aspect.annotation.Dict;
import org.jeecg.modules.system.entity.SysUser;
+import org.jeecgframework.poi.excel.annotation.Excel;
import java.util.List;
@@ -10,4 +13,8 @@ public class SysUserdfVO {
private SysUser sysUser;
private List fapiao;
private List dizhi;
+ /**顾客量体id*/
+ @Excel (name = "顾客量体id", width = 15, dictTable = "customer_measure", dicText = "username", dicCode = "id")
+ @ApiModelProperty (value = "顾客量体id")
+ private java.lang.String measureId;
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/service/IWorkOrderService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/service/IWorkOrderService.java
index e9324a14..9dba88c9 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/service/IWorkOrderService.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/service/IWorkOrderService.java
@@ -9,6 +9,8 @@ import org.jeecg.modules.demo.zyorders.entity.ZyOrders;
import org.jeecg.modules.workorder.entity.WorkOrder;
import org.jeecg.modules.workorder.entity.WorkOrderVo;
+import java.util.List;
+
/**
* @Description: 工单订单完工
* @Author: jeecg-boot
@@ -24,4 +26,6 @@ public interface IWorkOrderService extends IService {
Result> paidan(ZyOrders zyOrders,String depId);
Result> cancellationWorkOrder(WorkOrder woModel);
+
+ List jobPaidan(List orderIds);
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/service/impl/WorkOrderServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/service/impl/WorkOrderServiceImpl.java
index c8391043..34571342 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/service/impl/WorkOrderServiceImpl.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/service/impl/WorkOrderServiceImpl.java
@@ -6,7 +6,6 @@ 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.modules.demo.base.entity.ZyProcess;
import org.jeecg.modules.demo.base.mapper.ZyProcessMapper;
import org.jeecg.modules.demo.customermeasure.entity.CustomerMeasure;
import org.jeecg.modules.demo.customermeasure.mapper.CustomerMeasureMapper;
@@ -44,6 +43,8 @@ import org.jeecg.modules.productprocessaccessories.entity.ProductProcessAccessor
import org.jeecg.modules.productprocessaccessories.mapper.ProductProcessAccessoriesMapper;
import org.jeecg.modules.productprocessfabric.entity.ProductProcessFabric;
import org.jeecg.modules.productprocessfabric.mapper.ProductProcessFabricMapper;
+import org.jeecg.modules.system.entity.SysDepart;
+import org.jeecg.modules.system.mapper.SysDepartMapper;
import org.jeecg.modules.workorder.entity.WorkOrder;
import org.jeecg.modules.workorder.entity.WorkOrderVo;
import org.jeecg.modules.workorder.mapper.WorkOrderMapper;
@@ -77,6 +78,10 @@ public class WorkOrderServiceImpl extends ServiceImpl ogWrapper=new QueryWrapper();
ogWrapper.eq("orders_id",orderId);
List ogList=orderGoodsMapper.selectList(ogWrapper);
+ //工单
+ WorkOrder workOrder=new WorkOrder();
if(ogList.size()>0)
{//start if 02
// 保存工单
@@ -212,7 +221,7 @@ public class WorkOrderServiceImpl extends ServiceImpl styleModularLWrapper=new QueryWrapper();
- styleModularLWrapper.eq("type_id",ogModel.getStyleId());
+ styleModularLWrapper.eq("style_id",ogModel.getStyleId());
List zyStyleModularList=styleModularMapper.selectList(styleModularLWrapper);
//将工序保存到产品工序中
@@ -430,7 +439,7 @@ public class WorkOrderServiceImpl extends ServiceImpl jobPaidan(List orderIds) {
+ //获取生产部门
+ QueryWrapper queryWrapper=new QueryWrapper();
+ queryWrapper.eq("org_category",2);
+ List sysDepList = sysDepartMapper.selectList(queryWrapper);
+ if(sysDepList.size()>0)
+ {
+
+ List wordOderIds=new ArrayList<>();
+ //生产随机数,然后随机获取生产部门
+ int r=(int)Math.random() * sysDepList.size();
+ SysDepart dep=sysDepList.get(r);
+ for(String orderId:orderIds)
+ {
+ ZyOrders model=zyOrdersMapper.selectById(orderId);
+ Result result=this.paidan(model,dep.getId());
+ if (result.getCode().toString().equals("500"))
+ {
+ return null;
+ }
+ WorkOrder wo=(WorkOrder)result.getResult();
+ wordOderIds.add(wo.getId());
+ }
+ return wordOderIds;
+ }
+ return null;
+ }
+
//生成工单编号
@@ -532,4 +570,6 @@ public class WorkOrderServiceImpl extends ServiceImpl