feature:发票开具后保存物料编码,且更新订单智能赋码为非智能赋码

release
gaorl 2 years ago
parent 141622e888
commit a72bf3cede
  1. 2
      order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/commodity/service/impl/CommodityServiceImpl.java
  2. 11
      order-management-consumer/src/main/java/com/dxhy/order/consumer/config/rabbitmq/OrderSaveSpxxHandler.java
  3. 3
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/service/OrderItemInfoService.java
  4. 6
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/order/service/impl/OrderItemInfoServiceImpl.java
  5. 3
      order-management-invoice/src/main/resources/mybatis/mapper/OrderItemInfoMapper.xml

@ -622,7 +622,7 @@ public class CommodityServiceImpl implements CommodityService {
Map<String,String> map = new HashMap<>(); Map<String,String> map = new HashMap<>();
// map.put("productName", xmmc); // map.put("productName", xmmc);
map.put("zxbm", receiveSpxxReq.getZxbm()); map.put("zxbm", receiveSpxxReq.getZxbm());
map.put("entId",commodityCodeCheckQuery.getDeptId()); map.put("entId",receiveSpxxReq.getEntId());
log.debug("{}校验名称是否存在 参数:{}", LOGGER_MSG, map); log.debug("{}校验名称是否存在 参数:{}", LOGGER_MSG, map);
List<CommodityCodeEntity> commodityCodeEntityList = commodityMapper.queryProductList(map, null); List<CommodityCodeEntity> commodityCodeEntityList = commodityMapper.queryProductList(map, null);

@ -111,7 +111,7 @@ public class OrderSaveSpxxHandler implements BaseListener {
List<String> shList = NsrsbhUtils.transShListByNsrsbh(orderInvoiceInfo.getXhfNsrsbh()); List<String> shList = NsrsbhUtils.transShListByNsrsbh(orderInvoiceInfo.getXhfNsrsbh());
List<OrderItemInfo> orderItemInfoList = orderItemInfoService.selectOrderItemInfoByOrderId(orderInvoiceInfo.getOrderInfoId(), shList); List<OrderItemInfo> orderItemInfoList = orderItemInfoService.selectOrderItemInfoByOrderId(orderInvoiceInfo.getOrderInfoId(), shList);
List<OrderItemInfo> updateZnfmList = new ArrayList<>();
if (ObjectUtil.isNotEmpty(orderItemInfoList)) { if (ObjectUtil.isNotEmpty(orderItemInfoList)) {
List<ReceiveSpxxReq> receiveSpxxReqList = new ArrayList<>(); List<ReceiveSpxxReq> receiveSpxxReqList = new ArrayList<>();
for (OrderItemInfo orderItemInfo : orderItemInfoList) { for (OrderItemInfo orderItemInfo : orderItemInfoList) {
@ -120,8 +120,17 @@ public class OrderSaveSpxxHandler implements BaseListener {
receiveSpxxReq.setXhfMc(orderInvoiceInfo.getXhfMc()); receiveSpxxReq.setXhfMc(orderInvoiceInfo.getXhfMc());
receiveSpxxReq.setEntId(userInfoService.getUser() != null ? userInfoService.getUser().getDeptId():orderInvoiceInfo.getEntId()); receiveSpxxReq.setEntId(userInfoService.getUser() != null ? userInfoService.getUser().getDeptId():orderInvoiceInfo.getEntId());
receiveSpxxReqList.add(receiveSpxxReq); receiveSpxxReqList.add(receiveSpxxReq);
//更新是否为只能赋码
if("1".equals(orderItemInfo.getZnfm())){
OrderItemInfo orderItemInfo1 = new OrderItemInfo();
orderItemInfo1.setId(orderItemInfo.getId());
orderItemInfo1.setZnfm("0");
updateZnfmList.add(orderItemInfo1);
}
} }
//事务控制
commodityService.saveCommodityCodeEntity(receiveSpxxReqList); commodityService.saveCommodityCodeEntity(receiveSpxxReqList);
orderItemInfoService.updateOrderItemId(updateZnfmList);
} }
} }

@ -1,6 +1,7 @@
package com.dxhy.order.consumer.modules.order.service; package com.dxhy.order.consumer.modules.order.service;
import com.dxhy.order.model.OrderItemInfo; import com.dxhy.order.model.OrderItemInfo;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
@ -38,4 +39,6 @@ public interface OrderItemInfoService {
*/ */
int insertOrderItemByList(List<OrderItemInfo> orderItemInfos); int insertOrderItemByList(List<OrderItemInfo> orderItemInfos);
int updateOrderItemId(List<OrderItemInfo> resultOrderItemList);
} }

@ -3,6 +3,7 @@ package com.dxhy.order.consumer.modules.order.service.impl;
import com.dxhy.order.model.OrderItemInfo; import com.dxhy.order.model.OrderItemInfo;
import com.dxhy.order.consumer.modules.order.service.OrderItemInfoService; import com.dxhy.order.consumer.modules.order.service.OrderItemInfoService;
import com.dxhy.order.invoice.module.invoice.dao.OrderItemInfoMapper; import com.dxhy.order.invoice.module.invoice.dao.OrderItemInfoMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
@ -35,4 +36,9 @@ public class OrderItemInfoServiceImpl implements OrderItemInfoService {
return orderItemInfoMapper.insertOrderItemByList(orderItemInfos); return orderItemInfoMapper.insertOrderItemByList(orderItemInfos);
} }
@Override
public int updateOrderItemId(@Param("list") List<OrderItemInfo> resultOrderItemList){
return orderItemInfoMapper.updateOrderItemId(resultOrderItemList);
}
} }

@ -283,6 +283,9 @@
<if test="item.xmdw != null "> <if test="item.xmdw != null ">
xmdw = #{item.xmdw,jdbcType=VARCHAR}, xmdw = #{item.xmdw,jdbcType=VARCHAR},
</if> </if>
<if test="item.znfm != null ">
znfm = #{item.znfm,jdbcType=VARCHAR},
</if>
</set> </set>
<where> <where>
id = #{item.id,jdbcType=VARCHAR} id = #{item.id,jdbcType=VARCHAR}

Loading…
Cancel
Save