|
|
@ -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()); |
|
|
|