change - ERP其他出库单添加字段生产对象、京源项目

master
yinq 2 weeks ago
parent f22949d779
commit ac1bb6725a

@ -471,6 +471,8 @@ public class KingdeeErpService {
Double FPrice = (Double) objectParams.get("FPrice");//成本价 Double FPrice = (Double) objectParams.get("FPrice");//成本价
String FStockId = (String) objectParams.get("FStockId");//仓库 String FStockId = (String) objectParams.get("FStockId");//仓库
String FTONDCombo = (String) objectParams.get("FTONDCombo");//领料类型(必填项) 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 { try {
//业务对象标识 //业务对象标识
String formId = KingdeeConfig.STK_MisDelivery; String formId = KingdeeConfig.STK_MisDelivery;
@ -502,6 +504,8 @@ public class KingdeeErpService {
JSONObject FStockLocIdObject = new JSONObject(); JSONObject FStockLocIdObject = new JSONObject();
FStockLocIdObject.put("FSTOCKLOCID__FF100002", FNumberObject); FStockLocIdObject.put("FSTOCKLOCID__FF100002", FNumberObject);
FEntity.put("FStockLocId", FStockLocIdObject);//仓位维度 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<>(); ArrayList<JSONObject> entityList = new ArrayList<>();
entityList.add(FEntity); entityList.add(FEntity);

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

@ -181,6 +181,27 @@ public class WmsRawOutstockDetail extends BaseEntity {
/** 计量单位编号 */ /** 计量单位编号 */
private String unitCode; 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) { public void setRawOutstockDetailId(Long rawOutstockDetailId) {
this.rawOutstockDetailId = rawOutstockDetailId; this.rawOutstockDetailId = rawOutstockDetailId;

@ -254,6 +254,12 @@ public class WmsErpScheduledTaskServiceImpl implements IWmsErpScheduledTaskServi
data.put("FQty", FRealQty); data.put("FQty", FRealQty);
data.put("FPrice", outstockDetail.getPrice()); data.put("FPrice", outstockDetail.getPrice());
data.put("FStockId", wmsConfig.getfStockId()); 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(); String params = data.toJSONString();
try { try {
@ -510,6 +516,12 @@ public class WmsErpScheduledTaskServiceImpl implements IWmsErpScheduledTaskServi
data.put("FPrice", outstock.getPrice()); data.put("FPrice", outstock.getPrice());
data.put("FStockId", wmsConfig.getfStockId()); data.put("FStockId", wmsConfig.getfStockId());
data.put("FTONDCombo", "一般领料"); 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(); String params = data.toJSONString();
try { try {
R<AjaxResult> paramsResult = remoteJindieService.saveOtherOutStorage(params, SecurityConstants.INNER); 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="unitName" column="unit_name" />
<result property="price" column="price" /> <result property="price" column="price" />
<result property="materialClassfication" column="material_classfication" /> <result property="materialClassfication" column="material_classfication" />
<result property="tondBaseId" column="tond_base_id" />
</resultMap> </resultMap>
@ -327,7 +328,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mbmi.material_spec, mbmi.material_spec,
mbui.unit_code, mbui.unit_code,
mso.price, mso.price,
mso.specification_parameter mso.specification_parameter,
mso.tond_base tond_base_id
from wms_product_outstock wpo from wms_product_outstock wpo
left join mes_base_material_info mbmi on mbmi.material_id = wpo.product_id 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 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="materialName" column="material_name" />
<result property="materialSpec" column="material_spec" /> <result property="materialSpec" column="material_spec" />
<result property="barcodeSpec" column="barcode_spec" /> <result property="barcodeSpec" column="barcode_spec" />
<result property="productId" column="product_id" />
<result property="tondBaseId" column="tond_base_id" />
</resultMap> </resultMap>
<sql id="selectWmsRawOutstockDetailVo"> <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, if(wrod.erp_amount is null, 0, wrod.erp_amount) erp_amount,
wrod.erp_status, wrod.erp_status,
mpo.price, mpo.price,
mpo.specification_parameter mpo.specification_parameter,
mpp.product_id,
mpp.tond_base_id
from wms_raw_outstock_detail wrod from wms_raw_outstock_detail wrod
left join wms_raw_outstock wro on wrod.raw_outstock_id = wro.raw_outstock_id 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_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_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_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 left join mes_purchase_order mpo on mpo.purchase_order_id = mbbi.purchase_order_id
<where> <where>
wrod.outstock_amount > 0 wrod.outstock_amount > 0
and wrod.plan_amount >= wrod.outstock_amount 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="taskTypeStr != null and taskTypeStr != ''"> and wro.task_type in (${taskTypeStr})</if>
<if test="taskType != null and taskType != ''"> and wro.task_type = #{taskType}</if> <if test="taskType != null and taskType != ''"> and wro.task_type = #{taskType}</if>
</where> </where>
</select> </select>
</mapper> </mapper>

Loading…
Cancel
Save