工序工具

master
Gitea 2 years ago
parent ffc5e16555
commit 571f4061f7
  1. 14
      ant-design-vue-jeecg/src/views/process/modules/ZyOperationtoolList.vue
  2. 12
      ant-design-vue-jeecg/src/views/process/modules/ZyOperationtoolModal.vue
  3. 1
      ant-design-vue-jeecg/src/views/process/modules/ZyProcessMachineModal.vue
  4. 12
      ant-design-vue-jeecg/src/views/process/modules/list/ZyToolList.vue
  5. 21
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/operationtool/controller/ZyOperationtoolController.java
  6. 6
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/operationtool/entity/ZyOperationtool.java
  7. 13
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zytool/zytool/controller/ZyToolController.java

@ -5,8 +5,8 @@
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :sm="5">
<a-form-model-item label="工具" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="organizer">
<a-input v-model="queryParam.toolid" placeholder="请输入工具名称" ></a-input>
<a-form-model-item label="工具类型名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="organizer">
<a-input v-model="queryParam.codeName" placeholder="请输入工具类型名称" ></a-input>
</a-form-model-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
@ -136,7 +136,7 @@
{
title:'工序编号',
align:"center",
dataIndex: 'processCode'
dataIndex: 'processCode_dictText'
},
{
title:'工序',
@ -144,14 +144,14 @@
dataIndex: 'operationid_dictText'
},
{
title:'工具编号',
title:'工具类型编号',
align:"center",
dataIndex: 'code'
},
{
title:'工具',
title:'工具类型名称',
align:"center",
dataIndex: 'toolid_dictText'
dataIndex: 'codeName'
},
{
title: '操作',
@ -186,8 +186,8 @@
edit (record) {
this.id = record;
this.queryParam.operationid=this.id;
this.loadData();
this.visible = true;
this.loadData();
},
initDictConfig(){
},

@ -9,7 +9,7 @@
@cancel="handleCancel"
cancelText="关闭">
<!-- <zy-process-action-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></zy-process-action-form>-->
<zy-tool-list ref="realForm" @onChangeRowKey="chuancan" @ok="submitCallback" :disabled="disableSubmit"></zy-tool-list>
<zy-tool-list ref="realForm" @onChangeRowKey="chuancan" @ok="submitCallback" :disabled="disableSubmit" @onChangeCode="changecode" @onChangeCodeName="changecodename"></zy-tool-list>
</j-modal>
</template>
@ -32,6 +32,9 @@
model:{
operationid:'',
toolid:'',
processCode:'',
code:'',
codeName:''
},
url:{
add:"/operationtool/zyOperationtool/add"
@ -50,6 +53,7 @@
this.$nextTick(()=>{
// this.$refs.realForm.add1(id);
this.model.operationid=id;
this.model.processCode=id;
})
},
edit (record) {
@ -71,6 +75,12 @@
chuancan(res){
this.model.toolid=res;
},
changecode(res){
this.model.code=res;
},
changecodename(res){
this.model.codeName=res;
},
handleOk () {
postAction(this.url.add,this.model).then((res)=>{
if(res.success){

@ -67,7 +67,6 @@
},
changecode(res){
this.model.code=res;
console.log(res)
},
changecodename(res){
this.model.codeName=res;

@ -101,7 +101,7 @@
],
url: {
list: "/zytool/zyTool/list",
list: "/zytool/zyTool/list1",
delete: "/tool/zyTool/delete",
deleteBatch: "/tool/zyTool/deleteBatch",
exportXlsUrl: "/tool/zyTool/exportXls",
@ -128,7 +128,15 @@
for (var a = 0; a < this.selectedRowKeys.length; a++) {
ids += this.selectedRowKeys[a] + ",";
}
this.$emit('onChangeRowKey',ids)
let codes = "";
let codenames = "";
for (var a = 0; a < this.selectionRows.length; a++) {
codes += this.selectionRows[a].code + ",";
codenames += this.selectionRows[a].name + ",";
}
this.$emit('onChangeRowKey',ids);
this.$emit('onChangeCode',codes);
this.$emit('onChangeCodeName',codenames);
},
add (code) {
},

@ -9,6 +9,8 @@ import lombok.extern.slf4j.Slf4j;
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.demo.pro.entity.ZyProcessMachine;
import org.jeecg.modules.operationtool.entity.ZyOperationtool;
import org.jeecg.modules.operationtool.service.IZyOperationtoolService;
import org.springframework.beans.factory.annotation.Autowired;
@ -64,18 +66,13 @@ public class ZyOperationtoolController extends JeecgController<ZyOperationtool,
@AutoLog(value = "工序工具-分页列表查询")
@ApiOperation(value="工序工具-分页列表查询", notes="工序工具-分页列表查询")
@GetMapping(value = "/list1")
public Result<?> queryPageList1(ZyOperationtool zyOperationtool,
public Result<?> queryPageList1(ZyOperationtool zyOperationtool,@RequestParam(name="operationid",required=true) String operationid,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
//QueryWrapper<ZyOperationtool> queryWrapper = QueryGenerator.initQueryWrapper(zyOperationtool, req.getParameterMap());
String s=zyOperationtool.getOperationid(),t=null;
if(zyOperationtool.getToolid()!=null){
t="%"+zyOperationtool.getToolid()+"%";
}
QueryWrapper<ZyOperationtool> queryWrapper = QueryGenerator.initQueryWrapper(zyOperationtool, req.getParameterMap());
Page<ZyOperationtool> page = new Page<ZyOperationtool>(pageNo, pageSize);
IPage<ZyOperationtool> pageList = zyOperationtoolService.page1(page, s,t);
IPage<ZyOperationtool> pageList = zyOperationtoolService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
@ -89,8 +86,12 @@ public class ZyOperationtoolController extends JeecgController<ZyOperationtool,
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyOperationtool zyOperationtool) {
String[] split = zyOperationtool.getToolid().split(",");
for (String k : split) {
zyOperationtool.setToolid(k);
String[] splitc = zyOperationtool.getCode().split(",");
String[] splitcn = zyOperationtool.getCodeName().split(",");
for (int i = 0 ; i < splitc.length; i++) {
zyOperationtool.setToolid(split[i]);
zyOperationtool.setCode(splitc[i]);
zyOperationtool.setCodeName(splitcn[i]);
QueryWrapper s=new QueryWrapper();
s.eq("operationid",zyOperationtool.getOperationid());
s.eq("toolid",zyOperationtool.getToolid());

@ -74,9 +74,11 @@ public class ZyOperationtool implements Serializable {
@Dict(dictTable = "zy_tool", dicText = "name", dicCode = "id")
@ApiModelProperty(value = "工具")
private String toolid;
@TableField (exist = false)
@Dict(dictTable = "zy_process", dicText = "process_code", dicCode = "id")
@ApiModelProperty(value = "工序编号")
private String processCode;
@TableField(exist = false)
private String code;
private String codeName;
}

@ -30,6 +30,8 @@ import org.jeecg.modules.device.entity.ZyDevice;
import org.jeecg.modules.zydevice.devicemodel.entity.ZyDevicemodel;
import org.jeecg.modules.zytool.toolmodel.entity.ZyToolModel;
import org.jeecg.modules.zytool.tooltype.entity.ZyToolType;
import org.jeecg.modules.zytool.tooltype.service.IZyToolTypeService;
import org.jeecg.modules.zytool.zytool.entity.ZyTool;
import org.jeecg.modules.zytool.zytool.service.IZyToolService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
@ -61,6 +63,8 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class ZyToolController extends JeecgController<ZyTool, IZyToolService> {
@Autowired
private IZyToolService zyToolService;
@Autowired
private IZyToolTypeService zyToolTypeService;
/**
* 分页列表查询
@ -133,13 +137,14 @@ public class ZyToolController extends JeecgController<ZyTool, IZyToolService> {
@AutoLog(value = "设备信息-分页列表查询")
@ApiOperation(value="设备信息-分页列表查询", notes="设备信息-分页列表查询")
@GetMapping(value = "/list1")
public Result<?> queryPageList1(ZyTool zyTool,
public Result<?> queryPageList1(ZyToolType zyToolType,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) throws WriterException, IOException {
QueryWrapper<ZyTool> queryWrapper = QueryGenerator.initQueryWrapper(zyTool, req.getParameterMap());
Page<ZyTool> page = new Page<ZyTool>(pageNo, pageSize);
IPage<ZyTool> pageList = zyToolService.page(page, queryWrapper);
QueryWrapper<ZyToolType> queryWrapper = QueryGenerator.initQueryWrapper(zyToolType, req.getParameterMap());
queryWrapper.orderByDesc("code");
Page<ZyToolType> page = new Page<ZyToolType>(pageNo, pageSize);
IPage<ZyToolType> pageList = zyToolTypeService.page(page, queryWrapper);
return Result.OK(pageList);
}

Loading…
Cancel
Save