|
@@ -100,7 +100,6 @@ public class CustomPlanServiceImpl implements CustomPlanService {
|
|
|
@SneakyThrows
|
|
|
public boolean savePlan(CustomPlan customPlan) {
|
|
|
|
|
|
-
|
|
|
|
|
|
customPlan.setIsFindTrouble("0");
|
|
|
customPlan.setIsread("0");
|
|
@@ -200,6 +199,7 @@ public class CustomPlanServiceImpl implements CustomPlanService {
|
|
|
if (type.equals("0")) {
|
|
|
planChild.setPointNum(Long.valueOf(geo.size()));
|
|
|
planChildService.save(planChild);
|
|
|
+
|
|
|
for (int j = 0; j < geo.size(); j++) {
|
|
|
PlanPointTemp planPointTemp = new PlanPointTemp();
|
|
|
planPointTemp.setPlanId(customPlan.getId());
|
|
@@ -210,6 +210,7 @@ public class CustomPlanServiceImpl implements CustomPlanService {
|
|
|
planPointTemp.setChildPlanId(planChild.getId());
|
|
|
planPointTemp.setRegionId(customPlan.getRegionId());
|
|
|
planPointTemp.setDeviceTypeId(customPlan.getDeviceTypeId());
|
|
|
+ planPointTemp.setCreateDate(new Date());
|
|
|
if (gisUrl == null) {
|
|
|
planPointTemp.setPointId(geo.getJSONObject(j).getLong("sid"));
|
|
|
planPointTemp.setGeometry(geo.getJSONObject(j).getString("geometry"));
|
|
@@ -257,6 +258,7 @@ public class CustomPlanServiceImpl implements CustomPlanService {
|
|
|
planPointTemp.setUserId(userId);
|
|
|
planPointTemp.setCompanyid(companyId);
|
|
|
planPointTemp.setIsover("0");
|
|
|
+ planPointTemp.setCreateDate(new Date());
|
|
|
|
|
|
planPointTemp.setPointId(geo.getJSONObject(j).getLong("sid"));
|
|
|
planPointTemp.setGeometry(pipe.getJSONObject(w).getString("geometry"));
|
|
@@ -299,6 +301,7 @@ public class CustomPlanServiceImpl implements CustomPlanService {
|
|
|
planPointTemp.setUserId(userId);
|
|
|
planPointTemp.setCompanyid(companyId);
|
|
|
planPointTemp.setIsover("0");
|
|
|
+ planPointTemp.setCreateDate(new Date());
|
|
|
|
|
|
planPointTemp.setPointId(geo.getJSONObject(j).getJSONObject("attributes").getLong("OBJECTID"));
|
|
|
planPointTemp.setGeometry(geo.getJSONObject(j).getString("geometry"));
|
|
@@ -451,9 +454,9 @@ public class CustomPlanServiceImpl implements CustomPlanService {
|
|
|
planService.removeByIds(Arrays.asList(ids.split(",")));
|
|
|
for (String id : Arrays.asList(ids.split(","))) {
|
|
|
planChildService.remove(Wrappers.<PlanChild>lambdaQuery().eq(PlanChild::getMainPlanId, id));
|
|
|
- planPointTempService.remove(Wrappers.<PlanPointTemp>lambdaQuery().eq(PlanPointTemp::getPlanId, id));
|
|
|
List<PlanChild> list = planChildService.list(Wrappers.<PlanChild>lambdaQuery().eq(PlanChild::getMainPlanId, id));
|
|
|
for (PlanChild child : list) {
|
|
|
+ planPointTempService.remove(Wrappers.<PlanPointTemp>lambdaQuery().eq(PlanPointTemp::getChildPlanId, child.getId()));
|
|
|
planPathTempService.remove(Wrappers.<TfPlanPathTemp>lambdaQuery().eq(TfPlanPathTemp::getChildPlanId, child.getId()));
|
|
|
}
|
|
|
}
|
|
@@ -481,13 +484,9 @@ public class CustomPlanServiceImpl implements CustomPlanService {
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
@Override
|
|
|
public boolean removeChildPlanByIds(String ids) {
|
|
|
- List<PlanChild> inPlan = new ArrayList<>();
|
|
|
- String s = new String();
|
|
|
- for (String id : Arrays.asList(ids.split(","))) {
|
|
|
- PlanChild planChild = planChildService.getOne(Wrappers.<PlanChild>lambdaQuery().eq(PlanChild::getId, id).ge(PlanChild::getChildPlanState, "2"));
|
|
|
- if (planChild == null) {
|
|
|
- break;
|
|
|
- }
|
|
|
+ for (String id : Arrays.asList(ids.split(","))) {
|
|
|
+ planPointTempService.remove(Wrappers.<PlanPointTemp>lambdaQuery().eq(PlanPointTemp::getChildPlanId, id));
|
|
|
+ planPathTempService.remove(Wrappers.<TfPlanPathTemp>lambdaQuery().eq(TfPlanPathTemp::getChildPlanId, id));
|
|
|
|
|
|
|
|
|
|