|
@@ -23,6 +23,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
|
|
+import org.jeecg.modules.fbsInventory.entity.FbsInventory;
|
|
|
|
+import org.jeecg.modules.fbsInventory.service.IFbsInventoryService;
|
|
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;
|
|
@@ -49,7 +51,9 @@ import com.alibaba.fastjson.JSON;
|
|
public class FbsTechnologicalProcessController {
|
|
public class FbsTechnologicalProcessController {
|
|
@Autowired
|
|
@Autowired
|
|
private IFbsTechnologicalProcessService fbsTechnologicalProcessService;
|
|
private IFbsTechnologicalProcessService fbsTechnologicalProcessService;
|
|
-
|
|
+ @Autowired
|
|
|
|
+ private IFbsInventoryService iFbsInventoryService;
|
|
|
|
+
|
|
|
|
|
|
* 分页列表查询
|
|
* 分页列表查询
|
|
* @param fbsTechnologicalProcess
|
|
* @param fbsTechnologicalProcess
|
|
@@ -70,6 +74,7 @@ public class FbsTechnologicalProcessController {
|
|
}
|
|
}
|
|
QueryWrapper<FbsTechnologicalProcess> queryWrapper = QueryGenerator.initQueryWrapper(fbsTechnologicalProcess, req.getParameterMap());
|
|
QueryWrapper<FbsTechnologicalProcess> queryWrapper = QueryGenerator.initQueryWrapper(fbsTechnologicalProcess, req.getParameterMap());
|
|
queryWrapper.lambda().eq(FbsTechnologicalProcess::getDelFlag,"0");
|
|
queryWrapper.lambda().eq(FbsTechnologicalProcess::getDelFlag,"0");
|
|
|
|
+ queryWrapper.lambda().orderByDesc(FbsTechnologicalProcess::getCreateTime);
|
|
if(StringUtils.isNotBlank(cInvCName)){
|
|
if(StringUtils.isNotBlank(cInvCName)){
|
|
queryWrapper.like("i.cInvCName",cInvCName);
|
|
queryWrapper.like("i.cInvCName",cInvCName);
|
|
}
|
|
}
|
|
@@ -80,6 +85,26 @@ public class FbsTechnologicalProcessController {
|
|
result.setResult(pageList);
|
|
result.setResult(pageList);
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ * 列表导出主子数据
|
|
|
|
+ * @param fbsTechnologicalProcess
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @GetMapping(value = "/getExport")
|
|
|
|
+ public Result<List<FbsTechnologicalProcess>> getExport(FbsTechnologicalProcess fbsTechnologicalProcess){
|
|
|
|
+ Result<List<FbsTechnologicalProcess>> result=new Result<>();
|
|
|
|
+ try {
|
|
|
|
+ List<FbsTechnologicalProcess> list=fbsTechnologicalProcessService.getExport(fbsTechnologicalProcess);
|
|
|
|
+ result.setResult(list);
|
|
|
|
+ result.success("操作成功");
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ result.error500("操作失败:"+e.getMessage());
|
|
|
|
+ throw new RuntimeException(e);
|
|
|
|
+ }
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
* 添加
|
|
* 添加
|
|
@@ -172,6 +197,10 @@ public class FbsTechnologicalProcessController {
|
|
if(fbsTechnologicalProcess==null) {
|
|
if(fbsTechnologicalProcess==null) {
|
|
result.error500("未找到对应实体");
|
|
result.error500("未找到对应实体");
|
|
}else {
|
|
}else {
|
|
|
|
+ FbsInventory fbsInventory=iFbsInventoryService.getInventory(fbsTechnologicalProcess.getName());
|
|
|
|
+ if(fbsInventory!=null){
|
|
|
|
+ fbsTechnologicalProcess.setCinvCName(fbsInventory.getCinvname());
|
|
|
|
+ }
|
|
result.setResult(fbsTechnologicalProcess);
|
|
result.setResult(fbsTechnologicalProcess);
|
|
result.setSuccess(true);
|
|
result.setSuccess(true);
|
|
}
|
|
}
|