Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
fangxinjiang
yifu-mvp
Commits
3f614dd9
Commit
3f614dd9
authored
Jun 21, 2023
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop'
parents
1f98ba00
a09a352f
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
2444 additions
and
343 deletions
+2444
-343
TPersonnelRoster.java
.../cloud/plus/v1/yifu/archives/entity/TPersonnelRoster.java
+370
-0
TPersonnelRosterSearchVo.java
...ud/plus/v1/yifu/archives/vo/TPersonnelRosterSearchVo.java
+56
-0
TPersonnelRosterVo.java
...fu/cloud/plus/v1/yifu/archives/vo/TPersonnelRosterVo.java
+369
-0
TPersonnelRosterController.java
.../yifu/archives/controller/TPersonnelRosterController.java
+136
-0
TPersonnelRosterMapper.java
.../plus/v1/yifu/archives/mapper/TPersonnelRosterMapper.java
+41
-0
TPersonnelRosterService.java
...lus/v1/yifu/archives/service/TPersonnelRosterService.java
+49
-0
TPersonnelRosterServiceImpl.java
...fu/archives/service/impl/TPersonnelRosterServiceImpl.java
+171
-0
TPersonnelRosterMapper.xml
...-biz/src/main/resources/mapper/TPersonnelRosterMapper.xml
+249
-0
DaprMsgProperties.java
...ud/plus/v1/yifu/common/dapr/config/DaprMsgProperties.java
+39
-0
daprConfig.properties
...yifu-common-dapr/src/main/resources/daprConfig.properties
+16
-15
seata-config.yml
...mon/yifu-common-seata/src/main/resources/seata-config.yml
+1
-1
MsgTask.java
...main/java/com/yifu/cloud/plus/v1/job/compont/MsgTask.java
+41
-0
SalaryTask.java
...n/java/com/yifu/cloud/plus/v1/job/compont/SalaryTask.java
+13
-0
MsgInfo.java
.../main/java/com/yifu/cloud/plus/v1/msg/entity/MsgInfo.java
+23
-14
MesConstants.java
...ava/com/yifu/cloud/plus/v1/msg/constant/MesConstants.java
+1
-5
MsgInfoController.java
.../yifu/cloud/plus/v1/msg/controller/MsgInfoController.java
+1
-1
MsgInfoServiceImpl.java
...fu/cloud/plus/v1/msg/service/impl/MsgInfoServiceImpl.java
+50
-3
application.yml
yifu-msg/yifu-msg-biz/src/main/resources/application.yml
+2
-4
MsgInfoMapper.xml
.../yifu-msg-biz/src/main/resources/mapper/MsgInfoMapper.xml
+34
-25
OrderAttVo.java
...java/com/yifu/cloud/plus/v1/yifu/order/vo/OrderAttVo.java
+35
-0
EkpOrderController.java
...oud/plus/v1/yifu/order/controller/EkpOrderController.java
+23
-0
TOrderService.java
.../yifu/cloud/plus/v1/yifu/order/service/TOrderService.java
+12
-0
TOrderServiceImpl.java
...ud/plus/v1/yifu/order/service/impl/TOrderServiceImpl.java
+334
-275
TAverageSalary.java
...yifu/cloud/plus/v1/yifu/salary/entity/TAverageSalary.java
+64
-0
TAverageSalaryVo.java
...m/yifu/cloud/plus/v1/yifu/salary/vo/TAverageSalaryVo.java
+39
-0
TAverageSalaryController.java
...s/v1/yifu/salary/controller/TAverageSalaryController.java
+98
-0
TAverageSalaryMapper.java
...loud/plus/v1/yifu/salary/mapper/TAverageSalaryMapper.java
+44
-0
TAverageSalaryService.java
...ud/plus/v1/yifu/salary/service/TAverageSalaryService.java
+26
-0
TAverageSalaryServiceImpl.java
...1/yifu/salary/service/impl/TAverageSalaryServiceImpl.java
+52
-0
application.yml
...salary/yifu-salary-biz/src/main/resources/application.yml
+1
-0
TAverageSalaryMapper.xml
...ry-biz/src/main/resources/mapper/TAverageSalaryMapper.xml
+54
-0
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TPersonnelRoster.java
0 → 100644
View file @
3f614dd9
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
entity
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.hibernate.validator.constraints.Length
;
import
java.util.Date
;
/**
* @author fxj
* @date 2023-06-13 15:42:17
*/
@Data
@TableName
(
"t_personnel_roster"
)
@EqualsAndHashCode
(
callSuper
=
true
)
@Schema
(
description
=
""
)
public
class
TPersonnelRoster
extends
BaseEntity
{
/**
* id
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@ExcelProperty
(
"id"
)
@Schema
(
description
=
"id"
)
private
String
id
;
/**
* 客户名称
*/
@ExcelAttribute
(
name
=
"客户名称"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"客户名称不能超过50个字符"
)
@ExcelProperty
(
"客户名称"
)
@Schema
(
description
=
"客户名称"
)
private
String
customerName
;
/**
* 项目名称
*/
@ExcelAttribute
(
name
=
"项目名称"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"项目名称不能超过50个字符"
)
@ExcelProperty
(
"项目名称"
)
@Schema
(
description
=
"项目名称"
)
private
String
departName
;
/**
* 项目编码
*/
@ExcelAttribute
(
name
=
"项目编码"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"项目编码不能超过50个字符"
)
@ExcelProperty
(
"项目编码"
)
@Schema
(
description
=
"项目编码"
)
private
String
departNo
;
/**
* 业务类型
*/
@ExcelAttribute
(
name
=
"业务类型"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"业务类型不能超过50个字符"
)
@ExcelProperty
(
"业务类型"
)
@Schema
(
description
=
"业务类型"
)
private
String
businessPrimary
;
/**
* 二级分类
*/
@ExcelAttribute
(
name
=
"二级分类"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"二级分类不能超过50个字符"
)
@ExcelProperty
(
"二级分类"
)
@Schema
(
description
=
"二级分类"
)
private
String
businessSeconed
;
/**
* 三级分类
*/
@ExcelAttribute
(
name
=
"三级分类"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"三级分类不能超过50个字符"
)
@ExcelProperty
(
"三级分类"
)
@Schema
(
description
=
"三级分类"
)
private
String
businessThird
;
/**
* 标签
*/
@ExcelAttribute
(
name
=
"标签"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"标签不能超过50个字符"
)
@ExcelProperty
(
"标签"
)
@Schema
(
description
=
"标签"
)
private
String
label
;
/**
* 条线类型
*/
@ExcelAttribute
(
name
=
"条线类型"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"条线类型不能超过50个字符"
)
@ExcelProperty
(
"条线类型"
)
@Schema
(
description
=
"条线类型"
)
private
String
businessType
;
/**
* BU归属
*/
@ExcelAttribute
(
name
=
"BU归属"
,
maxLength
=
30
)
@Length
(
max
=
30
,
message
=
"BU归属不能超过30个字符"
)
@ExcelProperty
(
"BU归属"
)
@Schema
(
description
=
"BU归属"
)
private
String
buBelong
;
/**
* 员工类型
*/
@ExcelAttribute
(
name
=
"员工类型"
,
maxLength
=
20
)
@Length
(
max
=
20
,
message
=
"员工类型不能超过20个字符"
)
@ExcelProperty
(
"员工类型"
)
@Schema
(
description
=
"员工类型"
)
private
String
empType
;
/**
* 员工姓名
*/
@ExcelAttribute
(
name
=
"员工姓名"
,
maxLength
=
20
)
@Length
(
max
=
20
,
message
=
"员工姓名不能超过20个字符"
)
@ExcelProperty
(
"员工姓名"
)
@Schema
(
description
=
"员工姓名"
)
private
String
empName
;
/**
* 性别
*/
@ExcelAttribute
(
name
=
"性别"
,
maxLength
=
10
)
@Length
(
max
=
10
,
message
=
"性别不能超过10个字符"
)
@ExcelProperty
(
"性别"
)
@Schema
(
description
=
"性别"
)
private
String
empSex
;
/**
* 出生日期
*/
@ExcelAttribute
(
name
=
"出生日期"
,
isDate
=
true
)
@ExcelProperty
(
"出生日期"
)
@Schema
(
description
=
"出生日期"
)
private
Date
empBirthDate
;
/**
* 年龄
*/
@ExcelAttribute
(
name
=
"年龄"
,
maxLength
=
3
)
@Length
(
max
=
3
,
message
=
"年龄不能超过3个字符"
)
@ExcelProperty
(
"年龄"
)
@Schema
(
description
=
"年龄"
)
private
String
empAge
;
/**
* 身份证号
*/
@ExcelAttribute
(
name
=
"身份证号"
,
maxLength
=
20
)
@Length
(
max
=
20
,
message
=
"身份证号不能超过20个字符"
)
@ExcelProperty
(
"身份证号"
)
@Schema
(
description
=
"身份证号"
)
private
String
empIdcard
;
/**
* 银行卡号
*/
@ExcelAttribute
(
name
=
"银行卡号"
,
maxLength
=
25
)
@Length
(
max
=
25
,
message
=
"银行卡号不能超过25个字符"
)
@ExcelProperty
(
"银行卡号"
)
@Schema
(
description
=
"银行卡号"
)
private
String
bankNo
;
/**
* 开户行总行
*/
@ExcelAttribute
(
name
=
"开户行总行"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"开户行总行不能超过50个字符"
)
@ExcelProperty
(
"开户行总行"
)
@Schema
(
description
=
"开户行总行"
)
private
String
bankName
;
/**
* 开户行-省
*/
@ExcelAttribute
(
name
=
"开户行-省"
,
maxLength
=
30
)
@Length
(
max
=
30
,
message
=
"开户行-省不能超过30个字符"
)
@ExcelProperty
(
"开户行-省"
)
@Schema
(
description
=
"开户行-省"
)
private
String
bankProvince
;
/**
* 开户行-市
*/
@ExcelAttribute
(
name
=
"开户行-市"
,
maxLength
=
30
)
@Length
(
max
=
30
,
message
=
"开户行-市不能超过30个字符"
)
@ExcelProperty
(
"开户行-市"
)
@Schema
(
description
=
"开户行-市"
)
private
String
bankCity
;
/**
* 开户行支行
*/
@ExcelAttribute
(
name
=
"开户行支行"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"开户行支行不能超过50个字符"
)
@ExcelProperty
(
"开户行支行"
)
@Schema
(
description
=
"开户行支行"
)
private
String
bankNameSub
;
/**
* 手机号码
*/
@ExcelAttribute
(
name
=
"手机号码"
,
maxLength
=
15
)
@Length
(
max
=
15
,
message
=
"手机号码不能超过15个字符"
)
@ExcelProperty
(
"手机号码"
)
@Schema
(
description
=
"手机号码"
)
private
String
empPhone
;
/**
* 档案地-省
*/
@ExcelAttribute
(
name
=
"档案地-省"
,
maxLength
=
30
)
@Length
(
max
=
30
,
message
=
"档案地-省不能超过30个字符"
)
@ExcelProperty
(
"档案地-省"
)
@Schema
(
description
=
"档案地-省"
)
private
String
empProvince
;
/**
* 档案地-市
*/
@ExcelAttribute
(
name
=
"档案地-市"
,
maxLength
=
30
)
@Length
(
max
=
30
,
message
=
"档案地-市不能超过30个字符"
)
@ExcelProperty
(
"档案地-市"
)
@Schema
(
description
=
"档案地-市"
)
private
String
empCity
;
/**
* 档案地-县
*/
@ExcelAttribute
(
name
=
"档案地-县"
,
maxLength
=
30
)
@Length
(
max
=
30
,
message
=
"档案地-县不能超过30个字符"
)
@ExcelProperty
(
"档案地-县"
)
@Schema
(
description
=
"档案地-县"
)
private
String
empTown
;
/**
* 社保缴纳地
*/
@ExcelAttribute
(
name
=
"社保缴纳地"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"社保缴纳地不能超过50个字符"
)
@ExcelProperty
(
"社保缴纳地"
)
@Schema
(
description
=
"社保缴纳地"
)
private
String
socialAddress
;
/**
* 合同申请编号
*/
@ExcelAttribute
(
name
=
"合同申请编号"
,
maxLength
=
32
)
@Length
(
max
=
32
,
message
=
"合同申请编号不能超过32个字符"
)
@ExcelProperty
(
"合同申请编号"
)
@Schema
(
description
=
"合同申请编号"
)
private
String
contractApplyNo
;
/**
* 合同起始时间
*/
@ExcelAttribute
(
name
=
"合同起始时间"
,
maxLength
=
20
)
@Length
(
max
=
20
,
message
=
"合同起始时间不能超过20个字符"
)
@ExcelProperty
(
"合同起始时间"
)
@Schema
(
description
=
"合同起始时间"
)
private
String
contractStart
;
/**
* 合同截止时间
*/
@ExcelAttribute
(
name
=
"合同截止时间"
,
maxLength
=
20
)
@Length
(
max
=
20
,
message
=
"合同截止时间不能超过20个字符"
)
@ExcelProperty
(
"合同截止时间"
)
@Schema
(
description
=
"合同截止时间"
)
private
String
contractEnd
;
/**
* 合同类型
*/
@ExcelAttribute
(
name
=
"合同类型"
,
maxLength
=
10
)
@Length
(
max
=
10
,
message
=
"合同类型不能超过10个字符"
)
@ExcelProperty
(
"合同类型"
)
@Schema
(
description
=
"合同类型"
)
private
String
contractType
;
/**
* 业务细分
*/
@ExcelAttribute
(
name
=
"业务细分"
,
maxLength
=
20
)
@Length
(
max
=
20
,
message
=
"业务细分不能超过20个字符"
)
@ExcelProperty
(
"业务细分"
)
@Schema
(
description
=
"业务细分"
)
private
String
businessDetail
;
/**
* 签订类型
*/
@ExcelAttribute
(
name
=
"签订类型"
,
maxLength
=
20
)
@Length
(
max
=
20
,
message
=
"签订类型不能超过20个字符"
)
@ExcelProperty
(
"签订类型"
)
@Schema
(
description
=
"签订类型"
)
private
String
signType
;
/**
* 签订期限
*/
@ExcelAttribute
(
name
=
"签订期限"
,
maxLength
=
10
)
@Length
(
max
=
10
,
message
=
"签订期限不能超过10个字符"
)
@ExcelProperty
(
"签订期限"
)
@Schema
(
description
=
"签订期限"
)
private
String
signTerm
;
/**
* 合同甲方
*/
@ExcelAttribute
(
name
=
"合同甲方"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"合同甲方不能超过50个字符"
)
@ExcelProperty
(
"合同甲方"
)
@Schema
(
description
=
"合同甲方"
)
private
String
contractPartyA
;
/**
* 合同岗位
*/
@ExcelAttribute
(
name
=
"合同岗位"
,
maxLength
=
20
)
@Length
(
max
=
20
,
message
=
"合同岗位不能超过20个字符"
)
@ExcelProperty
(
"合同岗位"
)
@Schema
(
description
=
"合同岗位"
)
private
String
contractPost
;
/**
* 工时制
*/
@ExcelAttribute
(
name
=
"工时制"
,
maxLength
=
10
)
@Length
(
max
=
10
,
message
=
"工时制不能超过10个字符"
)
@ExcelProperty
(
"工时制"
)
@Schema
(
description
=
"工时制"
)
private
String
contractTaskTime
;
/**
* 合同编码
*/
@ExcelAttribute
(
name
=
"合同编码"
,
maxLength
=
30
)
@Length
(
max
=
30
,
message
=
"合同编码不能超过30个字符"
)
@ExcelProperty
(
"合同编码"
)
@Schema
(
description
=
"合同编码"
)
private
String
contractCode
;
/**
* 合同创建人
*/
@ExcelAttribute
(
name
=
"合同创建人"
,
maxLength
=
10
)
@Length
(
max
=
10
,
message
=
"合同创建人不能超过10个字符"
)
@ExcelProperty
(
"合同创建人"
)
@Schema
(
description
=
"合同创建人"
)
private
String
contractCreater
;
/**
* 合同创建时间
*/
@ExcelAttribute
(
name
=
"合同创建时间"
,
maxLength
=
10
)
@Length
(
max
=
10
,
message
=
"合同创建时间不能超过10个字符"
)
@ExcelProperty
(
"合同创建时间"
)
@Schema
(
description
=
"合同创建时间"
)
private
String
contractCreateTime
;
/**
* 数据生产月
*/
@ExcelAttribute
(
name
=
"数据生产月"
,
maxLength
=
10
)
@Length
(
max
=
10
,
message
=
"数据生产月不能超过10个字符"
)
@ExcelProperty
(
"数据生产月"
)
@Schema
(
description
=
"数据生产月"
)
private
String
dataCreateMonth
;
/**
* dataCreateMomth
*/
@ExcelAttribute
(
name
=
"dataCreateMomth"
,
maxLength
=
255
)
@Length
(
max
=
255
,
message
=
"dataCreateMomth不能超过255个字符"
)
@ExcelProperty
(
"dataCreateMomth"
)
@Schema
(
description
=
"dataCreateMomth"
)
private
String
dataCreateMomth
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TPersonnelRosterSearchVo.java
0 → 100644
View file @
3f614dd9
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TPersonnelRoster
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.time.LocalDateTime
;
/**
* @author fxj
* @date 2023-06-13 15:42:17
*/
@Data
public
class
TPersonnelRosterSearchVo
extends
TPersonnelRoster
{
/**
* 多选导出或删除等操作
*/
@Schema
(
description
=
"选中ID,多个逗号分割"
)
private
String
ids
;
/**
* 创建时间区间 [开始时间,结束时间]
*/
@Schema
(
description
=
"创建时间区间"
)
private
LocalDateTime
[]
createTimes
;
/**
* @Author fxj
* 查询数据起
**/
@Schema
(
description
=
"查询limit 开始"
)
private
int
limitStart
;
/**
* @Author fxj
* 查询数据止
**/
@Schema
(
description
=
"查询limit 数据条数"
)
private
int
limitEnd
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TPersonnelRosterVo.java
0 → 100644
View file @
3f614dd9
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @author fxj
* @date 2023-06-13 15:42:17
*/
@Data
public
class
TPersonnelRosterVo
extends
RowIndex
implements
Serializable
{
/**
* id
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@NotBlank
(
message
=
"id 不能为空"
)
@Length
(
max
=
32
,
message
=
"id 不能超过32 个字符"
)
@ExcelAttribute
(
name
=
"id"
,
isNotEmpty
=
true
,
errorInfo
=
"id 不能为空"
,
maxLength
=
32
)
@Schema
(
description
=
"id"
)
@ExcelProperty
(
"id"
)
private
String
id
;
/**
* 客户名称
*/
@Length
(
max
=
50
,
message
=
"客户名称 不能超过50 个字符"
)
@ExcelAttribute
(
name
=
"客户名称"
,
maxLength
=
50
)
@Schema
(
description
=
"客户名称"
)
@ExcelProperty
(
"客户名称"
)
private
String
customerName
;
/**
* 项目名称
*/
@Length
(
max
=
50
,
message
=
"项目名称 不能超过50 个字符"
)
@ExcelAttribute
(
name
=
"项目名称"
,
maxLength
=
50
)
@Schema
(
description
=
"项目名称"
)
@ExcelProperty
(
"项目名称"
)
private
String
departName
;
/**
* 项目编码
*/
@Length
(
max
=
50
,
message
=
"项目编码 不能超过50 个字符"
)
@ExcelAttribute
(
name
=
"项目编码"
,
maxLength
=
50
)
@Schema
(
description
=
"项目编码"
)
@ExcelProperty
(
"项目编码"
)
private
String
departNo
;
/**
* 业务类型
*/
@Length
(
max
=
50
,
message
=
"业务类型 不能超过50 个字符"
)
@ExcelAttribute
(
name
=
"业务类型"
,
maxLength
=
50
)
@Schema
(
description
=
"业务类型"
)
@ExcelProperty
(
"业务类型"
)
private
String
businessPrimary
;
/**
* 二级分类
*/
@Length
(
max
=
50
,
message
=
"二级分类 不能超过50 个字符"
)
@ExcelAttribute
(
name
=
"二级分类"
,
maxLength
=
50
)
@Schema
(
description
=
"二级分类"
)
@ExcelProperty
(
"二级分类"
)
private
String
businessSeconed
;
/**
* 三级分类
*/
@Length
(
max
=
50
,
message
=
"三级分类 不能超过50 个字符"
)
@ExcelAttribute
(
name
=
"三级分类"
,
maxLength
=
50
)
@Schema
(
description
=
"三级分类"
)
@ExcelProperty
(
"三级分类"
)
private
String
businessThird
;
/**
* 标签
*/
@Length
(
max
=
50
,
message
=
"标签 不能超过50 个字符"
)
@ExcelAttribute
(
name
=
"标签"
,
maxLength
=
50
)
@Schema
(
description
=
"标签"
)
@ExcelProperty
(
"标签"
)
private
String
label
;
/**
* 条线类型
*/
@Length
(
max
=
50
,
message
=
"条线类型 不能超过50 个字符"
)
@ExcelAttribute
(
name
=
"条线类型"
,
maxLength
=
50
)
@Schema
(
description
=
"条线类型"
)
@ExcelProperty
(
"条线类型"
)
private
String
businessType
;
/**
* BU归属
*/
@Length
(
max
=
30
,
message
=
"BU归属 不能超过30 个字符"
)
@ExcelAttribute
(
name
=
"BU归属"
,
maxLength
=
30
)
@Schema
(
description
=
"BU归属"
)
@ExcelProperty
(
"BU归属"
)
private
String
buBelong
;
/**
* 员工类型
*/
@Length
(
max
=
20
,
message
=
"员工类型 不能超过20 个字符"
)
@ExcelAttribute
(
name
=
"员工类型"
,
maxLength
=
20
)
@Schema
(
description
=
"员工类型"
)
@ExcelProperty
(
"员工类型"
)
private
String
empType
;
/**
* 员工姓名
*/
@Length
(
max
=
20
,
message
=
"员工姓名 不能超过20 个字符"
)
@ExcelAttribute
(
name
=
"员工姓名"
,
maxLength
=
20
)
@Schema
(
description
=
"员工姓名"
)
@ExcelProperty
(
"员工姓名"
)
private
String
empName
;
/**
* 性别
*/
@Length
(
max
=
10
,
message
=
"性别 不能超过10 个字符"
)
@ExcelAttribute
(
name
=
"性别"
,
maxLength
=
10
)
@Schema
(
description
=
"性别"
)
@ExcelProperty
(
"性别"
)
private
String
empSex
;
/**
* 出生日期
*/
@ExcelAttribute
(
name
=
"出生日期"
,
isDate
=
true
)
@Schema
(
description
=
"出生日期"
)
@ExcelProperty
(
"出生日期"
)
private
Date
empBirthDate
;
/**
* 年龄
*/
@Length
(
max
=
3
,
message
=
"年龄 不能超过3 个字符"
)
@ExcelAttribute
(
name
=
"年龄"
,
maxLength
=
3
)
@Schema
(
description
=
"年龄"
)
@ExcelProperty
(
"年龄"
)
private
String
empAge
;
/**
* 身份证号
*/
@Length
(
max
=
20
,
message
=
"身份证号 不能超过20 个字符"
)
@ExcelAttribute
(
name
=
"身份证号"
,
maxLength
=
20
)
@Schema
(
description
=
"身份证号"
)
@ExcelProperty
(
"身份证号"
)
private
String
empIdcard
;
/**
* 银行卡号
*/
@Length
(
max
=
25
,
message
=
"银行卡号 不能超过25 个字符"
)
@ExcelAttribute
(
name
=
"银行卡号"
,
maxLength
=
25
)
@Schema
(
description
=
"银行卡号"
)
@ExcelProperty
(
"银行卡号"
)
private
String
bankNo
;
/**
* 开户行总行
*/
@Length
(
max
=
50
,
message
=
"开户行总行 不能超过50 个字符"
)
@ExcelAttribute
(
name
=
"开户行总行"
,
maxLength
=
50
)
@Schema
(
description
=
"开户行总行"
)
@ExcelProperty
(
"开户行总行"
)
private
String
bankName
;
/**
* 开户行-省
*/
@Length
(
max
=
30
,
message
=
"开户行-省 不能超过30 个字符"
)
@ExcelAttribute
(
name
=
"开户行-省"
,
maxLength
=
30
)
@Schema
(
description
=
"开户行-省"
)
@ExcelProperty
(
"开户行-省"
)
private
String
bankProvince
;
/**
* 开户行-市
*/
@Length
(
max
=
30
,
message
=
"开户行-市 不能超过30 个字符"
)
@ExcelAttribute
(
name
=
"开户行-市"
,
maxLength
=
30
)
@Schema
(
description
=
"开户行-市"
)
@ExcelProperty
(
"开户行-市"
)
private
String
bankCity
;
/**
* 开户行支行
*/
@Length
(
max
=
50
,
message
=
"开户行支行 不能超过50 个字符"
)
@ExcelAttribute
(
name
=
"开户行支行"
,
maxLength
=
50
)
@Schema
(
description
=
"开户行支行"
)
@ExcelProperty
(
"开户行支行"
)
private
String
bankNameSub
;
/**
* 手机号码
*/
@Length
(
max
=
15
,
message
=
"手机号码 不能超过15 个字符"
)
@ExcelAttribute
(
name
=
"手机号码"
,
maxLength
=
15
)
@Schema
(
description
=
"手机号码"
)
@ExcelProperty
(
"手机号码"
)
private
String
empPhone
;
/**
* 档案地-省
*/
@Length
(
max
=
30
,
message
=
"档案地-省 不能超过30 个字符"
)
@ExcelAttribute
(
name
=
"档案地-省"
,
maxLength
=
30
)
@Schema
(
description
=
"档案地-省"
)
@ExcelProperty
(
"档案地-省"
)
private
String
empProvince
;
/**
* 档案地-市
*/
@Length
(
max
=
30
,
message
=
"档案地-市 不能超过30 个字符"
)
@ExcelAttribute
(
name
=
"档案地-市"
,
maxLength
=
30
)
@Schema
(
description
=
"档案地-市"
)
@ExcelProperty
(
"档案地-市"
)
private
String
empCity
;
/**
* 档案地-县
*/
@Length
(
max
=
30
,
message
=
"档案地-县 不能超过30 个字符"
)
@ExcelAttribute
(
name
=
"档案地-县"
,
maxLength
=
30
)
@Schema
(
description
=
"档案地-县"
)
@ExcelProperty
(
"档案地-县"
)
private
String
empTown
;
/**
* 社保缴纳地
*/
@Length
(
max
=
50
,
message
=
"社保缴纳地 不能超过50 个字符"
)
@ExcelAttribute
(
name
=
"社保缴纳地"
,
maxLength
=
50
)
@Schema
(
description
=
"社保缴纳地"
)
@ExcelProperty
(
"社保缴纳地"
)
private
String
socialAddress
;
/**
* 合同申请编号
*/
@Length
(
max
=
32
,
message
=
"合同申请编号 不能超过32 个字符"
)
@ExcelAttribute
(
name
=
"合同申请编号"
,
maxLength
=
32
)
@Schema
(
description
=
"合同申请编号"
)
@ExcelProperty
(
"合同申请编号"
)
private
String
contractApplyNo
;
/**
* 合同起始时间
*/
@Length
(
max
=
20
,
message
=
"合同起始时间 不能超过20 个字符"
)
@ExcelAttribute
(
name
=
"合同起始时间"
,
maxLength
=
20
)
@Schema
(
description
=
"合同起始时间"
)
@ExcelProperty
(
"合同起始时间"
)
private
String
contractStart
;
/**
* 合同截止时间
*/
@Length
(
max
=
20
,
message
=
"合同截止时间 不能超过20 个字符"
)
@ExcelAttribute
(
name
=
"合同截止时间"
,
maxLength
=
20
)
@Schema
(
description
=
"合同截止时间"
)
@ExcelProperty
(
"合同截止时间"
)
private
String
contractEnd
;
/**
* 合同类型
*/
@Length
(
max
=
10
,
message
=
"合同类型 不能超过10 个字符"
)
@ExcelAttribute
(
name
=
"合同类型"
,
maxLength
=
10
)
@Schema
(
description
=
"合同类型"
)
@ExcelProperty
(
"合同类型"
)
private
String
contractType
;
/**
* 业务细分
*/
@Length
(
max
=
20
,
message
=
"业务细分 不能超过20 个字符"
)
@ExcelAttribute
(
name
=
"业务细分"
,
maxLength
=
20
)
@Schema
(
description
=
"业务细分"
)
@ExcelProperty
(
"业务细分"
)
private
String
businessDetail
;
/**
* 签订类型
*/
@Length
(
max
=
20
,
message
=
"签订类型 不能超过20 个字符"
)
@ExcelAttribute
(
name
=
"签订类型"
,
maxLength
=
20
)
@Schema
(
description
=
"签订类型"
)
@ExcelProperty
(
"签订类型"
)
private
String
signType
;
/**
* 签订期限
*/
@Length
(
max
=
10
,
message
=
"签订期限 不能超过10 个字符"
)
@ExcelAttribute
(
name
=
"签订期限"
,
maxLength
=
10
)
@Schema
(
description
=
"签订期限"
)
@ExcelProperty
(
"签订期限"
)
private
String
signTerm
;
/**
* 合同甲方
*/
@Length
(
max
=
50
,
message
=
"合同甲方 不能超过50 个字符"
)
@ExcelAttribute
(
name
=
"合同甲方"
,
maxLength
=
50
)
@Schema
(
description
=
"合同甲方"
)
@ExcelProperty
(
"合同甲方"
)
private
String
contractPartyA
;
/**
* 合同岗位
*/
@Length
(
max
=
20
,
message
=
"合同岗位 不能超过20 个字符"
)
@ExcelAttribute
(
name
=
"合同岗位"
,
maxLength
=
20
)
@Schema
(
description
=
"合同岗位"
)
@ExcelProperty
(
"合同岗位"
)
private
String
contractPost
;
/**
* 工时制
*/
@Length
(
max
=
10
,
message
=
"工时制 不能超过10 个字符"
)
@ExcelAttribute
(
name
=
"工时制"
,
maxLength
=
10
)
@Schema
(
description
=
"工时制"
)
@ExcelProperty
(
"工时制"
)
private
String
contractTaskTime
;
/**
* 合同编码
*/
@Length
(
max
=
30
,
message
=
"合同编码 不能超过30 个字符"
)
@ExcelAttribute
(
name
=
"合同编码"
,
maxLength
=
30
)
@Schema
(
description
=
"合同编码"
)
@ExcelProperty
(
"合同编码"
)
private
String
contractCode
;
/**
* 合同创建人
*/
@Length
(
max
=
10
,
message
=
"合同创建人 不能超过10 个字符"
)
@ExcelAttribute
(
name
=
"合同创建人"
,
maxLength
=
10
)
@Schema
(
description
=
"合同创建人"
)
@ExcelProperty
(
"合同创建人"
)
private
String
contractCreater
;
/**
* 合同创建时间
*/
@Length
(
max
=
10
,
message
=
"合同创建时间 不能超过10 个字符"
)
@ExcelAttribute
(
name
=
"合同创建时间"
,
maxLength
=
10
)
@Schema
(
description
=
"合同创建时间"
)
@ExcelProperty
(
"合同创建时间"
)
private
String
contractCreateTime
;
/**
* 数据生产月
*/
@Length
(
max
=
10
,
message
=
"数据生产月 不能超过10 个字符"
)
@ExcelAttribute
(
name
=
"数据生产月"
,
maxLength
=
10
)
@Schema
(
description
=
"数据生产月"
)
@ExcelProperty
(
"数据生产月"
)
private
String
dataCreateMonth
;
/**
* dataCreateMomth
*/
@Length
(
max
=
255
,
message
=
"dataCreateMomth 不能超过255 个字符"
)
@ExcelAttribute
(
name
=
"dataCreateMomth"
,
maxLength
=
255
)
@Schema
(
description
=
"dataCreateMomth"
)
@ExcelProperty
(
"dataCreateMomth"
)
private
String
dataCreateMomth
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TPersonnelRosterController.java
0 → 100644
View file @
3f614dd9
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TPersonnelRoster
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TPersonnelRosterService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TPersonnelRosterSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
*
*
* @author fxj
* @date 2023-06-13 15:42:17
*/
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/tpersonnelroster"
)
@Tag
(
name
=
"员工花名册"
)
public
class
TPersonnelRosterController
{
private
final
TPersonnelRosterService
tPersonnelRosterService
;
/**
* 简单分页查询
* @param page 分页对象
* @param tPersonnelRoster
* @return
*/
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TPersonnelRoster
>>
getTPersonnelRosterPage
(
Page
<
TPersonnelRoster
>
page
,
TPersonnelRosterSearchVo
tPersonnelRoster
)
{
return
new
R
<>(
tPersonnelRosterService
.
getTPersonnelRosterPage
(
page
,
tPersonnelRoster
));
}
/**
* 不分页查询
* @param tPersonnelRoster
* @return
*/
@Operation
(
summary
=
"不分页查询"
,
description
=
"不分页查询"
)
@PostMapping
(
"/noPage"
)
public
R
<
List
<
TPersonnelRoster
>>
getTPersonnelRosterNoPage
(
@RequestBody
TPersonnelRosterSearchVo
tPersonnelRoster
)
{
return
R
.
ok
(
tPersonnelRosterService
.
noPageDiy
(
tPersonnelRoster
));
}
/**
* 通过id查询
* @param id id
* @return R
*/
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询:hasPermission('demo_tpersonnelroster_get')"
)
@GetMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('demo_tpersonnelroster_get')"
)
public
R
<
TPersonnelRoster
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
tPersonnelRosterService
.
getById
(
id
));
}
/**
* 新增
* @param tPersonnelRoster
* @return R
*/
@Operation
(
summary
=
"新增"
,
description
=
"新增:hasPermission('demo_tpersonnelroster_add')"
)
@SysLog
(
"新增"
)
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('demo_tpersonnelroster_add')"
)
public
R
<
Boolean
>
save
(
@RequestBody
TPersonnelRoster
tPersonnelRoster
)
{
return
R
.
ok
(
tPersonnelRosterService
.
save
(
tPersonnelRoster
));
}
/**
* 修改
* @param tPersonnelRoster
* @return R
*/
@Operation
(
summary
=
"修改"
,
description
=
"修改:hasPermission('demo_tpersonnelroster_edit')"
)
@SysLog
(
"修改"
)
@PutMapping
@PreAuthorize
(
"@pms.hasPermission('demo_tpersonnelroster_edit')"
)
public
R
<
Boolean
>
updateById
(
@RequestBody
TPersonnelRoster
tPersonnelRoster
)
{
return
R
.
ok
(
tPersonnelRosterService
.
updateById
(
tPersonnelRoster
));
}
/**
* 通过id删除
* @param id id
* @return R
*/
@Operation
(
summary
=
"通过id删除"
,
description
=
"通过id删除:hasPermission('demo_tpersonnelroster_del')"
)
@SysLog
(
"通过id删除"
)
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('demo_tpersonnelroster_del')"
)
public
R
<
Boolean
>
removeById
(
@PathVariable
String
id
)
{
return
R
.
ok
(
tPersonnelRosterService
.
removeById
(
id
));
}
/**
* 批量导出
* @author fxj
* @date 2023-06-13 15:42:17
**/
@Operation
(
description
=
"导出 hasPermission('demo_tpersonnelroster-export')"
)
@PostMapping
(
"/export"
)
@PreAuthorize
(
"@pms.hasPermission('demo_tpersonnelroster-export')"
)
public
void
export
(
HttpServletResponse
response
,
@RequestBody
TPersonnelRosterSearchVo
searchVo
)
{
tPersonnelRosterService
.
listExport
(
response
,
searchVo
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TPersonnelRosterMapper.java
0 → 100644
View file @
3f614dd9
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TPersonnelRoster
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
*
*
* @author fxj
* @date 2023-06-13 15:42:17
*/
@Mapper
public
interface
TPersonnelRosterMapper
extends
BaseMapper
<
TPersonnelRoster
>
{
/**
* 简单分页查询
* @param tPersonnelRoster
* @return
*/
IPage
<
TPersonnelRoster
>
getTPersonnelRosterPage
(
Page
<
TPersonnelRoster
>
page
,
@Param
(
"tPersonnelRoster"
)
TPersonnelRoster
tPersonnelRoster
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TPersonnelRosterService.java
0 → 100644
View file @
3f614dd9
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TPersonnelRoster
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TPersonnelRosterSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.InputStream
;
import
java.util.List
;
/**
*
*
* @author fxj
* @date 2023-06-13 15:42:17
*/
public
interface
TPersonnelRosterService
extends
IService
<
TPersonnelRoster
>
{
/**
* 简单分页查询
* @param tPersonnelRoster
* @return
*/
IPage
<
TPersonnelRoster
>
getTPersonnelRosterPage
(
Page
<
TPersonnelRoster
>
page
,
TPersonnelRosterSearchVo
tPersonnelRoster
);
void
listExport
(
HttpServletResponse
response
,
TPersonnelRosterSearchVo
searchVo
);
List
<
TPersonnelRoster
>
noPageDiy
(
TPersonnelRosterSearchVo
searchVo
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TPersonnelRosterServiceImpl.java
0 → 100644
View file @
3f614dd9
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.util.ArrayUtil
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.read.listener.ReadListener
;
import
com.alibaba.excel.read.metadata.holder.ReadRowHolder
;
import
com.alibaba.excel.util.ListUtils
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TPersonnelRoster
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TPersonnelRosterMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TPersonnelRosterService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TPersonnelRosterSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TPersonnelRosterVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
*
*
* @author fxj
* @date 2023-06-13 15:42:17
*/
@Log4j2
@Service
public
class
TPersonnelRosterServiceImpl
extends
ServiceImpl
<
TPersonnelRosterMapper
,
TPersonnelRoster
>
implements
TPersonnelRosterService
{
/**
* 简单分页查询
* @param tPersonnelRoster
* @return
*/
@Override
public
IPage
<
TPersonnelRoster
>
getTPersonnelRosterPage
(
Page
<
TPersonnelRoster
>
page
,
TPersonnelRosterSearchVo
tPersonnelRoster
){
return
baseMapper
.
getTPersonnelRosterPage
(
page
,
tPersonnelRoster
);
}
/**
* 批量导出
* @param searchVo
* @return
*/
@Override
public
void
listExport
(
HttpServletResponse
response
,
TPersonnelRosterSearchVo
searchVo
){
String
fileName
=
"批量导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
//获取要导出的列表
List
<
TPersonnelRoster
>
list
=
new
ArrayList
<>();
long
count
=
noPageCountDiy
(
searchVo
);
ServletOutputStream
out
=
null
;
try
{
out
=
response
.
getOutputStream
();
response
.
setContentType
(
CommonConstants
.
MULTIPART_FORM_DATA
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
CommonConstants
.
UTF8
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
//EasyExcel.write(out, TEmpBadRecord.class).sheet("不良记录").doWrite(list);
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TPersonnelRoster
.
class
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
){
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
noPageDiy
(
searchVo
);
if
(
Common
.
isNotNull
(
list
)){
ExcelUtil
<
TPersonnelRoster
>
util
=
new
ExcelUtil
<>(
TPersonnelRoster
.
class
);
for
(
TPersonnelRoster
vo:
list
){
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
)){
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
""
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
i
=
i
+
CommonConstants
.
EXCEL_EXPORT_LIMIT
;
if
(
Common
.
isNotNull
(
list
)){
list
.
clear
();
}
}
}
else
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
""
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
}
if
(
Common
.
isNotNull
(
list
)){
list
.
clear
();
}
out
.
flush
();
excelWriter
.
finish
();
}
catch
(
Exception
e
){
log
.
error
(
"执行异常"
,
e
);
}
finally
{
try
{
if
(
null
!=
out
)
{
out
.
close
();
}
}
catch
(
IOException
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
}
}
@Override
public
List
<
TPersonnelRoster
>
noPageDiy
(
TPersonnelRosterSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TPersonnelRoster
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
if
(
Common
.
isNotNull
(
idList
)){
wrapper
.
in
(
TPersonnelRoster:
:
getId
,
idList
);
}
if
(
searchVo
.
getLimitStart
()
>=
0
&&
searchVo
.
getLimitEnd
()
>
0
){
wrapper
.
last
(
" limit "
+
searchVo
.
getLimitStart
()
+
","
+
searchVo
.
getLimitEnd
());
}
wrapper
.
orderByDesc
(
BaseEntity:
:
getCreateTime
);
return
baseMapper
.
selectList
(
wrapper
);
}
private
Long
noPageCountDiy
(
TPersonnelRosterSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TPersonnelRoster
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
if
(
Common
.
isNotNull
(
idList
)){
wrapper
.
in
(
TPersonnelRoster:
:
getId
,
idList
);
}
return
baseMapper
.
selectCount
(
wrapper
);
}
private
LambdaQueryWrapper
buildQueryWrapper
(
TPersonnelRosterSearchVo
entity
){
LambdaQueryWrapper
<
TPersonnelRoster
>
wrapper
=
Wrappers
.
lambdaQuery
();
if
(
ArrayUtil
.
isNotEmpty
(
entity
.
getCreateTimes
()))
{
wrapper
.
ge
(
TPersonnelRoster:
:
getCreateTime
,
entity
.
getCreateTimes
()[
0
])
.
le
(
TPersonnelRoster:
:
getCreateTime
,
entity
.
getCreateTimes
()[
1
]);
}
if
(
Common
.
isNotNull
(
entity
.
getCreateName
())){
wrapper
.
eq
(
TPersonnelRoster:
:
getCreateName
,
entity
.
getCreateName
());
}
return
wrapper
;
}
}
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TPersonnelRosterMapper.xml
0 → 100644
View file @
3f614dd9
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.archives.mapper.TPersonnelRosterMapper"
>
<resultMap
id=
"tPersonnelRosterMap"
type=
"com.yifu.cloud.plus.v1.yifu.archives.entity.TPersonnelRoster"
>
<id
property=
"id"
column=
"ID"
/>
<result
property=
"customerName"
column=
"CUSTOMER_NAME"
/>
<result
property=
"departName"
column=
"DEPART_NAME"
/>
<result
property=
"departNo"
column=
"DEPART_NO"
/>
<result
property=
"businessPrimary"
column=
"BUSINESS_PRIMARY"
/>
<result
property=
"businessSeconed"
column=
"BUSINESS_SECONED"
/>
<result
property=
"businessThird"
column=
"BUSINESS_THIRD"
/>
<result
property=
"label"
column=
"LABEL"
/>
<result
property=
"businessType"
column=
"BUSINESS_TYPE"
/>
<result
property=
"buBelong"
column=
"BU_BELONG"
/>
<result
property=
"empType"
column=
"EMP_TYPE"
/>
<result
property=
"empName"
column=
"EMP_NAME"
/>
<result
property=
"empSex"
column=
"EMP_SEX"
/>
<result
property=
"empBirthDate"
column=
"EMP_BIRTH_DATE"
/>
<result
property=
"empAge"
column=
"EMP_AGE"
/>
<result
property=
"empIdcard"
column=
"EMP_IDCARD"
/>
<result
property=
"bankNo"
column=
"BANK_NO"
/>
<result
property=
"bankName"
column=
"BANK_NAME"
/>
<result
property=
"bankProvince"
column=
"BANK_PROVINCE"
/>
<result
property=
"bankCity"
column=
"BANK_CITY"
/>
<result
property=
"bankNameSub"
column=
"BANK_NAME_SUB"
/>
<result
property=
"empPhone"
column=
"EMP_PHONE"
/>
<result
property=
"empProvince"
column=
"EMP_PROVINCE"
/>
<result
property=
"empCity"
column=
"EMP_CITY"
/>
<result
property=
"empTown"
column=
"EMP_TOWN"
/>
<result
property=
"socialAddress"
column=
"SOCIAL_ADDRESS"
/>
<result
property=
"contractApplyNo"
column=
"CONTRACT_APPLY_NO"
/>
<result
property=
"contractStart"
column=
"CONTRACT_START"
/>
<result
property=
"contractEnd"
column=
"CONTRACT_END"
/>
<result
property=
"contractType"
column=
"CONTRACT_TYPE"
/>
<result
property=
"businessDetail"
column=
"BUSINESS_DETAIL"
/>
<result
property=
"signType"
column=
"SIGN_TYPE"
/>
<result
property=
"signTerm"
column=
"SIGN_TERM"
/>
<result
property=
"contractPartyA"
column=
"CONTRACT_PARTY_A"
/>
<result
property=
"contractPost"
column=
"CONTRACT_POST"
/>
<result
property=
"contractTaskTime"
column=
"CONTRACT_TASK_TIME"
/>
<result
property=
"contractCode"
column=
"CONTRACT_CODE"
/>
<result
property=
"contractCreater"
column=
"CONTRACT_CREATER"
/>
<result
property=
"contractCreateTime"
column=
"CONTRACT_CREATE_TIME"
/>
<result
property=
"dataCreateMonth"
column=
"DATA_CREATE_MONTH"
/>
<result
property=
"dataCreateMomth"
column=
"DATA_CREATE_MOMTH"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
a.CUSTOMER_NAME,
a.DEPART_NAME,
a.DEPART_NO,
a.BUSINESS_PRIMARY,
a.BUSINESS_SECONED,
a.BUSINESS_THIRD,
a.LABEL,
a.BUSINESS_TYPE,
a.BU_BELONG,
a.EMP_TYPE,
a.EMP_NAME,
a.EMP_SEX,
a.EMP_BIRTH_DATE,
a.EMP_AGE,
a.EMP_IDCARD,
a.BANK_NO,
a.BANK_NAME,
a.BANK_PROVINCE,
a.BANK_CITY,
a.BANK_NAME_SUB,
a.EMP_PHONE,
a.EMP_PROVINCE,
a.EMP_CITY,
a.EMP_TOWN,
a.SOCIAL_ADDRESS,
a.CONTRACT_APPLY_NO,
a.CONTRACT_START,
a.CONTRACT_END,
a.CONTRACT_TYPE,
a.BUSINESS_DETAIL,
a.SIGN_TYPE,
a.SIGN_TERM,
a.CONTRACT_PARTY_A,
a.CONTRACT_POST,
a.CONTRACT_TASK_TIME,
a.CONTRACT_CODE,
a.CONTRACT_CREATER,
a.CONTRACT_CREATE_TIME,
a.DATA_CREATE_MONTH,
a.DATA_CREATE_MOMTH
</sql>
<sql
id=
"tPersonnelRoster_where"
>
<if
test=
"tPersonnelRoster != null"
>
<if
test=
"tPersonnelRoster.id != null and tPersonnelRoster.id.trim() != ''"
>
AND a.ID = #{tPersonnelRoster.id}
</if>
<if
test=
"tPersonnelRoster.customerName != null and tPersonnelRoster.customerName.trim() != ''"
>
AND a.CUSTOMER_NAME = #{tPersonnelRoster.customerName}
</if>
<if
test=
"tPersonnelRoster.departName != null and tPersonnelRoster.departName.trim() != ''"
>
AND a.DEPART_NAME = #{tPersonnelRoster.departName}
</if>
<if
test=
"tPersonnelRoster.departNo != null and tPersonnelRoster.departNo.trim() != ''"
>
AND a.DEPART_NO = #{tPersonnelRoster.departNo}
</if>
<if
test=
"tPersonnelRoster.businessPrimary != null and tPersonnelRoster.businessPrimary.trim() != ''"
>
AND a.BUSINESS_PRIMARY = #{tPersonnelRoster.businessPrimary}
</if>
<if
test=
"tPersonnelRoster.businessSeconed != null and tPersonnelRoster.businessSeconed.trim() != ''"
>
AND a.BUSINESS_SECONED = #{tPersonnelRoster.businessSeconed}
</if>
<if
test=
"tPersonnelRoster.businessThird != null and tPersonnelRoster.businessThird.trim() != ''"
>
AND a.BUSINESS_THIRD = #{tPersonnelRoster.businessThird}
</if>
<if
test=
"tPersonnelRoster.label != null and tPersonnelRoster.label.trim() != ''"
>
AND a.LABEL = #{tPersonnelRoster.label}
</if>
<if
test=
"tPersonnelRoster.businessType != null and tPersonnelRoster.businessType.trim() != ''"
>
AND a.BUSINESS_TYPE = #{tPersonnelRoster.businessType}
</if>
<if
test=
"tPersonnelRoster.buBelong != null and tPersonnelRoster.buBelong.trim() != ''"
>
AND a.BU_BELONG = #{tPersonnelRoster.buBelong}
</if>
<if
test=
"tPersonnelRoster.empType != null and tPersonnelRoster.empType.trim() != ''"
>
AND a.EMP_TYPE = #{tPersonnelRoster.empType}
</if>
<if
test=
"tPersonnelRoster.empName != null and tPersonnelRoster.empName.trim() != ''"
>
AND a.EMP_NAME = #{tPersonnelRoster.empName}
</if>
<if
test=
"tPersonnelRoster.empSex != null and tPersonnelRoster.empSex.trim() != ''"
>
AND a.EMP_SEX = #{tPersonnelRoster.empSex}
</if>
<if
test=
"tPersonnelRoster.empBirthDate != null"
>
AND a.EMP_BIRTH_DATE = #{tPersonnelRoster.empBirthDate}
</if>
<if
test=
"tPersonnelRoster.empAge != null and tPersonnelRoster.empAge.trim() != ''"
>
AND a.EMP_AGE = #{tPersonnelRoster.empAge}
</if>
<if
test=
"tPersonnelRoster.empIdcard != null and tPersonnelRoster.empIdcard.trim() != ''"
>
AND a.EMP_IDCARD = #{tPersonnelRoster.empIdcard}
</if>
<if
test=
"tPersonnelRoster.bankNo != null and tPersonnelRoster.bankNo.trim() != ''"
>
AND a.BANK_NO = #{tPersonnelRoster.bankNo}
</if>
<if
test=
"tPersonnelRoster.bankName != null and tPersonnelRoster.bankName.trim() != ''"
>
AND a.BANK_NAME = #{tPersonnelRoster.bankName}
</if>
<if
test=
"tPersonnelRoster.bankProvince != null and tPersonnelRoster.bankProvince.trim() != ''"
>
AND a.BANK_PROVINCE = #{tPersonnelRoster.bankProvince}
</if>
<if
test=
"tPersonnelRoster.bankCity != null and tPersonnelRoster.bankCity.trim() != ''"
>
AND a.BANK_CITY = #{tPersonnelRoster.bankCity}
</if>
<if
test=
"tPersonnelRoster.bankNameSub != null and tPersonnelRoster.bankNameSub.trim() != ''"
>
AND a.BANK_NAME_SUB = #{tPersonnelRoster.bankNameSub}
</if>
<if
test=
"tPersonnelRoster.empPhone != null and tPersonnelRoster.empPhone.trim() != ''"
>
AND a.EMP_PHONE = #{tPersonnelRoster.empPhone}
</if>
<if
test=
"tPersonnelRoster.empProvince != null and tPersonnelRoster.empProvince.trim() != ''"
>
AND a.EMP_PROVINCE = #{tPersonnelRoster.empProvince}
</if>
<if
test=
"tPersonnelRoster.empCity != null and tPersonnelRoster.empCity.trim() != ''"
>
AND a.EMP_CITY = #{tPersonnelRoster.empCity}
</if>
<if
test=
"tPersonnelRoster.empTown != null and tPersonnelRoster.empTown.trim() != ''"
>
AND a.EMP_TOWN = #{tPersonnelRoster.empTown}
</if>
<if
test=
"tPersonnelRoster.socialAddress != null and tPersonnelRoster.socialAddress.trim() != ''"
>
AND a.SOCIAL_ADDRESS = #{tPersonnelRoster.socialAddress}
</if>
<if
test=
"tPersonnelRoster.contractApplyNo != null and tPersonnelRoster.contractApplyNo.trim() != ''"
>
AND a.CONTRACT_APPLY_NO = #{tPersonnelRoster.contractApplyNo}
</if>
<if
test=
"tPersonnelRoster.contractStart != null and tPersonnelRoster.contractStart.trim() != ''"
>
AND a.CONTRACT_START = #{tPersonnelRoster.contractStart}
</if>
<if
test=
"tPersonnelRoster.contractEnd != null and tPersonnelRoster.contractEnd.trim() != ''"
>
AND a.CONTRACT_END = #{tPersonnelRoster.contractEnd}
</if>
<if
test=
"tPersonnelRoster.contractType != null and tPersonnelRoster.contractType.trim() != ''"
>
AND a.CONTRACT_TYPE = #{tPersonnelRoster.contractType}
</if>
<if
test=
"tPersonnelRoster.businessDetail != null and tPersonnelRoster.businessDetail.trim() != ''"
>
AND a.BUSINESS_DETAIL = #{tPersonnelRoster.businessDetail}
</if>
<if
test=
"tPersonnelRoster.signType != null and tPersonnelRoster.signType.trim() != ''"
>
AND a.SIGN_TYPE = #{tPersonnelRoster.signType}
</if>
<if
test=
"tPersonnelRoster.signTerm != null and tPersonnelRoster.signTerm.trim() != ''"
>
AND a.SIGN_TERM = #{tPersonnelRoster.signTerm}
</if>
<if
test=
"tPersonnelRoster.contractPartyA != null and tPersonnelRoster.contractPartyA.trim() != ''"
>
AND a.CONTRACT_PARTY_A = #{tPersonnelRoster.contractPartyA}
</if>
<if
test=
"tPersonnelRoster.contractPost != null and tPersonnelRoster.contractPost.trim() != ''"
>
AND a.CONTRACT_POST = #{tPersonnelRoster.contractPost}
</if>
<if
test=
"tPersonnelRoster.contractTaskTime != null and tPersonnelRoster.contractTaskTime.trim() != ''"
>
AND a.CONTRACT_TASK_TIME = #{tPersonnelRoster.contractTaskTime}
</if>
<if
test=
"tPersonnelRoster.contractCode != null and tPersonnelRoster.contractCode.trim() != ''"
>
AND a.CONTRACT_CODE = #{tPersonnelRoster.contractCode}
</if>
<if
test=
"tPersonnelRoster.contractCreater != null and tPersonnelRoster.contractCreater.trim() != ''"
>
AND a.CONTRACT_CREATER = #{tPersonnelRoster.contractCreater}
</if>
<if
test=
"tPersonnelRoster.contractCreateTime != null and tPersonnelRoster.contractCreateTime.trim() != ''"
>
AND a.CONTRACT_CREATE_TIME = #{tPersonnelRoster.contractCreateTime}
</if>
<if
test=
"tPersonnelRoster.dataCreateMonth != null and tPersonnelRoster.dataCreateMonth.trim() != ''"
>
AND a.DATA_CREATE_MONTH = #{tPersonnelRoster.dataCreateMonth}
</if>
<if
test=
"tPersonnelRoster.dataCreateMomth != null and tPersonnelRoster.dataCreateMomth.trim() != ''"
>
AND a.DATA_CREATE_MOMTH = #{tPersonnelRoster.dataCreateMomth}
</if>
</if>
</sql>
<!--tPersonnelRoster简单分页查询-->
<select
id=
"getTPersonnelRosterPage"
resultMap=
"tPersonnelRosterMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_personnel_roster a
<where>
1=1
<include
refid=
"tPersonnelRoster_where"
/>
</where>
</select>
</mapper>
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/config/DaprMsgProperties.java
0 → 100644
View file @
3f614dd9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
common
.
dapr
.
config
;
import
lombok.Data
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.context.annotation.PropertySource
;
import
org.springframework.stereotype.Component
;
/**
* @Author fxj
* @Date 2022/7/4
* @Description
* @Version 1.0
*/
@Data
@Component
@PropertySource
(
"classpath:daprConfig.properties"
)
@ConfigurationProperties
(
value
=
"dapr.msg"
,
ignoreInvalidFields
=
false
)
public
class
DaprMsgProperties
{
/*
* @author fxj
* @date 14:34
* @Description dapr sidercar url 如:http://localhost:3005/v1.0/invoke/
**/
String
appUrl
;
/*
* @author fxj
* @date 14:35
* @decription app_id 如:"yifu_upms_sider"
**/
String
appId
;
String
appPort
;
String
httpPort
;
String
grpcPort
;
String
metricsPort
;
}
yifu-common/yifu-common-dapr/src/main/resources/daprConfig.properties
View file @
3f614dd9
dapr.upms.appUrl
=
http://
127.0.0.1
:3500/v1.0/invoke/
dapr.upms.appUrl
=
http://
yifu-upms.qas-mvp.svc.cluster.local
:3500/v1.0/invoke/
dapr.upms.appId
=
yifu-upms
dapr.upms.appId
=
yifu-upms
dapr.check.appUrl
=
http://127.0.0.1:3500/v1.0/invoke/
#\u6D4B\u8BD5\u73AF\u5883
#dapr.check.appUrl=http://yifu-check.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
#\u672C\u5730
dapr.check.appUrl
=
http://yifu-check.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.check.appId
=
yifu-check
dapr.check.appId
=
yifu-check
#\u751F\u4EA7
dapr.archives.appUrl
=
http://127.0.0.1:3500/v1.0/invoke/
dapr.archives.appId
=
yifu-archives
#\u
751F\u4EA7
#\u
672C\u5730
dapr.
social.appUrl
=
http://127.0.0.1
:3500/v1.0/invoke/
dapr.
archives.appUrl
=
http://yifu-archives.qas-mvp.svc.cluster.local
:3500/v1.0/invoke/
dapr.
social.appId
=
yifu-social
dapr.
archives.appId
=
yifu-archives
#\u751F\u4EA7
dapr.salary.appUrl
=
http://127.0.0.1:3500/v1.0/invoke/
dapr.salary.appId
=
yifu-salary
#\u751F\u4EA7
dapr.social.appUrl
=
http://yifu-social.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.insurances.appUrl
=
http://127.0.0.1:3500/v1.0/invoke/
dapr.social.appId
=
yifu-social
dapr.insurances.appId
=
yifu-insurances
#\u6D4B\u8BD5\u73AF\u5883-B\u7AEF\u670D\u52A1
#\u6D4B\u8BD5\u73AF\u5883-B\u7AEF\u670D\u52A1
dapr.business.appUrl
=
http://
127.0.0.1
:3500/v1.0/invoke/
dapr.business.appUrl
=
http://
yifu-business.qas-mvp.svc.cluster.local
:3500/v1.0/invoke/
dapr.business.appId
=
yifu-business
dapr.business.appId
=
yifu-business
#\u6D4B\u8BD5\u73AF\u5883-\u6D88\u606F\u63D0\u9192\u670D\u52A1
dapr.msg.appUrl
=
http://yifu-msg.qas-mvp.svc.cluster.local:3500/v1.0/invoke/
dapr.msg.appId
=
yifu-msg
\ No newline at end of file
yifu-common/yifu-common-seata/src/main/resources/seata-config.yml
View file @
3f614dd9
...
@@ -28,7 +28,7 @@ seata:
...
@@ -28,7 +28,7 @@ seata:
enable-degrade
:
false
# 降级开关
enable-degrade
:
false
# 降级开关
disable-global-transaction
:
false
# 禁用全局事务(默认false)
disable-global-transaction
:
false
# 禁用全局事务(默认false)
grouplist
:
grouplist
:
default
:
192.168.
0.153
:33091
default
:
192.168.
1.65
:33091
transport
:
transport
:
shutdown
:
shutdown
:
wait
:
3
wait
:
3
...
...
yifu-job/yifu-job-api/src/main/java/com/yifu/cloud/plus/v1/job/compont/MsgTask.java
0 → 100644
View file @
3f614dd9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
job
.
compont
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprMsgProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.stereotype.Component
;
/**
* @Author fxj
* @Description 定時任務--定时生成 超时提醒
* @Date 19:57 2023/5/30
* @Param
* @return
**/
@Component
(
value
=
"msgTask"
)
@Slf4j
@EnableConfigurationProperties
(
DaprMsgProperties
.
class
)
public
class
MsgTask
{
@Autowired
private
DaprMsgProperties
daprMsgProperties
;
/**
* @Author fxj
* @Description 每29分钟刷新 超时待办提醒
* @Date 20:01 2023/5/30
* @Param
* @return
**/
public
void
createOderOverTimeMsg
()
{
log
.
info
(
"-------------每29分钟刷新 超时待办提醒-定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprMsgProperties
.
getAppUrl
(),
daprMsgProperties
.
getAppId
(),
"/msg/inner/updateOverTimeMsg"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"-------------每29分钟刷新 超时待办提醒定时任务结束------------"
);
}
}
\ No newline at end of file
yifu-job/yifu-job-api/src/main/java/com/yifu/cloud/plus/v1/job/compont/SalaryTask.java
View file @
3f614dd9
...
@@ -127,5 +127,18 @@ public class SalaryTask {
...
@@ -127,5 +127,18 @@ public class SalaryTask {
log
.
info
(
"------------定时生成本期申报-定时任务结束------------"
);
log
.
info
(
"------------定时生成本期申报-定时任务结束------------"
);
}
}
/**
* @Author hgw
* @Description 前12月平均工资(MVP-TDC接口)
* @Date 2023-6-19 16:31:32
* @Param
* @return
**/
public
void
doCreateAverageSalary
()
{
log
.
info
(
"------------定时生成【前12月平均工资】-定时任务开始------------"
);
HttpDaprUtil
.
invokeMethodPost
(
daprSalarylProperties
.
getAppUrl
(),
daprSalarylProperties
.
getAppId
(),
"/taveragesalary/inner/doCreateAverageSalary"
,
""
,
Object
.
class
,
SecurityConstants
.
FROM_IN
);
log
.
info
(
"------------定时生成【前12月平均工资】-定时任务结束------------"
);
}
}
}
\ No newline at end of file
yifu-msg/yifu-msg-api/src/main/java/com/yifu/cloud/plus/v1/msg/entity/MsgInfo.java
View file @
3f614dd9
...
@@ -22,21 +22,20 @@ import com.baomidou.mybatisplus.annotation.IdType;
...
@@ -22,21 +22,20 @@ import com.baomidou.mybatisplus.annotation.IdType;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.hibernate.validator.constraints.Length
;
import
org.hibernate.validator.constraints.Length
;
import
java.time.LocalDateTime
;
/**
/**
* @author fxj
* @author fxj
* @date 2023-06-01 10:41:25
* @date 2023-06-01 10:41:25
*/
*/
@Data
@Data
@TableName
(
"msg_info"
)
@TableName
(
"msg_info"
)
@EqualsAndHashCode
(
callSuper
=
true
)
@Schema
(
description
=
"EKP 消息提醒"
)
@Schema
(
description
=
"EKP 消息提醒"
)
public
class
MsgInfo
extends
BaseEntity
{
public
class
MsgInfo
{
/**
/**
* id
* id
...
@@ -46,20 +45,20 @@ public class MsgInfo extends BaseEntity {
...
@@ -46,20 +45,20 @@ public class MsgInfo extends BaseEntity {
@Schema
(
description
=
"id"
)
@Schema
(
description
=
"id"
)
private
String
id
;
private
String
id
;
/**
/**
*
orderId
*
订单号
*/
*/
@ExcelAttribute
(
name
=
"
orderId
"
,
maxLength
=
50
)
@ExcelAttribute
(
name
=
"
订单号
"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"orderId不能超过50个字符"
)
@Length
(
max
=
50
,
message
=
"orderId不能超过50个字符"
)
@ExcelProperty
(
"
orderId
"
)
@ExcelProperty
(
"
订单号
"
)
@Schema
(
description
=
"
orderId
"
)
@Schema
(
description
=
"
订单号
"
)
private
String
orderId
;
private
String
orderId
;
/**
/**
*
订单号
*
URL
*/
*/
@ExcelAttribute
(
name
=
"
订单号
"
,
maxLength
=
200
)
@ExcelAttribute
(
name
=
"
URL
"
,
maxLength
=
200
)
@Length
(
max
=
200
,
message
=
"
订单号
不能超过200个字符"
)
@Length
(
max
=
200
,
message
=
"
URL
不能超过200个字符"
)
@ExcelProperty
(
"
订单号
"
)
@ExcelProperty
(
"
URL
"
)
@Schema
(
description
=
"
订单号
"
)
@Schema
(
description
=
"
URL
"
)
private
String
url
;
private
String
url
;
/**
/**
* 提交人
* 提交人
...
@@ -85,7 +84,7 @@ public class MsgInfo extends BaseEntity {
...
@@ -85,7 +84,7 @@ public class MsgInfo extends BaseEntity {
@Length
(
max
=
1
,
message
=
"0 未阅 1 已阅不能超过1个字符"
)
@Length
(
max
=
1
,
message
=
"0 未阅 1 已阅不能超过1个字符"
)
@ExcelProperty
(
"0 未阅 1 已阅"
)
@ExcelProperty
(
"0 未阅 1 已阅"
)
@Schema
(
description
=
"0 未阅 1 已阅"
)
@Schema
(
description
=
"0 未阅 1 已阅"
)
private
String
read
;
private
String
read
Status
;
/**
/**
* 提醒人
* 提醒人
*/
*/
...
@@ -95,4 +94,14 @@ public class MsgInfo extends BaseEntity {
...
@@ -95,4 +94,14 @@ public class MsgInfo extends BaseEntity {
@Schema
(
description
=
"提醒人"
)
@Schema
(
description
=
"提醒人"
)
private
String
alertUser
;
private
String
alertUser
;
private
LocalDateTime
createTime
;
/**
* 项目名称
*/
@ExcelAttribute
(
name
=
"项目名称"
,
maxLength
=
50
)
@Length
(
max
=
50
,
message
=
"项目名称不能超过1个字符"
)
@ExcelProperty
(
"项目名称"
)
@Schema
(
description
=
"项目名称"
)
private
String
domainName
;
}
}
yifu-msg/yifu-msg-biz/src/main/java/com/yifu/cloud/plus/v1/msg/constant/MesConstants.java
View file @
3f614dd9
...
@@ -10,13 +10,9 @@ import org.springframework.stereotype.Component;
...
@@ -10,13 +10,9 @@ import org.springframework.stereotype.Component;
* @Description
* @Description
* @Version 1.0
* @Version 1.0
*/
*/
@Component
@PropertySource
(
"classpath:application.yml"
)
@ConfigurationProperties
(
value
=
"ekp"
,
ignoreInvalidFields
=
false
)
public
interface
MesConstants
{
public
interface
MesConstants
{
/**
/**
* 項目订单URL
* 項目订单URL
**/
**/
String
orderUrl
=
""
;
String
orderUrl
=
"http://ekp.wanxinwork.com/sys/modeling/main/modelingAppView.do?method=modelView&listviewId=185943766d6e9ff50d8fea1414eaf460&fdId="
;
}
}
yifu-msg/yifu-msg-biz/src/main/java/com/yifu/cloud/plus/v1/msg/controller/MsgInfoController.java
View file @
3f614dd9
...
@@ -86,7 +86,7 @@ public class MsgInfoController {
...
@@ -86,7 +86,7 @@ public class MsgInfoController {
@Operation
(
summary
=
"每29分钟刷新 超时待办提醒"
,
description
=
"每29分钟刷新 超时待办提醒"
)
@Operation
(
summary
=
"每29分钟刷新 超时待办提醒"
,
description
=
"每29分钟刷新 超时待办提醒"
)
@Inner
@Inner
@PostMapping
(
"/inner/updateOverTimeMsg"
)
@PostMapping
(
"/inner/updateOverTimeMsg"
)
public
void
everyMonthUpdateSalaryStatus
()
{
public
void
updateOverTimeMsg
()
{
msgInfoService
.
updateOverTimeMsg
();
msgInfoService
.
updateOverTimeMsg
();
}
}
}
}
yifu-msg/yifu-msg-biz/src/main/java/com/yifu/cloud/plus/v1/msg/service/impl/MsgInfoServiceImpl.java
View file @
3f614dd9
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
*/
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
msg
.
service
.
impl
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
msg
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
@@ -30,9 +31,14 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
...
@@ -30,9 +31,14 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
lombok.extern.log4j.Log4j2
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
*
*
*
*
...
@@ -82,7 +88,9 @@ public class MsgInfoServiceImpl extends ServiceImpl<MsgInfoMapper, MsgInfo> impl
...
@@ -82,7 +88,9 @@ public class MsgInfoServiceImpl extends ServiceImpl<MsgInfoMapper, MsgInfo> impl
if
(
Common
.
isNotNull
(
save
)){
if
(
Common
.
isNotNull
(
save
)){
save
.
setCreateTime
(
LocalDateTime
.
now
());
save
.
setCreateTime
(
LocalDateTime
.
now
());
save
.
setUrl
(
MesConstants
.
orderUrl
+
vo
.
getOrderId
());
save
.
setUrl
(
MesConstants
.
orderUrl
+
vo
.
getOrderId
());
save
.
setAlertUser
(
vo
.
getAlertUser
().
replace
(
"\""
,
""
));
baseMapper
.
insert
(
save
);
baseMapper
.
insert
(
save
);
log
.
error
(
JSON
.
toJSONString
(
save
));
}
}
}
}
// 变更提醒
// 变更提醒
...
@@ -92,7 +100,9 @@ public class MsgInfoServiceImpl extends ServiceImpl<MsgInfoMapper, MsgInfo> impl
...
@@ -92,7 +100,9 @@ public class MsgInfoServiceImpl extends ServiceImpl<MsgInfoMapper, MsgInfo> impl
save
.
setCreateTime
(
LocalDateTime
.
now
());
save
.
setCreateTime
(
LocalDateTime
.
now
());
save
.
setUrl
(
MesConstants
.
orderUrl
+
save
.
getOrderId
());
save
.
setUrl
(
MesConstants
.
orderUrl
+
save
.
getOrderId
());
save
.
setAlertType
(
CommonConstants
.
TWO_STRING
);
save
.
setAlertType
(
CommonConstants
.
TWO_STRING
);
save
.
setAlertUser
(
vo
.
getAlertUser
().
replace
(
"\""
,
""
));
baseMapper
.
insert
(
save
);
baseMapper
.
insert
(
save
);
log
.
error
(
JSON
.
toJSONString
(
save
));
}
}
}
}
}
}
...
@@ -108,18 +118,55 @@ public class MsgInfoServiceImpl extends ServiceImpl<MsgInfoMapper, MsgInfo> impl
...
@@ -108,18 +118,55 @@ public class MsgInfoServiceImpl extends ServiceImpl<MsgInfoMapper, MsgInfo> impl
* @Param
* @Param
* @return
* @return
**/
**/
@Transactional
@Override
@Override
public
void
updateOverTimeMsg
()
{
public
void
updateOverTimeMsg
()
{
// 1. 删除未读的超时,如果有继续生成
baseMapper
.
delete
(
Wrappers
.<
MsgInfo
>
query
().
lambda
()
.
eq
(
MsgInfo:
:
getReadStatus
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
MsgInfo:
:
getAlertType
,
CommonConstants
.
ONE_STRING
));
List
<
MsgInfo
>
temps
=
baseMapper
.
selectList
(
Wrappers
.<
MsgInfo
>
query
().
lambda
()
.
eq
(
MsgInfo:
:
getAlertType
,
CommonConstants
.
ONE_STRING
)
.
eq
(
MsgInfo:
:
getReadStatus
,
CommonConstants
.
ONE_STRING
));
Map
<
String
,
MsgInfo
>
tempMap
=
new
HashMap
<>();
if
(
Common
.
isNotNull
(
temps
)){
for
(
MsgInfo
msg:
temps
){
tempMap
.
put
(
msg
.
getOrderNo
(),
msg
);
}
}
List
<
MsgInfo
>
msgInfos
=
baseMapper
.
getMsgByTask
();
List
<
MsgInfo
>
msgInfos
=
baseMapper
.
getMsgByTask
();
List
<
MsgInfo
>
saves
=
new
ArrayList
<>();
if
(
Common
.
isNotNull
(
msgInfos
)){
if
(
Common
.
isNotNull
(
msgInfos
)){
//1.先删除
baseMapper
.
delete
(
Wrappers
.<
MsgInfo
>
query
().
lambda
().
eq
(
MsgInfo:
:
getAlertType
,
CommonConstants
.
ONE_STRING
));
//2. 重新生成
//2. 重新生成
MsgInfo
temp
;
for
(
MsgInfo
ms:
msgInfos
){
for
(
MsgInfo
ms:
msgInfos
){
temp
=
tempMap
.
get
(
ms
.
getOrderNo
());
if
(
Common
.
isNotNull
(
temp
)){
tempMap
.
remove
(
ms
.
getOrderNo
());
continue
;
}
ms
.
setCreateTime
(
LocalDateTime
.
now
());
ms
.
setCreateTime
(
LocalDateTime
.
now
());
ms
.
setUrl
(
MesConstants
.
orderUrl
+
ms
.
getOrderId
());
ms
.
setUrl
(
MesConstants
.
orderUrl
+
ms
.
getOrderId
());
saves
.
add
(
ms
);
}
if
(
Common
.
isNotNull
(
tempMap
)){
this
.
removeByIds
(
tempMap
.
values
());
}
if
(
Common
.
isNotNull
(
saves
)){
this
.
saveBatch
(
saves
);
// 发给李鑫
for
(
MsgInfo
sv:
saves
){
sv
.
setId
(
null
);
sv
.
setAlertUser
(
"lixin"
);
}
this
.
saveBatch
(
saves
);
// 发给高叶卉
for
(
MsgInfo
sv:
saves
){
sv
.
setId
(
null
);
sv
.
setAlertUser
(
"gaoyh"
);
}
this
.
saveBatch
(
saves
);
}
}
this
.
saveBatch
(
msgInfos
);
}
}
}
}
}
}
yifu-msg/yifu-msg-biz/src/main/resources/application.yml
View file @
3f614dd9
...
@@ -26,6 +26,7 @@ mybatis-plus:
...
@@ -26,6 +26,7 @@ mybatis-plus:
logic-not-delete-value
:
0
logic-not-delete-value
:
0
configuration
:
configuration
:
map-underscore-to-camel-case
:
true
map-underscore-to-camel-case
:
true
log-impl
:
org.apache.ibatis.logging.stdout.StdOutImpl
spring
:
spring
:
application
:
application
:
...
@@ -62,7 +63,4 @@ springdoc:
...
@@ -62,7 +63,4 @@ springdoc:
#分组名
#分组名
-
group
:
mail
-
group
:
mail
#按包路径匹配
#按包路径匹配
packagesToScan
:
com.yifu.cloud.plus.v1.msg.controller
packagesToScan
:
com.yifu.cloud.plus.v1.msg.controller
\ No newline at end of file
ekp
:
orderUrl
:
http://36.7.147.19:28080/sys/modeling/main/modelingAppView.do?method=modelView&listviewId=185943766d6e9ff50d8fea1414eaf460&fdId=
\ No newline at end of file
yifu-msg/yifu-msg-biz/src/main/resources/mapper/MsgInfoMapper.xml
View file @
3f614dd9
...
@@ -30,8 +30,9 @@
...
@@ -30,8 +30,9 @@
<result
property=
"orderNo"
column=
"ORDER_NO"
/>
<result
property=
"orderNo"
column=
"ORDER_NO"
/>
<result
property=
"alertType"
column=
"ALERT_TYPE"
/>
<result
property=
"alertType"
column=
"ALERT_TYPE"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"read
"
column=
"READ
"
/>
<result
property=
"read
Status"
column=
"READ_STATUS
"
/>
<result
property=
"alertUser"
column=
"ALERT_USER"
/>
<result
property=
"alertUser"
column=
"ALERT_USER"
/>
<result
property=
"domainName"
column=
"DOMAIN_NAME"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
a.ID,
a.ID,
...
@@ -40,8 +41,9 @@
...
@@ -40,8 +41,9 @@
a.ORDER_NO,
a.ORDER_NO,
a.ALERT_TYPE,
a.ALERT_TYPE,
a.CREATE_TIME,
a.CREATE_TIME,
a.READ,
a.READ_STATUS,
a.ALERT_USER
a.ALERT_USER,
a.DOMAIN_NAME
</sql>
</sql>
<sql
id=
"msgInfo_where"
>
<sql
id=
"msgInfo_where"
>
<if
test=
"msgInfo != null"
>
<if
test=
"msgInfo != null"
>
...
@@ -63,8 +65,8 @@
...
@@ -63,8 +65,8 @@
<if
test=
"msgInfo.createTime != null"
>
<if
test=
"msgInfo.createTime != null"
>
AND a.CREATE_TIME = #{msgInfo.createTime}
AND a.CREATE_TIME = #{msgInfo.createTime}
</if>
</if>
<if
test=
"msgInfo.read
!= null and msgInfo.read
.trim() != ''"
>
<if
test=
"msgInfo.read
Status != null and msgInfo.readStatus
.trim() != ''"
>
AND a.READ
= #{msgInfo.read
}
AND a.READ
_STATUS = #{msgInfo.readStatus
}
</if>
</if>
<if
test=
"msgInfo.alertUser != null and msgInfo.alertUser.trim() != ''"
>
<if
test=
"msgInfo.alertUser != null and msgInfo.alertUser.trim() != ''"
>
AND a.ALERT_USER = #{msgInfo.alertUser}
AND a.ALERT_USER = #{msgInfo.alertUser}
...
@@ -93,31 +95,38 @@
...
@@ -93,31 +95,38 @@
<select
id=
"getMsgByOrderId"
resultMap=
"msgInfoMap"
>
<select
id=
"getMsgByOrderId"
resultMap=
"msgInfoMap"
>
SELECT
SELECT
p.fd_name alertUser,
a.fd_3ac901ba3b9d3e domain_name,
a.fd_3ac901c5184274 orderNo,
p.fd_name ALERT_USER,
a.fd_id orderId,
a.fd_3ac901c5184274 ORDER_NO,
'0' as alertType
a.fd_id ORDER_ID,
'0' as ALERT_TYPE
FROM
FROM
ekp_ea33075576149bb8a4f5 a
ekp_ea33075576149bb8a4f5 a
LEFT JOIN sys_org_element p on a.fd_3b0aff6781fa86 = p.fd_id
LEFT JOIN sys_org_element p on a.fd_3b0aff6781fa86 = p.fd_id
WHERE
WHERE
a.
ORDER_ID
= #{orderId} limit 1
a.
fd_id
= #{orderId} limit 1
</select>
</select>
<!-- 加急(2-3小时)|1 紧急(3-5小时)|4 常规(5-8小时)|7 -->
<select
id=
"getMsgByTask"
resultMap=
"msgInfoMap"
>
<select
id=
"getMsgByTask"
resultMap=
"msgInfoMap"
>
select
SELECT * from (
<!-- 加急(2-3小时)|1 紧急(3-5小时)|4 常规(5-8小时)|7 -->
SELECT
o.fd_name alertUser,
b1.fd_3ac901ba3b9d3e domain_name,
b1.fd_3ac901c5184274 orderNo,
o.fd_no ALERT_USER,
b1.fd_id orderId,
b1.fd_3ac901c5184274 ORDER_NO,
'1' as alertType
b1.fd_id ORDER_ID,
FROM lbpm_workitem a
'1' AS ALERT_TYPE,
LEFT JOIN lbpm_node e on e.fd_id= a.fd_node_id
DATE_ADD(NOW(), INTERVAL 30 MINUTE) as 'date1',
LEFT JOIN lbpm_process p on p.fd_id=e.fd_process_id
IF(b1.fd_3b779ba2168eea = 1,DATE_ADD(a.fd_start_date,INTERVAL 3 HOUR),IF(b1.fd_3b779ba2168eea = 4,DATE_ADD(a.fd_start_date,INTERVAL 5 HOUR),DATE_ADD(a.fd_start_date,INTERVAL 8 HOUR))) as 'date2'
LEFT JOIN ekp_ea33075576149bb8a4f5 b1 on p.fd_model_id=b1.fd_id
FROM
LEFT JOIN sys_org_element o on o.fd_id=fd_expected_id
lbpm_workitem a
where
LEFT JOIN lbpm_node e ON e.fd_id = a.fd_node_id
e.fd_fact_node_id='N5' and b1.fd_id is not null;
LEFT JOIN lbpm_process p ON p.fd_id = e.fd_process_id
and DATE_ADD(NOW(),INTERVAL 30 MINUTE) > IF(b1.fd_3b779ba2168eea=1,DATE_ADD(a.fd_start_date,INTERVAL 3 HOUR),IF(b1.fd_3b779ba2168eea=4,DATE_ADD(a.fd_start_date,INTERVAL 5 HOUR),DATE_ADD(a.fd_start_date,INTERVAL 8 HOUR)))
LEFT JOIN ekp_ea33075576149bb8a4f5 b1 ON p.fd_model_id = b1.fd_id
LEFT JOIN sys_org_element o ON o.fd_id = fd_expected_id
WHERE
e.fd_fact_node_id = 'N5'
AND b1.fd_id IS NOT NULL
) x
where x.date1 > date2
</select>
</select>
</mapper>
</mapper>
yifu-order/yifu-order-api/src/main/java/com/yifu/cloud/plus/v1/yifu/order/vo/OrderAttVo.java
0 → 100644
View file @
3f614dd9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
order
.
vo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.Serializable
;
@Data
public
class
OrderAttVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
6620652346415180825L
;
/**
* 订单编号
*/
@Schema
(
description
=
"订单编号"
)
private
String
orderNo
;
/**
* 订标识
*/
@Schema
(
description
=
"唯一标识"
)
private
String
file1
;
/**
* 附件
*/
@Schema
(
description
=
"附件"
)
private
MultipartFile
[]
file
;
}
yifu-order/yifu-order-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/order/controller/EkpOrderController.java
View file @
3f614dd9
...
@@ -3,13 +3,17 @@ package com.yifu.cloud.plus.v1.yifu.order.controller;
...
@@ -3,13 +3,17 @@ package com.yifu.cloud.plus.v1.yifu.order.controller;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.order.service.TOrderService
;
import
com.yifu.cloud.plus.v1.yifu.order.service.TOrderService
;
import
com.yifu.cloud.plus.v1.yifu.order.vo.OrderAddVO
;
import
com.yifu.cloud.plus.v1.yifu.order.vo.OrderAddVO
;
import
com.yifu.cloud.plus.v1.yifu.order.vo.OrderAttVo
;
import
com.yifu.cloud.plus.v1.yifu.order.vo.OrderReplyAddVO
;
import
com.yifu.cloud.plus.v1.yifu.order.vo.OrderReplyAddVO
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.PostMapping
;
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.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.io.IOException
;
import
java.io.IOException
;
...
@@ -23,6 +27,7 @@ import java.io.IOException;
...
@@ -23,6 +27,7 @@ import java.io.IOException;
@RequiredArgsConstructor
@RequiredArgsConstructor
@RequestMapping
(
"/ekp/order"
)
@RequestMapping
(
"/ekp/order"
)
@Tag
(
name
=
"接收ekp订单相关"
)
@Tag
(
name
=
"接收ekp订单相关"
)
@Slf4j
public
class
EkpOrderController
{
public
class
EkpOrderController
{
@Resource
@Resource
private
TOrderService
tOrderService
;
private
TOrderService
tOrderService
;
...
@@ -38,9 +43,27 @@ public class EkpOrderController {
...
@@ -38,9 +43,27 @@ public class EkpOrderController {
@Schema
(
description
=
"接收处理ekp订单"
)
@Schema
(
description
=
"接收处理ekp订单"
)
@PostMapping
(
value
=
"/receiveOrder"
)
@PostMapping
(
value
=
"/receiveOrder"
)
public
R
receiveOrder
(
OrderAddVO
vo
)
throws
IOException
{
public
R
receiveOrder
(
OrderAddVO
vo
)
throws
IOException
{
log
.
error
(
"vo.getCreateTime()111="
+
vo
.
getCreateTime
());
log
.
error
(
"vo.getCreateTime()222="
+
vo
.
getDeptNo
());
log
.
error
(
"vo.getCreateTime()333="
+
vo
.
getOrderNo
());
return
tOrderService
.
receiveOrder
(
vo
);
return
tOrderService
.
receiveOrder
(
vo
);
}
}
/**
* 接收处理ekp
*
* @author licancan
* @param vo
* @return {@link R}
* @throws IOException
*/
@Schema
(
description
=
"接收处理ekp附件"
)
@PostMapping
(
value
=
"/receiveOrderNew"
)
public
R
receiveOrder
(
OrderAttVo
vo
)
throws
IOException
{
return
tOrderService
.
receiveOrderNew
(
vo
);
}
/**
/**
* 接收处理ekp订单回复
* 接收处理ekp订单回复
*
*
...
...
yifu-order/yifu-order-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/order/service/TOrderService.java
View file @
3f614dd9
...
@@ -99,6 +99,18 @@ public interface TOrderService extends IService<TOrder> {
...
@@ -99,6 +99,18 @@ public interface TOrderService extends IService<TOrder> {
*/
*/
R
receiveOrder
(
OrderAddVO
vo
)
throws
IOException
;
R
receiveOrder
(
OrderAddVO
vo
)
throws
IOException
;
/**
* 接收处理ekp附件
*
* @author licancan
* @param vo
* @return {@link R}
* @throws IOException
*/
R
receiveOrderNew
(
OrderAttVo
vo
)
throws
IOException
;
/**
/**
* 接收处理ekp订单回复
* 接收处理ekp订单回复
*
*
...
...
yifu-order/yifu-order-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/order/service/impl/TOrderServiceImpl.java
View file @
3f614dd9
...
@@ -276,17 +276,17 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
...
@@ -276,17 +276,17 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
if
(
CollectionUtils
.
isNotEmpty
(
withHoldingList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
withHoldingList
))
{
orderDetailVO
.
setWithHoldingEnclosure
(
withHoldingList
);
orderDetailVO
.
setWithHoldingEnclosure
(
withHoldingList
);
}
else
{
}
else
{
orderDetailVO
.
set
Fund
Enclosure
(
Lists
.
newArrayList
());
orderDetailVO
.
set
WithHolding
Enclosure
(
Lists
.
newArrayList
());
}
}
if
(
CollectionUtils
.
isNotEmpty
(
collectionList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
collectionList
))
{
orderDetailVO
.
setCollectionEnclosure
(
collectionList
);
orderDetailVO
.
setCollectionEnclosure
(
collectionList
);
}
else
{
}
else
{
orderDetailVO
.
set
Fund
Enclosure
(
Lists
.
newArrayList
());
orderDetailVO
.
set
Collection
Enclosure
(
Lists
.
newArrayList
());
}
}
if
(
CollectionUtils
.
isNotEmpty
(
noTaxList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
noTaxList
))
{
orderDetailVO
.
set
Collection
Enclosure
(
noTaxList
);
orderDetailVO
.
set
NoTax
Enclosure
(
noTaxList
);
}
else
{
}
else
{
orderDetailVO
.
setNoTaxEnclosure
(
Lists
.
newArrayList
());
orderDetailVO
.
setNoTaxEnclosure
(
Lists
.
newArrayList
());
...
@@ -471,6 +471,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
...
@@ -471,6 +471,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
R
receiveOrder
(
OrderAddVO
vo
)
throws
IOException
{
public
R
receiveOrder
(
OrderAddVO
vo
)
throws
IOException
{
if
(
Common
.
isEmpty
(
vo
.
getOrderNo
())){
if
(
Common
.
isEmpty
(
vo
.
getOrderNo
())){
return
R
.
failed
(
OrderConstants
.
ORDER_NO_IS_EMPTY
);
return
R
.
failed
(
OrderConstants
.
ORDER_NO_IS_EMPTY
);
}
}
...
@@ -511,7 +512,15 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
...
@@ -511,7 +512,15 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
if
(
CollectionUtils
.
isEmpty
(
vo
.
getHandleUserList
())){
if
(
CollectionUtils
.
isEmpty
(
vo
.
getHandleUserList
())){
return
R
.
failed
(
OrderConstants
.
HANDLE_USER_IS_EMPTY
);
return
R
.
failed
(
OrderConstants
.
HANDLE_USER_IS_EMPTY
);
}
TSettleDomain
settleDomain
=
new
TSettleDomain
();
}
TSettleDomain
settleDomain
=
new
TSettleDomain
();
if
(
vo
.
getUrgencyExtent
().
equals
(
CommonConstants
.
ONE_STRING
)){
vo
.
setUrgencyExtent
(
"加急(2-3小时)"
);
}
if
(
vo
.
getUrgencyExtent
().
equals
(
CommonConstants
.
FOUR_STRING
)){
vo
.
setUrgencyExtent
(
"紧急(3-5小时)"
);
}
if
(
vo
.
getUrgencyExtent
().
equals
(
CommonConstants
.
SEVEN_STRING
)){
vo
.
setUrgencyExtent
(
"常规(5-8小时)"
);
}
List
<
TSettleDomainSelectVo
>
settleDomainR
;
List
<
TSettleDomainSelectVo
>
settleDomainR
;
R
<
TSettleDomainListVo
>
listVo
;
R
<
TSettleDomainListVo
>
listVo
;
listVo
=
archivesDaprUtil
.
selectSettleDomainSelectVoByNo
(
vo
.
getDeptNo
());
listVo
=
archivesDaprUtil
.
selectSettleDomainSelectVoByNo
(
vo
.
getDeptNo
());
...
@@ -570,278 +579,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
...
@@ -570,278 +579,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
}
}
}
}
if
(
save
&&
ArrayUtils
.
isNotEmpty
(
vo
.
getWageFile
())){
for
(
MultipartFile
multipartFile
:
vo
.
getWageFile
())
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//支持的附件格式
String
key
=
fileName
;
boolean
flag
=
ossUtil
.
uploadFileByStream
(
multipartFile
.
getInputStream
(),
key
,
null
);
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
orderEnclosure
.
setOrderNo
(
order
.
getOrderNo
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
TWO_INTEGER
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
try
{
tOrderEnclosureService
.
save
(
orderEnclosure
);
}
catch
(
Exception
e
)
{
log
.
error
(
"订单接收OSS文件上传接口异常:"
+
e
.
getMessage
());
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"failed:"
+
e
.
getMessage
());
}
}
else
{
return
R
.
failed
(
OrderConstants
.
OPERATE_FAILED
);
}
}
}
if
(
save
&&
ArrayUtils
.
isNotEmpty
(
vo
.
getSalaryFile
())){
for
(
MultipartFile
multipartFile
:
vo
.
getWageFile
())
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//支持的附件格式
String
key
=
fileName
;
boolean
flag
=
ossUtil
.
uploadFileByStream
(
multipartFile
.
getInputStream
(),
key
,
null
);
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
orderEnclosure
.
setOrderNo
(
order
.
getOrderNo
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
THREE_INTEGER
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
try
{
tOrderEnclosureService
.
save
(
orderEnclosure
);
}
catch
(
Exception
e
)
{
log
.
error
(
"订单接收OSS文件上传接口异常:"
+
e
.
getMessage
());
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"failed:"
+
e
.
getMessage
());
}
}
else
{
return
R
.
failed
(
OrderConstants
.
OPERATE_FAILED
);
}
}
}
if
(
save
&&
ArrayUtils
.
isNotEmpty
(
vo
.
getSocialFile
())){
for
(
MultipartFile
multipartFile
:
vo
.
getSocialFile
())
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//支持的附件格式
String
key
=
fileName
;
boolean
flag
=
ossUtil
.
uploadFileByStream
(
multipartFile
.
getInputStream
(),
key
,
null
);
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
orderEnclosure
.
setOrderNo
(
order
.
getOrderNo
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
FOUR_INTEGER
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
try
{
tOrderEnclosureService
.
save
(
orderEnclosure
);
}
catch
(
Exception
e
)
{
log
.
error
(
"订单接收OSS文件上传接口异常:"
+
e
.
getMessage
());
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"failed:"
+
e
.
getMessage
());
}
}
else
{
return
R
.
failed
(
OrderConstants
.
OPERATE_FAILED
);
}
}
}
if
(
save
&&
ArrayUtils
.
isNotEmpty
(
vo
.
getFundFile
())){
for
(
MultipartFile
multipartFile
:
vo
.
getFundFile
())
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//支持的附件格式
String
key
=
fileName
;
boolean
flag
=
ossUtil
.
uploadFileByStream
(
multipartFile
.
getInputStream
(),
key
,
null
);
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
orderEnclosure
.
setOrderNo
(
order
.
getOrderNo
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
FIVE_INTEGER
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
try
{
tOrderEnclosureService
.
save
(
orderEnclosure
);
}
catch
(
Exception
e
)
{
log
.
error
(
"订单接收OSS文件上传接口异常:"
+
e
.
getMessage
());
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"failed:"
+
e
.
getMessage
());
}
}
else
{
return
R
.
failed
(
OrderConstants
.
OPERATE_FAILED
);
}
}
}
if
(
save
&&
ArrayUtils
.
isNotEmpty
(
vo
.
getInsuranceFile
())){
for
(
MultipartFile
multipartFile
:
vo
.
getInsuranceFile
())
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//支持的附件格式
String
key
=
fileName
;
boolean
flag
=
ossUtil
.
uploadFileByStream
(
multipartFile
.
getInputStream
(),
key
,
null
);
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
orderEnclosure
.
setOrderNo
(
order
.
getOrderNo
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
SIX_INTEGER
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
try
{
tOrderEnclosureService
.
save
(
orderEnclosure
);
}
catch
(
Exception
e
)
{
log
.
error
(
"订单接收OSS文件上传接口异常:"
+
e
.
getMessage
());
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"failed:"
+
e
.
getMessage
());
}
}
else
{
return
R
.
failed
(
OrderConstants
.
OPERATE_FAILED
);
}
}
}
if
(
save
&&
ArrayUtils
.
isNotEmpty
(
vo
.
getWithHoldingFile
())){
for
(
MultipartFile
multipartFile
:
vo
.
getWithHoldingFile
())
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//支持的附件格式
String
key
=
fileName
;
boolean
flag
=
ossUtil
.
uploadFileByStream
(
multipartFile
.
getInputStream
(),
key
,
null
);
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
orderEnclosure
.
setOrderNo
(
order
.
getOrderNo
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
SEVEN_INTEGER
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
try
{
tOrderEnclosureService
.
save
(
orderEnclosure
);
}
catch
(
Exception
e
)
{
log
.
error
(
"订单接收OSS文件上传接口异常:"
+
e
.
getMessage
());
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"failed:"
+
e
.
getMessage
());
}
}
else
{
return
R
.
failed
(
OrderConstants
.
OPERATE_FAILED
);
}
}
}
if
(
save
&&
ArrayUtils
.
isNotEmpty
(
vo
.
getCollectionFile
())){
for
(
MultipartFile
multipartFile
:
vo
.
getCollectionFile
())
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//支持的附件格式
String
key
=
fileName
;
boolean
flag
=
ossUtil
.
uploadFileByStream
(
multipartFile
.
getInputStream
(),
key
,
null
);
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
orderEnclosure
.
setOrderNo
(
order
.
getOrderNo
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
EIGHT_INTEGER
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
try
{
tOrderEnclosureService
.
save
(
orderEnclosure
);
}
catch
(
Exception
e
)
{
log
.
error
(
"订单接收OSS文件上传接口异常:"
+
e
.
getMessage
());
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"failed:"
+
e
.
getMessage
());
}
}
else
{
return
R
.
failed
(
OrderConstants
.
OPERATE_FAILED
);
}
}
}
if
(
save
&&
ArrayUtils
.
isNotEmpty
(
vo
.
getNoTaxFile
())){
for
(
MultipartFile
multipartFile
:
vo
.
getNoTaxFile
())
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//支持的附件格式
String
key
=
fileName
;
boolean
flag
=
ossUtil
.
uploadFileByStream
(
multipartFile
.
getInputStream
(),
key
,
null
);
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
orderEnclosure
.
setOrderNo
(
order
.
getOrderNo
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
NINE_INTEGER
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
try
{
tOrderEnclosureService
.
save
(
orderEnclosure
);
}
catch
(
Exception
e
)
{
log
.
error
(
"订单接收OSS文件上传接口异常:"
+
e
.
getMessage
());
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"failed:"
+
e
.
getMessage
());
}
}
else
{
return
R
.
failed
(
OrderConstants
.
OPERATE_FAILED
);
}
}
}
if
(
save
&&
ArrayUtils
.
isNotEmpty
(
vo
.
getOtherFile
())){
for
(
MultipartFile
multipartFile
:
vo
.
getOtherFile
())
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//支持的附件格式
String
key
=
fileName
;
boolean
flag
=
ossUtil
.
uploadFileByStream
(
multipartFile
.
getInputStream
(),
key
,
null
);
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
orderEnclosure
.
setOrderNo
(
order
.
getOrderNo
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
TEN_INTEGER
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
try
{
tOrderEnclosureService
.
save
(
orderEnclosure
);
}
catch
(
Exception
e
)
{
log
.
error
(
"订单接收OSS文件上传接口异常:"
+
e
.
getMessage
());
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"failed:"
+
e
.
getMessage
());
}
}
else
{
return
R
.
failed
(
OrderConstants
.
OPERATE_FAILED
);
}
}
}
if
(
save
&&
ArrayUtils
.
isNotEmpty
(
vo
.
getSalaryHandoverFile
())){
for
(
MultipartFile
multipartFile
:
vo
.
getOtherFile
())
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//支持的附件格式
String
key
=
fileName
;
boolean
flag
=
ossUtil
.
uploadFileByStream
(
multipartFile
.
getInputStream
(),
key
,
null
);
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
orderEnclosure
.
setOrderNo
(
order
.
getOrderNo
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
ELEVEN_INTEGER
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
try
{
tOrderEnclosureService
.
save
(
orderEnclosure
);
}
catch
(
Exception
e
)
{
log
.
error
(
"订单接收OSS文件上传接口异常:"
+
e
.
getMessage
());
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"failed:"
+
e
.
getMessage
());
}
}
else
{
return
R
.
failed
(
OrderConstants
.
OPERATE_FAILED
);
}
}
}
return
R
.
ok
(
OrderConstants
.
OPERATE_SUCCESS
);
return
R
.
ok
(
OrderConstants
.
OPERATE_SUCCESS
);
}
}
...
@@ -935,6 +673,327 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
...
@@ -935,6 +673,327 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
return
R
.
ok
(
OrderConstants
.
OPERATE_SUCCESS
);
return
R
.
ok
(
OrderConstants
.
OPERATE_SUCCESS
);
}
}
/**
* 接收处理ekp订单回复
*
* @author licancan
* @param vo
* @return {@link R}
* @throws IOException
*/
@Override
public
R
receiveOrderNew
(
OrderAttVo
vo
)
throws
IOException
{
if
(
Common
.
isEmpty
(
vo
.
getOrderNo
())){
return
R
.
failed
(
OrderConstants
.
ORDER_NO_IS_EMPTY
);
}
if
(
ArrayUtils
.
isNotEmpty
(
vo
.
getFile
())){
if
(
vo
.
getFile
().
length
>
CommonConstants
.
TWENTY_INT
){
return
R
.
failed
(
OrderConstants
.
ENCLOSURE_SIZE_ERROR
);
}
for
(
MultipartFile
multipartFile
:
vo
.
getFile
())
{
if
(!
Common
.
checkInsuranceFile
(
multipartFile
.
getOriginalFilename
())){
return
R
.
failed
(
OrderConstants
.
ENCLOSURE_TYPE_IS_ERROR
);
}
if
(
multipartFile
.
getSize
()
>
(
CommonConstants
.
FIFTY_INT
*
CommonConstants
.
BYTE
*
CommonConstants
.
BYTE
)){
return
R
.
failed
(
OrderConstants
.
ENCLOSURE_SIZE_ERROR
);
}
}
}
if
(
vo
.
getFile1
().
equals
(
"fileOne"
))
{
if
(
ArrayUtils
.
isNotEmpty
(
vo
.
getFile
()))
{
for
(
MultipartFile
multipartFile
:
vo
.
getFile
())
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//支持的附件格式
String
key
=
fileName
;
boolean
flag
=
ossUtil
.
uploadFileByStream
(
multipartFile
.
getInputStream
(),
key
,
null
);
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
orderEnclosure
.
setOrderNo
(
vo
.
getOrderNo
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
TWO_INTEGER
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
try
{
tOrderEnclosureService
.
save
(
orderEnclosure
);
}
catch
(
Exception
e
)
{
log
.
error
(
"订单接收OSS文件上传接口异常:"
+
e
.
getMessage
());
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"failed:"
+
e
.
getMessage
());
}
}
else
{
return
R
.
failed
(
OrderConstants
.
OPERATE_FAILED
);
}
}
}
}
if
(
vo
.
getFile1
().
equals
(
"fileTwo"
))
{
if
(
ArrayUtils
.
isNotEmpty
(
vo
.
getFile
()))
{
for
(
MultipartFile
multipartFile
:
vo
.
getFile
())
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//支持的附件格式
String
key
=
fileName
;
boolean
flag
=
ossUtil
.
uploadFileByStream
(
multipartFile
.
getInputStream
(),
key
,
null
);
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
orderEnclosure
.
setOrderNo
(
vo
.
getOrderNo
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
THREE_INTEGER
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
try
{
tOrderEnclosureService
.
save
(
orderEnclosure
);
}
catch
(
Exception
e
)
{
log
.
error
(
"订单接收OSS文件上传接口异常:"
+
e
.
getMessage
());
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"failed:"
+
e
.
getMessage
());
}
}
else
{
return
R
.
failed
(
OrderConstants
.
OPERATE_FAILED
);
}
}
}
}
if
(
vo
.
getFile1
().
equals
(
"fileThree"
))
{
if
(
ArrayUtils
.
isNotEmpty
(
vo
.
getFile
()))
{
for
(
MultipartFile
multipartFile
:
vo
.
getFile
())
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//支持的附件格式
String
key
=
fileName
;
boolean
flag
=
ossUtil
.
uploadFileByStream
(
multipartFile
.
getInputStream
(),
key
,
null
);
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
orderEnclosure
.
setOrderNo
(
vo
.
getOrderNo
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
FOUR_INTEGER
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
try
{
tOrderEnclosureService
.
save
(
orderEnclosure
);
}
catch
(
Exception
e
)
{
log
.
error
(
"订单接收OSS文件上传接口异常:"
+
e
.
getMessage
());
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"failed:"
+
e
.
getMessage
());
}
}
else
{
return
R
.
failed
(
OrderConstants
.
OPERATE_FAILED
);
}
}
}
}
if
(
vo
.
getFile1
().
equals
(
"fileFour"
))
{
if
(
ArrayUtils
.
isNotEmpty
(
vo
.
getFile
()))
{
for
(
MultipartFile
multipartFile
:
vo
.
getFile
())
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//支持的附件格式
String
key
=
fileName
;
boolean
flag
=
ossUtil
.
uploadFileByStream
(
multipartFile
.
getInputStream
(),
key
,
null
);
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
orderEnclosure
.
setOrderNo
(
vo
.
getOrderNo
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
FIVE_INTEGER
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
try
{
tOrderEnclosureService
.
save
(
orderEnclosure
);
}
catch
(
Exception
e
)
{
log
.
error
(
"订单接收OSS文件上传接口异常:"
+
e
.
getMessage
());
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"failed:"
+
e
.
getMessage
());
}
}
else
{
return
R
.
failed
(
OrderConstants
.
OPERATE_FAILED
);
}
}
}
}
if
(
vo
.
getFile1
().
equals
(
"fileFive"
))
{
if
(
ArrayUtils
.
isNotEmpty
(
vo
.
getFile
()))
{
for
(
MultipartFile
multipartFile
:
vo
.
getFile
())
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//支持的附件格式
String
key
=
fileName
;
boolean
flag
=
ossUtil
.
uploadFileByStream
(
multipartFile
.
getInputStream
(),
key
,
null
);
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
orderEnclosure
.
setOrderNo
(
vo
.
getOrderNo
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
SIX_INTEGER
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
try
{
tOrderEnclosureService
.
save
(
orderEnclosure
);
}
catch
(
Exception
e
)
{
log
.
error
(
"订单接收OSS文件上传接口异常:"
+
e
.
getMessage
());
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"failed:"
+
e
.
getMessage
());
}
}
else
{
return
R
.
failed
(
OrderConstants
.
OPERATE_FAILED
);
}
}
}
}
if
(
vo
.
getFile1
().
equals
(
"fileSix"
))
{
if
(
ArrayUtils
.
isNotEmpty
(
vo
.
getFile
()))
{
for
(
MultipartFile
multipartFile
:
vo
.
getFile
())
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//支持的附件格式
String
key
=
fileName
;
boolean
flag
=
ossUtil
.
uploadFileByStream
(
multipartFile
.
getInputStream
(),
key
,
null
);
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
orderEnclosure
.
setOrderNo
(
vo
.
getOrderNo
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
SEVEN_INTEGER
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
try
{
tOrderEnclosureService
.
save
(
orderEnclosure
);
}
catch
(
Exception
e
)
{
log
.
error
(
"订单接收OSS文件上传接口异常:"
+
e
.
getMessage
());
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"failed:"
+
e
.
getMessage
());
}
}
else
{
return
R
.
failed
(
OrderConstants
.
OPERATE_FAILED
);
}
}
}
}
if
(
vo
.
getFile1
().
equals
(
"fileSeven"
))
{
if
(
ArrayUtils
.
isNotEmpty
(
vo
.
getFile
()))
{
for
(
MultipartFile
multipartFile
:
vo
.
getFile
())
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//支持的附件格式
String
key
=
fileName
;
boolean
flag
=
ossUtil
.
uploadFileByStream
(
multipartFile
.
getInputStream
(),
key
,
null
);
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
orderEnclosure
.
setOrderNo
(
vo
.
getOrderNo
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
EIGHT_INTEGER
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
try
{
tOrderEnclosureService
.
save
(
orderEnclosure
);
}
catch
(
Exception
e
)
{
log
.
error
(
"订单接收OSS文件上传接口异常:"
+
e
.
getMessage
());
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"failed:"
+
e
.
getMessage
());
}
}
else
{
return
R
.
failed
(
OrderConstants
.
OPERATE_FAILED
);
}
}
}
}
if
(
vo
.
getFile1
().
equals
(
"fileEight"
))
{
if
(
ArrayUtils
.
isNotEmpty
(
vo
.
getFile
()))
{
for
(
MultipartFile
multipartFile
:
vo
.
getFile
())
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//支持的附件格式
String
key
=
fileName
;
boolean
flag
=
ossUtil
.
uploadFileByStream
(
multipartFile
.
getInputStream
(),
key
,
null
);
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
orderEnclosure
.
setOrderNo
(
vo
.
getOrderNo
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
NINE_INTEGER
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
try
{
tOrderEnclosureService
.
save
(
orderEnclosure
);
}
catch
(
Exception
e
)
{
log
.
error
(
"订单接收OSS文件上传接口异常:"
+
e
.
getMessage
());
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"failed:"
+
e
.
getMessage
());
}
}
else
{
return
R
.
failed
(
OrderConstants
.
OPERATE_FAILED
);
}
}
}
}
if
(
vo
.
getFile1
().
equals
(
"fileNine"
))
{
if
(
ArrayUtils
.
isNotEmpty
(
vo
.
getFile
()))
{
for
(
MultipartFile
multipartFile
:
vo
.
getFile
())
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//支持的附件格式
String
key
=
fileName
;
boolean
flag
=
ossUtil
.
uploadFileByStream
(
multipartFile
.
getInputStream
(),
key
,
null
);
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
orderEnclosure
.
setOrderNo
(
vo
.
getOrderNo
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
TEN_INTEGER
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
try
{
tOrderEnclosureService
.
save
(
orderEnclosure
);
}
catch
(
Exception
e
)
{
log
.
error
(
"订单接收OSS文件上传接口异常:"
+
e
.
getMessage
());
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"failed:"
+
e
.
getMessage
());
}
}
else
{
return
R
.
failed
(
OrderConstants
.
OPERATE_FAILED
);
}
}
}
}
if
(
vo
.
getFile1
().
equals
(
"fileTen"
))
{
if
(
ArrayUtils
.
isNotEmpty
(
vo
.
getFile
()))
{
for
(
MultipartFile
multipartFile
:
vo
.
getFile
())
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//支持的附件格式
String
key
=
fileName
;
boolean
flag
=
ossUtil
.
uploadFileByStream
(
multipartFile
.
getInputStream
(),
key
,
null
);
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
TOrderEnclosure
orderEnclosure
=
new
TOrderEnclosure
();
orderEnclosure
.
setOrderNo
(
vo
.
getOrderNo
());
orderEnclosure
.
setEnclosureName
(
multipartFile
.
getOriginalFilename
());
orderEnclosure
.
setEnclosureFlag
(
CommonConstants
.
ELEVEN_INTEGER
);
orderEnclosure
.
setEnclosureAddress
(
key
);
orderEnclosure
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
try
{
tOrderEnclosureService
.
save
(
orderEnclosure
);
}
catch
(
Exception
e
)
{
log
.
error
(
"订单接收OSS文件上传接口异常:"
+
e
.
getMessage
());
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"failed:"
+
e
.
getMessage
());
}
}
else
{
return
R
.
failed
(
OrderConstants
.
OPERATE_FAILED
);
}
}
}
}
return
R
.
ok
(
OrderConstants
.
OPERATE_SUCCESS
);
}
public
R
invalidOrder
(
String
id
)
{
public
R
invalidOrder
(
String
id
)
{
TOrder
one
=
baseMapper
.
selectById
(
id
);
TOrder
one
=
baseMapper
.
selectById
(
id
);
if
(
Common
.
isNotNull
(
one
)
&&
CommonConstants
.
ZERO_INT
!=
one
.
getOrderStatus
())
{
if
(
Common
.
isNotNull
(
one
)
&&
CommonConstants
.
ZERO_INT
!=
one
.
getOrderStatus
())
{
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TAverageSalary.java
0 → 100644
View file @
3f614dd9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
entity
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.write.style.HeadFontStyle
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Getter
;
import
lombok.Setter
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
/**
* 前12月平均工资(MVP-TDC接口)
* 保留上月与本月,删除上上月数据,用以比对差异部分,推送到TDC
*
* @author hgw
* @date 2023-6-19 15:54:50
*/
@Getter
@Setter
@TableName
(
"t_average_salary"
)
@Tag
(
name
=
"前12月平均工资"
)
public
class
TAverageSalary
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* id
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
value
=
"id"
)
private
String
id
;
/**
* 身份证号
*/
@ExcelAttribute
(
name
=
"身份证号"
,
maxLength
=
25
)
@Length
(
max
=
25
,
message
=
"身份证号不能超过25个字符"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"身份证号"
)
private
String
empIdcard
;
/**
* 应发薪酬(劳务费、稿酬)
*/
@ExcelAttribute
(
name
=
"应发薪酬"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"应发薪酬"
)
private
BigDecimal
averageSalary
;
/**
* 结算月
*/
@ExcelAttribute
(
name
=
"生成月"
,
isNotEmpty
=
true
,
errorInfo
=
"生成月不能为空"
,
maxLength
=
6
)
@NotBlank
(
message
=
"生成月不能为空"
)
@Length
(
max
=
6
,
message
=
"生成月不能超过20个字符"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"生成月"
)
private
String
createMonth
;
}
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/vo/TAverageSalaryVo.java
0 → 100644
View file @
3f614dd9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.write.style.HeadFontStyle
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
/**
* 前12月平均工资(MVP-TDC接口)
* 保留上月与本月,删除上上月数据,用以比对差异部分,推送到TDC
*
* @author hgw
* @date 2023-6-19 15:54:50
*/
@Data
public
class
TAverageSalaryVo
implements
Serializable
{
/**
* 身份证号
*/
@ExcelAttribute
(
name
=
"身份证号"
,
maxLength
=
25
)
@Length
(
max
=
25
,
message
=
"身份证号不能超过25个字符"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"身份证号"
)
private
String
empIdcard
;
/**
* 应发薪酬(劳务费、稿酬)
*/
@ExcelAttribute
(
name
=
"应发薪酬"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"应发薪酬"
)
private
BigDecimal
averageSalary
;
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TAverageSalaryController.java
0 → 100644
View file @
3f614dd9
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
controller
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.redis.RedisDistributedLock
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TAverageSalaryService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TAverageSalaryVo
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
* 前12月平均工资(MVP-TDC接口)
*
* @author hgw
* @date 2023-6-19 16:27:44
*/
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/taveragesalary"
)
@Tag
(
name
=
"前12月平均工资(MVP-TDC接口)"
)
public
class
TAverageSalaryController
{
private
final
TAverageSalaryService
tAverageSalaryService
;
/**
* @Description: 定时任务-前12月平均工资
* @Author: hgw
* @Date: 2023-6-19 16:29:50
* @return: com.yifu.cloud.v1.common.core.util.R<java.lang.String>
**/
@Inner
@Operation
(
description
=
"定时任务-前12月平均工资"
)
@PostMapping
(
"/inner/doCreateAverageSalary"
)
public
void
doCreateAverageSalary
()
{
tAverageSalaryService
.
createAverageSalary
();
}
/**
* @Author fxj
* @Description 获取-前12月平均工资数据
* @Date 10:20 2023/6/20
* @Param
* @return
**/
@Operation
(
description
=
"获取-前12月平均工资数据"
)
@GetMapping
(
"/getAverageSalary"
)
public
R
<
List
<
TAverageSalaryVo
>>
getAverageSalary
(
String
idNum
)
{
// 获取redis分布式事务锁
String
key
=
CacheConstants
.
PAYMENT_DISPATCH_BATCH_ADD_IMPORT
+
CommonConstants
.
DOWN_LINE_STRING
+
"getAverageSalary"
;
String
requestId
;
try
{
requestId
=
RedisDistributedLock
.
getLock
(
key
,
"10"
);
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
ResultConstants
.
NO_GETLOCK_DATA
+
CommonConstants
.
DOWN_LINE_STRING
+
e
.
getMessage
());
}
try
{
if
(
Common
.
isNotNull
(
requestId
))
{
//主动释放锁
return
tAverageSalaryService
.
getAverageSalary
(
idNum
);
}
else
{
return
R
.
failed
(
ResultConstants
.
NO_GETLOCK_DATA
);
}
}
finally
{
//主动释放锁
RedisDistributedLock
.
unlock
(
key
,
requestId
);
}
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TAverageSalaryMapper.java
0 → 100644
View file @
3f614dd9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TAverageSalary
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TAverageSalaryVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* 前12月平均工资(MVP-TDC接口)
*
* @author hgw
* @date 2023-6-19 16:24:41
*/
@Mapper
public
interface
TAverageSalaryMapper
extends
BaseMapper
<
TAverageSalary
>
{
/**
* 删除多余的数据
*
* @return
*/
int
deleteByCreateMonth
();
/**
* @param
* @Description: 新增新数据
* @Author: hgw
* @Date: 2023/6/19 16:10
* @return: int
**/
int
insertAverageSalary
();
/**
* @return
* @Author fxj
* @Description 获取-前12月平均工资数据 取值增量
* @Date 10:26 2023/6/20
* @Param
**/
List
<
TAverageSalaryVo
>
getAverageSalary
(
@Param
(
"idNum"
)
List
<
String
>
idNum
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TAverageSalaryService.java
0 → 100644
View file @
3f614dd9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TAverageSalary
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TAverageSalaryVo
;
import
java.util.List
;
/**
* @Author hgw
* @Description 前12月平均工资(MVP-TDC接口)
* @Date 2023-6-19 16:25:54
**/
public
interface
TAverageSalaryService
extends
IService
<
TAverageSalary
>
{
/**
* @Description: 删除本月与上上月数据,生成本月数据
* @Author: hgw
* @Date: 2023/6/19 16:26
* @return: void
**/
void
createAverageSalary
();
R
<
List
<
TAverageSalaryVo
>>
getAverageSalary
(
String
idNum
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TAverageSalaryServiceImpl.java
0 → 100644
View file @
3f614dd9
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.salary.entity.TAverageSalary
;
import
com.yifu.cloud.plus.v1.yifu.salary.mapper.TAverageSalaryMapper
;
import
com.yifu.cloud.plus.v1.yifu.salary.service.TAverageSalaryService
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TAverageSalaryVo
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* @Author hgw
* @Description 前12月平均工资(MVP-TDC接口)
* @Date 2023-6-19 16:25:16
**/
@Service
(
"tAverageSalaryService"
)
public
class
TAverageSalaryServiceImpl
extends
ServiceImpl
<
TAverageSalaryMapper
,
TAverageSalary
>
implements
TAverageSalaryService
{
/**
* @Description: 删除本月与上上月数据,生成本月数据
* @Author: hgw
* @Date: 2023/6/19 16:32
* @return: void
**/
@Override
public
void
createAverageSalary
()
{
baseMapper
.
deleteByCreateMonth
();
baseMapper
.
insertAverageSalary
();
}
/**
* @return
* @Author fxj
* @Description 获取-前12月平均工资数据
* @Date 10:25 2023/6/20
* @Param
**/
@Override
public
R
<
List
<
TAverageSalaryVo
>>
getAverageSalary
(
String
idNum
)
{
return
R
.
ok
(
baseMapper
.
getAverageSalary
(
Common
.
getList
(
idNum
)),
CommonConstants
.
RESULT_DATA_SUCESS
);
}
}
yifu-salary/yifu-salary-biz/src/main/resources/application.yml
View file @
3f614dd9
...
@@ -39,6 +39,7 @@ security:
...
@@ -39,6 +39,7 @@ security:
-
/v3/api-docs
-
/v3/api-docs
-
/actuator/**
-
/actuator/**
-
/swagger-ui/**
-
/swagger-ui/**
-
/taveragesalary/getAverageSalary
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TAverageSalaryMapper.xml
0 → 100644
View file @
3f614dd9
<?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=
"com.yifu.cloud.plus.v1.yifu.salary.mapper.TAverageSalaryMapper"
>
<resultMap
id=
"tAverageSalaryMap"
type=
"com.yifu.cloud.plus.v1.yifu.salary.entity.TAverageSalary"
>
<id
property=
"id"
column=
"ID"
/>
<result
property=
"empIdcard"
column=
"EMP_IDCARD"
/>
<result
property=
"averageSalary"
column=
"AVERAGE_SALARY"
/>
<result
property=
"createMonth"
column=
"CREATE_MONTH"
/>
</resultMap>
<resultMap
id=
"tAverageSalaryVoMap"
type=
"com.yifu.cloud.plus.v1.yifu.salary.vo.TAverageSalaryVo"
>
<result
property=
"empIdcard"
column=
"EMP_IDCARD"
/>
<result
property=
"averageSalary"
column=
"AVERAGE_SALARY"
/>
</resultMap>
<!-- 删除不需要的数据 -->
<delete
id=
"deleteByCreateMonth"
>
delete
from t_average_salary
where CREATE_MONTH in (
DATE_FORMAT(now(), '%Y%m'), DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 2 MONTH), '%Y%m')
)
</delete>
<!-- 生成需要的数据 -->
<insert
id=
"insertAverageSalary"
>
insert into t_average_salary
select CONCAT(DATE_FORMAT(now(), '%Y%m-'), a.ID) ID
, a.EMP_IDCARD
, round(sum(a.RELAY_SALARY) / ifnull(count(DISTINCT a.SALARY_MONTH), 1), 2) AVERAGE_SALARY
, DATE_FORMAT(now(), '%Y%m') CREATE_MONTH
from t_salary_account a
where a.SALARY_MONTH >= date_format(DATE_SUB(NOW(), INTERVAL 1 YEAR), '%Y%m')
GROUP BY a.EMP_IDCARD
</insert>
<select
id=
"getAverageSalary"
resultMap=
"tAverageSalaryVoMap"
>
select x.* from
(select a.EMP_IDCARD,a.AVERAGE_SALARY from view_average_cur_month a) x
LEFT JOIN
(select a.EMP_IDCARD,a.AVERAGE_SALARY from view_average_last_month a) y
on x.EMP_IDCARD=y.EMP_IDCARD
where (x.AVERAGE_SALARY
<![CDATA[ <> ]]>
IFNULL(y.AVERAGE_SALARY,-1))
<if
test=
"idNum != null and idNum.size > 0"
>
AND x.EMP_IDCARD in
<foreach
item=
"item"
index=
"index"
collection=
"idNum"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</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