master
20918 18 hours ago
parent 64e3998285
commit c8632a2aba

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

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

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

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

Loading…
Cancel
Save