kongzy
2024-03-15 50c669c09a7b392af22706e6fb1fa8a4c335d8eb
assess-system/src/main/java/com/gkhy/assess/system/service/impl/AssEstimatePlanServiceImpl.java
@@ -3,6 +3,7 @@
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gkhy.assess.common.exception.ApiException;
import com.gkhy.assess.system.domain.AssEstimatePlan;
import com.gkhy.assess.system.domain.AssEstimateSchedule;
import com.gkhy.assess.system.domain.AssPlanPerson;
import com.gkhy.assess.system.enums.PlayRoleEnum;
import com.gkhy.assess.system.enums.ReportProgressEnum;
@@ -12,6 +13,8 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
 * <p>
@@ -74,6 +77,10 @@
        AssEstimatePlan oldPlan=getById(estimatePlan.getId());
        estimatePlan.setUpdateBy(ShiroUtils.getSysUser().getUsername());
        int row=baseMapper.updateById(estimatePlan);
        List<AssEstimateSchedule> estimateScheduleList=estimatePlan.getEstimateSchedules();
        if(estimateScheduleList!=null&&estimateScheduleList.size()>0){
            estimateScheduleService.updateBatchById(estimateScheduleList);
        }
        if(row>0) {
            if (estimatePlan.getAuserId() != null && !estimatePlan.getAuserId().equals(oldPlan.getAuserId())) {
                planPersonService.checkPersonUnique(new AssPlanPerson().setPersonId(estimatePlan.getAuserId()).setProjectId(oldPlan.getProjectId()));