更新对重复导入已提现订单回执的处理
This commit is contained in:
parent
5dd291ca29
commit
1aadfa02ef
@ -35,4 +35,9 @@ public interface XhpcClearingCheckoutMapper {
|
|||||||
List<CheckoutBankVo> selectOrderMapByCheckoutIds(@Param("checkoutIds")String checkoutIds);
|
List<CheckoutBankVo> selectOrderMapByCheckoutIds(@Param("checkoutIds")String checkoutIds);
|
||||||
|
|
||||||
int updateStatusByIds(@Param("checkoutIds")String checkoutIds, @Param("status")Integer status);
|
int updateStatusByIds(@Param("checkoutIds")String checkoutIds, @Param("status")Integer status);
|
||||||
|
|
||||||
|
|
||||||
|
List<Map<String, Object>> selectMapGroupByStatus(@Param("checkoutIds")String checkoutIds);
|
||||||
|
|
||||||
|
String selectIdsByStatusAndIds(@Param("checkoutIds")String checkoutIds, @Param("status") Integer status);
|
||||||
}
|
}
|
||||||
@ -283,17 +283,16 @@ public class XhpcClearingCheckoutServiceImpl extends BaseService implements Xhpc
|
|||||||
List<CheckoutBankVo> checkoutList = util.importExcel(new FileInputStream(dataFile));
|
List<CheckoutBankVo> checkoutList = util.importExcel(new FileInputStream(dataFile));
|
||||||
|
|
||||||
String checkoutIds = checkoutList.stream().map(CheckoutBankVo::getIndex).collect(Collectors.joining(","));
|
String checkoutIds = checkoutList.stream().map(CheckoutBankVo::getIndex).collect(Collectors.joining(","));
|
||||||
|
String unReceiptIds = checkoutMapper.selectIdsByStatusAndIds(checkoutIds, 1);
|
||||||
|
|
||||||
if (checkoutIds.length() > 1) {
|
if (unReceiptIds.length() > 1) {
|
||||||
List<XhpcClearingReceiptDomain> receiptDomainList = receiptVo.getReceiptList();
|
List<XhpcClearingReceiptDomain> receiptDomainList = receiptVo.getReceiptList();
|
||||||
for (XhpcClearingReceiptDomain receiptDomain : receiptDomainList) {
|
for (XhpcClearingReceiptDomain receiptDomain : receiptDomainList) {
|
||||||
receiptDomain.setClearingCheckoutIds(checkoutIds);
|
receiptDomain.setClearingCheckoutIds(unReceiptIds);
|
||||||
receiptDomain.setCreateBy(receiptVo.getCreateBy());
|
|
||||||
}
|
}
|
||||||
receiptMapper.insretBatch(receiptDomainList);
|
receiptMapper.insretBatch(receiptDomainList);
|
||||||
|
checkoutMapper.updateStatusByIds(unReceiptIds, 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
checkoutMapper.updateStatusByIds(checkoutIds, 6);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -145,7 +145,20 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<update id="deleteLogicByPrimaryKey" parameterType="java.lang.Long">
|
<select id="selectMapGroupByStatus" resultType="java.util.Map">
|
||||||
|
SELECT `status`, GROUP_CONCAT(clearing_checkout_id) as 'ids' from xhpc_clearing_checkout
|
||||||
|
WHERE del_flag=0 and find_in_set(clearing_checkout_id, #{checkoutIds})
|
||||||
|
GROUP BY status
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectIdsByStatusAndIds" resultType="java.lang.String">
|
||||||
|
SELECT GROUP_CONCAT(clearing_checkout_id) as 'ids' from xhpc_clearing_checkout
|
||||||
|
WHERE del_flag=0 and find_in_set(clearing_checkout_id, #{checkoutIds}) and status=#{status}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<update id="deleteLogicByPrimaryKey" parameterType="java.lang.Long">
|
||||||
update xhpc_clearing_checkout set del_flag=2
|
update xhpc_clearing_checkout set del_flag=2
|
||||||
where clearing_checkout_id = #{clearingCheckoutId,jdbcType=BIGINT}
|
where clearing_checkout_id = #{clearingCheckoutId,jdbcType=BIGINT}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user