Commit dc31bb38 authored by yanzhengyang's avatar yanzhengyang

日常报销删除bug修改

parent 5213a359
......@@ -121,9 +121,9 @@ public class FyglDailyReimbursementController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('dailyReimbursement:dailyReimbursement:remove')")
@Log(title = "日常报销", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
@DeleteMapping("/{id}")
public AjaxResult remove(@PathVariable Long id)
{
return toAjax(fyglDailyReimbursementService.deleteFyglDailyReimbursementByIds(ids));
return toAjax(fyglDailyReimbursementService.deleteFyglDailyReimbursementById(id));
}
}
......@@ -4,9 +4,7 @@ import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.domain.dto.FyglProjectCostDTO;
import com.ruoyi.domain.dto.FyglTripApplicationDTO;
import com.ruoyi.domain.vo.FyglDailyReimbursementVo;
import com.ruoyi.domain.vo.FyglTripApplicationVo;
import com.ruoyi.service.IFyglTripApplicationService;
import org.springframework.beans.factory.annotation.Autowired;
......
......@@ -75,8 +75,8 @@ public interface FyglDailyReimbursementMapper
/**
* 批量删除日常报销
*
* @param ids 需要删除的数据主键集合
* @param id 需要删除的数据主键集合
* @return 结果
*/
public int deleteFyglDailyReimbursementByIds(Long[] ids);
public int deleteFyglDailyReimbursementById2(Long id);
}
......@@ -55,7 +55,7 @@ public interface IFyglDailyReimbursementService
* @param ids 需要删除的日常报销主键集合
* @return 结果
*/
public int deleteFyglDailyReimbursementByIds(Long[] ids);
// public int deleteFyglDailyReimbursementByIds(Long[] ids);
/**
* 删除日常报销信息
......
......@@ -162,11 +162,11 @@ public class FyglDailyReimbursementServiceImpl implements IFyglDailyReimbursemen
* @param ids 需要删除的日常报销主键
* @return 结果
*/
@Override
public int deleteFyglDailyReimbursementByIds(Long[] ids)
{
return fyglDailyReimbursementMapper.deleteFyglDailyReimbursementByIds(ids);
}
// @Override
// public int deleteFyglDailyReimbursementByIds(Long[] ids)
// {
// return fyglDailyReimbursementMapper.deleteFyglDailyReimbursementByIds(ids);
// }
/**
* 删除日常报销信息
......@@ -175,9 +175,12 @@ public class FyglDailyReimbursementServiceImpl implements IFyglDailyReimbursemen
* @return 结果
*/
@Override
@Transactional
public int deleteFyglDailyReimbursementById(Long id)
{
return fyglDailyReimbursementMapper.deleteFyglDailyReimbursementById(id);
int row = fyglDailyReimbursementMapper.deleteFyglDailyReimbursementById2(id);
fyglDailyReimbursementMapper.deleteFyglDailyReimbursementById(id);
return row;
}
@Override
......
......@@ -268,14 +268,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteFyglDailyReimbursementById" parameterType="Long">
delete from fygl_daily_reimbursement where id = #{id}
delete from fygl_daily_rembursement_relevancy_r where id = #{id}
</delete>
<delete id="deleteFyglDailyReimbursementByIds" parameterType="String">
delete from fygl_daily_reimbursement where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
<delete id="deleteFyglDailyReimbursementById2" parameterType="Long">
delete from fygl_daily_reimbursement_relevancy where rid = #{id}
</delete>
<delete id="delDataByRid">
delete from fygl_daily_reimbursement_relevancy r where r.rid = #{rid}
......
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