Commit 17e36f6c authored by huyuchen's avatar huyuchen

优化接口修改

parent 9bcba46c
......@@ -52,6 +52,7 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.net.URLEncoder;
import java.time.LocalDate;
import java.time.LocalDateTime;
......@@ -1756,7 +1757,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (CommonConstants.ONE_STRING.equals(settleDomain.getManagementType())) {
gMoney = BigDecimalUtils.safeMultiply(actualMoney,
settleDomain.getManagementFee().divide(new BigDecimal("100"),
CommonConstants.FIVE_INT, BigDecimal.ROUND_HALF_UP));
CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
isBl = true;
}
//判断是否存在当月的商险收入数据
......@@ -1789,7 +1790,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (CommonConstants.ONE_STRING.equals(settleDomain.getRiskFundType())) {
gMoney = BigDecimalUtils.safeMultiply(actualMoney,
settleDomain.getRiskFundFee().divide(new BigDecimal("100"),
CommonConstants.FIVE_INT, BigDecimal.ROUND_HALF_UP));
CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
isBl = true;
}
//判断是否存在当月的商险收入数据
......
......@@ -191,4 +191,8 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
*/
List<TPaymentInfo> getTPaymentFundIncomeInfo(@Param("tPaymentInfo") TPaymentInfoSearchVo searchVo);
void updateBySocialPayment(@Param("id")String id);
void updateBySocialIncomePayment(@Param("id")String id);
}
......@@ -4287,34 +4287,26 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(settleDomain)) {
// 含有社保,则计算收入
if (Common.isNotNull(settleDomain.getManageServerItem()) && settleDomain.getManageServerItem()
.contains(CommonConstants.TWO_STRING)) {
.contains(CommonConstants.TWO_STRING) && !isExist &&
CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag()) &&
CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) {
//预估模式
if (CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) {
if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) {
//预估模式只有按人次和人数收费
if (!isExist) {
createIncomeInsurance(library, settleDomain, CommonConstants.ONE_STRING,
settleDomain.getManagementFee().toString(), settleDomain.getManagementType(),
settleDomain.getManagementFee());
}
}
}
}
if (Common.isNotNull(settleDomain.getRiskServerItem()) && settleDomain.getRiskServerItem()
.contains(CommonConstants.TWO_STRING)) {
if (CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) {
.contains(CommonConstants.TWO_STRING) && !isExist &&
CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag()) &&
CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) {
//预估模式
if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) {
if (!isExist) {
createIncomeInsurance(library, settleDomain, CommonConstants.TWO_STRING,
settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(),
settleDomain.getRiskFundFee());
}
}
}
}
}
}
public void createIncomeInsurance(TForecastLibrary library, TSettleDomain settleDomain, String feeType,
String charges, String feeMode, BigDecimal money) {
......
......@@ -123,8 +123,7 @@ public class DoJointSocialTask {
income.setSendMonth(DateUtil.addMonth(0));
income.setEkpId(sendBack);
incomeMapper.updateById(income);
paymentInfo.setPushStatus(CommonConstants.ZERO_STRING);
paymentInfoMapper.updateById(paymentInfo);
paymentInfoMapper.updateBySocialIncomePayment(paymentInfo.getId());
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
......@@ -325,8 +324,7 @@ public class DoJointSocialTask {
body = ekpSocialUtil.sendToEKP(socialParam);
}
if (Common.isNotNull(body) && body.length() == 32) {
library.setPushStatus(CommonConstants.ZERO_STRING);
paymentInfoMapper.updateById(library);
paymentInfoMapper.updateBySocialPayment(library.getId());
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
......@@ -368,8 +366,7 @@ public class DoJointSocialTask {
body = ekpFundUtil.sendToEKP(fundParam);
}
if (Common.isNotNull(body) && body.length() == 32) {
library.setPushStatus(CommonConstants.ZERO_STRING);
paymentInfoMapper.updateById(library);
paymentInfoMapper.updateBySocialPayment(library.getId());
} else {
TSendEkpError error = new TSendEkpError();
error.setCreateTime(new Date());
......
......@@ -1217,4 +1217,19 @@
</where>
</select>
<!-- 更改社保公积金推送状态 -->
<update id="updateBySocialPayment">
update t_payment_info
set PUSH_STATUS = '0'
where
ID = #{id}
</update>
<!-- 更改社保公积金推送状态 -->
<update id="updateBySocialIncomePayment">
update t_payment_info
set INCOME_STATUS = '0'
where
ID = #{id}
</update>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment