Просмотр исходного кода

新项目旧数据处理项目完成日期接口

anderx 1 год назад
Родитель
Сommit
1ef745e9d4

+ 74 - 6
src/main/java/com/goafanti/common/dao/TOrderTaskMapper.java

@@ -7,22 +7,89 @@ import com.goafanti.common.model.TOrderTask;
 import com.goafanti.order.bo.*;
 import com.goafanti.organization.bo.ProjectTypePuls;
 import org.apache.ibatis.annotations.Param;
+import org.springframework.data.domain.Pageable;
 
 import java.math.BigDecimal;
 import java.util.List;
 
+/**
+ * 订单任务表(TOrderTask)表数据库访问层
+ *
+ * @author makejava
+ * @since 2024-09-11 09:22:26
+ */
 public interface TOrderTaskMapper {
-    int deleteByPrimaryKey(Integer id);
 
-    int insert(TOrderTask record);
+    /**
+     * 通过ID查询单条数据
+     *
+     * @param id 主键
+     * @return 实例对象
+     */
+    TOrderTask queryById(Integer id);
 
-    int insertSelective(TOrderTask record);
 
-    TOrderTask selectByPrimaryKey(Integer id);
+    /**
+     * 查询指定行数据
+     *
+     * @param tOrderTask 查询条件
+     * @param pageable   分页对象
+     * @return 对象列表
+     */
+    List<TOrderTask> findTOrderTaskList(TOrderTask tOrderTask, @Param("pageable") Pageable pageable);
+
+    /**
+     * 统计总行数
+     *
+     * @param tOrderTask 查询条件
+     * @return 总行数
+     */
+    int findTOrderTaskCount(TOrderTask tOrderTask);
+
+    /**
+     * 新增数据
+     *
+     * @param tOrderTask 实例对象
+     * @return 影响行数
+     */
+    int insert(TOrderTask tOrderTask);
+
+    /**
+     * 批量新增数据(MyBatis原生foreach方法)
+     *
+     * @param entities List<TOrderTask> 实例对象列表
+     * @return 影响行数
+     */
+    int insertBatch(@Param("entities") List<TOrderTask> entities);
+
+    /**
+     * 批量新增或按主键更新数据(MyBatis原生foreach方法)
+     *
+     * @param entities List<TOrderTask> 实例对象列表
+     * @return 影响行数
+     * @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
+     */
+    int insertOrUpdateBatch(@Param("entities") List<TOrderTask> entities);
+
+    /**
+     * 修改数据
+     *
+     * @param tOrderTask 实例对象
+     * @return 影响行数
+     */
+    int update(TOrderTask tOrderTask);
+
+    /**
+     * 通过主键删除数据
+     *
+     * @param id 主键
+     * @return 影响行数
+     */
+    int deleteById(Integer id);
 
     int updateByPrimaryKeySelective(TOrderTask record);
 
-    int updateByPrimaryKey(TOrderTask record);
+    int insertSelective(TOrderTask record);
 
     List<TOrderTaskBo> selectOrderTask(@Param("orderNo") String orderNo,@Param("type") Integer type);
 
@@ -63,7 +130,7 @@ public interface TOrderTaskMapper {
 
     void resstPayment(Integer id);
 
-    void updateAddCostAmount(@Param("tid")Integer tid, @Param("cost")BigDecimal cost);
+    void updateAddCostAmount(@Param("tid")Integer tid, @Param("cost") BigDecimal cost);
 
     OrderOperator selectAidByParam(@Param("tid")Integer tid);
 
@@ -93,3 +160,4 @@ public interface TOrderTaskMapper {
 
     List<TOrderTask> selectAll();
 }
+

Разница между файлами не показана из-за своего большого размера
+ 2953 - 2472
src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml


Разница между файлами не показана из-за своего большого размера
+ 21 - 67
src/main/java/com/goafanti/common/model/TOrderTask.java


+ 1 - 1
src/main/java/com/goafanti/common/utils/AsyncUtils.java

@@ -271,7 +271,7 @@ public class AsyncUtils {
 	 */
 	public void addProjectSotpNotic(Integer type,  Integer sotpType, String ids, TOrderTask task) {
 		Integer noticeType=0;
-		if (task==null)task = tOrderTaskMapper.selectByPrimaryKey(Integer.valueOf(ids.split(",")[0]));
+		if (task==null)task = tOrderTaskMapper.queryById(Integer.valueOf(ids.split(",")[0]));
 		TOrderNewBo tOrderNew = tOrderNewMapper.getOrderNewDetail(task.getOrderNo());
 		List<Notice> notes=new ArrayList<>();
 		StringBuffer emails=new StringBuffer();

+ 0 - 1
src/main/java/com/goafanti/order/service/impl/LegalAffairsServiceImpl.java

@@ -20,7 +20,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
-import java.text.ParseException;
 import java.util.*;
 
 @Service

+ 2 - 2
src/main/java/com/goafanti/order/service/impl/OrderChangeServiceImpl.java

@@ -1206,7 +1206,7 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 				if (ot.getSplitSuper()!=null)ot.setSplitId(pushSplitId(ot.getSplitSuper()));
 				if (cd.getDeclarationBatch()!=null)ot.setDeclarationBatch(cd.getDeclarationBatch());
 				if (cd.getPatentType()!=null)ot.setPatentType(cd.getPatentType());
-				tOrderTaskMapper.updateByPrimaryKeySelective(ot);
+				tOrderTaskMapper.update(ot);
 				if (cd.getServiceLife()!=null){
 					updateTaskMember(ot.getId(),cd.getServiceLife(),cd.getServiceYear(),cd.getYearSum(),cd.getContractTerm());
 				}
@@ -1214,7 +1214,7 @@ public class OrderChangeServiceImpl extends BaseMybatisDao<NewOrderChangeMapper>
 					updateTaskMid(ot.getId(),cd.getLastYear(),cd.getLastYearCapital(),cd.getLastYearIncome());
 				}
 			}else if(cd.getType()==3) {
-				tOrderTaskMapper.deleteByPrimaryKey(cd.getTid());
+				tOrderTaskMapper.deleteById(cd.getTid());
 			}
 		}
 		return map;

+ 3 - 3
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -384,7 +384,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 
 	@Override
 	public int updateOrderTask(InputAddTask t) {
-		TOrderTask use=tOrderTaskMapper.selectByPrimaryKey(t.getId());
+		TOrderTask use=tOrderTaskMapper.queryById(t.getId());
 		boolean flag=false;
 		if(use.getCheckStatus()==1) {
 			t.setCheckStatus(2);
@@ -426,7 +426,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			}
 			projcetCheckLogMapper.insertSelective(log);
 		}
-		int  i=tOrderTaskMapper.updateByPrimaryKeySelective(t);
+		int  i=tOrderTaskMapper.update(t);
 		if (t.getServiceLife()!=null||t.getServiceYear()!=null||t.getYearSum()!=null||t.getContractTerm()!=null){
 			TTaskMember ttm=new TTaskMember();
 			ttm.setTid(t.getId());
@@ -461,7 +461,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		//连带催款一起删除
 		newOrderDunMapper.deleteByTid(id);
 		tOrderTaskMapper.deleteBySplitId(id);
-		return tOrderTaskMapper.deleteByPrimaryKey(id);
+		return tOrderTaskMapper.deleteById(id);
 	}
 
 	@Override

+ 27 - 27
src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java

@@ -150,7 +150,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	@Override
 	@Transactional
 	public int updateProjectDistribution(Integer taskId, String taskReceiverId,String remarks,Integer type) {
-		TOrderTask t=tOrderTaskMapper.selectByPrimaryKey(taskId);
+		TOrderTask t=tOrderTaskMapper.queryById(taskId);
 		TOrderNew tn=checkDeleteSign(t.getOrderNo());
 		Date date=new Date();
 		t.setTaskStatus(TaskState.DISTRIBUTION.getCode());
@@ -216,7 +216,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 			t.setManagerId(taskReceiverId);
 		}
 		t.setReceiverName(a.getName());
-		tOrderTaskMapper.updateByPrimaryKey(t);
+		tOrderTaskMapper.update(t);
 		List<String> aids = new ArrayList<>();
 		aids.add(taskReceiverId);
 		TOrderNewBo order = tOrderNewMapper.getSaleIdByOno(t.getOrderNo());
@@ -607,7 +607,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		} catch (ParseException e) {
 			e.printStackTrace();
 		}
-		tOrderTaskMapper.updateByPrimaryKeySelective(task);
+		tOrderTaskMapper.update(task);
 		//项目中间表修改
 		if (t.getUrgentDay()!=null||t.getIfMaterial()!=null||t.getRejectCount()!=null||
 				t.getAcceptCount()!=null||t.getAuthorizeCount()!=null||t.getSpotCheckStatus()!=null) {
@@ -644,7 +644,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		t.setCertificateNumber(b.getCertificateNumber());
 		if(b.getSetUpAmount()!=null)t.setSetUpAmount(new BigDecimal(b.getSetUpAmount()));
 		if (b.getPubicityUrl()!=null)t.setPubicityUrl(b.getPubicityUrl());
-		TOrderTask task2=tOrderTaskMapper.selectByPrimaryKey(b.getTid());//查询出项目信息
+		TOrderTask task2=tOrderTaskMapper.queryById(b.getTid());//查询出项目信息
 		if(b.getProjectStatus()!=task2.getProjectStatus()||!b.getTimeRecord().equals(task2.getTimeRecord())){
 				TTaskMid taskMid = new TTaskMid();
 				taskMid.setTid(b.getTid());
@@ -673,7 +673,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 			}
 			//做计时处理
 			pushTaskTimes(t);
-			tOrderTaskMapper.updateByPrimaryKeySelective(t);
+			tOrderTaskMapper.update(t);
 			projectSplitPush(b.getTid(), b.getProjectStatus(),task2);
 			pushTaskLog(b.getTid(), b.getProjectStatus());
 			updateMidServiceProject(task2.getOrderNo());
@@ -751,8 +751,8 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 			TOrderTask fatherTask=new TOrderTask();
 			fatherTask.setId(task2.getSplitSuper());
 			fatherTask.setProjectStatus(i);
-			tOrderTaskMapper.updateByPrimaryKeySelective(fatherTask);
-			TOrderTask task3=tOrderTaskMapper.selectByPrimaryKey(task2.getSplitSuper());
+			tOrderTaskMapper.update(fatherTask);
+			TOrderTask task3=tOrderTaskMapper.queryById(task2.getSplitSuper());
 			//设置父任务
 			TOrderTaskDetailBo t2=new TOrderTaskDetailBo();
 			t2.setOrderNo(task2.getOrderNo());
@@ -765,8 +765,8 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 			TOrderTask task3 =tOrderTaskMapper.selectBySuperId(task2.getSuperId());
 			task3.setId(Integer.valueOf(task2.getSuperId()));
 			task3.setSuperId(null);
-			tOrderTaskMapper.updateByPrimaryKeySelective(task3);
-			TOrderTask task4 = tOrderTaskMapper.selectByPrimaryKey(Integer.valueOf(task2.getSuperId()));
+			tOrderTaskMapper.update(task3);
+			TOrderTask task4 = tOrderTaskMapper.queryById(Integer.valueOf(task2.getSuperId()));
 			meanwhileUpdateOrder(task4);
 		}else {
 			meanwhileUpdateOrder(task2);
@@ -975,7 +975,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 
 	@Override
 	public int addTaskHours(TTaskHours t) {
-		TOrderTask tt=tOrderTaskMapper.selectByPrimaryKey(Integer.valueOf(t.getTaskId()));
+		TOrderTask tt=tOrderTaskMapper.queryById(Integer.valueOf(t.getTaskId()));
 		checkDeleteSign(tt.getOrderNo());
 		t.setAid(TokenManager.getAdminId()==null?"1":TokenManager.getAdminId());
 		t.setId(UUID.randomUUID().toString());
@@ -1056,7 +1056,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	@Override
 	public int createTaskProgress(TaskProgressBo t) {
 		TaskProgress tp=new TaskProgress();
-		TOrderTask tt=tOrderTaskMapper.selectByPrimaryKey(t.getTaskId());
+		TOrderTask tt=tOrderTaskMapper.queryById(t.getTaskId());
 		int count =taskProgressMapper.AlreadyNuberCount(t.getTaskId());
 		count +=t.getAlreadyNumber();
 		if(tt.getCommodityQuantity()<count)throw new BusinessException(new Error( "数量不能大于总量!" ,"数量不能大于总量!"));
@@ -1081,7 +1081,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	@Override
 	public int updateTaskProgress(TaskProgressBo t) {
 		TaskProgress tp=taskProgressMapper.selectByPrimaryKey(t.getId());
-		TOrderTask tt=tOrderTaskMapper.selectByPrimaryKey(t.getTaskId());
+		TOrderTask tt=tOrderTaskMapper.queryById(t.getTaskId());
 		int count =taskProgressMapper.AlreadyNuberCount(t.getTaskId());
 		count = count-tp.getAlreadyNumber()+t.getAlreadyNumber();
 		if(tt.getCommodityQuantity()<count)throw new BusinessException(new Error( "数量不能大于总量!" ,"数量不能大于总量!"));
@@ -1143,7 +1143,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	@Override
 	public int pushSplitProject(Integer tid, String splitList) {
 			String[] str=splitList.split(",");
-			TOrderTask task=tOrderTaskMapper.selectByPrimaryKey(tid);
+			TOrderTask task=tOrderTaskMapper.queryById(tid);
 			checkDeleteSign(task.getOrderNo());
 			TOrderTask usedTask=new TOrderTask();
 			usedTask.setId(tid);
@@ -1156,7 +1156,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 			if (!task.getCommodityQuantity().equals(x)||str.length==1) {
 				return -1;
 			}
-			tOrderTaskMapper.updateByPrimaryKeySelective(usedTask);
+			tOrderTaskMapper.update(usedTask);
 			int i=1;
 			TOrderTask newTask=task;
 			newTask.setCommodityPrice(new BigDecimal(0));
@@ -1256,7 +1256,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		}
 		projcetCheckLogMapper.insertSelective(log);
 		tOrderPaymentMapper.deleteByParam(tid,2);
-		return tOrderTaskMapper.updateByPrimaryKeySelective(t);
+		return tOrderTaskMapper.update(t);
 	}
 
 
@@ -1408,7 +1408,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	 */
 	@Override
 	public int pushExamineMemberProject(InputMenber in) {
-		TOrderTask task=tOrderTaskMapper.selectByPrimaryKey(in.getId());
+		TOrderTask task=tOrderTaskMapper.queryById(in.getId());
 		String aid=TokenManager.getAdminId();
 		Integer status=1;
 		boolean appFlag=false;
@@ -1504,7 +1504,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		if (nt.getProcessStatus()!=null&&nt.getProcessStatus()==3){
 			tTaskMemberMapper.updateServiceYearBySplitSuper(task.getSplitSuper());
 		}
-		tOrderTaskMapper.updateByPrimaryKeySelective(nt);
+		tOrderTaskMapper.update(nt);
 		if (flag){
 			addNoticMember(notice, ono, in.getType(),result);
 		}
@@ -1542,7 +1542,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 
 	@Override
 	public int updateMemberProject(InputAddTask t) {
-		TOrderTask task=tOrderTaskMapper.selectByPrimaryKey(t.getId());
+		TOrderTask task=tOrderTaskMapper.queryById(t.getId());
 		if(task.getProcessStatus()!=4)throw  new BusinessException("审核状态错误,无法提交。");
 		addMemberLog(t.getId(),0,"修改重新发起",TokenManager.getAdminId());
 		t.setProcessStatus(1);
@@ -1574,11 +1574,11 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	@Override
 	public TOrderTask addMemberSonProject(Integer tid, String serviceYear, String taskComment,Integer memberType,String pictureUrl) {
 		Date date =new Date();
-		TOrderTask tOrderTask =  tOrderTaskMapper.selectByPrimaryKey(tid);
+		TOrderTask tOrderTask =  tOrderTaskMapper.queryById(tid);
 		tOrderTask.setSplitStatus(1);
 		tOrderTask.setSplitAid(TokenManager.getAdminId());
 		tOrderTask.setSplitTime(date);
-		tOrderTaskMapper.updateByPrimaryKey(tOrderTask);
+		tOrderTaskMapper.update(tOrderTask);
 		tOrderTask.setId(null);
 		tOrderTask.setSplitStatus(2);
 		tOrderTask.setSplitSuper(tid);
@@ -1659,7 +1659,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		}
 		tOrderTask.setId(t.getId());
 
-		tOrderTaskMapper.updateByPrimaryKeySelective(tOrderTask);
+		tOrderTaskMapper.update(tOrderTask);
 		tOrderExamineMapper.insertBatch(list);
 	}
 
@@ -1809,15 +1809,15 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 
 	@Override
 	public int deleteMemberSonProject(Integer id) {
-		TOrderTask task = tOrderTaskMapper.selectByPrimaryKey(id);
-		tOrderTaskMapper.deleteByPrimaryKey(id);
+		TOrderTask task = tOrderTaskMapper.queryById(id);
+		tOrderTaskMapper.deleteById(id);
 		List<TOrderTaskListBo> tOrderTaskListBos = tOrderTaskMapper.splitProjectList(task.getSplitSuper(),null);
 		//如果没有子项目则修改上级
 		if (tOrderTaskListBos==null||tOrderTaskListBos.isEmpty()){
 			TOrderTask tOrderTask=new TOrderTask();
 			tOrderTask.setId(task.getSplitSuper());
 			tOrderTask.setSplitStatus(0);
-			tOrderTaskMapper.updateByPrimaryKeySelective(tOrderTask);
+			tOrderTaskMapper.update(tOrderTask);
 		}
 		tTaskMidMapper.deleteByPrimaryKey(id);
 		tTaskMemberMapper.deleteByPrimaryKey(id);
@@ -1976,7 +1976,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		TaskStop use = taskStopMapper.selectByPrimaryKey(in.getTaskStopId());
 		TaskStop t=new TaskStop();
 		t.setId(use.getId());
-		TOrderTask task = tOrderTaskMapper.selectByPrimaryKey(use.getTid());
+		TOrderTask task = tOrderTaskMapper.queryById(use.getTid());
 		if (in.getStatus()==1){
 			t.setStatus(1);
 			StringBuffer str =new StringBuffer();
@@ -2001,7 +2001,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 			task2.setId(task.getId());
 			task2.setProjectStatus(task.getProjectStatus());
 
-			tOrderTaskMapper.updateByPrimaryKeySelective(task2);
+			tOrderTaskMapper.update(task2);
 			tOrderMidMapper.updateStopProjectByOrderNo(task.getOrderNo());
 			if (task.getSplitStatus()==1){
 				TOrderTask tot=new TOrderTask();
@@ -2057,7 +2057,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		}else if (formRetrieve==4){
 			in.setSatisfactionDegreeUrl(satisfactionDegreeUrl);
 		}
-		return tOrderTaskMapper.updateByPrimaryKeySelective(in);
+		return tOrderTaskMapper.update(in);
 	}
 
 	@Override

+ 12 - 17
src/main/java/com/goafanti/order/service/impl/OutsourceOrgServiceImpl.java

@@ -1,30 +1,25 @@
 package com.goafanti.order.service.impl;
 
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
 import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.dao.*;
-import com.goafanti.common.model.*;
-import com.goafanti.order.bo.*;
-import com.goafanti.organization.bo.ProjectTypePuls;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
 import com.goafanti.common.enums.NoticeStatus;
 import com.goafanti.common.enums.OrderLogProcess;
+import com.goafanti.common.model.*;
 import com.goafanti.core.mybatis.BaseMybatisDao;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
+import com.goafanti.order.bo.*;
 import com.goafanti.order.enums.ProcessStatus;
 import com.goafanti.order.service.OrderNewService;
 import com.goafanti.order.service.OrderService;
 import com.goafanti.order.service.OutsourceOrgService;
+import com.goafanti.organization.bo.ProjectTypePuls;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.util.*;
 
 @Service
 public class OutsourceOrgServiceImpl  extends BaseMybatisDao<TOrderOutsourceMapper> implements OutsourceOrgService {
@@ -138,7 +133,7 @@ public class OutsourceOrgServiceImpl  extends BaseMybatisDao<TOrderOutsourceMapp
 			}
 			tOrderNewMapper.updateByPrimaryKeySelective(t);
 		}else if (o.getType()==1) {//项目外包
-			TOrderTask tt=tOrderTaskMapper.selectByPrimaryKey(o.getTid());
+			TOrderTask tt=tOrderTaskMapper.queryById(o.getTid());
 			aids.add(tt.getTaskReceiver());
 			Admin a =adminMapper.selectByPrimaryKey(TokenManager.getAdminId());
 			OutsourceLog ol=new OutsourceLog();
@@ -151,7 +146,7 @@ public class OutsourceOrgServiceImpl  extends BaseMybatisDao<TOrderOutsourceMapp
 				TOrderTask tt2=new TOrderTask();
 				tt2.setId(o.getTid());
 				tt2.setOutsource(1);
-				tOrderTaskMapper.updateByPrimaryKeySelective(tt2);
+				tOrderTaskMapper.update(tt2);
 				type=NoticeStatus.PROJECT_OUTSOURCE_YES.getCode();
 				ol.setStatus(1);
 				addOrderLog(o.getOrderNo(),OrderLogProcess.XMWBTG.getCode(),o.getRemarks());
@@ -221,7 +216,7 @@ public class OutsourceOrgServiceImpl  extends BaseMybatisDao<TOrderOutsourceMapp
 		}else {
 			tt.setCheckStatus(2);
 		}
-		tOrderTaskMapper.updateByPrimaryKeySelective(tt);
+		tOrderTaskMapper.update(tt);
 		OutsourceLog ol=new OutsourceLog();
 		ol.setTid(tto.getTid());
 		ol.setAid(TokenManager.getAdminId());

+ 5 - 5
src/main/java/com/goafanti/organization/service/impl/ThirdPartyCompanyServiceImpl.java

@@ -317,7 +317,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 			TOrderTask t=new TOrderTask();
 			t.setId(p.getTid());
 			t.setCheckStatus(3);
-			tOrderTaskMapper.updateByPrimaryKeySelective(t);
+			tOrderTaskMapper.update(t);
 		}
 		tOrderPaymentMapper.insertSelectiveGetId(p);
 		NoticeInformationBo ni=financialPaymentMapper.selectBypidGetNotice(p.getId());
@@ -574,7 +574,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 		//没有填写申请金额的情况下计算金额
 				checkGetAmount(p);
 		if (p.getChooseType()==2) {
-			TOrderTask tot=tOrderTaskMapper.selectByPrimaryKey(p.getTid());
+			TOrderTask tot=tOrderTaskMapper.queryById(p.getTid());
 			List<outOrderPayment> list2=tOrderPaymentMapper.selectByTid(p.getTid(),p.getChooseType(),1);
 			int x=p.getQuantity();
 			for (outOrderPayment out : list2) {
@@ -960,7 +960,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 
 	@Override
 	public boolean addCompanyChekeNumber(ThirdPartyCompany t) {
-		TOrderTask tt=tOrderTaskMapper.selectByPrimaryKey(t.getTid());
+		TOrderTask tt=tOrderTaskMapper.queryById(t.getTid());
 		 List<OutThirdPartyCompany> list =thirdPartyCompanyMapper.selectByTid(t.getTid());
 		 Integer count=t.getQuantity();
 		 for (OutThirdPartyCompany out : list) {
@@ -1094,7 +1094,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 	@Override
 	public boolean checkQuantity(TOrderPayment p) {
 		TOrderPayment tp=tOrderPaymentMapper.selectByPrimaryKey(p.getId());
-		TOrderTask tt=tOrderTaskMapper.selectByPrimaryKey(tp.getTid());
+		TOrderTask tt=tOrderTaskMapper.queryById(tp.getTid());
 		List<outOrderPayment> list =tOrderPaymentMapper.selectByTid(tt.getId(), 2,1);
 		Integer q=0;
 		for (outOrderPayment o : list) {
@@ -1192,7 +1192,7 @@ public class ThirdPartyCompanyServiceImpl extends  BaseMybatisDao<ThirdPartyComp
 	 * @param id =tid 项目编号
 	 */
 	private void updateCountByTid(Integer id) {
-		TOrderTask t = tOrderTaskMapper.selectByPrimaryKey(id);
+		TOrderTask t = tOrderTaskMapper.queryById(id);
 		tOrderMidMapper.updateCostAmount(t.getOrderNo());
 	}
 

+ 12 - 40
src/main/java/com/goafanti/patent/service/impl/PatentNewServiceImpl.java

@@ -1,47 +1,15 @@
 package com.goafanti.patent.service.impl;
 
 
-import java.io.UnsupportedEncodingException;
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
+import cn.jiguang.common.utils.StringUtils;
 import com.goafanti.admin.service.DepartmentService;
-import com.mysql.jdbc.log.Log;
-import org.apache.poi.ss.usermodel.Cell;
-import org.apache.poi.ss.usermodel.CellType;
-import org.apache.poi.ss.usermodel.Row;
-import org.apache.poi.ss.usermodel.Sheet;
-import org.apache.poi.ss.usermodel.Workbook;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Service;
-import org.springframework.web.multipart.MultipartFile;
-
 import com.goafanti.common.bo.EmailBo;
 import com.goafanti.common.bo.Error;
 import com.goafanti.common.constant.AFTConstants;
-import com.goafanti.common.dao.AdminMapper;
-import com.goafanti.common.dao.PatentNewLogMapper;
-import com.goafanti.common.dao.PatentNewMapper;
-import com.goafanti.common.dao.PatentPaymentDetailsMapper;
-import com.goafanti.common.dao.PatentYearPaymentMapper;
-import com.goafanti.common.dao.TOrderTaskMapper;
+import com.goafanti.common.dao.*;
 import com.goafanti.common.enums.NoticeStatus;
 import com.goafanti.common.error.BusinessException;
-import com.goafanti.common.model.Admin;
-import com.goafanti.common.model.Notice;
-import com.goafanti.common.model.PatentNew;
-import com.goafanti.common.model.PatentNewLog;
-import com.goafanti.common.model.PatentPaymentDetails;
-import com.goafanti.common.model.PatentYearPayment;
-import com.goafanti.common.model.TOrderTask;
+import com.goafanti.common.model.*;
 import com.goafanti.common.utils.AsyncUtils;
 import com.goafanti.common.utils.DateUtils;
 import com.goafanti.common.utils.ExcelUtils;
@@ -53,10 +21,14 @@ import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.patent.bo.PatentNewBo;
 import com.goafanti.patent.enums.PatentType;
 import com.goafanti.patent.service.PatentNewService;
+import org.apache.poi.ss.usermodel.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
 
-import cn.jiguang.common.utils.StringUtils;
-
-import javax.mail.MessagingException;
+import java.math.BigDecimal;
+import java.util.*;
 
 @Service
 public class PatentNewServiceImpl  extends BaseMybatisDao<PatentNewMapper> implements PatentNewService {
@@ -558,7 +530,7 @@ public class PatentNewServiceImpl  extends BaseMybatisDao<PatentNewMapper> imple
 				if (tid==null){
 					return p.getPatentAmount();
 				}else{
-					TOrderTask t=tOrderTaskMapper.selectByPrimaryKey(tid);
+					TOrderTask t=tOrderTaskMapper.queryById(tid);
 					if (t!=null&&t.getCostReduction()!=null&& t.getCostReduction()==1) {
 						return p.getReductionAmount();
 					}else {
@@ -716,7 +688,7 @@ public class PatentNewServiceImpl  extends BaseMybatisDao<PatentNewMapper> imple
 
 	@Override
 	public boolean checkTid(Integer tid) {
-		TOrderTask task=tOrderTaskMapper.selectByPrimaryKey(tid);
+		TOrderTask task=tOrderTaskMapper.queryById(tid);
 		if (task==null) {
 			return true;
 		}