Commit 6aee4b2a authored by zhangyingbin's avatar zhangyingbin

更新根据id删除orgUsr表数据

parent 26d455ee
...@@ -18,6 +18,7 @@ import com.yeejoin.amos.boot.module.ugp.biz.service.impl.OrgServiceImpl; ...@@ -18,6 +18,7 @@ import com.yeejoin.amos.boot.module.ugp.biz.service.impl.OrgServiceImpl;
import com.yeejoin.amos.boot.module.ugp.biz.service.impl.ProjectResourceServiceImpl; import com.yeejoin.amos.boot.module.ugp.biz.service.impl.ProjectResourceServiceImpl;
import com.yeejoin.amos.boot.module.ugp.biz.service.impl.ProjectServiceImpl; import com.yeejoin.amos.boot.module.ugp.biz.service.impl.ProjectServiceImpl;
import com.yeejoin.amos.boot.module.ugp.biz.service.impl.WelderServiceImpl; import com.yeejoin.amos.boot.module.ugp.biz.service.impl.WelderServiceImpl;
import com.yeejoin.amos.feign.privilege.Privilege;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.poi.ss.formula.functions.T; import org.apache.poi.ss.formula.functions.T;
...@@ -154,10 +155,12 @@ public class WelderController extends BaseController { ...@@ -154,10 +155,12 @@ public class WelderController extends BaseController {
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@DeleteMapping(value = "/{sequenceNbr}") @DeleteMapping(value = "/deleteOneById/{sequenceNbr}")
@ApiOperation(httpMethod = "GET", value = "根据sequenceNbr删除人员信息表", notes = "根据sequenceNbr删除人员信息表") @ApiOperation(httpMethod = "GET", value = "根据sequenceNbr删除人员信息表", notes = "根据sequenceNbr删除人员信息表")
public void deleteOneById(@PathVariable String sequenceNbr) throws Exception { public ResponseModel<String> deleteOneById(@PathVariable String sequenceNbr) throws Exception {
Privilege.agencyUserClient.multDeleteUser(orgServiceImpl.getOrgUsrById(sequenceNbr).getAmosOrgId());
orgServiceImpl.delectInfo(sequenceNbr); orgServiceImpl.delectInfo(sequenceNbr);
return ResponseHelper.buildResponse("ok");
} }
} }
...@@ -18,6 +18,7 @@ import com.yeejoin.amos.feign.privilege.util.DesUtil; ...@@ -18,6 +18,7 @@ import com.yeejoin.amos.feign.privilege.util.DesUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -87,6 +88,7 @@ public class WelderServiceImpl { ...@@ -87,6 +88,7 @@ public class WelderServiceImpl {
*/ */
@BusinessIdentify @BusinessIdentify
public OrgUsrDto savePerson(JSONObject jsonObject, String bizOrgType, String sequenceNbr){ public OrgUsrDto savePerson(JSONObject jsonObject, String bizOrgType, String sequenceNbr){
if(ValidationUtil.isEmpty(sequenceNbr)){
Long companyId = orgService.getReginParams().getCompany().getSequenceNbr(); Long companyId = orgService.getReginParams().getCompany().getSequenceNbr();
Set<String> roleNameSet = new HashSet<>(); Set<String> roleNameSet = new HashSet<>();
List<RoleModel> userRoleList = new ArrayList<>(); List<RoleModel> userRoleList = new ArrayList<>();
...@@ -123,6 +125,8 @@ public class WelderServiceImpl { ...@@ -123,6 +125,8 @@ public class WelderServiceImpl {
//创建用户 //创建用户
agencyUserModel = Privilege.agencyUserClient.create(agencyUserModel).getResult(); agencyUserModel = Privilege.agencyUserClient.create(agencyUserModel).getResult();
jsonObject.put("amosOrgId",agencyUserModel.getSequenceNbr()); jsonObject.put("amosOrgId",agencyUserModel.getSequenceNbr());
}
return orgService.dataHandling(jsonObject,bizOrgType,sequenceNbr); return orgService.dataHandling(jsonObject,bizOrgType,sequenceNbr);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment