|
|
@@ -10,6 +10,7 @@ import java.util.Map;
|
|
|
import java.util.UUID;
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.apache.poi.hssf.record.EOFRecord;
|
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
@@ -18,7 +19,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import com.goafanti.common.bo.Error;
|
|
|
import com.goafanti.common.constant.AFTConstants;
|
|
|
-import com.goafanti.common.constant.ErrorConstants;
|
|
|
+import com.goafanti.common.dao.AdminMapper;
|
|
|
import com.goafanti.common.dao.OrganizationContactBookMapper;
|
|
|
import com.goafanti.common.dao.OrganizationIdentityMapper;
|
|
|
import com.goafanti.common.dao.TOrderBonusMapper;
|
|
|
@@ -31,6 +32,7 @@ import com.goafanti.common.dao.TaskLogMapper;
|
|
|
import com.goafanti.common.dao.TaskProgressMapper;
|
|
|
import com.goafanti.common.enums.OrderLogProcess;
|
|
|
import com.goafanti.common.error.BusinessException;
|
|
|
+import com.goafanti.common.model.Admin;
|
|
|
import com.goafanti.common.model.OrganizationContactBook;
|
|
|
import com.goafanti.common.model.OrganizationIdentity;
|
|
|
import com.goafanti.common.model.TOrderBonus;
|
|
|
@@ -78,6 +80,8 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
|
|
|
private OrganizationIdentityMapper organizationIdentityMapper;
|
|
|
@Autowired
|
|
|
private TaskLogMapper taskLogMapper;
|
|
|
+ @Autowired
|
|
|
+ private AdminMapper adminMapper;
|
|
|
@Value(value = "${upload.path}")
|
|
|
private String uploadPath = null;
|
|
|
|
|
|
@@ -85,11 +89,14 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
|
|
|
@Override
|
|
|
public int updateProjectDistribution(Integer taskId, String taskReceiverId,Integer specially) {
|
|
|
TOrderTask t=tOrderTaskMapper.selectByPrimaryKey(taskId);
|
|
|
- checkDeleteSign(t.getOrderNo());
|
|
|
t.setTaskStatus(TaskState.DISTRIBUTION.getCode());
|
|
|
t.setTaskAllocator(TokenManager.getAdminId());
|
|
|
t.setTaskReceiver(taskReceiverId);
|
|
|
t.setTaskDistributionTime(new Date());
|
|
|
+ Admin a=adminMapper.selectByPrimaryKey(taskReceiverId);
|
|
|
+ if (a==null||a.getId()==null) {
|
|
|
+ throw new BusinessException(new Error("分配人员不存在!","分配人员不存在!"));
|
|
|
+ }
|
|
|
insetLog(taskId, taskReceiverId);
|
|
|
//0-经理 (经理分派会创建子项目)1 管理员或经理转交
|
|
|
if (specially==1) {
|
|
|
@@ -125,7 +132,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
|
|
|
tNew.setOrderNo(t.getOrderNo());
|
|
|
int i=0;
|
|
|
for (TOrderTaskBo to : taskBos) {
|
|
|
- if (to.getTaskStatus()==TaskState.DISTRIBUTION.getCode()) {
|
|
|
+ if (to.getTaskStatus()>=TaskState.DISTRIBUTION.getCode()&&to.getTaskStatus()<TaskState.INVALID.getCode()) {
|
|
|
i++;
|
|
|
}
|
|
|
|