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
06c1a3d8
Commit
06c1a3d8
authored
Sep 01, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
e6127c44
62432d18
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
483 additions
and
76 deletions
+483
-76
ValidityConstants.java
....plus.v1/yifu/common/core/constant/ValidityConstants.java
+1
-1
pom.xml
yifu-common/yifu-common-ekp/pom.xml
+5
-0
EkpOrderProperties.java
...ifu.cloud.plus.v1/yifu/ekp/config/EkpOrderProperties.java
+62
-0
EkpOrderUtil.java
...va/com/yifu.cloud.plus.v1/yifu/ekp/util/EkpOrderUtil.java
+168
-0
AttachmentForm.java
...va/com/yifu/cloud/plus/v1/yifu/ekp/vo/AttachmentForm.java
+23
-0
EkpOrderParam.java
...ava/com/yifu/cloud/plus/v1/yifu/ekp/vo/EkpOrderParam.java
+23
-0
EkpOrderReplyParam.java
...om/yifu/cloud/plus/v1/yifu/ekp/vo/EkpOrderReplyParam.java
+31
-0
spring.factories
...u-common-ekp/src/main/resources/META-INF/spring.factories
+1
-0
ekpOrderConfig.properties
...u-common-ekp/src/main/resources/ekpOrderConfig.properties
+12
-0
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+4
-4
InsuranceDetailVO.java
...u/cloud/plus/v1/yifu/insurances/vo/InsuranceDetailVO.java
+6
-0
InsuredOrderListVo.java
.../cloud/plus/v1/yifu/insurances/vo/InsuredOrderListVo.java
+6
-0
InsuredOrderParam.java
...u/cloud/plus/v1/yifu/insurances/vo/InsuredOrderParam.java
+3
-2
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+22
-17
TInsuranceDetailMapper.xml
...in/resources/mapper/insurances/TInsuranceDetailMapper.xml
+40
-38
OrderConstants.java
...fu/cloud/plus/v1/yifu/order/constants/OrderConstants.java
+4
-0
pom.xml
yifu-order/yifu-order-biz/pom.xml
+6
-0
TOrderServiceImpl.java
...ud/plus/v1/yifu/order/service/impl/TOrderServiceImpl.java
+50
-2
TStatisticsCurrentReportMarketVo.java
...s/v1/yifu/salary/vo/TStatisticsCurrentReportMarketVo.java
+4
-1
TStatisticsCurrentReportMarketServiceImpl.java
...rvice/impl/TStatisticsCurrentReportMarketServiceImpl.java
+10
-9
TStatisticsDeclarerMapper.xml
...z/src/main/resources/mapper/TStatisticsDeclarerMapper.xml
+1
-0
TStatisticsRemunerationMapper.xml
...c/main/resources/mapper/TStatisticsRemunerationMapper.xml
+1
-2
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/ValidityConstants.java
View file @
06c1a3d8
...
...
@@ -67,7 +67,7 @@ public class ValidityConstants {
/** 最多60位 规则 */
public
static
final
String
PATTERN_60
=
"^.{1,60}$"
;
/** 最多200位 规则 */
public
static
final
String
PATTERN_200
=
"
^.
{1,200}$"
;
public
static
final
String
PATTERN_200
=
"
[\\s\\S]
{1,200}$"
;
/** 不超过两位小数的正数 */
public
static
final
String
POSITIVE_INTEGER_PATTERN_TWO_FLOAT
=
"^[+]?([0-9]+(.[0-9]{1,2})?)$"
;
...
...
yifu-common/yifu-common-ekp/pom.xml
View file @
06c1a3d8
...
...
@@ -37,5 +37,10 @@
<version>
1.0.0
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
commons-io
</groupId>
<artifactId>
commons-io
</artifactId>
<version>
2.6
</version>
</dependency>
</dependencies>
</project>
yifu-common/yifu-common-ekp/src/main/java/com/yifu.cloud.plus.v1/yifu/ekp/config/EkpOrderProperties.java
0 → 100644
View file @
06c1a3d8
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
ekp
.
config
;
import
lombok.Data
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.context.annotation.PropertySource
;
import
org.springframework.stereotype.Component
;
/**
* @author licancan
* @description 对接ekp订单
* @date 2022-08-31 15:35:20
*/
@Data
@Component
@PropertySource
(
"classpath:ekpOrderConfig.properties"
)
@ConfigurationProperties
(
value
=
"ekporder"
,
ignoreInvalidFields
=
false
)
public
class
EkpOrderProperties
{
/**
* 接口url
*/
String
url
;
/**
* 订单modelId
*/
String
orderFdModelId
;
/**
* 订单flowID
*/
String
orderFdFlowId
;
/**
* 订单回复modelId
*/
String
replyFdModelId
;
/**
* 订单回复flowID
*/
String
replyFdFlowId
;
/**
* 订单附件key
*/
String
replyAttachKey
;
String
docStatus
;
String
LoginName
;
/**
* 描述:用于项目订单更新接口
*/
String
orderDocSubject
;
/**
* 描述:用于订单回复接口
*/
String
replyDocSubject
;
}
yifu-common/yifu-common-ekp/src/main/java/com/yifu.cloud.plus.v1/yifu/ekp/util/EkpOrderUtil.java
0 → 100644
View file @
06c1a3d8
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
ekp
.
util
;
import
com.yifu.cloud.plus.v1.yifu.ekp.config.EkpOrderProperties
;
import
com.yifu.cloud.plus.v1.yifu.ekp.constant.EkpConstants
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.AttachmentForm
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpOrderParam
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpOrderReplyParam
;
import
io.micrometer.core.instrument.util.StringUtils
;
import
lombok.extern.log4j.Log4j2
;
import
org.apache.commons.io.FileUtils
;
import
org.apache.commons.lang.ArrayUtils
;
import
org.codehaus.jackson.map.ObjectMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.http.*
;
import
org.springframework.util.LinkedMultiValueMap
;
import
org.springframework.util.MultiValueMap
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.activation.DataHandler
;
import
javax.activation.DataSource
;
import
javax.activation.FileDataSource
;
import
java.io.File
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* @author licancan
* @description 对接ekp订单
* @date 2022-08-31 15:35:20
*/
@Log4j2
@EnableConfigurationProperties
(
EkpOrderProperties
.
class
)
public
class
EkpOrderUtil
{
@Autowired
private
EkpOrderProperties
ekpProperties
;
/**
* 更新订单状态
*
* @author licancan
* @param param
* @return {@link String}
*/
public
String
sendOrderToEKP
(
EkpOrderParam
param
){
log
.
info
(
"推送EKP开始--订单状态"
);
RestTemplate
yourRestTemplate
=
new
RestTemplate
();
try
{
String
formValues
=
new
ObjectMapper
().
writeValueAsString
(
param
);
//指向EKP的接口url
//把ModelingAppModelParameterAddForm转换成MultiValueMap
MultiValueMap
<
String
,
Object
>
wholeForm
=
new
LinkedMultiValueMap
<>();
wholeForm
.
add
(
"docSubject"
,
ekpProperties
.
getOrderDocSubject
());
wholeForm
.
add
(
"docCreator"
,
"{\"LoginName\":\"admin\"}"
);
wholeForm
.
add
(
"docStatus"
,
ekpProperties
.
getDocStatus
());
wholeForm
.
add
(
"fdModelId"
,
ekpProperties
.
getOrderFdModelId
());
wholeForm
.
add
(
"fdFlowId"
,
ekpProperties
.
getOrderFdFlowId
());
wholeForm
.
add
(
"formValues"
,
formValues
);
log
.
info
(
"wholeForm:"
+
wholeForm
);
HttpHeaders
headers
=
new
HttpHeaders
();
//如果EKP对该接口启用了Basic认证,那么客户端需要加入
//addAuth(headers,"yourAccount"+":"+"yourPassword");是VO,则使用APPLICATION_JSON
headers
.
setContentType
(
MediaType
.
MULTIPART_FORM_DATA
);
//必须设置上传类型,如果入参是字符串,使用MediaType.TEXT_PLAIN;如果
HttpEntity
<
MultiValueMap
<
String
,
Object
>>
entity
=
new
HttpEntity
<
MultiValueMap
<
String
,
Object
>>(
wholeForm
,
headers
);
//有返回值的情况 VO可以替换成具体的JavaBean
ResponseEntity
<
String
>
obj
=
yourRestTemplate
.
exchange
(
ekpProperties
.
getUrl
(),
HttpMethod
.
POST
,
entity
,
String
.
class
);
String
body
=
obj
.
getBody
();
if
(
StringUtils
.
isBlank
(
body
)){
log
.
error
(
EkpConstants
.
SEND_FAILED
);
return
null
;
}
else
{
log
.
info
(
EkpConstants
.
SEND_SUCCESS
+
body
);
return
body
;
}
}
catch
(
Exception
e
){
log
.
error
(
e
);
return
null
;
}
}
/**
* 推送订单回复
*
* @author licancan
* @param param
* @return {@link String}
*/
public
String
sendReplyToEKP
(
EkpOrderReplyParam
param
,
MultipartFile
[]
multipartFiles
){
log
.
info
(
"推送EKP开始--订单回复信息"
);
RestTemplate
yourRestTemplate
=
new
RestTemplate
();
List
<
AttachmentForm
>
fileList
=
createAllAttach
(
multipartFiles
);
try
{
String
formValues
=
new
ObjectMapper
().
writeValueAsString
(
param
);
//指向EKP的接口url
//把ModelingAppModelParameterAddForm转换成MultiValueMap
MultiValueMap
<
String
,
Object
>
wholeForm
=
new
LinkedMultiValueMap
<>();
wholeForm
.
add
(
"docSubject"
,
ekpProperties
.
getReplyDocSubject
());
wholeForm
.
add
(
"docCreator"
,
"{\"LoginName\":\"admin\"}"
);
wholeForm
.
add
(
"docStatus"
,
ekpProperties
.
getDocStatus
());
wholeForm
.
add
(
"fdModelId"
,
ekpProperties
.
getReplyFdModelId
());
wholeForm
.
add
(
"fdFlowId"
,
ekpProperties
.
getReplyFdFlowId
());
wholeForm
.
add
(
"formValues"
,
formValues
);
wholeForm
.
add
(
"attachmentForms"
,
fileList
);
log
.
info
(
"wholeForm:"
+
wholeForm
);
HttpHeaders
headers
=
new
HttpHeaders
();
//如果EKP对该接口启用了Basic认证,那么客户端需要加入
//addAuth(headers,"yourAccount"+":"+"yourPassword");是VO,则使用APPLICATION_JSON
headers
.
setContentType
(
MediaType
.
MULTIPART_FORM_DATA
);
//必须设置上传类型,如果入参是字符串,使用MediaType.TEXT_PLAIN;如果
HttpEntity
<
MultiValueMap
<
String
,
Object
>>
entity
=
new
HttpEntity
<
MultiValueMap
<
String
,
Object
>>(
wholeForm
,
headers
);
//有返回值的情况 VO可以替换成具体的JavaBean
ResponseEntity
<
String
>
obj
=
yourRestTemplate
.
exchange
(
ekpProperties
.
getUrl
(),
HttpMethod
.
POST
,
entity
,
String
.
class
);
String
body
=
obj
.
getBody
();
if
(
StringUtils
.
isBlank
(
body
)){
log
.
error
(
EkpConstants
.
SEND_FAILED
);
return
null
;
}
else
{
log
.
info
(
EkpConstants
.
SEND_SUCCESS
+
body
);
return
body
;
}
}
catch
(
Exception
e
){
log
.
error
(
e
);
return
null
;
}
finally
{
//将产生的临时附件删除,这里的fileList没值得话是[],不会是null,如果是null需要做判空处理
fileList
.
stream
().
forEach
(
e
->
{
FileDataSource
dataSource
=
(
FileDataSource
)
e
.
getFdAttachment
().
getDataSource
();
boolean
delete
=
dataSource
.
getFile
().
delete
();
log
.
info
(
"临时附件删除结果:"
,
delete
);
});
}
}
/**
* 处理成ekp要的附件格式
*
* @author licancan
* @param multipartFiles
* @return {@link List<AttachmentForm>}
*/
public
List
<
AttachmentForm
>
createAllAttach
(
MultipartFile
[]
multipartFiles
){
List
<
AttachmentForm
>
attForms
=
new
ArrayList
<>();
if
(
ArrayUtils
.
isNotEmpty
(
multipartFiles
)){
try
{
for
(
MultipartFile
multipartFile
:
multipartFiles
)
{
AttachmentForm
attForm
=
new
AttachmentForm
();
//设置附件关键字,注意附件列表的key是一样的
attForm
.
setFdKey
(
ekpProperties
.
getReplyAttachKey
());
attForm
.
setFdFileName
(
multipartFile
.
getOriginalFilename
());
File
file
=
new
File
(
multipartFile
.
getOriginalFilename
());
FileUtils
.
copyInputStreamToFile
(
multipartFile
.
getInputStream
(),
file
);
DataSource
dataSource
=
new
FileDataSource
(
file
);
DataHandler
dataHandler
=
new
DataHandler
(
dataSource
);
attForm
.
setFdAttachment
(
dataHandler
);
attForms
.
add
(
attForm
);
}
}
catch
(
Exception
e
){
log
.
error
(
"createAllAttach--->error:"
,
e
);
}
}
return
attForms
;
}
}
yifu-common/yifu-common-ekp/src/main/java/com/yifu/cloud/plus/v1/yifu/ekp/vo/AttachmentForm.java
0 → 100644
View file @
06c1a3d8
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
ekp
.
vo
;
import
lombok.Data
;
import
javax.activation.DataHandler
;
import
javax.xml.bind.annotation.XmlAccessType
;
import
javax.xml.bind.annotation.XmlAccessorType
;
import
javax.xml.bind.annotation.XmlMimeType
;
/**
* @author licancan
* @description ekp附件类
* @date 2022-08-31 17:02:49
*/
@XmlAccessorType
(
XmlAccessType
.
FIELD
)
@Data
public
class
AttachmentForm
{
private
String
fdKey
;
private
String
fdFileName
;
@XmlMimeType
(
"application/octet-stream"
)
private
DataHandler
fdAttachment
;
}
yifu-common/yifu-common-ekp/src/main/java/com/yifu/cloud/plus/v1/yifu/ekp/vo/EkpOrderParam.java
0 → 100644
View file @
06c1a3d8
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
ekp
.
vo
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @author licancan
* @description 对接ekp订单请求参数
* @date 2022-08-31 15:35:20
*/
@Data
public
class
EkpOrderParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
8276721461475968927L
;
/**
* 订单编号
**/
private
String
fd_3b0b02a93e9cda
;
/**
* 订单状态 待处理,处理中,已办结
**/
private
String
fd_3b0b02a34a0134
;
}
yifu-common/yifu-common-ekp/src/main/java/com/yifu/cloud/plus/v1/yifu/ekp/vo/EkpOrderReplyParam.java
0 → 100644
View file @
06c1a3d8
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
ekp
.
vo
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @author licancan
* @description 对接ekp订单回复请求参数
* @date 2022-08-31 15:35:20
*/
@Data
public
class
EkpOrderReplyParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
8671347855651484998L
;
/**
* 订单编号
**/
private
String
fd_3ac904bbaf972a
;
/**
* 回复人 (人员账号)
**/
private
String
fd_3ac904badcaa06
;
/**
* 回复时间
**/
private
String
fd_3ac904b8590598
;
/**
* 回复内容
*/
private
String
fd_3ac904c7798e5c
;
}
yifu-common/yifu-common-ekp/src/main/resources/META-INF/spring.factories
View file @
06c1a3d8
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpOrderUtil,\
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpInsuranceUtil,\
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSalaryUtil,\
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSocialUtil,\
...
...
yifu-common/yifu-common-ekp/src/main/resources/ekpOrderConfig.properties
0 → 100644
View file @
06c1a3d8
ekporder.url
=
http://119.96.227.251:8080/api/sys-modeling/appModelRestService/addModel
ekporder.orderFdModelId
=
182f1b7ffe2e96f975564e44e559847d
ekporder.orderFdFlowId
=
182f1c098ce991ca96bc927408792beb
ekporder.replyFdModelId
=
182f1bb35bb2156fb9a02904bc88dd8a
ekporder.replyFdFlowId
=
182f1c3d6f5724e335b88d544be8c993
ekporder.replyAttachKey
=
fd_3ac904c9342fe2
ekporder.docStatus
=
20
ekporder.LoginName
=
admin
ekporder.orderDocSubject
=
\u7528\u
4e8e
\u9879\u
76ee
\u
8ba2
\u5355\u
66f4
\u
65b0
\u
63a5
\u
53e3
ekporder.replyDocSubject
=
\u7528\u
4e8e
\u
8ba2
\u5355\u
56de
\u
590d
\u
63a5
\u
53e3
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
06c1a3d8
...
...
@@ -995,14 +995,14 @@ public class InsurancesConstants {
public
static
final
String
SETTLE_ZERO
=
"未结算"
;
/**
*
已结算
*
结算中
*/
public
static
final
String
SETTLE_ONE
=
"
已结算
"
;
public
static
final
String
SETTLE_ONE
=
"
结算中
"
;
/**
*
结算中
*
已结算
*/
public
static
final
String
SETTLE_TWO
=
"
结算中
"
;
public
static
final
String
SETTLE_TWO
=
"
已结算
"
;
/**
* 无需结算
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuranceDetailVO.java
View file @
06c1a3d8
...
...
@@ -325,6 +325,12 @@ public class InsuranceDetailVO implements Serializable {
@Schema
(
description
=
"被替换人项目名称(替换类型专用字段)"
)
private
String
coverProjectName
;
/**
* 被替换人封面抬头
*/
@Schema
(
description
=
"被替换人封面抬头"
)
private
String
coveInvoiceTitle
;
/**
* 退保金额 todo 数据库暂时没有
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuredOrderListVo.java
View file @
06c1a3d8
...
...
@@ -78,6 +78,12 @@ public class InsuredOrderListVo implements Serializable {
@Schema
(
description
=
"创建人(派单人)"
)
private
String
createName
;
/**
* 创建人id
*/
@Schema
(
description
=
"创建人id(派单人id)"
)
private
String
createBy
;
/**
* 创建人部门名称
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/InsuredOrderParam.java
View file @
06c1a3d8
...
...
@@ -6,6 +6,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.time.LocalDate
;
import
java.util.List
;
/**
...
...
@@ -37,13 +38,13 @@ public class InsuredOrderParam implements Serializable {
* 开始日期
*/
@Schema
(
description
=
"开始日期"
)
private
String
startDate
;
private
LocalDate
startDate
;
/**
* 结束日期
*/
@Schema
(
description
=
"结束日期"
)
private
String
endDate
;
private
LocalDate
endDate
;
/**
* 项目编码列表
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
06c1a3d8
...
...
@@ -1030,7 +1030,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
//todo 判断是否推送过保费到ekp,如果推送过就新增一条负的,将结算表中的数据求和放到明细表中
for
(
TInsuranceDetail
detail
:
successList
)
{
if
(
StringUtils
.
isNotBlank
(
detail
.
getDefaultSettleId
())){
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
detail
.
getDefaultSettleId
());
...
...
@@ -1051,6 +1050,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail
.
setEstimatePremium
(
new
BigDecimal
(
"0.00"
));
}
tInsuranceSettleService
.
save
(
burden
);
SettleVo
settleVo
=
getInsuranceDetailSettleStatus
(
detail
.
getId
(),
detail
.
getDefaultSettleId
());
if
(!
Common
.
isEmpty
(
settleVo
)
&&
InsurancesConstants
.
SETTLE_ONE
.
equals
(
settleVo
.
getEstimateStatus
())
&&
InsurancesConstants
.
SETTLE_ONE
.
equals
(
settleVo
.
getActualStatus
())){
//推送负的给ekp
String
s
=
pushEstimate
(
detail
,
CommonConstants
.
THREE_INT
);
//这里退回的时候,必须置为null,防止是实缴的时候,登记保费出错
...
...
@@ -1058,6 +1059,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail
.
setDefaultSettleId
(
null
);
}
}
}
}
//获取成功数据的remark
paramList
.
stream
().
forEach
(
e
->{
...
...
@@ -3169,13 +3172,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
null
!=
jsonObject
){
record
.
setProjectName
(
Optional
.
ofNullable
(
jsonObject
.
getDepartName
()).
orElse
(
""
));
}
TInsuranceDetail
detail
=
new
TInsuranceDetail
(
);
TInsuranceDetail
detail
=
getById
(
record
.
getId
()
);
TInsuranceRefund
refund
=
new
TInsuranceRefund
();
detail
.
setId
(
record
.
getId
());
//update状态由「待减员」置为「减员中」
detail
.
setUpdateBy
(
user
.
getId
());
detail
.
setUpdateTime
(
LocalDateTime
.
now
());
detail
.
setReduceHandleStatus
(
CommonConstants
.
TWO_INT
);
detailList
.
add
(
detail
);
refund
.
setId
(
detail
.
getRefundId
());
refund
.
setReduceHandleStatus
(
CommonConstants
.
TWO_INT
);
...
...
@@ -4496,13 +4500,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
Optional
.
ofNullable
(
settle
).
isPresent
()){
SettleVo
settleVo
=
getInsuranceDetailSettleStatus
(
insuranceDetail
.
getId
(),
defaultSettleId
);
if
(!
Common
.
isEmpty
(
settleVo
)){
if
(
InsurancesConstants
.
SETTLE_ONE
.
equals
(
settleVo
.
getActualStatus
())){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_
HANDLE_TWO_NOT_REGISTERED
);
if
(
InsurancesConstants
.
SETTLE_ONE
.
equals
(
settleVo
.
get
EstimateStatus
())
||
InsurancesConstants
.
SETTLE_ONE
.
equals
(
settleVo
.
get
ActualStatus
())){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_
MONTH_CHANGE_SETTLE_STATUS_TWO_ERROR
);
errorList
.
add
(
param
);
continue
;
}
if
(
InsurancesConstants
.
SETTLE_TWO
.
equals
(
settleVo
.
getActualStatus
())){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_
HANDLE_THREE_NOT_REGISTERED
);
if
(
InsurancesConstants
.
SETTLE_TWO
.
equals
(
settleVo
.
get
EstimateStatus
())
||
InsurancesConstants
.
SETTLE_TWO
.
equals
(
settleVo
.
get
ActualStatus
())){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_
MONTH_CHANGE_SETTLE_STATUS_THREE_ERROR
);
errorList
.
add
(
param
);
continue
;
}
...
...
@@ -5003,13 +5007,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if
(
Optional
.
ofNullable
(
settle
).
isPresent
()){
SettleVo
settleVo
=
getInsuranceDetailSettleStatus
(
insuranceDetail
.
getId
(),
defaultSettleId
);
if
(!
Common
.
isEmpty
(
settleVo
)){
if
(
InsurancesConstants
.
SETTLE_ONE
.
equals
(
settleVo
.
getActualStatus
())){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_TWO_NOT_REGISTERED
);
if
(
InsurancesConstants
.
SETTLE_ONE
.
equals
(
settleVo
.
get
EstimateStatus
())
||
InsurancesConstants
.
SETTLE_ONE
.
equals
(
settleVo
.
get
ActualStatus
())){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_CHANGE_SETTLE_STATUS_TWO_ERROR
);
errorList
.
add
(
param
);
continue
;
}
if
(
InsurancesConstants
.
SETTLE_TWO
.
equals
(
settleVo
.
getActualStatus
())){
param
.
setErrorMessage
(
InsurancesConstants
.
SETTLE_HANDLE_THREE_NOT_REGISTERED
);
if
(
InsurancesConstants
.
SETTLE_TWO
.
equals
(
settleVo
.
get
EstimateStatus
())
||
InsurancesConstants
.
SETTLE_TWO
.
equals
(
settleVo
.
get
ActualStatus
())){
param
.
setErrorMessage
(
InsurancesConstants
.
DEPT_NO_CHANGE_SETTLE_STATUS_THREE_ERROR
);
errorList
.
add
(
param
);
continue
;
}
...
...
@@ -5387,11 +5391,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
param
.
setSettleType
(
InsurancesConstants
.
ACTUAL_SETTLE_BILL
);
pushType
=
CommonConstants
.
SEVEN_INT
;
}
if
(
StringUtils
.
isBlank
(
eKPInsuranceUtil
.
sendToEkp
(
param
))){
String
s
=
eKPInsuranceUtil
.
sendToEkp
(
param
);
if
(
StringUtils
.
isBlank
(
s
)){
saveInsuranceEkp
(
param
,
pushType
);
return
null
;
}
else
{
return
eKPInsuranceUtil
.
sendToEkp
(
param
)
;
return
s
;
}
}
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/insurances/TInsuranceDetailMapper.xml
View file @
06c1a3d8
This diff is collapsed.
Click to expand it.
yifu-order/yifu-order-api/src/main/java/com/yifu/cloud/plus/v1/yifu/order/constants/OrderConstants.java
View file @
06c1a3d8
...
...
@@ -42,6 +42,10 @@ public class OrderConstants {
* 订单不存在
*/
public
static
final
String
ORDER_NO_NOT_EXIST
=
"订单不存在"
;
/**
* 订单已办结,无法添加回复
*/
public
static
final
String
ORDER_STATUS_IS_TWO
=
"订单已办结,无法添加回复"
;
/**
* 订单已存在
*/
...
...
yifu-order/yifu-order-biz/pom.xml
View file @
06c1a3d8
...
...
@@ -65,6 +65,12 @@
<artifactId>
commons-collections
</artifactId>
<version>
3.2.2
</version>
</dependency>
<dependency>
<groupId>
com.yifu.cloud.plus.v1
</groupId>
<artifactId>
yifu-common-ekp
</artifactId>
<version>
1.0.0
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
<build>
...
...
yifu-order/yifu-order-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/order/service/impl/TOrderServiceImpl.java
View file @
06c1a3d8
...
...
@@ -10,6 +10,9 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils
;
import
com.yifu.cloud.plus.v1.yifu.ekp.util.EkpOrderUtil
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpOrderParam
;
import
com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpOrderReplyParam
;
import
com.yifu.cloud.plus.v1.yifu.order.constants.OrderConstants
;
import
com.yifu.cloud.plus.v1.yifu.order.entity.TOrder
;
import
com.yifu.cloud.plus.v1.yifu.order.entity.TOrderEnclosure
;
...
...
@@ -56,6 +59,8 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
private
TOrderHandlerService
tOrderHandlerService
;
@Resource
private
OSSUtil
ossUtil
;
@Resource
private
EkpOrderUtil
ekpOrderUtil
;
/**
* 订单列表分页查询
...
...
@@ -120,10 +125,39 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
byId
.
setUpdateName
(
user
.
getNickname
());
byId
.
setUpdateTime
(
LocalDateTime
.
now
());
this
.
updateById
(
byId
);
// todo 如果是办结完成同步给ekp
// 状态同步给ekp
EkpOrderParam
param
=
new
EkpOrderParam
();
param
.
setFd_3b0b02a93e9cda
(
byId
.
getOrderNo
());
param
.
setFd_3b0b02a34a0134
(
getOrderStatus
(
status
));
//ekpOrderUtil.sendOrderToEKP(param);
return
R
.
ok
(
OrderConstants
.
OPERATE_SUCCESS
);
}
/**
* 获取订单状态
*
* @author licancan
* @param orderStatus
* @return {@link String}
*/
private
String
getOrderStatus
(
Integer
orderStatus
){
String
result
;
switch
(
orderStatus
){
case
0
:
result
=
"待处理"
;
break
;
case
1
:
result
=
"处理中"
;
break
;
case
2
:
result
=
"已办结"
;
break
;
default
:
result
=
""
;
}
return
result
;
}
/**
* 通过id查询详情
*
...
...
@@ -200,6 +234,10 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
);
if
(!
Optional
.
ofNullable
(
one
).
isPresent
()){
return
R
.
failed
(
OrderConstants
.
ORDER_NO_NOT_EXIST
);
}
else
{
if
(
CommonConstants
.
TWO_INT
==
one
.
getOrderStatus
()){
return
R
.
failed
(
OrderConstants
.
ORDER_STATUS_IS_TWO
);
}
}
if
(
Common
.
isEmpty
(
replyContent
)
&&
ArrayUtils
.
isEmpty
(
file
)){
return
R
.
failed
(
OrderConstants
.
REPLY_CONTENT_AND_ENCLOSURE_IS_EMPTY
);
...
...
@@ -231,7 +269,13 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
reply
.
setCreateTime
(
LocalDateTime
.
now
());
reply
.
setDeleteFlag
(
CommonConstants
.
ZERO_INT
);
boolean
save
=
tOrderReplyService
.
save
(
reply
);
//todo 同步推送ekp
//同步推送ekp
EkpOrderReplyParam
param
=
new
EkpOrderReplyParam
();
param
.
setFd_3ac904bbaf972a
(
orderNo
);
param
.
setFd_3ac904badcaa06
(
user
.
getUsername
());
param
.
setFd_3ac904b8590598
(
reply
.
getCreateTime
().
toString
());
param
.
setFd_3ac904c7798e5c
(
replyContent
);
//ekpOrderUtil.sendReplyToEKP(param,file);
if
(
save
&&
ArrayUtils
.
isNotEmpty
(
file
)){
for
(
MultipartFile
multipartFile
:
file
)
{
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
multipartFile
.
getOriginalFilename
();
...
...
@@ -408,6 +452,10 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
);
if
(!
Optional
.
ofNullable
(
one
).
isPresent
()){
return
R
.
failed
(
OrderConstants
.
ORDER_NO_NOT_EXIST
);
}
else
{
if
(
CommonConstants
.
TWO_INT
==
one
.
getOrderStatus
()){
return
R
.
failed
(
OrderConstants
.
ORDER_STATUS_IS_TWO
);
}
}
if
(
Common
.
isEmpty
(
vo
.
getCreateName
())){
return
R
.
failed
(
OrderConstants
.
REPLY_NAME_IS_EMPTY
);
...
...
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/vo/TStatisticsCurrentReportMarketVo.java
View file @
06c1a3d8
...
...
@@ -34,7 +34,10 @@ import java.math.BigDecimal;
* @date 2022-08-05 11:40:14
*/
@Data
public
class
TStatisticsCurrentReportMarketVo
extends
RowIndex
implements
Serializable
{
public
class
TStatisticsCurrentReportMarketVo
implements
Serializable
{
@ExcelAttribute
(
name
=
"行号"
)
private
Integer
rowIndex
;
/**
* 税务主体(封面抬头)
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TStatisticsCurrentReportMarketServiceImpl.java
View file @
06c1a3d8
...
...
@@ -135,18 +135,19 @@ public class TStatisticsCurrentReportMarketServiceImpl extends ServiceImpl<TStat
declareMonth
=
DateUtil
.
getYearMonth
(
cachedDataList
.
get
(
0
).
getCreateStart
());
}
if
(
Common
.
isEmpty
(
declareMonth
))
{
errorMessageList
.
add
(
new
ErrorMessage
(
CommonConstants
.
ZER
O_INT
errorMessageList
.
add
(
new
ErrorMessage
(
CommonConstants
.
TW
O_INT
,
"请检查‘税款所属期起’单元格格式是文本格式,且满足日期格式yyyy-MM-dd或yyyyMMdd"
));
}
}
else
{
try
{
Integer
.
parseInt
(
declareMonth
);
}
catch
(
Exception
e
)
{
errorMessageList
.
add
(
new
ErrorMessage
(
CommonConstants
.
ZER
O_INT
errorMessageList
.
add
(
new
ErrorMessage
(
CommonConstants
.
TW
O_INT
,
"请检查‘税款所属期起’单元格格式是文本格式,且满足日期格式yyyy-MM-dd或yyyyMMdd"
));
}
}
declareTitle
=
cachedDataList
.
get
(
0
).
getInvoiceTitle
();
if
(
Common
.
isEmpty
(
declareTitle
))
{
errorMessageList
.
add
(
new
ErrorMessage
(
CommonConstants
.
ZER
O_INT
errorMessageList
.
add
(
new
ErrorMessage
(
CommonConstants
.
TW
O_INT
,
"封面抬头全称-不能为空"
));
}
if
(
Common
.
isNotNull
(
declareMonth
)
&&
Common
.
isNotNull
(
declareTitle
))
{
...
...
@@ -157,7 +158,7 @@ public class TStatisticsCurrentReportMarketServiceImpl extends ServiceImpl<TStat
queryWrapperSc
.
setEntity
(
sdsCheck
);
int
count
=
baseMapper
.
getCountByMonthAndTitle
(
declareMonth
,
declareTitle
);
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
errorMessageList
.
add
(
new
ErrorMessage
(
CommonConstants
.
ZER
O_INT
errorMessageList
.
add
(
new
ErrorMessage
(
CommonConstants
.
TW
O_INT
,
"当前月同一-封面抬头全称-已存在数据。"
));
}
}
...
...
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TStatisticsDeclarerMapper.xml
View file @
06c1a3d8
...
...
@@ -106,5 +106,6 @@
WHERE s.DELETE_FLAG = '0' AND b.max_day = s.CREATE_TIME
AND s.EMP_IDCARD = b.EMP_IDCARD AND s.INVOICE_TITLE = b.INVOICE_TITLE
AND s.SETTLEMENT_MONTH = b.SETTLEMENT_MONTH) c
GROUP BY c.EMP_IDCARD,c.INVOICE_TITLE,c.SETTLEMENT_MONTH
</select>
</mapper>
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TStatisticsRemunerationMapper.xml
View file @
06c1a3d8
...
...
@@ -80,7 +80,6 @@
1=1
<include
refid=
"tStatisticsRemuneration_where"
/>
</where>
group by a.EMP_IDCARD,a.DECLARE_MONTH,a.EMP_NAME
order by a.DECLARE_MONTH desc
</select>
...
...
@@ -88,7 +87,7 @@
<select
id=
"doStatisticsRemuneration"
resultMap=
"tStatisticsRemunerationMap"
>
select
#{nowMonth} DECLARE_MONTH,a.EMP_NAME,a.EMP_IDCARD,sum(a.SALARY_TAX) PERSONAL_TAX,
sum(a.
SALARY_TAX_UNIT
) INCOME,a.INVOICE_TITLE DECLARE_UNIT,'居民身份证' CARD_TYPE
sum(a.
RELAY_SALARY
) INCOME,a.INVOICE_TITLE DECLARE_UNIT,'居民身份证' CARD_TYPE
from t_salary_account a
where a.DELETE_FLAG = 0 and a.SETTLEMENT_MONTH = #{lastMonth} and a.FORM_TYPE = '4'
GROUP BY a.EMP_IDCARD,DECLARE_UNIT
...
...
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