Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-api-boot-master
Commits
a5c5cfda
Commit
a5c5cfda
authored
Apr 19, 2024
by
lanbaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-04-19报表
parent
b327aba2
Changes
51
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
51 changed files
with
3616 additions
and
0 deletions
+3616
-0
CustomerAnalysisControl.java
...le/delivery/controller/admin/CustomerAnalysisControl.java
+602
-0
CustomerReportControl.java
...dule/delivery/controller/admin/CustomerReportControl.java
+318
-0
EcwReportPermissionController.java
...ivery/controller/admin/EcwReportPermissionController.java
+191
-0
EcwVzController.java
...dao/module/delivery/controller/admin/EcwVzController.java
+119
-0
EmployeeController.java
.../module/delivery/controller/admin/EmployeeController.java
+104
-0
SalesAnalysisControl.java
...odule/delivery/controller/admin/SalesAnalysisControl.java
+57
-0
SalesReportControl.java
.../module/delivery/controller/admin/SalesReportControl.java
+74
-0
SysDeptExtControl.java
...o/module/delivery/controller/admin/SysDeptExtControl.java
+37
-0
CustomerAnalysisReq.java
...der/yudao/module/delivery/entity/CustomerAnalysisReq.java
+113
-0
CustomerAnalysisResp.java
...er/yudao/module/delivery/entity/CustomerAnalysisResp.java
+232
-0
CustomerReportReq.java
...coder/yudao/module/delivery/entity/CustomerReportReq.java
+55
-0
CustomerReportResp.java
...oder/yudao/module/delivery/entity/CustomerReportResp.java
+87
-0
EcwReportPermission.java
...der/yudao/module/delivery/entity/EcwReportPermission.java
+49
-0
EcwReportPermissionPageReq.java
...ao/module/delivery/entity/EcwReportPermissionPageReq.java
+31
-0
EcwReportPermissionResp.java
...yudao/module/delivery/entity/EcwReportPermissionResp.java
+53
-0
EcwVz.java
...n/java/cn/iocoder/yudao/module/delivery/entity/EcwVz.java
+50
-0
EcwVzPageReq.java
...cn/iocoder/yudao/module/delivery/entity/EcwVzPageReq.java
+30
-0
Employee.java
...ava/cn/iocoder/yudao/module/delivery/entity/Employee.java
+43
-0
EmployeePageReq.java
...iocoder/yudao/module/delivery/entity/EmployeePageReq.java
+22
-0
SalesAnalysisReq.java
...ocoder/yudao/module/delivery/entity/SalesAnalysisReq.java
+37
-0
SalesAnalysisResp.java
...coder/yudao/module/delivery/entity/SalesAnalysisResp.java
+90
-0
SalesReportReq.java
.../iocoder/yudao/module/delivery/entity/SalesReportReq.java
+40
-0
SalesReportResp.java
...iocoder/yudao/module/delivery/entity/SalesReportResp.java
+35
-0
CustomerReportBar.java
...r/yudao/module/delivery/entity/bar/CustomerReportBar.java
+32
-0
series.java
...a/cn/iocoder/yudao/module/delivery/entity/bar/series.java
+33
-0
yAxis.java
...va/cn/iocoder/yudao/module/delivery/entity/bar/yAxis.java
+25
-0
DeptEx.java
...n/iocoder/yudao/module/delivery/entity/deptex/DeptEx.java
+21
-0
ErrorCodeConstants.java
...coder/yudao/module/delivery/enums/ErrorCodeConstants.java
+9
-0
CustomerAnalysisMapper.java
.../yudao/module/delivery/mapper/CustomerAnalysisMapper.java
+30
-0
CustomerReportMapper.java
...er/yudao/module/delivery/mapper/CustomerReportMapper.java
+24
-0
DeptExMapper.java
...cn/iocoder/yudao/module/delivery/mapper/DeptExMapper.java
+14
-0
EcwReportPermissionMapper.java
...dao/module/delivery/mapper/EcwReportPermissionMapper.java
+65
-0
EcwVzMapper.java
.../cn/iocoder/yudao/module/delivery/mapper/EcwVzMapper.java
+40
-0
EmployeeMapper.java
.../iocoder/yudao/module/delivery/mapper/EmployeeMapper.java
+39
-0
SalesAnalysisMapper.java
...der/yudao/module/delivery/mapper/SalesAnalysisMapper.java
+19
-0
SalesReportMapper.java
...coder/yudao/module/delivery/mapper/SalesReportMapper.java
+20
-0
CustomerAnalysisService.java
...udao/module/delivery/service/CustomerAnalysisService.java
+15
-0
CustomerReportService.java
.../yudao/module/delivery/service/CustomerReportService.java
+13
-0
EcwReportPermissionService.java
...o/module/delivery/service/EcwReportPermissionService.java
+81
-0
EcwVzService.java
...n/iocoder/yudao/module/delivery/service/EcwVzService.java
+67
-0
EmployeeService.java
...ocoder/yudao/module/delivery/service/EmployeeService.java
+75
-0
CustomerAnalysisImpl.java
...ao/module/delivery/service/Impl/CustomerAnalysisImpl.java
+50
-0
CustomerReportImpl.java
...udao/module/delivery/service/Impl/CustomerReportImpl.java
+41
-0
EcwReportPermissionServiceImpl.java
...delivery/service/Impl/EcwReportPermissionServiceImpl.java
+123
-0
EcwVzServiceImpl.java
.../yudao/module/delivery/service/Impl/EcwVzServiceImpl.java
+102
-0
EmployeeServiceImpl.java
...dao/module/delivery/service/Impl/EmployeeServiceImpl.java
+101
-0
SalesAnalysisImpl.java
...yudao/module/delivery/service/Impl/SalesAnalysisImpl.java
+23
-0
SalesReportImpl.java
...r/yudao/module/delivery/service/Impl/SalesReportImpl.java
+31
-0
SalesAnalysisService.java
...r/yudao/module/delivery/service/SalesAnalysisService.java
+9
-0
SalesReportService.java
...der/yudao/module/delivery/service/SalesReportService.java
+13
-0
DeptEx.xml
...module-delivery-rest/src/main/resources/mapper/DeptEx.xml
+32
-0
No files found.
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/controller/admin/CustomerAnalysisControl.java
0 → 100644
View file @
a5c5cfda
This diff is collapsed.
Click to expand it.
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/controller/admin/CustomerReportControl.java
0 → 100644
View file @
a5c5cfda
This diff is collapsed.
Click to expand it.
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/controller/admin/EcwReportPermissionController.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
controller
.
admin
;
import
cn.iocoder.yudao.framework.common.exception.ErrorCode
;
import
cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils
;
import
cn.iocoder.yudao.module.delivery.entity.EcwReportPermission
;
import
cn.iocoder.yudao.module.delivery.entity.EcwReportPermissionPageReq
;
import
cn.iocoder.yudao.module.delivery.entity.EcwReportPermissionResp
;
import
cn.iocoder.yudao.module.delivery.service.EcwReportPermissionService
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
error
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
import
javax.validation.*
;
import
io.swagger.v3.oas.annotations.Operation
;
import
java.util.List
;
/**
* 报表权限(EcwReportPermission)表控制层
*
* @author lanbm
* @since 2024-04-09 23:10:39
*/
@RestController
@RequestMapping
(
"/Report/EcwReportPermission"
)
public
class
EcwReportPermissionController
{
/**
* 服务对象
*/
@Resource
private
EcwReportPermissionService
ecwReportPermissionService
;
private
ErrorCode
eCode
;
/*
权限校验函数 lanbm 2024-04-15 add
*/
private
boolean
isRight
(
EcwReportPermission
ecwReportPermission
)
{
//单表对象查询
LambdaQueryWrapper
<
EcwReportPermission
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
();
lambdaQueryWrapper
.
eq
(
EcwReportPermission:
:
getUserId
,
ecwReportPermission
.
getUserId
());
if
(
ecwReportPermission
.
getPermissionFw
()
==
3
)
{
lambdaQueryWrapper
.
eq
(
EcwReportPermission:
:
getPermissionFw
,
3
);
List
<
EcwReportPermission
>
objList
=
ecwReportPermissionService
.
list
(
lambdaQueryWrapper
);
if
(
objList
!=
null
&&
objList
.
size
()
>
0
)
{
eCode
=
new
ErrorCode
(
2024041501
,
"用户的全公司权限已存在,不用再次添加"
);
return
false
;
}
}
else
if
(
ecwReportPermission
.
getPermissionFw
()
==
1
)
{
//个人
lambdaQueryWrapper
.
eq
(
EcwReportPermission:
:
getPermissionFw
,
1
);
List
<
EcwReportPermission
>
objList
=
ecwReportPermissionService
.
list
(
lambdaQueryWrapper
);
if
(
objList
!=
null
&&
objList
.
size
()
>
0
)
{
eCode
=
new
ErrorCode
(
2024041502
,
"用户的个人权限已存在,不用再次添加"
);
return
false
;
}
}
else
if
(
ecwReportPermission
.
getPermissionFw
()
==
2
)
{
//部门
lambdaQueryWrapper
.
eq
(
EcwReportPermission:
:
getPermissionFw
,
2
);
lambdaQueryWrapper
.
eq
(
EcwReportPermission:
:
getDeptId
,
ecwReportPermission
.
getDeptId
());
List
<
EcwReportPermission
>
objList
=
ecwReportPermissionService
.
list
(
lambdaQueryWrapper
);
if
(
objList
!=
null
&&
objList
.
size
()
>
0
)
{
eCode
=
new
ErrorCode
(
2024041503
,
"用户的部门权限已存在,不用再次添加"
);
return
false
;
}
}
return
true
;
}
/**
* 新增数据
*
* @param ecwReportPermission 实体
* @return 新增结果
*/
@PostMapping
(
"/create"
)
public
CommonResult
<
Long
>
create
(
@Valid
@RequestBody
EcwReportPermission
ecwReportPermission
)
{
boolean
bR
=
isRight
(
ecwReportPermission
);
if
(
bR
==
false
)
{
return
error
(
eCode
);
}
//System.out.println(ecwReportPermission);
return
success
(
ecwReportPermissionService
.
create
(
ecwReportPermission
));
}
/**
* 编辑数据
*
* @param ecwReportPermission 实体
* @return 编辑结果
*/
@PostMapping
(
"/update"
)
public
CommonResult
<
Boolean
>
update
(
@RequestBody
EcwReportPermission
ecwReportPermission
)
{
boolean
bR
=
isRight
(
ecwReportPermission
);
if
(
bR
==
false
)
{
return
error
(
eCode
);
}
ecwReportPermissionService
.
update
(
ecwReportPermission
);
return
success
(
true
);
}
/**
* 删除数据
*
* @param id 主键
* @return 删除是否成功
*/
@GetMapping
(
"/delete"
)
public
CommonResult
<
Boolean
>
delete
(
@RequestParam
Long
id
)
{
ecwReportPermissionService
.
delete
(
id
);
return
success
(
true
);
}
/**
* 通过主键查询单条数据
*
* @param id 主键
* @return 单条数据
*/
@GetMapping
(
"/get"
)
public
CommonResult
<
EcwReportPermission
>
getModel
(
@RequestParam
(
"id"
)
Long
id
)
{
EcwReportPermission
ecwReportPermission
=
ecwReportPermissionService
.
getModel
(
id
);
return
success
(
ecwReportPermission
);
}
/*
获取当前用户的报表权限 lanbm 2024-04-15 add
*/
@GetMapping
(
"/getCurUserPermission"
)
public
CommonResult
<
EcwReportPermission
>
getCurUserPermission
()
{
Long
loginUserId
=
SecurityFrameworkUtils
.
getLoginUserId
();
LambdaQueryWrapper
<
EcwReportPermission
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
();
lambdaQueryWrapper
.
eq
(
EcwReportPermission:
:
getUserId
,
loginUserId
);
List
<
EcwReportPermission
>
objList
=
ecwReportPermissionService
.
list
(
lambdaQueryWrapper
);
if
(
objList
==
null
||
objList
.
size
()
==
0
)
{
ErrorCode
eCode
=
new
ErrorCode
(
2024041504
,
"当前用户未分配报表权限,请联系系统管理员处理。"
);
return
error
(
eCode
);
}
return
success
(
objList
.
get
(
0
));
}
/**
* 查询所有数据
*
* @return 实例对象集合
*/
@GetMapping
public
CommonResult
queryAll
()
{
return
success
(
this
.
ecwReportPermissionService
.
list
());
}
/**
* 分页查询
*
* @return 分页对象集合
*/
@GetMapping
(
"/page"
)
@Operation
(
summary
=
"获取分页查询列表"
)
public
CommonResult
<
PageResult
<
EcwReportPermissionResp
>>
getListPage
(
@Valid
EcwReportPermissionPageReq
PageReq
)
{
//myBatisPlus分页
//return success(this.ecwReportPermissionService.getListPage(PageReq));
//通过自定义SQL语句分页 lanbm 2024-04-15 add
return
success
(
this
.
ecwReportPermissionService
.
getListPageCustom
(
PageReq
));
}
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/controller/admin/EcwVzController.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
controller
.
admin
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX
;
import
cn.iocoder.yudao.module.delivery.entity.EcwVz
;
import
cn.iocoder.yudao.module.delivery.entity.EcwVzPageReq
;
import
cn.iocoder.yudao.module.delivery.service.EcwVzService
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
import
javax.validation.*
;
import
io.swagger.v3.oas.annotations.Operation
;
/**
* V值转换配置参数(EcwVz)表控制层
*
* @author lanbm
* @since 2024-04-02
*/
@RestController
@RequestMapping
(
"/ecwVz/vz"
)
public
class
EcwVzController
{
/**
* 服务对象
*/
@Resource
private
EcwVzService
ecwVzService
;
private
final
String
HYPG
=
"海运拼柜"
;
private
final
String
ZXKY
=
"专线空运"
;
/**
* 新增数据
*
* @param ecwVz 实体
* @return 新增结果
*/
@PostMapping
(
"/create"
)
public
CommonResult
<
Long
>
create
(
@Valid
@RequestBody
EcwVz
ecwVz
)
{
System
.
out
.
println
(
ecwVz
);
EcwVz
temp
=
ecwVzService
.
getOne
(
new
LambdaQueryWrapperX
<
EcwVz
>()
.
eqIfPresent
(
EcwVz:
:
getTitleZh
,
ecwVz
.
getTitleZh
()));
if
(
temp
==
null
)
{
return
success
(
ecwVzService
.
create
(
ecwVz
));
}
else
{
ecwVz
.
setId
(
temp
.
getId
());
ecwVzService
.
update
(
ecwVz
);
return
success
(
ecwVz
.
getId
());
}
}
/**
* 编辑数据
*
* @param ecwVz 实体
* @return 编辑结果
*/
@PostMapping
(
"/update"
)
public
CommonResult
<
Boolean
>
update
(
@RequestBody
EcwVz
ecwVz
)
{
//System.out.println(ecwVz);
ecwVzService
.
update
(
ecwVz
);
return
success
(
true
);
}
/**
* 删除数据
*
* @param id 主键
* @return 删除是否成功
*/
@GetMapping
(
"/delete"
)
public
CommonResult
<
Boolean
>
delete
(
@RequestParam
Long
id
)
{
//自定义物理删除方法
ecwVzService
.
delete
(
id
);
return
success
(
true
);
}
/**
* 通过主键查询单条数据
*
* @param id 主键
* @return 单条数据
*/
@GetMapping
(
"/get"
)
public
CommonResult
<
EcwVz
>
getModel
(
@RequestParam
(
"id"
)
Long
id
)
{
EcwVz
ecwVz
=
ecwVzService
.
getModel
(
id
);
return
success
(
ecwVz
);
}
/**
* 查询所有数据
*
* @return 实例对象集合
*/
@GetMapping
public
CommonResult
queryAll
()
{
return
success
(
this
.
ecwVzService
.
list
());
}
/**
* 分页查询
*
* @return 分页对象集合
*/
@GetMapping
(
"/page"
)
@Operation
(
summary
=
"获取分页查询列表"
)
public
CommonResult
<
PageResult
<
EcwVz
>>
selectPage
(
@Valid
EcwVzPageReq
PageReq
)
{
return
success
(
this
.
ecwVzService
.
selectPage
(
PageReq
));
}
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/controller/admin/EmployeeController.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
controller
.
admin
;
import
cn.iocoder.yudao.module.delivery.entity.Employee
;
import
cn.iocoder.yudao.module.delivery.entity.EmployeePageReq
;
import
cn.iocoder.yudao.module.delivery.service.EmployeeService
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
import
javax.validation.*
;
import
io.swagger.v3.oas.annotations.Operation
;
/**
* (Employee)表控制层
*
* @author lanbm
* @since 2024-03-27 21:25:55
*/
@RestController
@RequestMapping
(
"employee"
)
public
class
EmployeeController
{
/**
* 服务对象
*/
@Resource
private
EmployeeService
employeeService
;
/**
* 新增数据
*
* @param employee 实体
* @return 新增结果
*/
@PostMapping
(
"/create"
)
public
CommonResult
<
Long
>
create
(
@Valid
@RequestBody
Employee
employee
)
{
return
success
(
employeeService
.
create
(
employee
));
}
/**
* 编辑数据
*
* @param employee 实体
* @return 编辑结果
*/
@PostMapping
(
"/update"
)
public
CommonResult
<
Boolean
>
update
(
@RequestBody
Employee
employee
)
{
employeeService
.
update
(
employee
);
return
success
(
true
);
}
/**
* 删除数据
*
* @param id 主键
* @return 删除是否成功
*/
@GetMapping
(
"/delete"
)
public
CommonResult
<
Boolean
>
delete
(
@RequestParam
Long
id
)
{
employeeService
.
delete
(
id
);
return
success
(
true
);
}
/**
* 通过主键查询单条数据
*
* @param id 主键
* @return 单条数据
*/
@GetMapping
(
"/get"
)
public
CommonResult
<
Employee
>
getModel
(
@RequestParam
(
"id"
)
Long
id
)
{
Employee
employee
=
employeeService
.
getModel
(
id
);
return
success
(
employee
);
}
/**
* 查询所有数据
*
* @return 实例对象集合
*/
@GetMapping
public
CommonResult
queryAll
()
{
return
success
(
this
.
employeeService
.
list
());
}
/**
* 分页查询
*
* @return 分页对象集合
*/
@GetMapping
(
"/page"
)
@Operation
(
summary
=
"获取分页查询列表"
)
public
CommonResult
<
PageResult
<
Employee
>>
getListPage
(
@Valid
EmployeePageReq
PageReq
)
{
return
success
(
this
.
employeeService
.
getListPage
(
PageReq
));
}
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/controller/admin/SalesAnalysisControl.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
controller
.
admin
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog
;
import
cn.iocoder.yudao.module.delivery.entity.CustomerAnalysisReq
;
import
cn.iocoder.yudao.module.delivery.entity.CustomerAnalysisResp
;
import
cn.iocoder.yudao.module.delivery.entity.SalesAnalysisReq
;
import
cn.iocoder.yudao.module.delivery.entity.SalesAnalysisResp
;
import
cn.iocoder.yudao.module.delivery.service.SalesAnalysisService
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.validation.Valid
;
import
java.io.IOException
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
operatelog
.
core
.
enums
.
OperateTypeEnum
.
EXPORT
;
/**
* (SalesAnalysis)销售分析报表
*
* @author lanbm add
* @since 2024-03-31
*/
@RestController
@RequestMapping
(
"/Report/SalesAnalysis"
)
public
class
SalesAnalysisControl
{
@Autowired
private
SalesAnalysisService
salesAnalysisService
;
/*
客户分析列表 lanbm 2024-04-02 add
*/
@PostMapping
(
"/getListPage"
)
public
CommonResult
<
PageResult
<
SalesAnalysisResp
>>
getListPage
(
@RequestBody
SalesAnalysisReq
Req
)
{
PageResult
<
SalesAnalysisResp
>
pageResult
=
salesAnalysisService
.
getListPage
(
Req
);
return
success
(
pageResult
);
}
@GetMapping
(
"/exportExcel"
)
@ApiOperation
(
"导出销售分析数据"
)
@OperateLog
(
type
=
EXPORT
)
public
void
export
(
HttpServletResponse
response
,
@Valid
CustomerAnalysisReq
Req
)
throws
IOException
{
// List<DictDataDO> list = dictDataService.getDictDatas(reqVO);
//List<DictDataExcelVO> data = DictDataConvert.INSTANCE.convertList02(list);
// 输出
//ExcelUtils.write(response, "客户分析数据.xls", "客户分析数据列表", DictDataExcelVO.class, data);
}
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/controller/admin/SalesReportControl.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
controller
.
admin
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.module.delivery.entity.SalesReportReq
;
import
cn.iocoder.yudao.module.delivery.entity.SalesReportResp
;
import
cn.iocoder.yudao.module.delivery.service.SalesReportService
;
import
io.swagger.annotations.Api
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.validation.Valid
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
/**
* (Employee)表控制层
*
* @author lanbm
* @since 2024-03-27 21:25:55
*/
@RestController
@Api
(
tags
=
"管理后台 -统计报表"
)
@RequestMapping
(
"/Report/SalesReport"
)
public
class
SalesReportControl
{
//ecw_order_departure 订单始发地
//ecw_order_consignor 订单发货人
//ecw_order_consignee 订单收货人
//订单表 ecw_order
//drawee 付款人 付款人:1 发货人 2 收货人 3 自定义
//status 订单状态 0草稿 2待入仓,3入参中
@Autowired
private
SalesReportService
salesReportService
;
/*
首次成交的客户数统计
lanbm 2024-04-01
*/
@PostMapping
(
"/FirstCustomerCount"
)
public
CommonResult
<
Integer
>
FirstCustomerCount
(
@RequestBody
SalesReportReq
Req
)
{
int
nR
=
salesReportService
.
FirstCustomerCount
(
Req
);
return
success
(
nR
);
}
/*
按运输方式统计重量和方数
lanbm 2024-04-01
*/
@PostMapping
(
"/SalesReportCount"
)
public
CommonResult
<
SalesReportResp
>
SalesReportCount
(
@RequestBody
SalesReportReq
Req
)
{
String
s
=
""
;
SalesReportResp
re
=
salesReportService
.
SalesReportCount
(
Req
);
return
success
(
re
);
}
/*
图表分析统计结果
lanbm 2024-04-01 add
*/
@PostMapping
(
"/SalesReportList"
)
public
CommonResult
<
Integer
>
SalesReportList
(
@RequestBody
SalesReportReq
Req
)
{
int
nR
=
salesReportService
.
FirstCustomerCount
(
Req
);
return
success
(
nR
);
}
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/controller/admin/SysDeptExtControl.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
controller
.
admin
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.module.delivery.entity.EcwVz
;
import
cn.iocoder.yudao.module.delivery.entity.EcwVzPageReq
;
import
cn.iocoder.yudao.module.delivery.entity.deptex.DeptEx
;
import
cn.iocoder.yudao.module.delivery.mapper.DeptExMapper
;
import
io.swagger.annotations.Api
;
import
io.swagger.v3.oas.annotations.Operation
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
javax.validation.Valid
;
import
java.util.List
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
@RestController
@Api
(
tags
=
"管理后台 -统计报表"
)
@RequestMapping
(
"/Report/SysDeptEx"
)
public
class
SysDeptExtControl
{
//lanbm 2024-04-19 添加的系统基础扩展功能
@Resource
private
DeptExMapper
deptExMapper
;
@GetMapping
(
"/getDeptChild"
)
@Operation
(
summary
=
"根据父机部门获取子部门"
)
public
CommonResult
<
List
<
DeptEx
>>
getDeptChild
(
@Valid
DeptEx
Req
)
{
return
success
(
deptExMapper
.
getDeptChild
(
Req
));
}
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/entity/CustomerAnalysisReq.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
entity
;
import
cn.iocoder.yudao.framework.common.pojo.PageParam
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.ToString
;
import
org.bouncycastle.crypto.tls.SRTPProtectionProfile
;
/*
客户分析报表
逻辑数据大部分集中在表 ecw_customer
lanbm 2024-03-31 add
*/
@Schema
(
description
=
"管理后台 - 客户分析查询参数"
)
@Data
@ToString
(
callSuper
=
true
)
public
class
CustomerAnalysisReq
extends
PageParam
{
private
int
start
;
private
int
size
;
/*
客户编号
*/
//private String number;
/*
客户名称
*/
private
String
name
;
private
String
searchtype
;
/*
是否新客户
*/
private
int
isnew
;
/*
客户国家
*/
private
String
country
;
/*
客户来源
*/
private
int
source
;
/*
销售经理
*/
private
String
salesmanid
;
/*
部门ID
*/
private
String
deptid
;
/*
客户姓名
*/
private
String
cusname
;
/*
客户编号
*/
private
String
cusno
;
/*
是否首次成交 0是否,1是
*/
private
int
first
;
/*
客户角色
*/
private
String
customerrole
;
/*
数据筛选类型
*/
private
String
searchDataType1
;
private
String
searchDataType2
;
private
String
searchDataType3
;
/*
时间筛选类型
首次成交日期,客户创建日期
*/
private
String
SearchDateType
;
private
String
sdate
;
//对比开始日期
private
String
sduibidate
;
private
String
edate
;
//对比结束日期
private
String
eduibidate
;
/*
对比年份
*/
private
String
duibiYear
;
private
String
curYear
;
//统计年份
/*
统计时间跨度 总月数,用户计算月均
*/
private
int
nMonth
;
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/entity/CustomerAnalysisResp.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
entity
;
import
io.swagger.annotations.ApiModel
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.math.BigDecimal
;
/*
客户分析结果
lanbm 2024-04-02 add
字段值名称首字母要小写,字段中不能含有下划线
*/
@ApiModel
(
"管理后台-客户分析报表结果"
)
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
CustomerAnalysisResp
{
/*
排名编号
*/
private
int
px
;
/*
客户编号
*/
private
String
number
;
private
String
id
;
/*
客户姓名
*/
private
String
name
;
/*
客户经理姓名
*/
private
String
salesman
;
/*
客户经理所在的部门
*/
private
String
deptid
;
/*
部门名称
*/
private
String
deptname
;
/*
客户经理ID
customer_service 客户表中的跟进客服
*/
private
String
salesmanid
;
/*
总值,海运拼柜,专线空运
*/
private
BigDecimal
allsumvolume
;
/*
总值同比
*/
private
BigDecimal
allsumvolumeTb
;
/*
总V值同比显示信息
*/
private
String
allsumvolumeTbShow
;
/*
海运拼柜
*/
private
BigDecimal
sumvolume1
;
private
BigDecimal
sumvolumeV1
;
private
BigDecimal
sumvolumeTb1
;
private
BigDecimal
sumvolumeTbV1
;
/*
海运拼柜占比
*/
private
String
seaZb
;
/*
海运同比显示
*/
private
String
sumvolumeTbShow1
;
/*
专线空运
*/
private
BigDecimal
sumweight3
;
private
BigDecimal
sumweightV3
;
private
BigDecimal
sumweightTb3
;
private
BigDecimal
sumweightTbV3
;
/*
空运占比
*/
private
String
airZb
;
/*
空运同步显示
*/
private
String
sumweightTbShow3
;
/*
月均
*/
private
String
monthAvg
;
private
String
monthAvgTb
;
/*
月均同比
*/
private
String
monthAvgTbShow
;
/*
海运月均方数
*/
private
String
seaMonthAvg
;
/*
海运月均方数同比
*/
private
String
seaMonthAvgTb
;
/*
空运月均重量
*/
private
String
airMothAvg
;
/*
空运月均同比
*/
private
String
airMothAvgTb
;
/*
重货总V值
*/
private
BigDecimal
weightSumV
;
/*
重货占比
*/
private
String
weithtSumZb
;
/*
泡货总V值
*/
private
BigDecimal
phSumV
;
/*
泡货占比
*/
private
String
phSumZb
;
/*
控货总V值
*/
private
BigDecimal
khSumV
;
/*
控货总占比
*/
private
String
khSumZb
;
/*
是否首次成交
*/
private
String
isFirst
;
/*
首次成交时间
*/
private
String
firstDate
;
/*
入库总箱数
*/
private
int
chargequantity
;
/*
提货数
*/
private
int
pickquantity
;
/*
提货率
*/
private
String
thL
;
/*
客户业绩类型
是否新客户:1是新客户,0是老客户
*/
private
String
cusYjType
;
/*
客户来源
*/
private
String
source
;
/*
客户来源名称
*/
private
String
sourcename
;
/*
客户国家
*/
private
String
country
;
/*
客户角色
*/
private
String
customerrole
;
/*
对应数据字典中的客户类别 type
*/
private
String
type
;
/*
客户创建日期
*/
private
String
createtime
;
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/entity/CustomerReportReq.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
entity
;
import
cn.iocoder.yudao.framework.common.pojo.PageParam
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.*
;
/*
客户看板请求参数
lanbm 2024-03-31 add
*/
@Schema
(
description
=
"管理后台 - 客户看板查询参数"
)
@Data
@ToString
(
callSuper
=
true
)
public
class
CustomerReportReq
extends
PageParam
{
private
int
start
;
private
int
size
;
/*
统计开始日期
*/
private
String
sDate
;
private
String
sDuiBiDate
;
private
String
sHuanhuanBiDate
;
//环比日期
/*
统计结束日期
*/
private
String
eDate
;
private
String
eDuiBiDate
;
private
String
eHuanBiDate
;
//环比日期
/*
对比年份
*/
private
String
duibiYear
;
private
String
curYear
;
//统计年份
/*
部门ID
*/
private
String
deptid
;
/*
客户经理
*/
private
String
salesmanid
;
private
Integer
pageNo
;
private
Integer
pageSize
;
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/entity/CustomerReportResp.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
entity
;
import
io.swagger.annotations.ApiModel
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.math.BigDecimal
;
/*
客户看板结果
lanbm 2024-04-02 add
*/
@ApiModel
(
"管理后台-客户看报表结果"
)
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
CustomerReportResp
{
//同比,和上一年的比较
//环比 和上一个月的比较
/*
客户编号
*/
private
String
number
;
/*
客户姓名
*/
private
String
name
;
/*
客户经理姓名
*/
private
String
salesman
;
/*
客户经理ID
customer_service 客户表中的跟进客服
*/
private
String
salesmanid
;
/*
总值,海运拼柜,专线空运
*/
private
BigDecimal
allsumvolume
;
/*
总值同比
*/
private
BigDecimal
allsumvolumeTb
;
private
String
allsumvolumeTbMsg
;
/*
海运拼柜
*/
private
BigDecimal
sumvolume1
;
private
BigDecimal
sumvolumeTb1
;
/*
海运拼柜占比
*/
private
String
seaZb
;
/*
专线空运
*/
private
BigDecimal
sumweight3
;
private
BigDecimal
sumweightTb3
;
/*
空运占比
*/
private
String
airZb
;
private
String
deptname
;
/*
对比年份
*/
private
String
duibiYear
;
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/entity/EcwReportPermission.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
entity
;
import
java.util.Date
;
import
cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.*
;
/**
* 报表权限(EcwReportPermission)实体类
*
* @author lanbm
* @since 2024-04-09 23:10:39
*/
@TableName
(
"ecw_report_permission"
)
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
EcwReportPermission
extends
BaseDO
{
private
Long
id
;
/**
* 用户ID
*/
private
String
userId
;
/**
* 权限范围1是本人,2部门,3是全公司
*/
private
Integer
permissionFw
;
/**
* 部门详情
* 权限类型是本人 此字段为空
* 权限是部门,部门信息用,分开
* 权限是全公司,此字段为空
*/
private
String
deptId
;
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/entity/EcwReportPermissionPageReq.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
entity
;
import
java.util.Date
;
import
cn.iocoder.yudao.framework.common.pojo.PageParam
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.ToString
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.time.LocalDateTime
;
@Schema
(
description
=
"管理后台 - 分页 Request"
)
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ToString
(
callSuper
=
true
)
public
class
EcwReportPermissionPageReq
extends
PageParam
{
private
int
start
;
private
int
size
;
private
String
userId
;
//用户ID
private
Integer
permissionFw
;
//权限范围
private
String
deptId
;
//部门信息
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/entity/EcwReportPermissionResp.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
entity
;
import
cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* 报表权限(EcwReportPermission)实体类
*
* @author lanbm
* @since 2024-04-09 23:10:39
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
EcwReportPermissionResp
extends
BaseDO
{
private
Long
id
;
/**
* 用户ID
*/
private
String
userId
;
/**
* 用户名称
*/
private
String
userName
;
/**
* 权限范围1是本人,2部门,3是全公司
*/
private
Integer
permissionFw
;
/**
* 部门详情
* 权限类型是本人 此字段为空
* 权限是部门,部门信息用,分开
* 权限是全公司,此字段为空
*/
private
String
deptId
;
/*
部门名称
*/
private
String
deptName
;
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/entity/EcwVz.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
entity
;
import
cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.*
;
/**
* V值转换配置参数(EcwVz)实体类
*
* @author lanbm
* @since 2024-04-02 22:38:22
*/
@TableName
(
"ecw_vz"
)
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
EcwVz
extends
BaseDO
{
private
Long
id
;
/**
* 运输方式
*/
private
String
titleZh
;
/**
* 英文名称
*/
private
String
titleEn
;
/**
* 单位符号 KG,M3 立方
*/
private
String
fuhao
;
/*
1KG对应的VZ,1立方对应的V值
*/
private
float
vz
;
/**
* 0显示 1不显示
*/
private
Integer
status
;
/**
* 排序
*/
private
Integer
aorder
;
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/entity/EcwVzPageReq.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
entity
;
import
java.util.Date
;
import
cn.iocoder.yudao.framework.common.pojo.PageParam
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.ToString
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.time.LocalDateTime
;
@Schema
(
description
=
"管理后台 - 分页 Request"
)
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ToString
(
callSuper
=
true
)
public
class
EcwVzPageReq
extends
PageParam
{
/**
* 运输方式
*/
private
String
titleZh
;
/**
* 单位符号 KG,M3 立方
*/
private
String
fuhao
;
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/entity/Employee.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
entity
;
import
cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.*
;
/**
* (Employee)实体类
*
* @author lanbm
* @since 2024-03-27 21:25:55
*/
@TableName
(
"employee"
)
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
Employee
extends
BaseDO
{
/**
* 员工编号
*/
private
Long
id
;
/**
* 姓名
*/
private
String
name
;
/**
* 性别
*/
private
String
empGender
;
/**
* 年龄
*/
private
Integer
age
;
/**
* 电子邮件
*/
private
String
email
;
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/entity/EmployeePageReq.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
entity
;
import
cn.iocoder.yudao.framework.common.pojo.PageParam
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.ToString
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.time.LocalDateTime
;
@Schema
(
description
=
"管理后台 - 分页 Request"
)
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ToString
(
callSuper
=
true
)
public
class
EmployeePageReq
extends
PageParam
{
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/entity/SalesAnalysisReq.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
entity
;
/*
lanbm 2024-03-31 add
*/
public
class
SalesAnalysisReq
{
/*
订单编号
*/
private
String
orderNo
;
/*
提单编号
*/
private
String
tidanNo
;
/*
销售经理
*/
private
String
salesmanId
;
/*
部门ID
*/
private
String
deptId
;
/*
唛头
*/
private
String
marks
;
/*
是否控货
*/
private
int
isCargoControl
;
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/entity/SalesAnalysisResp.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
entity
;
/*
销售分析查询结果 lanbm 2024-04-02
*/
public
class
SalesAnalysisResp
{
/*
订单编号
*/
private
String
orderNo
;
/*
提单号
*/
private
String
tidanNo
;
/*
订单发货人编号
*/
private
String
orderConsignorName
;
/*
订单发货人客户ID,用户链接
*/
private
String
orderConsignorCusId
;
/*
订单收货人名称
*/
private
String
orderConsigneeName
;
/*
订单收货人客户编号,用于链接
*/
private
String
orderConsigneeCusId
;
/*
客户经理
*/
/*
订单状态
*/
private
String
status
;
/*
运输方式
*/
private
String
transportId
;
/*
始发仓
*/
/*
目的国
*/
/*
目的城市
*/
/*
目的仓
*/
/*
渠道
*/
/*
唛头
*/
private
String
marks
;
/*
是否控货
*/
private
String
isCargoControl
;
/*
创建时间
*/
private
String
createtime
;
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/entity/SalesReportReq.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
entity
;
import
cn.iocoder.yudao.framework.common.pojo.PageParam
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.ToString
;
/*
销售看板查询请求参数
逻辑数据大部分集中在表 ecw_order
lanbm 2024-03-31 add
*/
@Schema
(
description
=
"管理后台-销售看板查询参数"
)
@Data
@ToString
(
callSuper
=
true
)
public
class
SalesReportReq
{
/*
运输方式
1 海运柜拼柜 2海运整柜 3专线空运 4海空联运
*/
//private int transportid;
/*
销售经理
*/
private
String
salesmanid
;
/*
部门ID
*/
private
String
deptid
;
/*
对比年份
*/
private
String
duibiYear
;
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/entity/SalesReportResp.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
entity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.*
;
import
java.math.BigDecimal
;
/*
model字段中不能有下划线,否则转对象会失败
*/
@ApiModel
(
"管理后台 -销售看板查询结果"
)
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
SalesReportResp
{
/*
所有运输方式的总体积,换算V值结果
*/
private
BigDecimal
allsumvolume
;
/*
海运体积
*/
private
BigDecimal
sumvolume1
;
/*
专线空运重量
*/
private
BigDecimal
sumweight3
;
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/entity/bar/CustomerReportBar.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
entity
.
bar
;
import
cn.iocoder.yudao.module.delivery.entity.CustomerReportResp
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.List
;
/*
客户看板返回给图表的Model
lanbm 2024-04-03 add
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
CustomerReportBar
{
private
yAxis
objyAxis
;
private
List
<
series
>
obSseries
;
private
List
<
CustomerReportResp
>
resultList
;
/*
记录总数 lanbm 2024-04-14 add
*/
private
long
total
;
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/entity/bar/series.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
entity
.
bar
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.List
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
series
{
private
String
name
;
private
String
type
;
private
List
<
String
>
data
;
/*
设置不同系列之间的间距
*/
private
String
barGap
;
/*
设置同一系列中不同柱之间的间距
*/
private
String
barCategoryGap
;
/*
自定义提示信息
*/
private
String
myTip
;
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/entity/bar/yAxis.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
entity
.
bar
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.List
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
yAxis
{
private
String
type
;
private
List
<
String
>
data
;
/*
是否倒序
*/
private
boolean
inverse
;
}
\ No newline at end of file
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/entity/deptex/DeptEx.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
entity
.
deptex
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
DeptEx
{
//部门扩展功能 model
private
String
id
;
private
String
name
;
private
String
parentId
;
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/enums/ErrorCodeConstants.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
enums
;
import
cn.iocoder.yudao.framework.common.exception.ErrorCode
;
public
interface
ErrorCodeConstants
{
ErrorCode
TEST_NOT_EXISTS
=
new
ErrorCode
(
2004020001
,
"单号配置不存在"
);
}
\ No newline at end of file
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/mapper/CustomerAnalysisMapper.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
mapper
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX
;
import
cn.iocoder.yudao.module.delivery.entity.CustomerAnalysisReq
;
import
cn.iocoder.yudao.module.delivery.entity.CustomerAnalysisResp
;
import
cn.iocoder.yudao.module.delivery.entity.Employee
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
/**
* (CustomerAnalysis)客户分析
*
* @author lanbm
* @since 2024-04-01
*/
@Mapper
public
interface
CustomerAnalysisMapper
{
List
<
CustomerAnalysisResp
>
getListPage
(
CustomerAnalysisReq
req
);
/*
获取查询条件的总数
*/
Long
GetCount
(
CustomerAnalysisReq
req
);
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/mapper/CustomerReportMapper.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
mapper
;
import
cn.iocoder.yudao.module.delivery.entity.CustomerAnalysisReq
;
import
cn.iocoder.yudao.module.delivery.entity.CustomerReportReq
;
import
cn.iocoder.yudao.module.delivery.entity.CustomerReportResp
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
/**
* (CustomerReport)客户报表
*
* @author lanbm
* @since 2024-04-01
*/
@Mapper
public
interface
CustomerReportMapper
{
List
<
CustomerReportResp
>
getListPage
(
CustomerReportReq
req
);
/*
获取查询条件的总数
*/
Long
GetCount
(
CustomerReportReq
req
);
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/mapper/DeptExMapper.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
mapper
;
import
cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX
;
import
cn.iocoder.yudao.module.delivery.entity.deptex.DeptEx
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
@Mapper
public
interface
DeptExMapper
extends
BaseMapperX
<
DeptEx
>
{
List
<
DeptEx
>
getDeptChild
(
DeptEx
QueryReq
);
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/mapper/EcwReportPermissionMapper.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
mapper
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX
;
import
cn.iocoder.yudao.module.delivery.entity.*
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Mapper
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
org.apache.ibatis.annotations.Mapper
;
import
cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX
;
import
java.util.List
;
/**
* 报表权限(EcwReportPermission)表数据库访问层
*
* @author lanbm
* @since 2024-04-09 23:10:40
*/
@Mapper
public
interface
EcwReportPermissionMapper
extends
BaseMapperX
<
EcwReportPermission
>
{
/*
简单的单表查询,开发效率高,如果关联多表还是是XML比较好
lanbm 2024-04-15 add
*/
default
List
<
EcwReportPermission
>
selectList
(
EcwReportPermission
QueryReq
)
{
return
selectList
(
new
LambdaQueryWrapperX
<
EcwReportPermission
>()
.
eqIfPresent
(
EcwReportPermission:
:
getPermissionFw
,
QueryReq
.
getPermissionFw
())
);
}
default
PageResult
<
EcwReportPermission
>
selectPage
(
EcwReportPermissionPageReq
PageReq
)
{
return
selectPage
(
PageReq
,
new
LambdaQueryWrapperX
<
EcwReportPermission
>()
.
eqIfPresent
(
EcwReportPermission:
:
getPermissionFw
,
PageReq
.
getPermissionFw
())
.
orderByDesc
(
EcwReportPermission:
:
getUpdateTime
)
);
}
/*
实现物理删除
lanbm 2024-04-08 add
*/
int
deleteById2
(
Long
id
);
/*
lanbm 2024-04-15 add
*/
List
<
EcwReportPermissionResp
>
getListPageCustom
(
EcwReportPermissionPageReq
PageReq
);
/*
获取查询条件的总数
*/
Long
GetCount
(
EcwReportPermissionPageReq
req
);
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/mapper/EcwVzMapper.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
mapper
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX
;
import
cn.iocoder.yudao.module.delivery.entity.EcwVz
;
import
cn.iocoder.yudao.module.delivery.entity.EcwVzPageReq
;
import
org.apache.ibatis.annotations.Mapper
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX
;
import
java.util.List
;
/**
* V值转换配置参数(EcwVz)表数据库访问层
*
* @author lanbm
* @since 2024-04-02 22:38:22
*/
@Mapper
public
interface
EcwVzMapper
extends
BaseMapperX
<
EcwVz
>
{
default
List
<
EcwVz
>
selectList
(
EcwVz
QueryReq
)
{
return
selectList
(
new
LambdaQueryWrapperX
<
EcwVz
>());
}
default
PageResult
<
EcwVz
>
selectPage
(
EcwVzPageReq
PageReq
)
{
return
selectPage
(
PageReq
,
new
LambdaQueryWrapperX
<
EcwVz
>()
.
likeIfPresent
(
EcwVz:
:
getTitleZh
,
PageReq
.
getTitleZh
())
.
likeIfPresent
(
EcwVz:
:
getFuhao
,
PageReq
.
getFuhao
())
);
}
/*
实现物理删除
lanbm 2024-04-08 add
*/
int
deleteById2
(
Long
id
);
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/mapper/EmployeeMapper.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
mapper
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.iocoder.yudao.module.delivery.entity.Employee
;
import
cn.iocoder.yudao.module.delivery.entity.EmployeePageReq
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Mapper
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
org.apache.ibatis.annotations.Mapper
;
import
cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX
;
import
java.util.List
;
/**
* (Employee)表数据库访问层
*
* @author lanbm
* @since 2024-03-27 21:25:56
*/
@Mapper
public
interface
EmployeeMapper
extends
BaseMapperX
<
Employee
>
{
default
List
<
Employee
>
selectList
(
Employee
QueryReq
)
{
return
selectList
(
new
LambdaQueryWrapperX
<
Employee
>());
}
default
PageResult
<
Employee
>
selectPage
(
EmployeePageReq
PageReq
)
{
return
selectPage
(
PageReq
,
new
LambdaQueryWrapperX
<
Employee
>());
}
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/mapper/SalesAnalysisMapper.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
mapper
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.module.delivery.entity.SalesAnalysisReq
;
import
cn.iocoder.yudao.module.delivery.entity.SalesAnalysisResp
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* (SalesAnalysis)销售分析
*
* @author lanbm
* @since 2024-04-01
*/
@Mapper
public
interface
SalesAnalysisMapper
{
PageResult
<
SalesAnalysisResp
>
getListPage
(
SalesAnalysisReq
req
);
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/mapper/SalesReportMapper.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
mapper
;
import
cn.iocoder.yudao.module.delivery.entity.SalesReportReq
;
import
cn.iocoder.yudao.module.delivery.entity.SalesReportResp
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* (SalesReport)销售报表
*
* @author lanbm
* @since 2024-04-01
*/
@Mapper
public
interface
SalesReportMapper
{
SalesReportResp
SalesReportCount
(
SalesReportReq
Req
);
int
FirstCustomerCount
(
SalesReportReq
Req
);
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/service/CustomerAnalysisService.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
service
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.module.delivery.entity.*
;
import
java.util.List
;
public
interface
CustomerAnalysisService
{
PageResult
<
CustomerAnalysisResp
>
getListPage
(
CustomerAnalysisReq
req
);
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/service/CustomerReportService.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
service
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.module.delivery.entity.CustomerReportReq
;
import
cn.iocoder.yudao.module.delivery.entity.CustomerReportResp
;
import
java.util.List
;
public
interface
CustomerReportService
{
PageResult
<
CustomerReportResp
>
getListPage
(
CustomerReportReq
req
);
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/service/EcwReportPermissionService.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
service
;
import
cn.iocoder.yudao.module.delivery.entity.EcwReportPermission
;
import
cn.iocoder.yudao.module.delivery.entity.EcwReportPermissionPageReq
;
import
cn.iocoder.yudao.module.delivery.entity.EcwReportPermissionResp
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
java.util.*
;
import
javax.validation.*
;
/**
* 报表权限(EcwReportPermission)表服务接口
*
* @author lanbm
* @since 2024-04-09 23:10:42
*/
public
interface
EcwReportPermissionService
extends
IService
<
EcwReportPermission
>
{
/**
* 创建测试
*
* @param createReq 创建信息
* @return 编号
*/
Long
create
(
@Valid
EcwReportPermission
createReq
);
/**
* 更新测试
*
* @param updateReq 更新信息
*/
void
update
(
@Valid
EcwReportPermission
updateReq
);
/**
* 删除测试
*
* @param id 编号
*/
void
delete
(
Long
id
);
/**
* 获得测试
*
* @param id 编号
* @return 测试
*/
EcwReportPermission
getModel
(
Long
id
);
/**
* 获得测试列表
*
* @param ids 编号
* @return 测试列表
*/
List
<
EcwReportPermission
>
getQueryList
(
Collection
<
Long
>
ids
);
/**
* 获得测试列表, 用于 Excel 导出
*
* @param query 查询
* @return 测试列表
*/
List
<
EcwReportPermission
>
selectList
(
EcwReportPermission
query
);
/**
* 获得测试分页
*
* @param page 查询
* @return 测试分页
*/
PageResult
<
EcwReportPermission
>
getListPage
(
EcwReportPermissionPageReq
page
);
/*
自定义的分页函数 lanbm 2024-04-15 add
*/
PageResult
<
EcwReportPermissionResp
>
getListPageCustom
(
EcwReportPermissionPageReq
page
);
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/service/EcwVzService.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
service
;
import
cn.iocoder.yudao.module.delivery.entity.EcwVz
;
import
cn.iocoder.yudao.module.delivery.entity.EcwVzPageReq
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
java.util.*
;
import
javax.validation.*
;
/**
* V值转换配置参数(EcwVz)表服务接口
*
* @author lanbm
* @since 2024-04-02 22:38:22
*/
public
interface
EcwVzService
extends
IService
<
EcwVz
>
{
/**
* 创建测试
* @param createReq 创建信息
* @return 编号
*/
Long
create
(
@Valid
EcwVz
createReq
);
/**
* 更新测试
* @param updateReq 更新信息
*/
void
update
(
@Valid
EcwVz
updateReq
);
/**
* 删除测试
* @param id 编号
*/
void
delete
(
Long
id
);
/**
* 获得测试
* @param id 编号
* @return 测试
*/
EcwVz
getModel
(
Long
id
);
/**
* 获得测试列表
* @param ids 编号
* @return 测试列表
*/
List
<
EcwVz
>
getQueryList
(
Collection
<
Long
>
ids
);
/**
* 获得测试列表, 用于 Excel 导出
* @param query 查询
* @return 测试列表
*/
List
<
EcwVz
>
getQueryList
(
EcwVz
query
);
/**
* 获得测试分页
* @param page 查询
* @return 测试分页
*/
PageResult
<
EcwVz
>
selectPage
(
EcwVzPageReq
page
);
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/service/EmployeeService.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
service
;
import
cn.iocoder.yudao.module.delivery.entity.Employee
;
import
cn.iocoder.yudao.module.delivery.entity.EmployeePageReq
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
java.util.*
;
import
javax.validation.*
;
/**
* (Employee)表服务接口
*
* @author lanbm
* @since 2024-03-27 21:25:56
*/
public
interface
EmployeeService
extends
IService
<
Employee
>
{
/**
* 创建测试
*
* @param createReq 创建信息
* @return 编号
*/
Long
create
(
@Valid
Employee
createReq
);
/**
* 更新测试
*
* @param updateReq 更新信息
*/
void
update
(
@Valid
Employee
updateReq
);
/**
* 删除测试
*
* @param id 编号
*/
void
delete
(
Long
id
);
/**
* 获得测试
*
* @param id 编号
* @return 测试
*/
Employee
getModel
(
Long
id
);
/**
* 获得测试列表
*
* @param ids 编号
* @return 测试列表
*/
List
<
Employee
>
getQueryList
(
Collection
<
Long
>
ids
);
/**
* 获得测试列表, 用于 Excel 导出
*
* @param query 查询
* @return 测试列表
*/
List
<
Employee
>
getQueryList
(
Employee
query
);
/**
* 获得测试分页
*
* @param page 查询
* @return 测试分页
*/
PageResult
<
Employee
>
getListPage
(
EmployeePageReq
page
);
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/service/Impl/CustomerAnalysisImpl.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
service
.
Impl
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.i18n.core.I18nMessage
;
import
cn.iocoder.yudao.framework.mybatis.core.util.MyBatisUtils
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.module.delivery.entity.CustomerAnalysisReq
;
import
cn.iocoder.yudao.module.delivery.entity.CustomerAnalysisResp
;
import
cn.iocoder.yudao.module.delivery.entity.CustomerReportReq
;
import
cn.iocoder.yudao.module.delivery.mapper.CustomerAnalysisMapper
;
import
cn.iocoder.yudao.module.delivery.service.CustomerAnalysisService
;
import
cn.iocoder.yudao.module.delivery.service.CustomerReportService
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/*
lanbm 2024-04-01 add
客户分析列表
*/
@Service
(
"CustomerAnalysisService"
)
public
class
CustomerAnalysisImpl
implements
CustomerAnalysisService
{
@Autowired
private
CustomerAnalysisMapper
customerAnalysisMapper
;
public
PageResult
<
CustomerAnalysisResp
>
getListPage
(
CustomerAnalysisReq
req
)
{
IPage
<
CustomerAnalysisResp
>
mpPage
=
MyBatisUtils
.
buildPage
(
req
);
long
total
=
customerAnalysisMapper
.
GetCount
(
req
);
System
.
out
.
println
(
"符合条件的客户总数:"
+
String
.
valueOf
(
total
));
int
start
=
(
req
.
getPageNo
()
-
1
)
*
req
.
getPageSize
();
int
size
=
req
.
getPageSize
();
req
.
setSize
(
size
);
req
.
setStart
(
start
);
List
<
CustomerAnalysisResp
>
list
=
customerAnalysisMapper
.
getListPage
(
req
);
return
new
PageResult
<>(
list
,
total
,
mpPage
.
getSize
(),
req
.
getPageNo
(),
(
total
+
mpPage
.
getSize
()
-
1
)
/
mpPage
.
getSize
());
}
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/service/Impl/CustomerReportImpl.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
service
.
Impl
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.mybatis.core.util.MyBatisUtils
;
import
cn.iocoder.yudao.module.delivery.entity.CustomerAnalysisResp
;
import
cn.iocoder.yudao.module.delivery.entity.CustomerReportReq
;
import
cn.iocoder.yudao.module.delivery.entity.CustomerReportResp
;
import
cn.iocoder.yudao.module.delivery.mapper.CustomerAnalysisMapper
;
import
cn.iocoder.yudao.module.delivery.mapper.CustomerReportMapper
;
import
cn.iocoder.yudao.module.delivery.service.CustomerReportService
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
@Service
(
"CustomerReportService"
)
public
class
CustomerReportImpl
implements
CustomerReportService
{
@Autowired
private
CustomerReportMapper
customerReportMapper
;
public
PageResult
<
CustomerReportResp
>
getListPage
(
CustomerReportReq
req
)
{
IPage
<
CustomerReportResp
>
mpPage
=
MyBatisUtils
.
buildPage
(
req
);
long
total
=
customerReportMapper
.
GetCount
(
req
);
System
.
out
.
println
(
"符合条件的客户总数:"
+
String
.
valueOf
(
total
));
int
start
=
(
req
.
getPageNo
()
-
1
)
*
req
.
getPageSize
();
int
size
=
req
.
getPageSize
();
req
.
setSize
(
size
);
req
.
setStart
(
start
);
List
<
CustomerReportResp
>
list
=
customerReportMapper
.
getListPage
(
req
);
return
new
PageResult
<>(
list
,
total
,
mpPage
.
getSize
(),
req
.
getPageNo
(),
(
total
+
mpPage
.
getSize
()
-
1
)
/
mpPage
.
getSize
());
}
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/service/Impl/EcwReportPermissionServiceImpl.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
service
.
Impl
;
import
cn.iocoder.yudao.framework.mybatis.core.util.MyBatisUtils
;
import
cn.iocoder.yudao.module.delivery.entity.EcwReportPermissionResp
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.module.delivery.entity.EcwReportPermission
;
import
cn.iocoder.yudao.module.delivery.entity.EcwReportPermissionPageReq
;
import
cn.iocoder.yudao.module.delivery.mapper.EcwReportPermissionMapper
;
import
cn.iocoder.yudao.module.delivery.service.EcwReportPermissionService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.*
;
import
javax.validation.Valid
;
/**
* 报表权限(EcwReportPermission)表服务实现类
*
* @author lanbm
* @since 2024-04-09 23:10:41
*/
@Service
(
"ecwReportPermissionService"
)
public
class
EcwReportPermissionServiceImpl
extends
ServiceImpl
<
EcwReportPermissionMapper
,
EcwReportPermission
>
implements
EcwReportPermissionService
{
@Autowired
private
EcwReportPermissionMapper
ecwReportPermissionMapper
;
/**
* 创建测试
*
* @param createReq 创建信息
* @return 编号
*/
public
Long
create
(
@Valid
EcwReportPermission
createReq
)
{
ecwReportPermissionMapper
.
insert
(
createReq
);
return
createReq
.
getId
();
}
/**
* 更新测试
*
* @param updateReq 更新信息
*/
public
void
update
(
@Valid
EcwReportPermission
updateReq
)
{
ecwReportPermissionMapper
.
updateById
(
updateReq
);
}
/**
* 物理删除记录,避免表存在无用的记录,影响查询效率
*
* @param id 编号
*/
public
void
delete
(
Long
id
)
{
ecwReportPermissionMapper
.
deleteById2
(
id
);
}
/**
* 获得测试
*
* @param id 编号
* @return 测试
*/
public
EcwReportPermission
getModel
(
Long
id
)
{
return
ecwReportPermissionMapper
.
selectById
(
id
);
}
/**
* 获得测试列表
*
* @param ids 编号
* @return 测试列表
*/
public
List
<
EcwReportPermission
>
getQueryList
(
Collection
<
Long
>
ids
)
{
return
ecwReportPermissionMapper
.
selectBatchIds
(
ids
);
}
/**
* 获得测试列表, 用于 Excel 导出
*
* @param query 查询
* @return 列表
*/
public
List
<
EcwReportPermission
>
selectList
(
EcwReportPermission
query
)
{
return
ecwReportPermissionMapper
.
selectList
(
query
);
}
/**
* 获得测试分页
*
* @param page 分页查询
* @param page 查询
* @return 分页列表
*/
public
PageResult
<
EcwReportPermission
>
getListPage
(
EcwReportPermissionPageReq
page
)
{
return
ecwReportPermissionMapper
.
selectPage
(
page
);
}
/*
自定义的分页函数 lanbm 2024-04-15 add
*/
public
PageResult
<
EcwReportPermissionResp
>
getListPageCustom
(
EcwReportPermissionPageReq
page
)
{
IPage
<
EcwReportPermission
>
mpPage
=
MyBatisUtils
.
buildPage
(
page
);
long
total
=
ecwReportPermissionMapper
.
GetCount
(
page
);
int
start
=
(
page
.
getPageNo
()
-
1
)
*
page
.
getPageSize
();
int
size
=
page
.
getPageSize
();
page
.
setSize
(
size
);
page
.
setStart
(
start
);
List
<
EcwReportPermissionResp
>
list
=
ecwReportPermissionMapper
.
getListPageCustom
(
page
);
return
new
PageResult
<>(
list
,
total
,
mpPage
.
getSize
(),
page
.
getPageNo
(),
(
total
+
mpPage
.
getSize
()
-
1
)
/
mpPage
.
getSize
());
}
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/service/Impl/EcwVzServiceImpl.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
service
.
Impl
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.module.delivery.entity.EcwVz
;
import
cn.iocoder.yudao.module.delivery.entity.EcwVzPageReq
;
import
cn.iocoder.yudao.module.delivery.mapper.EcwVzMapper
;
import
cn.iocoder.yudao.module.delivery.service.EcwVzService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.*
;
import
javax.validation.Valid
;
/**
* V值转换配置参数(EcwVz)表服务实现类
*
* @author lanbm
* @since 2024-04-02 22:38:22
*/
@Service
(
"ecwVzService"
)
public
class
EcwVzServiceImpl
extends
ServiceImpl
<
EcwVzMapper
,
EcwVz
>
implements
EcwVzService
{
@Autowired
private
EcwVzMapper
ecwVzMapper
;
/**
* 创建测试
* @param createReq 创建信息
* @return 编号
*/
public
Long
create
(
@Valid
EcwVz
createReq
)
{
ecwVzMapper
.
insert
(
createReq
);
return
createReq
.
getId
();
}
/**
* 更新测试
* @param updateReq 更新信息
*/
public
void
update
(
@Valid
EcwVz
updateReq
)
{
ecwVzMapper
.
updateById
(
updateReq
);
}
/**
* 删除测试
* @param id 编号
*/
public
void
delete
(
Long
id
)
{
ecwVzMapper
.
deleteById2
(
id
);
}
/**
* 获得测试
* @param id 编号
* @return 测试
*/
public
EcwVz
getModel
(
Long
id
)
{
return
ecwVzMapper
.
selectById
(
id
);
}
/**
* 获得测试列表
* @param ids 编号
* @return 测试列表
*/
public
List
<
EcwVz
>
getQueryList
(
Collection
<
Long
>
ids
)
{
return
ecwVzMapper
.
selectBatchIds
(
ids
);
}
/**
* 获得测试列表, 用于 Excel 导出
* @param query 查询
* @return 列表
*/
public
List
<
EcwVz
>
getQueryList
(
EcwVz
query
)
{
return
ecwVzMapper
.
selectList
(
query
);
}
/**
* 获得测试分页
* @param page 分页查询
* @param page 查询
* @return 分页列表
*/
public
PageResult
<
EcwVz
>
selectPage
(
EcwVzPageReq
page
)
{
return
ecwVzMapper
.
selectPage
(
page
);
}
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/service/Impl/EmployeeServiceImpl.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
service
.
Impl
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.module.delivery.entity.Employee
;
import
cn.iocoder.yudao.module.delivery.entity.EmployeePageReq
;
import
cn.iocoder.yudao.module.delivery.mapper.EmployeeMapper
;
import
cn.iocoder.yudao.module.delivery.service.EmployeeService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.*
;
import
javax.validation.Valid
;
/**
* (Employee)表服务实现类
*
* @author lanbm
* @since 2024-03-27 21:25:56
*/
@Service
(
"employeeService"
)
public
class
EmployeeServiceImpl
extends
ServiceImpl
<
EmployeeMapper
,
Employee
>
implements
EmployeeService
{
@Autowired
private
EmployeeMapper
employeeMapper
;
/**
* 创建测试
*
* @param createReq 创建信息
* @return 编号
*/
public
Long
create
(
@Valid
Employee
createReq
)
{
employeeMapper
.
insert
(
createReq
);
return
createReq
.
getId
();
}
/**
* 更新测试
*
* @param updateReq 更新信息
*/
public
void
update
(
@Valid
Employee
updateReq
)
{
employeeMapper
.
updateById
(
updateReq
);
}
/**
* 删除测试
*
* @param id 编号
*/
public
void
delete
(
Long
id
)
{
employeeMapper
.
deleteById
(
id
);
}
/**
* 获得测试
*
* @param id 编号
* @return 测试
*/
public
Employee
getModel
(
Long
id
)
{
return
employeeMapper
.
selectById
(
id
);
}
/**
* 获得测试列表
*
* @param ids 编号
* @return 测试列表
*/
public
List
<
Employee
>
getQueryList
(
Collection
<
Long
>
ids
)
{
return
employeeMapper
.
selectBatchIds
(
ids
);
}
/**
* 获得测试列表, 用于 Excel 导出
*
* @param query 查询
* @return 列表
*/
public
List
<
Employee
>
getQueryList
(
Employee
query
)
{
return
employeeMapper
.
selectList
(
query
);
}
/**
* 获得测试分页
*
* @param page 分页查询
* @param page 查询
* @return 分页列表
*/
public
PageResult
<
Employee
>
getListPage
(
EmployeePageReq
page
)
{
return
employeeMapper
.
selectPage
(
page
);
}
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/service/Impl/SalesAnalysisImpl.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
service
.
Impl
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.module.delivery.entity.SalesAnalysisReq
;
import
cn.iocoder.yudao.module.delivery.entity.SalesAnalysisResp
;
import
cn.iocoder.yudao.module.delivery.mapper.SalesAnalysisMapper
;
import
cn.iocoder.yudao.module.delivery.service.SalesAnalysisService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
/*
lanbm 2024-04-01
*/
@Service
(
"SalesAnalysisService"
)
public
class
SalesAnalysisImpl
implements
SalesAnalysisService
{
@Autowired
private
SalesAnalysisMapper
salesAnalysisMapper
;
public
PageResult
<
SalesAnalysisResp
>
getListPage
(
SalesAnalysisReq
page
)
{
return
null
;
}
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/service/Impl/SalesReportImpl.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
service
.
Impl
;
import
cn.iocoder.yudao.module.delivery.entity.SalesReportReq
;
import
cn.iocoder.yudao.module.delivery.entity.SalesReportResp
;
import
cn.iocoder.yudao.module.delivery.mapper.EmployeeMapper
;
import
cn.iocoder.yudao.module.delivery.mapper.SalesReportMapper
;
import
cn.iocoder.yudao.module.delivery.service.SalesReportService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
/*
销售看板统计报表
lanbm 2024-04-01 add
*/
@Service
(
"SalesReportService"
)
public
class
SalesReportImpl
implements
SalesReportService
{
@Autowired
private
SalesReportMapper
salesReportMapper
;
public
SalesReportResp
SalesReportCount
(
SalesReportReq
Req
)
{
return
salesReportMapper
.
SalesReportCount
(
Req
);
}
public
int
FirstCustomerCount
(
SalesReportReq
Req
)
{
return
salesReportMapper
.
FirstCustomerCount
(
Req
);
}
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/service/SalesAnalysisService.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
service
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.module.delivery.entity.SalesAnalysisReq
;
import
cn.iocoder.yudao.module.delivery.entity.SalesAnalysisResp
;
public
interface
SalesAnalysisService
{
PageResult
<
SalesAnalysisResp
>
getListPage
(
SalesAnalysisReq
page
);
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/service/SalesReportService.java
0 → 100644
View file @
a5c5cfda
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
service
;
import
cn.iocoder.yudao.module.delivery.entity.SalesReportReq
;
import
cn.iocoder.yudao.module.delivery.entity.SalesReportResp
;
public
interface
SalesReportService
{
SalesReportResp
SalesReportCount
(
SalesReportReq
Req
);
int
FirstCustomerCount
(
SalesReportReq
Req
);
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/resources/mapper/DeptEx.xml
0 → 100644
View file @
a5c5cfda
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.iocoder.yudao.module.delivery.mapper.DeptExMapper"
>
<select
id=
"getDeptChild"
resultType=
"cn.iocoder.yudao.module.delivery.entity.deptex.DeptEx"
>
WITH RECURSIVE recursion (id, name, parent_id, sort) AS (
SELECT T1.id,
T1.name,
T1.parent_id,
T1.sort
FROM system_dept T1
WHERE T1.id = 123
UNION ALL
SELECT T2.id,
T2.name,
T2.parent_id,
T2.sort
FROM system_dept T2,
recursion T3
WHERE T2.parent_id = T3.id
)
SELECT T.id,
T.name,
T.parent_id
FROM system_dept T
ORDER BY sort asc;
</select>
</mapper>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment