| | |
| | | } |
| | | |
| | | /** |
| | | * 手动推送应付账单作废到外部系统 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('tms:tmsApBill:edit')") |
| | | @Log(title = "应付账单", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/cancelPush/{id}") |
| | | public AjaxResult cancelPush(@PathVariable("id") Integer id) |
| | | { |
| | | tmsApBillService.cancelPushToExternalSystem(id); |
| | | return AjaxResult.success("作废推送请求已提交,请稍后查看推送状态"); |
| | | } |
| | | |
| | | /** |
| | | * 接收外部系统推送状态 |
| | | */ |
| | | @PostMapping("/updatePushStatus") |
| | |
| | | } |
| | | |
| | | /** |
| | | * 手动推送应收账单作废到外部系统 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('tms:tmsArBill:edit')") |
| | | @Log(title = "应收账单", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/cancelPush/{id}") |
| | | public AjaxResult cancelPush(@PathVariable("id") Integer id) |
| | | { |
| | | tmsArBillService.cancelPushToExternalSystem(id); |
| | | return AjaxResult.success("作废推送请求已提交,请稍后查看推送状态"); |
| | | } |
| | | |
| | | /** |
| | | * 接收外部系统推送状态 |
| | | */ |
| | | @PostMapping("/updatePushStatus") |
| | |
| | | @TableField("push_time") |
| | | private Date pushTime; |
| | | |
| | | |
| | | /** |
| | | * 来源系统id |
| | | */ |
| | | @TableField("source_system_id") |
| | | private Integer sourceSystemId; |
| | | |
| | | /** |
| | | * |
| | |
| | | @TableField("push_time") |
| | | private Date pushTime; |
| | | |
| | | |
| | | /** |
| | | * 来源系统id |
| | | */ |
| | | @TableField("source_system_id") |
| | | private Integer sourceSystemId; |
| | | |
| | | @TableField(exist = false) |
| | | private List<TmsReceivableFee> tmsReceivableFees; |
| | |
| | | public void manualPushToExternalSystem(Integer id); |
| | | |
| | | /** |
| | | * 手动推送应付账单作废到外部系统 |
| | | * |
| | | * @param id 应付账单ID |
| | | * @return 结果 |
| | | */ |
| | | public void cancelPushToExternalSystem(Integer id); |
| | | |
| | | /** |
| | | * 更新推送状态 |
| | | * |
| | | * @param id 应付账单ID |
| | |
| | | public void manualPushToExternalSystem(Integer id); |
| | | |
| | | /** |
| | | * 手动推送应收账单作废到外部系统 |
| | | * |
| | | * @param id 应收账单ID |
| | | * @return 结果 |
| | | */ |
| | | public void cancelPushToExternalSystem(Integer id); |
| | | |
| | | /** |
| | | * 更新推送状态 |
| | | * |
| | | * @param id 应收账单ID |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import javax.annotation.Resource; |
| | | |
| | |
| | | executor.execute(() -> pushPayableToExternalSystem(tmsApBill, tmsPayableFeeList)); |
| | | } |
| | | |
| | | @Override |
| | | public void cancelPushToExternalSystem(Integer id) { |
| | | TmsApBill tmsApBill = tmsApBillMapper.selectTmsApBillById(id); |
| | | if (tmsApBill == null) { |
| | | throw new RuntimeException("应付账单不存在"); |
| | | } |
| | | |
| | | // 异步推送作废请求 |
| | | AsyncTaskExecutor executor = new SimpleAsyncTaskExecutor(); |
| | | executor.execute(() -> pushCancelToExternalSystem(tmsApBill)); |
| | | } |
| | | |
| | | /** |
| | | * 向外部系统推送应付数据作废 |
| | | * @param tmsApBill 应付账单 |
| | | */ |
| | | @Async |
| | | protected void pushCancelToExternalSystem(TmsApBill tmsApBill) { |
| | | java.util.Map<String, Object> requestBody = new java.util.HashMap<>(); |
| | | try { |
| | | |
| | | |
| | | // 构建请求体 |
| | | String apiUrl = url+"/cancelPayableBill"; |
| | | |
| | | // 构建请求体,只需要sourceSystemId |
| | | requestBody.put("sourceSystemId", tmsApBill.getSourceSystemId()); |
| | | |
| | | // 设置HTTP头 |
| | | HttpHeaders headers = new HttpHeaders(); |
| | | headers.setContentType(MediaType.APPLICATION_JSON); |
| | | HttpEntity<String> entity = new HttpEntity<>(JSON.toJSONString(requestBody), headers); |
| | | |
| | | // 发送API请求 |
| | | ResponseEntity<String> response = restTemplate.exchange(apiUrl, HttpMethod.POST, entity, String.class); |
| | | logger.info("推送应付数据作废到外部系统成功,响应: {}", response.getBody()); |
| | | |
| | | // 更新推送状态为成功 |
| | | tmsApBill.setPushStatus(2); |
| | | tmsApBill.setStatus(3); // 设置账单状态为作废 |
| | | tmsApBill.setPushTime(DateUtils.getNowDate()); |
| | | tmsApBillMapper.updateTmsApBill(tmsApBill); |
| | | |
| | | // 重置关联的应付费用状态为待确认 |
| | | tmsPayableFeeMapper.update(new com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper<TmsPayableFee>() |
| | | .set(TmsPayableFee::getStatus, 0) |
| | | .set(TmsPayableFee::getBillPayableId, null) |
| | | .set(TmsPayableFee::getBillPayableNo, null) |
| | | .eq(TmsPayableFee::getBillPayableId, tmsApBill.getId()) |
| | | ); |
| | | logger.info("重置应付费用状态成功,账单ID: {}", tmsApBill.getId()); |
| | | } catch (Exception e) { |
| | | logger.error("推送应付数据作废到外部系统失败,账单ID: {}, 供应商: {}", |
| | | tmsApBill.getId(), tmsApBill.getServiceProviderName(), e); |
| | | logger.debug("推送失败的请求数据: {}", JSON.toJSONString(requestBody)); |
| | | |
| | | // 更新推送状态为失败 |
| | | tmsApBill.setPushStatus(3); |
| | | tmsApBill.setPushTime(DateUtils.getNowDate()); |
| | | tmsApBillMapper.updateTmsApBill(tmsApBill); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 更新推送状态 |
| | | * |
| | |
| | | protected void pushPayableToExternalSystem(TmsApBill tmsApBill, List<TmsPayableFee> tmsPayableFeeList) { |
| | | java.util.Map<String, Object> requestBody = new java.util.HashMap<>(); |
| | | try { |
| | | // 更新推送状态为推送中 |
| | | tmsApBill.setPushStatus(1); |
| | | tmsApBill.setPushTime(DateUtils.getNowDate()); |
| | | tmsApBillMapper.updateTmsApBill(tmsApBill); |
| | | |
| | | |
| | | // 构建请求体 |
| | | String apiUrl = url+"/addPayableBill"; |
| | |
| | | ResponseEntity<String> response = restTemplate.exchange(apiUrl, HttpMethod.POST, entity, String.class); |
| | | logger.info("推送应付数据到外部系统成功,响应: {}", response.getBody()); |
| | | |
| | | // 解析响应,获取sourceSystemId |
| | | try { |
| | | JSONObject result = JSONObject.parseObject(response.getBody()); |
| | | String sourceSystemId = result.getString("sourceSystemId"); |
| | | if (sourceSystemId != null) { |
| | | tmsApBill.setSourceSystemId(Integer.parseInt(sourceSystemId)); |
| | | } |
| | | } catch (Exception e) { |
| | | logger.error("解析外部系统响应失败: {}", e.getMessage()); |
| | | } |
| | | |
| | | // 更新推送状态为成功 |
| | | tmsApBill.setPushStatus(2); |
| | | tmsApBill.setPushTime(DateUtils.getNowDate()); |
| | |
| | | package com.ruoyi.tms.service.impl; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.client.RestTemplate; |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | |
| | | /** |
| | | * 应收账单Service业务层处理 |
| | |
| | | executor.execute(() -> pushToExternalSystem(tmsArBill, tmsReceivableFees)); |
| | | } |
| | | |
| | | @Override |
| | | public void cancelPushToExternalSystem(Integer id) { |
| | | TmsArBill tmsArBill = tmsArBillMapper.selectTmsArBillById(id); |
| | | if (tmsArBill == null) { |
| | | throw new RuntimeException("应收账单不存在"); |
| | | } |
| | | |
| | | // 异步推送作废请求 |
| | | AsyncTaskExecutor executor = new SimpleAsyncTaskExecutor(); |
| | | executor.execute(() -> pushCancelToExternalSystem(tmsArBill)); |
| | | } |
| | | |
| | | /** |
| | | * 向外部系统推送应收数据作废 |
| | | * @param tmsArBill 应收账单 |
| | | */ |
| | | @Async |
| | | protected void pushCancelToExternalSystem(TmsArBill tmsArBill) { |
| | | java.util.Map<String, Object> requestBody = new java.util.HashMap<>(); |
| | | try { |
| | | ; |
| | | |
| | | // 构建请求体 |
| | | String apiUrl = url+"/cancelBill"; |
| | | |
| | | // 构建请求体,只需要sourceSystemId |
| | | requestBody.put("sourceSystemId", tmsArBill.getSourceSystemId()); |
| | | |
| | | // 设置HTTP头 |
| | | HttpHeaders headers = new HttpHeaders(); |
| | | headers.setContentType(MediaType.APPLICATION_JSON); |
| | | HttpEntity<String> entity = new HttpEntity<>(JSON.toJSONString(requestBody), headers); |
| | | |
| | | // 发送API请求 |
| | | ResponseEntity<String> response = restTemplate.exchange(apiUrl, HttpMethod.POST, entity, String.class); |
| | | logger.info("推送应收数据作废到外部系统成功,响应: {}", response.getBody()); |
| | | |
| | | // 更新推送状态为成功 |
| | | |
| | | tmsArBill.setStatus(3); // 设置账单状态为作废 |
| | | |
| | | tmsArBillMapper.updateTmsArBill(tmsArBill); |
| | | |
| | | // 重置关联的应收费用状态为待确认 |
| | | tmsReceivableFeeMapper.update(new com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper<TmsReceivableFee>() |
| | | .set(TmsReceivableFee::getStatus, 0) |
| | | .set(TmsReceivableFee::getBillRelationId, null) |
| | | .set(TmsReceivableFee::getBillRelationNo, null) |
| | | .eq(TmsReceivableFee::getBillRelationId, tmsArBill.getId()) |
| | | ); |
| | | logger.info("重置应收费用状态成功,账单ID: {}", tmsArBill.getId()); |
| | | } catch (Exception e) { |
| | | logger.error("推送应收数据作废到外部系统失败,账单ID: {}, 客户: {}", |
| | | tmsArBill.getId(), tmsArBill.getCustomerName(), e); |
| | | logger.debug("推送失败的请求数据: {}", JSON.toJSONString(requestBody)); |
| | | |
| | | // 更新推送状态为失败 |
| | | tmsArBill.setPushStatus(3); |
| | | tmsArBill.setPushTime(DateUtils.getNowDate()); |
| | | tmsArBillMapper.updateTmsArBill(tmsArBill); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 更新推送状态 |
| | | * |
| | |
| | | ResponseEntity<String> response = restTemplate.exchange(apiUrl, HttpMethod.POST, entity, String.class); |
| | | logger.info("推送数据到外部系统成功,响应: {}", response.getBody()); |
| | | |
| | | |
| | | // 解析响应,获取sourceSystemId |
| | | try { |
| | | JSONObject result = JSONObject.parseObject(response.getBody()); |
| | | String sourceSystemId = result.getString("sourceSystemId"); |
| | | if (sourceSystemId != null) { |
| | | tmsArBill.setSourceSystemId(Integer.parseInt(sourceSystemId)); |
| | | } |
| | | } catch (Exception e) { |
| | | logger.error("解析外部系统响应失败: {}", e.getMessage()); |
| | | } |
| | | // 更新推送状态为成功 |
| | | tmsArBill.setPushStatus(2); |
| | | tmsArBill.setPushTime(DateUtils.getNowDate()); |
| | |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.constant.Constants; |
| | | import com.ruoyi.common.annotation.DataSource; |
| | |
| | | ResponseEntity<String> response = restTemplate.exchange(apiUrl, HttpMethod.POST, entity, String.class); |
| | | logger.info("推送应付数据到外部系统成功,响应: {}", response.getBody()); |
| | | |
| | | |
| | | // 解析响应,获取sourceSystemId |
| | | try { |
| | | JSONObject result = JSONObject.parseObject(response.getBody()); |
| | | String sourceSystemId = result.getString("sourceSystemId"); |
| | | if (sourceSystemId != null) { |
| | | tmsApBill.setSourceSystemId(Integer.parseInt(sourceSystemId)); |
| | | } |
| | | } catch (Exception e) { |
| | | logger.error("解析外部系统响应失败: {}", e.getMessage()); |
| | | } |
| | | // 更新推送状态为成功 |
| | | tmsApBill.setPushStatus(2); |
| | | tmsApBill.setPushTime(DateUtils.getNowDate()); |
| | |
| | | import java.util.Set; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | |
| | | ResponseEntity<String> response = restTemplate.exchange(apiUrl, HttpMethod.POST, entity, String.class); |
| | | logger.info("推送数据到外部系统成功,响应: {}", response.getBody()); |
| | | |
| | | // 解析响应,获取sourceSystemId |
| | | try { |
| | | JSONObject result = JSONObject.parseObject(response.getBody()); |
| | | String sourceSystemId = result.getString("sourceSystemId"); |
| | | if (sourceSystemId != null) { |
| | | tmsArBill.setSourceSystemId(Integer.parseInt(sourceSystemId)); |
| | | } |
| | | } catch (Exception e) { |
| | | logger.error("解析外部系统响应失败: {}", e.getMessage()); |
| | | } |
| | | |
| | | |
| | | // 更新推送状态为成功 |
| | | tmsArBill.setPushStatus(2); |
| | | tmsArBill.setPushTime(DateUtils.getNowDate()); |
| | |
| | | <result property="serviceProviderType" column="service_provider_type" /> |
| | | <result property="pushStatus" column="push_status" /> |
| | | <result property="pushTime" column="push_time" /> |
| | | <result property="sourceSystemId" column="source_system_id" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectTmsApBillVo"> |
| | | select thisTab.id, thisTab.system_no, thisTab.bill_name, thisTab.settle_amount, thisTab.settle_rate, thisTab.dispatch_count, thisTab.settled_amount, thisTab.invoice_status, thisTab.status, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.deduction_amount, thisTab.actual_settlement_amount, thisTab.service_provider_id, thisTab.service_provider_name, thisTab.service_provider_type, thisTab.push_status, thisTab.push_time from tms_ap_bill AS thisTab |
| | | select thisTab.id, thisTab.system_no, thisTab.bill_name, thisTab.settle_amount, thisTab.settle_rate, thisTab.dispatch_count, thisTab.settled_amount, thisTab.invoice_status, thisTab.status, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.deduction_amount, thisTab.actual_settlement_amount, thisTab.service_provider_id, thisTab.service_provider_name, thisTab.service_provider_type, thisTab.push_status, thisTab.push_time, thisTab.source_system_id from tms_ap_bill AS thisTab |
| | | </sql> |
| | | <sql id="selectTmsApBillVoCount"> |
| | | select count(0) from tms_ap_bill as thisTab |
| | |
| | | <if test="deductionAmount != null "> and thisTab.deduction_amount = #{deductionAmount}</if> |
| | | <if test="actualSettlementAmount != null "> and thisTab.actual_settlement_amount = #{actualSettlementAmount}</if> |
| | | <if test="pushStatus != null "> and thisTab.push_status = #{pushStatus}</if> |
| | | <if test="sourceSystemId != null "> and thisTab.source_system_id = #{sourceSystemId}</if> |
| | | </sql> |
| | | |
| | | <!--查询--> |
| | |
| | | <if test="serviceProviderType != null and serviceProviderType != ''">service_provider_type,</if> |
| | | <if test="pushStatus != null">push_status,</if> |
| | | <if test="pushTime != null">push_time,</if> |
| | | <if test="sourceSystemId != null">source_system_id,</if> |
| | | |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | |
| | | <if test="serviceProviderType != null and serviceProviderType != ''">#{serviceProviderType},</if> |
| | | <if test="pushStatus != null">#{pushStatus},</if> |
| | | <if test="pushTime != null">#{pushTime},</if> |
| | | <if test="sourceSystemId != null">#{sourceSystemId},</if> |
| | | |
| | | </trim> |
| | | </insert> |
| | |
| | | <insert id="insertTmsApBillBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into tms_ap_bill |
| | | <trim prefix="(" suffix=") values" suffixOverrides=","> |
| | | system_no,bill_name,settle_amount,settle_rate,dispatch_count,settled_amount,invoice_status,status,create_by,create_time,update_by,update_time,deduction_amount,actual_settlement_amount,push_status,push_time, |
| | | system_no,bill_name,settle_amount,settle_rate,dispatch_count,settled_amount,invoice_status,status,create_by,create_time,update_by,update_time,deduction_amount,actual_settlement_amount,push_status,push_time,source_system_id, |
| | | </trim> |
| | | <foreach item="item" index="index" collection="list" separator=","> |
| | | <trim prefix="(" suffix=") " suffixOverrides=","> |
| | | #{item.systemNo},#{item.billName},#{item.settleAmount},#{item.settleRate},#{item.dispatchCount},#{item.settledAmount},#{item.invoiceStatus},#{item.status},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.deductionAmount},#{item.actualSettlementAmount},#{item.pushStatus},#{item.pushTime}, |
| | | #{item.systemNo},#{item.billName},#{item.settleAmount},#{item.settleRate},#{item.dispatchCount},#{item.settledAmount},#{item.invoiceStatus},#{item.status},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.deductionAmount},#{item.actualSettlementAmount},#{item.pushStatus},#{item.pushTime},#{item.sourceSystemId}, |
| | | </trim> |
| | | </foreach> |
| | | </insert> |
| | |
| | | <if test="serviceProviderType != null and serviceProviderType != ''">service_provider_type = #{serviceProviderType},</if> |
| | | <if test="pushStatus != null">push_status = #{pushStatus},</if> |
| | | <if test="pushTime != null">push_time = #{pushTime},</if> |
| | | <if test="sourceSystemId != null">source_system_id = #{sourceSystemId},</if> |
| | | |
| | | </trim> |
| | | where id = #{id} |
| | |
| | | <if test="item.serviceProviderType != null and item.serviceProviderType != ''">service_provider_type = #{item.serviceProviderType},</if> |
| | | <if test="item.pushStatus != null">push_status = #{item.pushStatus},</if> |
| | | <if test="item.pushTime != null">push_time = #{item.pushTime},</if> |
| | | <if test="item.sourceSystemId != null">source_system_id = #{item.sourceSystemId},</if> |
| | | |
| | | </trim> |
| | | where id = #{item.id} |
| | |
| | | <result property="actualSettlementAmount" column="actual_settlement_amount" /> |
| | | <result property="pushStatus" column="push_status" /> |
| | | <result property="pushTime" column="push_time" /> |
| | | <result property="sourceSystemId" column="source_system_id" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectTmsArBillVo"> |
| | | select thisTab.id, thisTab.system_no, thisTab.bill_name, thisTab.customer_id, thisTab.customer_name, thisTab.settle_amount, thisTab.settle_rate, thisTab.dispatch_count, thisTab.settled_amount, thisTab.invoice_status, thisTab.status, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.deduction_amount, thisTab.actual_settlement_amount, thisTab.push_status, thisTab.push_time from tms_ar_bill AS thisTab |
| | | select thisTab.id, thisTab.system_no, thisTab.bill_name, thisTab.customer_id, thisTab.customer_name, thisTab.settle_amount, thisTab.settle_rate, thisTab.dispatch_count, thisTab.settled_amount, thisTab.invoice_status, thisTab.status, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.deduction_amount, thisTab.actual_settlement_amount, thisTab.push_status, thisTab.push_time, thisTab.source_system_id from tms_ar_bill AS thisTab |
| | | </sql> |
| | | <sql id="selectTmsArBillVoCount"> |
| | | select count(0) from tms_ar_bill as thisTab |
| | |
| | | <if test="deductionAmount != null "> and thisTab.deduction_amount = #{deductionAmount}</if> |
| | | <if test="actualSettlementAmount != null "> and thisTab.actual_settlement_amount = #{actualSettlementAmount}</if> |
| | | <if test="pushStatus != null "> and thisTab.push_status = #{pushStatus}</if> |
| | | <if test="sourceSystemId != null "> and thisTab.source_system_id = #{sourceSystemId}</if> |
| | | </sql> |
| | | |
| | | <!--查询--> |
| | |
| | | <if test="actualSettlementAmount != null">actual_settlement_amount,</if> |
| | | <if test="pushStatus != null">push_status,</if> |
| | | <if test="pushTime != null">push_time,</if> |
| | | <if test="sourceSystemId != null">source_system_id,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="systemNo != null and systemNo != ''">#{systemNo},</if> |
| | |
| | | <if test="actualSettlementAmount != null">#{actualSettlementAmount},</if> |
| | | <if test="pushStatus != null">#{pushStatus},</if> |
| | | <if test="pushTime != null">#{pushTime},</if> |
| | | <if test="sourceSystemId != null">#{sourceSystemId},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <insert id="insertTmsArBillBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into tms_ar_bill |
| | | <trim prefix="(" suffix=") values" suffixOverrides=","> |
| | | id,system_no,bill_name,customer_name,settle_amount,settle_rate,dispatch_count,settled_amount,invoice_status,status,create_by,create_time,update_by,update_time,customer_id,deduction_amount,actual_settlement_amount,push_status,push_time, |
| | | id,system_no,bill_name,customer_name,settle_amount,settle_rate,dispatch_count,settled_amount,invoice_status,status,create_by,create_time,update_by,update_time,customer_id,deduction_amount,actual_settlement_amount,push_status,push_time,source_system_id, |
| | | </trim> |
| | | <foreach item="item" index="index" collection="list" separator=","> |
| | | <trim prefix="(" suffix=") " suffixOverrides=","> |
| | | #{item.id},#{item.systemNo},#{item.billName},#{item.customerName},#{item.settleAmount},#{item.settleRate},#{item.dispatchCount},#{item.settledAmount},#{item.invoiceStatus},#{item.status},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.customerId},#{item.deductionAmount},#{item.actualSettlementAmount},#{item.pushStatus},#{item.pushTime}, |
| | | #{item.id},#{item.systemNo},#{item.billName},#{item.customerName},#{item.settleAmount},#{item.settleRate},#{item.dispatchCount},#{item.settledAmount},#{item.invoiceStatus},#{item.status},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.customerId},#{item.deductionAmount},#{item.actualSettlementAmount},#{item.pushStatus},#{item.pushTime},#{item.sourceSystemId}, |
| | | </trim> |
| | | </foreach> |
| | | </insert> |
| | |
| | | <if test="actualSettlementAmount != null">actual_settlement_amount = #{actualSettlementAmount},</if> |
| | | <if test="pushStatus != null">push_status = #{pushStatus},</if> |
| | | <if test="pushTime != null">push_time = #{pushTime},</if> |
| | | <if test="sourceSystemId != null">source_system_id = #{sourceSystemId},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | <if test="item.actualSettlementAmount != null">actual_settlement_amount = #{item.actualSettlementAmount},</if> |
| | | <if test="item.pushStatus != null">push_status = #{item.pushStatus},</if> |
| | | <if test="item.pushTime != null">push_time = #{item.pushTime},</if> |
| | | <if test="item.sourceSystemId != null">source_system_id = #{item.sourceSystemId},</if> |
| | | </trim> |
| | | where id = #{item.id} |
| | | </foreach> |