From d51bed698c459cf93d101bb6da5a5a7fe1d81db1 Mon Sep 17 00:00:00 2001
From: mors <3067699729@qq.com>
Date: Fri, 6 Jan 2023 17:32:12 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=A7=E5=93=81=E7=AE=A1?=
=?UTF-8?q?=E7=90=86=E9=83=A8=E5=88=86=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/components/jeecg/JVxeTable/index.js | 4 +-
.../views/zyclothsample/ZyClothSampleList.vue | 2 +-
.../views/zystylemodel/ZyStyleModelList.vue | 107 ++++++++++++++----
.../zyStyleModular/entity/ZyStyleModular.java | 16 +--
.../demo/base/entity/ZyClothsComponent.java | 8 +-
.../base/entity/ZyClothsModularCompent.java | 28 ++---
.../ZyProcessComponentController.java | 16 +--
.../demo/pro/entity/ZyProcessComponent.java | 10 +-
.../impl/ZyProcessComponentServiceImpl.java | 14 +--
.../entity/ZyStyleAccessories.java | 16 +--
.../jeecg/modules/maker/entity/ZyMaker.java | 6 +-
.../productModule/entity/ProductModule.java | 36 +++---
.../entity/ZyProcessModular.java | 28 ++---
.../mapper/ZyStyleFabricMapper.java | 2 +
.../controller/ZyStyleModelController.java | 59 ++++------
.../zystylemodel/entity/ZyStyleModel.java | 6 +-
.../service/impl/ZyStyleModelServiceImpl.java | 4 +-
17 files changed, 204 insertions(+), 158 deletions(-)
diff --git a/ant-design-vue-jeecg/src/components/jeecg/JVxeTable/index.js b/ant-design-vue-jeecg/src/components/jeecg/JVxeTable/index.js
index e325327d..b6c9b6ca 100644
--- a/ant-design-vue-jeecg/src/components/jeecg/JVxeTable/index.js
+++ b/ant-design-vue-jeecg/src/components/jeecg/JVxeTable/index.js
@@ -30,8 +30,8 @@ export const AllCells = {
...mapCell(JVXETypes.select, JVxeSelectCell),
...mapCell(JVXETypes.selectSearch, JVxeSelectCell), // 下拉搜索
...mapCell(JVXETypes.selectMultiple, JVxeSelectCell), // 下拉多选
- ...mapCell(JVXETypes.date, JVxeDateCell),
- ...mapCell(JVXETypes.datetime, JVxeDateCell),
+ ...mapCell(JVXETypes.date, JVxeDateCell),//yyyy-MM-dd 弹出日历提供选择 有日期没有时间
+ ...mapCell(JVXETypes.datetime, JVxeDateCell),//yyyy-MM-dd HH:mm:ss 弹出日历提供选择 有日期有时间
...mapCell(JVXETypes.upload, JVxeUploadCell),
...mapCell(JVXETypes.textarea, JVxeTextareaCell),
diff --git a/ant-design-vue-jeecg/src/views/zyclothsample/ZyClothSampleList.vue b/ant-design-vue-jeecg/src/views/zyclothsample/ZyClothSampleList.vue
index 92c18b29..d3dcca18 100644
--- a/ant-design-vue-jeecg/src/views/zyclothsample/ZyClothSampleList.vue
+++ b/ant-design-vue-jeecg/src/views/zyclothsample/ZyClothSampleList.vue
@@ -108,7 +108,7 @@
- // TODO: 跳转到模块样板
+
模块样板
diff --git a/ant-design-vue-jeecg/src/views/zystylemodel/ZyStyleModelList.vue b/ant-design-vue-jeecg/src/views/zystylemodel/ZyStyleModelList.vue
index a632b523..b82a502c 100644
--- a/ant-design-vue-jeecg/src/views/zystylemodel/ZyStyleModelList.vue
+++ b/ant-design-vue-jeecg/src/views/zystylemodel/ZyStyleModelList.vue
@@ -1,20 +1,20 @@
+
+ {{biaoTi}}
-
-
-
-
+
+
+
+
- {{biaoTi}}
-
-
-
-
-
+
+
+
+
- 返回
+
+
+ 返回
+
+
+
+
+
+
+
- 保存
-
+
+
详情
@@ -82,9 +92,9 @@ export default {
btn: ['add'],
},
validatorRules: {
- styleId: [
- {required: true, message: '请选择服装类型!'},
- ],
+ // styleId: [
+ // {required: true, message: '请选择服装类型!'},
+ // ],
},
// 是否正在加载
loading: false,
@@ -113,22 +123,25 @@ export default {
key: 'styleId',
type: JVXETypes.select,
placeholder: '请输入${title}',
- dictCode: 'zy_cloths_style,style_names,id',
- validateRules: [{required: true, message: '${title}不能为空'}]
+ //dictCode: 'zy_cloths_style,style_names,id',
+ validateRules: [
+ {required: true, message: '${title}不能为空'},
+ ],
+ disabled: true,
},
{
title: '是否默认尺码',
align: "center",
- width: '150px',
+ width: '50px',
key: 'isdefault',
type: JVXETypes.select,
dictCode: 'isdefault',
defaultValue: 0,
},
{key: 'modelNumber', title: '型号编码', dictCode: 'modenumber', width: '120px', type: JVXETypes.select},
- {key: 'size', title: '码数', width: '100px', dictCode: 'size', type: JVXETypes.select},
- {key: 'anumbers', title: '型', width: '100px', dictCode: 'hsize', type: JVXETypes.select},
- {key: 'bnumbers', title: '号', width: '100px', dictCode: 'xsize', type: JVXETypes.select},
+ {key: 'size', title: '码数', width: '90px', dictCode: 'size', type: JVXETypes.select},
+ {key: 'anumbers', title: '型', width: '80px', dictCode: 'hsize', type: JVXETypes.select},
+ {key: 'bnumbers', title: '号', width: '80px', dictCode: 'xsize', type: JVXETypes.select},
{key: 'collarLarge', title: '领大', width: '80px', type: JVXETypes.input},
{key: 'bust', title: '胸围', width: '80px', type: JVXETypes.input},
{key: 'sleeveLength', title: '袖长', width: '80px', type: JVXETypes.input},
@@ -138,13 +151,14 @@ export default {
{key: 'cuff', title: '袖口', width: '80px', type: JVXETypes.input},
{key: 'waistline', title: '腰围', width: '80px', type: JVXETypes.input},
{key: 'hem', title: '下摆', width: '80px', type: JVXETypes.input},
+ {key: 'createTime', title: '创建时间', width: '100px', type: JVXETypes.datetime},
{
title: '操作',
key: 'action',
type: JVXETypes.slot,
fixed: 'right',
- minWidth: '100px',
+ minWidth: '80px',
align: 'center',
slotName: 'action',
}
@@ -159,6 +173,7 @@ export default {
importExcelUrl: "zystylemodel/zyStyleModel/importExcel",
},
//参数
+ styleId: '',
loadRouteType: false,
id: null,
rowId: '',
@@ -178,6 +193,46 @@ export default {
},
},
methods: {
+
+ //新增触发事件
+ added(event){
+ //this.styleId = this.$route.query.id;
+ event.row.styleId = this.$route.query.id;
+ console.log("新增触发事件", event)
+ let httpUrl = this.url.add;
+ let method = 'post';
+ //httpUrl += this.url.add;
+ //method = 'post';
+ httpAction(httpUrl, event.row, method).then((res) => {
+ if (res.success) {
+ this.$message.success(res.message);
+ this.$emit('ok');
+ } else {
+ this.$message.warning(res.message);
+ }
+ })
+ },
+ //数据发生变化时事件
+ handleValueChange(event) {
+
+ //this.submitForm(event)
+ console.log("//数据发生变化时事件", event);
+ //const str = event.row.id;
+ let httpUrl = '';
+ let method = '';
+
+ httpUrl += this.url.edit;
+ method = 'put';
+
+ httpAction(httpUrl, event.row, method).then((res) => {
+ if (res.success) {
+ this.$message.success(res.message);
+ this.$emit('ok');
+ } else {
+ this.$message.warning(res.message);
+ }
+ })
+ },
// 详情
viewDetail(id) {
this.$refs.ZyStyleModelListDetails.showModal(id)
@@ -234,8 +289,9 @@ export default {
loadParameter() {
if (this.loadRouteType === false) {
this.id = this.$route.query.id;
+ //this.styleId = this.id;
this.biaoTi = this.$route.query.styleNames + "款式型号管理";
- console.log("**********传递到此层的id:" + this.id);
+ //console.log("**********传递到此层的id:" + this.id);
this.loadRouteType = true;
}
},
@@ -271,6 +327,7 @@ export default {
this.loading = false
})
},
+
// 当分页参数变化时触发的事件
handlePageChange(event) {
// 重新赋值
diff --git a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/entity/ZyStyleModular.java b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/entity/ZyStyleModular.java
index f697df02..99e97886 100644
--- a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/entity/ZyStyleModular.java
+++ b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/entity/ZyStyleModular.java
@@ -43,14 +43,14 @@ public class ZyStyleModular implements Serializable {
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
- /**更新人*/
- @ApiModelProperty(value = "更新人")
- private String updateBy;
- /**更新日期*/
- @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
- @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty(value = "更新日期")
- private Date updateTime;
+// /**更新人*/
+// @ApiModelProperty(value = "更新人")
+// private String updateBy;
+// /**更新日期*/
+// @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+// @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+// @ApiModelProperty(value = "更新日期")
+// private Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private String sysOrgCode;
diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyClothsComponent.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyClothsComponent.java
index 64c98d96..9898921b 100644
--- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyClothsComponent.java
+++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyClothsComponent.java
@@ -70,10 +70,10 @@ public class ZyClothsComponent implements Serializable {
@Dict(dicCode = "zyModularType")
private java.lang.String modularType;
- /**部件类型*/
- @Excel(name = "部件类型", width = 15)
- @ApiModelProperty(value = "部件类型")
- private java.lang.String componentType;
+// /**部件类型*/
+// @Excel(name = "部件类型", width = 15)
+// @ApiModelProperty(value = "部件类型")
+// private java.lang.String componentType;
/**企业*/
@Excel(name = "企业", width = 15)
diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyClothsModularCompent.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyClothsModularCompent.java
index a8f1ae88..abff8e31 100644
--- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyClothsModularCompent.java
+++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyClothsModularCompent.java
@@ -34,25 +34,25 @@ public class ZyClothsModularCompent implements Serializable {
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
- /**创建人*/
- @ApiModelProperty(value = "创建人")
- private String createBy;
+// /**创建人*/
+// @ApiModelProperty(value = "创建人")
+// private String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
- /**更新人*/
- @ApiModelProperty(value = "更新人")
- private String updateBy;
- /**更新日期*/
- @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
- @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
- @ApiModelProperty(value = "更新日期")
- private Date updateTime;
- /**所属部门*/
- @ApiModelProperty(value = "所属部门")
- private String sysOrgCode;
+// /**更新人*/
+// @ApiModelProperty(value = "更新人")
+// private String updateBy;
+// /**更新日期*/
+// @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+// @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+// @ApiModelProperty(value = "更新日期")
+// private Date updateTime;
+// /**所属部门*/
+// @ApiModelProperty(value = "所属部门")
+// private String sysOrgCode;
/**编码*/
@Excel(name = "编码", width = 15)
@ApiModelProperty(value = "编码")
diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/controller/ZyProcessComponentController.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/controller/ZyProcessComponentController.java
index aefddbe9..07a2b2e2 100644
--- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/controller/ZyProcessComponentController.java
+++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/controller/ZyProcessComponentController.java
@@ -217,14 +217,14 @@ public class ZyProcessComponentController extends JeecgController {
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/controller/ZyStyleModelController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/controller/ZyStyleModelController.java
index fb978fb5..19dedfe3 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/controller/ZyStyleModelController.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/controller/ZyStyleModelController.java
@@ -1,46 +1,29 @@
package org.jeecg.modules.zystylemodel.controller;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import com.alibaba.fastjson.JSONObject;
-import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
-import org.jeecg.common.util.oConvertUtils;
-
-
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
-
-import org.jeecg.modules.demo.zyaccessories.entity.ZyStyleAccDetailVO;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.base.controller.JeecgController;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.modules.zystylefabric.mapper.ZyStyleFabricMapper;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModelDetailsVO;
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;
-import org.jeecgframework.poi.excel.entity.ImportParams;
-import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
-import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import org.jeecg.common.aspect.annotation.AutoLog;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.time.LocalDateTime;
+import java.util.List;
+import java.util.Map;
/**
* @Description: zy_style_model
@@ -55,6 +38,8 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class ZyStyleModelController extends JeecgController {
@Autowired
private IZyStyleModelService zyStyleModelService;
+ @Autowired
+ private ZyStyleFabricMapper zyStyleFabricMapper;
/**
* 分页列表查询
@@ -65,7 +50,7 @@ public class ZyStyleModelController extends JeecgController> queryPageList(ZyStyleModel zyStyleModel,String id,
@@ -73,15 +58,18 @@ public class ZyStyleModelController extends JeecgController queryWrapper = QueryGenerator.initQueryWrapper(zyStyleModel, req.getParameterMap());
- System.out.println(zyStyleModel.getStyleId());
//queryWrapper.eq("style_id", id);
Page page = new Page(pageNo, pageSize);
IPage pageList = zyStyleModelService.page(page, queryWrapper);
+ List records = pageList.getRecords();
+ for (ZyStyleModel zy : records){
+ zy.setStyleId(zyStyleFabricMapper.getStyleNameByStyleId(zy.getStyleId()));
+ }
return Result.OK(pageList);
}
/**
- * 添加
+ * 添加
*
* @param zyStyleModel
* @return
@@ -91,8 +79,8 @@ public class ZyStyleModelController extends JeecgController add(@RequestBody ZyStyleModel zyStyleModel) {
+ //System.err.println("zyStyleModel add: "+zyStyleModel+ LocalDateTime.now());
zyStyleModel.setId(null);
- System.out.println("zyStyleModel add"+zyStyleModel);
zyStyleModelService.save(zyStyleModel);
return Result.OK("添加成功!");
}
@@ -108,6 +96,7 @@ public class ZyStyleModelController extends JeecgController edit(@RequestBody ZyStyleModel zyStyleModel) {
+ //System.err.println("zyStyleModel edit: "+zyStyleModel+ LocalDateTime.now());
zyStyleModelService.updateById(zyStyleModel);
return Result.OK("编辑成功!");
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/entity/ZyStyleModel.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/entity/ZyStyleModel.java
index 0e8bbb23..9d8a5be8 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/entity/ZyStyleModel.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/entity/ZyStyleModel.java
@@ -38,7 +38,7 @@ public class ZyStyleModel implements Serializable {
private java.lang.String id;
/**款式id*/
@Excel(name = "款式id", width = 15)
- @Dict(dictTable = "zy_cloths_style", dicText = "style_names", dicCode = "id")
+ //@Dict(dictTable = "zy_cloths_style", dicText = "style_names", dicCode = "id")
@ApiModelProperty(value = "款式id")
private java.lang.String styleId;
/**是否默认尺码*/
@@ -107,8 +107,8 @@ public class ZyStyleModel implements Serializable {
@ApiModelProperty(value = "下摆")
private java.lang.Float hem;
/**创建时间*/
- @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
- @DateTimeFormat(pattern="yyyy-MM-dd")
+ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建时间")
private java.util.Date createTime;
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/service/impl/ZyStyleModelServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/service/impl/ZyStyleModelServiceImpl.java
index abf60418..110e2773 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/service/impl/ZyStyleModelServiceImpl.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/service/impl/ZyStyleModelServiceImpl.java
@@ -66,11 +66,11 @@ public class ZyStyleModelServiceImpl extends ServiceImpl