|
|
@@ -45,6 +45,7 @@ import com.goafanti.common.model.Notice;
|
|
|
import com.goafanti.common.model.OrgCognizance;
|
|
|
import com.goafanti.common.model.OrgCognizanceLog;
|
|
|
import com.goafanti.common.model.OrgCognizanceProportion;
|
|
|
+import com.goafanti.common.model.OrgHumanResource;
|
|
|
import com.goafanti.common.model.OrganizationIdentity;
|
|
|
import com.goafanti.common.model.User;
|
|
|
import com.goafanti.core.mybatis.BaseMybatisDao;
|
|
|
@@ -166,15 +167,27 @@ public class OrgCognizanceServiceImpl extends BaseMybatisDao<OrgCognizanceMapper
|
|
|
cog.setGrossProfit3(
|
|
|
null == manageCost.getGrossProfit3() ? new BigDecimal(0) : manageCost.getGrossProfit3());
|
|
|
}
|
|
|
-
|
|
|
- CognizanceCatagoryBo catagory = orgCognizanceMapper.selectCognizanceCatagoryBoByUidAndYear(year, uid);
|
|
|
- if (null != catagory) {
|
|
|
- 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());
|
|
|
+ Integer firstCatagory = orgCognizanceMapper.findFirstCatagory(year, uid);
|
|
|
+ Integer secondCatagory = orgCognizanceMapper.findSecondCatagory(year, uid);
|
|
|
+ OrgHumanResource ohr = orgCognizanceMapper.findFirmAndTechTotal(year, uid);
|
|
|
+ BigDecimal totalRevenue = orgCognizanceMapper.findTotalRevenue(year, uid);
|
|
|
+ /*
|
|
|
+ * CognizanceCatagoryBo catagory =
|
|
|
+ * orgCognizanceMapper.selectCognizanceCatagoryBoByUidAndYear(year,
|
|
|
+ * uid); if (null != catagory) {
|
|
|
+ */
|
|
|
+ cog.setFirstCatagory(null == firstCatagory ? 0 : firstCatagory);
|
|
|
+ cog.setSecondCatagory(null == secondCatagory ? 0 : secondCatagory);
|
|
|
+ if (null != ohr) {
|
|
|
+ cog.setFirmTotal(null == ohr.getFirmTotal() ? 0 : ohr.getFirmTotal());
|
|
|
+ cog.setTechTotal(null == ohr.getTechTotal() ? 0 : ohr.getTechTotal());
|
|
|
+ } else {
|
|
|
+ cog.setFirmTotal(0);
|
|
|
+ cog.setTechTotal(0);
|
|
|
}
|
|
|
+ cog.setTotalRevenue(null == totalRevenue ? new BigDecimal(0) : totalRevenue);
|
|
|
+ // }
|
|
|
+
|
|
|
BigDecimal revenue = orgCognizanceMapper.selectLastYearRevenueByUidAndYear(year, uid); // 上年度销售收入
|
|
|
cog.setLastYearRevenue(null == revenue ? new BigDecimal(0) : revenue);
|
|
|
return cog;
|
|
|
@@ -234,7 +247,8 @@ public class OrgCognizanceServiceImpl extends BaseMybatisDao<OrgCognizanceMapper
|
|
|
cog.setAcceptDate(recordTime);
|
|
|
} else if (OrgCognizanceStatus.getStatus(cog.getState()) == OrgCognizanceStatus.ISSUING) {
|
|
|
cog.setIssuingDate(recordTime);
|
|
|
- o.setCertificateNumber(StringUtils.isBlank(cog.getCertificateNumber()) ? "" : cog.getCertificateNumber());
|
|
|
+ o.setCertificateNumber(
|
|
|
+ StringUtils.isBlank(cog.getCertificateNumber()) ? "" : cog.getCertificateNumber());
|
|
|
o.setIssuingDate(recordTime);
|
|
|
o.setCogContacts(null == cog.getContacts() ? null : cog.getContacts());
|
|
|
organizationIdentityMapper.updateByPrimaryKeySelective(o);
|
|
|
@@ -348,15 +362,15 @@ public class OrgCognizanceServiceImpl extends BaseMybatisDao<OrgCognizanceMapper
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public BusinessCountBo countBusiness(String uid) {
|
|
|
+ public BusinessCountBo countBusiness(String uid, Integer year) {
|
|
|
BusinessCountBo bcb = new BusinessCountBo();
|
|
|
bcb.setUid(uid);
|
|
|
- bcb.setCopyrightDone(copyrightInfoMapper.countCopyrightDone(uid));
|
|
|
- bcb.setCopyrightUndone(copyrightInfoMapper.countCopyrightUnDone(uid));
|
|
|
- bcb.setPatentDone(patentInfoMapper.countPatentDone(uid));
|
|
|
- bcb.setPatentUndone(patentInfoMapper.countPatentUndone(uid));
|
|
|
- bcb.setTechProjectDone(techProjectMapper.countTechProjectDone(uid));
|
|
|
- bcb.setTechProjectUndone(techProjectMapper.countTechProjectUndone(uid));
|
|
|
+ bcb.setCopyrightDone(copyrightInfoMapper.countCopyrightDone(uid, year));
|
|
|
+ bcb.setCopyrightUndone(copyrightInfoMapper.countCopyrightUnDone(uid, year));
|
|
|
+ bcb.setPatentDone(patentInfoMapper.countPatentDone(uid, year));
|
|
|
+ bcb.setPatentUndone(patentInfoMapper.countPatentUndone(uid, year));
|
|
|
+ bcb.setTechProjectDone(techProjectMapper.countTechProjectDone(uid, year));
|
|
|
+ bcb.setTechProjectUndone(techProjectMapper.countTechProjectUndone(uid, year));
|
|
|
return bcb;
|
|
|
}
|
|
|
|