Merge remote-tracking branch 'origin/master'

master
xs 2 weeks ago
commit c49ddcd3f8

@ -471,6 +471,8 @@ public class KingdeeErpService {
Double FPrice = (Double) objectParams.get("FPrice");//成本价
String FStockId = (String) objectParams.get("FStockId");//仓库
String FTONDCombo = (String) objectParams.get("FTONDCombo");//领料类型(必填项)
String F_JSJY_SCDX = objectParams.containsKey("F_JSJY_SCDX") ? (String) objectParams.get("F_JSJY_SCDX") : null; //来源于该物料bom成品如果是半成品那还需要找到该半成品的成品
String F_TOND_Base1 = objectParams.containsKey("F_TOND_Base1") ? (String) objectParams.get("F_TOND_Base1") : null; //来源于成品bom所在销售订单的项目号
try {
//业务对象标识
String formId = KingdeeConfig.STK_MisDelivery;
@ -502,6 +504,8 @@ public class KingdeeErpService {
JSONObject FStockLocIdObject = new JSONObject();
FStockLocIdObject.put("FSTOCKLOCID__FF100002", FNumberObject);
FEntity.put("FStockLocId", FStockLocIdObject);//仓位维度
FEntity.put("F_JSJY_SCDX", F_JSJY_SCDX);
FEntity.put("F_TOND_Base1", F_TOND_Base1);
ArrayList<JSONObject> entityList = new ArrayList<>();
entityList.add(FEntity);

@ -175,6 +175,17 @@ public class WmsProductOutstock extends BaseEntity {
*/
private List<WmsProductOutstockDetail> wmsProductOutstockDetailList;
/** 成品bom所在销售订单的项目号 */
private Long tondBaseId;
public Long getTondBaseId() {
return tondBaseId;
}
public void setTondBaseId(Long tondBaseId) {
this.tondBaseId = tondBaseId;
}
public BigDecimal getPrice() {
return price;
}

@ -181,6 +181,27 @@ public class WmsRawOutstockDetail extends BaseEntity {
/** 计量单位编号 */
private String unitCode;
/** 物料bom成品Id */
private Long productId;
/** 成品bom所在销售订单的项目号 */
private Long tondBaseId;
public Long getProductId() {
return productId;
}
public void setProductId(Long productId) {
this.productId = productId;
}
public Long getTondBaseId() {
return tondBaseId;
}
public void setTondBaseId(Long tondBaseId) {
this.tondBaseId = tondBaseId;
}
public void setRawOutstockDetailId(Long rawOutstockDetailId) {
this.rawOutstockDetailId = rawOutstockDetailId;

@ -254,6 +254,12 @@ public class WmsErpScheduledTaskServiceImpl implements IWmsErpScheduledTaskServi
data.put("FQty", FRealQty);
data.put("FPrice", outstockDetail.getPrice());
data.put("FStockId", wmsConfig.getfStockId());
if (StringUtils.isNotNull(outstockDetail.getProductId())) {
data.put("F_JSJY_SCDX", outstockDetail.getProductId());
}
if (StringUtils.isNotNull(outstockDetail.getTondBaseId())) {
data.put("F_TOND_Base1", outstockDetail.getTondBaseId());
}
String params = data.toJSONString();
try {
@ -510,6 +516,12 @@ public class WmsErpScheduledTaskServiceImpl implements IWmsErpScheduledTaskServi
data.put("FPrice", outstock.getPrice());
data.put("FStockId", wmsConfig.getfStockId());
data.put("FTONDCombo", "一般领料");
if (StringUtils.isNotNull(outstock.getProductId())) {
data.put("F_JSJY_SCDX", outstock.getProductId());
}
if (StringUtils.isNotNull(outstock.getTondBaseId())) {
data.put("F_TOND_Base1", outstock.getTondBaseId());
}
String params = data.toJSONString();
try {
R<AjaxResult> paramsResult = remoteJindieService.saveOtherOutStorage(params, SecurityConstants.INNER);

@ -47,6 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="unitName" column="unit_name" />
<result property="price" column="price" />
<result property="materialClassfication" column="material_classfication" />
<result property="tondBaseId" column="tond_base_id" />
</resultMap>
@ -327,7 +328,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mbmi.material_spec,
mbui.unit_code,
mso.price,
mso.specification_parameter
mso.specification_parameter,
mso.tond_base tond_base_id
from wms_product_outstock wpo
left join mes_base_material_info mbmi on mbmi.material_id = wpo.product_id
left join mes_base_unit_info mbui on mbui.erp_id = mbmi.material_unit_id

@ -36,6 +36,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="materialName" column="material_name" />
<result property="materialSpec" column="material_spec" />
<result property="barcodeSpec" column="barcode_spec" />
<result property="productId" column="product_id" />
<result property="tondBaseId" column="tond_base_id" />
</resultMap>
<sql id="selectWmsRawOutstockDetailVo">
@ -234,16 +236,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
if(wrod.erp_amount is null, 0, wrod.erp_amount) erp_amount,
wrod.erp_status,
mpo.price,
mpo.specification_parameter
mpo.specification_parameter,
mpp.product_id,
mpp.tond_base_id
from wms_raw_outstock_detail wrod
left join wms_raw_outstock wro on wrod.raw_outstock_id = wro.raw_outstock_id
left join mes_base_material_info mbmi on mbmi.material_id = wro.material_id
left join mes_base_unit_info mbui on mbui.erp_id = mbmi.material_unit_id
left join mes_product_plan mpp on mpp.plan_code = wro.plan_code
left join (select mpp.plan_code,
mpp.sale_order_id,
IF(mpp.sale_order_id > 0, mso.material_id, mpp.material_id) product_id,
mso.tond_base tond_base_id
from mes_product_plan mpp
left join mes_sale_order mso on mso.sale_order_id = mpp.sale_order_id) mpp
on mpp.plan_code = wro.plan_code
left join mes_base_barcode_info mbbi on wrod.material_barcode = mbbi.barcode_info
left join mes_purchase_order mpo on mpo.purchase_order_id = mbbi.purchase_order_id
<where>
wrod.outstock_amount > 0
and wrod.plan_amount >= wrod.outstock_amount
@ -254,7 +262,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="taskTypeStr != null and taskTypeStr != ''"> and wro.task_type in (${taskTypeStr})</if>
<if test="taskType != null and taskType != ''"> and wro.task_type = #{taskType}</if>
</where>
</select>
</mapper>

Loading…
Cancel
Save