|
@@ -8,6 +8,7 @@ import com.steerinfo.dil.mapper.*;
|
|
|
import com.steerinfo.dil.model.*;
|
|
|
import com.steerinfo.dil.service.IAmsSaleOrderService;
|
|
|
import com.steerinfo.dil.util.*;
|
|
|
+import com.steerinfo.framework.utils.base.StringUtils;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
@@ -602,7 +603,12 @@ public class AmsSaleOrderServiceImpl implements IAmsSaleOrderService {
|
|
|
String isSelfMention = (String) mapValue.get("isSelfMention");
|
|
|
// 备注
|
|
|
String saleRemark = (String) mapValue.get("saleRemark");
|
|
|
-
|
|
|
+ String saleGroupCode = null;
|
|
|
+ try {
|
|
|
+ saleGroupCode = "钢" + StringUtils.substringBetween(saleRemark,"钢","组") + "组";
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
// 收款客户
|
|
|
String saleOrderReceiveCustomer = (String) mapValue.get("saleOrderReceiveCustomer");
|
|
|
// 业务员
|
|
@@ -825,6 +831,9 @@ public class AmsSaleOrderServiceImpl implements IAmsSaleOrderService {
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
+ if(saleGroupCode != null) {
|
|
|
+ amsSaleMaterial.setTransferOutOfWarehouse(saleGroupCode);
|
|
|
+ }
|
|
|
amsSaleMaterial.setInsertTime(new Date());
|
|
|
amsSaleMaterial.setUpdateTime(new Date());
|
|
|
amsSaleMaterial.setIsPoundSale(isPoundSale);
|
|
@@ -2941,8 +2950,10 @@ public class AmsSaleOrderServiceImpl implements IAmsSaleOrderService {
|
|
|
public int updateTransportOrderStatus(BigDecimal orderId) {
|
|
|
//查询该运单下有没有净重,没有净重就变为7,有净重就变为2
|
|
|
int netWeight = omstruckOrderMapper.selectNetWeightCount(orderId);
|
|
|
+ //查询该运单有没有出厂,没有出厂才变2
|
|
|
+ int outFactory = omstruckOrderMapper.selectOutFactory(orderId);
|
|
|
int orderStatus = 7;
|
|
|
- if(netWeight > 0) {
|
|
|
+ if(netWeight > 0 && outFactory == 0) {
|
|
|
orderStatus = 2;
|
|
|
}
|
|
|
return amsSaleOrderMaterialMapper.updateTransportOrderStatus(orderId,orderStatus);
|