单据类型设置默认补单仓库问题

fengcang
anthonyywj2 3 years ago
parent 8f4104f0b6
commit 00222bf6eb

@ -245,6 +245,12 @@ public class WareHouseController {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
} }
OrderEntity orderEntity = orderService.findById(commitRequest.getOrderId());
if (orderEntity.getStatus() != ConstantStatus.ORDER_STATUS_PROCESS && orderEntity.getStatus() != ConstantStatus.ORDER_STATUS_FAIL) {
return ResultVOUtils.error(500, "单据已提交!");
}
ioTransInoutService.repeatCommit(commitRequest); ioTransInoutService.repeatCommit(commitRequest);
return ResultVOUtils.success("提交成功"); return ResultVOUtils.success("提交成功");
} }

@ -65,4 +65,5 @@ public class BussinessTypeEntity {
private boolean codeFillCheck; private boolean codeFillCheck;
private String defaultSubInv; private String defaultSubInv;
private String defaultInv;
} }

@ -68,4 +68,5 @@ public class BussinessTypResponse {
private boolean codeFillCheck; private boolean codeFillCheck;
private String defaultSubInv; private String defaultSubInv;
private String defaultInv;
} }

@ -700,9 +700,6 @@ public class InvProductsTrService {
if (StrUtil.isNotEmpty(originBT.getDefaultSubInv())) { if (StrUtil.isNotEmpty(originBT.getDefaultSubInv())) {
outOrder.setFromSubInvCode(originBT.getDefaultSubInv()); outOrder.setFromSubInvCode(originBT.getDefaultSubInv());
} }
if (StrUtil.isNotEmpty(bussinessTypeEntity.getDefaultSubInv())) {
outOrder.setFromSubInvCode(bussinessTypeEntity.getDefaultSubInv());
}
outOrder.setCorpOrderId(CustomUtil.getId() + "x"); outOrder.setCorpOrderId(CustomUtil.getId() + "x");
outOrder.setLocStorageCode(orderEntity.getLocStorageCode()); outOrder.setLocStorageCode(orderEntity.getLocStorageCode());

@ -20,7 +20,7 @@
basic_bustype_local.spUse,corpType,basic_bussiness_type.storageCode,basic_bussiness_type.checkBalacne, basic_bustype_local.spUse,corpType,basic_bussiness_type.storageCode,basic_bussiness_type.checkBalacne,
basic_bussiness_type.secCheckBalacne, defaultUnit,basic_bustype_origin.action basic_bussiness_type.secCheckBalacne, defaultUnit,basic_bustype_origin.action
thirdAction,basic_bustype_origin.thirdSys,basic_bussiness_type.useDyCount,basic_bussiness_type.expireTip,basic_bussiness_type.prefix,basic_bustype_local.prefix thirdAction,basic_bustype_origin.thirdSys,basic_bussiness_type.useDyCount,basic_bussiness_type.expireTip,basic_bussiness_type.prefix,basic_bustype_local.prefix
localPrefix,basic_bustype_local.preIn,basic_bussiness_type.defaultSubInv localPrefix,basic_bustype_local.preIn,basic_bussiness_type.defaultSubInv,basic_bussiness_type.defaultInv
FROM basic_bussiness_type LEFT JOIN basic_bustype_local FROM basic_bussiness_type LEFT JOIN basic_bustype_local
on basic_bussiness_type.localAction = basic_bustype_local.action on basic_bussiness_type.localAction = basic_bustype_local.action
left join basic_bustype_origin on basic_bustype_local.originAction = basic_bustype_origin.action left join basic_bustype_origin on basic_bustype_local.originAction = basic_bustype_origin.action
@ -137,7 +137,7 @@
basic_bussiness_type.secCheckBalacne,basic_bustype_origin.action basic_bussiness_type.secCheckBalacne,basic_bustype_origin.action
thirdAction,basic_bustype_origin.thirdSys,useDyCount,basic_bussiness_type.expireTip, thirdAction,basic_bustype_origin.thirdSys,useDyCount,basic_bussiness_type.expireTip,
basic_bussiness_type.prefix,basic_bustype_local.prefix basic_bussiness_type.prefix,basic_bustype_local.prefix
localPrefix,basic_bustype_local.preIn,basic_bussiness_type.defaultSubInv localPrefix,basic_bustype_local.preIn,basic_bussiness_type.defaultSubInv,basic_bussiness_type.defaultInv
FROM basic_bussiness_type LEFT JOIN basic_bustype_local FROM basic_bussiness_type LEFT JOIN basic_bustype_local
on basic_bussiness_type.localAction = basic_bustype_local.action on basic_bussiness_type.localAction = basic_bustype_local.action
left join basic_bustype_origin on basic_bustype_local.originAction = basic_bustype_origin.action left join basic_bustype_origin on basic_bustype_local.originAction = basic_bustype_origin.action
@ -191,7 +191,7 @@
,secCheckUdims,secCheckPdaEd,secCheckPdaUn,secCheckPc,secCheckWebNew, ,secCheckUdims,secCheckPdaEd,secCheckPdaUn,secCheckPc,secCheckWebNew,
secCheckChange,corpType,basic_bussiness_type.storageCode,checkBalacne, secCheckChange,corpType,basic_bussiness_type.storageCode,checkBalacne,
secCheckBalacne,supplementOrderType,defaultUnit,useDyCount,expireTip,updateTime,prefix secCheckBalacne,supplementOrderType,defaultUnit,useDyCount,expireTip,updateTime,prefix
,ullageFill,scanPreIn,vailInv,codeFillCheck,defaultSubInv,outTospms,entrutSpms) ,ullageFill,scanPreIn,vailInv,codeFillCheck,defaultSubInv,outTospms,entrutSpms,defaultInv)
values values
( (
#{action}, #{action},
@ -229,7 +229,7 @@
#{prefix}, #{prefix},
#{ullageFill}, #{ullageFill},
#{scanPreIn}, #{scanPreIn},
#{vailInv},#{codeFillCheck},#{defaultSubInv},#{outTospms},#{entrutSpms} #{vailInv},#{codeFillCheck},#{defaultSubInv},#{outTospms},#{entrutSpms},#{defaultInv}
) )
</insert> </insert>
@ -244,7 +244,7 @@
checkUdims,checkPdaEd,checkPdaUn,checkPc,checkWebNew,checkChange checkUdims,checkPdaEd,checkPdaUn,checkPc,checkWebNew,checkChange
,secCheckUdims,secCheckPdaEd,secCheckPdaUn,secCheckPc,secCheckWebNew, ,secCheckUdims,secCheckPdaEd,secCheckPdaUn,secCheckPc,secCheckWebNew,
secCheckChange,corpType,storageCode,checkBalacne,secCheckBalacne,supplementOrderType,defaultUnit,useDyCount,expireTip,updateTime,prefix secCheckChange,corpType,storageCode,checkBalacne,secCheckBalacne,supplementOrderType,defaultUnit,useDyCount,expireTip,updateTime,prefix
,ullageFill,scanPreIn,vailInv,codeFillCheck,defaultSubInv,outTospms,entrutSpms) ,ullageFill,scanPreIn,vailInv,codeFillCheck,defaultSubInv,outTospms,entrutSpms,defaultInv)
values values
( (
#{index}, #{index},
@ -283,7 +283,7 @@
#{prefix}, #{prefix},
#{ullageFill}, #{ullageFill},
#{scanPreIn}, #{scanPreIn},
#{vailInv},#{codeFillCheck},#{defaultSubInv},#{outTospms},#{entrutSpms} #{vailInv},#{codeFillCheck},#{defaultSubInv},#{outTospms},#{entrutSpms},#{defaultInv}
) )
</insert> </insert>
@ -329,6 +329,8 @@
<if test="prefix != null">prefix=#{prefix},</if> <if test="prefix != null">prefix=#{prefix},</if>
<if test="codeFillCheck != null">codeFillCheck=#{codeFillCheck},</if> <if test="codeFillCheck != null">codeFillCheck=#{codeFillCheck},</if>
<if test="defaultSubInv != null">defaultSubInv=#{defaultSubInv},</if> <if test="defaultSubInv != null">defaultSubInv=#{defaultSubInv},</if>
<if test="defaultInv != null">defaultInv=#{defaultInv},</if>
<if test="outTospms != null">outTospms=#{outTospms}, <if test="outTospms != null">outTospms=#{outTospms},
<if test="entrutSpms != null">entrutSpms=#{entrutSpms},</if></if> <if test="entrutSpms != null">entrutSpms=#{entrutSpms},</if></if>
thirdSysFk=#{thirdSysFk}, thirdSysFk=#{thirdSysFk},

@ -117,14 +117,14 @@
basic_products.ylqxzcrbarmc,basic_products.zczbhhzbapzbh, basic_products.ylqxzcrbarmc,basic_products.zczbhhzbapzbh,
inv_product.inCount,inv_product.outCount inv_product.inCount,inv_product.outCount
,inv_product.reCount,inv_product.customerId,basic_corp.name companyName,inv_product.unitFk,inv_product.supId ,inv_product.reCount,inv_product.customerId,basic_corp.name companyName,inv_product.unitFk,inv_product.supId
,inv_warehouse.name invStorageName,inv_product.invStorageCode,inv_product.price,inv_warehouse_sub.name invSubStorageName ,inv_warehouse.name invStorageName,inv_product.invStorageCode,inv_product.price,
,inv_product.invWarehouseCode inv_warehouse_sub.name invSubStorageName,inv_product.invWarehouseCode
FROM inv_product FROM inv_product
inner join basic_udirel on inv_product.relIdFk = basic_udirel.id inner join basic_udirel on inv_product.relIdFk = basic_udirel.id
inner join basic_products on basic_udirel.uuid = basic_products.uuid inner join basic_products on basic_udirel.uuid = basic_products.uuid
left join basic_corp on inv_product.supId=basic_corp.erpId left join basic_corp on inv_product.supId=basic_corp.erpId
left join inv_warehouse on inv_warehouse.code=inv_product.invStorageCode left join inv_warehouse on inv_warehouse.code=inv_product.invStorageCode
left join inv_warehouse_sub on inv_warehouse_sub.parentId = inv_warehouse.code left join inv_warehouse_sub on inv_warehouse_sub.code = inv_product.invWarehouseCode
<where> <where>
basic_products.diType=1 basic_products.diType=1
<if test="cpmctymc != null and cpmctymc != ''"> <if test="cpmctymc != null and cpmctymc != ''">
@ -184,6 +184,7 @@
<if test="groupType != '' and groupType != null"> <if test="groupType != '' and groupType != null">
GROUP BY #{groupType} GROUP BY #{groupType}
</if> </if>
group by inv_product.id
</select> </select>
<select id="stockStatistics" resultType="com.glxp.api.admin.res.inventory.InvProductResponse" <select id="stockStatistics" resultType="com.glxp.api.admin.res.inventory.InvProductResponse"

Loading…
Cancel
Save