wangchangsheng il y a 1 an
Parent
commit
65b7ffd885

+ 25 - 11
ims-service/ims-eval/src/main/java/com/ims/eval/controller/MultipleBrandController.java

@@ -37,26 +37,40 @@ public class MultipleBrandController {
 	 */
 		@GetMapping(value = "list")
 	public R list(@RequestParam(value = "id", required = false) String id,
-				  @RequestParam(value = "parentId", required = false) String parentId) {
+				  @RequestParam(value = "parentId", required = false) String parentId,
+				  @RequestParam(value = "binSection", required = false) String  binSection,
+				  @RequestParam(value = "checkCycle", required = false) String  checkCycle,
+				  @RequestParam(value = "year", required = false) String year,
+				  @RequestParam(value = "month", required = false) String month) {
 
-		List<MultipleBrand> list  =multipleBrandService.getMultipleBranList(id,parentId);
+		List<MultipleBrand> list  =multipleBrandService.getMultipleBranList(id,parentId,binSection,checkCycle,year,month);
 		return R.ok().data(list);
 	}
 
 
-
 	/**
-	 * 查询
-	 *
-	 * @param id         主键ID
-	 * @param parentId      父类id
+	 *	 查询你
+	 * @param pageNum 页数
+	 * @param pageSize 页数大小
+	 * @param id id
+	 * @param parentId 父殴打
+	 * @param binSection 板块
+	 * @param checkCycle  周期
+	 * @param year 年
+	 * @param month 月
 	 * @return
 	 */
 	@GetMapping(value = "tree")
-	public R tree(@RequestParam(value = "id", required = false) String id,
-				  @RequestParam(value = "parentId", required = false) String parentId) {
-
-		List<MultipleBrand> list  =multipleBrandService.getMultipleBranTree(id,parentId);
+	public R tree(@RequestParam(value = "pageNum") Integer pageNum,
+				  @RequestParam(value = "pageSize") Integer pageSize,
+				  @RequestParam(value = "id", required = false) String id,
+				  @RequestParam(value = "parentId", required = false) String parentId,
+				  @RequestParam(value = "binSection", required = false) String  binSection,
+				  @RequestParam(value = "checkCycle", required = false) String  checkCycle,
+				  @RequestParam(value = "year", required = false) String year,
+				  @RequestParam(value = "month", required = false) String month) {
+
+		List<MultipleBrand> list  =multipleBrandService.getMultipleBranTree(pageNum,pageSize,id,parentId,binSection,checkCycle,year,month);
 		return R.ok().data(list);
 	}
 

+ 13 - 2
ims-service/ims-eval/src/main/java/com/ims/eval/dao/MultipleBrandMapper.java

@@ -1,5 +1,6 @@
 package com.ims.eval.dao;
 
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ims.eval.entity.MultipleBrand;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.apache.ibatis.annotations.Param;
@@ -16,8 +17,18 @@ import java.util.List;
  */
 public interface MultipleBrandMapper extends BaseMapper<MultipleBrand> {
 
-	List<MultipleBrand> selectMultipleBranTree(@Param("id")String id , @Param("parentId")String parentId);
+	List<MultipleBrand> selectMultipleBranTree(Page page, @Param("id")String id ,
+											   @Param("parentId") String parentId,
+											   @Param("binSection") String  binSection,
+											   @Param("checkCycle") String  checkCycle,
+											   @Param("year") String year,
+											   @Param("month") String month);
 
-	List<MultipleBrand> selectMultipleBranList(@Param("id")String id ,@Param("parentId") String parentId);
+	List<MultipleBrand> selectMultipleBranList(@Param("id")String id ,
+											   @Param("parentId") String parentId,
+											   @Param("binSection") String  binSection,
+											   @Param("checkCycle") String  checkCycle,
+											   @Param("year") String year,
+											   @Param("month") String month);
 
 }

+ 2 - 2
ims-service/ims-eval/src/main/java/com/ims/eval/service/IMultipleBrandService.java

@@ -15,8 +15,8 @@ import java.util.List;
  */
 public interface IMultipleBrandService extends IService<MultipleBrand> {
 
-	List<MultipleBrand> getMultipleBranTree(String id , String parentId);
+	List<MultipleBrand> getMultipleBranTree(Integer pageNum, Integer pageSize,String id , String parentId,String  binSection,String  checkCycle,String year,String month);
 
-	List<MultipleBrand> getMultipleBranList(String id , String parentId);
+	List<MultipleBrand> getMultipleBranList(String id , String parentId,String  binSection,String  checkCycle,String year,String month);
 
 }

+ 7 - 4
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/MultipleBrandServiceImpl.java

@@ -1,6 +1,8 @@
 package com.ims.eval.service.impl;
 
 import cn.hutool.core.collection.CollectionUtil;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ims.eval.entity.Indicator;
 import com.ims.eval.entity.MultipleBrand;
 import com.ims.eval.dao.MultipleBrandMapper;
 import com.ims.eval.service.IMultipleBrandService;
@@ -23,15 +25,16 @@ import java.util.stream.Collectors;
 public class MultipleBrandServiceImpl extends ServiceImpl<MultipleBrandMapper, MultipleBrand> implements IMultipleBrandService {
 
 	@Override
-	public List<MultipleBrand> getMultipleBranTree(String id, String parentId) {
-		List<MultipleBrand> list  =  baseMapper.selectMultipleBranTree(id,parentId);
+	public List<MultipleBrand> getMultipleBranTree(Integer pageNum, Integer pageSize,String id, String parentId,String  binSection,String  checkCycle,String year,String month) {
+		Page<Indicator> page = new Page<>(pageNum, pageSize);
+		List<MultipleBrand> list  =  baseMapper.selectMultipleBranTree(page,id,parentId,binSection,checkCycle,year,month);
 		List<MultipleBrand> tree = convert(list);
 		return tree;
 	}
 
 	@Override
-	public List<MultipleBrand> getMultipleBranList(String id, String parentId) {
-		List<MultipleBrand> list  = baseMapper.selectMultipleBranList(id,parentId);
+	public List<MultipleBrand> getMultipleBranList(String id, String parentId,String  binSection,String  checkCycle,String year,String month) {
+		List<MultipleBrand> list  = baseMapper.selectMultipleBranList(id,parentId,binSection,checkCycle,year,month);
 		return list;
 	}
 

+ 2 - 45
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/OrganizationEvaluationInfoServiceImpl.java

@@ -1,13 +1,11 @@
 package com.ims.eval.service.impl;
 
-import com.ims.common.utils.Constant;
 import com.ims.common.utils.FormulaUtils;
 import com.ims.common.utils.StringUtils;
 import com.ims.eval.config.CustomException;
 import com.ims.eval.dao.CalculateIndicatorItemInfoMapper;
 import com.ims.eval.entity.*;
 import com.ims.eval.dao.OrganizationEvaluationInfoMapper;
-import com.ims.eval.entity.dto.response.MyuserResDTO;
 import com.ims.eval.entity.dto.response.OrganizationEvaluationInfoResDTO;
 import com.ims.eval.service.*;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -55,28 +53,7 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 	@Override
 	public Map finishValueList(String organizationEvaluationId, String dept, HttpServletRequest request) {
 
-		MyuserResDTO myuser = userService.getSysUser(request);
-		if(null == myuser){
-			throw new CustomException("暂无权限");
-		}
-		String organizationId = "";
-		boolean updateMark = false;
-		if (null != myuser.getUnitOrg() && null != myuser.getUnitOrg().getParentIds()) {
-			String type = myuser.getUnitOrg().getType();
-			if (Constant.THREE.contains(type) || Constant.FOUR.contains(type)) {
-//				dept = myuser.getDeptName();
-				organizationId = myuser.getUnitId();
-			} else if (Constant.SUB_BRANCH.contains(type)) {
-				dept = "";
-			} else if (myuser.getLoginName().equals("admin")) {
-				dept = "";
-				updateMark= true;
-			} else {
-				throw new CustomException("暂无权限");
-			}
-		}
-		List<OrganizationEvaluationInfoResDTO> list = baseMapper.selectListEvaluationInfoId(organizationEvaluationId,dept,"",organizationId);//默认获取指定的怎目标
-		boolean finalUpdateMark = updateMark;
+		List<OrganizationEvaluationInfoResDTO> list = baseMapper.selectListEvaluationInfoId(organizationEvaluationId,dept,"","");//默认获取指定的怎目标
 		list.stream().forEach(i->{
 			i.setUpdateMark(true);
 		});
@@ -171,27 +148,7 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
 
 	@Override
 	public List<OrganizationEvaluationInfoResDTO> finishValueList(String organizationEvaluationId, String dept, String organizationShortName, String indicatorName, String binSection,String isQuantified, HttpServletRequest request) {
-		MyuserResDTO myuser = userService.getSysUser(request);
-		if(null == myuser){
-			throw new CustomException("暂无权限");
-		}
-		String organizationId = "";
-		boolean updateMark = false;
-		if (null != myuser.getUnitOrg() && null != myuser.getUnitOrg().getParentIds()) {
-			String type = myuser.getUnitOrg().getType();
-			if (Constant.THREE.contains(type) || Constant.FOUR.contains(type)) {
-//				dept = myuser.getDeptName();
-				organizationId = myuser.getUnitId();
-			} else if (Constant.SUB_BRANCH.contains(type)) {
-				dept = "";
-			} else if (myuser.getLoginName().equals("admin")) {
-				dept = "";
-				updateMark= true;
-			} else {
-				throw new CustomException("暂无权限");
-			}
-		}
-		List<OrganizationEvaluationInfoResDTO> list = baseMapper.selectListEvaluationInfoId2(organizationEvaluationId,dept,organizationShortName,indicatorName,binSection,isQuantified,"",organizationId);//默认获取指定的怎目标
+		List<OrganizationEvaluationInfoResDTO> list = baseMapper.selectListEvaluationInfoId2(organizationEvaluationId,dept,organizationShortName,indicatorName,binSection,isQuantified,"","");//默认获取指定的怎目标
 		list.stream().forEach(i->{
 			i.setUpdateMark(true);
 		});

+ 34 - 0
ims-service/ims-eval/src/main/resources/mappers/MultipleBrandMapper.xml

@@ -18,6 +18,23 @@
                 <if test="parentId !=null and parentId !=''">
                     AND m.parent_id  = #{parentId}
                 </if>
+
+                <if test="binSection !=null and binSection !=''">
+                    AND m.bin_section  = #{binSection}
+                </if>
+
+                <if test="checkCycle !=null and checkCycle !=''">
+                    AND m.check_cycle  = #{checkCycle}
+                </if>
+
+                <if test="year !=null and year !=''">
+                    AND m.year  = #{year}
+                </if>
+
+                <if test="month !=null and month !=''">
+                    AND m.month  = #{month}
+                </if>
+
             </where>
 
 
@@ -41,6 +58,23 @@
                     AND m.parent_id  = #{parentId}
                 </if>
 
+                <if test="binSection !=null and binSection !=''">
+                    AND m.bin_section  = #{binSection}
+                </if>
+
+                <if test="checkCycle !=null and checkCycle !=''">
+                    AND m.check_cycle  = #{checkCycle}
+                </if>
+
+                <if test="year !=null and year !=''">
+                    AND m.year  = #{year}
+                </if>
+
+                <if test="month !=null and month !=''">
+                    AND m.month  = #{month}
+                </if>
+
+
             </where>
 
     </select>