feature:开票后新增物料判重

release
gaorl 2 years ago
parent bbb2df749d
commit 4c5a9b1707
  1. 13
      order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/commodity/service/impl/CommodityServiceImpl.java

@ -619,15 +619,22 @@ public class CommodityServiceImpl implements CommodityService {
commodityCodeCheckQuery.setXmdj(receiveSpxxReq.getXmdj());
commodityCodeCheckQuery.setSl(receiveSpxxReq.getSl());
commodityCodeCheckQuery.setDeptId(receiveSpxxReq.getEntId());
R r = commodityService.checkRepeat(commodityCodeCheckQuery, NsrsbhUtils.transShListByNsrsbh(receiveSpxxReq.getXhfNsrsbh()), false);
if (ConfigureConstant.STRING_0000.equals(r.get(OrderManagementConstant.CODE))) {
Map<String,String> map = new HashMap<>();
map.put("productName", xmmc);
map.put("zxbm", receiveSpxxReq.getZxbm());
map.put("entId",commodityCodeCheckQuery.getDeptId());
log.debug("{}校验名称是否存在 参数:{}", LOGGER_MSG, map);
List<CommodityCodeEntity> commodityCodeEntityList = commodityMapper.queryProductList(map, null);
//R r = commodityService.checkRepeat(commodityCodeCheckQuery, NsrsbhUtils.transShListByNsrsbh(receiveSpxxReq.getXhfNsrsbh()), false);
if(commodityCodeEntityList.isEmpty()){
//if (ConfigureConstant.STRING_0000.equals(r.get(OrderManagementConstant.CODE))) {
/**
* 从缓存中取税编信息
*
*/
TaxClassCodeEntity taxClassCodeEntity = taxClassCodeService.queryTaxClassCodeFromCache(receiveSpxxReq.getSpbm());
if (ObjectUtil.isNotEmpty(taxClassCodeEntity)) {
CommodityCodeEntity commodityCodeEntity = transCommodityCode(receiveSpxxReq, taxClassCodeEntity);
commodityMapper.insertCommodity(commodityCodeEntity);

Loading…
Cancel
Save