From 6ec71c6b2e3dbf3dd0988a9cb9bf31a4b96c0ecc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=88=86=E7=B1=B3=E8=8A=B1?= <417727563@qq.com>
Date: Mon, 9 Jan 2023 15:41:25 +0800
Subject: [PATCH 1/3] =?UTF-8?q?2023-07-09-01-=E6=B4=BE=E5=8D=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../mall/clothSample/ZyClothSampleList.vue | 40 ++--
.../clothSample/modules/ZyClothSampleForm.vue | 39 +++-
.../ZyProductionOrderList.vue | 22 +-
.../zyWorkorderManagement/ZyWorkOrderList.vue | 10 +-
.../workdep/JSelectProductionDep.vue | 203 ++++++++++++++++++
.../controller/WorkOrderController.java | 80 ++++++-
.../zyclothsample/entity/ZyClothSample.java | 76 ++++---
7 files changed, 395 insertions(+), 75 deletions(-)
create mode 100644 ant-design-vue-jeecg/src/views/zyWorkorderManagement/workdep/JSelectProductionDep.vue
diff --git a/ant-design-vue-jeecg/src/views/mall/clothSample/ZyClothSampleList.vue b/ant-design-vue-jeecg/src/views/mall/clothSample/ZyClothSampleList.vue
index 0f0b9fe1..0104a486 100644
--- a/ant-design-vue-jeecg/src/views/mall/clothSample/ZyClothSampleList.vue
+++ b/ant-design-vue-jeecg/src/views/mall/clothSample/ZyClothSampleList.vue
@@ -146,32 +146,32 @@
align:"center",
dataIndex: 'nums'
},
- {
- title:'成衣名称',
- align:"center",
- dataIndex: 'clothName'
- },
- {
- title:'描述',
- align:"center",
- dataIndex: 'descr'
- },
+ // {
+ // title:'成衣名称',
+ // align:"center",
+ // dataIndex: 'clothName'
+ // },
+ // {
+ // title:'描述',
+ // align:"center",
+ // dataIndex: 'descr'
+ // },
{
title:'图片',
align:"center",
dataIndex: 'url',
scopedSlots: {customRender: 'imgSlot'}
},
- {
- title:'用户',
- align:"center",
- dataIndex: 'userId'
- },
- {
- title:'用户类型',
- align:"center",
- dataIndex: 'type'
- },
+ // {
+ // title:'用户',
+ // align:"center",
+ // dataIndex: 'userId'
+ // },
+ // {
+ // title:'用户类型',
+ // align:"center",
+ // dataIndex: 'type'
+ // },
{
title: '操作',
dataIndex: 'action',
diff --git a/ant-design-vue-jeecg/src/views/mall/clothSample/modules/ZyClothSampleForm.vue b/ant-design-vue-jeecg/src/views/mall/clothSample/modules/ZyClothSampleForm.vue
index f044b220..36ee0827 100644
--- a/ant-design-vue-jeecg/src/views/mall/clothSample/modules/ZyClothSampleForm.vue
+++ b/ant-design-vue-jeecg/src/views/mall/clothSample/modules/ZyClothSampleForm.vue
@@ -3,36 +3,61 @@
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
-
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ant-design-vue-jeecg/src/views/zyWorkorderManagement/ZyProductionOrderList.vue b/ant-design-vue-jeecg/src/views/zyWorkorderManagement/ZyProductionOrderList.vue
index 5536562f..89ea75bf 100644
--- a/ant-design-vue-jeecg/src/views/zyWorkorderManagement/ZyProductionOrderList.vue
+++ b/ant-design-vue-jeecg/src/views/zyWorkorderManagement/ZyProductionOrderList.vue
@@ -155,6 +155,7 @@
+
@@ -164,6 +165,7 @@
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ZyOrdersModal from '@/views/zyorders/modules/ZyOrdersModal'
+ import JSelectProductionDep from './workdep/JSelectProductionDep'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import Area from '@/components/_util/Area'
import { httpAction, getAction } from '@/api/manage'
@@ -172,7 +174,8 @@
name: 'ZyProductionOrderList',
mixins:[JeecgListMixin, mixinDevice],
components: {
- ZyOrdersModal
+ ZyOrdersModal,
+ JSelectProductionDep
},
data () {
return {
@@ -376,7 +379,7 @@
deleteBatch: "/zyorders/zyOrders/deleteBatch",
exportXlsUrl: "/zyorders/zyOrders/exportXls",
importExcelUrl: "zyorders/zyOrders/importExcel",
- paidan:"/workorder/workOrder/paidan",
+ paidan:"/workOrder/workOrder/paidan",
},
dictOptions:{},
@@ -395,7 +398,20 @@
},
methods: {
paidan(record){
- getAction(this.url.paidan,{id:record.id}).then((res) => {
+ this.$refs.productionForm.showModal(record.id)
+
+ // getAction(this.url.paidan,{id:record.id}).then((res) => {
+ // if (res.success) {
+ // this.$message.success("派单成功!");
+ // this.loadData();
+ // }else{
+ // this.$message.error(res.message);
+ // }
+ // })
+ },
+ paidanFormOk(orderId,depId) {
+ // 新增/修改 成功时,重载列表
+ getAction(this.url.paidan,{'orderId':orderId,'depId':depId}).then((res) => {
if (res.success) {
this.$message.success("派单成功!");
this.loadData();
diff --git a/ant-design-vue-jeecg/src/views/zyWorkorderManagement/ZyWorkOrderList.vue b/ant-design-vue-jeecg/src/views/zyWorkorderManagement/ZyWorkOrderList.vue
index 786379cc..3515ade4 100644
--- a/ant-design-vue-jeecg/src/views/zyWorkorderManagement/ZyWorkOrderList.vue
+++ b/ant-design-vue-jeecg/src/views/zyWorkorderManagement/ZyWorkOrderList.vue
@@ -185,11 +185,11 @@
}
],
url: {
- list: "/workorder/workOrder/workList",
- delete: "/workorder/workOrder/delete",
- deleteBatch: "/workorder/workOrder/deleteBatch",
- exportXlsUrl: "/workorder/workOrder/exportXls",
- importExcelUrl: "workorder/workOrder/importExcel",
+ list: "/workOrder/workOrder/workList",
+ delete: "/workOrder/workOrder/delete",
+ deleteBatch: "/workOrder/workOrder/deleteBatch",
+ exportXlsUrl: "/workOrder/workOrder/exportXls",
+ importExcelUrl: "workOrder/workOrder/importExcel",
},
dictOptions:{},
diff --git a/ant-design-vue-jeecg/src/views/zyWorkorderManagement/workdep/JSelectProductionDep.vue b/ant-design-vue-jeecg/src/views/zyWorkorderManagement/workdep/JSelectProductionDep.vue
new file mode 100644
index 00000000..9ac09076
--- /dev/null
+++ b/ant-design-vue-jeecg/src/views/zyWorkorderManagement/workdep/JSelectProductionDep.vue
@@ -0,0 +1,203 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 无图片
+
+
+
+ 无文件
+
+ 下载
+
+
+
+
+ 详情
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/controller/WorkOrderController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/controller/WorkOrderController.java
index b6184ec5..4a265df2 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/controller/WorkOrderController.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/controller/WorkOrderController.java
@@ -23,10 +23,14 @@ 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.system.entity.SysDepart;
+import org.jeecg.modules.system.service.ISysDepartService;
import org.jeecg.modules.workorder.entity.WorkOrder;
import org.jeecg.modules.workorder.service.IWorkOrderService;
import org.jeecg.modules.workproduct.entity.ZyProduct;
import org.jeecg.modules.workproduct.service.IZyProductService;
+import org.jeecg.modules.zyclothsample.entity.ZyClothSample;
+import org.jeecg.modules.zyclothsample.service.IZyClothSampleService;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
@@ -84,6 +88,14 @@ public class WorkOrderController extends JeecgController queryPageJSelectPDList(SysDepart sysDepart,
+ @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+ @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+ HttpServletRequest req) {
+ QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(sysDepart, req.getParameterMap());
+ Page page = new Page(pageNo, pageSize);
+ queryWrapper.eq("org_type",1);
+ queryWrapper.eq("org_category",2);
+ IPage pageList = sysDepartService.page(page, queryWrapper);
+ return Result.OK(pageList);
+ }
+
/**
* 派单(讲订单转为工单)
*
@@ -261,8 +298,8 @@ public class WorkOrderController extends JeecgController paidan(@RequestParam(name="id",required=true) String id,HttpServletRequest req) {
- ZyOrders zyOrders = zyOrdersService.getById(id);
+ public Result> paidan(@RequestParam(name="orderId",required=true) String orderId,@RequestParam(name="depId",required=true) String depId,HttpServletRequest req) {
+ ZyOrders zyOrders = zyOrdersService.getById(orderId);
if(zyOrders==null) {
return Result.error("未找到对应数据!");
}else{
@@ -273,30 +310,44 @@ public class WorkOrderController extends JeecgController ogWrapper=new QueryWrapper();
- ogWrapper.eq("orders_id",id);
+ ogWrapper.eq("orders_id",orderId);
List ogList=orderGoodsService.list(ogWrapper);
if(ogList.size()>0)
{//start if 02
// 保存工单
OrderGoods ogModel=ogList.get(0);
+
//服装款式
//QueryWrapper csWrapper=new QueryWrapper();
ZyClothsStyle csModel=zyClothsStyleService.getById(ogModel.getStyleId());
//服装型号
//QueryWrapper sm=new QueryWrapper();
ZyStyleModel smModel=zyStyleModelService.getById(ogModel.getModelId());
+ if(csModel==null ||smModel==null)
+ {
+ return Result.error("该订单服装型号或服装款式不存在,请检查后在操作!");
+ }
+ //得到结构图和排排料图
+ QueryWrapper csWrapper=new QueryWrapper();
+ csWrapper.eq("style_id",ogModel.getStyleId());
+ csWrapper.eq("stylemodel_id",ogModel.getModelId());
+ List csList=zyClothSampleService.list(csWrapper);
+// if(csList.size()<=0)
+// {
+// return Result.error("商品成衣样板不存在,请检查后在操作!");
+// }
+// ZyClothSample cSampleModel=csList.get(0);
+
int goodNum=ogModel.getGoodsNum();
WorkOrder workOrder=new WorkOrder();
workOrder.setProductCode(CreateWorkCode(csModel.getNums(),smModel.getModelNumber()));//工单编号
- workOrder.setOrdersId(id);//订单id
+ workOrder.setOrdersId(orderId);//订单id
workOrder.setOrderGoodsId(ogModel.getId());// 订单商品
workOrder.setGoodsNum(goodNum);//商品数量
workOrder.setOrderTime(zyOrders.getOrderTime());//下单时间
workOrder.setDeliveryTime(zyOrders.getDeliveryTime());//交货期
workOrder.setWorkOrderStatus(0);//工单状态
-
- //暂时存疑
- //workOrder.setEnterprisesId();//企业id
+ workOrder.setEnterprisesId(depId);//企业id
workOrderService.save(workOrder);
//保存产品
@@ -307,6 +358,8 @@ public class WorkOrderController extends JeecgController
Date: Mon, 9 Jan 2023 15:41:38 +0800
Subject: [PATCH 2/3] 2023-1-9sample
---
.../views/zyclothsample/ZyClothSampleList.vue | 2 +-
.../modules/ZyClothSampleForm.vue | 14 +++++------
.../device/controller/ZyDeviceController.java | 19 +-------------
.../impl/ZyPlanProcessServiceImpl.java | 2 +-
.../zyclothsample/entity/ZyClothSample.java | 25 ++++++++++++-------
.../controller/ZyDevicebrandController.java | 2 +-
.../controller/ZyDevicemodelController.java | 2 +-
.../controller/ZyDevicetypeController.java | 2 +-
8 files changed, 29 insertions(+), 39 deletions(-)
diff --git a/ant-design-vue-jeecg/src/views/zyclothsample/ZyClothSampleList.vue b/ant-design-vue-jeecg/src/views/zyclothsample/ZyClothSampleList.vue
index d3dcca18..139a80d0 100644
--- a/ant-design-vue-jeecg/src/views/zyclothsample/ZyClothSampleList.vue
+++ b/ant-design-vue-jeecg/src/views/zyclothsample/ZyClothSampleList.vue
@@ -217,7 +217,7 @@ export default {
{
title: '企业',
align: "center",
- dataIndex: 'userId_dictText'
+ dataIndex: 'enterpriseId_dictText'
},
{
title: '创建时间',
diff --git a/ant-design-vue-jeecg/src/views/zyclothsample/modules/ZyClothSampleForm.vue b/ant-design-vue-jeecg/src/views/zyclothsample/modules/ZyClothSampleForm.vue
index cdf42a2e..af5aa95c 100644
--- a/ant-design-vue-jeecg/src/views/zyclothsample/modules/ZyClothSampleForm.vue
+++ b/ant-design-vue-jeecg/src/views/zyclothsample/modules/ZyClothSampleForm.vue
@@ -5,7 +5,7 @@
-
+
@@ -152,11 +152,11 @@ export default {
},
//
kuanshi(){
- this.dict="zy_cloths_style,style_names,nums,enterprise_id="+"'"+this.model.userId+"'";
+ this.dict="zy_cloths_style,style_names,nums,enterprise_id="+"'"+this.model.enterpriseId+"'";
this.model.styleId=null
},
xiugai(){
- if(this.model.stylemodelId!=null&&this.model.userId!=null){
+ if(this.model.stylemodelId!=null&&this.model.enterpriseId!=null){
this.gaibian()
}
},
@@ -165,11 +165,11 @@ export default {
console.log(this.model)
getAction(this.url.sort,this.model).then((res)=>{
console.log(res)
- if(this.model.id!=null){
- var num=parseInt(res.result,10)
- }else{
+ if(this.model.id==null||parseInt(res.result,10)==0){
var num=parseInt(res.result,10)+1
+ }else{
+ var num=parseInt(res.result,10)
}
num=num.toString()
while(num.length
Date: Mon, 9 Jan 2023 17:07:19 +0800
Subject: [PATCH 3/3] 2023-1-9sample
---
.../modules/ZyClothSampleForm.vue | 55 ++++++++++++++-----
.../controller/ZyClothSampleController.java | 15 ++++-
.../zyclothsample/entity/ZyClothSample.java | 4 +-
.../mapper/ZyClothSampleMapper.java | 6 ++
.../service/IZyClothSampleService.java | 4 ++
.../impl/ZyClothSampleServiceImpl.java | 10 ++++
.../zystylemodel/entity/ZyStyleModel.java | 3 +
7 files changed, 77 insertions(+), 20 deletions(-)
diff --git a/ant-design-vue-jeecg/src/views/zyclothsample/modules/ZyClothSampleForm.vue b/ant-design-vue-jeecg/src/views/zyclothsample/modules/ZyClothSampleForm.vue
index af5aa95c..e5f6f3ba 100644
--- a/ant-design-vue-jeecg/src/views/zyclothsample/modules/ZyClothSampleForm.vue
+++ b/ant-design-vue-jeecg/src/views/zyclothsample/modules/ZyClothSampleForm.vue
@@ -3,28 +3,47 @@
-
-
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
-
+
+ :dictCode="modenumber" @change="gaibian">
+
+
+
+
+
+
@@ -90,7 +109,8 @@ export default {
model: {
nums:'',
},
- dict:"zy_cloths_style,style_names,nums",
+ dict:"zy_cloths_style,style_names,id",
+ modenumber:'zy_style_model,model_number,id',
labelCol: {
xs: {span: 24},
sm: {span: 5},
@@ -152,30 +172,34 @@ export default {
},
//
kuanshi(){
- this.dict="zy_cloths_style,style_names,nums,enterprise_id="+"'"+this.model.enterpriseId+"'";
+ this.dict="zy_cloths_style,style_names,id,enterprise_id="+"'"+this.model.enterpriseId+"'";
this.model.styleId=null
+ this.model.nums=null
},
xiugai(){
- if(this.model.stylemodelId!=null&&this.model.enterpriseId!=null){
- this.gaibian()
- }
+ this.modenumber="zy_style_model,model_number,id,style_id="+"'"+this.model.styleId+"'"
+ this.model.stylemodelId=null
+ this.model.nums=null
+ // if(this.model.stylemodelId!=null&&this.model.enterpriseId!=null){
+ // this.gaibian()
+ // }
},
gaibian(){
var n=3;
console.log(this.model)
getAction(this.url.sort,this.model).then((res)=>{
- console.log(res)
- if(this.model.id==null||parseInt(res.result,10)==0){
- var num=parseInt(res.result,10)+1
+ console.log(res.result[1])
+ if(this.model.id==null||parseInt(res.result[1],10)==0){
+ var num=parseInt(res.result[1],10)+1
}else{
- var num=parseInt(res.result,10)
+ var num=parseInt(res.result[1],10)
}
num=num.toString()
while(num.length sort(ZyClothSample zyClothSample) {
String s=zyClothSampleService.findSort(zyClothSample.getStyleId(),zyClothSample.getStylemodelId());
+ String code=zyClothSampleService.findCode(zyClothSample.getStylemodelId());
+ String styleId=zyClothSampleService.findStyleNums(zyClothSample.getStyleId());
+ List list=new ArrayList<>();
+ list.add(code);
+
if(s==null){
- return Result.OK(0);
- }else
- return Result.OK(s.substring(21));
+ list.add("0");
+ }else{
+ list.add(s.substring(21));
+ }
+ list.add(styleId);
+ return Result.OK(list);
}
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/entity/ZyClothSample.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/entity/ZyClothSample.java
index a294e9d6..cc727712 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/entity/ZyClothSample.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/entity/ZyClothSample.java
@@ -64,12 +64,12 @@ public class ZyClothSample implements Serializable {
*/
@Excel(name = "款式", width = 15)
@ApiModelProperty(value = "款式")
- @Dict(dicCode = "nums",dictTable = "zy_cloths_style",dicText = "style_names")
+ @Dict(dicCode = "id",dictTable = "zy_cloths_style",dicText = "style_names")
private String styleId;
/**型号*/
@Excel(name = "型号", width = 15)
@ApiModelProperty(value = "型号")
- @Dict(dicCode = "modenumber", dictTable = "", dicText = "")
+ @Dict(dicCode = "id", dictTable = "zy_style_model", dicText = "model_number")
private String stylemodelId;
/**管理模块样板*/
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/mapper/ZyClothSampleMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/mapper/ZyClothSampleMapper.java
index e77c0c66..1951d03f 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/mapper/ZyClothSampleMapper.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/mapper/ZyClothSampleMapper.java
@@ -18,4 +18,10 @@ public interface ZyClothSampleMapper extends BaseMapper {
@Select("select nums from zy_cloth_sample where style_id=#{styleId} and stylemodel_id=#{stylemodelId} order by nums desc limit 0,1")
String findSort(@Param("styleId") String styleId, @Param("stylemodelId") String stylemodelId);
+
+ @Select("select model_code from zy_style_model where id=#{stylemodelId}")
+ String findCode(String stylemodelId);
+
+ @Select("select nums from zy_cloths_style where id=#{styleId}")
+ String findNums(String styleId);
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/service/IZyClothSampleService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/service/IZyClothSampleService.java
index 8c63f4cd..370380bd 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/service/IZyClothSampleService.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/service/IZyClothSampleService.java
@@ -12,4 +12,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
public interface IZyClothSampleService extends IService {
String findSort(String styleId, String stylemodelId);
+
+ String findCode(String stylemodelId);
+
+ String findStyleNums(String styleId);
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/service/impl/ZyClothSampleServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/service/impl/ZyClothSampleServiceImpl.java
index 9752a8f9..2efb511b 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/service/impl/ZyClothSampleServiceImpl.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/service/impl/ZyClothSampleServiceImpl.java
@@ -23,4 +23,14 @@ public class ZyClothSampleServiceImpl extends ServiceImpl