|
@@ -1,6 +1,14 @@
|
|
|
package com.ruoyi.business.service.impl;
|
|
|
|
|
|
import java.util.List;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
+import com.ruoyi.business.domain.ZwywXmsbFjlx;
|
|
|
+import com.ruoyi.business.domain.ZwywXmsbXmbdpz;
|
|
|
+import com.ruoyi.business.mapper.ZwywXmsbFjlxMapper;
|
|
|
+import com.ruoyi.business.mapper.ZwywXmsbXmbdpzMapper;
|
|
|
+import com.ruoyi.system.api.enums.StateStatus;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import java.util.Arrays;
|
|
@@ -11,19 +19,25 @@ import com.ruoyi.business.service.IZwywXmsbXmlxService;
|
|
|
|
|
|
/**
|
|
|
* 项目申报项目类型信息Service业务层处理
|
|
|
- *
|
|
|
+ *
|
|
|
* @author sun
|
|
|
* @date 2022-10-25
|
|
|
*/
|
|
|
@Service
|
|
|
-public class ZwywXmsbXmlxServiceImpl implements IZwywXmsbXmlxService
|
|
|
+public class ZwywXmsbXmlxServiceImpl implements IZwywXmsbXmlxService
|
|
|
{
|
|
|
@Autowired
|
|
|
private ZwywXmsbXmlxMapper zwywXmsbXmlxMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ZwywXmsbFjlxMapper zwywXmsbFjlxMapper;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ZwywXmsbXmbdpzMapper zwywXmsbXmbdpzMapper;
|
|
|
+
|
|
|
/**
|
|
|
* 查询项目申报项目类型信息
|
|
|
- *
|
|
|
+ *
|
|
|
* @param id 项目申报项目类型信息主键
|
|
|
* @return 项目申报项目类型信息
|
|
|
*/
|
|
@@ -35,7 +49,7 @@ public class ZwywXmsbXmlxServiceImpl implements IZwywXmsbXmlxService
|
|
|
|
|
|
/**
|
|
|
* 查询项目申报项目类型信息列表
|
|
|
- *
|
|
|
+ *
|
|
|
* @param zwywXmsbXmlx 项目申报项目类型信息
|
|
|
* @return 项目申报项目类型信息
|
|
|
*/
|
|
@@ -47,7 +61,7 @@ public class ZwywXmsbXmlxServiceImpl implements IZwywXmsbXmlxService
|
|
|
|
|
|
/**
|
|
|
* 新增项目申报项目类型信息
|
|
|
- *
|
|
|
+ *
|
|
|
* @param zwywXmsbXmlx 项目申报项目类型信息
|
|
|
* @return 结果
|
|
|
*/
|
|
@@ -59,19 +73,29 @@ public class ZwywXmsbXmlxServiceImpl implements IZwywXmsbXmlxService
|
|
|
|
|
|
/**
|
|
|
* 修改项目申报项目类型信息
|
|
|
- *
|
|
|
+ *
|
|
|
* @param zwywXmsbXmlx 项目申报项目类型信息
|
|
|
* @return 结果
|
|
|
*/
|
|
|
@Override
|
|
|
public int updateZwywXmsbXmlx(ZwywXmsbXmlx zwywXmsbXmlx)
|
|
|
{
|
|
|
+ //0 开启
|
|
|
+ if (StateStatus.NORMAL.getCode().equals(zwywXmsbXmlx.getStatus())){
|
|
|
+ LambdaUpdateWrapper<ZwywXmsbFjlx> zwywXmsbFjlx = Wrappers.lambdaUpdate();
|
|
|
+ zwywXmsbFjlx.eq(ZwywXmsbFjlx::getXmlxId,zwywXmsbXmlx.getId()).set(ZwywXmsbFjlx::getStatus,StateStatus.NORMAL.getCode());
|
|
|
+ zwywXmsbFjlxMapper.update(null,zwywXmsbFjlx);
|
|
|
+
|
|
|
+ LambdaUpdateWrapper<ZwywXmsbXmbdpz> zwywXmsbXmbdpz = Wrappers.lambdaUpdate();
|
|
|
+ zwywXmsbXmbdpz.eq(ZwywXmsbXmbdpz::getXmlxId,zwywXmsbXmlx.getId()).set(ZwywXmsbXmbdpz::getStatus,StateStatus.NORMAL.getCode());
|
|
|
+ zwywXmsbXmbdpzMapper.update(null,zwywXmsbXmbdpz);
|
|
|
+ }
|
|
|
return zwywXmsbXmlxMapper.updateById(zwywXmsbXmlx);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 批量删除项目申报项目类型信息
|
|
|
- *
|
|
|
+ *
|
|
|
* @param ids 需要删除的项目申报项目类型信息主键
|
|
|
* @return 结果
|
|
|
*/
|
|
@@ -81,4 +105,15 @@ public class ZwywXmsbXmlxServiceImpl implements IZwywXmsbXmlxService
|
|
|
return zwywXmsbXmlxMapper.deleteBatchIds(Arrays.asList(ids));
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<String> zwywXmsbCommonInfoById(String id) {
|
|
|
+ return zwywXmsbXmlxMapper.zwywXmsbCommonInfoById(id);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<String> zwywXmsbFjlxById(String id) {
|
|
|
+ return zwywXmsbXmlxMapper.zwywXmsbFjlxById(id);
|
|
|
+ }
|
|
|
+
|
|
|
}
|