Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH
# Conflicts: # jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/controller/ProjectCertificationInventoryEOController.java # jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java
This commit is contained in:
+7
@@ -255,4 +255,11 @@ public class ProjectCertificationInventoryEOController extends JeroController<Pr
|
||||
public void exportTemplate(ProjectCertificationInventoryEO projectCertificationInventoryEO, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
projectCertificationInventoryEOService.exportTemplate(projectCertificationInventoryEO,response,request);
|
||||
}
|
||||
|
||||
@AutoLog(value = "项目库-认证清单表-调取添加")
|
||||
@ApiOperation(value="项目库-认证清单表-调取添加", notes="项目库-认证清单表-调取添加")
|
||||
@PostMapping(value = "/callAdd")
|
||||
public Result<?> callAdd(@RequestBody JSONObject json) {
|
||||
return this.projectCertificationInventoryEOService.callAdd(json);
|
||||
}
|
||||
}
|
||||
|
||||
+7
@@ -177,4 +177,11 @@ public interface IProjectCertificationInventoryEOService extends IService<Projec
|
||||
* @return
|
||||
*/
|
||||
Result<?> updateConfigItemBatch(JSONObject json);
|
||||
|
||||
/**
|
||||
* 调取添加
|
||||
* @param json
|
||||
* @return
|
||||
*/
|
||||
Result<?> callAdd(JSONObject json);
|
||||
}
|
||||
|
||||
+44
-2
@@ -12,6 +12,9 @@ import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.DateUtils;
|
||||
import com.jero.modules.authDummy.entity.AuthDummyInventoryInfoEO;
|
||||
import com.jero.modules.authDummy.service.IAuthDummyInventoryBaseEOService;
|
||||
import com.jero.modules.authDummy.service.IAuthDummyInventoryInfoEOService;
|
||||
import com.jero.modules.feishu.enums.TemplateInfoEnum2;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
import com.jero.modules.project.entity.ProjectCertificationInventoryEO;
|
||||
@@ -99,6 +102,10 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
private SysRoleMapper sysRoleMapper;
|
||||
@Autowired
|
||||
private IFeishuService feishuService;
|
||||
@Autowired
|
||||
private IAuthDummyInventoryBaseEOService authDummyInventoryBaseEOService;
|
||||
@Autowired
|
||||
private IAuthDummyInventoryInfoEOService authDummyInventoryInfoEOService;
|
||||
|
||||
|
||||
@Value(value = "${jero.backUrl}")
|
||||
@@ -1193,6 +1200,10 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
}
|
||||
});
|
||||
|
||||
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) {
|
||||
projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.CERTIFICATION_RETURNED.getValue());
|
||||
}
|
||||
|
||||
Map<String, Object> standNameAndItemName = this.getStandNameAndItemName(projectCertificationInventoryEOList);
|
||||
String standName = (String) standNameAndItemName.get("standName");
|
||||
String itemName = (String) standNameAndItemName.get("itemName");
|
||||
@@ -1710,8 +1721,6 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
StringBuilder standNameSb = new StringBuilder();
|
||||
StringBuilder itemNameSb = new StringBuilder();
|
||||
for (ProjectCertificationInventoryEO projectCertificationInventoryEO : projectCertificationInventoryEOList) {
|
||||
projectCertificationInventoryEO.setFlowStatus(CertificationInventoryFlowStatusEnum.CERTIFICATION_RETURNED.getValue());
|
||||
|
||||
if(StringUtils.isNotEmpty(projectCertificationInventoryEO.getInspectionItem())){
|
||||
itemNameSb.append(projectCertificationInventoryEO.getInspectionItem()).append(",");
|
||||
}
|
||||
@@ -1785,6 +1794,39 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
|
||||
this.updateBatchById(projectCertificationInventoryEOList);
|
||||
return Result.OK("修改配置成功!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<?> callAdd(JSONObject json) {
|
||||
String authDummyInventoryBaseId = json.getString("authDummyInventoryBaseId");
|
||||
if(StringUtils.isEmpty(authDummyInventoryBaseId)){
|
||||
throw new JeroBootException("请选择一个认证虚拟清单进行操作!");
|
||||
}
|
||||
|
||||
String authDummyInventoryInfoIds = json.getString("authDummyInventoryInfoIds");
|
||||
if(StringUtils.isEmpty(authDummyInventoryInfoIds)){
|
||||
throw new JeroBootException("至少选择一条数据进行调取!");
|
||||
}
|
||||
|
||||
String projectLibraryId = json.getString("projectLibraryId");
|
||||
|
||||
QueryWrapper<AuthDummyInventoryInfoEO> authDummyInfoQueryWrap = new QueryWrapper<>();
|
||||
authDummyInfoQueryWrap.lambda().in(AuthDummyInventoryInfoEO::getId,authDummyInventoryInfoIds.split(","));
|
||||
List<AuthDummyInventoryInfoEO> authDummyInventoryInfoEOList = this.authDummyInventoryInfoEOService.list(authDummyInfoQueryWrap);
|
||||
|
||||
if(CollectionUtils.isNotEmpty(authDummyInventoryInfoEOList)){
|
||||
List<ProjectCertificationInventoryEO> projectCertificationInventoryEOList = new ArrayList<>();
|
||||
for (AuthDummyInventoryInfoEO authDummyInventoryInfoEO : authDummyInventoryInfoEOList) {
|
||||
ProjectCertificationInventoryEO projectCertificationInventoryEOTemp = new ProjectCertificationInventoryEO();
|
||||
BeanUtils.copyProperties(authDummyInventoryInfoEO,projectCertificationInventoryEOTemp);
|
||||
|
||||
projectCertificationInventoryEOTemp.setProjectLibraryId(projectLibraryId);
|
||||
projectCertificationInventoryEOList.add(projectCertificationInventoryEOTemp);
|
||||
}
|
||||
this.saveBatch(projectCertificationInventoryEOList);
|
||||
}
|
||||
|
||||
return Result.OK("调取成功!");
|
||||
}
|
||||
/**
|
||||
* 模板下载
|
||||
* @param projectCertificationInventoryEO
|
||||
|
||||
Reference in New Issue
Block a user