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