Commit 8b6d7fe9 authored by huyuchen's avatar huyuchen

明细接口改造

parent 93755531
...@@ -27,9 +27,6 @@ import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpInsuranceViewVo; ...@@ -27,9 +27,6 @@ import com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpInsuranceViewVo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncome; import com.yifu.cloud.plus.v1.yifu.social.entity.TIncome;
import com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail; import com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail;
import com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeSearchVo; import com.yifu.cloud.plus.v1.yifu.social.vo.TIncomeSearchVo;
import org.apache.shardingsphere.transaction.annotation.ShardingTransactionType;
import org.apache.shardingsphere.transaction.core.TransactionType;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.InputStream; import java.io.InputStream;
...@@ -71,8 +68,6 @@ public interface TIncomeService extends IService<TIncome> { ...@@ -71,8 +68,6 @@ public interface TIncomeService extends IService<TIncome> {
* @Date: 2022/9/9 11:42 * @Date: 2022/9/9 11:42
* @return: * @return:
**/ **/
@Transactional
@ShardingTransactionType(TransactionType.BASE)
boolean saveBathDetail(TIncomeDetail tIncomeDetail, String paymentId); boolean saveBathDetail(TIncomeDetail tIncomeDetail, String paymentId);
void pushDetail(); void pushDetail();
......
...@@ -300,22 +300,20 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl ...@@ -300,22 +300,20 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
TIncome income = new TIncome(); TIncome income = new TIncome();
income.setEmpIdcard(tIncomeDetail.getEmpIdcard()); income.setEmpIdcard(tIncomeDetail.getEmpIdcard());
income.setDeptId(tIncomeDetail.getDeptId()); income.setDeptId(tIncomeDetail.getDeptId());
synchronized (this) { List<TIncome> incomeList = baseMapper.getTIncomeList(income);
List<TIncome> incomeList = baseMapper.getTIncomeList(income); TIncomeDetail detail = new TIncomeDetail();
TIncomeDetail detail = new TIncomeDetail(); detail.setEmpIdcard(tIncomeDetail.getEmpIdcard());
detail.setEmpIdcard(tIncomeDetail.getEmpIdcard()); detail.setDeptId(tIncomeDetail.getDeptId());
detail.setDeptId(tIncomeDetail.getDeptId()); List<TIncomeDetail> detailList = tIncomeDetailService.getTIncomeDetailList(detail);
List<TIncomeDetail> detailList = tIncomeDetailService.getTIncomeDetailList(detail); tIncomeDetail.setCreateTime(new Date());
tIncomeDetail.setCreateTime(new Date()); tIncomeDetail.setDataCreateMonth(DateUtil.addMonth(0));
tIncomeDetail.setDataCreateMonth(DateUtil.addMonth(0)); tIncomeDetailService.save(tIncomeDetail);
tIncomeDetailService.save(tIncomeDetail); // 不存在,直接新增
// 不存在,直接新增 if (incomeList == null || incomeList.isEmpty()) {
if (incomeList == null || incomeList.isEmpty()) { return this.savePaymentIncomeNew(tIncomeDetail, paymentId);
return this.savePaymentIncome(tIncomeDetail, paymentId); } else {
} else { // 核心判断
// 核心判断 return this.copyCoreNew(tIncomeDetail, incomeList, detailList, paymentId, true);
return this.copyCore(tIncomeDetail, incomeList, detailList, paymentId, true);
}
} }
} }
......
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