Browse Source

update

Signed-off-by: anderx <312518615@qq.com>
anderx 5 years ago
parent
commit
7fa0260b7a

+ 9 - 8
src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml

@@ -1425,8 +1425,8 @@
 	select  a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,a.receiver_name receiverName,a.project_status as projectStatus,e.contract_no contractNo,
 a.task_receiver taskReceiver,a.task_status as taskStatus,date_format(a.task_distribution_time,'%Y-%m-%d') as taskDate, a.commodity_quantity as commodityQuantity,
 e.approval,l.refund_status outsourceStatus,ifnull(i.alreadyNumber,0) as alreadyNumber,f.nickname as userName,h.name as depName, l.company_name as outsourceName ,
-ifnull(k.hours,0) hours,a.split_status splitStatus,a.split_super splitSuper, a.split_id splitId,b.`type` projectType,ttm.cost_amount costAmount,ttm.party_amount partyAmount,
-a.commodity_price commodityPrice
+ifnull(k.hours,0) hours,a.split_status splitStatus,a.split_super splitSuper, a.split_id splitId,b.`type` projectType,ifnull(ttm.cost_amount,0) costAmount,
+ifnull(ttm.party_amount,0) partyAmount,a.commodity_price commodityPrice
     from t_order_task a left join business_project b on a.commodity_id=b.id left join business_category c on b.cid=c.id 
   	left join t_order_new e on a.order_no=e.order_no left join user f on e.buyer_id=f.id
     left join department h on e.order_dep=h.id left join (select task_id , sum(already_number) as alreadyNumber from task_progress 
@@ -1487,8 +1487,8 @@ a.commodity_price commodityPrice
   	<if test="adminName != null">
   	and a.receiver_name like CONCAT('%', #{adminName,jdbcType=VARCHAR},'%')
   	</if>
-  	<if test="startSignTime != null and endSignTime != null">
-  	and e.sign_time between #{startSignTime} and #{endSignTime}
+  	<if test="startTime != null and endTime != null">
+  	and e.sign_time between #{startTime} and #{endTime}
   	</if>
   	order by a.task_distribution_time desc
   	<if test="page_sql!=null">
@@ -1554,8 +1554,8 @@ a.commodity_price commodityPrice
   	<if test="adminName != null">
   	and a.receiver_name  like CONCAT('%', #{adminName,jdbcType=VARCHAR},'%')
   	</if>
-  	<if test="startSignTime != null and endSignTime != null">
-  	and e.sign_time between #{startSignTime} and #{endSignTime}
+  	 	<if test="startTime != null and endTime != null">
+  	and e.sign_time between #{startTime} and #{endTime}
   	</if>
   </select>
   <select id="getOrderTaskDetail" resultType="com.goafanti.order.bo.TOrderTaskDetailBo">
@@ -1585,11 +1585,12 @@ select
     a.task_status as taskStatus,f.nickname as userName,ifnull(g.hours,0) as hours,a.commodity_quantity as commodityQuantity,a.commodity_price commodityPrice,
     e.contract_no as contractNo,date_format(e.create_time,'%Y-%m-%d %H:%i:%S')as creteTime,date_format(e.sign_time,'%Y-%m-%d')as signTime,a.outsource,
     date_format(a.task_distribution_time,'%Y-%m-%d %H:%i:%S')taskDistributionTime, date_format(a.task_end_time,'%Y-%m-%d')taskEndTime,tm.salesman_name salesmanName,
-    a.split_status splitStatus, a.split_super splitSuper, a.split_id splitId
+    a.split_status splitStatus, a.split_super splitSuper, a.split_id splitId,ifnull(ttm.cost_amount,0) costAmount,ifnull(ttm.party_amount,0) partyAmount
   	from t_order_task a left join business_project b on a.commodity_id=b.id left join business_category c on b.cid=c.id
     left join t_order_new e on a.order_no=e.order_no left join department dep on e.order_dep=dep.id  
     left join user f on e.buyer_id=f.id left join (select tid,sum(hours)hours from task_hours_count group by tid) g on a.id=g.tid
-    left join t_order_mid tm on a.order_no=tm.order_no where e.delete_sign =0 and a.super_id is null and a.split_status in(0,2)
+    left join t_order_mid tm on a.order_no=tm.order_no left join t_task_mid ttm  on a.id=ttm.tid
+    where e.delete_sign =0 and a.super_id is null and a.split_status in(0,2)
   	<if test="shiroType == 1 and aid !=null">
   	  	and tm.finance_id= #{aid,jdbcType=VARCHAR}
   	</if>

+ 2 - 0
src/main/java/com/goafanti/order/bo/inuptTaskHoursListBo.java

@@ -11,6 +11,8 @@ public class inuptTaskHoursListBo {
 	private String depId;
 	private String contractNo;
 	private Integer outsource;
+	
+	
 	public String getName() {
 		return name;
 	}

+ 0 - 1
src/main/java/com/goafanti/order/controller/AdminNewOrderApiController.java

@@ -18,7 +18,6 @@ import org.springframework.web.bind.annotation.RestController;
 import com.goafanti.common.bo.Result;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.CertifyApiController;
-import com.goafanti.common.model.TOrderNew;
 import com.goafanti.common.model.TOrderNewWithBLOBs;
 import com.goafanti.common.model.TOrderRefundWithBLOBs;
 import com.goafanti.common.model.TOrderTask;

+ 0 - 2
src/main/java/com/goafanti/order/controller/OrderChangeApiController.java

@@ -12,7 +12,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
 
 import com.goafanti.common.bo.Result;
-import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.constant.ErrorConstants;
 import com.goafanti.common.controller.CertifyApiController;
 import com.goafanti.common.model.OrderRefundInvoice;
@@ -22,7 +21,6 @@ import com.goafanti.common.utils.StringUtils;
 import com.goafanti.order.bo.InputNewOrderRefund;
 import com.goafanti.order.bo.InputTChangeTask;
 import com.goafanti.order.bo.NewOrderChangeBo;
-import com.goafanti.order.enums.ProcessStatus;
 import com.goafanti.order.service.OrderChangeService;
 
 @RestController

+ 2 - 2
src/main/java/com/goafanti/order/controller/OrderProjectApiController.java

@@ -55,10 +55,10 @@ public class OrderProjectApiController extends CertifyApiController {
 	@RequestMapping(value="/orderTaskList" ,method = RequestMethod.GET)
 	public Result orderTaskList(String name,String orderNo,String taskId,Integer taskStatus,String adminName,Integer specially,String depId  ,
 			String contractNo,Integer projectStatus ,Integer approval,Integer outsource,Integer outsourceStatus,
-			String startSignTime,String endSignTime,Integer pageNo,Integer pageSize){
+			String startTime,String endTime,Integer pageNo,Integer pageSize){
 		Result res=new Result();
 		res.setData(orderProjectService.orderTaskList( name, orderNo, taskId, taskStatus, adminName,specially ,  depId,contractNo, 
-				projectStatus,approval, outsource, outsourceStatus,startSignTime,endSignTime,pageNo, pageSize));
+				projectStatus,approval, outsource, outsourceStatus,startTime,endTime,pageNo, pageSize));
 		return res;
 	}
 	

+ 1 - 1
src/main/java/com/goafanti/order/service/OrderProjectService.java

@@ -20,7 +20,7 @@ public interface OrderProjectService {
 	int updateProjectDistribution(Integer taskId, String taskReceiverId,Integer specially, String remarks);
 
 	Pagination<TOrderTaskListBo> orderTaskList(String name,String orderNo,String taskId,Integer taskStatus,String adminName,Integer specially,String depId  ,
-			String contractNo,Integer projectStatus ,Integer approval,Integer outsource,Integer outsourceStatus,String startSignTime,String endSignTime,Integer pageNo,Integer pageSize);
+			String contractNo,Integer projectStatus ,Integer approval,Integer outsource,Integer outsourceStatus,String startTime,String endTime,Integer pageNo,Integer pageSize);
 
 	TOrderTaskDetailBo orderTaskDetail(String id);
 

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

@@ -16,7 +16,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 
-import javax.annotation.Resource;
+
 import javax.mail.MessagingException;
 import javax.servlet.http.HttpServletResponse;
 import org.apache.commons.lang3.StringUtils;
@@ -121,7 +121,6 @@ import com.goafanti.order.service.OrderService;
 import com.goafanti.organization.bo.OrganizationListOut;
 import com.goafanti.organization.bo.OutPaymentNode;
 import com.goafanti.organization.bo.OutThirdPartyCompany;
-import com.goafanti.order.service.OrderProjectService;
 
 @Service
 @EnableAsync

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

@@ -70,7 +70,6 @@ import com.goafanti.common.model.TTaskLog;
 import com.goafanti.common.model.TaskHoursCount;
 import com.goafanti.common.model.TaskLog;
 import com.goafanti.common.model.TaskProgress;
-import com.goafanti.common.task.OrderDunTask;
 import com.goafanti.common.utils.DateUtils;
 import com.goafanti.common.utils.ExportExcelUtil;
 import com.goafanti.common.utils.LoggerUtils;
@@ -225,7 +224,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 	@SuppressWarnings("unchecked")
 	@Override
 	public Pagination<TOrderTaskListBo> orderTaskList(String name,String orderNo,String taskId,Integer taskStatus,String adminName,Integer specially,String depId  ,
-			String contractNo,Integer projectStatus ,Integer approval,Integer outsource,Integer outsourceStatus,String startSignTime,String endSignTime,Integer pageNo,Integer pageSize) {
+			String contractNo,Integer projectStatus ,Integer approval,Integer outsource,Integer outsourceStatus,String startTime,String endTime,Integer pageNo,Integer pageSize) {
 		Map<String, Object> params = new HashMap<String, Object>();
 		if(pageSize==null||pageSize<0)pageSize=10;
 		if(pageNo==null||pageNo<0)pageNo=1;
@@ -239,8 +238,8 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		if (StringUtils.isNotBlank(taskId)) params.put("taskId", taskId);
 		if (approval !=null) params.put("approval", approval);
 		if (StringUtils.isNotBlank(adminName)) params.put("adminName", adminName);
-		if (StringUtils.isNotBlank(startSignTime)) params.put("startSignTime", startSignTime);
-		if (StringUtils.isNotBlank(endSignTime)) params.put("endSignTime", endSignTime);
+		if (StringUtils.isNotBlank(startTime)) params.put("startTime", startTime);
+		if (StringUtils.isNotBlank(endTime)) params.put("endTime", endTime);
 		if (null != taskStatus) params.put("taskStatus", taskStatus);
 		if (outsourceStatus !=null) params.put("outsourceStatus", outsourceStatus);
 		List<String> fids=new ArrayList<>();
@@ -730,7 +729,8 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 			@SuppressWarnings("unchecked")
 			List<TOrderTaskListBo> list=(List<TOrderTaskListBo>) taskHoursList(ib,  pageNo, pageSize).getList();
 			//合同编号  订单编号  客户名称    订单部门  订单负责人      项目类别   项目编号   项目名称     项目负责人  项目价格(万元)    数量(个)       任务状态   项目状态    工时   签单时间    派单时间   分配时间   完成时间
-    		String[] comment = {"合同编号","订单编号","客户名称","订单部门","订单负责人","项目类别","项目编号","项目名称","项目负责人","项目价格(万元)","数量(个)","任务状态","项目状态","是否外包","工时","签单日期","派单日期","分配时间","完成时间"};
+    		String[] comment = {"合同编号","订单编号","客户名称","订单部门","订单负责人","项目类别","项目编号","项目名称","项目负责人","项目价格(万元)",
+    				"数量(个)","任务状态","项目状态","是否外包","工时","签单日期","派单日期","分配时间","完成时间" ,"成本(万元)","已付(万元)" };
     		String fileName ="工时信息记录表" + new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()) + ".xls";
     		//type 0 变更
     		XSSFWorkbook wb =ExportExcelUtil.exportTemplateInfoS(comment,"工时信息");
@@ -764,6 +764,8 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
     				case "完成时间": o = ob.getTaskEndTime(); break;
     				case "签单日期": o = ob.getSignTime(); break;
     				case "派单日期": o = ob.getCreteTime();break;
+    				case "成本(万元)": o = ob.getCostAmount(); break;
+    				case "已付(万元)": o = ob.getPartyAmount(); break;
     				default: o = ""; break;
     				}
     				XSSFCell c = r.createCell(i);