Merge remote-tracking branch 'origin/master' into zhc4dev

zhc4dev
zhc077 2 years ago
commit d7a60a011e
  1. 42
      ant-design-vue-jeecg/src/views/process/ZyClothsComponentList.vue
  2. 2
      ant-design-vue-jeecg/src/views/process/ZyProcessComponentList.vue
  3. 70
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue
  4. 9
      ant-design-vue-jeecg/src/views/process/modules/ZyProcessComponentForm.vue
  5. 23
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsComponentController.java
  6. 2
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyClothsComponentService.java
  7. 10
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsComponentServiceImpl.java
  8. 8
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/impl/ZyClothsStyleServiceImpl.java
  9. 8
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/service/impl/ZyStyleModelServiceImpl.java

@ -4,6 +4,34 @@
<div class="table-page-search-wrapper"> <div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery"> <a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="部件名称">
<a-input placeholder="请输入部件名称" v-model="queryParam.partsName"></a-input>
</a-form-item>
</a-col>
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!-- <a-form-item label="模块名称">-->
<!-- <a-input placeholder="请输入模块名称" v-model="queryParam.modularId"></a-input>-->
<!-- <j-dict-select-tag v-model="queryParam.modularId"-->
<!-- placeholder="请选择模块"-->
<!-- dictCode="zy_cloths_modular,modular_name,id"></j-dict-select-tag>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="模块类型">
<j-dict-select-tag placeholder="请选择模块类型" v-model="queryParam.modularType"
dictCode="zyModularType"></j-dict-select-tag>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
</a-row> </a-row>
</a-form> </a-form>
</div> </div>
@ -175,16 +203,16 @@ export default {
dataIndex: 'pictureUrl', dataIndex: 'pictureUrl',
scopedSlots: {customRender: 'imgSlot'} scopedSlots: {customRender: 'imgSlot'}
}, },
{
title: '模块',
align: "center",
dataIndex: 'modularId_dictText'
},
// { // {
// title:'', // title: '',
// align: "center", // align: "center",
// dataIndex: 'modularType_dictText' // dataIndex: 'modularId_dictText'
// }, // },
{
title: '模块类型',
align: "center",
dataIndex: 'modularType_dictText'
},
{ {
title: '企业', title: '企业',
align: "center", align: "center",

@ -142,7 +142,7 @@
} }
}, },
{ {
title:'部件', title:'部件名称',
align:"center", align:"center",
dataIndex: 'componentId_dictText' dataIndex: 'componentId_dictText'
}, },

@ -11,9 +11,17 @@
</a-row> </a-row>
<a-row> <a-row>
<a-col :span="48"> <a-col :span="48">
<a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothsTypeId"> <!-- <a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothsTypeId">-->
<j-dict-select-tag type="list" v-model="model.clothsTypeId" dictCode="zy_cloths_type,type_name,id" placeholder="请选择衣服类型" /> <!-- <j-dict-select-tag type="list" v-model="model.clothsTypeId" dictCode="zy_cloths_type,type_name,id" placeholder="请选择衣服类型" />-->
</a-form-model-item> <!-- </a-form-model-item>-->
<a-form-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothsTypeId">
<j-tree-select v-model="model.clothsTypeId"
dict="zy_cloths_type,type_name,id"
pidField="type_id"
placeholder="请选择服装类型"
@change="getNumberClothsComponentList">
</j-tree-select>
</a-form-item>
</a-col> </a-col>
</a-row> </a-row>
<a-row> <a-row>
@ -30,6 +38,16 @@
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
<a-row>
<a-col :span="48">
<a-form-model-item label="制衣模块类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modularType">
<j-dict-select-tag type="list" v-model="model.modularType" dictCode="zyModularType"
placeholder="请选择制衣模块类型"/>
</a-form-model-item>
</a-col>
</a-row>
<a-row> <a-row>
<a-col :span="48"> <a-col :span="48">
<a-form-model-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="description"> <a-form-model-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="description">
@ -86,11 +104,7 @@
<!-- </a-form-model-item>--> <!-- </a-form-model-item>-->
<!-- </a-col>--> <!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="制衣模块类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modularType">-->
<!-- <j-dict-select-tag type="list" v-model="model.modularType" dictCode="zyModularType" placeholder="请选择制衣模块类型" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">--> <!-- <a-col :span="24">-->
<!-- <a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">--> <!-- <a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">-->
<!-- <a-input v-model="model.enterpriseId" placeholder="请输入企业" ></a-input>--> <!-- <a-input v-model="model.enterpriseId" placeholder="请输入企业" ></a-input>-->
@ -107,10 +121,12 @@
import { httpAction, getAction } from '@/api/manage' import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util' import { validateDuplicateValue } from '@/utils/util'
import JTreeSelect from '@/components/jeecg/JTreeSelect'
export default { export default {
name: 'ZyClothsComponentForm', name: 'ZyClothsComponentForm',
components: { components: {
JTreeSelect
}, },
props: { props: {
// //
@ -123,6 +139,7 @@
data () { data () {
return { return {
model:{ model:{
nums: '',
}, },
labelCol: { labelCol: {
xs: { span: 24 }, xs: { span: 24 },
@ -143,9 +160,9 @@
partsName: [ partsName: [
{ required: true, message: '请输入部件名称!'}, { required: true, message: '请输入部件名称!'},
], ],
modularId: [ // modularId: [
{ required: true, message: '请选择模块!'}, // { required: true, message: '!'},
], // ],
modularType: [ modularType: [
{ required: true, message: '请选择制衣模块类型!'}, { required: true, message: '请选择制衣模块类型!'},
], ],
@ -154,7 +171,9 @@
url: { url: {
add: "/base/zyClothsComponent/add", add: "/base/zyClothsComponent/add",
edit: "/base/zyClothsComponent/edit", edit: "/base/zyClothsComponent/edit",
queryById: "/base/zyClothsComponent/queryById" queryById: "/base/zyClothsComponent/queryById",
//
sort: "/base/zyClothsComponent/sort"
} }
} }
}, },
@ -168,8 +187,35 @@
this.modelDefault = JSON.parse(JSON.stringify(this.model)); this.modelDefault = JSON.parse(JSON.stringify(this.model));
}, },
methods: { methods: {
async getNumberClothsComponentList() {
const {data: res} = await this.$axios.get('/jeecg-boot/base/zyClothsComponent/sort?id=' + this.model.clothsTypeId)
if (res.code !== 200) {
this.$message({
type: 'error',
message: '未查询到数据!'
});
}
this.model.nums = res.result
console.log('res.result')
console.log(res.result)
//this.confirmLoading = false
// if (this.data.length === 0) {
// this.data.push(res.result)
// }
console.log("制衣部件List 编号 "+this.model.nums);
},
// bianHao() {
// getAction(this.url.sort, {id: this.model.clothsTypeId}).then((res) => {
// let number = res.result;
// console.log("List id " + this.model.clothsTypeId)
// console.log("List " +number)
// this.model.nums = number;
// })
// },
add () { add () {
this.edit(this.modelDefault); this.edit(this.modelDefault);
}, },
edit (record) { edit (record) {
this.model = Object.assign({}, record); this.model = Object.assign({}, record);

@ -4,7 +4,7 @@
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="部件" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="componentId"> <a-form-model-item label="部件名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="componentId">
<j-dict-select-tag type="list" v-model="model.componentId" dictCode="zy_cloths_component,parts_name,id" placeholder="请选择部件" disabled/> <j-dict-select-tag type="list" v-model="model.componentId" dictCode="zy_cloths_component,parts_name,id" placeholder="请选择部件" disabled/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
@ -45,6 +45,7 @@
return { return {
model:{ model:{
componentId: '', componentId: '',
bottleneck: '1'
}, },
labelCol: { labelCol: {
xs: { span: 24 }, xs: { span: 24 },
@ -56,9 +57,9 @@
}, },
confirmLoading: false, confirmLoading: false,
validatorRules: { validatorRules: {
componentId: [ // componentId: [
{ required: true, message: '请选择部件!'}, // { required: true, message: '!'},
], // ],
processId: [ processId: [
{ required: true, message: '请选择工艺!'}, { required: true, message: '请选择工艺!'},
], ],

@ -18,6 +18,7 @@ import org.jeecg.modules.demo.base.entity.vo.ZyProcessVo;
import org.jeecg.modules.demo.base.service.IZyClothsComponentService; import org.jeecg.modules.demo.base.service.IZyClothsComponentService;
import org.jeecg.modules.demo.base.service.IZyClothsModularService; import org.jeecg.modules.demo.base.service.IZyClothsModularService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
@ -106,7 +107,10 @@ public class ZyClothsComponentController extends JeecgController<ZyClothsCompone
@PostMapping(value = "/add") @PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyClothsComponent zyClothsComponent) { public Result<?> add(@RequestBody ZyClothsComponent zyClothsComponent) {
//编码规则:服装类型(10)+序号(8) //编码规则:服装类型(10)+序号(8)
zyClothsComponent.setNums(zyClothsComponentService.generateNumber(zyClothsComponent)); //zyClothsComponent.setNums(zyClothsComponentService.generateNumber(zyClothsComponent));
if (StringUtils.isEmpty(zyClothsComponent.getClothsTypeId())) {
return Result.error("添加失败!服装类型不能为空");
}
//部件名称不能重复 //部件名称不能重复
LambdaQueryWrapper<ZyClothsComponent> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<ZyClothsComponent> queryWrapper = new LambdaQueryWrapper<>();
List<ZyClothsComponent> zyClothsComponentList = zyClothsComponentService.list(queryWrapper); List<ZyClothsComponent> zyClothsComponentList = zyClothsComponentService.list(queryWrapper);
@ -119,9 +123,24 @@ public class ZyClothsComponentController extends JeecgController<ZyClothsCompone
return Result.OK("添加成功!"); return Result.OK("添加成功!");
} }
/**
* getAction的url sort 编码
*/
@AutoLog(value = "顺序查询")
@ApiOperation(value = "顺序查询", notes = "顺序查询")
@GetMapping(value = "/sort")
public Result<?> sort(@RequestParam(name = "id", required = true) String id) {
//编码规则:服装类型(10)+序号(8)
String sort = zyClothsComponentService.sort(id);
System.err.println(sort+ " 制衣部件 sort");
if (StringUtils.isEmpty(sort)) {
return Result.OK(0);
}
return Result.OK(sort);
}
/** /**
* 编辑 * 编辑
*
* @param zyClothsComponent * @param zyClothsComponent
* @return * @return
*/ */

@ -24,4 +24,6 @@ public interface IZyClothsComponentService extends IService<ZyClothsComponent> {
String generateNumber(ZyClothsComponent zyClothsComponent); String generateNumber(ZyClothsComponent zyClothsComponent);
ZyClothsComponentDetail queryDetail(String id); ZyClothsComponentDetail queryDetail(String id);
String sort(String id);
} }

@ -41,6 +41,7 @@ public class ZyClothsComponentServiceImpl extends ServiceImpl<ZyClothsComponentM
@Resource @Resource
private ZyClothsTypeMapper zyClothsTypeMapper; private ZyClothsTypeMapper zyClothsTypeMapper;
@Override @Override
public List<ZyProcessVo> selectList(String id) { public List<ZyProcessVo> selectList(String id) {
List<String> list = baseMapper.selectlistid(id); List<String> list = baseMapper.selectlistid(id);
@ -80,6 +81,13 @@ public class ZyClothsComponentServiceImpl extends ServiceImpl<ZyClothsComponentM
return detail; return detail;
} }
@Override
public String sort(String id) {
String nums = zyClothsTypeMapper.selectNumOne(id);
String format = String.format("%08d", orderNumber());
return nums + format;
}
public ZyClothsComponent zyClothsComponentDetail(String id) { public ZyClothsComponent zyClothsComponentDetail(String id) {
ZyClothsComponent zyClothsComponent = zyClothsComponentMapper.selectById(id); ZyClothsComponent zyClothsComponent = zyClothsComponentMapper.selectById(id);
//翻译 //翻译
@ -134,7 +142,7 @@ public class ZyClothsComponentServiceImpl extends ServiceImpl<ZyClothsComponentM
listLong.add(Long.valueOf(newNums)); listLong.add(Long.valueOf(newNums));
} }
} }
System.out.println(listLong); //System.out.println(listLong);
return Collections.max(listLong) + 1; return Collections.max(listLong) + 1;
} }
} }

@ -114,10 +114,6 @@ public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, Z
private Long orderNumber() { private Long orderNumber() {
List<String> numsList = zyClothsStyleMapper.selectNumsList(); List<String> numsList = zyClothsStyleMapper.selectNumsList();
/*
System.out.println(numsList);
System.out.println(numsList.size());
*/
List<Long> list = new ArrayList<>(); List<Long> list = new ArrayList<>();
for (String nums : numsList) { for (String nums : numsList) {
@ -134,10 +130,6 @@ public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, Z
list.add(Long.valueOf(newNums)); list.add(Long.valueOf(newNums));
} }
/*
System.out.println(list);
System.out.println(list.size());
*/
return Collections.max(list) + 1; return Collections.max(list) + 1;
} }
} }

@ -49,16 +49,16 @@ public class ZyStyleModelServiceImpl extends ServiceImpl<ZyStyleModelMapper, ZyS
//码数 //码数
zy.setSize(zy.getSize()+36); zy.setSize(zy.getSize()+36);
//型 //型
zy.setAnumbers(aHandleNumber(zy.getAnumbers())); zy.setAnumbers(aHandleNumberA(zy.getAnumbers()));
//号 //号
zy.setBnumbers(bHandleNumber(zy.getBnumbers())); zy.setBnumbers(bHandleNumberB(zy.getBnumbers()));
} }
return zyStyleModels; return zyStyleModels;
} }
public String aHandleNumber(String num){ public String aHandleNumberA(String num){
if (StringUtils.isEmpty(num)){ if (StringUtils.isEmpty(num)){
return "null"; return "null";
} }
@ -85,7 +85,7 @@ public class ZyStyleModelServiceImpl extends ServiceImpl<ZyStyleModelMapper, ZyS
return num; return num;
} }
public String bHandleNumber(String num){ public String bHandleNumberB(String num){
if (StringUtils.isEmpty(num)){ if (StringUtils.isEmpty(num)){
return "null"; return "null";
} }

Loading…
Cancel
Save