Sfoglia il codice sorgente

update 高企认定申请&&详情

Antiloveg 8 anni fa
parent
commit
47e9eda2be

+ 19 - 12
src/main/java/com/goafanti/admin/controller/AdminApiController.java

@@ -819,15 +819,18 @@ public class AdminApiController extends BaseApiController {
 	 * @return
 	 */
 	@RequestMapping(value = "/applyCognizance", method = RequestMethod.POST)
-	public Result applyCognizance(String contacts, String comment, String consultant, String uid) {
+	public Result applyCognizance(String contacts, String comment, String consultant, String uid, Integer year) {
 		Result res = new Result();
+		if (null == year){
+			res.getError().add(buildError(ErrorConstants.DUPLICATE_DATA_ERROR, "申请认定年份不能为空!"));
+		}
 		OrgCognizance c = new OrgCognizance();
 		c.setId(UUID.randomUUID().toString());
 		c.setUid(uid);
 		c.setContacts(contacts);
 		c.setComment(comment);
 		c.setConsultant(consultant);
-		c.setYear(Calendar.getInstance().get(Calendar.YEAR));
+		c.setYear(year);
 		c.setDeletedSign(0);
 		orgCognizanceService.insert(c);
 		return res;
@@ -878,9 +881,9 @@ public class AdminApiController extends BaseApiController {
 	 * @return
 	 */
 	@RequestMapping(value = "/cognizanceDetail", method = RequestMethod.POST)
-	public Result cognizanceDetail(String uid, String cid) {
+	public Result cognizanceDetail(String uid, String cid, Integer year) {
 		Result res = new Result();
-		res.setData(handleCognizanceDetail(uid, cid));
+		res.setData(handleCognizanceDetail(uid, cid, year));
 		return res;
 	}
 
@@ -925,7 +928,7 @@ public class AdminApiController extends BaseApiController {
 	 * @param u
 	 * @return
 	 */
-	@RequestMapping(value = "disposeAble", method = RequestMethod.POST)
+	@RequestMapping(value = "/disposeAble", method = RequestMethod.POST)
 	public Result disposeAble(UserAbility u) {
 		Result res = new Result();
 		if (null == u.getId()) {
@@ -1031,10 +1034,10 @@ public class AdminApiController extends BaseApiController {
 				auditStatus, pNo, pSize);
 	}
 
-	private CognizanceDetailBo handleCognizanceDetail(String uid, String cid) {
+	private CognizanceDetailBo handleCognizanceDetail(String uid, String cid, Integer year) {
 		CognizanceDetailBo cog = new CognizanceDetailBo();
 
-		CognizanceOrgInfoBo orgInfo = orgCognizanceService.selectCognizanceOrgInfoBoByUid(uid, cid);
+		CognizanceOrgInfoBo orgInfo = orgCognizanceService.selectCognizanceOrgInfoBoByUidAndCid(uid, cid);
 		cog.setUid(null == orgInfo.getUid() ? "" : orgInfo.getUid());
 		cog.setCid(null == orgInfo.getCid() ? "" : orgInfo.getCid());
 		cog.setUnitName(null == orgInfo.getUnitName() ? "" : orgInfo.getUnitName());
@@ -1048,12 +1051,12 @@ public class AdminApiController extends BaseApiController {
 				null == orgInfo.getBasicResearchCost() ? new BigDecimal(0) : orgInfo.getBasicResearchCost());
 		cog.setAccident(null == orgInfo.getAccient() ? 0 : orgInfo.getAccient());
 
-		CognizanceResearchCostBo researchCost = orgCognizanceService.selectCognizanceResearchCostBoByUid(uid);
+		CognizanceResearchCostBo researchCost = orgCognizanceService.selectCognizanceResearchCostBoByUidAndYear(year, uid);
 		cog.setResearchCost(
 				null == researchCost.getResearchCost() ? new BigDecimal(0) : researchCost.getResearchCost());
 		cog.setTerritory(null == researchCost.getTerritory() ? new BigDecimal(0) : researchCost.getTerritory());
 
-		CognizanceManageCostBo manageCost = orgCognizanceService.selectCognizanceManageCostBoByUid(uid);
+		CognizanceManageCostBo manageCost = orgCognizanceService.selectCognizanceManageCostBoByUidAndYear(year, uid);
 		cog.setNetAsset1(null == manageCost.getNetAsset1() ? new BigDecimal(0) : manageCost.getNetAsset1());
 		cog.setNetAsset2(null == manageCost.getNetAsset2() ? new BigDecimal(0) : manageCost.getNetAsset2());
 		cog.setNetAsset3(null == manageCost.getNetAsset3() ? new BigDecimal(0) : manageCost.getNetAsset3());
@@ -1064,14 +1067,18 @@ public class AdminApiController extends BaseApiController {
 		cog.setGrossProfit2(null == manageCost.getGrossProfit2() ? new BigDecimal(0) : manageCost.getGrossProfit2());
 		cog.setGrossProfit3(null == manageCost.getGrossProfit3() ? new BigDecimal(0) : manageCost.getGrossProfit3());
 
-		CognizanceCatagoryBo catagory = orgCognizanceService.selectCognizanceCatagoryBoByUid(uid);
+		CognizanceCatagoryBo catagory = orgCognizanceService.selectCognizanceCatagoryBoByUidAndYear(year, uid);
 		cog.setFirstCatagory(null == catagory.getFirstCatagory() ? 0 : catagory.getFirstCatagory());
 		cog.setSecondCatagory(null == catagory.getSecondCatagory() ? 0 : catagory.getSecondCatagory());
 		cog.setFirmTotal(null == catagory.getFirmTotal() ? 0 : catagory.getFirmTotal());
 		cog.setTechTotal(null == catagory.getTechTotal() ? 0 : catagory.getTechTotal());
 		cog.setTotalRevenue(null == catagory.getTotalRevenue() ? new BigDecimal(0) : catagory.getTotalRevenue());
-
-		cog.setLastYearRevenue(orgCognizanceService.selectLastYearRevenueByUid(uid));
+        BigDecimal revenue = orgCognizanceService.selectLastYearRevenueByUidAndYear(year, uid);
+        if (null != revenue){
+        	cog.setLastYearRevenue(revenue);
+        } else {
+        	cog.setLastYearRevenue(new BigDecimal(0));
+        }
 		return cog;
 	}
 

+ 5 - 5
src/main/java/com/goafanti/common/dao/OrgCognizanceMapper.java

@@ -21,13 +21,13 @@ public interface OrgCognizanceMapper {
 
     int updateByPrimaryKey(OrgCognizance record);
 
-	CognizanceOrgInfoBo selectCognizanceOrgInfoBoByUid(String uid, String cid);
+	CognizanceOrgInfoBo selectCognizanceOrgInfoBoByUidAndCid(String uid, String cid);
 
-	CognizanceResearchCostBo selectCognizanceResearchCostBoByUid(String uid);
+	CognizanceResearchCostBo selectCognizanceResearchCostBoByUidAndYear(Integer year, String uid);
 
-	CognizanceManageCostBo selectCognizanceManageCostBoByUid(String uid);
+	CognizanceManageCostBo selectCognizanceManageCostBoByUidAndYear(Integer year, String uid);
 
-	CognizanceCatagoryBo selectCognizanceCatagoryBoByUid(String uid);
+	CognizanceCatagoryBo selectCognizanceCatagoryBoByUidAndYear(Integer year, String uid);
 
-	BigDecimal selectLastYearRevenueByUid(String uid);
+	BigDecimal selectLastYearRevenueByUidAndYear(Integer year, String uid);
 }

+ 51 - 52
src/main/java/com/goafanti/common/mapper/OrgCognizanceMapper.xml

@@ -311,80 +311,79 @@
 	</select>
 	
 	
-	<select id="selectCognizanceOrgInfoBoByUid"  resultType="com.goafanti.techservice.cognizance.bo.CognizanceOrgInfoBo">
+	<select id="selectCognizanceOrgInfoBoByUidAndCid"  resultType="com.goafanti.techservice.cognizance.bo.CognizanceOrgInfoBo">
 		select u.id as uid, c.id as cid, o.unit_name as unitName, o.org_code as orgCode, o.postal_address as postalAddress, 
 			c.contacts, c.technical_field1 as technicalField1, c.technical_field2 as technicalField2, c.technical_field3 as technicalField3,
 			c.basic_research_cost as basicResearchCost, c.accident
-		from user u 
-		LEFT JOIN organization_identity o on u.id = o.uid and u.id = #{0}
-		INNER JOIN org_cognizance c on c.uid = u.id and u.id = #{0} and c.deleted_sign = 0 and c.id = #{1}
+    	from  (select id from user where id = #{0}) u
+			LEFT JOIN organization_identity o on u.id = o.uid 
+			INNER JOIN org_cognizance c on c.uid = u.id  and c.deleted_sign = 0 and c.id = #{1}
 	</select>
 	
-	<select id="selectCognizanceResearchCostBoByUid" parameterType="java.lang.String" resultType="com.goafanti.techservice.cognizance.bo.CognizanceResearchCostBo">
+	<select id="selectCognizanceResearchCostBoByUidAndYear"  resultType="com.goafanti.techservice.cognizance.bo.CognizanceResearchCostBo">
 		select m.uid, sum(m.cost1) as researchCost, sum(m.territory) as territory from(
 			select uid, (internal_labor_cost + internal_direct_cost + internal_depreciation_cost + internal_amortization_cost 
 			+ internal_design_cost + internal_equipment_cost + internal_other_cost +external_total_cost) as cost1, 
 			external_abroad_cost as territory
 			 from org_activity_cost 
-    where uid = #{uid,jdbcType=VARCHAR} and (start_date >= (select  str_to_date(CONCAT(year,day), '%Y-%m-%d %H')  from (
-			SELECT (DATE_FORMAT(NOW(), '%Y')-3) as year ,'-01-01' as day FROM DUAL) x)
-      and start_date <![CDATA[ < ]]> (select  str_to_date(CONCAT(year,day), '%Y-%m-%d %H')  from (
-			SELECT DATE_FORMAT(NOW(), '%Y') as year ,'-01-01' as day FROM DUAL) z) )
-			or (end_date <![CDATA[ < ]]> (select  str_to_date(CONCAT(year,day), '%Y-%m-%d %H')  from (
-			SELECT DATE_FORMAT(NOW(), '%Y') as year ,'-01-01' as day FROM DUAL) y)  and 
-      end_date >= (select  str_to_date(CONCAT(year,day), '%Y-%m-%d %H')  from (
-			SELECT (DATE_FORMAT(NOW(), '%Y')-3) as year ,'-01-01' as day FROM DUAL) k))
+    where uid = #{1} and (start_date >= (select  str_to_date(CONCAT(#{0}-3,'-01-01'), '%Y-%m-%d %H'))
+      and start_date <![CDATA[ < ]]> (select  str_to_date(CONCAT(#{0},'-01-01'), '%Y-%m-%d %H'))) 
+			or (end_date <![CDATA[ < ]]> (select  str_to_date(CONCAT(#{0},'-01-01'), '%Y-%m-%d %H'))   and 
+      end_date >= (select  str_to_date(CONCAT(#{0}-3,'-01-01'), '%Y-%m-%d %H')))
       and deleted_sign = 0
 		) m
+
 	</select>
 	
-	<select id="selectCognizanceManageCostBoByUid" parameterType="java.lang.String" resultType="com.goafanti.techservice.cognizance.bo.CognizanceManageCostBo">
-		select a.uid, a.netAsset1, a.salesRevenue1, a.grossProfit1, b.netAsset2, b.salesRevenue2, b.grossProfit2, 
+	<select id="selectCognizanceManageCostBoByUidAndYear"  resultType="com.goafanti.techservice.cognizance.bo.CognizanceManageCostBo">
+		select u.id as uid, a.netAsset1, a.salesRevenue1, a.grossProfit1, b.netAsset2, b.salesRevenue2, b.grossProfit2, 
 			  c.netAsset3, c.salesRevenue3, c.grossProfit3 from 
+      (select id from user where id = #{1}) u
+      LEFT JOIN
 			(
-			select uid, net_asset as netAsset1, gross_profit as grossProfit1, sales_revenue as salesRevenue1 from org_finance where uid = #{uid,jdbcType=VARCHAR} and year = 
-			(SELECT (DATE_FORMAT(NOW(), '%Y')-1)  FROM DUAL ) and deleted_sign = 0
-			)  a INNER JOIN
+			select uid, net_asset as netAsset1, gross_profit as grossProfit1, sales_revenue as salesRevenue1 from org_finance where uid = #{1} and year = 
+			#{0}-1 and deleted_sign = 0
+			)  a ON a.uid = u.id 
+      LEFT JOIN
 			(
-			select uid, net_asset as netAsset2, gross_profit as grossProfit2, sales_revenue as salesRevenue2 from org_finance where uid = #{uid,jdbcType=VARCHAR} and year = 
-			(SELECT (DATE_FORMAT(NOW(), '%Y')-2)  FROM DUAL ) and deleted_sign = 0
-			) b on a.uid = b. uid
-			INNER JOIN
+			select uid, net_asset as netAsset2, gross_profit as grossProfit2, sales_revenue as salesRevenue2 from org_finance where uid = #{1} and year = 
+			#{0}-2 and deleted_sign = 0
+			) b on b.uid = u. id
+			LEFT  JOIN
 			(
-			select uid, net_asset as netAsset3, gross_profit as grossProfit3, sales_revenue as salesRevenue3 from org_finance where uid = #{uid,jdbcType=VARCHAR} and year = 
-			(SELECT (DATE_FORMAT(NOW(), '%Y')-3)  FROM DUAL ) and deleted_sign = 0
-			) c on a.uid = c.uid
+			select uid, net_asset as netAsset3, gross_profit as grossProfit3, sales_revenue as salesRevenue3 from org_finance where uid = #{1} and year = 
+			#{0}-3 and deleted_sign = 0
+			) c on c.uid = u.id
 	</select>
 	
-	<select id="selectCognizanceCatagoryBoByUid" parameterType="java.lang.String" resultType="com.goafanti.techservice.cognizance.bo.CognizanceCatagoryBo">
-		select x.uid, x.firstCatagory, x.secondCatagory, y.firmTotal, y.techTotal, z.totalRevenue
-			from 
-			(
-			select a.uid, a.firstCatagory, b.secondCatagory from
-			(
-			select uid, count(1) as firstCatagory from org_intellectual_property 
-			where uid = #{uid,jdbcType=VARCHAR} and evaluation_category= 0 and deleted_sign = 0 GROUP BY uid
-			) a INNER JOIN 
-			(
-			select uid, count(1) as secondCatagory from org_intellectual_property 
-			where uid = #{uid,jdbcType=VARCHAR} and evaluation_category = 1 and deleted_sign = 0 GROUP BY uid
-			) b on a.uid = b.uid
-			) x  INNER JOIN 
-			(
-			select uid, firm_total as firmTotal, tech_total as techTotal from org_human_resource where uid = #{uid,jdbcType=VARCHAR} and year = 
-			(SELECT (DATE_FORMAT(NOW(), '%Y')-1)  FROM DUAL ) and deleted_sign = 0
-			) y on y.uid = x.uid
-			INNER JOIN 
-			(
-			SELECT uid,(operating_income + non_operating_income - non_taxable_income) as totalRevenue
-			from org_ratepay where uid = #{uid,jdbcType=VARCHAR} 
-			and year = (SELECT (DATE_FORMAT(NOW(), '%Y')-1)  FROM DUAL) and deleted_sign = 0
-			) z on z.uid = x.uid
+	<select id="selectCognizanceCatagoryBoByUidAndYear"  resultType="com.goafanti.techservice.cognizance.bo.CognizanceCatagoryBo">
+		 select u.id as uid, a.firstCatagory, b.secondCatagory, c.firmTotal, c.techTotal, d.totalRevenue FROM
+				(select id from user where id = #{1}) u 
+			LEFT JOIN
+				(select uid, count(1) as firstCatagory from org_intellectual_property 
+				where uid = #{1} and evaluation_category= 0 and deleted_sign = 0 GROUP BY uid
+				) a on a.uid = u.id
+      LEFT JOIN
+				(
+				select uid, count(1) as secondCatagory from org_intellectual_property 
+				where uid = #{1} and evaluation_category = 1 and deleted_sign = 0 GROUP BY uid
+				) b on b.uid = u.id
+      LEFT JOIN
+       			(
+				select uid, firm_total as firmTotal, tech_total as techTotal from org_human_resource where uid = #{1} and year = 
+				#{0}-1   and deleted_sign = 0
+				) c on c.uid = u.id
+			LEFT JOIN
+				(
+				SELECT uid,(operating_income + non_operating_income - non_taxable_income) as totalRevenue
+				from org_ratepay where uid = #{1} 
+				and year = #{0}-1  and deleted_sign = 0
+				) d on d.uid = u.id
 	</select>
 	
-	<select id="selectLastYearRevenueByUid" parameterType="java.lang.String" resultType="java.math.BigDecimal">
+	<select id="selectLastYearRevenueByUidAndYear"  resultType="java.math.BigDecimal">
 		SELECT sum(last_year_revenue) as lastYearRevenue
-			from org_tech_product where uid = #{uid,jdbcType=VARCHAR}
-			and year = (SELECT (DATE_FORMAT(NOW(), '%Y')-1)  FROM DUAL) and deleted_sign = 0
+			from org_tech_product where uid = #{1}
+			and year = #{0} and deleted_sign = 0
 	</select>
 </mapper>

+ 72 - 2
src/main/java/com/goafanti/techservice/cognizance/controller/CognizanceApiController.java

@@ -46,6 +46,11 @@ import com.goafanti.techservice.cognizance.bo.ActivityNumberBo;
 import com.goafanti.techservice.cognizance.bo.AnnualReportBo;
 import com.goafanti.techservice.cognizance.bo.AnnualReportMainBo;
 import com.goafanti.techservice.cognizance.bo.AnnualReportPropertyRightBo;
+import com.goafanti.techservice.cognizance.bo.CognizanceCatagoryBo;
+import com.goafanti.techservice.cognizance.bo.CognizanceDetailBo;
+import com.goafanti.techservice.cognizance.bo.CognizanceManageCostBo;
+import com.goafanti.techservice.cognizance.bo.CognizanceOrgInfoBo;
+import com.goafanti.techservice.cognizance.bo.CognizanceResearchCostBo;
 import com.goafanti.techservice.cognizance.service.OrgActivityCostService;
 import com.goafanti.techservice.cognizance.service.OrgActivityService;
 import com.goafanti.techservice.cognizance.service.OrgAnnualReportService;
@@ -922,8 +927,11 @@ public class CognizanceApiController extends BaseApiController {
 	 * @return
 	 */
 	@RequestMapping(value = "/applyCognizance", method = RequestMethod.POST)
-	public Result applyCognizance(String contacts, String comment, String consultant){
+	public Result applyCognizance(String contacts, String comment, String consultant, Integer year){
 		Result res = new Result();
+		if (null == year){
+			res.getError().add(buildError(ErrorConstants.DUPLICATE_DATA_ERROR, "申请认定年份不能为空!"));
+		}
 		OrgCognizance c = new OrgCognizance();
 		c.setId(UUID.randomUUID().toString());
 		c.setUid(TokenManager.getUserId());
@@ -931,12 +939,26 @@ public class CognizanceApiController extends BaseApiController {
 		c.setComment(comment);
 		c.setConsultant(consultant);
 		c.setDeletedSign(0);
-		c.setYear(Calendar.getInstance().get(Calendar.YEAR));
+		c.setYear(year);
 		orgCognizanceService.insert(c);
 		return res;
 	}
 	
 	/**
+	 * 高企认定详情入口
+	 * 
+	 * @param uid
+	 * @param cid
+	 * @return
+	 */
+	@RequestMapping(value = "/cognizanceDetail", method = RequestMethod.POST)
+	public Result cognizanceDetail(String cid, Integer year) {
+		Result res = new Result();
+		res.setData(handleCognizanceDetail(TokenManager.getUserId(), cid, year));
+		return res;
+	}
+	
+	/**
 	 * 年报列表
 	 * @return
 	 */
@@ -1102,5 +1124,53 @@ public class CognizanceApiController extends BaseApiController {
 		}
 		return res;
 	}
+	
+	private CognizanceDetailBo handleCognizanceDetail(String uid, String cid, Integer year) {
+		CognizanceDetailBo cog = new CognizanceDetailBo();
+
+		CognizanceOrgInfoBo orgInfo = orgCognizanceService.selectCognizanceOrgInfoBoByUidAndCid(uid, cid);
+		cog.setUid(null == orgInfo.getUid() ? "" : orgInfo.getUid());
+		cog.setCid(null == orgInfo.getCid() ? "" : orgInfo.getCid());
+		cog.setUnitName(null == orgInfo.getUnitName() ? "" : orgInfo.getUnitName());
+		cog.setOrgCode(null == orgInfo.getOrgCode() ? "" : orgInfo.getOrgCode());
+		cog.setPostalAddress(null == orgInfo.getPostalAddress() ? "" : orgInfo.getPostalAddress());
+		cog.setContacts(null == orgInfo.getContacts() ? "" : orgInfo.getContacts());
+		cog.setTechnicalField1(null == orgInfo.getTechnicalField1() ? 0 : orgInfo.getTechnicalField1());
+		cog.setTechnicalField2(null == orgInfo.getTechnicalField2() ? 0 : orgInfo.getTechnicalField2());
+		cog.setTechnicalField3(null == orgInfo.getTechnicalField3() ? 0 : orgInfo.getTechnicalField3());
+		cog.setBasicResearchCost(
+				null == orgInfo.getBasicResearchCost() ? new BigDecimal(0) : orgInfo.getBasicResearchCost());
+		cog.setAccident(null == orgInfo.getAccient() ? 0 : orgInfo.getAccient());
+
+		CognizanceResearchCostBo researchCost = orgCognizanceService.selectCognizanceResearchCostBoByUidAndYear(year, uid);
+		cog.setResearchCost(
+				null == researchCost.getResearchCost() ? new BigDecimal(0) : researchCost.getResearchCost());
+		cog.setTerritory(null == researchCost.getTerritory() ? new BigDecimal(0) : researchCost.getTerritory());
+
+		CognizanceManageCostBo manageCost = orgCognizanceService.selectCognizanceManageCostBoByUidAndYear(year, uid);
+		cog.setNetAsset1(null == manageCost.getNetAsset1() ? new BigDecimal(0) : manageCost.getNetAsset1());
+		cog.setNetAsset2(null == manageCost.getNetAsset2() ? new BigDecimal(0) : manageCost.getNetAsset2());
+		cog.setNetAsset3(null == manageCost.getNetAsset3() ? new BigDecimal(0) : manageCost.getNetAsset3());
+		cog.setSalesRevenue1(null == manageCost.getSalesRevenue1() ? new BigDecimal(0) : manageCost.getSalesRevenue1());
+		cog.setSalesRevenue2(null == manageCost.getSalesRevenue2() ? new BigDecimal(0) : manageCost.getSalesRevenue2());
+		cog.setSalesRevenue3(null == manageCost.getSalesRevenue3() ? new BigDecimal(0) : manageCost.getSalesRevenue3());
+		cog.setGrossProfit1(null == manageCost.getGrossProfit1() ? new BigDecimal(0) : manageCost.getGrossProfit1());
+		cog.setGrossProfit2(null == manageCost.getGrossProfit2() ? new BigDecimal(0) : manageCost.getGrossProfit2());
+		cog.setGrossProfit3(null == manageCost.getGrossProfit3() ? new BigDecimal(0) : manageCost.getGrossProfit3());
+
+		CognizanceCatagoryBo catagory = orgCognizanceService.selectCognizanceCatagoryBoByUidAndYear(year, uid);
+		cog.setFirstCatagory(null == catagory.getFirstCatagory() ? 0 : catagory.getFirstCatagory());
+		cog.setSecondCatagory(null == catagory.getSecondCatagory() ? 0 : catagory.getSecondCatagory());
+		cog.setFirmTotal(null == catagory.getFirmTotal() ? 0 : catagory.getFirmTotal());
+		cog.setTechTotal(null == catagory.getTechTotal() ? 0 : catagory.getTechTotal());
+		cog.setTotalRevenue(null == catagory.getTotalRevenue() ? new BigDecimal(0) : catagory.getTotalRevenue());
+        BigDecimal revenue = orgCognizanceService.selectLastYearRevenueByUidAndYear(year, uid);
+        if (null != revenue){
+        	cog.setLastYearRevenue(revenue);
+        } else {
+        	cog.setLastYearRevenue(new BigDecimal(0));
+        }
+		return cog;
+	}
 
 }

+ 5 - 5
src/main/java/com/goafanti/techservice/cognizance/service/OrgCognizanceService.java

@@ -16,15 +16,15 @@ public interface OrgCognizanceService {
 
 	Pagination<CognizanceBo> listCognizance(String uid, String locationProvince, Integer pNo, Integer pSize);
 
-	CognizanceOrgInfoBo selectCognizanceOrgInfoBoByUid(String uid, String cid);
+	CognizanceOrgInfoBo selectCognizanceOrgInfoBoByUidAndCid(String uid, String cid);
 
-	CognizanceResearchCostBo selectCognizanceResearchCostBoByUid(String uid);
+	CognizanceResearchCostBo selectCognizanceResearchCostBoByUidAndYear(Integer year,String uid);
 
-	CognizanceManageCostBo selectCognizanceManageCostBoByUid(String uid);
+	CognizanceManageCostBo selectCognizanceManageCostBoByUidAndYear(Integer year, String uid);
 
-	CognizanceCatagoryBo selectCognizanceCatagoryBoByUid(String uid);
+	CognizanceCatagoryBo selectCognizanceCatagoryBoByUidAndYear(Integer year, String uid);
 
-	BigDecimal selectLastYearRevenueByUid(String uid);
+	BigDecimal selectLastYearRevenueByUidAndYear(Integer year, String uid);
 
 	int updateByPrimaryKeySelective(OrgCognizance cog);
 

+ 10 - 10
src/main/java/com/goafanti/techservice/cognizance/service/impl/OrgCognizanceServiceImpl.java

@@ -56,28 +56,28 @@ public class OrgCognizanceServiceImpl extends BaseMybatisDao<OrgCognizanceMapper
 	}
 
 	@Override
-	public CognizanceOrgInfoBo selectCognizanceOrgInfoBoByUid(String uid, String cid) {
-		return orgCognizanceMapper.selectCognizanceOrgInfoBoByUid(uid, cid);
+	public CognizanceOrgInfoBo selectCognizanceOrgInfoBoByUidAndCid(String uid, String cid) {
+		return orgCognizanceMapper.selectCognizanceOrgInfoBoByUidAndCid(uid, cid);
 	}
 
 	@Override
-	public CognizanceResearchCostBo selectCognizanceResearchCostBoByUid(String uid) {
-		return orgCognizanceMapper.selectCognizanceResearchCostBoByUid(uid);
+	public CognizanceResearchCostBo selectCognizanceResearchCostBoByUidAndYear(Integer year, String uid) {
+		return orgCognizanceMapper.selectCognizanceResearchCostBoByUidAndYear(year, uid);
 	}
 
 	@Override
-	public CognizanceManageCostBo selectCognizanceManageCostBoByUid(String uid) {
-		return orgCognizanceMapper.selectCognizanceManageCostBoByUid(uid);
+	public CognizanceManageCostBo selectCognizanceManageCostBoByUidAndYear(Integer year, String uid) {
+		return orgCognizanceMapper.selectCognizanceManageCostBoByUidAndYear(year, uid);
 	}
 
 	@Override
-	public CognizanceCatagoryBo selectCognizanceCatagoryBoByUid(String uid) {
-		return orgCognizanceMapper.selectCognizanceCatagoryBoByUid(uid);
+	public CognizanceCatagoryBo selectCognizanceCatagoryBoByUidAndYear(Integer year, String uid) {
+		return orgCognizanceMapper.selectCognizanceCatagoryBoByUidAndYear(year, uid);
 	}
 
 	@Override
-	public BigDecimal selectLastYearRevenueByUid(String uid) {
-		return orgCognizanceMapper.selectLastYearRevenueByUid(uid);
+	public BigDecimal selectLastYearRevenueByUidAndYear(Integer year, String uid) {
+		return orgCognizanceMapper.selectLastYearRevenueByUidAndYear(year, uid);
 	}
 
 	@Override