工序设备

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

@ -8,7 +8,7 @@
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }" :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel" @cancel="handleCancel"
cancelText="关闭"> 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> </j-modal>
</template> </template>
@ -29,7 +29,10 @@
disableSubmit: false, disableSubmit: false,
model:{ model:{
machineId:'', machineId:'',
processId:'' processId:'',
code:'',
processCode:"",
codeName:""
}, },
url:{ url:{
add: "/pro/zyProcessMachine/add", add: "/pro/zyProcessMachine/add",
@ -46,6 +49,7 @@
add1 (id) { add1 (id) {
this.visible=true this.visible=true
this.model.processId=id; this.model.processId=id;
this.model.processCode=id;
}, },
edit (record) { edit (record) {
this.visible=true this.visible=true
@ -61,6 +65,13 @@
this.model.machineId=res; this.model.machineId=res;
console.log(res) console.log(res)
}, },
changecode(res){
this.model.code=res;
console.log(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){

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

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

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

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

Loading…
Cancel
Save