Bläddra i källkod

订单催款列表开发

anderx 4 år sedan
förälder
incheckning
e5f603f04b

+ 1 - 1
.idea/artifacts/kede_server_war_exploded.xml

@@ -1,6 +1,6 @@
 <component name="ArtifactManager">
   <artifact type="exploded-war" build-on-make="true" name="kede-server:war exploded">
-    <output-path>$PROJECT_DIR$/target/kede-server-1.0.0-BUILD-SNAPSHOT</output-path>
+    <output-path>$PROJECT_DIR$/out</output-path>
     <properties id="maven-jee-properties">
       <options>
         <exploded>true</exploded>

+ 2 - 1
src/main/java/com/goafanti/common/constant/AFTConstants.java

@@ -182,5 +182,6 @@ public class AFTConstants {
 	public static final String DEFAULT_CONTACT_TYPE="0";
 	
 	public static final String DEFAULT_RESULT="签单-自动触发";
-	
+
+    public static final long DUN_START_LIMIT_MS						= 24*3600*1000*900L;
 }

+ 4 - 1
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -128,8 +128,11 @@ public class WebpageController extends BaseController {
 	public String adminAchievement(HttpServletRequest request, ModelAndView modelview) {
 		return "/admin/achievement";
 	}
-	
 
+	@RequestMapping(value = "/admin/legalAffairs", method = RequestMethod.GET)
+	public String legalAffairs(HttpServletRequest request, ModelAndView modelview) {
+		return "/admin/legalAffairs";
+	}
 	@RequestMapping(value = "/admin/set", method = RequestMethod.GET)
 	public String adminSet(HttpServletRequest request, ModelAndView modelview) {
 		return "/admin/set";

+ 21 - 21
src/main/java/com/goafanti/common/mapper/TOrderMidMapper.xml

@@ -367,44 +367,44 @@
            b.order_arrears orderArrears,b.dun_start_time dunStartTime,date_format(b.dun_start_time,'%Y-%m-%d %H:%i:%S')dunStartTimes
     from t_order_new a left join t_order_mid b on a.order_no =b.order_no
     where b.order_receivables >0
-      <if test="in.userName != null">
-      and b.buyer_name like concat('%',#{in.userName},'%')
+      <if test="userName != null">
+      and b.buyer_name like concat('%',#{userName},'%')
       </if>
-      <if test="in.in.legalAffairs != null">
-      and b.legal_affairs = #{in.legalAffairs}
+      <if test="legalAffairs != null">
+      and b.legal_affairs = #{legalAffairs}
       </if>
-    <if test="in.in.contractNo != null">
-      and a.contract_no like  concat('%',#{in.contractNo},'%')
+    <if test="contractNo != null">
+      and a.contract_no like  concat('%',#{contractNo},'%')
     </if>
-    <if test="in.in.aid != null">
-      and b.salesman_id = #{in.aid}
+    <if test="aid != null">
+      and b.salesman_id = #{aid}
     </if>
-    <if test="in.in.depId != null">
-      and a.order_dep = #{in.depId}
+    <if test="depId != null">
+      and a.order_dep = #{depId}
     </if>
     order by b.dun_start_time desc
     <if test="page_sql != null">
         ${page_sql}
     </if>
   </select>
-  <select id="legalAffairsOrderList" resultType="integer">
+  <select id="legalAffairsOrderCount" resultType="integer">
     select count(*)
     from t_order_new a left join t_order_mid b on a.order_no =b.order_no
     where b.order_receivables >0
-    <if test="in.userName != null">
-      and b.buyer_name like concat('%',#{in.userName},'%')
+    <if test="userName != null">
+      and b.buyer_name like concat('%',#{userName},'%')
     </if>
-    <if test="in.in.legalAffairs != null">
-      and b.legal_affairs = #{in.legalAffairs}
+    <if test="legalAffairs != null">
+      and b.legal_affairs = #{legalAffairs}
     </if>
-    <if test="in.in.contractNo != null">
-      and a.contract_no like  concat('%',#{in.contractNo},'%')
+    <if test="contractNo != null">
+      and a.contract_no like  concat('%',#{contractNo},'%')
     </if>
-    <if test="in.in.aid != null">
-      and b.salesman_id = #{in.aid}
+    <if test="aid != null">
+      and b.salesman_id = #{aid}
     </if>
-    <if test="in.in.depId != null">
-      and a.order_dep = #{in.depId}
+    <if test="depId != null">
+      and a.order_dep = #{depId}
     </if>
   </select>
 </mapper>

+ 9 - 0
src/main/java/com/goafanti/order/bo/OutOrderLegalAffairsListBo.java

@@ -15,6 +15,15 @@ public class OutOrderLegalAffairsListBo {
     private BigDecimal orderArrears;
     private Date dunStartTime;
     private String dunStartTimes;
+    private Integer daysRemaining;
+
+    public Integer getDaysRemaining() {
+        return daysRemaining;
+    }
+
+    public void setDaysRemaining(Integer daysRemaining) {
+        this.daysRemaining = daysRemaining;
+    }
 
     public String getOrderNo() {
         return orderNo;

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

@@ -1,14 +1,23 @@
 package com.goafanti.order.service.impl;
 
+import com.goafanti.common.constant.AFTConstants;
 import com.goafanti.common.dao.TOrderMidMapper;
 import com.goafanti.common.model.TOrderMid;
+import com.goafanti.common.utils.DateUtils;
 import com.goafanti.core.mybatis.BaseMybatisDao;
+import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.order.bo.InputOrderListBo;
+import com.goafanti.order.bo.OutOrderLegalAffairsListBo;
 import com.goafanti.order.service.LegalAffairsService;
+import org.apache.poi.ss.formula.functions.Now;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
+import java.util.Calendar;
+import java.util.Date;
 import java.util.HashMap;
+import java.util.List;
 
 @Service
 public class LegalAffairsServiceImpl extends BaseMybatisDao<TOrderMidMapper> implements LegalAffairsService {
@@ -16,6 +25,7 @@ public class LegalAffairsServiceImpl extends BaseMybatisDao<TOrderMidMapper> imp
     private TOrderMidMapper tOrderMidMapper;
 
 
+
     @Override
     public    int pushTransferLagalAffairs(String orderNo){
         TOrderMid tm = new TOrderMid();
@@ -27,7 +37,19 @@ public class LegalAffairsServiceImpl extends BaseMybatisDao<TOrderMidMapper> imp
     @Override
     public Object orderList(InputOrderListBo in) {
         HashMap<String, Object> map = new HashMap<>();
-        map.put("in",in);
-        return findPage("legalAffairsOrderList","legalAffairsOrderCount",map,in.getPageNo(),in.getPageSize());
+        if(in.getContractNo()!=null)map.put("contractNo",in.getContractNo());
+        if(in.getLegalAffairs()!=null)map.put("legalAffairs",in.getLegalAffairs());
+        if(in.getAid()!=null)map.put("aid",in.getAid());
+        if(in.getDepId()!=null)map.put("depId",in.getDepId());
+        if(in.getUserName()!=null)map.put("user",in.getUserName());
+        Pagination<OutOrderLegalAffairsListBo>  p= (Pagination<OutOrderLegalAffairsListBo>) findPage("legalAffairsOrderList","legalAffairsOrderCount",map,in.getPageNo(),in.getPageSize());
+        List<OutOrderLegalAffairsListBo> list = (List<OutOrderLegalAffairsListBo>) p.getList();
+        Date date = new Date();
+        for (OutOrderLegalAffairsListBo out : list) {
+            long start=out.getDunStartTime().getTime()+AFTConstants.DUN_START_LIMIT_MS;
+            int i= (int) ((start-date.getTime())/(3600*24*1000));
+            out.setDaysRemaining(i);
+        }
+        return p;
     }
 }

+ 18 - 0
src/main/webapp/WEB-INF/views/admin/legalAffairs.html

@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:th="http://www.thymeleaf.org">
+<head th:replace="common::header(~{::title},~{::link})">
+    <title>法务管理</title>
+    <link th:href="${staticHost+'/dll/dll.css'}" rel="stylesheet">
+    <link th:href="${staticHost+'/admin/legalAffairs.css'}" rel="stylesheet">
+</head>
+<body>
+<div id="root"></div>
+
+<div th:replace="common::footer(~{::script})">
+    <script type="text/javascript" th:src="${staticHost+'/vendors.js'}"></script>
+    <script type="text/javascript" th:src="${staticHost+'/dll/dll.js'}"></script>
+    <script type="text/javascript" th:src="${staticHost+'/admin/legalAffairs.js'}"></script>
+</div>
+</body>
+</html>