|
|
@@ -95,7 +95,7 @@ public class KwsEnterpriseService {
|
|
|
public void deleteByKey(String ids) throws SystemException {
|
|
|
//校验,有员工还在企业下则不能删除
|
|
|
List<Long> list = Arrays.stream(ids.split(",")).map(Long::parseLong).toList();
|
|
|
- List<KwsEnterprise> kwsEnterprises = kwsEnterpriseDao.selectByKeys(list);
|
|
|
+ List<KwsEnterprise> kwsEnterprises = kwsEnterpriseDao.selectAllByKeys(list);
|
|
|
if (CollectionUtils.isEmpty(kwsEnterprises)) {
|
|
|
throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.ENT_NOT_EXISTS);
|
|
|
}
|
|
|
@@ -108,6 +108,9 @@ public class KwsEnterpriseService {
|
|
|
/*1、删除企业*/
|
|
|
for (KwsEnterprise kwsEnterprise : kwsEnterprises) {
|
|
|
kwsEnterprise.setDelFlag(Global.YES);
|
|
|
+ if (kwsEnterprise.getApproval().equals(ApprovalEnum.PROCESS.getCode())) {
|
|
|
+ throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.MSG_033);
|
|
|
+ }
|
|
|
if (kwsEnterpriseDao.update(kwsEnterprise) <= 0) {
|
|
|
throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.DELETE_FAIL);
|
|
|
}
|