解决获取批次商品列表信息接口的bug
This commit is contained in:
@@ -856,7 +856,10 @@ public class DepotItemController {
|
||||
DepotItem depotItem = depotItemService.getDepotItem(depotItemId);
|
||||
number = depotHeadService.getDepotHead(depotItem.getHeaderId()).getNumber();
|
||||
}
|
||||
List<DepotItemVoBatchNumberList> list = depotItemService.getBatchNumberList(number, name, depotId, barCode, batchNumber);
|
||||
Boolean forceFlag = systemConfigService.getForceApprovalFlag();
|
||||
Boolean inOutManageFlag = systemConfigService.getInOutManageFlag();
|
||||
List<DepotItemVoBatchNumberList> list = depotItemService.getBatchNumberList(number, name, depotId, barCode,
|
||||
batchNumber, forceFlag, inOutManageFlag);
|
||||
map.put("rows", list);
|
||||
map.put("total", list.size());
|
||||
res.code = 200;
|
||||
|
||||
@@ -214,7 +214,9 @@ public interface DepotItemMapperEx {
|
||||
@Param("name") String name,
|
||||
@Param("depotId") Long depotId,
|
||||
@Param("barCode") String barCode,
|
||||
@Param("batchNumber") String batchNumber);
|
||||
@Param("batchNumber") String batchNumber,
|
||||
@Param("forceFlag") Boolean forceFlag,
|
||||
@Param("inOutManageFlag") Boolean inOutManageFlag);
|
||||
|
||||
Long getCountByMaterialAndDepot(
|
||||
@Param("mId") Long mId,
|
||||
|
||||
@@ -1138,9 +1138,11 @@ public class DepotItemService {
|
||||
return count;
|
||||
}
|
||||
|
||||
public List<DepotItemVoBatchNumberList> getBatchNumberList(String number, String name, Long depotId, String barCode, String batchNumber) throws Exception {
|
||||
public List<DepotItemVoBatchNumberList> getBatchNumberList(String number, String name, Long depotId, String barCode,
|
||||
String batchNumber, Boolean forceFlag, Boolean inOutManageFlag) throws Exception {
|
||||
List<DepotItemVoBatchNumberList> reslist = new ArrayList<>();
|
||||
List<DepotItemVoBatchNumberList> list = depotItemMapperEx.getBatchNumberList(StringUtil.toNull(number), name, depotId, barCode, batchNumber);
|
||||
List<DepotItemVoBatchNumberList> list = depotItemMapperEx.getBatchNumberList(StringUtil.toNull(number), name,
|
||||
depotId, barCode, batchNumber, forceFlag, inOutManageFlag);
|
||||
for(DepotItemVoBatchNumberList bn: list) {
|
||||
if(bn.getTotalNum()!=null && bn.getTotalNum().compareTo(BigDecimal.ZERO)>0) {
|
||||
bn.setExpirationDateStr(Tools.parseDateToStr(bn.getExpirationDate()));
|
||||
|
||||
@@ -947,6 +947,12 @@
|
||||
<if test="number != null">
|
||||
and dh.number!= #{number}
|
||||
</if>
|
||||
<if test="forceFlag">
|
||||
and dh.status = '1'
|
||||
</if>
|
||||
<if test="inOutManageFlag">
|
||||
and (dh.sub_type!='采购' and dh.sub_type!='采购退货' and dh.sub_type!='销售' and dh.sub_type!='销售退货')
|
||||
</if>
|
||||
and m.enable_batch_number =1
|
||||
and di.delete_flag!=1) tb
|
||||
group by batch_number
|
||||
|
||||
Reference in New Issue
Block a user