Browse Source

订单催款修改

Signed-off-by: anderx <312518615@qq.com>
anderx 6 years ago
parent
commit
d75f0efce1

+ 1 - 1
src/main/java/com/goafanti/common/mapper/NewOrderDunMapper.xml

@@ -416,7 +416,7 @@
     where tid = #{tid,jdbcType=INTEGER}
   </delete>
   <select id="selectListNewOrderDun" resultType="com.goafanti.order.bo.OutNewOrderDunBo">
-  	 select a.id,a.order_no orderNo, a.tid, a.project_type projectType, a.dun_type dunType, a.wait_day waitDay, 
+  select a.id,a.order_no orderNo, a.tid, a.project_type projectType, a.dun_type dunType, a.wait_day waitDay, b.set_up_amount setUpAmount,
   a.effective_count effectiveCount, a.aid, a.create_time createTime ,b.commodity_name commodityName,a.money,a.status,
   a.appropriation_ratio appropriationRatio from new_order_dun a left join t_order_task b on a.tid=b.id where 1=1
   <if test="orderNo != null">

+ 20 - 0
src/main/java/com/goafanti/order/bo/OutNewOrderDunBo.java

@@ -1,5 +1,6 @@
 package com.goafanti.order.bo;
 
+import java.math.BigDecimal;
 import java.util.Calendar;
 
 import com.goafanti.common.constant.AFTConstants;
@@ -12,6 +13,7 @@ public class OutNewOrderDunBo extends NewOrderDun {
 	private Integer approval;
 	private String commodityName;
 	private String startDate;
+	private BigDecimal setUpAmount;
 	
 	
 	public String getDunTypeName() {
@@ -68,4 +70,22 @@ public class OutNewOrderDunBo extends NewOrderDun {
 		this.startDate = startDate;
 	}
 
+	public BigDecimal getSetUpAmount() {
+		return setUpAmount;
+	}
+
+	public void setSetUpAmount(BigDecimal setUpAmount) {
+		this.setUpAmount = setUpAmount;
+	}
+	public BigDecimal getMoney() {
+		if(getDunType()!=null&&getProjectType()!=null){
+			if(Integer.valueOf(""+getProjectType()+getDunType())==33&&
+					super.getMoney()==null&&
+					super.getAppropriationRatio()!=null&&getSetUpAmount()!=null) {
+				return super.getAppropriationRatio().multiply(getSetUpAmount());
+			}
+		} 
+		return super.getMoney();
+	}
+
 }

+ 3 - 2
src/main/java/com/goafanti/order/bo/outOrderDunListBo.java

@@ -87,8 +87,9 @@ public class outOrderDunListBo {
 		this.settlementAmount = settlementAmount;
 	}
 	public BigDecimal getAccountsReceivable() {
-		if(getDunSubject()!=null&&getDunSubject().equals("33")&&accountsReceivable==null&&appropriationRatio !=null &&setUpAmount!=null) {
-			return setUpAmount.multiply(accountsReceivable);
+		if(getProjectType()!=null&&getDunType()!=null&&
+				Integer.valueOf(""+getProjectType()+getDunType())==33&&accountsReceivable==null&&appropriationRatio !=null &&setUpAmount!=null) {
+			return setUpAmount.multiply(appropriationRatio);
 		}
 		return accountsReceivable;
 	}

+ 2 - 6
src/main/java/com/goafanti/order/service/OrderNewService.java

@@ -7,17 +7,14 @@ import java.util.List;
 import javax.mail.MessagingException;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 
 import com.goafanti.common.error.BusinessException;
-import com.goafanti.common.model.NewOrderDun;
 import com.goafanti.common.model.TOrderDun;
 import com.goafanti.common.model.TOrderNew;
 import com.goafanti.common.model.TOrderOutsource;
 import com.goafanti.common.model.TOrderRefundWithBLOBs;
 import com.goafanti.common.model.TOrderTask;
 import com.goafanti.core.mybatis.page.Pagination;
-import com.goafanti.order.bo.InputNewOrderDunBo;
 import com.goafanti.order.bo.OrderDunTaskBo;
 import com.goafanti.order.bo.OrderRefundDetailBo;
 import com.goafanti.order.bo.OutNewOrderDunBo;
@@ -26,8 +23,7 @@ import com.goafanti.order.bo.TOrderLogBo;
 import com.goafanti.order.bo.TOrderNewBo;
 import com.goafanti.order.bo.TOrderRefundBo;
 import com.goafanti.order.bo.TOrderTaskBo;
-import com.goafanti.order.bo.OrderOutsourceBo;
-import com.goafanti.order.bo.OrderOutsourceDtails;
+import com.goafanti.order.bo.outOrderDunListBo;
 
 public interface OrderNewService {
 	
@@ -112,7 +108,7 @@ public interface OrderNewService {
 	 * @param pageSize
 	 * @return
 	 */
-	Pagination<TOrderNewBo> dunOrderNewList(String name, String orderNo, String starTime, String endTime, Integer specially,String adminName,String depId,
+	Pagination<outOrderDunListBo> dunOrderNewList(String name, String orderNo, String starTime, String endTime, Integer specially,String adminName,String depId,
 			Integer newStatus,Integer pageNo, Integer pageSize);
 	/**
 	 * 新增催款记录

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

@@ -97,6 +97,7 @@ import com.goafanti.order.bo.TOrderNewBo;
 import com.goafanti.order.bo.TOrderRefundBo;
 import com.goafanti.order.bo.TOrderTaskBo;
 import com.goafanti.order.bo.TOrderTaskListBo;
+import com.goafanti.order.bo.outOrderDunListBo;
 import com.goafanti.order.enums.ActiveState;
 import com.goafanti.order.enums.ApprovalNewState;
 import com.goafanti.order.enums.LiquidationNewState;
@@ -669,7 +670,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 
 	@SuppressWarnings("unchecked")
 	@Override
-	public Pagination<TOrderNewBo> dunOrderNewList(String name, String orderNo, String starTime, String endTime,
+	public Pagination<outOrderDunListBo> dunOrderNewList(String name, String orderNo, String starTime, String endTime,
 			Integer specially, String adminName,String depId,Integer newStatus,Integer pageNo, Integer pageSize) {
 		Map<String, Object> params = new HashMap<String, Object>();
 		if(pageSize==null||pageSize<0)pageSize=10;
@@ -683,7 +684,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		if (StringUtils.isNotBlank(orderNo)) params.put("orderNo", orderNo);
 		if (StringUtils.isNotBlank(starTime)) params.put("starTime", starTime);
 		if (StringUtils.isNotBlank(endTime)) params.put("endTime", endTime+" 23:59:59");
-		Pagination<TOrderNewBo> p = (Pagination<TOrderNewBo>)findPage("selectDunOrderNewListByPage", "selectDunOrderNewListCount", params, pageNo, pageSize);
+		Pagination<outOrderDunListBo> p = (Pagination<outOrderDunListBo>)findPage("selectDunOrderNewListByPage", "selectDunOrderNewListCount", params, pageNo, pageSize);
 		return p;
 	}