Browse Source

Merge branch 'test2' of jishutao/kede-server into prod

anderx 1 year ago
parent
commit
0644833ceb

+ 5 - 5
src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml

@@ -1201,9 +1201,9 @@ progress_tid = values(progress_tid)
             <if test="unilateralService != null">
                  unilateral_service ,
             </if>
-            <if test="unilateralService != null">
-                unilateral_service,
-            </if>
+            <if test="progressTid != null">
+                and progress_tid ,
+            </if
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="orderNo != null">
@@ -1443,8 +1443,8 @@ progress_tid = values(progress_tid)
             <if test="unilateralService != null">
                #{unilateralService},
             </if>
-            <if test="unilateralService != null">
-                #{unilateralService},
+            <if test="progressTid != null">
+                 #{progressTid},
             </if>
         </trim>
     </insert>

+ 1 - 1
src/main/java/com/goafanti/common/mapper/TaskDetailsMapper.xml

@@ -1169,7 +1169,7 @@ create_time = values(create_time)
 
     <select id="selectByTidList" resultType="com.goafanti.techproject.bo.OutTaskDetailsLog">
         select
-            id,tdid,aid,aname,create_time createTime
+            id,tdid,aid,aname,DATE_FORMAT(create_time, '%Y-%m-%d %H:%i:%s') createTime
         from task_details_log
         where tdid = #{tdid}
         order by create_time desc

+ 199 - 131
src/main/java/com/goafanti/common/utils/excel/NewExcelUtil.java

@@ -8,6 +8,7 @@ import com.goafanti.common.utils.StringUtils;
 import com.goafanti.common.utils.excel.Excel.ColumnType;
 import com.goafanti.common.utils.excel.Excel.Type;
 import com.goafanti.techproject.bo.OutTaskDetailsBo;
+import com.goafanti.techproject.bo.TaskDetailsBo;
 import org.apache.poi.POIXMLDocumentPart;
 import org.apache.poi.hssf.usermodel.*;
 import org.apache.poi.ss.usermodel.*;
@@ -1905,7 +1906,7 @@ public class NewExcelUtil<T> {
 	}
 
 
-	public Result exportTaskDetailsExcel(OutTaskDetailsBo byTid, String sheetName, String uploadPath) {
+	public Result exportTaskDetailsExcel(TaskDetailsBo byTid, String sheetName, String uploadPath) {
 		OutputStream out = null;
 		String filename="";
 		downloadPath=uploadPath;
@@ -1915,8 +1916,7 @@ public class NewExcelUtil<T> {
 			wb = new HSSFWorkbook(fileInputStream);
 			styles=createStyles(wb);
 			sheet = wb.getSheetAt(0);
-			Row row = sheet.createRow(5);
-
+			Row row = sheet.createRow(6);
 			filename = encodingFilename(sheetName);
 			out = Files.newOutputStream(Paths.get(getAbsoluteFile(filename)));
 			addCell( row,byTid);
@@ -1943,112 +1943,153 @@ public class NewExcelUtil<T> {
 		}
     }
 
-	private void addCell(Row row,OutTaskDetailsBo o) {
-		for (int i = 0; i < 51; i++) {
+	private void addObjectCell(Row row, OutTaskDetailsBo byTid) {
+		Class<?> clazz = byTid.getClass();
+		int i = 0;
+
+		for (Field field :clazz.getDeclaredFields()){
+			field.setAccessible(true);
 			Cell cell = row.createCell(i);
 			cell.setCellStyle(styles.get("data4"));
-			if (i==0)cell.setCellValue(1);
-			else if(i==1)cell.setCellValue(o.getUserName());
-			else if(i==2)cell.setCellValue(o.getServiceProject());
-			else if(i==3)cell.setCellValue(o.getServiceyear());
-			else if(i==4)cell.setCellValue("");
-			else if(i==5)cell.setCellValue(o.getMemberLvl());
-			else if(i==6){
-				if (o.getBeforeLastSalesAmount()!=null){
-					cell.setCellValue(o.getBeforeLastSalesAmount().stripTrailingZeros().toPlainString());
-				}else cell.setCellValue("");
-			}
-			else if(i==7){
-				if (o.getBeforeLastRdBudget()!=null){
-					cell.setCellValue(o.getBeforeLastRdBudget().stripTrailingZeros().toPlainString());
-				}else cell.setCellValue("");
-			}
-			else if(i==8){
-				if(o.getLastSalesAmount()!=null){
-					cell.setCellValue(o.getLastSalesAmount().stripTrailingZeros().toPlainString());
-				}else cell.setCellValue("");
-			}
-			else if(i==9){
-				if(o.getLastRdBudget()!=null){
-					cell.setCellValue(o.getLastRdBudget().stripTrailingZeros().toPlainString());
-				}else cell.setCellValue("");
-			}
-			else if(i==10){
-				addParam(cell,o.getCloseMeetingStatus(),o.getCloseMeetingOther());
-			}else if(i==11){
-				cell.setCellValue(o.getProjectApprovalNumber());
-			}else if(i==12){
-				if (o.getRdBudget() !=null){
-					cell.setCellValue(o.getRdBudget().stripTrailingZeros().toPlainString());
-				}else cell.setCellValue("");
-			}
-			else if(i==13){
-				if (o.getRdSalesAmount() !=null){
-					cell.setCellValue(o.getRdSalesAmount().stripTrailingZeros().toPlainString());
-				}else cell.setCellValue("");
-			}
-			else if(i==14)cell.setCellValue(o.getRdBudgetRate());
-			else if(i==15)cell.setCellValue(o.getThreeYearsRdBudgetRate());
-			else if(i==16){
-				switch (o.getDataCycle())
-				{
-					case "0":
-						cell.setCellValue("第一季度");
-						break;
-					case "1": cell.setCellValue("上半年"); break;
-					case "2": cell.setCellValue("前三季度"); break;
-					case "3": cell.setCellValue("全年"); break;
+			try {
+//				System.out.println(String.format("name=%s,value=%s",field.getName(),field.get(byTid)));
+				Object o = field.get(byTid);
+			} catch (IllegalAccessException e) {
+				throw new RuntimeException(e);
+			}
+		}
+	}
+
+	private void addCell(Row row,TaskDetailsBo o) {
+		for (int i = 0; i < 81; i++) {
+			Cell cell = row.createCell(i);
+			cell.setCellStyle(styles.get("data4"));
+			if (i==0)cell.setCellValue(1);//序号
+			else if(i==1)cell.setCellValue(o.getUserName());//客户名称
+			else if(i==2)cell.setCellValue(o.getContractNo());//合同编号
+			else if(i==3)cell.setCellValue(o.getServiceProject());//服务内容
+			else if(i==4){//服务年限
+				cell.setCellValue(o.getServiceYear());
+			}
+			else if(i==5)cell.setCellValue(o.getMemberLvl());//会员级别
+			else if(i==6)cell.setCellValue(o.getTaskName());		//业务负责人
+			else if(i==7)cell.setCellValue(o.getProjectName());		//项目负责人
+			else if(i==8)cell.setCellValue(o.getTechnologyName());		//技术咨询师
+			else if(i==9)cell.setCellValue(o.getFinanceTaxationName());	//财税咨询师
+			else if(i==10)cell.setCellValue(getBigDecimal(o.getBeforeLastRdSalesAmount()));  //上上年度销售收入
+			else if(i==11)cell.setCellValue(getBigDecimal(o.getBeforeLastRdBudget()));  //上上年度研发费用
+			else if(i==12)cell.setCellValue(getBigDecimal(o.getLastRdSalesAmount())); //上年度销售收入
+			else if(i==13)cell.setCellValue(getBigDecimal(o.getRdSalesAmount())); //上年度研发费用
+			else if(i==14)cell.setCellValue(o.getWorkersNumber());//职工人数
+			else if(i==15)cell.setCellValue(o.getTechnologyNumber());//科技人员
+			else if(i==16)cell.setCellValue(o.getWorkersRate()+"%");//人员占比
+			else if(i==17)cell.setCellValue(o.getProjectApprovalNumber());//研发立项数
+			else if(i==18)cell.setCellValue(getBigDecimal(o.getRdBudget()));//年度研发预算总额
+			else if(i==19)cell.setCellValue(getBigDecimal(o.getRdSalesAmount()));//年度销售预计收入
+			else if(i==20)cell.setCellValue(o.getRdBudgetRate()+"%");//年度研发费用预算占比
+			else if(i==21)cell.setCellValue(o.getThreeYearsActualRdRate()+"%");//三年度研发费用占比
+			else if(i==22){//数据周期
+				if (o.getDataCycle()==null){
+					cell.setCellValue("");
+				}else {
+					switch (o.getDataCycle())
+					{
+						case 0:
+							cell.setCellValue("第一季度");
+							break;
+						case 1: cell.setCellValue("上半年"); break;
+						case 2: cell.setCellValue("前三季度"); break;
+						case 3: cell.setCellValue("全年"); break;
 
+					}
 				}
+			}else if(i==23){//已立项RD数
+				cell.setCellValue(o.getActualRdNumber());
+			}else if(i==24){//委外项目数
+				cell.setCellValue(o.getActualOutsourcingNumber());
+			}
+			else if(i==25){//合作项目数
+				cell.setCellValue(o.getActualCooperateNumber());
+			}
+			else if(i==26){//已归集研发费用总额
+				cell.setCellValue(o.getActualRdAmount().stripTrailingZeros().toPlainString());
+			}
+			else if(i==27){//研发预算完成度
+				cell.setCellValue(o.getRdCompletionProgress()+"%");
 			}
-			else if(i==17)cell.setCellValue(o.getActualRdNumber());
-			else if(i==18){
-				if (o.getActualRdAmount() !=null){
-					cell.setCellValue(o.getActualRdAmount().stripTrailingZeros().toPlainString());
-				}else cell.setCellValue("");
+			else if(i==28){//年度实际销售额
+				cell.setCellValue(getBigDecimal(o.getActualSalesAmount()));
 			}
-			else if(i==19){
-				if (o.getActualSalesAmount() !=null){
-					cell.setCellValue(o.getActualSalesAmount().stripTrailingZeros().toPlainString());
-				}else cell.setCellValue("");
+			else if(i==29){//年度研发费用占比
+				cell.setCellValue(o.getActualRdRate()+"%");
 			}
-			else if(i==20)cell.setCellValue(o.getActualRdRate());
-			else if(i==21)cell.setCellValue(o.getThreeYearsActualRdRate());
-			else if(i==22) {
+			else if(i==30){//三年研发费用占比
+				cell.setCellValue(o.getThreeYearsActualRdRate()+"%");
+			}
+			else if(i==31){//火炬统计
 				addParam(cell,o.getTorchStatus(),o.getTorchOther());
 			}
-			else if(i==23){
+			else if(i==32){//统计年报
 				addParam(cell,o.getStatisticsStatus(),o.getStatisticsOther());
 			}
-			else if(i==24){
+			else if(i==33){//高企年报
 				addParam(cell,o.getChStatus(),o.getChOther());
 			}
-			else if(i==25){
+			else if(i==34){//汇算清缴-是否完成
 				addParam(cell,o.getFinalSettlementStatus(),o.getFinalSettlementOther());
 			}
-			else if(i==26){
-				if (o.getReportRdAmount() !=null){
-					cell.setCellValue(o.getReportRdAmount().stripTrailingZeros().toPlainString());
-				}else cell.setCellValue("");
+			else if(i==35){//汇算清缴-加扣RD数
+				cell.setCellValue(o.getReportFormsRdNumber());
+			}
+			else if(i==36){//汇算清缴-知识产权加扣费用
+				cell.setCellValue(getBigDecimal(o.getIntellectualPropertyAmount()));
 			}
-			else if(i==27){
+			else if(i==37){//汇算清缴-加扣研发费用金额
+				cell.setCellValue(getBigDecimal(o.getReportRdAmount()));
+			}
+			else if(i==38){//研发准备金备案
 				addParam(cell,o.getRdReservesStatus(),o.getRdReservesOther());
 			}
-			else if(i==28){
+			else if(i==39){//研发奖补申请-是否完成
 				addParam(cell,o.getRdAwardCompensationStatus(),o.getRdAwardCompensationOther());
 			}
-			else if(i==29){
-				if (o.getRdAnnouncementAmount() !=null){
-					cell.setCellValue(o.getRdAnnouncementAmount().stripTrailingZeros().toPlainString());
-				}else cell.setCellValue("");
+			else if(i==40){//研发奖补申请-申请金额
+				cell.setCellValue(getBigDecimal(o.getRdApplicationFee()));
+			}
+			else if(i==41){//研发奖补申请-公示金额
+				cell.setCellValue(getBigDecimal(o.getRdAnnouncementAmount()));
 			}
-			else if(i==30){
+			else if(i==42){//研发奖补申请-其他
+				cell.setCellValue(o.getRdAnnouncementOther());
+			}
+			else if(i==43){//加扣备查交付
 				addParam(cell,o.getAdDeliverStatus(),o.getAdDeliverOther());
 			}
-			else if(i==31){
+			else if(i==44){//加扣是否归档
+				if(o.getAdDeliverFinish()==null){
+					cell.setCellValue("");
+				}else if(o.getAdDeliverFinish()==1){
+					cell.setCellValue("是");
+				}else if(o.getAdDeliverFinish()==0){
+					cell.setCellValue("否");
+				}
+			}
+			else if(i==45){//高新备查交付
 				addParam(cell,o.getHtDeliverStatus(),o.getHtDeliverOther());
 			}
-			else if(i==32){
+			else if(i==46){//高新是否归档
+				if (o.getHtDeliverFinish()==null){
+					cell.setCellValue("");
+				}else if(o.getHtDeliverFinish()==1){
+					cell.setCellValue("是");
+				}else if(o.getHtDeliverFinish()==0){
+					cell.setCellValue("否");
+				}
+			}
+			else if(i==47){//召开上年度会议于本年度工作计划
+				addParam(cell,o.getCloseMeetingStatus(),o.getCloseMeetingOther());
+			}
+			else if(i==48){//阶段性汇报
 				StringBuilder res= new StringBuilder();
 				if (o.getPhasedType()==1){
 					res.append("月度- ");
@@ -2056,68 +2097,87 @@ public class NewExcelUtil<T> {
 					res.append("季度- ");
 				}
 				String[] split = o.getPhasedContent().split(",");
-                for (String s : split) {
-                    res.append(s).append("月 ,");
-                }
+				for (String s : split) {
+					res.append(s).append("月 ,");
+				}
 				if(res.toString().contains(",")){
 					cell.setCellValue(res.substring(0,res.length()-1));
 				}else {
 					cell.setCellValue("");
 				}
 			}
-			else if(i==33){
+			else if(i==49){//立项资料编制-完成数
 				cell.setCellValue(o.getProjectApprovalWriteNumber());
-			}
-			else if(i==34){
-				cell.setCellValue(o.getProjectApprovalWriteRate());
-			}
-			else if(i==35){
+			}else if(i==50){//立项资料编制-完成率
+				cell.setCellValue(o.getProjectApprovalWriteRate()+"%");
+			}else if(i==51){//加扣预计申报7月
 				addParam(cell,o.getAdPrepareJulyStatus(),o.getAdPrepareJulyOther());
-			}
-			else if(i==36){
+			}else if(i==52){//加扣预计申报10月
 				addParam(cell,o.getAdPrepareOctoberStatus(),o.getAdPrepareOctoberOther());
-			}
-			else if(i==37){
-				cell.setCellValue(o.getIpDeclare());
-			}
-			else if(i==38){
-				cell.setCellValue(o.getIpAuthorize());
-			}
-			else if(i==39){
+			}else if(i==53){//知识产权-发明专利-申报数
+				cell.setCellValue(o.getIpInventionPatentDeclare());
+			}else if(i==54){//知识产权-发明专利-授权数
+				cell.setCellValue(o.getIpInventionPatentAuthorize());
+			}else if(i==55){///知识产权-发明专利-累计授权数
+				cell.setCellValue(o.getIpInventionPatentAuthorizeCount());
+			}else if(i==56){//实用新型-申报数
+				cell.setCellValue(o.getIpUtilityModelDeclare());
+			}else if(i==57){//实用新型-授权数
+				cell.setCellValue(o.getIpUtilityModelAuthorize());
+			}else if(i==58){//实用新型-累计授权数
+				cell.setCellValue(o.getIpUtilityModelAuthorizeCount());
+			}else if(i==59){//软著-申报数
+				cell.setCellValue(o.getIpSoftwareWorksDeclare());
+			}else if(i==60){//软著-授权数
+				cell.setCellValue(o.getIpSoftwareWorksAuthorize());
+			}else if(i==61){//软著-累计授权数
+				cell.setCellValue(o.getIpSoftwareWorksAuthorizeCount());
+			}else if(i==62){//软著-截止本年末可用于下次高新认定数量
+				cell.setCellValue(o.getIpHt());
+			}else if(i==63){//软著-I类数量
+				cell.setCellValue(o.getIpHtI());
+			}else if(i==64){//软著-II类数量
+				cell.setCellValue(o.getIpHtIi());
+			}else if(i==65){//公出指标-合同约定次数
 				cell.setCellValue(o.getPublicReleaseStipulation());
-			}
-			else if(i==40){
+			}else if(i==66){//公出指标-实际次数
 				cell.setCellValue(o.getPublicReleaseActual());
-			}
-			else if(i==41){
+			}else if(i==67){//培训指标(本年度)-合同约定次数
 				cell.setCellValue(o.getTrainingStipulation());
-			}
-			else if(i==42){
+			}else if(i==68){//培训指标(本年度)-实际次数
 				cell.setCellValue(o.getTrainingActual());
-			}
-			else if(i==43){
-				cell.setCellValue(o.getSpecialInspect());
-			}
-			else if(i==44){
-				cell.setCellValue(o.getSimulatedAudit());
-			}
-			else if(i==45){
-				cell.setCellValue(o.getFeaturedWorkOther());
-			}
-			else if(i==46){
+			}else if(i==69){//培训指标(本年度)-其他
+				cell.setCellValue(o.getTrainingOther());
+			}else if(i==70){//特色工作-专项检查
+				cell.setCellValue("");
+			}else if(i==71){//特色工作-模拟稽查
+				cell.setCellValue("");
+			}else if(i==72){//其他事项说明
+				cell.setCellValue(o.getRemarks());
+			}else if(i==73){//创新能力评价评分
+				cell.setCellValue(o.getHtScore());
+			}else if(i==74){//实际申报批次
+				cell.setCellValue(o.getHtBatch());
+			}else if(i==75){//是否重点关注
+				cell.setCellValue(o.getHtFocus()==1?"是":"否");
+			}else if(i==76){//网上系统提交
 				addParam(cell,o.getWebSubmit(),o.getWebSubmitOther());
-			}
-			else if(i==47){
+			}else if(i==77){//纸质材料提交
 				addParam(cell,o.getPaperSubmit(),o.getPaperSubmitOther());
-			}
-			else if(i==48){
-				cell.setCellValue(o.getReviewProvinceNumber());
-			}
-			else if(i==49){
-				cell.setCellValue(o.getReviewCountryNumber());
-			}
-			else if(i==50){
-				cell.setCellValue(DateUtils.formatDateYYYYMMddHHmm(o.getUpdateTime()));
+			}else if(i==78){//省级-拟公示序号
+				if(o.getReviewProvince()==0){
+					cell.setCellValue("淘汰");
+				}else {
+					cell.setCellValue("公示,序号:"+o.getReviewProvinceNumber());
+				}
+			}else if(i==79){//国家级-高企编号
+				if(o.getReviewCountry()==0){
+					cell.setCellValue("淘汰");
+				}else {
+					cell.setCellValue("公示,编号:"+o.getReviewCountryNumber());
+				}
+			}else if(i==80){//更新时间
+				cell.setCellValue(DateUtils.formatDateChineseYYYYMMddHH(o.getUpdateTime()));
 			}else {
 				cell.setCellValue("");
 			}
@@ -2126,6 +2186,14 @@ public class NewExcelUtil<T> {
 
 	}
 
+	private String getBigDecimal(BigDecimal bigDecimal) {
+		if (bigDecimal==null){
+			return "";
+		}else {
+			return bigDecimal.stripTrailingZeros().toPlainString();
+		}
+	}
+
 	private void addParam(Cell cell, Integer code, String desc) {
 		switch (code)
 		{

+ 23 - 0
src/main/java/com/goafanti/techproject/bo/InputTaskDetailsBo.java

@@ -0,0 +1,23 @@
+package com.goafanti.techproject.bo;
+
+public class InputTaskDetailsBo {
+
+    private Integer pageSize;
+    private Integer pageNo;
+
+    public Integer getPageSize() {
+        return pageSize;
+    }
+
+    public void setPageSize(Integer pageSize) {
+        this.pageSize = pageSize;
+    }
+
+    public Integer getPageNo() {
+        return pageNo;
+    }
+
+    public void setPageNo(Integer pageNo) {
+        this.pageNo = pageNo;
+    }
+}

+ 159 - 26
src/main/java/com/goafanti/techproject/bo/OutTaskDetailsBo.java

@@ -17,7 +17,7 @@ public class OutTaskDetailsBo {
      */
     private Integer memberStatus;
     private String serviceProject;
-    private String serviceyear;
+    private String serviceYear;
     /**
      * 会员等级
      */
@@ -104,11 +104,28 @@ public class OutTaskDetailsBo {
      * 实际立项RD数
      */
     private Integer actualRdNumber;
+
+    /**
+     * 实际委外数
+     */
+    private Integer actualOutsourcingNumber;
+    /**
+     * 实际合作项目数
+     */
+    private Integer actualCooperateNumber;
+    /**
+     * 实际技术合同登记数
+     */
+    private Integer actualRegistrationNumber;
     /**
      * 实际归集研发费用
      */
     private BigDecimal actualRdAmount;
     /**
+     * 研发预算完成进度
+     */
+    private Double rdCompletionProgress;
+    /**
      * 年度研发预算占比
      */
     private Double actualRdRate;
@@ -253,13 +270,41 @@ public class OutTaskDetailsBo {
      */
     private String adPrepareOctoberOther;
     /**
-     * 知识产权申报数
+        * 知识产权发明专利申报数
+     */
+    private Integer ipInventionPatentDeclare;
+    /**
+     * 当年知识产权发明专利授权数
      */
-    private Integer ipDeclare;
+    private Integer ipInventionPatentAuthorize;
     /**
-     * 知识产权授权数
+     * 累计知识产权发明专利授权数
      */
-    private Integer ipAuthorize;
+    private Integer ipInventionPatentAuthorizeCount;
+    /**
+     * 知识产权实用新型申报数
+     */
+    private Integer ipUtilityModelDeclare;
+    /**
+     * 当年知识产权实用新型授权数
+     */
+    private Integer ipUtilityModelAuthorize;
+    /**
+     * 累计知识产权实用新型授权数
+     */
+    private Integer ipUtilityModelAuthorizeCount;
+    /**
+     * 知识产权软著申报数
+     */
+    private Integer ipSoftwareWorksDeclare;
+    /**
+     * 当年知识产权软著授权数
+     */
+    private Integer ipSoftwareWorksAuthorize;
+    /**
+     * 累计知识产权软著授权数
+     */
+    private Integer ipSoftwareWorksAuthorizeCount;
     /**
      * 知识产权高新数
      */
@@ -373,7 +418,93 @@ public class OutTaskDetailsBo {
      */
     private Date createTime;
 
+    public Integer getIpInventionPatentDeclare() {
+        return ipInventionPatentDeclare;
+    }
+
+    public void setIpInventionPatentDeclare(Integer ipInventionPatentDeclare) {
+        this.ipInventionPatentDeclare = ipInventionPatentDeclare;
+    }
+
+    public Integer getIpInventionPatentAuthorize() {
+        return ipInventionPatentAuthorize;
+    }
 
+    public void setIpInventionPatentAuthorize(Integer ipInventionPatentAuthorize) {
+        this.ipInventionPatentAuthorize = ipInventionPatentAuthorize;
+    }
+
+    public Integer getIpInventionPatentAuthorizeCount() {
+        return ipInventionPatentAuthorizeCount;
+    }
+
+    public void setIpInventionPatentAuthorizeCount(Integer ipInventionPatentAuthorizeCount) {
+        this.ipInventionPatentAuthorizeCount = ipInventionPatentAuthorizeCount;
+    }
+
+    public Integer getIpUtilityModelDeclare() {
+        return ipUtilityModelDeclare;
+    }
+
+    public void setIpUtilityModelDeclare(Integer ipUtilityModelDeclare) {
+        this.ipUtilityModelDeclare = ipUtilityModelDeclare;
+    }
+
+    public Integer getIpUtilityModelAuthorize() {
+        return ipUtilityModelAuthorize;
+    }
+
+    public void setIpUtilityModelAuthorize(Integer ipUtilityModelAuthorize) {
+        this.ipUtilityModelAuthorize = ipUtilityModelAuthorize;
+    }
+
+    public Integer getIpUtilityModelAuthorizeCount() {
+        return ipUtilityModelAuthorizeCount;
+    }
+
+    public void setIpUtilityModelAuthorizeCount(Integer ipUtilityModelAuthorizeCount) {
+        this.ipUtilityModelAuthorizeCount = ipUtilityModelAuthorizeCount;
+    }
+
+    public Integer getIpSoftwareWorksDeclare() {
+        return ipSoftwareWorksDeclare;
+    }
+
+    public void setIpSoftwareWorksDeclare(Integer ipSoftwareWorksDeclare) {
+        this.ipSoftwareWorksDeclare = ipSoftwareWorksDeclare;
+    }
+
+    public Integer getIpSoftwareWorksAuthorize() {
+        return ipSoftwareWorksAuthorize;
+    }
+
+    public void setIpSoftwareWorksAuthorize(Integer ipSoftwareWorksAuthorize) {
+        this.ipSoftwareWorksAuthorize = ipSoftwareWorksAuthorize;
+    }
+
+    public Integer getIpSoftwareWorksAuthorizeCount() {
+        return ipSoftwareWorksAuthorizeCount;
+    }
+
+    public void setIpSoftwareWorksAuthorizeCount(Integer ipSoftwareWorksAuthorizeCount) {
+        this.ipSoftwareWorksAuthorizeCount = ipSoftwareWorksAuthorizeCount;
+    }
+
+    public Double getRdCompletionProgress() {
+        return rdCompletionProgress;
+    }
+
+    public void setRdCompletionProgress(Double rdCompletionProgress) {
+        this.rdCompletionProgress = rdCompletionProgress;
+    }
+
+    public String getServiceYear() {
+        return serviceYear;
+    }
+
+    public void setServiceYear(String serviceYear) {
+        this.serviceYear = serviceYear;
+    }
 
     public String getUserName() {
         return userName;
@@ -391,13 +522,6 @@ public class OutTaskDetailsBo {
         this.serviceProject = serviceProject;
     }
 
-    public String getServiceyear() {
-        return serviceyear;
-    }
-
-    public void setServiceyear(String serviceyear) {
-        this.serviceyear = serviceyear;
-    }
 
     public String getLastYear() {
         return lastYear;
@@ -927,21 +1051,7 @@ public class OutTaskDetailsBo {
         this.adPrepareOctoberOther = adPrepareOctoberOther;
     }
 
-    public Integer getIpDeclare() {
-        return ipDeclare;
-    }
 
-    public void setIpDeclare(Integer ipDeclare) {
-        this.ipDeclare = ipDeclare;
-    }
-
-    public Integer getIpAuthorize() {
-        return ipAuthorize;
-    }
-
-    public void setIpAuthorize(Integer ipAuthorize) {
-        this.ipAuthorize = ipAuthorize;
-    }
 
     public Integer getIpHt() {
         return ipHt;
@@ -1168,4 +1278,27 @@ public class OutTaskDetailsBo {
         this.createTime = createTime;
     }
 
+    public Integer getActualOutsourcingNumber() {
+        return actualOutsourcingNumber;
+    }
+
+    public void setActualOutsourcingNumber(Integer actualOutsourcingNumber) {
+        this.actualOutsourcingNumber = actualOutsourcingNumber;
+    }
+
+    public Integer getActualCooperateNumber() {
+        return actualCooperateNumber;
+    }
+
+    public void setActualCooperateNumber(Integer actualCooperateNumber) {
+        this.actualCooperateNumber = actualCooperateNumber;
+    }
+
+    public Integer getActualRegistrationNumber() {
+        return actualRegistrationNumber;
+    }
+
+    public void setActualRegistrationNumber(Integer actualRegistrationNumber) {
+        this.actualRegistrationNumber = actualRegistrationNumber;
+    }
 }

+ 18 - 0
src/main/java/com/goafanti/techproject/bo/TaskDetailsBo.java

@@ -11,6 +11,9 @@ public class TaskDetailsBo extends TaskDetails {
     private String contractNo;
 
     private String userName;
+
+    private String ServiceYear;
+    private String ServiceProject;
     /**
      * 会员  0否 1是
      */
@@ -25,6 +28,21 @@ public class TaskDetailsBo extends TaskDetails {
     List<Map<String,Object >> taskList;
     List<TaskFeature> featureList;
 
+    public String getServiceProject() {
+        return ServiceProject;
+    }
+
+    public void setServiceProject(String serviceProject) {
+        ServiceProject = serviceProject;
+    }
+
+    public String getServiceYear() {
+        return ServiceYear;
+    }
+
+    public void setServiceYear(String serviceYear) {
+        ServiceYear = serviceYear;
+    }
 
     public List<TaskFeature> getFeatureList() {
         return featureList;

+ 12 - 0
src/main/java/com/goafanti/techproject/controller/TaskDetailsController.java

@@ -6,6 +6,7 @@ import com.goafanti.common.controller.BaseController;
 import com.goafanti.common.model.TaskDetails;
 import com.goafanti.common.model.TaskDetailsLog;
 import com.goafanti.common.model.TaskFeature;
+import com.goafanti.techproject.bo.InputTaskDetailsBo;
 import com.goafanti.techproject.bo.InputTaskFeature;
 import com.goafanti.techproject.service.TaskDetailsService;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -122,6 +123,17 @@ public class TaskDetailsController extends BaseController {
     }
 
     /**
+     * 项目进度列表
+     *
+     * @param in 参数
+     * @return
+     */
+    @GetMapping("/detailsList")
+    public Result<TaskDetails> detailsList(InputTaskDetailsBo in) {
+        return new Result<>().data(this.taskDetailsService.detailsList(in));
+    }
+
+    /**
      * 导出数据
      *
      * @return

+ 3 - 0
src/main/java/com/goafanti/techproject/service/TaskDetailsService.java

@@ -3,6 +3,7 @@ package com.goafanti.techproject.service;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.model.TaskDetails;
 import com.goafanti.common.model.TaskFeature;
+import com.goafanti.techproject.bo.InputTaskDetailsBo;
 import com.goafanti.techproject.bo.InputTaskFeature;
 import com.goafanti.techproject.bo.TaskDetailsBo;
 
@@ -79,4 +80,6 @@ public interface TaskDetailsService {
 
 
     Result export();
+
+    Object detailsList(InputTaskDetailsBo in);
 }

+ 89 - 93
src/main/java/com/goafanti/techproject/service/impl/TaskDetailsServiceImpl.java

@@ -10,8 +10,8 @@ import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.order.bo.TOrderTaskBo;
+import com.goafanti.techproject.bo.InputTaskDetailsBo;
 import com.goafanti.techproject.bo.InputTaskFeature;
-import com.goafanti.techproject.bo.OutTaskDetailsBo;
 import com.goafanti.techproject.bo.TaskDetailsBo;
 import com.goafanti.techproject.service.TaskDetailsService;
 import org.springframework.beans.BeanUtils;
@@ -19,6 +19,7 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.lang.reflect.InvocationTargetException;
 import java.math.BigDecimal;
 import java.math.RoundingMode;
 import java.util.*;
@@ -81,84 +82,32 @@ public class TaskDetailsServiceImpl extends BaseMybatisDao<TaskDetailsMapper> im
                 yearSum=e.getYearSum();
             }
         }
-        if (tOrderTask.getProgressTid()==null){
-            //首先直接查找,找不到的情况下找订单
-            //如果是会员
-            TOrderTaskBo thisTask = null;
-            for (TOrderTaskBo e : collect2) {
-                if (e.getId().equals(id)){
-                    thisTask=e;
-                    break;
-                }
-            }
-            String serviceYear = getServiceYer(thisTask.getServiceYear());
-            Integer tid=null;
-            for (TOrderTaskBo e : collect2) {
-                //添加判定去掉赠字比对
-                String serviceYear2 =getServiceYer(e.getServiceYear());
-                if (serviceYear2.equals(serviceYear)){
-                    Map<String,Object> map=new HashMap<>();
-                    map.put("serviceYear", e.getServiceYear());
-                    map.put("taskName", e.getCommodityName());
-                    map.put("id",e.getId());
-                    //第一次进来是查本项目,没有的情况下查询同项目
-                    if (taskDetails==null){
-                        taskDetails=taskDetailsMapper.selectByTid(id);
-                    }
-                    if (taskDetails==null&&!e.getId().equals(id)&&e.getcSort()==6){
-                        taskDetails=taskDetailsMapper.selectByTid(e.getId());
-                        tid=e.getId();
-                    }
-                    list.add(map);
-                }
-            }
-            if (taskDetails !=null){
-                BeanUtils.copyProperties(taskDetails, res);
-            }
-            res.setUserName(mid.getBuyerName());
-            res.setOrderNo(tOrderNew.getOrderNo());
-            res.setContractNo(tOrderNew.getContractNo());
-            res.setMemberStatus(mid.getProjectType());
-            res.setTaskList(list);
-            BigDecimal totalAmount = tOrderNew.getTotalAmount().divide(new BigDecimal(yearSum), 2, RoundingMode.HALF_UP);
-            String lvl=getOrderLvl(totalAmount);
-            res.setMemberLvl(lvl);
-            res.setFeatureList(taskFeatureMapper.selectByTdId(id));
-            if (tid==null&&taskDetails!=null){
-                tid=taskDetails.getTid();
-                TOrderTask update =new TOrderTask();
-                update.setId(id);
-                update.setProgressTid(tid);
-                tOrderTaskMapper.update(update);
-            }
-        }else {
-            taskDetails=taskDetailsMapper.selectByTid(tOrderTask.getProgressTid());
-            //如果是会员
-            TOrderTaskBo thisTask = null;
-            for (TOrderTaskBo e : collect2) {
-                if (e.getId().equals(id)){
-                    thisTask=e;
-                    break;
-                }
-            }
-            String serviceYear = getServiceYer(thisTask.getServiceYear());
-            Integer tid=null;
-            list=addOrderList(collect2,serviceYear);
-            if (taskDetails !=null){
-                BeanUtils.copyProperties(taskDetails, res);
-            }
-            res.setUserName(mid.getBuyerName());
-            res.setOrderNo(tOrderNew.getOrderNo());
-            res.setContractNo(tOrderNew.getContractNo());
-            res.setMemberStatus(mid.getProjectType());
-            res.setTaskList(list);
-            BigDecimal totalAmount = tOrderNew.getTotalAmount().divide(new BigDecimal(yearSum), 2, RoundingMode.HALF_UP);
-            String lvl=getOrderLvl(totalAmount);
-            res.setMemberLvl(lvl);
-            if (taskDetails!=null&&taskDetails.getTid()!=null){
-                res.setFeatureList(taskFeatureMapper.selectByTdId(taskDetails.getId()));
+        taskDetails=taskDetailsMapper.selectById(tOrderTask.getProgressTid());
+        //如果是会员
+        TOrderTaskBo thisTask = null;
+        for (TOrderTaskBo e : collect2) {
+            if (e.getId().equals(id)){
+                thisTask=e;
+                break;
             }
         }
+        String serviceYear = getServiceYer(thisTask.getServiceYear());
+        list=addOrderList(collect2,serviceYear);
+        if (taskDetails !=null){
+                BeanUtils.copyProperties( taskDetails,res);
+        }
+        res.setUserName(mid.getBuyerName());
+        res.setOrderNo(tOrderNew.getOrderNo());
+        res.setContractNo(tOrderNew.getContractNo());
+        res.setServiceYear(serviceYear);
+        res.setMemberStatus(mid.getProjectType());
+        res.setTaskList(list);
+        BigDecimal totalAmount = tOrderNew.getTotalAmount().divide(new BigDecimal(yearSum), 2, RoundingMode.HALF_UP);
+        String lvl=getOrderLvl(totalAmount);
+        res.setMemberLvl(lvl);
+        if (taskDetails!=null&&taskDetails.getTid()!=null){
+            res.setFeatureList(taskFeatureMapper.selectByTdId(taskDetails.getId()));
+        }
         return res;
     }
 
@@ -167,6 +116,11 @@ public class TaskDetailsServiceImpl extends BaseMybatisDao<TaskDetailsMapper> im
         return null;
     }
 
+    @Override
+    public Object detailsList(InputTaskDetailsBo in) {
+        return null;
+    }
+
     private String getServiceYer(String serviceYear) {
         String serviceYear2=null;
         if (StringUtils.isEmpty(serviceYear)){
@@ -223,23 +177,56 @@ public class TaskDetailsServiceImpl extends BaseMybatisDao<TaskDetailsMapper> im
         //数据计算
         countTaskDetails(taskDetails);
         this.taskDetailsMapper.insert(taskDetails);
+        updateTask(taskDetails,tOrderNew.getOrderNo());
+
         //新增日志数据
         if (type==1){
-            addTaskDetailsLog(taskDetails);
+            try {
+                addTaskDetailsLog(taskDetails);
+            } catch (InvocationTargetException | IllegalAccessException e) {
+                throw new RuntimeException(e);
+            }
         }
         return taskDetails;
     }
 
+    private void updateTask(TaskDetails taskDetails, String orderNo) {
+        List<TOrderTaskBo> tOrderTaskBos = tOrderTaskMapper.selectOrderTaskAll(orderNo, null);
+        List<TOrderTaskBo> collect = tOrderTaskBos.stream().filter(e -> e.getSplitStatus() == 0||e.getSplitStatus() == 2).collect(Collectors.toList());
+        //如果是会员
+        TOrderTaskBo thisTask = null;
+        for (TOrderTaskBo e : collect) {
+            if (e.getId().equals(taskDetails.getTid())){
+                thisTask=e;
+                break;
+            }
+        }
+        String serviceYear = getServiceYer(thisTask.getServiceYear());
+        for (TOrderTaskBo tOrderTaskBo : collect) {
+            if (serviceYear != null ){
+                String serviceYer2 = getServiceYer(tOrderTaskBo.getServiceYear());
+                if (serviceYear.equals(serviceYer2)){
+                    TOrderTask updatedTask = new TOrderTask();
+                    updatedTask.setId(tOrderTaskBo.getId());
+                    updatedTask.setProgressTid(taskDetails.getId());
+                    tOrderTaskMapper.update(updatedTask);
+                }
+
+            }
+
+        }
+    }
+
     /**
      *新增的时候特殊数据可以是单传输,修改的时候可以多传
      *
      * @param taskDetails 项目进度数据
      *
      */
-    private void addTaskDetailsLog(TaskDetails taskDetails) {
+    private void addTaskDetailsLog(TaskDetails taskDetails) throws InvocationTargetException, IllegalAccessException {
         Admin adminToken = TokenManager.getAdminToken();
         TaskDetailsLog log=new TaskDetailsLog();
-        BeanUtils.copyProperties(taskDetails, log);
+        BeanUtils.copyProperties( taskDetails,log);
         log.setTdid(taskDetails.getId());
         log.setId(null);
         log.setAid(adminToken.getId());
@@ -332,7 +319,11 @@ public class TaskDetailsServiceImpl extends BaseMybatisDao<TaskDetailsMapper> im
         TaskDetails res = this.queryById(taskDetails.getId());
         //调用就保存,不需要区分不保存
 //        if (type !=null&&type==1){
+        try {
             addTaskDetailsLog(res);
+        } catch (InvocationTargetException | IllegalAccessException e) {
+            throw new RuntimeException(e);
+        }
 //        }
         return res;
     }
@@ -360,20 +351,25 @@ public class TaskDetailsServiceImpl extends BaseMybatisDao<TaskDetailsMapper> im
 
 
     @Override
-    public Result exportById(Integer id) {
-        OutTaskDetailsBo res = new OutTaskDetailsBo();
-        NewExcelUtil<OutTaskDetailsBo> excel=new NewExcelUtil<>(OutTaskDetailsBo.class);
+    public Result exportById(Integer id)  {
+        NewExcelUtil<TaskDetailsBo> excel=new NewExcelUtil<>(TaskDetailsBo.class);
         TaskDetailsBo byTid = pushByTid(id);
-        BeanUtils.copyProperties(byTid,res);
-        StringBuffer sb = new StringBuffer();
-        byTid.getTaskList().forEach(e->{
-            if (res.getServiceyear()==null){
-                res.setServiceyear((String) e.get("serviceYear"));
+        pushGetServiceProject(byTid);
+        return excel.exportTaskDetailsExcel(byTid,"项目进度表",uploadPath);
+    }
+
+    private void pushGetServiceProject( TaskDetailsBo res) {
+        List<Map<String, Object>> taskList = res.getTaskList();
+        String serviceYear = null;
+        if (taskList!=null){
+            StringBuffer sb = new StringBuffer();
+            for (Map<String, Object> map : taskList) {
+                sb.append(map.get("taskName")).append("-").append(map.get("serviceYear")).append(",");
+                if (serviceYear==null)serviceYear = (String) map.get("serviceYear");
             }
-            sb.append(e.get("taskName")).append("; ");
-        });
-        res.setServiceProject(sb.toString());
-        return excel.exportTaskDetailsExcel(res,"项目进度表",uploadPath);
+            res.setServiceYear(serviceYear);
+            res.setServiceProject(sb.substring(0,sb.length()-1));
+        }
     }
 
     @Override
@@ -429,7 +425,7 @@ public class TaskDetailsServiceImpl extends BaseMybatisDao<TaskDetailsMapper> im
         String serviceYear = getServiceYer(thisTask.getServiceYear());
         list=addOrderList(tOrderTaskBos, serviceYear);
         if (taskDetails !=null){
-            BeanUtils.copyProperties(log, res);
+                BeanUtils.copyProperties(log, res);
         }
         res.setUserName(mid.getBuyerName());
         res.setOrderNo(tOrderNew.getOrderNo());

+ 2 - 2
src/main/resources/props/config_local.properties

@@ -1,8 +1,8 @@
 dev.name=local
 jdbc.driverClassName=com.mysql.jdbc.Driver
 
-static.host=//static.jishutao.com/1.3.37
-#static.host=//172.16.1.187/1.3.37
+static.host=//static.jishutao.com/1.3.38
+#static.host=//172.16.1.187/1.3.38
 
 #jdbc.url=jdbc\:mysql://localhost:3306/aft20241122?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
 #jdbc.url=jdbc\:mysql://localhost:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false

+ 1 - 1
src/main/resources/props/config_test.properties

@@ -1,5 +1,5 @@
 dev.name=test
-static.host=//static.jishutao.com/1.3.37
+static.host=//static.jishutao.com/1.3.38
 #Driver
 jdbc.driverClassName=com.mysql.jdbc.Driver
 jdbc.url=jdbc:mysql://127.0.0.1:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false