|
|
@@ -15,10 +15,12 @@ import com.dk.mdm.infrastructure.convert.ivt.InboundConvert;
|
|
|
import com.dk.mdm.infrastructure.convert.ivt.InboundItemConvert;
|
|
|
import com.dk.mdm.mapper.common.CommonMapper;
|
|
|
import com.dk.mdm.mapper.ivt.*;
|
|
|
+import com.dk.mdm.mapper.mst.SupplierMapper;
|
|
|
import com.dk.mdm.model.pojo.ivt.Inbound;
|
|
|
import com.dk.mdm.model.pojo.ivt.InboundItem;
|
|
|
import com.dk.mdm.model.pojo.ivt.IntoReturn;
|
|
|
import com.dk.mdm.model.pojo.ivt.IntoReturnItem;
|
|
|
+import com.dk.mdm.model.pojo.mst.Supplier;
|
|
|
import com.dk.mdm.model.pojo.pur.Purchase;
|
|
|
import com.dk.mdm.model.pojo.pur.PurchaseItem;
|
|
|
import com.dk.mdm.model.query.ivt.InboundItemQuery;
|
|
|
@@ -82,6 +84,8 @@ public class InboundPurchaseReturnService extends BaseService<Inbound> {
|
|
|
@Autowired
|
|
|
private AccountService accountService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private SupplierMapper supplierMapper;
|
|
|
|
|
|
/**
|
|
|
* @desc : 条件查询
|
|
|
@@ -118,6 +122,17 @@ public class InboundPurchaseReturnService extends BaseService<Inbound> {
|
|
|
*/
|
|
|
@Transactional(rollbackFor = {Exception.class})
|
|
|
public ResponseResultVO<?> purchaseReturnInboundInsert(InboundVO inboundVO) {
|
|
|
+
|
|
|
+ //TODO 更新供应商信息(后续可能会 在入库表中增加地址字段) 2024/7/17 于继渤
|
|
|
+ if (inboundVO.getSupId() != null && inboundVO.getReturnAddress() !=null){
|
|
|
+ Supplier supplier = new Supplier();
|
|
|
+ supplier.setSupId(inboundVO.getSupId());
|
|
|
+ supplier.setReturnAddress(inboundVO.getReturnAddress());
|
|
|
+ supplierMapper.update(supplier,
|
|
|
+ new UpdateWrapper<Supplier>().lambda()
|
|
|
+ .eq(Supplier::getSupId, UUID.fromString(supplier.getSupId()))
|
|
|
+ );
|
|
|
+ }
|
|
|
//region 查询当前公司的系统参数 自动办理信息 并赋值
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
map.put("cpId", inboundVO.getCpId());
|