zhoulisky il y a 9 mois
Parent
commit
e5af5606ff
42 fichiers modifiés avec 316 ajouts et 166 suppressions
  1. 2 1
      kd-ops/kd-resource/src/main/resources/application.yml
  2. 2 10
      kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/dto/AssetDTO.java
  3. 11 0
      kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/dto/CgQtDTO.java
  4. 19 0
      kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/dto/CgRjzzqDTO.java
  5. 9 11
      kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/dto/TechnicianDTO.java
  6. 8 13
      kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/dto/XmAssetQueryParam.java
  7. 9 10
      kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/dto/XmCqdtfyDTO.java
  8. 2 4
      kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/dto/XmDesignCostQuery.java
  9. 7 11
      kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/dto/XmGoodsDTO.java
  10. 6 10
      kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/dto/XmOtherCostQuery.java
  11. 2 2
      kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/entity/XmTechnicianEntity.java
  12. 8 6
      kd-service/kd-scientific/src/main/java/org/sky/scientific/controller/KYCGController.java
  13. 1 1
      kd-service/kd-scientific/src/main/java/org/sky/scientific/controller/XmDesignCostController.java
  14. 2 2
      kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/AssetMapper.xml
  15. 3 0
      kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/CgQtMapper.java
  16. 15 0
      kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/CgQtMapper.xml
  17. 9 0
      kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/CgRjzzqMapper.java
  18. 19 0
      kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/CgRjzzqMapper.xml
  19. 1 1
      kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/TechnicianMapper.xml
  20. 7 0
      kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmCqdtfyMapper.xml
  21. 6 0
      kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmDesignCostMapper.java
  22. 8 2
      kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmDesignCostMapper.xml
  23. 2 2
      kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmDirectCostMapper.xml
  24. 10 6
      kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmFixedAssetMapper.xml
  25. 1 1
      kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmGoodsMapper.xml
  26. 4 3
      kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmIntangibleAssetMapper.xml
  27. 2 0
      kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmMapper.java
  28. 18 13
      kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmMapper.xml
  29. 2 2
      kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmOtherCostMapper.xml
  30. 1 1
      kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmTechnicianHoursMapper.xml
  31. 29 8
      kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmTechnicianMapper.xml
  32. 4 0
      kd-service/kd-scientific/src/main/java/org/sky/scientific/service/ICgQtService.java
  33. 6 1
      kd-service/kd-scientific/src/main/java/org/sky/scientific/service/ICgRjzzqService.java
  34. 8 0
      kd-service/kd-scientific/src/main/java/org/sky/scientific/service/IXmDesignCostService.java
  35. 8 7
      kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/CgJsbzServiceImpl.java
  36. 8 7
      kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/CgKylwServiceImpl.java
  37. 15 7
      kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/CgQtServiceImpl.java
  38. 15 7
      kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/CgRjzzqServiceImpl.java
  39. 7 7
      kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/CgZlServiceImpl.java
  40. 3 3
      kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/XmAssetHoursServiceImpl.java
  41. 6 0
      kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/XmDesignCostServiceImpl.java
  42. 11 7
      kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/XmServiceImpl.java

+ 2 - 1
kd-ops/kd-resource/src/main/resources/application.yml

@@ -14,7 +14,8 @@ oss:
   #oss服务地址
   endpoint: http://116.62.106.199:9000
   #minio转换服务地址,用于内网上传后将返回地址改为转换的外网地址
-  transform-endpoint: http://47.99.150.200/oss/
+  transform-endpoint:
+#  http://47.99.150.200/oss/
   #访问key
   access-key: mcJxybRgTQ0TYHXqGADZ
   #密钥key

+ 2 - 10
kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/dto/AssetDTO.java

@@ -1,16 +1,12 @@
 
 package org.sky.scientific.pojo.dto;
 
-import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
-import org.sky.core.tool.utils.DateUtil;
 import org.sky.scientific.pojo.entity.AssetEntity;
-import org.springframework.format.annotation.DateTimeFormat;
 
 import java.io.Serial;
-import java.util.Date;
 
 /**
  * 资产表 数据传输对象实体类
@@ -25,14 +21,10 @@ public class AssetDTO extends AssetEntity {
 	private static final long serialVersionUID = 1L;
 
 	@Schema(description = "开始时间-min")
-	@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
-	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
-	private Date kssjMin;
+	private String kssjMin;
 
 	@Schema(description = "开始时间-max")
-	@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
-	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
-	private Date kssjMax;
+	private String kssjMax;
 
 	@Schema(description = "使用寿命-min")
 	private Integer sysmMin;

+ 11 - 0
kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/dto/CgQtDTO.java

@@ -1,6 +1,7 @@
 
 package org.sky.scientific.pojo.dto;
 
+import io.swagger.v3.oas.annotations.media.Schema;
 import org.sky.scientific.pojo.entity.CgQtEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -18,4 +19,14 @@ public class CgQtDTO extends CgQtEntity {
 	@Serial
 	private static final long serialVersionUID = 1L;
 
+	@Schema(description = "申请日期-min")
+	private String shenqingRqMix;
+	@Schema(description = "申请日期-max")
+	private String shenqingRqMax;
+
+	@Schema(description = "授权日期-min")
+	private String shouquanRqMix;
+	@Schema(description = "授权日期-min")
+	private String shouquanRqMax;
+
 }

+ 19 - 0
kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/dto/CgRjzzqDTO.java

@@ -1,6 +1,7 @@
 
 package org.sky.scientific.pojo.dto;
 
+import io.swagger.v3.oas.annotations.media.Schema;
 import org.sky.scientific.pojo.entity.CgRjzzqEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -18,4 +19,22 @@ public class CgRjzzqDTO extends CgRjzzqEntity {
 	@Serial
 	private static final long serialVersionUID = 1L;
 
+	@Schema(description = "开发完成时间-min")
+	private String kfwcrqMin;
+
+	@Schema(description = "开发完成时间-max")
+	private String kfwcrqMax;
+
+	@Schema(description = "首次发布时间-min")
+	private String scfbrqMin;
+
+	@Schema(description = "首次发布时间-max")
+	private String scfbrqMax;
+
+	@Schema(description = "登记批准日期-min")
+	private String djpzrqMin;
+
+	@Schema(description = "登记批准日期-max")
+	private String djpzrqMax;
+
 }

+ 9 - 11
kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/dto/TechnicianDTO.java

@@ -1,16 +1,12 @@
 
 package org.sky.scientific.pojo.dto;
 
-import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.v3.oas.annotations.media.Schema;
-import org.sky.core.tool.utils.DateUtil;
-import org.sky.scientific.pojo.entity.TechnicianEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
-import org.springframework.format.annotation.DateTimeFormat;
+import org.sky.scientific.pojo.entity.TechnicianEntity;
 
 import java.io.Serial;
-import java.util.Date;
 
 /**
  * 技术人员花名册 数据传输对象实体类
@@ -25,12 +21,14 @@ public class TechnicianDTO extends TechnicianEntity {
 	private static final long serialVersionUID = 1L;
 
 	@Schema(description = "入职时间-开始")
-	@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
-	@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
-	private Date hireDateMin;
+//	@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
+//	@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
+//	private Date hireDateMin;
+	private String hireDateMin;
 
 	@Schema(description = "入职时间-结束")
-	@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
-	@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
-	private Date hireDateMax;
+//	@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
+//	@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
+//	private Date hireDateMax;
+	private String hireDateMax;
 }

+ 8 - 13
kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/dto/XmAssetQueryParam.java

@@ -1,12 +1,7 @@
 package org.sky.scientific.pojo.dto;
 
-import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
-import org.sky.core.tool.utils.DateUtil;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.util.Date;
 
 @Data
 public class XmAssetQueryParam {
@@ -67,13 +62,13 @@ public class XmAssetQueryParam {
 	@Schema(description = "月研发工时(M),使用人当月该项目的研发总工时,大")
 	private Double workHoursMax;
 
-	@Schema(description = "折旧开始时间-小")
-	@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
-	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
-	private Date kssjMin;
-	@Schema(description = "折旧开始时间-大")
-	@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
-	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
-	private Date kssjMax;
+	@Schema(description = "开始时间-小")
+//	@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
+//	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
+	private String kssjMin;
+	@Schema(description = "开始时间-大")
+//	@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
+//	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
+	private String kssjMax;
 
 }

+ 9 - 10
kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/dto/XmCqdtfyDTO.java

@@ -1,14 +1,10 @@
 
 package org.sky.scientific.pojo.dto;
 
-import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
-import org.sky.core.tool.utils.DateUtil;
-import org.springframework.format.annotation.DateTimeFormat;
 
 import java.math.BigDecimal;
-import java.util.Date;
 
 /**
  * 长期待摊费用分配表 数据传输对象实体类
@@ -22,18 +18,21 @@ public class XmCqdtfyDTO {
 	@Schema(description = "研发项目名称")
 	private String xmmc;
 
+	@Schema(description = "长期待摊费用名称")
+	private String ctdtfymc;
+
 	@Schema(description = "用途")
 	private String yt;
 
 	@Schema(description = "摊销开始日期,min")
-	@DateTimeFormat(pattern = DateUtil.PATTERN_YYYYMM)
-	@JsonFormat(pattern = DateUtil.PATTERN_YYYYMM)
-	private Date txksrqStart;
+//	@DateTimeFormat(pattern = DateUtil.PATTERN_YYYYMM)
+//	@JsonFormat(pattern = DateUtil.PATTERN_YYYYMM)
+	private String txksrqStart;
 
 	@Schema(description = "摊销开始日期,max")
-	@DateTimeFormat(pattern = DateUtil.PATTERN_YYYYMM)
-	@JsonFormat(pattern = DateUtil.PATTERN_YYYYMM)
-	private Date txksrqEnd;
+//	@DateTimeFormat(pattern = DateUtil.PATTERN_YYYYMM)
+//	@JsonFormat(pattern = DateUtil.PATTERN_YYYYMM)
+	private String txksrqEnd;
 
 	@Schema(description = "已使用月数,min")
 	private Integer ysyysStart;

+ 2 - 4
kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/dto/XmDesignCostQuery.java

@@ -5,8 +5,6 @@ import io.swagger.v3.oas.annotations.media.Schema;
 import jakarta.validation.constraints.NotBlank;
 import lombok.Data;
 
-import java.util.Date;
-
 /**
  * 项目-设计费用、装备调试费用与试验费用基本信息台账 数据传输对象实体类
  *
@@ -36,8 +34,8 @@ public class XmDesignCostQuery{
 	private Double amountMax;
 
 	@Schema(description = "日期区间-小")
-	private Date recordDateMin;
+	private String recordDateMin;
 
 	@Schema(description = "日期区间-大")
-	private Date recordDateMax;
+	private String recordDateMax;
 }

+ 7 - 11
kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/dto/XmGoodsDTO.java

@@ -1,16 +1,12 @@
 
 package org.sky.scientific.pojo.dto;
 
-import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.v3.oas.annotations.media.Schema;
-import org.sky.core.tool.utils.DateUtil;
-import org.sky.scientific.pojo.entity.XmGoodsEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
-import org.springframework.format.annotation.DateTimeFormat;
+import org.sky.scientific.pojo.entity.XmGoodsEntity;
 
 import java.io.Serial;
-import java.util.Date;
 
 /**
  * 研发项目物料清单 数据传输对象实体类
@@ -31,12 +27,12 @@ public class XmGoodsDTO extends XmGoodsEntity {
 	private String xmbh;
 
 	@Schema(description = "领取/使用日期,小")
-	@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
-	@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
-	private Date dateMin;
+//	@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
+//	@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
+	private String dateMin;
 
 	@Schema(description = "领取/使用日期,大")
-	@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
-	@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
-	private Date dateMax;
+//	@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
+//	@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
+	private String dateMax;
 }

+ 6 - 10
kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/dto/XmOtherCostQuery.java

@@ -1,15 +1,11 @@
 
 package org.sky.scientific.pojo.dto;
 
-import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
-import org.sky.core.tool.utils.DateUtil;
-import org.springframework.format.annotation.DateTimeFormat;
 
 import java.io.Serial;
 import java.io.Serializable;
-import java.util.Date;
 
 /**
  * 项目-其他费用-基本信息台账 实体类
@@ -30,14 +26,14 @@ public class XmOtherCostQuery implements Serializable {
  	private String xmmc;
 
 	@Schema(description = "日期,小")
-	@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
-	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
-	private Date recordDateMin;
+//	@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
+//	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
+	private String recordDateMin;
 
 	@Schema(description = "日期,大")
-	@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
-	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
-	private Date recordDateMax;
+//	@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
+//	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
+	private String recordDateMax;
 
 	@Schema(description = "费用内容,会计科目中的其他费用(三级)中的四级科目id")
 	private Long subjectId;

+ 2 - 2
kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/entity/XmTechnicianEntity.java

@@ -61,11 +61,11 @@ public class XmTechnicianEntity extends TenantEntity {
 	@TableField(exist = false)
 	private String name;
 
-	@Schema(description = "所属二级单位")
+	@Schema(description = "所属二级单位部门/科室/项目部id")
 	@TableField(exist = false)
 	private Long departmentId;
 
-	@Schema(description = "部门/科室/项目部")
+	@Schema(description = "所属二级单位部门/科室/项目部")
 	@TableField(exist = false)
 	private String department;
 

+ 8 - 6
kd-service/kd-scientific/src/main/java/org/sky/scientific/controller/KYCGController.java

@@ -20,6 +20,8 @@ import org.sky.core.tool.api.R;
 import org.sky.core.tool.utils.DateUtil;
 import org.sky.core.tool.utils.Func;
 import org.sky.scientific.excel.*;
+import org.sky.scientific.pojo.dto.CgQtDTO;
+import org.sky.scientific.pojo.dto.CgRjzzqDTO;
 import org.sky.scientific.pojo.entity.*;
 import org.sky.scientific.pojo.vo.*;
 import org.sky.scientific.service.*;
@@ -113,9 +115,9 @@ public class KYCGController extends KdController {
 	@GetMapping("/rjzzq/list")
 	@ApiOperationSupport(order = 12)
 	@Operation(summary = "软件著作-分页", description  = "传入cgRjzzq")
-	public R<IPage<CgRjzzqVO>> rjzzqList(@Parameter(hidden = true) @RequestParam Map<String, Object> cgRjzzq, Query query) {
-		IPage<CgRjzzqEntity> pages = rjzzqService.page(Condition.getPage(query), Condition.getQueryWrapper(cgRjzzq, CgRjzzqEntity.class));
-		return R.data(CgRjzzqWrapper.build().pageVO(pages));
+	public R<IPage<CgRjzzqVO>> rjzzqList(CgRjzzqDTO dto, Query query) {
+		IPage<CgRjzzqVO> pages = rjzzqService.selectRjzzqPage(Condition.getPage(query), dto);
+		return R.data(pages);
 	}
 
 	@PostMapping("/rjzzq/save")
@@ -278,9 +280,9 @@ public class KYCGController extends KdController {
 	@GetMapping("/qt/list")
 	@ApiOperationSupport(order = 42)
 	@Operation(summary = "其他成果-分页", description  = "传入cgQt")
-	public R<IPage<CgQtVO>> qtList(@Parameter(hidden = true) @RequestParam Map<String, Object> cgQt, Query query) {
-		IPage<CgQtEntity> pages = qtService.page(Condition.getPage(query), Condition.getQueryWrapper(cgQt, CgQtEntity.class));
-		return R.data(CgQtWrapper.build().pageVO(pages));
+	public R<IPage<CgQtVO>> qtList(CgQtDTO dto, Query query) {
+		IPage<CgQtVO> pages = qtService.selectQtPage(Condition.getPage(query), dto);
+		return R.data(pages);
 	}
 
 	@PostMapping("/qt/save")

+ 1 - 1
kd-service/kd-scientific/src/main/java/org/sky/scientific/controller/XmDesignCostController.java

@@ -71,7 +71,7 @@ public class XmDesignCostController extends KdController {
 	@ApiOperationSupport(order = 7)
 	@Operation(summary = "删除", description  = "传入ids")
 	public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
-		return R.status(service.deleteLogic(Func.toLongList(ids)));
+		return R.status(service.physicalDeleteByIds(Func.toLongList(ids)));
 	}
 
 	@IsAdmin

+ 2 - 2
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/AssetMapper.xml

@@ -45,7 +45,7 @@
         where id = #{assetId}
     </update>
 
-    <select id="selectAssetPage" resultMap="ResultVoMap">
+    <select id="selectAssetPage" resultMap="ResultVoMap" parameterType="org.sky.scientific.pojo.dto.AssetDTO">
         SELECT
             t.*
         FROM kd_asset t
@@ -61,7 +61,7 @@
             <if test="ew.zcmc != null and ew.zcmc != ''">and t.zcmc like concat('%',#{ew.zcmc},'%')</if>
             <if test="ew.zclb != null and ew.zclb != ''">and t.zclb = #{ew.zclb}</if>
             <if test="ew.yt != null and ew.yt != ''">and t.yt = #{ew.yt}</if>
-            <if test="ew.kssjMin != null and ew.kssjMax != null">and t.kssj between #{ew.kssjMin} and #{ew.kssjMax}</if>
+            <if test="ew.kssjMin != null and ew.kssjMax != null">and DATE_FORMAT(t.kssj,'%Y-%m-%d') between #{ew.kssjMin} and #{ew.kssjMax}</if>
             <if test="ew.sysmMin != null and ew.sysmMax!=null">and t.SYSM between #{ew.sysmMin} and #{ew.sysmMax}</if>
             <if test="ew.status != null">and t.status = #{ew.status}</if>
         </where>

+ 3 - 0
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/CgQtMapper.java

@@ -1,6 +1,7 @@
 
 package org.sky.scientific.mapper;
 
+import org.sky.scientific.pojo.dto.CgQtDTO;
 import org.sky.scientific.pojo.entity.CgQtEntity;
 import org.sky.scientific.pojo.vo.CgQtVO;
 import org.sky.scientific.excel.CgQtExcel;
@@ -47,4 +48,6 @@ public interface CgQtMapper extends BaseMapper<CgQtEntity> {
 	 * @return
 	 */
     List<XmCGSummary> xmCgSummary(IPage<XmCGSummary> page, @Param("xmId") Long xmId);
+
+	List<CgQtVO> selectQtPage(IPage<CgQtVO> page, @Param("ew") CgQtDTO dto);
 }

+ 15 - 0
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/CgQtMapper.xml

@@ -50,6 +50,21 @@
         SELECT ZLMC as cgmc,ZLH as cgbh,SHENQING_RQ as date1,SHOUQUAN_RQ as date2, ZLLX as cglx FROM kd_cg_zl WHERE XM_ID = #{xmId}
     </select>
 
+    <select id="selectQtPage" resultType="org.sky.scientific.pojo.vo.CgQtVO" parameterType="org.sky.scientific.pojo.dto.CgQtDTO">
+        select
+            qt.*
+        from kd_cg_qt qt
+        <where>
+            <if test="ew.cgmc != null and ew.cgmc != ''">and qt.CGMC like concat('%',#{ew.cgmc},'%')</if>
+            <if test="ew.cgbh != null and ew.cgbh != ''">and qt.CGBH like concat('%',#{ew.cgbh},'%')</if>
+            <if test="ew.cmlx != null and ew.cmlx != ''">and qt.CMLX =#{ew.cmlx}</if>
+            <if test="ew.bbbm != null and ew.bbbm != ''">and qt.BBBM like concat('%',#{ew.bbbm},'%')</if>
+            <if test="ew.qlr != null and ew.qlr != ''">and qt.QLR like concat('%',#{ew.qlr},'%')</if>
+            <if test="ew.shenqingRqMix != null and ew.shenqingRqMax != ''">and date_format(qt.SHENQING_RQ,'%Y-%m-%d') between #{ew.shenqingRqMix} and #{ew.shenqingRqMax}</if>
+            <if test="ew.shouquanRqMix != null and ew.shouquanRqMax != ''">and date_format(qt.SHOUQUAN_RQ,'%Y-%m-%d') between #{ew.shouquanRqMix} and #{ew.shouquanRqMax}</if>
+        </where>
+    </select>
+
     <delete id="physicalDeleteByIds">
         DELETE FROM kd_cg_qt WHERE id IN
         <foreach item="id" collection="list" separator="," open="(" close=")">

+ 9 - 0
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/CgRjzzqMapper.java

@@ -2,6 +2,7 @@
 package org.sky.scientific.mapper;
 
 import org.sky.core.tenant.annotation.TenantIgnore;
+import org.sky.scientific.pojo.dto.CgRjzzqDTO;
 import org.sky.scientific.pojo.entity.CgRjzzqEntity;
 import org.sky.scientific.pojo.vo.CgRjzzqVO;
 import org.sky.scientific.excel.CgRjzzqExcel;
@@ -41,4 +42,12 @@ public interface CgRjzzqMapper extends BaseMapper<CgRjzzqEntity> {
 
 	@TenantIgnore
 	Long countByYear(@Param("year") String year, @Param("tenantId") String tenantId);
+
+	/**
+	 * 分页
+	 * @param page
+	 * @param dto
+	 * @return
+	 */
+	IPage<CgRjzzqVO> selectRjzzqPage(IPage<CgRjzzqVO> page, @Param("ew") CgRjzzqDTO dto);
 }

+ 19 - 0
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/CgRjzzqMapper.xml

@@ -43,6 +43,25 @@
         select ifnull(count(*),0) from kd_cg_rjzzq where DJPZRQ is not null and left(DJPZRQ,4) = #{year} and tenant_id = #{tenantId}
     </select>
 
+    <select id="selectRjzzqPage" resultType="org.sky.scientific.pojo.vo.CgRjzzqVO">
+        SELECT
+            r.*
+        FROM kd_cg_rjzzq r
+        <where>
+            <if test="ew.rjmc !=null and ew.rjmc!=''">and r.RJMC like concat('%',#{ew.rjmc},'%')</if>
+            <if test="ew.rjjc !=null and ew.rjjc!=''">and r.RJJC like concat('%',#{ew.rjjc},'%')</if>
+            <if test="ew.bbh !=null and ew.bbh!=''">and r.BBH like concat('%',#{ew.bbh},'%')</if>
+            <if test="ew.djh !=null and ew.djh!=''">and r.DJH like concat('%',#{ew.djh},'%')</if>
+            <if test="ew.qdfs !=null and ew.qdfs!=''">and r.QDFS =#{ew.qdfs}</if>
+            <if test="ew.xmmc !=null and ew.xmmc!=''">and r.XMMC like concat('%',#{ew.xmmc},'%')</if>
+            <if test="ew.xmbh !=null and ew.xmbh!=''">and r.XMBH like concat('%',#{ew.xmbh},'%')</if>
+            <if test="ew.kfwcrqMin !=null and ew.kfwcrqMax!=''">and date_format(r.kfwcrq,'%Y-%m-%d') between #{ew.kfwcrqMin} and #{ew.kfwcrqMax}</if>
+            <if test="ew.scfbrqMin !=null and ew.scfbrqMax!=''">and date_format(r.scfbrq,'%Y-%m-%d') between #{ew.scfbrqMin} and #{ew.scfbrqMax}</if>
+            <if test="ew.djpzrqMin !=null and ew.djpzrqMax!=''">and date_format(r.djpzrq,'%Y-%m-%d') between #{ew.djpzrqMin} and #{ew.djpzrqMax}</if>
+
+        </where>
+    </select>
+
     <delete id="physicalDeleteByIds">
         DELETE FROM kd_cg_rjzzq WHERE id IN
         <foreach item="item" index="index" collection="list" separator="," open="(" close=")">

+ 1 - 1
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/TechnicianMapper.xml

@@ -73,7 +73,7 @@
         <if test="ew.personnelType!=null and ew.personnelType!=''">and personnel_type = #{ew.personnelType}</if>
         <if test="ew.situation !=null and ew.situation!=''">and situation = #{ew.situation}</if>
         <if test="ew.practicingRequirement !=null and ew.practicingRequirement!=''">and practicing_requirement like concat(concat('%', #{ew.practicingRequirement}), '%')</if>
-        <if test="ew.hireDateMin!=null and ew.hireDateMax!=''">and hire_Date between #{ew.hireDateMin} and #{ew.hireDateMax}</if>
+        <if test="ew.hireDateMin!=null and ew.hireDateMax!=''">and date_format(hire_Date,'%Y-%m-%d') between #{ew.hireDateMin} and #{ew.hireDateMax}</if>
         order by year_and_month asc, id asc
     </select>
 

+ 7 - 0
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmCqdtfyMapper.xml

@@ -55,6 +55,13 @@
             WHERE xm.is_deleted = 0
         ) xm on xm.id = c.xm_id
         where left(c.year_and_month,6 ) = #{ew.yearAndMonth}
+        <if test="ew.xmmc != null and ew.xmmc != ''">and xm.xmmc like concat('%',#{ew.xmmc},'%')</if>
+        <if test="ew.ctdtfymc != null and ew.ctdtfymc != ''">and c.ctdtfybm like concat('%',#{ew.ctdtfymc},'%')</if>
+        <if test="ew.yt != null and ew.yt != ''">and c.yt #{ew.yt}</if>
+        <if test="ew.txksrqStart != null and ew.txksrqEnd">and DATE_FORMAT(c.txksrq,'%Y-%m-%d')  between #{ew.txksrqStart} and #{ew.txksrqEnd}</if>
+        <if test="ew.ysyysStart != null and ew.ysyysEnd!= null">and c.ysyys between #{ew.ysyysStart} and #{ew.ysyysEnd}</if>
+        <if test="ew.zcyzStart != null and ew.zcyzEnd!= null">and c.zcyz between #{ew.zcyzStart} and #{ew.zcyzEnd}</if>
+        <if test="ew.yzjeStart != null and ew.yzjeEnd!= null">and c.yzje between #{ew.yzjeStart} and #{ew.yzjeEnd}</if>
     </select>
 
     <select id="exportXmCqdtfy" resultType="org.sky.scientific.excel.XmCqdtfyExcel">

+ 6 - 0
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmDesignCostMapper.java

@@ -37,4 +37,10 @@ public interface XmDesignCostMapper extends BaseMapper<XmDesignCostEntity> {
 	 */
 	List<XmDesignCostExcel> exportXmDesignCost(@Param("ew") Wrapper<XmDesignCostEntity> queryWrapper);
 
+	/**
+	 * 批量逻辑删除
+	 * @param ids
+	 * @return
+	 */
+    int physicalDeleteByIds(List<Long> ids);
 }

+ 8 - 2
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmDesignCostMapper.xml

@@ -23,8 +23,14 @@
         <result column="is_deleted" property="isDeleted"/>
     </resultMap>
 
+    <delete id="physicalDeleteByIds">
+        DELETE FROM kd_xm_design_cost WHERE id IN
+        <foreach item="item" collection="list" separator="," open="(" close=")">
+            #{item}
+        </foreach>
+    </delete>
 
-    <select id="selectXmDesignCostPage" resultMap="ResultMap" resultType="org.sky.scientific.pojo.dto.XmDesignCostQuery">
+    <select id="selectXmDesignCostPage" resultMap="ResultMap" parameterType="org.sky.scientific.pojo.dto.XmDesignCostQuery">
         select
             dc.*, xm.XMMC, xm.XMBH
         from kd_xm_design_cost dc
@@ -50,7 +56,7 @@
                 and dc.amount between #{ew.amountMin} and #{ew.amountMax}
             </if>
             <if test="ew.recordDateMin!=null and ew.recordDateMax!=null">
-                and dc.record_date between #{ew.recordDateMin} and #{ew.recordDateMax}
+                and date_format(dc.record_date,'%Y-%m-%d') between #{ew.recordDateMin} and #{ew.recordDateMax}
             </if>
         </where>
     </select>

+ 2 - 2
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmDirectCostMapper.xml

@@ -50,7 +50,7 @@
         <if test="ew.type!=null and ew.type!=''">and xm.type = #{ew.type}</if>
     </select>
 
-    <select id="tourufeiyonghuizongbiao" resultType="com.alibaba.fastjson.JSONObject" >
+    <select id="tourufeiyonghuizongbiao" resultType="com.alibaba.fastjson.JSONObject" parameterType="org.sky.scientific.pojo.entity.XmDirectCostEntity">
         SELECT
         id,
         XMBH,
@@ -67,7 +67,7 @@
         (SELECT IFNULL(sum(amount),0) FROM kd_xm_direct_cost xdc WHERE xm_id=xm.id and xdc.year_and_month=#{yearAndMonth} and xdc.type ='3') as fy8
         FROM kd_xm xm
         where #{yearAndMonth} between DATE_FORMAT(XMKSSJ, '%Y%m') and DATE_FORMAT(XMJSSJ,'%Y%m')
-        <if test="xmmc!=null">and XMMC like concat('%',#{xmmc},'%')</if>
+        <if test="xmmc!=null">and xm.XMMC like concat('%',#{xmmc},'%')</if>
     </select>
 
     <select id="tourufeiyonghuizongbiaoByYear" resultType="com.alibaba.fastjson.JSONObject" >

+ 10 - 6
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmFixedAssetMapper.xml

@@ -89,7 +89,8 @@
     </resultMap>
 
     <select id="keyanyiqishebeizhejiufeiyongfenpeibiao"
-            resultMap="XmFixedAssetCostVo">
+            resultMap="XmFixedAssetCostVo"
+            parameterType="org.sky.scientific.pojo.dto.XmAssetQueryParam">
         SELECT xm.XMBH, xm.XMMC,
             v1.xm_id, v1.asset_id, v1.year_and_month,
             v1.ZCBM as 'asset.ZCBM' , v1.ZCMC as 'asset.ZCMC', v1.ZCLB as 'asset.ZCLB' , v1.YT as 'asset.YT',  v1.ZCYZ as 'asset.ZCYZ', v1.JCZ as 'asset.JCZ' , v1.YZJE as 'asset.YZJE', v1.zgs as 'asset.ZGS',
@@ -110,14 +111,17 @@
         <if test="ew.zcmc!=null and ew.zcmc!=''">and zcmc like concat('%',#{ew.zcmc},'%')</if>
         <if test="ew.zclb!=null and ew.zclb!=''">and zclb like concat('%',#{ew.zclb},'%')</if>
         <if test="ew.yt!=null and ew.yt!=''">and yt like concat('%',#{ew.yt},'%')</if>
-        <if test="ew.kssjMin!=null and ew.kssjMax!=''">and kssj between #{ew.kssjMin} and #{ew.jssjEnd}</if>
+        <if test="ew.kssjMin!=null and ew.kssjMax!=''">and DATE_FORMAT(kssj,'%Y-%m-%d') between #{ew.kssjMin} and #{ew.jssjEnd}</if>
         <if test="ew.zcyzMin!=null and ew.zcyzMax!=null">and zcyz between #{ew.zcyzMin} and #{ew.zcyzMax}</if>
         <if test="ew.jczMin!=null and ew.jczMax!=null">and jcz between #{ew.jczMin} and #{ew.jczMax}</if>
-        <if test="ew.yzjeMin!=null and ew.yzjeMax!=null">and jzje between #{ew.yzjeMin} and #{ew.yzjeMax}</if>
+        <if test="ew.yzjeMin!=null and ew.yzjeMax!=null">and yzje between #{ew.yzjeMin} and #{ew.yzjeMax}</if>
+        <if test="ew.attendanceHoursMin!=null and ew.attendanceHoursMax!=null">and v1.zgs between #{ew.attendanceHoursMin} and #{ew.attendanceHoursMax}</if>
+        <if test="ew.workHoursMin!=null and ew.workHoursMax!=null">and v1.work_hours between #{ew.workHoursMin} and #{ew.workHoursMax}</if>
     </select>
 
     <select id="keyanfangwujianzhuwuzhejiufeiyongfenpeibiao"
-            resultMap="XmFixedAssetCostVo">
+            resultMap="XmFixedAssetCostVo"
+            parameterType="org.sky.scientific.pojo.dto.XmAssetQueryParam">
         SELECT
             xa.id,xa.xm_id, xa.asset_id, xm.XMBH, xm.XMMC,
             asset.ZCBM as 'asset.ZCBM' ,asset.ZCMC as 'asset.ZCMC' ,asset.ZCLB as 'asset.ZCLB',
@@ -140,10 +144,10 @@
         <if test="ew.zcmc!=null and ew.zcmc!=''">and asset.zcmc like concat('%',#{ew.zcmc},'%')</if>
         <if test="ew.zclb!=null and ew.zclb!=''">and asset.zclb like concat('%',#{ew.zclb},'%')</if>
         <if test="ew.yt!=null and ew.yt!=''">and asset.yt like concat('%',#{ew.yt},'%')</if>
-        <if test="ew.kssjMin!=null and ew.kssjMax!=''">and asset.kssj between #{ew.kssjMin} and #{ew.jssjEnd}</if>
+        <if test="ew.kssjMin!=null and ew.kssjMax!=''">and DATE_FORMAT(asset.kssj,'%Y-%m-%d') between #{ew.kssjMin} and #{ew.jssjEnd}</if>
         <if test="ew.zcyzMin!=null and ew.zcyzMax!=null">and asset.zcyz between #{ew.zcyzMin} and #{ew.zcyzMax}</if>
         <if test="ew.jczMin!=null and ew.jczMax!=null">and asset.jcz between #{ew.jczMin} and #{ew.jczMax}</if>
-        <if test="ew.yzjeMin!=null and ew.yzjeMax!=null">and asset.jzje between #{ew.yzjeMin} and #{ew.yzjeMax}</if>
+        <if test="ew.yzjeMin!=null and ew.yzjeMax!=null">and asset.yzje between #{ew.yzjeMin} and #{ew.yzjeMax}</if>
     </select>
 
     <delete id="physicalDeleteByIds">

+ 1 - 1
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmGoodsMapper.xml

@@ -74,7 +74,7 @@
           <if test="xmmc!=null">and xm.xmmc like concat('%',#{xmmc},'%')</if>
           <if test="name!=null">and xg.name like concat('%',#{name},'%')</if>
           <if test="model!=null">and xg.model like concat('%',#{model},'%')</if>
-          <if test="dateMin!=null and dateMax!=null">and xg.use_date between #{dateMin} and #{dateMax}</if>
+          <if test="dateMin!=null and dateMax!=null">and date_format(xg.use_date,'%Y-%m-%d') between #{dateMin} and #{dateMax}</if>
     </select>
 
 </mapper>

+ 4 - 3
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmIntangibleAssetMapper.xml

@@ -25,7 +25,7 @@
         SELECT xa.*,asset.zcbm,t.name as user_name
         FROM kd_xm_intangible_asset xa
         inner JOIN kd_asset asset ON xa.ZCBM=asset.ZCBM and asset.year_and_month = #{yearAndMonth}
-        LEFT JOIN kd_technician t on t.unicode=xa.user_unicode and t.year_and_month = #{ew.yearAndMonth}
+        LEFT JOIN kd_technician t on t.unicode=xa.user_unicode and t.year_and_month = #{yearAndMonth}
         LEFT JOIN
         (
             SELECT
@@ -89,7 +89,8 @@
         <result column="yanfaTanXiao" property="yanfaTanXiao"/>
     </resultMap>
     <select id="keyanwuxingzichantanxiaofeiyongfenpeibiao"
-            resultMap="XmIntangibleAssetCostVo">
+            resultMap="XmIntangibleAssetCostVo"
+            parameterType="org.sky.scientific.pojo.dto.XmAssetQueryParam">
         SELECT
             v1.xm_id, xm.xmmc, xm.xmbh,
             v1.asset_id, ZCBM as 'asset.ZCBM',ZCMC as 'asset.ZCMC', ZCLB as 'asset.ZCLB', GL as 'asset.GL',YT as 'asset.YT',ZCYZ as 'asset.ZCYZ',JCZ as 'asset.JCZ',YZJE as 'asset.YZJE',
@@ -110,7 +111,7 @@
         <if test="ew.yt!=null and ew.yt!=''">and v1.yt like concat('%',#{ew.yt},'%')</if>
         <if test="ew.zcyzMin!=null and ew.zcyzMax!=null">and v1.zcyz between #{ew.zcyzMin} and #{ew.zcyzMax}</if>
         <if test="ew.jczMin!=null and ew.jczMax!=null">and v1.jcz between #{ew.jczMin} and #{ew.jczMax}</if>
-        <if test="ew.yzjeMin!=null and ew.yzjeMax!=null">and v1.jzje between #{ew.yzjeMin} and #{ew.yzjeMax}</if>
+        <if test="ew.yzjeMin!=null and ew.yzjeMax!=null">and v1.yzje between #{ew.yzjeMin} and #{ew.yzjeMax}</if>
         <if test="ew.attendanceHoursMin!=null and ew.attendanceHoursMax!=null">and v1.attendanceHours between #{ew.attendanceHoursMin} and #{ew.attendanceHoursMax}</if>
         <if test="ew.workHoursMin!=null and ew.workHoursMax!=null">and v1.workHours between #{ew.workHoursMin} and #{ew.workHoursMax}</if>
     </select>

+ 2 - 0
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmMapper.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.apache.ibatis.annotations.Param;
+import org.sky.core.tenant.annotation.TenantIgnore;
 import org.sky.scientific.excel.XmExcel;
 import org.sky.scientific.pojo.dto.XmDTO;
 import org.sky.scientific.pojo.dto.XmUpdateDto;
@@ -57,6 +58,7 @@ public interface XmMapper extends BaseMapper<XmEntity> {
 	 * @param xm 查询参数
 	 * @return List<XmVO>
 	 */
+	@TenantIgnore
 	List<XmSummary> summaryPage(IPage<XmSummary> page, @Param("ew") XmDTO xm);
 
 	/**

+ 18 - 13
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmMapper.xml

@@ -77,13 +77,15 @@
 
     <select id="summaryPage" resultType="org.sky.scientific.pojo.vo.XmSummary">
         SELECT
-            xm.id, xm.XMBH,
-            COALESCE( (SELECT bgrz.BGHDZ FROM kd_xm_bgrz bgrz WHERE bgrz.XM_ID = xm.id AND bgrz.ZDMC = 'xmmc' AND DATE_FORMAT(bgrz.BGSXSJ, '%Y%m') <![CDATA[<=]]> #{ew.yearAndMonth} ORDER BY bgrz.BGSXSJ DESC LIMIT 1), xm.XMMC ) AS XMMC,
-            COALESCE( (SELECT bgrz.BGHDZ FROM kd_xm_bgrz bgrz WHERE bgrz.XM_ID = xm.id AND bgrz.ZDMC = 'XMFZR' AND DATE_FORMAT(bgrz.BGSXSJ, '%Y%m') <![CDATA[<=]]> #{ew.yearAndMonth} ORDER BY bgrz.BGSXSJ DESC LIMIT 1),xm.XMFZR) AS XMFZR,
-            COALESCE( (SELECT bgrz.BGHDZ FROM kd_xm_bgrz bgrz WHERE bgrz.XM_ID = xm.id AND bgrz.ZDMC = 'XMSQDWID' AND DATE_FORMAT(bgrz.BGSXSJ, '%Y%m') <![CDATA[<=]]> #{ew.yearAndMonth} ORDER BY bgrz.BGSXSJ DESC LIMIT 1),xm.XMSQDWID) AS XMSQDWID,
-            xm.XMKSSJ,
-            COALESCE( (SELECT bgrz.BGHDZ FROM kd_xm_bgrz bgrz WHERE bgrz.XM_ID = xm.id AND bgrz.ZDMC = 'XMJSSJ' AND DATE_FORMAT(bgrz.BGSXSJ, '%Y%m') <![CDATA[<=]]> #{ew.yearAndMonth} ORDER BY bgrz.BGSXSJ DESC LIMIT 1),xm.XMJSSJ) AS XMJSSJ,
-            COALESCE( (SELECT bgrz.BGHDZ FROM kd_xm_bgrz bgrz WHERE bgrz.XM_ID = xm.id AND bgrz.ZDMC = 'XMYSZEMX' AND DATE_FORMAT(bgrz.BGSXSJ, '%Y%m') <![CDATA[<=]]> #{ew.yearAndMonth} ORDER BY bgrz.BGSXSJ DESC LIMIT 1),xm.XMYSZEMX) AS XMYSZEMX,
+            xm.id, xm.xmbh,
+            COALESCE( (SELECT bgrz.BGHDZ FROM kd_xm_bgrz bgrz WHERE bgrz.XM_ID = xm.id AND bgrz.ZDMC = 'xmmc' AND DATE_FORMAT(bgrz.BGSXSJ, '%Y%m') <![CDATA[<=]]> #{ew.yearAndMonth} ORDER BY bgrz.BGSXSJ DESC LIMIT 1), xm.XMMC ) AS xmmc,
+            COALESCE( (SELECT BGHDZ FROM kd_xm_bgrz  WHERE XM_ID = xm.id AND ZDMC = 'XMFZR' AND DATE_FORMAT(BGSXSJ, '%Y%m') <![CDATA[<=]]> #{ew.yearAndMonth} ORDER BY BGSXSJ DESC LIMIT 1), xm.XMFZR) as xmfzr,
+            tech.name AS xmfzrxm,
+            COALESCE( (SELECT bgrz.BGHDZ FROM kd_xm_bgrz bgrz WHERE bgrz.XM_ID = xm.id AND bgrz.ZDMC = 'XMSQDWID' AND DATE_FORMAT(bgrz.BGSXSJ, '%Y%m') <![CDATA[<=]]> #{ew.yearAndMonth} ORDER BY bgrz.BGSXSJ DESC LIMIT 1),xm.XMSQDWID) AS xmsqdwid,
+            CONCAT_WS('/',(SELECT name FROM kd_department d2 WHERE d2.id = d.parent_id), d.`name`) as xmsqdw,
+            xm.xmkssj,
+            COALESCE( (SELECT bgrz.BGHDZ FROM kd_xm_bgrz bgrz WHERE bgrz.XM_ID = xm.id AND bgrz.ZDMC = 'XMJSSJ' AND DATE_FORMAT(bgrz.BGSXSJ, '%Y%m') <![CDATA[<=]]> #{ew.yearAndMonth} ORDER BY bgrz.BGSXSJ DESC LIMIT 1),xm.XMJSSJ) AS xmjssj,
+            COALESCE( (SELECT bgrz.BGHDZ FROM kd_xm_bgrz bgrz WHERE bgrz.XM_ID = xm.id AND bgrz.ZDMC = 'XMYSZEMX' AND DATE_FORMAT(bgrz.BGSXSJ, '%Y%m') <![CDATA[<=]]> #{ew.yearAndMonth} ORDER BY bgrz.BGSXSJ DESC LIMIT 1),xm.XMYSZEMX) AS xmyszemx,
             COALESCE( (SELECT bgrz.BGHDZ FROM kd_xm_bgrz bgrz WHERE bgrz.XM_ID = xm.id AND bgrz.ZDMC = 'STATUS' AND DATE_FORMAT(bgrz.BGSXSJ, '%Y%m') <![CDATA[<=]]> #{ew.yearAndMonth} ORDER BY bgrz.BGSXSJ DESC LIMIT 1),xm.status) AS status,
             LXBG as lxbg,
             (select count(*) from kd_xm_jdxbg jdxbg where jdxbg.xm_id = xm.id and date_format(jdxbg.fill_date,'%Y%m') between concat(left(#{ew.yearAndMonth},4),'01') and #{ew.yearAndMonth}) as jdxbgCount,
@@ -96,12 +98,14 @@
             (select count(*) from kd_cg_qt qt where qt.xm_id = xm.id  and date_format(qt.SHOUQUAN_RQ,'%Y%m') between concat(left(#{ew.yearAndMonth},4),'01') and #{ew.yearAndMonth}) as qtCount,
             (select ifnull(sum(WWFYJE), 0) from kd_xm_wwxm ww where ww.XM_ID = xm.id and ww.year_and_month = left(#{ew.yearAndMonth}, 4)) as wwAmount
         FROM kd_xm xm
-        WHERE DATE_FORMAT(xm.XMKSSJ, '%Y%m') <![CDATA[<=]]> #{ew.yearAndMonth}
-        <if test="ew.XMBH!=null and ew.XMBH!=''">and xm.XMBH like concat('%',#{ew.XMBH},'%')</if>
-        <if test="ew.XMMC!=null and ew.XMMC!=''">and xm.XMMC like concat('%',#{ew.XMMC},'%')</if>
-        <if test="ew.XMFZR!=null and ew.XMFZR!=''">and xm.XMFZR = #{ew.XMFZR}</if>
-        <if test="ew.XMSQDW!=null and ew.XMSQDW!=''">and xm.XMSQDW like concat('%',#{ew.XMSQDW},'%')</if>
-        <if test="ew.status!=null">and xm.status = #{ew.status}</if>
+        LEFT JOIN kd_technician tech ON tech.id = COALESCE( (SELECT BGHDZ FROM kd_xm_bgrz  WHERE XM_ID = xm.id AND ZDMC = 'XMFZR' AND DATE_FORMAT(BGSXSJ, '%Y%m') <![CDATA[<=]]> #{ew.yearAndMonth} ORDER BY BGSXSJ DESC LIMIT 1), xm.XMFZR)
+        LEFT JOIN kd_department d on d.id = COALESCE( (SELECT bgrz.BGHDZ FROM kd_xm_bgrz bgrz WHERE bgrz.XM_ID = xm.id AND bgrz.ZDMC = 'XMSQDWID' AND DATE_FORMAT(bgrz.BGSXSJ, '%Y%m')  <![CDATA[<=]]> #{ew.yearAndMonth} ORDER BY bgrz.BGSXSJ DESC LIMIT 1),xm.XMSQDWID)
+        WHERE xm.tenant_id = #{ew.tenantId} and DATE_FORMAT(xm.XMKSSJ, '%Y%m') <![CDATA[<=]]> #{ew.yearAndMonth}
+        <if test="ew.xmbh!=null and ew.xmbh!=''">and xm.XMBH like concat('%',#{ew.xmbh},'%')</if>
+        <if test="ew.xmmc!=null and ew.xmmc!=''">and COALESCE( (SELECT bgrz.BGHDZ FROM kd_xm_bgrz bgrz WHERE bgrz.XM_ID = xm.id AND bgrz.ZDMC = 'xmmc' AND DATE_FORMAT(bgrz.BGSXSJ, '%Y%m') <![CDATA[<=]]> #{ew.yearAndMonth} ORDER BY bgrz.BGSXSJ DESC LIMIT 1), xm.XMMC ) like concat('%',#{ew.xmmc},'%')</if>
+        <if test="ew.xmfzrxm!=null and ew.xmfzrxm!=''">and tech.name like concat('%', #{ew.xmfzrxm},'%')</if>
+        <if test="ew.xmsqdw!=null and ew.xmsqdw!=''">and CONCAT_WS('/',(SELECT name FROM kd_department d2 WHERE d2.id = d.parent_id), d.`name`) like concat('%',#{ew.xmsqdw},'%')</if>
+        <if test="ew.status!=null">and COALESCE( (SELECT bgrz.BGHDZ FROM kd_xm_bgrz bgrz WHERE bgrz.XM_ID = xm.id AND bgrz.ZDMC = 'STATUS' AND DATE_FORMAT(bgrz.BGSXSJ, '%Y%m') <![CDATA[<=]]> #{ew.yearAndMonth} ORDER BY bgrz.BGSXSJ DESC LIMIT 1),xm.status) = #{ew.status}</if>
     </select>
 
     <select id="selectYszb" resultType="org.sky.scientific.pojo.vo.XmYszbVO">
@@ -149,6 +153,7 @@
             COALESCE( (SELECT bgrz.BGHDZ FROM kd_xm_bgrz bgrz WHERE bgrz.XM_ID = xm.id AND bgrz.ZDMC = 'XMSQDWID' and bgrz.BGSXSJ <![CDATA[<=]]> now() ORDER BY bgrz.BGSXSJ DESC LIMIT 1),xm.XMSQDWID) AS XMSQDWID,
             xm.XMKSSJ,
             COALESCE( (SELECT bgrz.BGHDZ FROM kd_xm_bgrz bgrz WHERE bgrz.XM_ID = xm.id AND bgrz.ZDMC = 'XMJSSJ' and bgrz.BGSXSJ <![CDATA[<=]]> now() ORDER BY bgrz.BGSXSJ DESC LIMIT 1),XMJSSJ) AS XMJSSJ,
+            COALESCE( (SELECT bgrz.BGHDZ FROM kd_xm_bgrz bgrz WHERE bgrz.XM_ID = xm.id AND bgrz.ZDMC = 'STATUS' and bgrz.BGSXSJ <![CDATA[<=]]> now() ORDER BY bgrz.BGSXSJ DESC LIMIT 1),STATUS) AS STATUS,
             YJLX,
             XMLY,
             XMKZXS,

+ 2 - 2
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmOtherCostMapper.xml

@@ -51,8 +51,8 @@
                 and xoc.subject_id = #{ew.subjectId}
             </if>
             <if test="ew.recordDateMin!=null and ew.recordDateMax!=null">
-                and xoc.record_date between #{ew.recordDateMin} and #{ew.recordDateMax}
-            </if>
+                and date_format(xoc.record_date,'%Y-%m-%d') between #{ew.recordDateMin} and #{ew.recordDateMax}
+             </if>
         </where>
     </select>
 

+ 1 - 1
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmTechnicianHoursMapper.xml

@@ -127,7 +127,7 @@
         <if test="ew.name!=null and ew.name!=''">and t.name like concat(concat('%', #{ew.name}), '%')</if>
         <if test="ew.number!=null and ew.number!=''">and t.number like concat(concat('%', #{ew.number}), '%')</if>
         <if test="ew.idCard!=null and ew.idCard!=''">and t.id_card like concat(concat('%', #{ew.idCard}), '%')</if>
-        <if test="ew.personnelType!=null and ew.personnelType!=''">and t.personnel_type =#{ew.personnelType})</if>
+        <if test="ew.personnelType!=null and ew.personnelType!=''">and t.personnel_type =#{ew.personnelType}</if>
      </select>
 
     <select id="selectDailyHoursByUnicodeAndMonth" resultType="org.sky.scientific.pojo.vo.DailyHours">

+ 29 - 8
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/XmTechnicianMapper.xml

@@ -56,7 +56,8 @@
     </delete>
 
     <select id="meiyueshijicanyuanrenyuanmingdan"
-            resultMap="ResultMap">
+            resultMap="ResultMap"
+            parameterType="org.sky.scientific.pojo.dto.XmTechnicianDto">
         SELECT
         xt.id,
         xm.*,
@@ -69,11 +70,13 @@
             FROM kd_xm temp
         ) xm ON xt.xm_id = xm.xm_id
         WHERE xt.year_and_month = #{ew.yearAndMonth}
-        <if test="ew.xmId!=null and ew.xmId>0">and xm.xm_id in
-            <foreach collection="ew.xmList" item="xm" open="(" separator="," close=")">
-                #{xm.id}
-            </foreach>
-        </if>
+        <if test="ew.xmmc!=null and ew.xmmc!=''">and xm.XMMC like concat('%',#{ew.xmmc},'%')</if>
+        <if test="ew.name!=null and ew.name!=''">and t.name like concat('%',#{ew.name},'%')</if>
+        <if test="ew.number!=null and ew.number!=''">and t.number like concat('%',#{ew.number},'%')</if>
+        <if test="ew.idCard!=null and ew.idCard!=''">and t.id_card like concat('%',#{ew.idCard},'%')</if>
+        <if test="ew.department!=null and ew.department!=''">and t.department like concat('%',#{ew.department},'%')</if>
+        <if test="ew.nature!=null and ew.nature!=''">and t.nature = #{ew.nature}</if>
+        <if test="ew.situation!=null and ew.situation!=''">and t.situation = #{ew.situation}</if>
     </select>
 
     <resultMap id="ResultXmTechnicianSummary" type="org.sky.scientific.pojo.vo.XmTechnicianSummary">
@@ -95,7 +98,8 @@
     </resultMap>
 
     <select id="xmTechnicianSummaryByMonthly"
-            resultMap="ResultXmTechnicianSummary">
+            resultMap="ResultXmTechnicianSummary"
+            parameterType="org.sky.scientific.pojo.entity.XmTechnicianEntity">
         SELECT
         xm.XMMC,
         t.unicode,t.name, t.number,t.id_card,t.department_id,t.department,t.post,t.post_location,t.nature,t.situation,t.personnel_type,t.year_and_month
@@ -108,12 +112,21 @@
         ) xm ON m.xm_id = xm.xm_id
         WHERE m.year_and_month = #{ew.yearAndMonth}
         <if test="ew.xmmc!=null and ew.xmmc!=''">and xm.XMMC like concat('%',#{ew.xmmc},'%')</if>
+        <if test="ew.name!=null and ew.name!=''">and t.name like concat('%',#{ew.name},'%')</if>
+        <if test="ew.number!=null and ew.number!=''">and t.number like concat('%',#{ew.number},'%')</if>
+        <if test="ew.idCard!=null and ew.idCard!=''">and t.id_card like concat('%',#{ew.idCard},'%')</if>
+        <if test="ew.department!=null and ew.department!=''">and t.department like concat('%',#{ew.department},'%')</if>
+        <if test="ew.post!=null and ew.post!=''">and t.post like concat('%',#{ew.post},'%')</if>
+        <if test="ew.nature!=null and ew.nature!=''">and t.nature = #{ew.nature}</if>
+        <if test="ew.situation!=null and ew.situation!=''">and t.situation = #{ew.situation}</if>
+        <if test="ew.personnelType!=null and ew.personnelType!=''">and t.personnel_type = #{ew.personnelType}</if>
         GROUP BY xm.XMMC,m.id
     </select>
 
 
     <select id="xmTechnicianSummaryByYear"
-            resultMap="ResultXmTechnicianSummary">
+            resultMap="ResultXmTechnicianSummary"
+            parameterType="org.sky.scientific.pojo.entity.XmTechnicianEntity">
         SELECT
         xm.XMMC,
         t.unicode,t.number,t.id_card, t.name,t.department_id,t.department,t.post,t.post_location,t.nature,t.situation,t.personnel_type
@@ -127,6 +140,14 @@
         ) xm ON m.xm_id = xm.xm_id
         WHERE LEFT(m.year_and_month,4) = #{ew.yearAndMonth}
         <if test="ew.xmmc!=null and ew.xmmc!=''">and xm.XMMC like concat('%',#{ew.xmmc},'%')</if>
+        <if test="ew.name!=null and ew.name!=''">and t.name like concat('%',#{ew.name},'%')</if>
+        <if test="ew.number!=null and ew.number!=''">and t.number like concat('%',#{ew.number},'%')</if>
+        <if test="ew.idCard!=null and ew.idCard!=''">and t.id_card like concat('%',#{ew.idCard},'%')</if>
+        <if test="ew.department!=null and ew.department!=''">and t.department like concat('%',#{ew.department},'%')</if>
+        <if test="ew.post!=null and ew.post!=''">and t.post like concat('%',#{ew.post},'%')</if>
+        <if test="ew.nature!=null and ew.nature!=''">and t.nature = #{ew.nature}</if>
+        <if test="ew.situation!=null and ew.situation!=''">and t.situation = #{ew.situation}</if>
+        <if test="ew.personnelType!=null and ew.personnelType!=''">and t.personnel_type = #{ew.personnelType}</if>
         GROUP BY m.xm_id,m.unicode
     </select>
 

+ 4 - 0
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/ICgQtService.java

@@ -5,7 +5,9 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.sky.core.mp.base.BaseService;
 import org.sky.scientific.excel.CgQtExcel;
+import org.sky.scientific.pojo.dto.CgQtDTO;
 import org.sky.scientific.pojo.entity.CgQtEntity;
+import org.sky.scientific.pojo.vo.CgQtVO;
 import org.sky.scientific.pojo.vo.XmCGSummary;
 import org.springframework.web.multipart.MultipartFile;
 
@@ -42,4 +44,6 @@ public interface ICgQtService extends BaseService<CgQtEntity> {
 	 * @return
 	 */
 	IPage<XmCGSummary> xmCgSummary(IPage<XmCGSummary> page, Long xmId);
+
+	IPage<CgQtVO> selectQtPage(IPage<CgQtVO> page, CgQtDTO dto);
 }

+ 6 - 1
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/ICgRjzzqService.java

@@ -1,10 +1,13 @@
-
 package org.sky.scientific.service;
 
 import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.apache.ibatis.annotations.Param;
 import org.sky.core.mp.base.BaseService;
 import org.sky.scientific.excel.CgRjzzqExcel;
+import org.sky.scientific.pojo.dto.CgRjzzqDTO;
 import org.sky.scientific.pojo.entity.CgRjzzqEntity;
+import org.sky.scientific.pojo.vo.CgRjzzqVO;
 import org.springframework.web.multipart.MultipartFile;
 
 import java.util.List;
@@ -32,4 +35,6 @@ public interface ICgRjzzqService extends BaseService<CgRjzzqEntity> {
 	boolean update(CgRjzzqEntity cgRjzzq);
 
 	boolean physicalDeleteByIds(List<Long> ids);
+
+    IPage<CgRjzzqVO> selectRjzzqPage(IPage<CgRjzzqVO> page, @Param("ew") CgRjzzqDTO dto);
 }

+ 8 - 0
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/IXmDesignCostService.java

@@ -37,4 +37,12 @@ public interface IXmDesignCostService extends BaseService<XmDesignCostEntity> {
 	List<XmDesignCostExcel> exportXmDesignCost(Wrapper<XmDesignCostEntity> queryWrapper);
 
     void importData(MultipartFile file, String yearAndMonth);
+
+	/**
+	 * 批量删除
+	 *
+	 * @param ids
+	 * @return
+	 */
+	boolean physicalDeleteByIds(List<Long> ids);
 }

+ 8 - 7
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/CgJsbzServiceImpl.java

@@ -51,19 +51,20 @@ public class CgJsbzServiceImpl extends BaseServiceImpl<CgJsbzMapper, CgJsbzEntit
 		}
 		for (CgJsbzExcel excel : data) {
 			CgJsbzEntity jsbzDTO = Objects.requireNonNull(BeanUtil.copyProperties(excel, CgJsbzDTO.class));
+			if (!StringUtil.isAllBlank(excel.getXmbh(), excel.getXmmc())) {
+				Long xmId = xmMapper.getXmIdByXmmcOrXmbh(null, excel.getXmmc(), excel.getXmbh());
+				if (xmId == null) {
+					throw new ServiceException("项目不存在,导入失败,请检查数据");
+				}
+				jsbzDTO.setXmId(xmId);
+			}
 			this.save(jsbzDTO);
 		}
     }
 
 	@Override
 	public boolean save(CgJsbzEntity cgJsbz) {
-		if (!StringUtil.isAllBlank(cgJsbz.getXmbh(), cgJsbz.getXmmc())) {
-			Long xmId = xmMapper.getXmIdByXmmcOrXmbh(null, cgJsbz.getXmmc(), cgJsbz.getXmbh());
-			if (xmId == null) {
-				throw new ServiceException("项目不存在,导入失败,请检查数据");
-			}
-			cgJsbz.setXmId(xmId);
-		}
+
 		return super.save(cgJsbz);
 	}
 

+ 8 - 7
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/CgKylwServiceImpl.java

@@ -54,19 +54,20 @@ public class CgKylwServiceImpl extends BaseServiceImpl<CgKylwMapper, CgKylwEntit
 		}
 		for (CgKylwExcel excel : data) {
 			CgKylwEntity kylwDTO = Objects.requireNonNull(BeanUtil.copyProperties(excel, CgKylwDTO.class));
+			if (!StringUtil.isAllBlank(excel.getXmbh(), excel.getXmmc())) {
+				Long xmId = xmMapper.getXmIdByXmmcOrXmbh(null, excel.getXmmc(), excel.getXmbh());
+				if (xmId == null) {
+					throw new ServiceException("项目不存在,导入失败,请检查数据");
+				}
+				kylwDTO.setXmId(xmId);
+			}
 			this.save(kylwDTO);
 		}
 	}
 
 	@Override
 	public boolean save(CgKylwEntity cgKylw) {
-		if (!StringUtil.isAllBlank(cgKylw.getXmbh(), cgKylw.getXmmc())) {
-			Long xmId = xmMapper.getXmIdByXmmcOrXmbh(null, cgKylw.getXmmc(), cgKylw.getXmbh());
-			if (xmId == null) {
-				throw new ServiceException("项目不存在,导入失败,请检查数据");
-			}
-			cgKylw.setXmId(xmId);
-		}
+
 		return super.save(cgKylw);
 	}
 

+ 15 - 7
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/CgQtServiceImpl.java

@@ -18,6 +18,7 @@ import org.sky.scientific.mapper.XmMapper;
 import org.sky.scientific.pojo.dto.CgQtDTO;
 import org.sky.scientific.pojo.entity.CgQtEntity;
 import org.sky.scientific.pojo.entity.XmEntity;
+import org.sky.scientific.pojo.vo.CgQtVO;
 import org.sky.scientific.pojo.vo.XmCGSummary;
 import org.sky.scientific.service.ICgQtService;
 import org.springframework.stereotype.Service;
@@ -58,19 +59,20 @@ public class CgQtServiceImpl extends BaseServiceImpl<CgQtMapper, CgQtEntity> imp
 		}
 		for (CgQtExcel excel : data) {
 			CgQtEntity qtDTO = Objects.requireNonNull(BeanUtil.copyProperties(excel, CgQtDTO.class));
+			if (!StringUtil.isAllBlank(excel.getXmbh(), excel.getXmmc())) {
+				Long xmId = xmMapper.getXmIdByXmmcOrXmbh(null, excel.getXmmc(), excel.getXmbh());
+				if (xmId == null) {
+					throw new ServiceException("项目不存在,导入失败,请检查数据");
+				}
+				qtDTO.setXmId(xmId);
+			}
 			this.save(qtDTO);
 		}
 	}
 
 	@Override
 	public boolean save(CgQtEntity cgQt) {
-		if (!StringUtil.isAllBlank(cgQt.getXmbh(), cgQt.getXmmc())) {
-			Long xmId = xmMapper.getXmIdByXmmcOrXmbh(null, cgQt.getXmmc(), cgQt.getXmbh());
-			if (xmId == null) {
-				throw new ServiceException("项目不存在,导入失败,请检查数据");
-			}
-			cgQt.setXmId(xmId);
-		}
+
 		return super.save(cgQt);
 	}
 
@@ -99,4 +101,10 @@ public class CgQtServiceImpl extends BaseServiceImpl<CgQtMapper, CgQtEntity> imp
         return page.setRecords(list);
     }
 
+	@Override
+	public IPage<CgQtVO> selectQtPage(IPage<CgQtVO> page, CgQtDTO dto) {
+		List<CgQtVO> list = baseMapper.selectQtPage(page, dto);
+		return page.setRecords(list);
+	}
+
 }

+ 15 - 7
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/CgRjzzqServiceImpl.java

@@ -2,6 +2,7 @@
 package org.sky.scientific.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import jakarta.annotation.Resource;
 import org.sky.core.excel.util.ExcelUtil;
@@ -16,6 +17,7 @@ import org.sky.scientific.mapper.XmMapper;
 import org.sky.scientific.pojo.dto.CgRjzzqDTO;
 import org.sky.scientific.pojo.entity.CgRjzzqEntity;
 import org.sky.scientific.pojo.entity.XmEntity;
+import org.sky.scientific.pojo.vo.CgRjzzqVO;
 import org.sky.scientific.service.ICgRjzzqService;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -54,19 +56,20 @@ public class CgRjzzqServiceImpl extends BaseServiceImpl<CgRjzzqMapper, CgRjzzqEn
 		}
 		for (CgRjzzqExcel excel : data) {
 			CgRjzzqEntity zlDTO = Objects.requireNonNull(BeanUtil.copyProperties(excel, CgRjzzqDTO.class));
+			if (!StringUtil.isAllBlank(excel.getXmbh(), excel.getXmmc())) {
+				Long xmId = xmMapper.getXmIdByXmmcOrXmbh(null, excel.getXmmc(), excel.getXmbh());
+				if (xmId == null) {
+					throw new ServiceException("项目不存在,导入失败,请检查数据");
+				}
+				zlDTO.setXmId(xmId);
+			}
 			this.save(zlDTO);
 		}
     }
 
 	@Override
 	public boolean save(CgRjzzqEntity cgRjzzq) {
-		if (!StringUtil.isAllBlank(cgRjzzq.getXmbh(), cgRjzzq.getXmmc())) {
-			Long xmId = xmMapper.getXmIdByXmmcOrXmbh(null, cgRjzzq.getXmmc(), cgRjzzq.getXmbh());
-			if (xmId == null) {
-				throw new ServiceException("项目不存在,导入失败,请检查数据");
-			}
-			cgRjzzq.setXmId(xmId);
-		}
+
 		return super.save(cgRjzzq);
 	}
 
@@ -86,4 +89,9 @@ public class CgRjzzqServiceImpl extends BaseServiceImpl<CgRjzzqMapper, CgRjzzqEn
 		return baseMapper.physicalDeleteByIds(ids);
 	}
 
+	@Override
+	public IPage<CgRjzzqVO> selectRjzzqPage(IPage<CgRjzzqVO> page, CgRjzzqDTO dto) {
+		return baseMapper.selectRjzzqPage(page, dto);
+	}
+
 }

+ 7 - 7
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/CgZlServiceImpl.java

@@ -54,19 +54,19 @@ public class CgZlServiceImpl extends BaseServiceImpl<CgZlMapper, CgZlEntity> imp
 		}
 		for (CgZlExcel excel : data) {
 			CgZlEntity zlDTO = Objects.requireNonNull(BeanUtil.copyProperties(excel, CgZlDTO.class));
+			if (!StringUtil.isAllBlank(excel.getXmbh(), excel.getXmmc())) {
+				Long xmId = xmMapper.getXmIdByXmmcOrXmbh(null, excel.getXmmc(), excel.getXmbh());
+				if (xmId == null) {
+					throw new ServiceException("项目不存在,请检查数据");
+				}
+				zlDTO.setXmId(xmId);
+			}
 			this.save(zlDTO);
 		}
 	}
 
 	@Override
 	public boolean save(CgZlEntity cgZl) {
-		if (!StringUtil.isAllBlank(cgZl.getXmbh(), cgZl.getXmmc())) {
-			Long xmId = xmMapper.getXmIdByXmmcOrXmbh(null, cgZl.getXmmc(), cgZl.getXmbh());
-			if (xmId == null) {
-				throw new ServiceException("项目不存在,导入失败,请检查数据");
-			}
-			cgZl.setXmId(xmId);
-		}
 		return super.save(cgZl);
 	}
 

+ 3 - 3
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/XmAssetHoursServiceImpl.java

@@ -182,9 +182,9 @@ public class XmAssetHoursServiceImpl extends BaseServiceImpl<XmAssetHoursMapper,
 			}
 
 			//总工时未填,且两次工时不一致
-			if(dbAsset.getZgs()!=null && !Objects.equals(dbAsset.getZgs(),dto.getZgs())){
-				throw new ServiceException("该资产在["+dto.getYearAndMonth()+"]已有总工时["+dbAsset.getZgs()+"]");
-			}
+//			if(dbAsset.getZgs()!=null && !Objects.equals(dbAsset.getZgs(),dto.getZgs())){
+//				throw new ServiceException("该资产在["+dto.getYearAndMonth()+"]已有总工时["+dbAsset.getZgs()+"]");
+//			}
 
 			dbAsset.setZgs(dto.getZgs());
 			assetMapper.updateById(dbAsset);

+ 6 - 0
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/XmDesignCostServiceImpl.java

@@ -88,4 +88,10 @@ public class XmDesignCostServiceImpl extends BaseServiceImpl<XmDesignCostMapper,
 		this.saveBatch(insertList);
 	}
 
+	@Override
+	public boolean physicalDeleteByIds(List<Long> ids) {
+
+		return baseMapper.physicalDeleteByIds(ids) > 0;
+	}
+
 }

+ 11 - 7
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/XmServiceImpl.java

@@ -10,21 +10,24 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import lombok.AllArgsConstructor;
 import org.sky.core.log.exception.ServiceException;
 import org.sky.core.mp.base.BaseServiceImpl;
+import org.sky.core.secure.utils.SecureUtil;
 import org.sky.core.tool.utils.CollectionUtil;
 import org.sky.core.tool.utils.DateUtil;
 import org.sky.core.tool.utils.Func;
 import org.sky.core.tool.utils.StringUtil;
 import org.sky.scientific.excel.XmExcel;
-import org.sky.scientific.mapper.*;
+import org.sky.scientific.mapper.DepartmentMapper;
+import org.sky.scientific.mapper.TechnicianMapper;
+import org.sky.scientific.mapper.XmMapper;
 import org.sky.scientific.pojo.dto.XmDTO;
 import org.sky.scientific.pojo.dto.XmUpdateDto;
-import org.sky.scientific.pojo.entity.A107_1;
 import org.sky.scientific.pojo.entity.XmEntity;
-import org.sky.scientific.pojo.vo.*;
+import org.sky.scientific.pojo.vo.XmSummary;
+import org.sky.scientific.pojo.vo.XmVO;
+import org.sky.scientific.pojo.vo.XmYszbVO;
 import org.sky.scientific.service.IXmService;
 import org.springframework.stereotype.Service;
 
-import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
@@ -107,13 +110,14 @@ public class XmServiceImpl extends BaseServiceImpl<XmMapper, XmEntity> implement
 
 	@Override
 	public IPage<XmSummary> summaryPage(IPage<XmSummary> page, XmDTO xm) {
+		xm.setTenantId(SecureUtil.getTenantId());
 		List<XmSummary> xmList = baseMapper.summaryPage(page, xm);
 
 		int year = Integer.parseInt(xm.getYearAndMonth().substring(0, 4));
 		for (XmSummary xmVO : xmList) {
-			if (xmVO.getXmfzr() != null) {
-				xmVO.setXmfzrxm(technicianMapper.getNameById(xmVO.getXmfzr()));
-			}
+//			if (xmVO.getXmfzr() != null) {
+//				xmVO.setXmfzrxm(technicianMapper.getNameById(xmVO.getXmfzr()));
+//			}
 			//立项报告数量
 			xmVO.setLxbgCount(JSON.parseArray(xmVO.getLxbg()).size());