wms白坯部分代码修改8

master
mengjiao 11 months ago
parent e69adf1ea1
commit ff9b1c3cb9

@ -301,4 +301,26 @@ public class WmsToWCSmissionController {
String result= iOdsWhiteEmbryoService.WhiteWarehouseDump(wmsOdsEmStorageNewsSn);
return success(result);
}
@PostMapping("/queryMaterialInfor")
public AjaxResult queryMaterialInfor(@RequestBody WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn) {
// OdsProcureOutOrder orderList = odsProcureOrderService.PurchaseOrderOutboundPda(odsProcureOrder);
WmsOdsEmStorageNews wmsOdsEmStorageNews= iOdsWhiteEmbryoService.queryMaterialInfor(wmsOdsEmStorageNewsSn);
return success(wmsOdsEmStorageNews);
}
/**
* 退-
*
* @param wmsOdsEmStorageNewsSn
* @return
*/
@PostMapping("/WhiteBilletReturnConfir")
public AjaxResult WhiteBilletReturnConfir(@RequestBody WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn) {
// OdsProcureOutOrder orderList = odsProcureOrderService.PurchaseOrderOutboundPda(odsProcureOrder);
String result= iOdsWhiteEmbryoService.WhiteBilletReturnConfir(wmsOdsEmStorageNewsSn);
return success(result);
}
}

@ -63,4 +63,6 @@ public interface WmsOdsEmStorageNewsMapper {
void updateAdd(WmsOdsEmStorageNews wmsOdsEmStorageNews);
WmsOdsEmStorageNews selectWmsOdsEmStorageNewsByWlCode(WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn);
List<WmsOdsEmStorageNews> selectWmsOdsEmStorageNewsByMaterialCode(WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn);
}

@ -4,6 +4,7 @@ import java.util.List;
import com.op.wms.domain.OdsProcureOutOrder;
import com.op.wms.domain.OdsWhiteEmbryo;
import com.op.wms.domain.WmsOdsEmStorageNews;
import com.op.wms.domain.WmsOdsEmStorageNewsSn;
/**
@ -68,4 +69,13 @@ public interface IOdsWhiteEmbryoService {
String WhiteEmbryoOutbound(OdsWhiteEmbryo odsWhiteEmbryo);
String WhiteWarehouseDump(WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn);
/**
*
* @param wmsOdsEmStorageNewsSn
* @return
*/
String WhiteBilletReturnConfir(WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn);
WmsOdsEmStorageNews queryMaterialInfor(WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn);
}

@ -265,4 +265,53 @@ public class OdsWhiteEmbryoServiceImpl implements IOdsWhiteEmbryoService {
}
return result;
}
@Override
public String WhiteBilletReturnConfir(WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn) {
//退货的--在生产线上退下来的--托盘号,库位,物料号,物料描述,退货数量
String result="成功";
WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn1=new WmsOdsEmStorageNewsSn();
wmsOdsEmStorageNewsSn1.setAmount(wmsOdsEmStorageNewsSn.getAmount());
wmsOdsEmStorageNewsSn1.setWlCode(wmsOdsEmStorageNewsSn.getWlCode());
wmsOdsEmStorageNewsSn1.setMaterialCode(wmsOdsEmStorageNewsSn.getMaterialCode());
wmsOdsEmStorageNewsSn1.setMaterialDesc(wmsOdsEmStorageNewsSn.getMaterialDesc());
wmsOdsEmStorageNewsSn1.setSn(wmsOdsEmStorageNewsSn.getSn());
wmsOdsEmStorageNewsSn1.setCreateBy(wmsOdsEmStorageNewsSn.getCreateBy());
wmsOdsEmStorageNewsSn1.setGmtCreate(new Date());
wmsOdsEmStorageNewsSn1.setActiveFlag("1");
wmsOdsEmStorageNewsSn1.setFactoryCode(wmsOdsEmStorageNewsSn.getFactoryCode());
wmsOdsEmStorageNewsSnMapper.insertWmsOdsEmStorageNewsSn(wmsOdsEmStorageNewsSn1);
WmsOdsEmStorageNews wmsOdsEmStorageNews1=new WmsOdsEmStorageNews();
wmsOdsEmStorageNews1.setWlCode(wmsOdsEmStorageNewsSn.gettOwlCode());
wmsOdsEmStorageNews1.setMaterialCode(wmsOdsEmStorageNewsSn.getMaterialCode());
wmsOdsEmStorageNews1.setMaterialDesc(wmsOdsEmStorageNewsSn.getMaterialDesc());
wmsOdsEmStorageNews1.setUserDefined1(wmsOdsEmStorageNewsSn.getUserDefined1());
wmsOdsEmStorageNews1.setFactoryCode(wmsOdsEmStorageNewsSn.getFactoryCode());
wmsOdsEmStorageNews1.setActiveFlag("1");
List<WmsOdsEmStorageNews> wmsOdsEmStorageNewsList= wmsOdsEmStorageNewsMapper.selectWmsOdsEmStorageNewsList(wmsOdsEmStorageNews1);
if (wmsOdsEmStorageNewsList.size()>0){
WmsOdsEmStorageNews wmsOdsEmStorageNews2= wmsOdsEmStorageNewsList.get(0);
BigDecimal newAmount= wmsOdsEmStorageNews2.getAmount();
wmsOdsEmStorageNews2.setAmount(newAmount.add(wmsOdsEmStorageNewsSn.getAmount()));
wmsOdsEmStorageNewsMapper.updateWmsOdsEmStorageNews(wmsOdsEmStorageNews2);
}else {
wmsOdsEmStorageNews1.setStorageId(IdUtils.fastSimpleUUID());
wmsOdsEmStorageNews1.setCreateBy(wmsOdsEmStorageNewsSn.getCreateBy());
wmsOdsEmStorageNews1.setGmtCreate(new Date());
wmsOdsEmStorageNewsMapper.insertWmsOdsEmStorageNews(wmsOdsEmStorageNews1);
}
return result;
}
@Override
public WmsOdsEmStorageNews queryMaterialInfor(WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn) {
DynamicDataSourceContextHolder.push("ds_" + wmsOdsEmStorageNewsSn.getFactoryCode());
WmsOdsEmStorageNews wmsOdsEmStorageNew=new WmsOdsEmStorageNews();
List<WmsOdsEmStorageNews> wmsOdsEmStorageNews= wmsOdsEmStorageNewsMapper.selectWmsOdsEmStorageNewsByMaterialCode(wmsOdsEmStorageNewsSn);
if (wmsOdsEmStorageNews.size()>0){
wmsOdsEmStorageNew=wmsOdsEmStorageNews.get(0);
}
return wmsOdsEmStorageNew;
}
}

@ -222,4 +222,14 @@
<include refid="selectWmsOdsEmStorageNewsVo"/>
WHERE wl_code=#{wlCode} AND material_code=#{materialCode} AND active_flag='1'
</select>
<select id="selectWmsOdsEmStorageNewsByMaterialCode" resultMap="WmsOdsEmStorageNewsResult">
SELECT
DISTINCT
material_code,
material_desc,
user_defined1
FROM
wms_ods_em_storage_news
WHERE material_code=#{materialCode} AND active_flag='1'
</select>
</mapper>

Loading…
Cancel
Save