Commit ca72e344 by 胡懿

新增根据货品明细id和二维码id查询二维码和货品明细对象的接口

parent eb06b89d
...@@ -208,4 +208,11 @@ public class GoodsService extends CrudService<GoodsMapper, Goods> { ...@@ -208,4 +208,11 @@ public class GoodsService extends CrudService<GoodsMapper, Goods> {
goods.setGoodsInfoList(goodsInfoList); goods.setGoodsInfoList(goodsInfoList);
return goods; return goods;
} }
public QrCode getGIAndQCByTwoId(String goodsInfoId, String qrCodeId) {
GoodsInfo goodsInfo = goodsInfoMapper.get(new GoodsInfo(goodsInfoId));
QrCode qrCode = qrCodeMapper.get(new QrCode(qrCodeId));
qrCode.setGoodsInfo(goodsInfo);
return qrCode;
}
} }
\ No newline at end of file
...@@ -296,4 +296,22 @@ public class GoodsController extends BaseController { ...@@ -296,4 +296,22 @@ public class GoodsController extends BaseController {
return j; return j;
} }
/**
* 根据货品明细id和二维码id查询货品信息和二维码信息
* @param goodsInfoId
* @param qrCodeId
* @return
*/
@ResponseBody
@RequestMapping(value = "getGIAndQCByTwoId")
public AjaxJson getGIAndQCByTwoId(String goodsInfoId, String qrCodeId) {
AjaxJson j = new AjaxJson();
//新增或编辑表单保存
QrCode qrCode = goodsService.getGIAndQCByTwoId(goodsInfoId, qrCodeId);
j.put("qrCode", qrCode);
j.setSuccess(true);
j.setMsg("查询成功成功");
return j;
}
} }
\ No newline at end of file
...@@ -184,8 +184,14 @@ ...@@ -184,8 +184,14 @@
<if test="goodsInfo.type.id != null and goodsInfo.type.id != ''"> <if test="goodsInfo.type.id != null and goodsInfo.type.id != ''">
AND gi.type_id = #{goodsInfo.type.id} AND gi.type_id = #{goodsInfo.type.id}
</if> </if>
<if test="goodsInfo.model != null and goodsInfo.model != ''"> <!--<if test="goodsInfo.model != null and goodsInfo.model != ''">
AND gi.model = #{goodsInfo.model} AND gi.model = #{goodsInfo.model}
</if>-->
<if test="goodsInfo.modelList != null and goodsInfo.modelList.size() != 0">
AND
<foreach collection="goodsInfo.modelList" item="model" index="index" separator=" AND" open="(" close=")">
gi.model like concat('%',#{model},'%')
</foreach>
</if> </if>
</where> </where>
<choose> <choose>
......
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