master
20918 13 hours ago
parent 64e3998285
commit c8632a2aba

@ -46,12 +46,12 @@ public class ItemController extends BaseController
*
*/
@RequiresPermissions("system:case:list")
@PostMapping("/list")
@PostMapping("/list/{caseNo}")
@ResponseBody
public TableDataInfo list(Item item)
public TableDataInfo list(@PathVariable("caseNo")String caseNo)
{
startPage();
List<Item> list = itemService.selectItemList(item);
List<Item> list = itemService.selectItemByCaseNo(caseNo);
return getDataTable(list);
}

@ -28,6 +28,8 @@ public interface ItemMapper
public List<Item> selectItemList(Item item);
public List<Item> selectItemByCaseNo(String caseNo);
/**
*
*

@ -27,6 +27,8 @@ public interface IItemService
*/
public List<Item> selectItemList(Item item);
public List<Item> selectItemByCaseNo(String caseNo);
/**
*
*

@ -43,6 +43,11 @@ public class ItemServiceImpl implements IItemService
return itemMapper.selectItemList(Items);
}
@Override
public List<Item> selectItemByCaseNo(String caseNo) {
return itemMapper.selectItemByCaseNo(caseNo);
}
/**
*
*

@ -24,6 +24,11 @@
where item_no = #{itemNo}
</select>
<select id="selectItemByCaseNo" parameterType="String" resultMap="ItemResult">
<include refid="selectItemVo"/>
where case_no = #{caseno}
</select>
<select id="selectItemList" parameterType="Item" resultMap="ItemResult">
<include refid="selectItemVo"/>
<where>
@ -41,7 +46,7 @@
<if test="brand != null and brand != '' ">brand, </if>
<if test="number != null and number != ''">number,</if>
<if test="price != null and price != ''">price,</if>
<if test="source != null and source != ''">source,</if>
<if test="source != null and source != ''">source</if>
)values(
<if test="caseNo != null and caseNo != ''">#{caseNo}, </if>
<if test="itemNo != null and itemNo != ''">#{itemNo}, </if>
@ -49,7 +54,7 @@
<if test="brand != null and brand != ''">#{brand}, </if>
<if test="number != null and number != ''">#{number},</if>
<if test="price != null and price != ''">#{price},</if>
<if test="source != null and source != ''">#{source},</if>
<if test="source != null and source != ''">#{source}</if>
)
</insert>
@ -60,7 +65,7 @@
<if test="brand != null and brand != ''">brand = #{brand}, </if>
<if test="number != null">number = #{number}, </if>
<if test="price != null and price != ''">price = #{price}, </if>
<if test="source != null and source != ''">source = #{source},</if>
<if test="source != null and source != ''">source = #{source}</if>
</set>
where item_no = #{itemNo}
</update>

Loading…
Cancel
Save