|
|
@@ -1,13 +1,16 @@
|
|
|
package com.java110.api.listener.user;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.java110.api.bmo.repair.IRepairTypeUserBMO;
|
|
|
import com.java110.api.bmo.user.IUserBMO;
|
|
|
import com.java110.api.listener.AbstractServiceApiPlusListener;
|
|
|
import com.java110.core.annotation.Java110Listener;
|
|
|
import com.java110.core.context.DataFlowContext;
|
|
|
import com.java110.core.factory.DataFlowFactory;
|
|
|
+import com.java110.dto.repair.RepairTypeUserDto;
|
|
|
import com.java110.entity.center.AppService;
|
|
|
import com.java110.core.event.service.api.ServiceDataFlowEvent;
|
|
|
+import com.java110.intf.community.IRepairTypeUserInnerServiceSMO;
|
|
|
import com.java110.utils.constant.CommonConstant;
|
|
|
import com.java110.utils.constant.ServiceCodeConstant;
|
|
|
import com.java110.utils.util.Assert;
|
|
|
@@ -18,6 +21,8 @@ import org.springframework.http.HttpMethod;
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.http.ResponseEntity;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
/**
|
|
|
* 删除员工信息
|
|
|
* Created by Administrator on 2019/4/4.
|
|
|
@@ -32,6 +37,13 @@ public class DeleteStaffServiceListener extends AbstractServiceApiPlusListener {
|
|
|
@Autowired
|
|
|
private IUserBMO userBMOImpl;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IRepairTypeUserBMO repairTypeUserBMOImpl;
|
|
|
+
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IRepairTypeUserInnerServiceSMO repairTypeUserInnerServiceSMOImpl;
|
|
|
+
|
|
|
@Override
|
|
|
public String getServiceCode() {
|
|
|
return ServiceCodeConstant.SERVICE_CODE_USER_STAFF_DELETE;
|
|
|
@@ -57,6 +69,18 @@ public class DeleteStaffServiceListener extends AbstractServiceApiPlusListener {
|
|
|
//删除用户
|
|
|
userBMOImpl.deleteUser(reqJson, context);
|
|
|
|
|
|
+ //删除报修设置
|
|
|
+ RepairTypeUserDto repairTypeUserDto = new RepairTypeUserDto();
|
|
|
+ repairTypeUserDto.setStaffId(reqJson.getString("userId"));
|
|
|
+ repairTypeUserDto.setStatusCd("0");
|
|
|
+ List<RepairTypeUserDto> repairTypeUserDtoList = repairTypeUserInnerServiceSMOImpl.queryRepairTypeUsers(repairTypeUserDto);
|
|
|
+ if (repairTypeUserDtoList != null && repairTypeUserDtoList.size() > 0) {
|
|
|
+ for (RepairTypeUserDto repairTypeUserDto1 : repairTypeUserDtoList) {
|
|
|
+ JSONObject typeUserJson1= (JSONObject)JSONObject.toJSON(repairTypeUserDto1);
|
|
|
+ repairTypeUserBMOImpl.deleteRepairTypeUser(typeUserJson1, context);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
commit(context);
|
|
|
|
|
|
//赋权
|