huangjiayang
2025-04-25 ae366fa73d7fa3bc748973d341dd16f3735ce436
aps-modules/aps-core/src/main/java/com/aps/core/service/impl/ApsPlatePlanServiceImpl.java
@@ -1,30 +1,31 @@
package com.aps.core.service.impl;
import java.util.List;
import java.util.Optional;
import com.aps.common.core.utils.DateUtils;
import com.aps.common.core.utils.uuid.IdUtils;
import com.aps.common.security.utils.DictUtils;
import com.aps.core.domain.ApsPlatePlan;
import com.aps.core.domain.ApsPlatePlanTemp;
import com.aps.core.mapper.ApsPartPlanTempMapper;
import com.aps.core.mapper.ApsPlatePlanMapper;
import com.aps.core.mapper.ApsPlatePlanTempMapper;
import com.aps.core.service.IApsPlatePlanService;
import com.aps.system.api.domain.SysDictData;
import org.apache.logging.log4j.util.Strings;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.aps.core.mapper.ApsPlatePlanMapper;
import com.aps.core.domain.ApsPlatePlan;
import com.aps.core.service.IApsPlatePlanService;
import java.util.List;
import java.util.Optional;
/**
 * 钣金计划管理Service业务层处理
 *
 *
 * @author ruoyi
 * @date 2025-04-08
 */
@Service
public class ApsPlatePlanServiceImpl implements IApsPlatePlanService
public class ApsPlatePlanServiceImpl implements IApsPlatePlanService
{
    @Autowired
    private ApsPlatePlanMapper apsPlatePlanMapper;
@@ -36,7 +37,7 @@
    /**
     * 查询钣金计划管理
     *
     *
     * @param id 钣金计划管理主键
     * @return 钣金计划管理
     */
@@ -48,7 +49,7 @@
    /**
     * 查询钣金计划管理列表
     *
     *
     * @param apsPlatePlan 钣金计划管理
     * @return 钣金计划管理
     */
@@ -60,7 +61,7 @@
    /**
     * 新增钣金计划管理
     *
     *
     * @param apsPlatePlan 钣金计划管理
     * @return 结果
     */
@@ -68,12 +69,13 @@
    public int insertApsPlatePlan(ApsPlatePlan apsPlatePlan)
    {
        apsPlatePlan.setId(IdUtils.fastUUID());
        apsPlatePlan.setCreateTime(DateUtils.getNowDate());
        return apsPlatePlanMapper.insertApsPlatePlan(apsPlatePlan);
    }
    /**
     * 修改钣金计划管理
     *
     *
     * @param apsPlatePlan 钣金计划管理
     * @return 结果
     */
@@ -85,7 +87,7 @@
    /**
     * 批量删除钣金计划管理
     *
     *
     * @param ids 需要删除的钣金计划管理主键
     * @return 结果
     */
@@ -97,7 +99,7 @@
    /**
     * 删除钣金计划管理信息
     *
     *
     * @param id 钣金计划管理主键
     * @return 结果
     */
@@ -109,6 +111,8 @@
    @Override
    public int confirmPlan(ApsPlatePlanTemp tempPlan) {
        //先删除所有
        apsPlatePlanMapper.removeAllPlatePlans();
        //查询临时表数据
        List<ApsPlatePlanTemp> apsPartPlanTemps=apsPlatePlanTempMapper.selectApsPlatePlanTempList(tempPlan);
        int count=0;
@@ -119,6 +123,7 @@
            ApsPlatePlan platePlan=new ApsPlatePlan();
            BeanUtils.copyProperties(apsPartPlanTemps.get(i), platePlan);
            platePlan.setId(IdUtils.fastUUID());
            platePlan.setCreateTime(DateUtils.getNowDate());
            //插入正式表,并记录
            apsPlatePlanMapper.insertApsPlatePlan(platePlan);
            count++;
@@ -176,4 +181,7 @@
           return Strings.EMPTY;
        }
    }
}