认证清单-认证工程师保存接口对接。
This commit is contained in:
+2
-2
@@ -217,7 +217,7 @@ public class ProjectCertificationInventoryEOController extends JeroController<Pr
|
|||||||
@AutoLog(value = "项目库-认证清单表-批量保存")
|
@AutoLog(value = "项目库-认证清单表-批量保存")
|
||||||
@ApiOperation(value="项目库-认证清单表-批量保存", notes="项目库-认证清单表-批量保存")
|
@ApiOperation(value="项目库-认证清单表-批量保存", notes="项目库-认证清单表-批量保存")
|
||||||
@PostMapping(value = "/saveBatch")
|
@PostMapping(value = "/saveBatch")
|
||||||
public Result<?> saveBatch(@RequestBody List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList) {
|
public Result<?> saveBatch(@RequestBody JSONObject json) {
|
||||||
return this.projectCertificationInventoryEOService.saveBatch(projectCertificationInventoryEOList);
|
return this.projectCertificationInventoryEOService.saveBatch(json);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -12,6 +12,7 @@ public enum CertificationFlowNodeEnum {
|
|||||||
RZGCSJSRW ("rzgcsjsrw","认证工程师接受任务","Certified engineers accept tasks"),
|
RZGCSJSRW ("rzgcsjsrw","认证工程师接受任务","Certified engineers accept tasks"),
|
||||||
RZGCSTHRW ("rzgcsthrw","认证工程师退回至studio任务","Certified engineer returns to studio task"),
|
RZGCSTHRW ("rzgcsthrw","认证工程师退回至studio任务","Certified engineer returns to studio task"),
|
||||||
ZRRJSRW ("zrrjsrw","责任人接受任务","The responsible person accepts the task"),
|
ZRRJSRW ("zrrjsrw","责任人接受任务","The responsible person accepts the task"),
|
||||||
|
ZRRJJRW ("zrrjjrw","责任人拒绝任务","The person in charge refused the assignment"),
|
||||||
ZRRTJRW ("zrrtjrw","责任人提交任务","The responsible person submits the task"),
|
ZRRTJRW ("zrrtjrw","责任人提交任务","The responsible person submits the task"),
|
||||||
RZGCSSC ("rzgcssc","认证工程师审查","Certified engineer review"),
|
RZGCSSC ("rzgcssc","认证工程师审查","Certified engineer review"),
|
||||||
;
|
;
|
||||||
|
|||||||
+1
-1
@@ -134,5 +134,5 @@ public interface IProjectCertificationInventoryEOService extends IService<Projec
|
|||||||
* @param projectCertificationInventoryEOList
|
* @param projectCertificationInventoryEOList
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Result<?> saveBatch(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList);
|
Result<?> saveBatch(JSONObject json);
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-1
@@ -3,6 +3,7 @@ package com.jero.modules.project.service.impl;
|
|||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
@@ -817,7 +818,17 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result<?> saveBatch(List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList) {
|
public Result<?> saveBatch(JSONObject json) {
|
||||||
|
if (!json.containsKey("dataList")) {
|
||||||
|
throw new JeroBootException("无法获取需要保存的数据,请检查!");
|
||||||
|
}
|
||||||
|
JSONArray dataList = json.getJSONArray("dataList");
|
||||||
|
List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList = new ArrayList<>();
|
||||||
|
ProjectCertificationInventoryEO projectCertificationInventoryEO = null;
|
||||||
|
for (Object data : dataList) {
|
||||||
|
projectCertificationInventoryEO = JSONObject.parseObject(JSONObject.toJSONString(data),ProjectCertificationInventoryEO.class);
|
||||||
|
projectCertificationInventoryEOList.add(projectCertificationInventoryEO);
|
||||||
|
}
|
||||||
if(CollectionUtils.isEmpty(projectCertificationInventoryEOList)){
|
if(CollectionUtils.isEmpty(projectCertificationInventoryEOList)){
|
||||||
throw new JeroBootException("无法获取需要保存的数据,请检查!");
|
throw new JeroBootException("无法获取需要保存的数据,请检查!");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user