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