工序设备

master
Gitea 2 years ago
parent d42c2548ed
commit e4508fb041
  1. 17
      ant-design-vue-jeecg/src/views/process/modules/ZyProcessMachineList.vue
  2. 15
      ant-design-vue-jeecg/src/views/process/modules/ZyProcessMachineModal.vue
  3. 13
      ant-design-vue-jeecg/src/views/process/modules/list/ZyMachine.vue
  4. 19
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/controller/ZyProcessMachineController.java
  5. 3
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/entity/ZyProcessMachine.java
  6. 13
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/device/controller/ZyDeviceController.java

@ -10,8 +10,8 @@
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<a-col :sm="5">
<a-form-model-item label="设备" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="organizer">
<a-input v-model="queryParam.machineId" 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">
@ -21,6 +21,7 @@
</span>
</a-col>
</a-row>
<!-- <a-input v-model="queryParam.processId" hidden ></a-input>-->
</a-form>
</div>
<!-- 查询区域-END -->
@ -140,7 +141,7 @@
{
title:'工序编号',
align:"center",
dataIndex: 'processCode'
dataIndex: 'processCode_dictText'
},
{
title:'工序',
@ -148,14 +149,14 @@
dataIndex: 'processId_dictText'
},
{
title:'设备编号',
title:'设备类型编号',
align:"center",
dataIndex: 'code'
},
{
title:'设备名称',
title:'设备类型名称',
align:"center",
dataIndex: 'machineId_dictText'
dataIndex: 'codeName'
},
{
title: '操作',
@ -193,9 +194,9 @@
edit (record) {
this.id = record;
this.queryParam.processId=this.id;
this.loadData();
// this.loadData();
this.visible = true;
this.loadData();
},
initDictConfig(){
},

@ -8,7 +8,7 @@
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<zy-machine ref="realForm" @onChangeRowKey="chuancan" @ok="submitCallback" :disabled="disableSubmit"></zy-machine>
<zy-machine ref="realForm" @onChangeRowKey="chuancan" @ok="submitCallback" :disabled="disableSubmit" @onChangeCode="changecode" @onChangeCodeName="changecodename"></zy-machine>
</j-modal>
</template>
@ -29,7 +29,10 @@
disableSubmit: false,
model:{
machineId:'',
processId:''
processId:'',
code:'',
processCode:"",
codeName:""
},
url:{
add: "/pro/zyProcessMachine/add",
@ -46,6 +49,7 @@
add1 (id) {
this.visible=true
this.model.processId=id;
this.model.processCode=id;
},
edit (record) {
this.visible=true
@ -61,6 +65,13 @@
this.model.machineId=res;
console.log(res)
},
changecode(res){
this.model.code=res;
console.log(res)
},
changecodename(res){
this.model.codeName=res;
},
handleOk () {
postAction(this.url.add,this.model).then((res)=>{
if(res.success){

@ -127,7 +127,7 @@
dataIndex: 'code'
},
{
title:'设备名称',
title:'名称',
align:"center",
dataIndex: 'name'
},
@ -166,7 +166,16 @@
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) {
},

@ -81,18 +81,13 @@ public class ZyProcessMachineController extends JeecgController<ZyProcessMachine
@AutoLog(value = "zy_process_machine-分页列表查询")
@ApiOperation(value="zy_process_machine-分页列表查询", notes="zy_process_machine-分页列表查询")
@GetMapping(value = "/list1")
public Result<?> queryPageList1(ZyProcessMachine zyProcessMachine,
public Result<?> queryPageList1(ZyProcessMachine zyProcessMachine,@RequestParam(name="processId",required=true) String processId,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
//QueryWrapper<ZyProcessMachine> queryWrapper = QueryGenerator.initQueryWrapper(zyProcessMachine, req.getParameterMap());
String s=zyProcessMachine.getProcessId(),t=null;
if(zyProcessMachine.getMachineId()!=null){
t="%"+zyProcessMachine.getMachineId()+"%";
}
QueryWrapper<ZyProcessMachine> queryWrapper = QueryGenerator.initQueryWrapper(zyProcessMachine, req.getParameterMap());
Page<ZyProcessMachine> page = new Page<ZyProcessMachine>(pageNo, pageSize);
IPage<ZyProcessMachine> pageList = zyProcessMachineService.page1(page, s,t);
IPage<ZyProcessMachine> pageList = zyProcessMachineService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
@ -106,8 +101,12 @@ public class ZyProcessMachineController extends JeecgController<ZyProcessMachine
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyProcessMachine zyProcessMachine) {
String[] split = zyProcessMachine.getMachineId().split(",");
for (String k : split) {
zyProcessMachine.setMachineId(k);
String[] splitc = zyProcessMachine.getCode().split(",");
String[] splitcn = zyProcessMachine.getCodeName().split(",");
for (int i = 0 ; i < splitc.length; i++) {
zyProcessMachine.setMachineId(split[i]);
zyProcessMachine.setCode(splitc[i]);
zyProcessMachine.setCodeName(splitcn[i]);
QueryWrapper s=new QueryWrapper();
s.eq("process_id",zyProcessMachine.getProcessId());
s.eq("machine_id",zyProcessMachine.getMachineId());

@ -49,6 +49,9 @@ public class ZyProcessMachine implements Serializable {
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "创建时间")
private Date createTime;
@Dict(dictTable = "zy_process", dicText = "process_code", dicCode = "id")
@ApiModelProperty(value = "工序编号")
private String processCode;
private String code;
private String codeName;
}

@ -29,6 +29,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.zydevice.devicemodel.entity.ZyDevicemodel;
import org.jeecg.modules.zydevice.devicetype.entity.ZyDevicetype;
import org.jeecg.modules.zydevice.devicetype.service.IZyDevicetypeService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
@ -58,6 +60,8 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class ZyDeviceController extends JeecgController<ZyDevice, IZyDeviceService> {
@Autowired
private IZyDeviceService zyDeviceService;
@Autowired
private IZyDevicetypeService zyDevicetypeService;
/**
* 分页列表查询
@ -131,13 +135,14 @@ public class ZyDeviceController extends JeecgController<ZyDevice, IZyDeviceServi
@AutoLog(value = "设备信息-分页列表查询")
@ApiOperation(value="设备信息-分页列表查询", notes="设备信息-分页列表查询")
@GetMapping(value = "/list1")
public Result<?> queryPageList1(ZyDevice zyDevice,
public Result<?> queryPageList1(ZyDevicetype zyDevicetype,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) throws WriterException, IOException {
QueryWrapper<ZyDevice> queryWrapper = QueryGenerator.initQueryWrapper(zyDevice, req.getParameterMap());
Page<ZyDevice> page = new Page<ZyDevice>(pageNo, pageSize);
IPage<ZyDevice> pageList = zyDeviceService.page(page, queryWrapper);
QueryWrapper<ZyDevicetype> queryWrapper = QueryGenerator.initQueryWrapper(zyDevicetype, req.getParameterMap());
queryWrapper.orderByDesc("code");
Page<ZyDevicetype> page = new Page<ZyDevicetype>(pageNo, pageSize);
IPage<ZyDevicetype> pageList = zyDevicetypeService.page(page, queryWrapper);
return Result.OK(pageList);
}

Loading…
Cancel
Save