zhc4dev
喻忠伟 2 years ago
parent bf194a1dba
commit d1cfef3e27
  1. 4
      ant-design-vue-jeecg/src/main.js
  2. 4
      ant-design-vue-jeecg/src/views/system/Depart3List.vue
  3. 6
      ant-design-vue-jeecg/src/views/system/modules/DepartModal.vue
  4. 6
      ant-design-vue-jeecg/src/views/zyWorkorderManagement/ZyWorkOrderList.vue
  5. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/controller/WorkOrderController.java
  6. 73
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/service/impl/WorkOrderServiceImpl.java

@ -12,8 +12,8 @@ import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import './views/shopping/assets/iconfont/iconfont.css'//引入商城所需图标
// YU-优化
require('@jeecg/antd-online-mini')
require('@jeecg/antd-online-mini/dist/OnlineForm.css')
// require('@jeecg/antd-online-mini')
// require('@jeecg/antd-online-mini/dist/OnlineForm.css')
// 引入 按需组件的统一引入文件
//import './components/use'
import Antd, { version } from 'ant-design-vue'

@ -158,7 +158,7 @@
<!--</template>-->
<template v-if="orgTypeDisabled">
<!--<template v-if="orgTypeDisabled">-->
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
@ -171,7 +171,7 @@
label="地址">
<a-input placeholder="请输入地址" v-decorator="['address', {'initialValue':''}]"/>
</a-form-item>
</template>
<!--</template>-->
<a-form-item

@ -87,11 +87,11 @@
label="排序">
<a-input-number v-decorator="[ 'departOrder',{'initialValue':0}]"/>
</a-form-item>
<template v-if="seen">
<!--<template v-if="seen">-->
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="电话">
label="手机号">
<a-input placeholder="请输入电话" v-decorator="['mobile',validatorRules.mobile]"/>
</a-form-item>
<a-form-item
@ -100,7 +100,7 @@
label="地址">
<a-input placeholder="请输入地址" v-decorator="['address', {}]"/>
</a-form-item>
</template>
<!--</template>-->
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"

@ -204,8 +204,8 @@
delete: "/workOrder/workOrder/delete",
deleteBatch: "/workOrder/workOrder/deleteBatch",
exportXlsUrl: "/workOrder/workOrder/exportXls",
importExcelUrl: "workOrder/workOrder/importExcel",
cancellationWorkOrderUrl:"workOrder/workOrder/cancellationWorkOrder",
importExcelUrl: "/workOrder/workOrder/importExcel",
cancellationWorkOrderUrl:"/workOrder/workOrder/cancellationWorkOrder",
},
dictOptions:{},
}
@ -233,7 +233,7 @@
},
//
cancellationWorkOrder(workId) {
// /
getAction(this.url.cancellationWorkOrderUrl,{'id':workId}).then((res) => {
if (res.success) {
this.$message.success("撤销成功!");

@ -278,7 +278,7 @@ public class WorkOrderController extends JeecgController<WorkOrder, IWorkOrderSe
HttpServletRequest req) {
QueryWrapper<SysDepart> queryWrapper = QueryGenerator.initQueryWrapper(sysDepart, req.getParameterMap());
Page<SysDepart> page = new Page<SysDepart>(pageNo, pageSize);
queryWrapper.eq("org_type",1);
// queryWrapper.eq("org_type",1);
queryWrapper.eq("org_category",2);
IPage<SysDepart> pageList = sysDepartService.page(page, queryWrapper);
return Result.OK(pageList);

@ -2,6 +2,7 @@ package org.jeecg.modules.workorder.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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;
@ -173,6 +174,8 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
if(ogList.size()>0)
{//start if 02
// 保存工单
//获取订单商品
OrderGoods ogModel=ogList.get(0);
//服装款式
@ -199,6 +202,7 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
}
ZyClothSample cSampleModel=csList.get(0);
//生成工单
int goodNum=ogModel.getGoodsNum();
WorkOrder workOrder=new WorkOrder();
workOrder.setProductCode(CreateWorkCode(csModel.getNums(),smModel.getModelNumber()));//工单编号
@ -210,8 +214,9 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
workOrder.setWorkOrderStatus(0);//工单状态
workOrder.setEnterprisesId(depId);//企业id
baseMapper.insert(workOrder);
//保存产品
if(ogModel.getGoodsNum()>0)
if(goodNum>0)
{
//量体数据
CustomerMeasure mesureModel=customerMeasureMapper.selectById(ogModel.getMeasureId());
@ -219,7 +224,7 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
return Result.error("未找到对客户量体数据!");
}
//商品数量对应产品
//#region 商品数量对应产品 保存产品
for(int i=0;i<goodNum;i++)
{
ZyProduct productModel=new ZyProduct();
@ -312,13 +317,6 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
//zyProductProcessService.save()
//#endregion
//#region 工具-添加(服装款式类型中读取)
//#endregion
//#region 设备-添加(服装款式类型中读取)
//#endregion
//#region 产品模块-添加(从订单中读取)
//订单商品模块表-根据订单商品id
@ -382,7 +380,10 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
// productAccessoriesMapper.saveBatch(productAccessoriesList);
//#endregion
}
}else
//#endregion
}
else
{
return Result.error("订单商品数量小于0!");
@ -405,13 +406,57 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
*/
@Override
public Result<?> cancellationWorkOrder(WorkOrder woModel) {
//根据工单获取产品列表,然后循环删除产品列表中的工序,以及工序对应的设备、工具,再删除产品中对应模块、面料、辅料
//ZyProduct
//工单
//-产品
//-工序
//-产品
QueryWrapper<ZyProduct> productWrapper = new QueryWrapper<ZyProduct>();
productWrapper.eq("work_order_id", woModel.getId());
List<ZyProduct> productList = productMapper.selectList(productWrapper);
for (ZyProduct model:productList)
{
//-工序
QueryWrapper<ZyProductProcess> productProcessWrapper = new QueryWrapper<ZyProductProcess>();
productProcessWrapper.eq("product_id",model.getId());
productProcessMapper.delete(productProcessWrapper);
//-工具
QueryWrapper<ProductOperationtool> productOperationtoolWrapper = new QueryWrapper<ProductOperationtool>();
productOperationtoolWrapper.eq("product_id",model.getId());
productOperationtoolMapper.delete(productOperationtoolWrapper);
//-设备
QueryWrapper<ProductMachine> productMachineWrapper = new QueryWrapper<ProductMachine>();
productMachineWrapper.eq("product_id",model.getId());
productMachineMapper.delete(productMachineWrapper);
//产品模块
QueryWrapper<ProductModule> productModuleWrapper = new QueryWrapper<ProductModule>();
productModuleWrapper.eq("product_id",model.getId());
productModuleMapper.delete(productModuleWrapper);
//产品面料
QueryWrapper<ProductFabric> productFabricWrapper = new QueryWrapper<ProductFabric>();
productFabricWrapper.eq("product_id",model.getId());
productFabricMapper.delete(productFabricWrapper);
//产品面料
QueryWrapper<ProductAccessories> productAccessoriesWrapper = new QueryWrapper<ProductAccessories>();
productAccessoriesWrapper.eq("product_id",model.getId());
productAccessoriesMapper.delete(productAccessoriesWrapper);
}
return null;
//修改订单
UpdateWrapper updateWrapper = new UpdateWrapper();
updateWrapper.eq("id", woModel.getOrdersId());
updateWrapper.set("delivery_status", 2);
int update = zyOrdersMapper.update(null, updateWrapper);
//产品
productMapper.delete(productWrapper);
//工单
baseMapper.deleteById(woModel.getId());
return Result.OK("成功");
}

Loading…
Cancel
Save