Browse Source

000000013

zhoulisky 6 months ago
parent
commit
0870af973e

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

@@ -36,4 +36,7 @@ public class XmUpdateDto {
 	@Schema(description = "其他资料")
 	private String qtzl;
 
+	@Schema(description = "备注")
+	private String remark;
+
 }

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

@@ -105,4 +105,7 @@ public class XmEntity extends TenantEntity {
 
 	@Schema(description = "状态,0:暂存,1:开展中,2:已结题,3:项目暂停,4:项目终止")
 	private Integer status;
+
+	@Schema(description = "备注")
+	private String remark;
 }

+ 3 - 0
kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/vo/DeductionCostItemVO.java

@@ -8,6 +8,9 @@ import lombok.EqualsAndHashCode;
 @Data
 public class DeductionCostItemVO extends CostItemVO {
 
+	@Schema(description = "税法规定的归集金额")
+	private Double gjje = 0.00;
+
 	@Schema(description = "1、人员人工费用")
 	private Double ryrgfy = 0.00;
 

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

@@ -23,6 +23,7 @@
         <result column="LXPW" property="lxpw"/>
         <result column="LXBG" property="lxbg"/>
         <result column="QTZL" property="qtzl"/>
+        <result column="remark" property="remark"/>
         <result column="create_user" property="createUser"/>
         <result column="create_dept" property="createDept"/>
         <result column="create_time" property="createTime"/>
@@ -47,6 +48,7 @@
             <if test="lxpw != null and lxpw!=''">lxpw = #{lxpw},</if>
             <if test="lxbg != null and lxbg!=''">lxbg = #{lxbg},</if>
             <if test="qtzl != null and qtzl!=''">qtzl = #{qtzl},</if>
+            <if test="remark != null and remark!=''">remark = #{remark},</if>
         </trim>
         where id = #{xmId}
     </update>
@@ -162,7 +164,8 @@
             XMYSZEMX,
             LXPW,
             LXBG,
-            QTZL
+            QTZL,
+            remark
         FROM kd_xm xm
         where id = #{xmId}
     </select>

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

@@ -154,7 +154,7 @@
         FROM kd_xm_technician_hours h
         left join
         (
-            SELECT m.id, m.XMKSSJ,
+            SELECT m.id, m.XMKSSJ, m.xmbh,
                 COALESCE(get_xm_info(m.id, 'XMJSSJ', #{yearAndMonth}),XMJSSJ) AS XMJSSJ
             FROM kd_xm m
             WHERE m.is_deleted = 0 and DATE_FORMAT(XMKSSJ, '%Y%m') <![CDATA[<=]]> #{yearAndMonth}

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

@@ -295,7 +295,7 @@ public class ArchiveServiceImpl implements IArchiveService {
 			types = Arrays.asList(1, 2, 4, 5, 7, 9, 11, 14, 21, 22, 23, 25, 27);
 		} else {
 			dir = "加计扣除备查资料";
-			types = Arrays.asList(3, 4, 6, 8, 10, 13, 15, 19, 20, 26, 28);
+			types = Arrays.asList(3, 4, 6, 8, 10, 13, 16, 19, 20, 26, 28);
 		}
 		Date date = new Date();
 
@@ -1374,7 +1374,7 @@ public class ArchiveServiceImpl implements IArchiveService {
 		for (int i = 1; i <= 12; i++) {
 			String yearAndMonth = year + (i < 10 ? "0" + i : i);
 			XmLeaseEntity param = new XmLeaseEntity();
-			param.setType("仪器设备");
+//			param.setType("仪器设备");
 			param.setYearAndMonth(yearAndMonth);
 			param.setXmId(xmId);
 			List<JSONObject> leaseList = xmLeaseService.yanfazulinzichanfeiyongfenpeibiao(param);
@@ -1395,7 +1395,7 @@ public class ArchiveServiceImpl implements IArchiveService {
 
 	@SneakyThrows
 	private void generateD17_2_1_2(String year, Path path, Long xmId, String type) {
-		String fileName = type.equals("材料") ? "领料单" : (type.equals("动力") ? "研发动力耗用单" : "研发燃料耗用单") + ".xlsx";
+		String fileName = type.equals("材料") ? "领料单.xlsx" : (type.equals("动力") ? "研发动力耗用单" : "研发燃料耗用单") + ".xlsx";
 		for (int i = 1; i <= 12; i++) {
 			String yearAndMonth = year + (i < 10 ? "0" + i : i);
 			XmGoodsDTO param = new XmGoodsDTO();

+ 4 - 2
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/XmCostDetailsServiceImpl.java

@@ -654,7 +654,7 @@ public class XmCostDetailsServiceImpl extends BaseServiceImpl<XmCostDetailsMappe
 			for (DeductionCostItemVO vo : vos) {
 				if (vo.getAdSubjectEnable() == 0) {
 					//四级科目 不是加计扣除研发费用科目,费用不归集
-					continue;
+ 					continue;
 				}
 				if (dto.getType() == 1) {
 					//费用化
@@ -717,6 +717,7 @@ public class XmCostDetailsServiceImpl extends BaseServiceImpl<XmCostDetailsMappe
 						throw new ServiceException("费用归集出错啦");
 					}
 				}
+				vo.setGjje(vo.getRyrgfy() + vo.getZjtrfy() + vo.getZjfy() + vo.getWxzctx() + vo.getXcpsjfd() + vo.getQtxgfy() + vo.getWtjnjgfy() + vo.getWtjwjgfy());
 			}
 		}
 		return list;
@@ -752,6 +753,7 @@ public class XmCostDetailsServiceImpl extends BaseServiceImpl<XmCostDetailsMappe
 			obj.put("qtxgfy", item.getQtxgfy());
 			obj.put("wtjnjgfy", item.getWtjnjgfy());
 			obj.put("wtjwjgfy", item.getWtjwjgfy());
+			obj.put("gjje", item.getRyrgfy()+item.getZjtrfy()+item.getZjfy()+item.getWxzctx()+item.getXcpsjfd()+item.getQtxgfy()+item.getWtjnjgfy()+item.getWtjwjgfy());
 			results.add(obj);
 		}
 		map.put("type", vo.getType() == 1 ? "费用化" : "资本化");
@@ -770,7 +772,7 @@ public class XmCostDetailsServiceImpl extends BaseServiceImpl<XmCostDetailsMappe
 		map.put("wtjnjgfyTotal", BigDecimal.valueOf(costList.stream().mapToDouble(DeductionCostItemVO::getWtjnjgfy).sum()));
 		map.put("wtjwjgfyTotal", BigDecimal.valueOf(costList.stream().mapToDouble(DeductionCostItemVO::getWtjwjgfy).sum()));
 		map.put("amountTotal", costList.stream().map(DeductionCostItemVO::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add));
-
+		map.put("gjjeTotal", BigDecimal.valueOf(costList.stream().mapToDouble(DeductionCostItemVO::getGjje).sum()));
 		WriteSheet writeSheet = EasyExcel.writerSheet().build();
 		FillConfig fillConfig = FillConfig.builder().forceNewRow(Boolean.TRUE).build();
 		//设置list集合数据

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

@@ -87,10 +87,11 @@ public class XmServiceImpl extends BaseServiceImpl<XmMapper, XmEntity> implement
 			return false;
 		}
 		Integer status = byXmId.getInteger("status");
-		Date xmjssj = byXmId.getDate("xmjssj");
-		if (Func.equals(status, XmStatusEnum.已结题.getCode()) || xmjssj.compareTo(new Date()) < 0) {
+//		Date xmjssj = byXmId.getDate("xmjssj");
+//		if (Func.equals(status, XmStatusEnum.已结题.getCode()) || xmjssj.compareTo(new Date()) < 0) {
+		if (Func.equals(status, XmStatusEnum.已结题.getCode())) {
 			if(isThrowEx){
-				throw new ServiceException("项目已结题/已到期,不可操作");
+				throw new ServiceException("项目已结题,不可操作");
 			}else {
 				return true;
 			}
@@ -175,9 +176,9 @@ public class XmServiceImpl extends BaseServiceImpl<XmMapper, XmEntity> implement
 	@Override
 	public boolean updateXm(XmUpdateDto dto) {
 		XmVO dbXm = baseMapper.selectByXmId(dto.getXmId());
-		if (XmStatusEnum.暂存.getCode() != dbXm.getStatus()) {
-			throw new ServiceException("只有项目状态为暂存时才能修改项目信息");
-		}
+//		if (XmStatusEnum.暂存.getCode() != dbXm.getStatus()) {
+//			throw new ServiceException("只有项目状态为暂存时才能修改项目信息");
+//		}
 		return baseMapper.updateXm(dto);
 	}
 

BIN
kd-service/kd-scientific/src/main/resources/export-template/对外报表管理/加计扣除-研发支出辅助明细账.xls


BIN
kd-service/kd-scientific/src/main/resources/export-template/研发项目管理/预算编制/委托外部研究开发费.xls