新购接口优化
This commit is contained in:
parent
75f8e59e86
commit
a503514fc5
|
|
@ -88,6 +88,8 @@ public interface PurchaseCheckDetailsMapper {
|
||||||
*/
|
*/
|
||||||
int deletePurchaseCheckDetailsById(Long id);
|
int deletePurchaseCheckDetailsById(Long id);
|
||||||
|
|
||||||
|
int deletePurchaseCheckDetailsByParentIds(Long[] ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除新购验收任务详细
|
* 批量删除新购验收任务详细
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ import com.bonus.material.purchase.domain.PurchaseCheckInfo;
|
||||||
import com.bonus.material.purchase.service.IPurchaseCheckInfoService;
|
import com.bonus.material.purchase.service.IPurchaseCheckInfoService;
|
||||||
import org.springframework.transaction.PlatformTransactionManager;
|
import org.springframework.transaction.PlatformTransactionManager;
|
||||||
import org.springframework.transaction.TransactionStatus;
|
import org.springframework.transaction.TransactionStatus;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.transaction.support.DefaultTransactionDefinition;
|
import org.springframework.transaction.support.DefaultTransactionDefinition;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
|
|
@ -330,7 +331,9 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public int deletePurchaseCheckInfoByIds(Long[] ids) {
|
public int deletePurchaseCheckInfoByIds(Long[] ids) {
|
||||||
|
purchaseCheckDetailsMapper.deletePurchaseCheckDetailsByParentIds(ids);
|
||||||
return purchaseCheckInfoMapper.deletePurchaseCheckInfoByIds(ids);
|
return purchaseCheckInfoMapper.deletePurchaseCheckInfoByIds(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -201,6 +201,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
delete from purchase_check_details where id = #{id}
|
delete from purchase_check_details where id = #{id}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deletePurchaseCheckDetailsByParentIds" parameterType="Long">
|
||||||
|
delete from purchase_check_details where task_id in (
|
||||||
|
select task_id
|
||||||
|
from purchase_check_info
|
||||||
|
where
|
||||||
|
id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
)
|
||||||
|
</delete>
|
||||||
|
|
||||||
<delete id="deletePurchaseCheckDetailsByIds" parameterType="String">
|
<delete id="deletePurchaseCheckDetailsByIds" parameterType="String">
|
||||||
delete from purchase_check_details where id in
|
delete from purchase_check_details where id in
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue