修改产品管理部分问题

zhc4dev
赵玉瑞 2 years ago
parent 7d742ed2fd
commit d51bed698c
  1. 4
      ant-design-vue-jeecg/src/components/jeecg/JVxeTable/index.js
  2. 2
      ant-design-vue-jeecg/src/views/zyclothsample/ZyClothSampleList.vue
  3. 107
      ant-design-vue-jeecg/src/views/zystylemodel/ZyStyleModelList.vue
  4. 16
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/entity/ZyStyleModular.java
  5. 8
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyClothsComponent.java
  6. 28
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyClothsModularCompent.java
  7. 16
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/controller/ZyProcessComponentController.java
  8. 10
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/entity/ZyProcessComponent.java
  9. 14
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/service/impl/ZyProcessComponentServiceImpl.java
  10. 16
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyaccessories/entity/ZyStyleAccessories.java
  11. 6
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/maker/entity/ZyMaker.java
  12. 36
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/productModule/entity/ProductModule.java
  13. 28
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyProcessModular/entity/ZyProcessModular.java
  14. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/mapper/ZyStyleFabricMapper.java
  15. 57
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/controller/ZyStyleModelController.java
  16. 6
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/entity/ZyStyleModel.java
  17. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/service/impl/ZyStyleModelServiceImpl.java

@ -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),

@ -108,7 +108,7 @@
</a-button>
</template>
// TODO:
<!--跳转到模块样板-->
<span slot="action1" slot-scope="text, record">
<a @click="jumpPage(record)">模块样板</a>
</span>

@ -1,20 +1,20 @@
<template>
<a-card :bordered="false">
<p style="font-size: 30px;color:#333;padding-left: 40%">{{biaoTi}}</p>
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col>
<!-- <div class="table-page-search-wrapper">-->
<!-- <a-form layout="inline" @keyup.enter.native="searchQuery">-->
<!-- <a-row :gutter="24">-->
<!-- <a-col>-->
<!-- <a-button type="primary">{{biaoTi}}</a-button>-->
<p style="font-size: 30px;color:#333;padding-left: 40%">{{biaoTi}}</p>
</a-col>
</a-row>
</a-form>
</div>
<!-- </a-col>-->
<!-- </a-row>-->
<!-- </a-form>-->
<!-- </div>-->
<!-- 查询区域-END -->
<a-button type="primary" icon="rollback" @click="fanHui()">返回</a-button>
<!-- <a-button type="primary" icon="rollback" @click="fanHui()">返回</a-button>-->
<!-- table区域-begin -->
<div >
<j-vxe-table
@ -32,12 +32,22 @@
:pagination="pagination"
style="margin-top: 8px;"
@pageChange="handlePageChange"
@valueChange="handleValueChange"
@added="added"
>
<template v-slot:toolbarSuffix>
<a-button type="primary" icon="rollback" @click="fanHui()">返回</a-button>
<!-- <a-tooltip placement="top" title="获取值,忽略表单验证" :autoAdjustOverflow="true">-->
<!-- <a-button @click="handleTableGet">获取值</a-button>-->
<!-- </a-tooltip>-->
<!-- <a-tooltip placement="top" title="模拟加载1000条数据" :autoAdjustOverflow="true">-->
<!-- <a-button @click="handleTableSet">设置值</a-button>-->
<!-- </a-tooltip>-->
</template>
<template v-slot:action="props">
<a @click="submitForm(props)">保存</a>
<a-divider type="vertical"/>
<!-- <a @click="submitForm(props)">保存</a>-->
<!-- <a-divider type="vertical"/>-->
<a @click="viewDetail(props.rowId)">详情</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="handleDelete(props.rowId)">
@ -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) {
//

@ -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;

@ -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)

@ -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 = "编码")

@ -217,14 +217,14 @@ public class ZyProcessComponentController extends JeecgController<ZyProcessCompo
String processNameById = zyProcessMapper.getProcessNameById(processId);
zyProcessComponent.setProcessId(processNameById);
//瓶颈工序
String bottleneck = zyProcessComponent.getBottleneck();
if (bottleneck.equals("1")) {
zyProcessComponent.setBottleneck("是");
} else if (bottleneck.equals("2")) {
zyProcessComponent.setBottleneck("否");
} else {
zyProcessComponent.setBottleneck("可能为空或出错了");
}
// String bottleneck = zyProcessComponent.getBottleneck();
// if (bottleneck.equals("1")) {
// zyProcessComponent.setBottleneck("是");
// } else if (bottleneck.equals("2")) {
// zyProcessComponent.setBottleneck("否");
// } else {
// zyProcessComponent.setBottleneck("可能为空或出错了");
// }
return Result.OK(zyProcessComponent);
}

@ -44,11 +44,11 @@ public class ZyProcessComponent implements Serializable {
@Dict(dictTable = "zy_process", dicText = "process_name", dicCode = "id")
@ApiModelProperty(value = "工艺")
private String processId;
/**是否瓶颈工序*/
@Excel(name = "是否瓶颈工序", width = 15,dicCode = "pingjing")
@Dict(dicCode = "pingjing")
@ApiModelProperty(value = "是否瓶颈工序")
private String bottleneck;
// /**是否瓶颈工序*/
// @Excel(name = "是否瓶颈工序", width = 15,dicCode = "pingjing")
// @Dict(dicCode = "pingjing")
// @ApiModelProperty(value = "是否瓶颈工序")
// private String bottleneck;
/**序号*/
@Excel(name = "序号", width = 15,dicCode = "序号")
@ApiModelProperty(value = "序号")

@ -46,13 +46,13 @@ public class ZyProcessComponentServiceImpl extends ServiceImpl<ZyProcessComponen
}else{
processComponent.setComponentId("null");
}
if (processComponent.getBottleneck().equals("1")){
processComponent.setBottleneck("是");
}else if (processComponent.getBottleneck().equals("2")){
processComponent.setBottleneck("否");
}else {
processComponent.setBottleneck(null);
}
// if (processComponent.getBottleneck().equals("1")){
// processComponent.setBottleneck("是");
// }else if (processComponent.getBottleneck().equals("2")){
// processComponent.setBottleneck("否");
// }else {
// processComponent.setBottleneck(null);
// }
}
return zyProcessComponents;
}

@ -44,14 +44,14 @@ public class ZyStyleAccessories implements Serializable {
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@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 updateTime;
// /**更新人*/
// @ApiModelProperty(value = "更新人")
// private java.lang.String updateBy;
// /**更新日期*/
// @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 updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode;

@ -51,9 +51,9 @@ public class ZyMaker implements Serializable {
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private String sysOrgCode;
// /**所属部门*/
// @ApiModelProperty(value = "所属部门")
// private String sysOrgCode;
/**制单编号*/
@Excel(name = "制单编号", width = 15)
@ApiModelProperty(value = "制单编号")

@ -1,22 +1,20 @@
package org.jeecg.modules.product.productModule.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* @Description: 工单管理下面的产品模块
@ -44,17 +42,17 @@ public class ProductModule 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 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;
/**产品id*/
@Excel(name = "产品id", width = 15)
@ApiModelProperty(value = "产品id")

@ -33,25 +33,25 @@ public class ZyProcessModular implements Serializable {
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private java.lang.String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
// /**创建人*/
// @ApiModelProperty(value = "创建人")
// private java.lang.String createBy;
/**创建日期*/
@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;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@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 updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode;
// /**更新人*/
// @ApiModelProperty(value = "更新人")
// private java.lang.String updateBy;
// /**更新日期*/
// @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 updateTime;
// /**所属部门*/
// @ApiModelProperty(value = "所属部门")
// private java.lang.String sysOrgCode;
/**模块ID*/
@Excel(name = "模块ID", width = 15)
@ApiModelProperty(value = "模块ID")

@ -2,6 +2,7 @@ package org.jeecg.modules.zystylefabric.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
@ -13,6 +14,7 @@ import org.jeecg.modules.zystylefabric.entity.ZyStyleFabric;
* @Date: 2022-09-15
* @Version: V1.0
*/
@Mapper
public interface ZyStyleFabricMapper extends BaseMapper<ZyStyleFabric> {

@ -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<ZyStyleModel, IZyStyleModelService> {
@Autowired
private IZyStyleModelService zyStyleModelService;
@Autowired
private ZyStyleFabricMapper zyStyleFabricMapper;
/**
* 分页列表查询
@ -65,7 +50,7 @@ public class ZyStyleModelController extends JeecgController<ZyStyleModel, IZySty
* @param req
* @return
*/
//@AutoLog(value = "zy_style_model-分页列表查询")
@AutoLog(value = "zy_style_model-分页列表查询")
@ApiOperation(value="zy_style_model-分页列表查询", notes="zy_style_model-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<ZyStyleModel>> queryPageList(ZyStyleModel zyStyleModel,String id,
@ -73,10 +58,13 @@ public class ZyStyleModelController extends JeecgController<ZyStyleModel, IZySty
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZyStyleModel> queryWrapper = QueryGenerator.initQueryWrapper(zyStyleModel, req.getParameterMap());
System.out.println(zyStyleModel.getStyleId());
//queryWrapper.eq("style_id", id);
Page<ZyStyleModel> page = new Page<ZyStyleModel>(pageNo, pageSize);
IPage<ZyStyleModel> pageList = zyStyleModelService.page(page, queryWrapper);
List<ZyStyleModel> records = pageList.getRecords();
for (ZyStyleModel zy : records){
zy.setStyleId(zyStyleFabricMapper.getStyleNameByStyleId(zy.getStyleId()));
}
return Result.OK(pageList);
}
@ -91,8 +79,8 @@ public class ZyStyleModelController extends JeecgController<ZyStyleModel, IZySty
//@RequiresPermissions("org.jeecg.modules.demo:zy_style_model:add")
@PostMapping(value = "/add")
public Result<String> 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<ZyStyleModel, IZySty
//@RequiresPermissions("org.jeecg.modules.demo:zy_style_model:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody ZyStyleModel zyStyleModel) {
//System.err.println("zyStyleModel edit: "+zyStyleModel+ LocalDateTime.now());
zyStyleModelService.updateById(zyStyleModel);
return Result.OK("编辑成功!");
}

@ -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;

@ -66,11 +66,11 @@ public class ZyStyleModelServiceImpl extends ServiceImpl<ZyStyleModelMapper, ZyS
zy.setSize(zy.getSize()+36);
}
//型
if (!ObjectUtils.isEmpty(zy.getSize())){
if (!ObjectUtils.isEmpty(zy.getAnumbers())){
zy.setAnumbers(aHandleNumberA(zy.getAnumbers()));
}
//号
if (!ObjectUtils.isEmpty(zy.getSize())){
if (!ObjectUtils.isEmpty(zy.getBnumbers())){
zy.setBnumbers(bHandleNumberB(zy.getBnumbers()));
}

Loading…
Cancel
Save