zhoulisky месяцев назад: 11
Родитель
Сommit
04a46c4b0e

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

@@ -4,7 +4,6 @@ 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.TechnicianDetailEntity;
 import org.sky.scientific.pojo.entity.TechnicianEntity;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
@@ -21,7 +20,7 @@ import java.util.Date;
  */
 @Data
 @EqualsAndHashCode(callSuper = true)
-public class TechnicianDTO extends TechnicianDetailEntity {
+public class TechnicianDTO extends TechnicianEntity {
 	@Serial
 	private static final long serialVersionUID = 1L;
 

+ 0 - 100
kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/entity/TechnicianDetailEntity.java

@@ -1,100 +0,0 @@
-
-package org.sky.scientific.pojo.entity;
-
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.sky.core.mp.base.BaseEntity;
-import org.sky.core.tenant.mp.TenantEntity;
-
-import java.io.Serial;
-import java.time.LocalDate;
-import java.util.Date;
-
-/**
- * 技术人员花名册 实体类
- *
- * @author Kd
- * @since 2025-06-11
- */
-@Data
-@TableName("kd_technician_detail")
-@Schema(description = "Technician对象")
-@EqualsAndHashCode(callSuper = true)
-public class TechnicianDetailEntity extends TechnicianEntity {
-
-	@Serial
-	private static final long serialVersionUID = 1L;
-
-
-//	@Schema(description = "姓名")
-//	private String name;
-//
-//	@Schema(description = "工号")
-//	private String number;
-//
-//	@Schema(description = "身份证号码")
-//	private String identityCard;
-
-	private Long technicianId;
-
-	@Schema(description = "性别,1:男,2:女")
-	private Integer gender;
-
-	@Schema(description = "出生日期")
-	private LocalDate birthday;
-
-	@Schema(description = "民族")
-	private String ethnic;
-
-	@Schema(description = "所属二级单位")
-	private String secondaryUnit;
-
-	@Schema(description = "部门/科室/项目部")
-	private String department;
-
-	@Schema(description = "岗位职务")
-	private String post;
-
-	@Schema(description = "岗位所在地")
-	private String postLocation;
-
-	@Schema(description = "用工性质")
-	private String nature;
-
-	@Schema(description = "入职时间")
-	private Date hireDate;
-
-	@Schema(description = "最高学历")
-	private String education;
-
-	@Schema(description = "最高学位")
-	private String degree;
-
-	@Schema(description = "最高学历学校")
-	private String schoolName;
-
-	@Schema(description = "最高学历专业名称")
-	private String major;
-
-	@Schema(description = "职称")
-	private String rank;
-
-	@Schema(description = "执业资格")
-	private String practicingRequirement;
-
-	@Schema(description = "参研情况")
-	private String situation;
-
-	@Schema(description = "人员类型")
-	private String personnelType;
-
-	@Schema(description = "所属年月")
-	private String yearAndMonth;
-
-	@Schema(description = "情况说明")
-	private String remark;
-
-}

+ 57 - 7
kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/entity/TechnicianEntity.java

@@ -1,15 +1,11 @@
 
 package org.sky.scientific.pojo.entity;
 
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Data;
 import io.swagger.v3.oas.annotations.media.Schema;
 import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.EqualsAndHashCode;
 import org.sky.core.tenant.mp.TenantEntity;
-import org.sky.core.tool.utils.DateUtil;
-import org.springframework.format.annotation.DateTimeFormat;
 
 import java.io.Serial;
 import java.time.LocalDate;
@@ -34,19 +30,73 @@ public class TechnicianEntity extends TenantEntity {
 	 * 姓名
 	 */
 	@Schema(description = "姓名")
-	@TableField("name")
 	private String name;
 	/**
 	 * 工号
 	 */
 	@Schema(description = "工号")
-	@TableField("number")
 	private String number;
 	/**
 	 * 身份证号码
 	 */
 	@Schema(description = "身份证号码")
-	@TableField("identity_card")
 	private String identityCard;
 
+	@Schema(description = "性别,1:男,2:女")
+	private Integer gender;
+
+	@Schema(description = "出生日期")
+	private LocalDate birthday;
+
+	@Schema(description = "民族")
+	private String ethnic;
+
+	@Schema(description = "所属二级单位")
+	private String secondaryUnit;
+
+	@Schema(description = "部门/科室/项目部")
+	private String department;
+
+	@Schema(description = "岗位职务")
+	private String post;
+
+	@Schema(description = "岗位所在地")
+	private String postLocation;
+
+	@Schema(description = "用工性质")
+	private String nature;
+
+	@Schema(description = "入职时间")
+	private Date hireDate;
+
+	@Schema(description = "最高学历")
+	private String education;
+
+	@Schema(description = "最高学位")
+	private String degree;
+
+	@Schema(description = "最高学历学校")
+	private String schoolName;
+
+	@Schema(description = "最高学历专业名称")
+	private String major;
+
+	@Schema(description = "职称")
+	private String rank;
+
+	@Schema(description = "执业资格")
+	private String practicingRequirement;
+
+	@Schema(description = "参研情况")
+	private String situation;
+
+	@Schema(description = "人员类型")
+	private String personnelType;
+
+	@Schema(description = "所属年月")
+	private String yearAndMonth;
+
+	@Schema(description = "情况说明")
+	private String remark;
+
 }

+ 0 - 44
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/TechnicianDetailMapper.java

@@ -1,44 +0,0 @@
-
-package org.sky.scientific.mapper;
-
-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.TechnicianExcel;
-import org.sky.scientific.pojo.dto.TechnicianDTO;
-import org.sky.scientific.pojo.entity.TechnicianDetailEntity;
-import org.sky.scientific.pojo.entity.TechnicianEntity;
-import org.sky.scientific.pojo.vo.TechnicianVO;
-
-import java.util.List;
-
-/**
- * 技术人员花名册 Mapper 接口
- *
- * @author Kd
- * @since 2025-06-11
- */
-public interface TechnicianDetailMapper extends BaseMapper<TechnicianDetailEntity> {
-
-//	/**
-//	 * 自定义分页
-//	 *
-//	 * @param page 分页参数
-//	 * @param technician 查询参数
-//	 * @return List<TechnicianVO>
-//	 */
-	@TenantIgnore
-	List<TechnicianVO> selectTechnicianPage(IPage page, TechnicianDTO technician);
-//
-//	List<TechnicianExcel> exportTechnicianList(@Param("technician") TechnicianDTO technician);
-//
-//
-//	Integer countByDateAndNumberOrIdentityCard(TechnicianEntity technician);
-//
-//	Long countByNumberAndIdentifyCard(String number, String identityCard);
-//
-//	List<TechnicianEntity> selectByYearAndMonth(String yearAndMonth);
-//
-//	Long saveTechnician(TechnicianEntity technician);
-}

+ 0 - 156
kd-service/kd-scientific/src/main/java/org/sky/scientific/mapper/TechnicianDetailMapper.xml

@@ -1,156 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.sky.scientific.mapper.TechnicianDetailMapper">
-
-    <!-- 通用查询映射结果 -->
-    <resultMap id="technicianResultMap" type="org.sky.scientific.pojo.entity.TechnicianDetailEntity">
-        <result column="id" property="id"/>
-        <result column="tenant_id" property="tenantId"/>
-        <result column="name" property="name"/>
-        <result column="number" property="number"/>
-        <result column="identity_card" property="identityCard"/>
-        <result column="gender" property="gender"/>
-        <result column="birthday" property="birthday"/>
-        <result column="ethnic" property="ethnic"/>
-        <result column="secondary_unit" property="secondaryUnit"/>
-        <result column="department" property="department"/>
-        <result column="post" property="post"/>
-        <result column="post_location" property="postLocation"/>
-        <result column="nature" property="nature"/>
-        <result column="hire_date" property="hireDate"/>
-        <result column="education" property="education"/>
-        <result column="degree" property="degree"/>
-        <result column="school_name" property="schoolName"/>
-        <result column="major" property="major"/>
-        <result column="rank" property="rank"/>
-        <result column="practicing_requirement" property="practicingRequirement"/>
-        <result column="situation" property="situation"/>
-        <result column="personnel_type" property="personnelType"/>
-        <result column="year_and_month" property="yearAndMonth"/>
-        <result column="remark" property="remark"/>
-        <result column="create_user" property="createUser"/>
-        <result column="create_dept" property="createDept"/>
-        <result column="create_time" property="createTime"/>
-        <result column="update_user" property="updateUser"/>
-        <result column="update_time" property="updateTime"/>
-        <result column="status" property="status"/>
-        <result column="is_deleted" property="isDeleted"/>
-    </resultMap>
-
-<!--    <sql id="ba"-->
-
-    <select id="selectTechnicianPage" resultMap="technicianResultMap" parameterType="org.sky.scientific.pojo.dto.TechnicianDTO">
-        select t1.name,t1.number,t1.identity_card,t2.*
-        from kd_technician t1
-        left join kd_technician_detail t2 on t1.id = t2.technician_id
-        <if test="technician.yearAndMonth.length()==4">
-            INNER JOIN
-            (
-            SELECT technician_id,MAX( year_and_month ) AS max_month
-            FROM kd_technician_detail
-            WHERE LEFT ( year_and_month, 4 ) = #{technician.yearAndMonth} AND is_deleted = 0
-            GROUP BY technician_id
-            ) t3
-            ON t1.id = t3.technician_id and t2.year_and_month = t3.max_month
-        </if>
-        where t1.is_deleted = 0
-          <if test="technician.name!=null and technician.name!=''">and name like concat(concat('%', #{technician.name}), '%')</if>
-          <if test="technician.number!=null and technician.number!=''">and name like concat(concat('%', #{technician.number}), '%')</if>
-          <if test="technician.identityCard!=null and technician.identityCard!=''">and identity_card like concat(concat('%', #{technician.identityCard}), '%')</if>
-          <if test="technician.secondaryUnit!=null and technician.secondaryUnit!=''">and secondary_unit like concat(concat('%', #{technician.secondaryUnit}), '%')</if>
-          <if test="technician.department!=null and technician.department!=''">and department like concat(concat('%', #{technician.department}), '%')</if>
-          <if test="technician.post!=null and technician.post!=''">and post like concat(concat('%', #{technician.post}), '%')</if>
-          <if test="technician.postLocation!=null and technician.postLocation!=''">and post_location like concat(concat('%', #{technician.postLocation}), '%')</if>
-          <if test="technician.nature!=null and technician.nature!=''">and nature = #{technician.nature}</if>
-          <if test="technician.education!=null and technician.education!=''">and education = #{technician.education}</if>
-          <if test="technician.degree!=null and technician.degree!=''">and degree = #{technician.degree}</if>
-          <if test="technician.rank!=null and technician.rank!=''">and rank = #{technician.rank}</if>
-          <if test="technician.personnelType!=null and technician.personnelType!=''">and personnel_type = #{technician.personnelType}</if>
-          <if test="technician.situation !=null and technician.situation!=''">and situation = #{technician.situation}</if>
-          <if test="technician.practicingRequirement !=null and technician.practicingRequirement!=''">and practicing_requirement like concat(concat('%', #{technician.practicingRequirement}), '%')</if>
-          <if test="technician.hireStartDate!=null and technician.hireEndDate!=''">and hire_Date between #{technician.hireStartDate} and #{technician.hireEndDate}</if>
-          <choose>
-              <when test="technician.yearAndMonth.length()==4">
-                  and LEFT ( year_and_month, 4 ) = #{technician.yearAndMonth}
-              </when>
-              <otherwise>
-                  and LEFT ( year_and_month, 6 ) = #{technician.yearAndMonth}
-              </otherwise>
-          </choose>
-        order by year_and_month asc, t2.id asc
-    </select>
-
-<!--    <select id="exportTechnicianList" resultType="org.sky.scientific.excel.TechnicianExcel" parameterType="org.sky.scientific.pojo.dto.TechnicianDTO">-->
-<!--        select t1.*-->
-<!--        from kd_technician t1-->
-<!--        <if test="technician.yearAndMonth.length()==4">-->
-<!--            INNER JOIN-->
-<!--            (-->
-<!--            SELECT number, identity_card, MAX( year_and_month ) AS max_month-->
-<!--            FROM kd_technician-->
-<!--            WHERE LEFT ( year_and_month, 4 ) = #{technician.yearAndMonth} AND is_deleted = 0-->
-<!--            GROUP BY number, identity_card-->
-<!--            ) t2-->
-<!--            ON t1.number = t2.number  AND t1.identity_card = t2.identity_card AND t1.year_and_month = t2.max_month-->
-<!--        </if>-->
-<!--        where is_deleted = 0-->
-<!--        <if test="technician.name!=null and technician.name!=''">and name like concat(concat('%', #{technician.name}), '%')</if>-->
-<!--        <if test="technician.number!=null and technician.number!=''">and name like concat(concat('%', #{technician.number}), '%')</if>-->
-<!--        <if test="technician.identityCard!=null and technician.identityCard!=''">and identity_card like concat(concat('%', #{technician.identityCard}), '%')</if>-->
-<!--        <if test="technician.secondaryUnit!=null and technician.secondaryUnit!=''">and secondary_unit like concat(concat('%', #{technician.secondaryUnit}), '%')</if>-->
-<!--        <if test="technician.department!=null and technician.department!=''">and department like concat(concat('%', #{technician.department}), '%')</if>-->
-<!--        <if test="technician.post!=null and technician.post!=''">and post like concat(concat('%', #{technician.post}), '%')</if>-->
-<!--        <if test="technician.postLocation!=null and technician.postLocation!=''">and post_location like concat(concat('%', #{technician.postLocation}), '%')</if>-->
-<!--        <if test="technician.nature!=null and technician.nature!=''">and nature = #{technician.nature}</if>-->
-<!--        <if test="technician.education!=null and technician.education!=''">and education = #{technician.education}</if>-->
-<!--        <if test="technician.degree!=null and technician.degree!=''">and degree = #{technician.degree}</if>-->
-<!--        <if test="technician.rank!=null and technician.rank!=''">and rank = #{technician.rank}</if>-->
-<!--        <if test="technician.personnelType!=null and technician.personnelType!=''">and personnel_type = #{technician.personnelType}</if>-->
-<!--        <if test="technician.situation !=null and technician.situation!=''">and situation = #{technician.situation}</if>-->
-<!--        <if test="technician.practicingRequirement !=null and technician.practicingRequirement!=''">and practicing_requirement like concat(concat('%', #{technician.practicingRequirement}), '%')</if>-->
-<!--        <if test="technician.hireStartDate!=null and technician.hireEndDate!=''">and hire_Date between #{technician.hireStartDate} and #{technician.hireEndDate}</if>-->
-<!--        <choose>-->
-<!--            <when test="technician.yearAndMonth.length()==4">-->
-<!--                and LEFT ( t1.year_and_month, 4 ) = #{technician.yearAndMonth}-->
-<!--            </when>-->
-<!--            <otherwise>-->
-<!--                and LEFT ( t1.year_and_month, 7 ) = #{technician.yearAndMonth}-->
-<!--            </otherwise>-->
-<!--        </choose>-->
-<!--        order by year_and_month asc, id asc-->
-<!--    </select>-->
-
-<!--    <select id="selectByYearAndMonth">-->
-<!--        select * from kd_technician-->
-<!--        where is_deleted = 0 and LEFT(year_and_month,6) = #{yearAndMonth}-->
-
-<!--    </select>-->
-
-<!--    <select id="exportTechnician" resultType="org.sky.scientific.excel.TechnicianExcel">-->
-<!--        SELECT *-->
-<!--        FROM kd_technician ${ew.customSqlSegment}-->
-<!--    </select>-->
-
-<!--    <select id="countByDateAndNumberOrIdentityCard" parameterType="org.sky.scientific.pojo.entity.TechnicianEntity">-->
-<!--        select count(*)-->
-<!--        from kd_technician t-->
-<!--        left join kd_technician_detail d on d.technician_id = t.id-->
-<!--        where d.is_deleted = 0-->
-<!--        <choose>-->
-<!--            <when test="yearAndMonth.length()==4">-->
-<!--                and LEFT(year_and_month,4) = #{yearAndMonth}-->
-<!--            </when>-->
-<!--            <otherwise>-->
-<!--                and LEFT(year_and_month,6) = #{yearAndMonth}-->
-<!--            </otherwise>-->
-<!--        </choose>-->
-<!--        and (number = #{number} or identity_card = #{identityCard})-->
-<!--    </select>-->
-
-<!--    <select id="countByNumberAndIdentifyCard" resultType="java.lang.Long">-->
-<!--        select id-->
-<!--        from kd_technician-->
-<!--        where number = #{number} or identity_card = #{identityCard}-->
-<!--        and is_deleted = 0-->
-<!--    </select>-->
-</mapper>

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

@@ -2,6 +2,7 @@
 package org.sky.scientific.service;
 
 import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import org.sky.scientific.pojo.dto.SalaryDTO;
 import org.sky.scientific.pojo.entity.SalaryEntity;
 import org.sky.scientific.pojo.vo.SalaryVO;
 import org.sky.scientific.excel.SalaryExcel;
@@ -54,4 +55,6 @@ public interface ISalaryService extends BaseService<SalaryEntity> {
 	 * @return
 	 */
 	boolean deleteSalary(List<SalaryEntity> salary);
+
+	boolean fetchLastYearData(SalaryDTO salary);
 }

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

@@ -14,6 +14,7 @@ import org.sky.core.tool.utils.StringUtil;
 import org.sky.scientific.excel.SalaryExcel;
 import org.sky.scientific.mapper.SalaryMapper;
 import org.sky.scientific.mapper.TechnicianMapper;
+import org.sky.scientific.pojo.dto.SalaryDTO;
 import org.sky.scientific.pojo.entity.SalaryEntity;
 import org.sky.scientific.pojo.vo.SalaryVO;
 import org.sky.scientific.service.ISalaryService;
@@ -130,4 +131,9 @@ public class SalaryServiceImpl extends BaseServiceImpl<SalaryMapper, SalaryEntit
 		}
 		return affectNum == salaryList.size();
 	}
+
+	@Override
+	public boolean fetchLastYearData(SalaryDTO salary) {
+		return false;
+	}
 }