路线管理列表

This commit is contained in:
zhou-hongcheng
2026-04-27 13:40:30 +08:00
parent a76e9c4367
commit 3a7d3c0532
24 changed files with 978 additions and 12 deletions
@@ -5232,4 +5232,14 @@ public class UserApplicationService {
public UserPo selectUserTableByUserId(Long userId){
return userDomainService.selectByUserId(userId);
}
public void updateLineManagement(CustomerDO customerDO) {
if (customerDO.getUserId() == null){
throw new ServiceException("用户id不能为空");
}
UserDO userDO = new UserDO();
BeanUtils.copyProperties(customerDO, userDO);
userDomainService.updateUser(userDO);
}
}
@@ -192,4 +192,17 @@ public class UserEntity extends BaseVOEntity {
@ApiModelProperty("税号")
private String taxNumber;
@ApiModelProperty("路线id")
private String lineManagementId;
@ApiModelProperty("路线编码")
private String routeCode;
@ApiModelProperty("路线名称")
private String routeName;
@ApiModelProperty("配送顺序")
private String deliveryOrder;
}
@@ -78,4 +78,16 @@ public class CustomerDO extends BaseVOEntity {
@ApiModelProperty(name = "备注")
private String userRemark;
@ApiModelProperty("路线id")
private String lineManagementId;
@ApiModelProperty("路线编码")
private String routeCode;
@ApiModelProperty("路线名称")
private String routeName;
@ApiModelProperty("配送顺序")
private String deliveryOrder;
}
@@ -281,4 +281,16 @@ public class UserDO extends BaseVOEntity {
@ApiModelProperty("税号")
private String taxNumber;
@ApiModelProperty("路线id")
private String lineManagementId;
@ApiModelProperty("路线编码")
private String routeCode;
@ApiModelProperty("路线名称")
private String routeName;
@ApiModelProperty("配送顺序")
private String deliveryOrder;
}
@@ -19,15 +19,12 @@ public class CustomerDTO extends BaseVOEntity {
private Long userId;
@ApiModelProperty("职务/角色权限字符,控制器中定义的权限字符,如:@PreAuthorize(`@ss.hasRole('admin')`)")
@NotBlank(message = "角色编码不能为空")
private String roleCode;
@ApiModelProperty("货主/供应商/客户编码")
@NotBlank(message = "货主/供应商/客户编码不能为空")
private String userMemberCode;
@ApiModelProperty("货主/供应商/客户名称")
@NotBlank(message = "货主/供应商/客户名称不能为空")
private String userName;
@ApiModelProperty("联系人")
@@ -77,4 +74,16 @@ public class CustomerDTO extends BaseVOEntity {
@ApiModelProperty(name = "备注")
private String userRemark;
@ApiModelProperty("路线id")
private String lineManagementId;
@ApiModelProperty("路线编码")
private String routeCode;
@ApiModelProperty("路线名称")
private String routeName;
@ApiModelProperty("配送顺序")
private String deliveryOrder;
}
@@ -247,4 +247,16 @@ public class UserDTO extends BaseVOEntity {
@ApiModelProperty(value = "紧急联系电话")
private String emergencyContactPhone;
@ApiModelProperty("路线id")
private String lineManagementId;
@ApiModelProperty("路线编码")
private String routeCode;
@ApiModelProperty("路线名称")
private String routeName;
@ApiModelProperty("配送顺序")
private String deliveryOrder;
}
@@ -941,6 +941,24 @@ public class UserAPI extends BaseController {
}
}
@Log(title = "新增修改客户线路", description ="新增修改客户线路",businessType = BusinessType.UPDATE)
@ApiOperation("新增修改客户线路")
@PostMapping("/updateLineManagement")
public AjaxResult updateLineManagement(@Valid @RequestBody CustomerDTO customerDTO) {
try {
CustomerDO customerDO = new CustomerDO();
BeanUtils.copyProperties(customerDTO,customerDO);
userApplicationService.updateLineManagement(customerDO);
return AjaxResult.success();
} catch (com.mhd.common.core.exception.ServiceException e) {
e.printStackTrace();
return AjaxResult.error(500, e.getMessage());
} catch (Exception e) {
e.printStackTrace();
return AjaxResult.error(500, "操作失败:" + e.getMessage());
}
}
@Log(title = "作废货主、供应商、客户", description ="作废货主、供应商、客户",businessType = BusinessType.UPDATE)
@ApiOperation("作废货主、供应商、客户")
@PostMapping("/nullifyCustomer")