md
This commit is contained in:
parent
2f8872e784
commit
73294eaa43
@ -28,6 +28,7 @@ import com.xdadan.erp.oms.service.IEmisMonthpayUseApplyService;
|
|||||||
import com.xdadan.erp.oms.service.svc.IRpcStaffSvc;
|
import com.xdadan.erp.oms.service.svc.IRpcStaffSvc;
|
||||||
import com.xdadan.erp.oms.service.svc.IRpcWaybillSvc;
|
import com.xdadan.erp.oms.service.svc.IRpcWaybillSvc;
|
||||||
import com.xdadan.erp.oms.system.service.ISysOmsUserService;
|
import com.xdadan.erp.oms.system.service.ISysOmsUserService;
|
||||||
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
@ -164,14 +165,24 @@ public class Oms2cStaffController extends BaseController
|
|||||||
emisMonthpayUseApply.setApplyDate(new Date());
|
emisMonthpayUseApply.setApplyDate(new Date());
|
||||||
emisMonthpayUseApply.setAuditStatus(1);
|
emisMonthpayUseApply.setAuditStatus(1);
|
||||||
emisMonthpayUseApplyService.insertEmisMonthpayUseApply(emisMonthpayUseApply);
|
emisMonthpayUseApplyService.insertEmisMonthpayUseApply(emisMonthpayUseApply);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return AjaxResult.success("添加子账号成功");
|
return AjaxResult.success("添加子账号成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重置密码
|
||||||
|
*/
|
||||||
|
// @PreAuthorize("@ss.hasPermi('system:user:resetPwd')")
|
||||||
|
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping("/resetChildPwd")
|
||||||
|
public AjaxResult resetPwd(@RequestBody SysOmsUser user)
|
||||||
|
{
|
||||||
|
user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
|
||||||
|
return toAjax(userService.resetUserPwd(user.getUserName(),user.getPassword()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Log(title = "OMS用户编辑", businessType = BusinessType.UPDATE)
|
@Log(title = "OMS用户编辑", businessType = BusinessType.UPDATE)
|
||||||
@ -182,4 +193,47 @@ public class Oms2cStaffController extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Log(title = "删除用户", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/delChildUser/{userIds}")
|
||||||
|
public AjaxResult delChildUser(@PathVariable Long[] userIds)
|
||||||
|
{
|
||||||
|
if (ArrayUtils.contains(userIds, getUserId()))
|
||||||
|
{
|
||||||
|
return error("当前用户不能删除");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(userIds==null){
|
||||||
|
return error("未选择用户");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(userIds.length==0){
|
||||||
|
return error("未选择用户");
|
||||||
|
}
|
||||||
|
|
||||||
|
SysOmsUser currentUser = SecurityUtils.getLoginUser().getUser();
|
||||||
|
String monthPayCode=currentUser.getMonthlyPayCode();
|
||||||
|
|
||||||
|
// 删除子账号关系
|
||||||
|
userService.deleteSysOmsUserByIds(userIds);
|
||||||
|
|
||||||
|
// 解绑月结账号
|
||||||
|
for (Long id:userIds) {
|
||||||
|
SysOmsUser oldSysOmsUser=userService.selectSysOmsUserById(id);
|
||||||
|
EmisMonthpayUseApply applayQuery=new EmisMonthpayUseApply();
|
||||||
|
applayQuery.setCustomerCode(oldSysOmsUser.getCustomerCode());
|
||||||
|
applayQuery.setCustNo(monthPayCode);
|
||||||
|
List<EmisMonthpayUseApply> listSend=emisMonthpayUseApplyService.selectEmisMonthpayUseApplyList(applayQuery);
|
||||||
|
|
||||||
|
if(!CollectionUtil.isEmpty(listSend)) {
|
||||||
|
EmisMonthpayUseApply useApp0=listSend.get(0);
|
||||||
|
if(useApp0.getAuditStatus()== 1) {
|
||||||
|
emisMonthpayUseApplyService.deleteEmisMonthpayUseApplyById(useApp0.getId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return AjaxResult.success("成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user