puzhibing
2022-09-29 e28d33c09405e246a2d75fcb1f69a9e8e9d911b8
ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TSystemPriceController.java
@@ -9,7 +9,6 @@
import com.stylefeng.guns.core.util.SinataUtil;
import com.stylefeng.guns.modular.system.model.TServerCarmodel;
import com.stylefeng.guns.modular.system.service.ITServerCarmodelService;
import com.stylefeng.guns.modular.system.util.PushMinistryOfTransportUtil;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
@@ -44,9 +43,6 @@
    @Autowired
    private ITServerCarmodelService tServerCarmodelService;
    @Autowired
    private PushMinistryOfTransportUtil pushMinistryOfTransportUtil;
    @Value("${pushMinistryOfTransport}")
    private boolean pushMinistryOfTransport;
@@ -171,14 +167,6 @@
        tSystemPrice.setType(1);
        tSystemPrice.setState(1);
        tSystemPriceService.insert(tSystemPrice);
        new Thread(new Runnable() {
            @Override
            public void run() {
                if(pushMinistryOfTransport){//上传数据
                    pushMinistryOfTransportUtil.baseInfoCompanyFare(tSystemPrice.getId());
                }
            }
        }).start();
        return SUCCESS_TIP;
    }
@@ -202,14 +190,6 @@
            }
        }
        tSystemPriceService.updateById(tSystemPrice);
        new Thread(new Runnable() {
            @Override
            public void run() {
                if(pushMinistryOfTransport) {//上传数据
                    pushMinistryOfTransportUtil.baseInfoCompanyFare(tSystemPrice.getId());
                }
            }
        }).start();
        return SUCCESS_TIP;
    }
@@ -238,18 +218,18 @@
    @ResponseBody
    public Object smallSubmit(String json1,String json2) {
        //跨城小件物流
        TSystemPrice one = tSystemPriceService.selectOne(new EntityWrapper<TSystemPrice>().eq("type", 5).eq("companyId", ShiroKit.getUser().getObjectId()));
        if (SinataUtil.isNotEmpty(one)){
            one.setContent(json1);
            tSystemPriceService.updateById(one);
        }else{
            one = new TSystemPrice();
            one.setState(1);
            one.setType(5);
            one.setCompanyId(ShiroKit.getUser().getObjectId());
            one.setContent(json1);
            tSystemPriceService.insert(one);
        }
//        TSystemPrice one = tSystemPriceService.selectOne(new EntityWrapper<TSystemPrice>().eq("type", 5).eq("companyId", ShiroKit.getUser().getObjectId()));
//        if (SinataUtil.isNotEmpty(one)){
//            one.setContent(json1);
//            tSystemPriceService.updateById(one);
//        }else{
//            one = new TSystemPrice();
//            one.setState(1);
//            one.setType(5);
//            one.setCompanyId(ShiroKit.getUser().getObjectId());
//            one.setContent(json1);
//            tSystemPriceService.insert(one);
//        }
        //同城小件物流
        TSystemPrice two = tSystemPriceService.selectOne(new EntityWrapper<TSystemPrice>().eq("type", 4).eq("companyId", ShiroKit.getUser().getObjectId()));
        if (SinataUtil.isNotEmpty(two)){