Browse Source

高新口径-高新研发费用辅助明细账

zhouli 9 months ago
parent
commit
edaf510804

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

@@ -6,8 +6,8 @@
     <resultMap id="ResultMap" type="org.sky.scientific.pojo.entity.XmFinanceEntity">
     <resultMap id="ResultMap" type="org.sky.scientific.pojo.entity.XmFinanceEntity">
         <id column="id" property="id"/>
         <id column="id" property="id"/>
         <result column="xm_id" property="xmId"/>
         <result column="xm_id" property="xmId"/>
-        <result column="xmbh" property="xmbh"/>
-        <result column="xmmc" property="xmmc"/>
+        <result column="XMBH" property="xmbh"/>
+        <result column="XMMC" property="xmmc"/>
         <result column="type" property="type"/>
         <result column="type" property="type"/>
         <result column="create_user" property="createUser"/>
         <result column="create_user" property="createUser"/>
         <result column="create_dept" property="createDept"/>
         <result column="create_dept" property="createDept"/>
@@ -38,7 +38,6 @@
               COALESCE((SELECT bgrz.BGHDZ FROM kd_xm_bgrz bgrz WHERE bgrz.XM_ID = xm.id AND bgrz.ZDMC = 'XMKSSJ' AND DATE_FORMAT(bgrz.BGSXSJ,'%Y') <![CDATA[<=]]> #{ew.yearAndMonth} ORDER BY bgrz.BGSXSJ DESC LIMIT 1),XMKSSJ) AS XMKSSJ,
               COALESCE((SELECT bgrz.BGHDZ FROM kd_xm_bgrz bgrz WHERE bgrz.XM_ID = xm.id AND bgrz.ZDMC = 'XMKSSJ' AND DATE_FORMAT(bgrz.BGSXSJ,'%Y') <![CDATA[<=]]> #{ew.yearAndMonth} ORDER BY bgrz.BGSXSJ DESC LIMIT 1),XMKSSJ) AS 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') <![CDATA[<=]]> #{ew.yearAndMonth} 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 = 'XMJSSJ' AND DATE_FORMAT(bgrz.BGSXSJ,'%Y') <![CDATA[<=]]> #{ew.yearAndMonth} ORDER BY bgrz.BGSXSJ DESC LIMIT 1),XMJSSJ) AS XMJSSJ
            FROM kd_xm xm
            FROM kd_xm xm
-           WHERE #{ew.yearAndMonth} between XMKSSJ and XMJSSJ
         ) xm ON xm.id = kxf.xm_id
         ) xm ON xm.id = kxf.xm_id
         WHERE kxf.year_and_month = #{ew.yearAndMonth} and kxf.type = #{ew.type}
         WHERE kxf.year_and_month = #{ew.yearAndMonth} and kxf.type = #{ew.type}
         <if test="ew.xmmc!=null and ew.xmmc!=''">and xm.XMMC like concat('%',#{ew.xmmc},'%')</if>
         <if test="ew.xmmc!=null and ew.xmmc!=''">and xm.XMMC like concat('%',#{ew.xmmc},'%')</if>

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

@@ -120,7 +120,7 @@ public class XmFinanceServiceImpl extends BaseServiceImpl<XmFinanceMapper, XmFin
 		List<Long> collect = xmIdList.stream().filter(item -> !XmIdFinances.contains(item)).toList();
 		List<Long> collect = xmIdList.stream().filter(item -> !XmIdFinances.contains(item)).toList();
 		//保存
 		//保存
 		if (Func.isEmpty(collect)) {
 		if (Func.isEmpty(collect)) {
-			throw new ServiceException("无研发项目可引入");
+			throw new ServiceException("年度研发项目已全部引入");
 		}
 		}
 		List<XmFinanceEntity> insertList = new ArrayList<>();
 		List<XmFinanceEntity> insertList = new ArrayList<>();
 		for (Long xmId : collect) {
 		for (Long xmId : collect) {