sfd
2025-05-22 791208eed8021ef7eb857ced5f031485cff7a2b7
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsGasPipelineCapacityPlanServiceImpl.java
@@ -101,7 +101,7 @@
    @SneakyThrows
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void copyPlan(String date, String factory, String toStart, String toEnd) {
    public void copyPlan(String date, String factory, String major, String toStart, String toEnd) {
        String[] dtSrc = date.split("-");
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
@@ -116,6 +116,7 @@
        plan.setYear(Integer.valueOf(dtSrc[0]).toString());
        plan.setMonth(Integer.valueOf(dtSrc[1]).toString());
        plan.setOrgCode(factory);
        plan.setMajor(major);
        List<ApsGasPipelineCapacityPlan> templatePlans = apsGasPipelineCapacityPlanMapper.selectApsGasPipelineCapacityPlanList(plan);
        while (dtStart.before(dtEnd)) {
            String year = dtStart.get(Calendar.YEAR) + "";
@@ -123,9 +124,11 @@
            apsGasPipelineCapacityPlanMapper.deleteByDateAndFactory(
                    year,
                    month,
                    factory
                    factory,
                    major
            );
            templatePlans.forEach(p -> {
                p.setId(null);
                p.setYear(year);
                p.setMonth(month);
                p.setCreateBy(SecurityUtils.getUsername());