Commit c5e0dcf4 by 胡懿

新增入库单增加状态检测

parent a90afed1
......@@ -184,9 +184,9 @@
<if test="goodsInfo.type.id != null and goodsInfo.type.id != ''">
AND gi.type_id = #{goodsInfo.type.id}
</if>
<!--<if test="goodsInfo.model != null and goodsInfo.model != ''">
AND gi.model = #{goodsInfo.model}
</if>-->
<if test="state != null and state != ''">
AND a.state = #{state}
</if>
<if test="goodsInfo.modelList != null and goodsInfo.modelList.size() != 0">
AND
<foreach collection="goodsInfo.modelList" item="model" index="index" separator=" AND" open="(" close=")">
......
......@@ -216,17 +216,23 @@ public class StorageService extends CrudService<StorageMapper, Storage> {
/**
* 根据批次号,货品类型,货品型号查询二维码
* @param goodsInfo
* @param si
* @return
*/
@Transactional(readOnly = false)
public Page<StorageInfo> findByPcTypeModel(Page<StorageInfo> page, GoodsInfo goodsInfo) {
public Page<StorageInfo> findByPcTypeModel(Page<StorageInfo> page, StorageInfo si) {
GoodsInfo goodsInfo = si.getGoodsInfo();
QrCode temQr = new QrCode();
String model = goodsInfo.getModel();
if (StringUtils.isNotBlank(model)) {
goodsInfo.setModelList(IKSegmenter.splitStr(model, false));
}
temQr.setGoodsInfo(goodsInfo);
QrCode qr = si.getQrCode();
if (null != qr && StringUtils.isNotBlank(qr.getState())) {
temQr.setState(qr.getState());
}
List<QrCode> qrCodeList = qrCodeMapper.findByPcTypeModel(temQr);
List<StorageInfo> storageInfoList = new ArrayList<>();
......
......@@ -270,7 +270,7 @@ public class StorageController extends BaseController {
public Map<String, Object> findByPcTypeModel(HttpServletRequest request, HttpServletResponse response, StorageInfo storageInfo) {
GoodsInfo goodsInfo = storageInfo.getGoodsInfo();
if (null != goodsInfo && null != goodsInfo.getGoods() && null != goodsInfo.getType() && StringUtils.isNotBlank(goodsInfo.getGoods().getBatchNum()) && StringUtils.isNotBlank(goodsInfo.getType().getId())) {
Page<StorageInfo> page = storageService.findByPcTypeModel(new Page<StorageInfo>(request, response), goodsInfo);
Page<StorageInfo> page = storageService.findByPcTypeModel(new Page<StorageInfo>(request, response), storageInfo);
return getBootstrapData(page);
} else {
return null;
......
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