Merge remote-tracking branch 'origin/master'

zhc4dev
赵玉瑞 2 years ago
commit cf30e0c0e1
  1. 23
      ant-design-vue-jeecg/src/views/erp/accessories/modules/ZyAccessoriesForm.vue
  2. 15
      ant-design-vue-jeecg/src/views/erp/accessories/modules/ZyAccessoriesTypeForm.vue
  3. 37
      ant-design-vue-jeecg/src/views/erp/fabric/modules/ZyFabricForm.vue
  4. 32
      ant-design-vue-jeecg/src/views/erp/fabric/modules/ZyFabricTypeForm.vue
  5. 4
      ant-design-vue-jeecg/src/views/zyclothsample/ZyClothSampleList.vue
  6. 63
      ant-design-vue-jeecg/src/views/zyclothsample/modules/ZyClothSampleForm.vue
  7. 24
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/accessories/controller/ZyAccessoriesController.java
  8. 14
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/accessories/controller/ZyAccessoriesTypeController.java
  9. 2
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/accessories/entity/ZyAccessories.java
  10. 3
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/accessories/mapper/ZyAccessoriesMapper.java
  11. 3
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/accessories/mapper/ZyAccessoriesTypeMapper.java
  12. 1
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/accessories/service/IZyAccessoriesService.java
  13. 1
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/accessories/service/IZyAccessoriesTypeService.java
  14. 7
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/accessories/service/impl/ZyAccessoriesServiceImpl.java
  15. 7
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/accessories/service/impl/ZyAccessoriesTypeServiceImpl.java
  16. 10
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/controller/ZyFabricController.java
  17. 9
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/controller/ZyFabricTypeController.java
  18. 2
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/entity/ZyFabric.java
  19. 4
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/mapper/ZyFabricMapper.java
  20. 3
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/mapper/ZyFabricTypeMapper.java
  21. 2
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/service/IZyFabricService.java
  22. 1
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/service/IZyFabricTypeService.java
  23. 5
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/service/impl/ZyFabricServiceImpl.java
  24. 7
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/service/impl/ZyFabricTypeServiceImpl.java
  25. 11
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/controller/ZyClothSampleController.java
  26. 3
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/entity/ZyClothSample.java
  27. 3
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/mapper/ZyClothSampleMapper.java
  28. 1
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/service/IZyClothSampleService.java
  29. 7
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/service/impl/ZyClothSampleServiceImpl.java

@ -8,7 +8,7 @@
<j-popup
v-model="model.typeName"
field="typeName"
org-fields="id,contents"
org-fields="nums,contents"
dest-fields="typeId,typeName"
code="zy_accessories_type"
:multi="false"
@ -20,7 +20,7 @@
<a-col :span="24">
<a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nums">
<a-input v-model="model.nums" placeholder="请输入编号" ></a-input>
<a-input v-model="model.nums" placeholder="请输入编号" disabled ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -83,6 +83,7 @@
data () {
return {
model:{
nums:''
},
labelCol: {
xs: { span: 24 },
@ -107,7 +108,8 @@
url: {
add: "/accessories/zyAccessories/add",
edit: "/accessories/zyAccessories/edit",
queryById: "/accessories/zyAccessories/queryById"
queryById: "/accessories/zyAccessories/queryById",
sort:"/accessories/zyAccessories/sort"
}
}
},
@ -159,8 +161,19 @@
},
popupCallback(value,row){
this.model = Object.assign(this.model, row);
console.log(row);
},
var n=10;
console.log(this.model)
getAction(this.url.sort, {id:this.model.typeId}).then((res)=>{
console.log(res)
var num=parseInt(res.result,10)+1
num=num.toString()
while(num.length<n){
num="0"+num
}
this.model.nums="FL"+this.model.typeId+num;
console.log(this.model.nums)
// console.log(row);
})},
}
}
</script>

@ -5,7 +5,7 @@
<a-row>
<a-col :span="24">
<a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nums">
<a-input v-model="model.nums" placeholder="请输入编号" ></a-input>
<a-input v-model="model.nums" placeholder="请输入编号" disabled ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -39,6 +39,7 @@
data () {
return {
model:{
nums:''
},
labelCol: {
xs: { span: 24 },
@ -54,7 +55,8 @@
url: {
add: "/accessories/zyAccessoriesType/add",
edit: "/accessories/zyAccessoriesType/edit",
queryById: "/accessories/zyAccessoriesType/queryById"
queryById: "/accessories/zyAccessoriesType/queryById",
weiyi:"/accessories/zyAccessoriesType/weiyi"
}
}
},
@ -64,6 +66,15 @@
},
},
created () {
var n=4
getAction(this.url.weiyi,null).then((res)=>{
var num=parseInt(res.message,10)+1
num=num.toString()
while(num.length<n){
num="0"+num
}
this.model.nums=num;
})
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},

@ -8,7 +8,7 @@
<j-popup
v-model="model.typeName"
field="typeName"
org-fields="id,content"
org-fields="nums,content"
dest-fields="typeId,typeName"
code="zy_fabric_type"
:multi="false"
@ -17,9 +17,14 @@
<a-input v-model="model.typeId" hidden />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="材质" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="material">
<j-search-select-tag v-model="model.material" dict="material" @change="gaibian" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fabricNumber">
<a-input v-model="model.fabricNumber" placeholder="请输入编号" ></a-input>
<a-input v-model="model.fabricNumber" placeholder="请输入编号" disabled></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -37,11 +42,11 @@
<j-search-select-tag v-model="model.pattern" dict="pattern" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="材质" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="material">
<j-search-select-tag v-model="model.material" dict="material" />
</a-form-model-item>
</a-col>
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="材质" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="material">-->
<!-- <j-search-select-tag v-model="model.material" dict="material" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="description">-->
<!-- <a-input v-model="model.description" placeholder="请输入描述" ></a-input>-->
@ -157,6 +162,7 @@
model:{
unit : '1',
status : '1',
fabricNumber:'',
},
labelCol: {
xs: { span: 24 },
@ -199,7 +205,8 @@
url: {
add: "/fabric/zyFabric/add",
edit: "/fabric/zyFabric/edit",
queryById: "/fabric/zyFabric/queryById"
queryById: "/fabric/zyFabric/queryById",
sort:"/fabric/zyFabric/sort"
}
}
},
@ -217,6 +224,20 @@
add () {
this.edit(this.modelDefault);
},
gaibian(){
var n=10;
console.log(this.model)
getAction(this.url.sort,this.model).then((res)=>{
console.log(res)
var num=parseInt(res.result,10)+1
num=num.toString()
while(num.length<n){
num="0"+num
}
this.model.fabricNumber="ML"+this.model.typeId+this.model.material+num;
console.log(this.model.typeId)
})
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;

@ -5,7 +5,7 @@
<a-row>
<a-col :span="24">
<a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nums">
<a-input v-model="model.nums" placeholder="请输入编号" ></a-input>
<a-input v-model="model.nums" placeholder="请输入编号" disabled ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -22,7 +22,7 @@
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
import {randomString, validateDuplicateValue} from '@/utils/util'
export default {
name: 'ZyFabricTypeForm',
@ -39,6 +39,7 @@
data () {
return {
model:{
nums:''
},
labelCol: {
xs: { span: 24 },
@ -60,7 +61,8 @@
url: {
add: "/fabric/zyFabricType/add",
edit: "/fabric/zyFabricType/edit",
queryById: "/fabric/zyFabricType/queryById"
queryById: "/fabric/zyFabricType/queryById",
weiyi:"/fabric/zyFabricType/weiyi"
}
}
},
@ -70,7 +72,21 @@
},
},
created () {
//使使while
// this.model.nums=randomString(4)
var n=4
getAction(this.url.weiyi,{id:this.model.nums}).then((res)=>{
var num=parseInt(res.message,10)+1
num=num.toString()
while(num.length<n){
num="0"+num
}
this.model.nums=num;
console.log(num)
})
//model
console.log(this.model.nums)
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
@ -81,6 +97,16 @@
this.model = Object.assign({}, record);
this.visible = true;
},
randomString(len) {
  len = len || 32;
  var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'; /****默认去掉了容易混淆的字符oOLl,9gq,Vv,Uu,I1****/
  var maxPos = $chars.length;
  var pwd = '';
  for (i = 0; i < len; i++) {
    pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
  }
  return pwd;
},
submitForm () {
const that = this;
//

@ -215,9 +215,9 @@ export default {
// scopedSlots: {customRender: 'action1'}
// },
{
title: '用户名',
title: '企业',
align: "center",
dataIndex: 'userId'
dataIndex: 'userId_dictText'
},
{
title: '创建时间',

@ -4,17 +4,18 @@
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nums">
<!-- <a-input v-model="model.nums || this.nums" placeholder="请输入编号"></a-input>-->
<a-input v-model="model.nums" placeholder="请输入编号"></a-input>
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">
<j-select-depart v-model="model.userId" />
</a-form-model-item>
</a-col>
<!--关联服装款式表 zy_cloths_style 关联列名称 传值id-->
<a-col :span="24">
<a-form-model-item label="款式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleId">
<j-dict-select-tag v-model="model.styleId" placeholder="请输入款式"
dict-code="zy_cloths_style,style_names,id"></j-dict-select-tag>
dict-code="zy_cloths_style,style_names,nums"></j-dict-select-tag>
</a-form-model-item>
<!-- 编码也是唯一的和id一样 -->
</a-col>
<a-col :span="24">
@ -23,22 +24,27 @@
<!-- <j-dict-select-tag v-model="model.stylemodelId" placeholder="请输入款式型号"-->
<!-- dict-code="zy_style_model,model_number,model_number"></j-dict-select-tag>-->
<j-dict-select-tag v-model="model.stylemodelId" placeholder="请选择款式型号"
dictCode="modenumber"></j-dict-select-tag>
dictCode="modenumber" @change="gaibian"></j-dict-select-tag>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nums">
<!-- <a-input v-model="model.nums || this.nums" placeholder="请输入编号"></a-input>-->
<a-input v-model="model.nums" placeholder="请输入编号" disabled></a-input>
</a-form-model-item>
</a-col>
<!--<j-dict-select-tag v-model="model.modelSample" placeholder="请选择模块样板"-->
<!-- dict-code="zy_module_sample, module_name, id"></j-dict-select-tag>-->
<!-- <j-search-select-tag v-model="model.modelSample" dict="zy_module_sample" dictText="module_name", dictCode="id" />-->
<!-- </a-form-model-item>-->
<a-col :span="24">
<a-form-model-item label="用户名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">
<!-- <a-input v-model="model.userId" placeholder="请输入用户名"></a-input>-->
<j-dict-select-tag v-model="model.userId" placeholder="请输入用户名"
dict-code="sys_user,username,username"></j-dict-select-tag>
</a-form-model-item>
</a-col>
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="用户名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">-->
<!-- &lt;!&ndash; <a-input v-model="model.userId" placeholder="请输入用户名"></a-input>&ndash;&gt;-->
<!-- <j-dict-select-tag v-model="model.userId" placeholder="请输入用户名"-->
<!-- dict-code="sys_user,username,username"></j-dict-select-tag>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<a-col :span="24">
<a-form-model-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="descr">
@ -81,7 +87,9 @@ export default {
selectedKey: '', // id
typeid: '', // ,
serialNumber: '', //
model: {},
model: {
nums:'',
},
labelCol: {
xs: {span: 24},
sm: {span: 5},
@ -93,12 +101,12 @@ export default {
confirmLoading: false,
/*效验规则*/
validatorRules: {
nums: [
//{pattern: /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{4}$/, message: '4wei'},
{ required:true, message: '编号不能为空'},
{ pattern: /^[0-9A-Za-z]{0,10}$/, message: '编号太长'},
//{pattern: /^(?=.*([0-9a-zA-Z]){5}).[A-Za-z0-9]+$/, message: ''},
],
// nums: [
// //{pattern: /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{4}$/, message: '4wei'},
// { required:true, message: ''},
// { pattern: /^[0-9A-Za-z]{0,20}$/, message: ''},
// //{pattern: /^(?=.*([0-9a-zA-Z]){5}).[A-Za-z0-9]+$/, message: ''},
// ],
styleId: [
{required: true, message: '款式不能为空'},
],
@ -117,6 +125,7 @@ export default {
add: "/zyclothsample/zyClothSample/add",
edit: "/zyclothsample/zyClothSample/edit",
queryById: "/zyclothsample/zyClothSample/queryById",
sort:"/zyclothsample/zyClothSample/sort"
}
}
},
@ -141,7 +150,19 @@ export default {
this.edit(this.modelDefault);
},
//
gaibian(){
var n=3;
console.log(this.model)
getAction(this.url.sort,this.model).then((res)=>{
console.log(res)
var num=parseInt(res.result,10)+1
num=num.toString()
while(num.length<n){
num="0"+num
}
this.model.nums=this.model.styleId+this.model.stylemodelId+num;
console.log( this.model.nums)
})},
// select
handleSelect(selectedKeys) {
this.selectedKey = selectedKeys;

@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.demo.fabric.entity.ZyFabric;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
@ -83,6 +84,12 @@ public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyA
@ApiOperation(value="zy_accessories-添加", notes="zy_accessories-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyAccessories zyAccessories) {
QueryWrapper queryWrapper=new QueryWrapper();
queryWrapper.eq("contents",zyAccessories.getContents());
int a= zyAccessoriesService.count(queryWrapper);
if(a>=1){
return Result.error("名称重复,请修改后重试!!");
}
zyAccessoriesService.save(zyAccessories);
return Result.OK("添加成功!");
}
@ -97,6 +104,12 @@ public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyA
@ApiOperation(value="zy_accessories-编辑", notes="zy_accessories-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody ZyAccessories zyAccessories) {
QueryWrapper queryWrapper=new QueryWrapper();
queryWrapper.eq("contents",zyAccessories.getContents());
int a= zyAccessoriesService.count(queryWrapper);
if(a>=1){
return Result.error("名称重复,请修改后重试!!");
}
zyAccessoriesService.updateById(zyAccessories);
return Result.OK("编辑成功!");
}
@ -168,5 +181,14 @@ public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyA
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, ZyAccessories.class);
}
@AutoLog(value = "排序")
@ApiOperation(value="排序", notes="排序")
@GetMapping(value = "/sort")
public Result<?> sort(@RequestParam(name="id",required=true) String id) {
String s=zyAccessoriesService.findSort(id);
if(s==null){
return Result.OK(0);
}else
return Result.OK(s.substring(6));
}
}

@ -83,6 +83,11 @@ public class ZyAccessoriesTypeController extends JeecgController<ZyAccessoriesTy
@ApiOperation(value="zy_accessories_type-添加", notes="zy_accessories_type-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyAccessoriesType zyAccessoriesType) {
QueryWrapper queryWrapper=new QueryWrapper();
queryWrapper.eq("contents",zyAccessoriesType.getContents());
int a=zyAccessoriesTypeService.count(queryWrapper);
if(a!=0)
return Result.error("名称重复,请重试!!!");
zyAccessoriesTypeService.save(zyAccessoriesType);
return Result.OK("添加成功!");
}
@ -169,4 +174,13 @@ public class ZyAccessoriesTypeController extends JeecgController<ZyAccessoriesTy
return super.importExcel(request, response, ZyAccessoriesType.class);
}
@GetMapping(value = "/weiyi")
public Result<?> weiyi() {
String a=zyAccessoriesTypeService.sort();
if(a==null){
return Result.ok(0);
}
return Result.ok(a);
}
}

@ -38,7 +38,7 @@ public class ZyAccessories implements Serializable {
/**类型id*/
@Excel(name = "类型id", width = 15)
@ApiModelProperty(value = "类型id")
@Dict(dictTable = "zy_accessories_type", dicText = "contents", dicCode = "id")
@Dict(dictTable = "zy_accessories_type", dicText = "contents", dicCode = "nums")
private java.lang.String typeId;
/**编号*/
@Excel(name = "编号", width = 15)

@ -3,6 +3,7 @@ package org.jeecg.modules.demo.accessories.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.demo.accessories.entity.ZyAccessories;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -14,4 +15,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface ZyAccessoriesMapper extends BaseMapper<ZyAccessories> {
@Select("select nums from zy_accessories where type_id=#{id} order by nums desc limit 0,1 ")
String findSort(String id);
}

@ -3,6 +3,7 @@ package org.jeecg.modules.demo.accessories.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.demo.accessories.entity.ZyAccessoriesType;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -14,4 +15,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface ZyAccessoriesTypeMapper extends BaseMapper<ZyAccessoriesType> {
@Select("select nums from zy_accessories_type order by nums desc limit 0,1")
String sort();
}

@ -11,4 +11,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public interface IZyAccessoriesService extends IService<ZyAccessories> {
String findSort(String id);
}

@ -11,4 +11,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public interface IZyAccessoriesTypeService extends IService<ZyAccessoriesType> {
String sort();
}

@ -3,6 +3,7 @@ package org.jeecg.modules.demo.accessories.service.impl;
import org.jeecg.modules.demo.accessories.entity.ZyAccessories;
import org.jeecg.modules.demo.accessories.mapper.ZyAccessoriesMapper;
import org.jeecg.modules.demo.accessories.service.IZyAccessoriesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -16,4 +17,10 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@Service
public class ZyAccessoriesServiceImpl extends ServiceImpl<ZyAccessoriesMapper, ZyAccessories> implements IZyAccessoriesService {
@Autowired
ZyAccessoriesMapper zyAccessoriesMapper;
@Override
public String findSort(String id) {
return zyAccessoriesMapper.findSort(id);
}
}

@ -3,6 +3,7 @@ package org.jeecg.modules.demo.accessories.service.impl;
import org.jeecg.modules.demo.accessories.entity.ZyAccessoriesType;
import org.jeecg.modules.demo.accessories.mapper.ZyAccessoriesTypeMapper;
import org.jeecg.modules.demo.accessories.service.IZyAccessoriesTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -16,4 +17,10 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@Service
public class ZyAccessoriesTypeServiceImpl extends ServiceImpl<ZyAccessoriesTypeMapper, ZyAccessoriesType> implements IZyAccessoriesTypeService {
@Autowired
ZyAccessoriesTypeMapper zyAccessoriesTypeMapper;
@Override
public String sort() {
return zyAccessoriesTypeMapper.sort();
}
}

@ -357,5 +357,15 @@ public class ZyFabricController extends JeecgController<ZyFabric, IZyFabricServi
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, ZyFabric.class);
}
@AutoLog(value = "排序")
@ApiOperation(value="排序", notes="排序")
@GetMapping(value = "/sort")
public Result<?> sort(ZyFabric zyFabric) {
String s=zyFabricService.findSort(zyFabric.getTypeId(),zyFabric.getMaterial());
if(s==null){
return Result.OK(0);
}else
return Result.OK(s.substring(6));
}
}

@ -201,4 +201,13 @@ public class ZyFabricTypeController extends JeecgController<ZyFabricType, IZyFab
return super.importExcel(request, response, ZyFabricType.class);
}
@GetMapping(value = "/weiyi")
public Result<?> weiyi(@RequestParam(name="id",required=true) String id) {
String a=zyFabricTypeService.sort();
if(a==null){
return Result.ok(0);
}
return Result.ok(a);
}
}

@ -67,7 +67,7 @@ public class ZyFabric implements Serializable {
private java.lang.String imageUrl;
/**面料类型id*/
@Excel(name = "类型", width = 15 , dictTable = "zy_fabric_type", dicText = "content", dicCode = "id")
@Dict(dictTable = "zy_fabric_type", dicText = "content", dicCode = "id")
@Dict(dictTable = "zy_fabric_type", dicText = "content", dicCode = "nums")
@ApiModelProperty(value = "类型")
private java.lang.String typeId;

@ -3,6 +3,7 @@ package org.jeecg.modules.demo.fabric.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.demo.fabric.entity.ZyFabric;
import org.jeecg.modules.demo.statistic.vo.StaticDayVo;
@ -53,4 +54,7 @@ public interface ZyFabricMapper extends BaseMapper<ZyFabric> {
@Select("select id from zy_fabric_type where content like #{s}")
List<String> findAllid(String s);
@Select("select fabric_number from zy_fabric where type_id=#{typeId} and material=#{material} order by fabric_number desc limit 0,1")
String findSort(@Param("typeId") String typeId, @Param("material") String material);
}

@ -3,6 +3,7 @@ package org.jeecg.modules.demo.fabric.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.demo.fabric.entity.ZyFabricType;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -14,4 +15,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface ZyFabricTypeMapper extends BaseMapper<ZyFabricType> {
@Select("select nums from zy_fabric_type order by nums desc limit 0,1")
String sort();
}

@ -70,4 +70,6 @@ public interface IZyFabricService extends IService<ZyFabric> {
public StaticThreeVo staticThreeNum();
List<String> findAllId(String s);
String findSort(String typeId, String material);
}

@ -11,4 +11,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public interface IZyFabricTypeService extends IService<ZyFabricType> {
String sort();
}

@ -180,6 +180,11 @@ public class ZyFabricServiceImpl extends ServiceImpl<ZyFabricMapper, ZyFabric> i
return zyFabricMapper.findAllid(s);
}
@Override
public String findSort(String typeId, String material) {
return zyFabricMapper.findSort(typeId,material);
}
/**
* 逻辑单个货品的扫码出库旧的删掉对应的库存表中的库存减一生成新的二维码
* @param fabric

@ -3,6 +3,7 @@ package org.jeecg.modules.demo.fabric.service.impl;
import org.jeecg.modules.demo.fabric.entity.ZyFabricType;
import org.jeecg.modules.demo.fabric.mapper.ZyFabricTypeMapper;
import org.jeecg.modules.demo.fabric.service.IZyFabricTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -16,4 +17,10 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@Service
public class ZyFabricTypeServiceImpl extends ServiceImpl<ZyFabricTypeMapper, ZyFabricType> implements IZyFabricTypeService {
@Autowired
ZyFabricTypeMapper zyFabricTypeMapper;
@Override
public String sort() {
return zyFabricTypeMapper.sort();
}
}

@ -185,4 +185,15 @@ public class ZyClothSampleController extends JeecgController<ZyClothSample, IZyC
return super.importExcel(request, response, ZyClothSample.class);
}
@AutoLog(value = "排序")
@ApiOperation(value="排序", notes="排序")
@GetMapping(value = "/sort")
public Result<?> sort(ZyClothSample zyClothSample) {
String s=zyClothSampleService.findSort(zyClothSample.getStyleId(),zyClothSample.getStylemodelId());
if(s==null){
return Result.OK(0);
}else
return Result.OK(s.substring(21));
}
}

@ -47,7 +47,7 @@ public class ZyClothSample implements Serializable {
*/
@Excel(name = "款式", width = 15)
@ApiModelProperty(value = "款式")
@Dict(dicCode = "id",dictTable = "zy_cloths_style",dicText = "style_names")
@Dict(dicCode = "nums",dictTable = "zy_cloths_style",dicText = "style_names")
private String styleId;
/**型号*/
@Excel(name = "型号", width = 15)
@ -69,6 +69,7 @@ public class ZyClothSample implements Serializable {
/**用户*/
@Excel(name = "用户", width = 15)
@ApiModelProperty(value = "用户")
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
private String userId;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")

@ -3,6 +3,7 @@ package org.jeecg.modules.zyclothsample.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.zyclothsample.entity.ZyClothSample;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -15,4 +16,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
public interface ZyClothSampleMapper extends BaseMapper<ZyClothSample> {
@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);
}

@ -11,4 +11,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public interface IZyClothSampleService extends IService<ZyClothSample> {
String findSort(String styleId, String stylemodelId);
}

@ -3,6 +3,7 @@ package org.jeecg.modules.zyclothsample.service.impl;
import org.jeecg.modules.zyclothsample.entity.ZyClothSample;
import org.jeecg.modules.zyclothsample.mapper.ZyClothSampleMapper;
import org.jeecg.modules.zyclothsample.service.IZyClothSampleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -16,4 +17,10 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@Service
public class ZyClothSampleServiceImpl extends ServiceImpl<ZyClothSampleMapper, ZyClothSample> implements IZyClothSampleService {
@Autowired
ZyClothSampleMapper zyClothSampleMapper;
@Override
public String findSort(String styleId, String stylemodelId) {
return zyClothSampleMapper.findSort(styleId,stylemodelId);
}
}

Loading…
Cancel
Save