|
@@ -3,6 +3,7 @@ package org.jeecg.modules.cost.service.impl;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.google.gson.JsonObject;
|
|
|
import org.jeecg.common.exception.JeecgBootException;
|
|
|
import org.jeecg.modules.cost.entity.*;
|
|
|
import org.jeecg.modules.cost.mapper.*;
|
|
@@ -14,8 +15,10 @@ import org.springframework.beans.BeansException;
|
|
|
import org.springframework.context.ApplicationContext;
|
|
|
import org.springframework.context.ApplicationContextAware;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
+import springfox.documentation.spring.web.json.Json;
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
import java.math.BigDecimal;
|
|
@@ -37,6 +40,8 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
|
|
|
@Autowired
|
|
|
private SyCostAllocationMapper syCostAllocationMapper;
|
|
|
@Autowired
|
|
|
+ private SyCostJsonMapper syCostJsonMapper;
|
|
|
+ @Autowired
|
|
|
private SyCostAllocationAccidentMapper syCostAllocationAccidentMapper;
|
|
|
@Autowired
|
|
|
private SyCostAllocationCostpayMapper syCostAllocationCostpayMapper;
|
|
@@ -92,6 +97,24 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
|
|
|
syCostAllocationShipdetailMapper.insert(entity);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ public void saveMain(String plannum, JSONObject json) {
|
|
|
+
|
|
|
+
|
|
|
+ JSONObject object = JSONObject
|
|
|
+ .parseObject(string);
|
|
|
+ String json = object.toJSONString();
|
|
|
+ SyCostJson cost = new SyCostJson();
|
|
|
+ cost.setPlanNum("测试");
|
|
|
+ cost.setCostInfo(json);
|
|
|
+ syCostJsonMapper.insert(cost);*/
|
|
|
+
|
|
|
+ String info = json.toJSONString();
|
|
|
+ SyCostJson cost = new SyCostJson();
|
|
|
+ cost.setPlanNum(plannum);
|
|
|
+ cost.setCostInfo(info);
|
|
|
+ syCostJsonMapper.insert(cost);
|
|
|
+ }
|
|
|
|
|
|
@Override
|
|
|
@Transactional
|