工序工具

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

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

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

@ -101,7 +101,7 @@
], ],
url: { url: {
list: "/zytool/zyTool/list", list: "/zytool/zyTool/list1",
delete: "/tool/zyTool/delete", delete: "/tool/zyTool/delete",
deleteBatch: "/tool/zyTool/deleteBatch", deleteBatch: "/tool/zyTool/deleteBatch",
exportXlsUrl: "/tool/zyTool/exportXls", exportXlsUrl: "/tool/zyTool/exportXls",
@ -128,7 +128,15 @@
for (var a = 0; a < this.selectedRowKeys.length; a++) { for (var a = 0; a < this.selectedRowKeys.length; a++) {
ids += this.selectedRowKeys[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) { add (code) {
}, },

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

@ -74,9 +74,11 @@ public class ZyOperationtool implements Serializable {
@Dict(dictTable = "zy_tool", dicText = "name", dicCode = "id") @Dict(dictTable = "zy_tool", dicText = "name", dicCode = "id")
@ApiModelProperty(value = "工具") @ApiModelProperty(value = "工具")
private String toolid; private String toolid;
@TableField (exist = false)
@Dict(dictTable = "zy_process", dicText = "process_code", dicCode = "id")
@ApiModelProperty(value = "工序编号")
private String processCode; private String processCode;
@TableField(exist = false)
private String code; 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.zydevice.devicemodel.entity.ZyDevicemodel;
import org.jeecg.modules.zytool.toolmodel.entity.ZyToolModel; 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.entity.ZyTool;
import org.jeecg.modules.zytool.zytool.service.IZyToolService; import org.jeecg.modules.zytool.zytool.service.IZyToolService;
import org.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.ExcelImportUtil;
@ -61,7 +63,9 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class ZyToolController extends JeecgController<ZyTool, IZyToolService> { public class ZyToolController extends JeecgController<ZyTool, IZyToolService> {
@Autowired @Autowired
private IZyToolService zyToolService; private IZyToolService zyToolService;
@Autowired
private IZyToolTypeService zyToolTypeService;
/** /**
* 分页列表查询 * 分页列表查询
* *
@ -133,16 +137,17 @@ public class ZyToolController extends JeecgController<ZyTool, IZyToolService> {
@AutoLog(value = "设备信息-分页列表查询") @AutoLog(value = "设备信息-分页列表查询")
@ApiOperation(value="设备信息-分页列表查询", notes="设备信息-分页列表查询") @ApiOperation(value="设备信息-分页列表查询", notes="设备信息-分页列表查询")
@GetMapping(value = "/list1") @GetMapping(value = "/list1")
public Result<?> queryPageList1(ZyTool zyTool, public Result<?> queryPageList1(ZyToolType zyToolType,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) throws WriterException, IOException { HttpServletRequest req) throws WriterException, IOException {
QueryWrapper<ZyTool> queryWrapper = QueryGenerator.initQueryWrapper(zyTool, req.getParameterMap()); QueryWrapper<ZyToolType> queryWrapper = QueryGenerator.initQueryWrapper(zyToolType, req.getParameterMap());
Page<ZyTool> page = new Page<ZyTool>(pageNo, pageSize); queryWrapper.orderByDesc("code");
IPage<ZyTool> pageList = zyToolService.page(page, queryWrapper); Page<ZyToolType> page = new Page<ZyToolType>(pageNo, pageSize);
IPage<ZyToolType> pageList = zyToolTypeService.page(page, queryWrapper);
return Result.OK(pageList); return Result.OK(pageList);
} }
/** /**
* 添加 * 添加
* *
@ -180,7 +185,7 @@ public class ZyToolController extends JeecgController<ZyTool, IZyToolService> {
return Result.error("添加失败,设备名称重复!!!"); return Result.error("添加失败,设备名称重复!!!");
} }
} }
/** /**
* 编辑 * 编辑
* *
@ -201,7 +206,7 @@ public class ZyToolController extends JeecgController<ZyTool, IZyToolService> {
return Result.error("编辑失败,设备名称重复!!!"); return Result.error("编辑失败,设备名称重复!!!");
} }
} }
/** /**
* 通过id删除 * 通过id删除
* *
@ -219,7 +224,7 @@ public class ZyToolController extends JeecgController<ZyTool, IZyToolService> {
zyToolService.removeById(id); zyToolService.removeById(id);
return Result.OK("删除成功!"); return Result.OK("删除成功!");
} }
/** /**
* 批量删除 * 批量删除
* *
@ -233,7 +238,7 @@ public class ZyToolController extends JeecgController<ZyTool, IZyToolService> {
this.zyToolService.removeByIds(Arrays.asList(ids.split(","))); this.zyToolService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!"); return Result.OK("批量删除成功!");
} }
/** /**
* 通过id查询 * 通过id查询
* *

Loading…
Cancel
Save