|
@@ -2,10 +2,7 @@ package com.mooctest.crowd.site.service.impl;
|
|
|
|
|
|
import com.mooctest.crowd.domain.dao.BookTestDao;
|
|
import com.mooctest.crowd.domain.dao.BookTestDao;
|
|
import com.mooctest.crowd.domain.domainobject.*;
|
|
import com.mooctest.crowd.domain.domainobject.*;
|
|
-import com.mooctest.crowd.domain.model.BalancePO;
|
|
|
|
-import com.mooctest.crowd.domain.model.BookTestPO;
|
|
|
|
-import com.mooctest.crowd.domain.model.ResourcePO;
|
|
|
|
-import com.mooctest.crowd.domain.model.ResourceTypePO;
|
|
|
|
|
|
+import com.mooctest.crowd.domain.model.*;
|
|
import com.mooctest.crowd.domain.repository.BookTestRepo;
|
|
import com.mooctest.crowd.domain.repository.BookTestRepo;
|
|
import com.mooctest.crowd.domain.repository.CrowdTestProjectRepo;
|
|
import com.mooctest.crowd.domain.repository.CrowdTestProjectRepo;
|
|
import com.mooctest.crowd.domain.util.Converter;
|
|
import com.mooctest.crowd.domain.util.Converter;
|
|
@@ -90,58 +87,67 @@ public class BookTestServiceImpl implements BookTestService {
|
|
if (testerAmounts.size() > 0) {
|
|
if (testerAmounts.size() > 0) {
|
|
for (TaskAmountVO.TesterAmountVO testerAmount : testerAmounts) {
|
|
for (TaskAmountVO.TesterAmountVO testerAmount : testerAmounts) {
|
|
BookTestPO book = new BookTestPO();
|
|
BookTestPO book = new BookTestPO();
|
|
- book.setUid(testerAmount.getTesterId());
|
|
|
|
- //根据项目编号查询发包机构ID
|
|
|
|
- String cptcode = taskAmountVO.getProjectCode();
|
|
|
|
- if (cptcode != null && cptcode.length() > 0) {
|
|
|
|
- CrowdTestProject project = projectRepo.getByProjectCode(cptcode);
|
|
|
|
- if(project != null)
|
|
|
|
- book.setRmid(project.getRegionalManagerId());
|
|
|
|
|
|
+ List<BankCardPO> bankCardPOList = bookTestRepo.getbankcard(testerAmount.getTesterId());
|
|
|
|
+ if (bankCardPOList != null && bankCardPOList.size() > 0) {
|
|
|
|
+ for (BankCardPO bankCardPO : bankCardPOList) {
|
|
|
|
+ book.setUid(testerAmount.getTesterId());
|
|
|
|
+ book.setNumber(bankCardPO.getNumber());
|
|
|
|
+ book.setCode(bankCardPO.getCode());
|
|
|
|
+ book.setSubname(bankCardPO.getSubName());
|
|
|
|
+ //根据项目编号查询发包机构ID
|
|
|
|
+ String cptcode = taskAmountVO.getProjectCode();
|
|
|
|
+ if (cptcode != null && cptcode.length() > 0) {
|
|
|
|
+ CrowdTestProject project = projectRepo.getByProjectCode(cptcode);
|
|
|
|
+ if (project != null)
|
|
|
|
+ book.setRmid(project.getRegionalManagerId());
|
|
|
|
+ }
|
|
|
|
+ book.setUname(testerAmount.getTesterRealName());
|
|
|
|
+ book.setCttcode(taskAmountVO.getTaskCode());
|
|
|
|
+ book.setCptcode(taskAmountVO.getProjectCode());
|
|
|
|
+ book.setEffectiveWorkloadAmount(testerAmount.getEffectiveWorkloadAmount());
|
|
|
|
+ book.setDefectExciationAmount(testerAmount.getDefectExciationAmount());
|
|
|
|
+ book.setExtraRewardAmount(testerAmount.getExtraRewardAmount());
|
|
|
|
+ book.setState(0);
|
|
|
|
+ BigDecimal effectiveWorkloadAmount = testerAmount.getEffectiveWorkloadAmount();
|
|
|
|
+ BigDecimal defectExciationAmount = testerAmount.getDefectExciationAmount();
|
|
|
|
+ BigDecimal extraRewardAmount = testerAmount.getExtraRewardAmount();
|
|
|
|
+ BigDecimal totalAmount = effectiveWorkloadAmount.add(defectExciationAmount).add(extraRewardAmount);
|
|
|
|
+ book.setTotalAmount(totalAmount);
|
|
|
|
+ //缺陷数量
|
|
|
|
+ book.setNotTopHighDefectCount(testerAmount.getNotTopHighDefectCount());
|
|
|
|
+ book.setNotTopLowDefectCount(testerAmount.getNotTopLowDefectCount());
|
|
|
|
+ book.setNotTopMidDefectCount(testerAmount.getNotTopMidDefectCount());
|
|
|
|
+ book.setNotTopVeryHighDefectCount(testerAmount.getNotTopVeryHighDefectCount());
|
|
|
|
+ book.setNotTopVeryLowDefectCount(testerAmount.getNotTopVeryLowDefectCount());
|
|
|
|
+ book.setOnlyOneHighDefectCount(testerAmount.getOnlyOneHighDefectCount());
|
|
|
|
+ book.setOnlyOneLowDefectCount(testerAmount.getOnlyOneLowDefectCount());
|
|
|
|
+ book.setOnlyOneMidDefectCount(testerAmount.getOnlyOneMidDefectCount());
|
|
|
|
+ book.setOnlyOneVeryHighDefectCount(testerAmount.getOnlyOneVeryHighDefectCount());
|
|
|
|
+ book.setOnlyOneVeryLowDefectCount(testerAmount.getOnlyOneVeryLowDefectCount());
|
|
|
|
+ book.setTopHighDefectCount(testerAmount.getTopHighDefectCount());
|
|
|
|
+ book.setTopLowDefectCount(testerAmount.getTopLowDefectCount());
|
|
|
|
+ book.setTopMidDefectCount(testerAmount.getTopMidDefectCount());
|
|
|
|
+ book.setTopVeryHighDefectCount(testerAmount.getTopVeryHighDefectCount());
|
|
|
|
+ book.setTopVeryLowDefectCount(testerAmount.getTopVeryLowDefectCount());
|
|
|
|
+ //缺陷得分
|
|
|
|
+ book.setNotTopHighDefectScore(testerAmount.getNotTopHighDefectScore());
|
|
|
|
+ book.setNotTopLowDefectScore(testerAmount.getNotTopLowDefectScore());
|
|
|
|
+ book.setNotTopMidDefectScore(testerAmount.getNotTopMidDefectScore());
|
|
|
|
+ book.setNotTopVeryHighDefectScore(testerAmount.getNotTopVeryHighDefectScore());
|
|
|
|
+ book.setNotTopVeryLowDefectScore(testerAmount.getNotTopVeryLowDefectScore());
|
|
|
|
+ book.setOnlyOneHighDefectScore(testerAmount.getOnlyOneHighDefectScore());
|
|
|
|
+ book.setOnlyOneLowDefectScore(testerAmount.getOnlyOneLowDefectScore());
|
|
|
|
+ book.setOnlyOneMidDefectScore(testerAmount.getOnlyOneMidDefectScore());
|
|
|
|
+ book.setOnlyOneVeryHighDefectScore(testerAmount.getOnlyOneVeryHighDefectScore());
|
|
|
|
+ book.setOnlyOneVeryLowDefectScore(testerAmount.getOnlyOneVeryLowDefectScore());
|
|
|
|
+ book.setTopHighDefectScore(testerAmount.getTopHighDefectScore());
|
|
|
|
+ book.setTopLowDefectScore(testerAmount.getTopLowDefectScore());
|
|
|
|
+ book.setTopMidDefectScore(testerAmount.getTopMidDefectScore());
|
|
|
|
+ book.setTopVeryHighDefectScore(testerAmount.getTopVeryHighDefectScore());
|
|
|
|
+ book.setTopVeryLowDefectScore(testerAmount.getTopVeryLowDefectScore());
|
|
|
|
+ bookTestRepo.saveBookTest(book);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- book.setCttcode(taskAmountVO.getTaskCode());
|
|
|
|
- book.setCptcode(taskAmountVO.getProjectCode());
|
|
|
|
- book.setEffectiveWorkloadAmount(testerAmount.getEffectiveWorkloadAmount());
|
|
|
|
- book.setDefectExciationAmount(testerAmount.getDefectExciationAmount());
|
|
|
|
- book.setExtraRewardAmount(testerAmount.getExtraRewardAmount());
|
|
|
|
- book.setState(0);
|
|
|
|
- BigDecimal effectiveWorkloadAmount = testerAmount.getEffectiveWorkloadAmount();
|
|
|
|
- BigDecimal defectExciationAmount = testerAmount.getDefectExciationAmount();
|
|
|
|
- BigDecimal extraRewardAmount = testerAmount.getExtraRewardAmount();
|
|
|
|
- BigDecimal totalAmount = effectiveWorkloadAmount.add(defectExciationAmount).add(extraRewardAmount);
|
|
|
|
- book.setTotalAmount(totalAmount);
|
|
|
|
- //缺陷数量
|
|
|
|
- book.setNotTopHighDefectCount(testerAmount.getNotTopHighDefectCount());
|
|
|
|
- book.setNotTopLowDefectCount(testerAmount.getNotTopLowDefectCount());
|
|
|
|
- book.setNotTopMidDefectCount(testerAmount.getNotTopMidDefectCount());
|
|
|
|
- book.setNotTopVeryHighDefectCount(testerAmount.getNotTopVeryHighDefectCount());
|
|
|
|
- book.setNotTopVeryLowDefectCount(testerAmount.getNotTopVeryLowDefectCount());
|
|
|
|
- book.setOnlyOneHighDefectCount(testerAmount.getOnlyOneHighDefectCount());
|
|
|
|
- book.setOnlyOneLowDefectCount(testerAmount.getOnlyOneLowDefectCount());
|
|
|
|
- book.setOnlyOneMidDefectCount(testerAmount.getOnlyOneMidDefectCount());
|
|
|
|
- book.setOnlyOneVeryHighDefectCount(testerAmount.getOnlyOneVeryHighDefectCount());
|
|
|
|
- book.setOnlyOneVeryLowDefectCount(testerAmount.getOnlyOneVeryLowDefectCount());
|
|
|
|
- book.setTopHighDefectCount(testerAmount.getTopHighDefectCount());
|
|
|
|
- book.setTopLowDefectCount(testerAmount.getTopLowDefectCount());
|
|
|
|
- book.setTopMidDefectCount(testerAmount.getTopMidDefectCount());
|
|
|
|
- book.setTopVeryHighDefectCount(testerAmount.getTopVeryHighDefectCount());
|
|
|
|
- book.setTopVeryLowDefectCount(testerAmount.getTopVeryLowDefectCount());
|
|
|
|
- //缺陷得分
|
|
|
|
- book.setNotTopHighDefectScore(testerAmount.getNotTopHighDefectScore());
|
|
|
|
- book.setNotTopLowDefectScore(testerAmount.getNotTopLowDefectScore());
|
|
|
|
- book.setNotTopMidDefectScore(testerAmount.getNotTopMidDefectScore());
|
|
|
|
- book.setNotTopVeryHighDefectScore(testerAmount.getNotTopVeryHighDefectScore());
|
|
|
|
- book.setNotTopVeryLowDefectScore(testerAmount.getNotTopVeryLowDefectScore());
|
|
|
|
- book.setOnlyOneHighDefectScore(testerAmount.getOnlyOneHighDefectScore());
|
|
|
|
- book.setOnlyOneLowDefectScore(testerAmount.getOnlyOneLowDefectScore());
|
|
|
|
- book.setOnlyOneMidDefectScore(testerAmount.getOnlyOneMidDefectScore());
|
|
|
|
- book.setOnlyOneVeryHighDefectScore(testerAmount.getOnlyOneVeryHighDefectScore());
|
|
|
|
- book.setOnlyOneVeryLowDefectScore(testerAmount.getOnlyOneVeryLowDefectScore());
|
|
|
|
- book.setTopHighDefectScore(testerAmount.getTopHighDefectScore());
|
|
|
|
- book.setTopLowDefectScore(testerAmount.getTopLowDefectScore());
|
|
|
|
- book.setTopMidDefectScore(testerAmount.getTopMidDefectScore());
|
|
|
|
- book.setTopVeryHighDefectScore(testerAmount.getTopVeryHighDefectScore());
|
|
|
|
- book.setTopVeryLowDefectScore(testerAmount.getTopVeryLowDefectScore());
|
|
|
|
- bookTestRepo.saveBookTest(book);
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|