Преглед изворни кода

项目BUG优化;专利提醒定时时间恢复

anderx пре 6 година
родитељ
комит
4a1aef56e1

+ 16 - 9
src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml

@@ -870,12 +870,13 @@
    <!-- 查看所有待财务管理员分配的订单数据 -->
   <select id="getAllUnassignedListOrder" parameterType="Map" resultType="com.goafanti.order.bo.OrderListBo">
   	select * from (
-  	select o.order_no as orderNo, o.order_type orderType, o.create_time as createTime, o.process_status as processStatus,
+  	  select o.order_no as orderNo, o.order_type orderType, o.create_time as createTime, o.process_status as processStatus,
   	o.sign_time as signTime, u.nickname as buyerName,o.total_amount signTotalAmount, o.approval , a.name sellerName
-  	,liquidation_status,o.finance_id as financeId,contract_no as contractNo
+  	,liquidation_status,o.finance_id as financeId,contract_no as contractNo,d.name as departmentName
   	from t_order_new o 
   	left join `user` u on o.buyer_id = u.id
   	left join admin a on o.salesman_id = a.id
+  	left join department d on o.order_dep=d.id
   	where delete_sign = 0
   	and order_status = 2
   	<if test="o.processStatus == 2">
@@ -903,12 +904,13 @@
   	and o.create_time between #{a,jdbcType=VARCHAR} and #{b,jdbcType=VARCHAR}
   	</if>
   	union 
-	select o.order_no as orderNo, o.order_type orderType, o.create_time as createTime, o.process_status as processStatus, 
+	  	select o.order_no as orderNo, o.order_type orderType, o.create_time as createTime, o.process_status as processStatus, 
 	o.sign_time as signTime, u.nickname as buyerName,o.total_amount signTotalAmount, o.approval , a.name sellerName
-	,liquidation_status ,o.finance_id as financeId,contract_no as contractNo
+	,liquidation_status ,o.finance_id as financeId,contract_no as contractNo,d.name as departmentName
 	from t_order_new o 
 	left join `user` u on o.buyer_id = u.id 
 	left join admin a on o.salesman_id = a.id 
+	left join department d on o.order_dep=d.id
 	where delete_sign = 0 and approval = 2 and finance_id is null and order_status = 2
   	<if test="o.orderNo != null and o.orderNo != &quot;&quot;">
   	and o.order_no = #{o.orderNo,jdbcType=VARCHAR}
@@ -1059,12 +1061,13 @@
   </select>
   <!-- 财务专员查看需要待收款的数据 -->
   <select id="financeList" parameterType="Map" resultType="com.goafanti.order.bo.OrderListBo">
-  select  o.order_no as orderNo, o.sign_time as signTime, u.nickname as buyerName, o.order_status as orderStatus,
+   select  o.order_no as orderNo, o.sign_time as signTime, u.nickname as buyerName, o.order_status as orderStatus,
    o.process_status as processStatus,ifnull(b.amount,0) as actuallyTotalAmount, o.contract_no as contractNo,o.approval,
   a.name as sellerName, o.salesman_id as sellerId, o.buyer_id as buyerId, o.liquidation_status as liquidationStatus , 
   o.first_amount as signFirstPayment, o.total_amount as signTotalAmount,o.create_time as createTime,
-  0 as companyId, "湖南科德信息咨询有限公司" as companyName
+  0 as companyId, "湖南科德信息咨询有限公司" as companyName,d.name as departmentName
   	 from t_order_new o 
+  	 left join department d on o.order_dep=d.id
   	 left join `user` u on o.buyer_id = u.id 
   	 left join admin a on o.salesman_id = a.id
   	 left join (select sum(transaction_amount) as amount ,order_no from t_order_bill_new
@@ -1083,7 +1086,7 @@
 	  	and o.order_status = #{o.orderStatus,jdbcType=INTEGER}
 	  	</if>
   		<if test="o.departmentId != null and o.departmentId != &quot;&quot;">
-	  	and a.department_id = #{o.departmentId,jdbcType=INTEGER}
+	  	and o.order_dep = #{o.departmentId,jdbcType=INTEGER}
 	  	</if>
   		<if test="o.liquidationStatus != null and o.liquidationStatus != &quot;&quot;">
 	  	and o.liquidation_status = #{o.liquidationStatus,jdbcType=INTEGER}
@@ -1126,7 +1129,7 @@
 	  	and o.order_status = #{o.orderStatus,jdbcType=INTEGER}
 	  	</if>
 	  	<if test="o.departmentId != null and o.departmentId != &quot;&quot;">
-	  	and a.department_id = #{o.departmentId,jdbcType=INTEGER}
+	  	and o.order_dep = #{o.departmentId,jdbcType=INTEGER}
 	  	</if>
 	  	<if test="o.liquidationStatus != null and o.liquidationStatus != &quot;&quot;">
 	  	and o.liquidation_status = #{o.liquidationStatus,jdbcType=VARCHAR}
@@ -1165,7 +1168,7 @@
   	</if>
   	from t_order_new a  left join `user` b on a.buyer_id=b.id 
   	left join admin c on a.salesman_id=c.id
-  	left join department dep on c.department_id=dep.id
+  	left join department dep on a.order_dep=dep.id
   	left join admin d on a.finance_id=d.id
   	<if test="specially == 2">
 	left join (select * from t_order_back a where back_status=0) e on a.order_no=e.order_no
@@ -1249,6 +1252,7 @@ where super_id is null )  e on e.order_no=a.order_no
   		count(*)
   	from t_order_new a  left join `user` b on a.buyer_id=b.id
   	left join admin c on a.salesman_id=c.id
+  	left join department dep on a.order_dep=dep.id
   	left join admin d on a.finance_id=d.id
   	<if test="specially == 2">
 	left join (select * from t_order_back a where back_status=0) e on a.order_no=e.order_no
@@ -1304,6 +1308,9 @@ where super_id is null ) e on e.order_no=a.order_no
   	<if test="orderNo != null">
   	and a.order_no = #{orderNo,jdbcType=VARCHAR}
   	</if>
+  	<if test="depId != null">
+  	and dep.id = #{depId,jdbcType=VARCHAR}
+  	</if>
   	<if test="starTime !=null and endTime !=null">
   	and a.create_time between #{starTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
   	</if>

+ 6 - 7
src/main/java/com/goafanti/common/mapper/TOrderTaskMapper.xml

@@ -693,8 +693,7 @@
     left join admin d on a.task_receiver=d.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 admin g on e.salesman_id=g.id
-    left join department h on g.department_id=h.id
+    left join department h on e.order_dep=h.id
     where e.delete_sign=0  and e.order_status not in (5,7)
     <if test="specially == 0">
     and a.task_receiver= #{aid,jdbcType=VARCHAR}
@@ -711,7 +710,7 @@
   	and a.order_no= #{orderNo,jdbcType=VARCHAR}
   	</if>
   	<if test="depId != null">
-  	and g.department_id= #{depId,jdbcType=VARCHAR}
+  	and e.order_dep= #{depId,jdbcType=VARCHAR}
   	</if>
     <if test="name != null">
   	and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
@@ -757,7 +756,7 @@
   	and a.order_no= #{orderNo,jdbcType=VARCHAR}
   	</if>
   	<if test="depId != null">
-  	and g.department_id= #{depId,jdbcType=VARCHAR}
+  	and e.order_dep= #{depId,jdbcType=VARCHAR}
   	</if>
     <if test="name != null">
   	and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
@@ -854,7 +853,7 @@ from t_order_task a left join business_project b on a.commodity_id=b.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 admin g on e.salesman_id=g.id
-    left join department h on g.department_id=h.id
+    left join department h on e.order_dep=h.id
     where e.delete_sign=0 
     and x.task_receiver= #{aid,jdbcType=VARCHAR}
     <if test="orderNo != null">
@@ -867,7 +866,7 @@ from t_order_task a left join business_project b on a.commodity_id=b.id
   	and a.order_no= #{orderNo,jdbcType=VARCHAR}
   	</if>
   	<if test="depId != null">
-  	and g.department_id= #{depId ,jdbcType=VARCHAR}
+  	and e.order_dep= #{depId ,jdbcType=VARCHAR}
   	</if>
   	<if test="taskId != null">
   	and a.id= #{taskId,jdbcType=VARCHAR}
@@ -899,7 +898,7 @@ from t_order_task a left join business_project b on a.commodity_id=b.id
   	and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
   	</if>
   	<if test="depId != null">
-  	and g.department_id= #{depId ,jdbcType=VARCHAR}
+  	and e.order_dep= #{depId ,jdbcType=VARCHAR}
   	</if>
   	<if test="orderNo != null">
   	and a.order_no= #{orderNo,jdbcType=VARCHAR}

+ 4 - 4
src/main/java/com/goafanti/common/task/PatentTask.java

@@ -36,8 +36,8 @@ import com.goafanti.patent.service.PatentNewService;
 
 
 
-//@Component
-@Controller
+@Component
+//@Controller
 public class PatentTask {
 	@Resource
 	private PatentNewService patentNewService;
@@ -59,8 +59,8 @@ public class PatentTask {
 	
 	
 	
-//	@Scheduled(cron = "0 0 0  * * ?") 
-	@RequestMapping(value = "/open/patentRemind", method = RequestMethod.GET)
+	@Scheduled(cron = "0 0 0  * * ?") 
+//	@RequestMapping(value = "/open/patentRemind", method = RequestMethod.GET)
 	public void patentRemind() {
 		LoggerUtils.debug(getClass(), "开始检查专利提醒");
 		DateFormat df = new SimpleDateFormat("yyyy-MM-dd");

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

@@ -52,7 +52,6 @@ public class FundManagerOrderApiController extends CertifyApiController {
 	public Result allUnassignedOrder(OrderListBo order, Integer pageNo, Integer pageSize){
 		Result res = new Result();
 		//判断当前登录的角色是不是财务管理员
-		
 		//order.setProcessStatus(2);//订单状态为2   改为前端传
 		res.setData(fundManageOrderServiceImpl.allUnassignedOrder(order, pageNo, pageSize));
 		return res;

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

@@ -295,12 +295,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 		if (StringUtils.isNotBlank(starTime)) params.put("starTime", starTime);
 		if (StringUtils.isNotBlank(endTime)) params.put("endTime", endTime+" 23:59:59");
 		Pagination<TOrderTaskListBo> p = (Pagination<TOrderTaskListBo>)findPage("selectTaskHoursListByPage", "selectTaskHoursListCount", params, pageNo, pageSize);
-		/*List<TOrderTaskListBo> list=(List<TOrderTaskListBo>) p.getList();
-		for (TOrderTaskListBo t : list) {
-			if (t.getCommodityQuantity()!=null&&t.getCommodityQuantity()>1) {
-				t.setHours(tTaskHoursMapper.getTaskSuperHours(t.getId()));
-			}
-		}*/
+		
 		return p;
 	}