|
@@ -1,11 +1,16 @@
|
|
package com.yh.saas.plugin.yiliangyiyun.service.impl;
|
|
package com.yh.saas.plugin.yiliangyiyun.service.impl;
|
|
|
|
|
|
|
|
+import com.baomidou.mybatisplus.toolkit.CollectionUtils;
|
|
|
|
+import com.yh.saas.common.support.util.StringUtils;
|
|
import com.yh.saas.plugin.yiliangyiyun.entity.ProcurementPlanInfo;
|
|
import com.yh.saas.plugin.yiliangyiyun.entity.ProcurementPlanInfo;
|
|
import com.yh.saas.plugin.yiliangyiyun.mapper.ProcurementPlanInfoMapper;
|
|
import com.yh.saas.plugin.yiliangyiyun.mapper.ProcurementPlanInfoMapper;
|
|
import com.yh.saas.plugin.yiliangyiyun.service.IProcurementPlanInfoService;
|
|
import com.yh.saas.plugin.yiliangyiyun.service.IProcurementPlanInfoService;
|
|
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
+import static com.yh.saas.common.support.util.StringUtils.*;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* <p>
|
|
* <p>
|
|
* 记录采购计划 服务实现类
|
|
* 记录采购计划 服务实现类
|
|
@@ -16,5 +21,48 @@ import org.springframework.stereotype.Service;
|
|
*/
|
|
*/
|
|
@Service
|
|
@Service
|
|
public class ProcurementPlanInfoServiceImpl extends ServiceImpl<ProcurementPlanInfoMapper, ProcurementPlanInfo> implements IProcurementPlanInfoService {
|
|
public class ProcurementPlanInfoServiceImpl extends ServiceImpl<ProcurementPlanInfoMapper, ProcurementPlanInfo> implements IProcurementPlanInfoService {
|
|
|
|
+ @Autowired
|
|
|
|
+ private IProcurementPlanInfoService ProcurementPlanInfo;
|
|
|
|
+ /**
|
|
|
|
+ * 查看采购计划
|
|
|
|
+ * @param id
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ public ProcurementPlanInfo getProcurementPlan(String id){
|
|
|
|
+ //查看采购计划信息
|
|
|
|
+ ProcurementPlanInfo procurementPlanInfo = this.selectById(id);
|
|
|
|
+ return procurementPlanInfo;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 编辑采购计划
|
|
|
|
+ * @param procurementPlanInfo
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ public String editProcurementPlan(ProcurementPlanInfo procurementPlanInfo) {
|
|
|
|
+ //查询采购计划信息
|
|
|
|
+ ProcurementPlanInfo procurementPlanInfos = this.selectById(procurementPlanInfo.getId());
|
|
|
|
+ if (procurementPlanInfos != null) {
|
|
|
|
+ //编辑采购计划信息
|
|
|
|
+ this.updateById(procurementPlanInfos);
|
|
|
|
+ }
|
|
|
|
+ return procurementPlanInfos.getId();
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 删除采购计划
|
|
|
|
+ * @param id
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ public void deleteProcurementPlan(String id){
|
|
|
|
+ //查询采购计划信息
|
|
|
|
+ ProcurementPlanInfo procurementPlanInfo = this.selectById(id);
|
|
|
|
+ if(procurementPlanInfo != null){
|
|
|
|
+ //删除采购计划信息
|
|
|
|
+ this.deleteById(procurementPlanInfo.getId());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|