zhoulisky 7 months ago
parent
commit
59cfd7bf9f

+ 6 - 5
kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/entity/YsWxzctxfyEntity.java

@@ -1,13 +1,14 @@
 
 
 package org.sky.scientific.pojo.entity;
 package org.sky.scientific.pojo.entity;
 
 
-import jakarta.validation.constraints.NotBlank;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.v3.oas.annotations.media.Schema;
 import jakarta.validation.constraints.NotNull;
 import jakarta.validation.constraints.NotNull;
 import lombok.Data;
 import lombok.Data;
-import io.swagger.v3.oas.annotations.media.Schema;
-import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.EqualsAndHashCode;
 import lombok.EqualsAndHashCode;
 import org.sky.core.tenant.mp.TenantEntity;
 import org.sky.core.tenant.mp.TenantEntity;
+
 import java.io.Serial;
 import java.io.Serial;
 
 
 /**
 /**
@@ -34,8 +35,8 @@ public class YsWxzctxfyEntity extends TenantEntity {
 	private Long assetId;
 	private Long assetId;
 
 
 	@Schema(description = "资产编码")
 	@Schema(description = "资产编码")
-	@NotBlank(message = "请选择资产")
-	private String zcbm;
+	@TableField(exist = false)
+ 	private String zcbm;
 
 
 	@Schema(description = "在项目中的工作时长(月)")
 	@Schema(description = "在项目中的工作时长(月)")
 	private Integer zzsc;
 	private Integer zzsc;

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

@@ -41,8 +41,8 @@
     <select id="selectByYearAndMonth" resultMap="ResultVoMap">
     <select id="selectByYearAndMonth" resultMap="ResultVoMap">
         SELECT xa.*, s.YZJE,s.zcbm
         SELECT xa.*, s.YZJE,s.zcbm
         FROM kd_ys_wxzctxfy xa
         FROM kd_ys_wxzctxfy xa
-        inner join kd_asset s on s.ZCBM = XA.ZCBM and s.year_and_month = #{yearAndMonth}
-        INNER JOIN
+        left join kd_asset s on s.id = XA.asset_id
+        left join
         (
         (
             SELECT
             SELECT
                 xm.id,
                 xm.id,

+ 5 - 4
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/TechnicianServiceImpl.java

@@ -141,7 +141,7 @@ public class TechnicianServiceImpl extends BaseServiceImpl<TechnicianMapper, Tec
 		List<TechnicianExcel> data = ExcelUtil.read(file, 0, 2, TechnicianExcel.class);
 		List<TechnicianExcel> data = ExcelUtil.read(file, 0, 2, TechnicianExcel.class);
 
 
 		List<TechnicianEntity> dbTechnicianList = baseMapper.selectList(Wrappers.<TechnicianEntity>lambdaQuery().eq(TechnicianEntity::getYearAndMonth, yearAndMonth));
 		List<TechnicianEntity> dbTechnicianList = baseMapper.selectList(Wrappers.<TechnicianEntity>lambdaQuery().eq(TechnicianEntity::getYearAndMonth, yearAndMonth));
-		List<String> identifierList = new ArrayList<>(dbTechnicianList.stream().map(tmp -> tmp.getNumber() + ":" + tmp.getIdCard() + ":").toList());
+		List<String> identifierList = new ArrayList<>(dbTechnicianList.stream().map(tmp -> tmp.getNumber() + ":" + tmp.getIdCard()).toList());
 
 
 		List<TechnicianEntity> insertList = new ArrayList<>();
 		List<TechnicianEntity> insertList = new ArrayList<>();
 
 
@@ -177,10 +177,11 @@ public class TechnicianServiceImpl extends BaseServiceImpl<TechnicianMapper, Tec
 				technician.setDepartmentId(dbDepartment.getId());
 				technician.setDepartmentId(dbDepartment.getId());
 			}
 			}
 			String unicode = baseMapper.getUnicodeByNumberAndIdentityCard(technician.getNumber(), technician.getIdCard());
 			String unicode = baseMapper.getUnicodeByNumberAndIdentityCard(technician.getNumber(), technician.getIdCard());
-			if (unicode != null) {
-				 continue;
+			if (unicode == null) {
+				unicode = UUID.randomUUID().toString();
+//				 continue;
 			}
 			}
-			technician.setUnicode(UUID.randomUUID().toString());
+			technician.setUnicode(unicode);
 
 
 			insertList.add(technician);
 			insertList.add(technician);
 			if (insertList.size() % 20 == 0) {
 			if (insertList.size() % 20 == 0) {

+ 1 - 1
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/XmIntangibleAssetServiceImpl.java

@@ -127,7 +127,7 @@ public class XmIntangibleAssetServiceImpl extends BaseServiceImpl<XmIntangibleAs
 				XmIntangibleAsset asset = new XmIntangibleAsset();
 				XmIntangibleAsset asset = new XmIntangibleAsset();
 				asset.setYearAndMonth(yearAndMonth);
 				asset.setYearAndMonth(yearAndMonth);
 				asset.setXmId(ys.getXmId());
 				asset.setXmId(ys.getXmId());
-				asset.setZcbm(ys.getZcbm());
+				asset.setZcbm(ys.getZcEntity().getZcbm());
  				insertList.add(asset);
  				insertList.add(asset);
 			}
 			}
 			if (CollectionUtil.isNotEmpty(insertList)) {
 			if (CollectionUtil.isNotEmpty(insertList)) {

+ 1 - 1
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/YsWxzctxfyServiceImpl.java

@@ -100,7 +100,7 @@ public class YsWxzctxfyServiceImpl extends BaseServiceImpl<YsWxzctxfyMapper, YsW
 			throw new ServiceException("研发项目不存在");
 			throw new ServiceException("研发项目不存在");
 		}
 		}
 
 
-		//查询项目开始时间对应月份的五行资产清单
+		//查询项目开始时间对应月份的无形资产清单
 		List<AssetEntity> dbAssetList = assetMapper.selectList(Wrappers.<AssetEntity>lambdaQuery().eq(AssetEntity::getYearAndMonth, DateUtil.format(xmVO.getXmkssj(), DateUtil.PATTERN_YYYYMM)));
 		List<AssetEntity> dbAssetList = assetMapper.selectList(Wrappers.<AssetEntity>lambdaQuery().eq(AssetEntity::getYearAndMonth, DateUtil.format(xmVO.getXmkssj(), DateUtil.PATTERN_YYYYMM)));
 
 
 		if (Func.isEmpty(dbAssetList)) {
 		if (Func.isEmpty(dbAssetList)) {

BIN
kd-service/kd-scientific/src/main/resources/export-template/每月无形资产明细.xls