|
|
@@ -37,6 +37,11 @@ import com.goafanti.common.utils.StringUtils;
|
|
|
import com.goafanti.core.mybatis.page.Pagination;
|
|
|
import com.goafanti.core.shiro.token.TokenManager;
|
|
|
import com.goafanti.techservice.cognizance.bo.ActivityNumberBo;
|
|
|
+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.OrgCognizanceLogService;
|
|
|
@@ -833,7 +838,6 @@ public class AdminApiController extends BaseApiController {
|
|
|
public Result cognizanceLog(String cid){
|
|
|
Result res = new Result();
|
|
|
List<OrgCognizanceLog> list = orgCognizanceLogService.selectOrgCognizanceLogByCid(cid);
|
|
|
- System.out.println(list.size());
|
|
|
res.setData(list);
|
|
|
return res;
|
|
|
}
|
|
|
@@ -847,8 +851,31 @@ public class AdminApiController extends BaseApiController {
|
|
|
@RequestMapping(value = "/cognizanceDetail", method = RequestMethod.POST)
|
|
|
public Result cognizanceDetail(String uid, String cid){
|
|
|
Result res = new Result();
|
|
|
+ res.setData(handleCognizanceDetail(uid, cid));
|
|
|
return res;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 保存高企认定详情
|
|
|
+ * @throws ParseException
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/disposeCognizanceDetail", method = RequestMethod.POST)
|
|
|
+ public Result disposeCognizanceDetail(OrgCognizance cog, OrgCognizanceLog log, String recordTimeFormattedDate) throws ParseException{
|
|
|
+ Result res = new Result();
|
|
|
+ if (null != log.getState()){
|
|
|
+ cog.setState(log.getState());
|
|
|
+ log.setId(UUID.randomUUID().toString());
|
|
|
+ log.setCid(cog.getId());
|
|
|
+ if (!StringUtils.isBlank(recordTimeFormattedDate)) {
|
|
|
+ log.setRecordTime(DateUtils.parseDate(recordTimeFormattedDate, "yyyy-MM-dd"));
|
|
|
+ }
|
|
|
+ orgCognizanceLogService.insert(log);
|
|
|
+ }
|
|
|
+ orgCognizanceService.updateByPrimaryKeySelective(cog);
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
// 判断用户是否通过认证
|
|
|
private Result checkCertify(Result res, String uid) {
|
|
|
@@ -871,6 +898,48 @@ public class AdminApiController extends BaseApiController {
|
|
|
return (Pagination<UserListBo>) userService.listUser(mobile, email, createTime, number, aftUsername,
|
|
|
auditStatus, pNo, pSize);
|
|
|
}
|
|
|
+
|
|
|
+ private CognizanceDetailBo handleCognizanceDetail(String uid, String cid){
|
|
|
+ CognizanceDetailBo cog = new CognizanceDetailBo();
|
|
|
+
|
|
|
+ CognizanceOrgInfoBo orgInfo = orgCognizanceService.selectCognizanceOrgInfoBoByUid(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() ? 0 : orgInfo.getBasicResearchCost());
|
|
|
+ cog.setAccident(null == orgInfo.getAccient() ? 0 : orgInfo.getAccient());
|
|
|
+
|
|
|
+ CognizanceResearchCostBo researchCost = orgCognizanceService.selectCognizanceResearchCostBoByUid(uid);
|
|
|
+ cog.setResearchCost(null == researchCost.getResearchCost() ? 0 : researchCost.getResearchCost());
|
|
|
+ cog.setTerritory(null == researchCost.getTerritory() ? 0 : researchCost.getTerritory());
|
|
|
+
|
|
|
+ CognizanceManageCostBo manageCost = orgCognizanceService.selectCognizanceManageCostBoByUid(uid);
|
|
|
+ cog.setNetAsset1(null == manageCost.getNetAsset1() ? 0 : manageCost.getNetAsset1());
|
|
|
+ cog.setNetAsset2(null == manageCost.getNetAsset2() ? 0 : manageCost.getNetAsset2());
|
|
|
+ cog.setNetAsset3(null == manageCost.getNetAsset3() ? 0 : manageCost.getNetAsset3());
|
|
|
+ cog.setSalesRevenue1(null == manageCost.getSalesRevenue1() ? 0 : manageCost.getSalesRevenue1());
|
|
|
+ cog.setSalesRevenue2(null == manageCost.getSalesRevenue2() ? 0 : manageCost.getSalesRevenue2());
|
|
|
+ cog.setSalesRevenue3(null == manageCost.getSalesRevenue3() ? 0 : manageCost.getSalesRevenue3());
|
|
|
+ cog.setGrossProfit1(null == manageCost.getGrossProfit1() ? 0 : manageCost.getGrossProfit1());
|
|
|
+ cog.setGrossProfit2(null == manageCost.getGrossProfit2() ? 0 : manageCost.getGrossProfit2());
|
|
|
+ cog.setGrossProfit3(null == manageCost.getGrossProfit3() ? 0 : manageCost.getGrossProfit3());
|
|
|
+
|
|
|
+ CognizanceCatagoryBo catagory = orgCognizanceService.selectCognizanceCatagoryBoByUid(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() ? 0 : catagory.getTotalRevenue());
|
|
|
+
|
|
|
+ cog.setLastYearRevenue(orgCognizanceService.selectLastYearRevenueByUid(uid));
|
|
|
+ return cog;
|
|
|
+ }
|
|
|
|
|
|
|
|
|
}
|