Browse Source

处理前端数据问题

anderx 3 years ago
parent
commit
7f4ff3a4e2

+ 22 - 9
src/main/java/com/goafanti/order/controller/AdminNewOrderApiController.java

@@ -176,29 +176,42 @@ public class AdminNewOrderApiController extends CertifyApiController {
 		return res;
 	}
 	/**
-	 * 修改订单、提交订单、发起订单
+	 * 提交订单、发起订单
+	 */
+	@RequestMapping(value = "/submitOrder",method = RequestMethod.POST)
+	public Result SubmitOrder(TOrderNewWithBLOBs t,String signDate){
+		Result res = new Result();
+		if(orderNewService.chekeProcessStatus(t.getOrderNo())){
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "审核状态错误","审核状态错误"));
+			return res;
+		}
+		return updateServiceOrder( t, 1, signDate);
+	}
+
+
+	/**
+	 * 修改订单
 	 */
 	@RequestMapping(value = "/updateServiceOrderNew",method = RequestMethod.POST)
-	public Result updateServiceOrder(TOrderNewWithBLOBs t,String isSubmit,String signDate){
+	public Result updateServiceOrder(TOrderNewWithBLOBs t,Integer isSubmit,String signDate){
 		Result res = new Result();
-		if(StringUtils.isBlank(t.getOrderNo())){
+		if (StringUtils.isBlank(t.getOrderNo())) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "订单编号"));
 			return res;
 		}
-		if(null==t.getTotalAmount() || null==t.getFirstAmount()){
+		if (null == t.getTotalAmount() || null == t.getFirstAmount()) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "订单金额 和 首付金额"));
 			return res;
 		}
-		if(StringUtils.isBlank(t.getContractPictureUrl())){
+		if (StringUtils.isBlank(t.getContractPictureUrl())) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "合同图片"));
 			return res;
 		}
-		if(null==isSubmit){
+		if (null == isSubmit) {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "提交状态"));
 			return res;
 		}
-		int i=Integer.valueOf(isSubmit);
-		if (i==1) {
+		if (isSubmit == 1) {
 			if (orderNewService.checkORderTask(t.getOrderNo())) {
 				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "主项目"));
 				return res;
@@ -216,7 +229,7 @@ public class AdminNewOrderApiController extends CertifyApiController {
 				e.printStackTrace();
 			}
 		}
-		res.setData(orderNewService.updateServiceOrder(t,i));
+		res.setData(orderNewService.updateServiceOrder(t,isSubmit));
 		return res;
 	}
 

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

@@ -146,7 +146,7 @@ public interface OrderNewService {
 
 	boolean checkORderTask(String orderNo);
 
-
+	boolean chekeProcessStatus(String orderNo);
 
 	int updateOrderOver(String orderNo);
 

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

@@ -151,7 +151,8 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		t.setProcessStatus(ProcessStatus.YPYXY.getCode());
 		t.setProjectStatus(NewProjectStatus.WQD.getCode());
 		t.setApproval(ApprovalNewState.FTP.getCode());
-		t.setDeleteSign(0);//0-正常,1-作废,2-锁定
+		//0-正常,1-作废,2-锁定
+		t.setDeleteSign(0);
 		t.setSalesmanId(TokenManager.getAdminId());
 		t.setCreater(TokenManager.getAdminId()==null?"1":TokenManager.getAdminId());
 		t.setOrderDep(adminMapper.selectByPrimaryKey(TokenManager.getAdminId()).getDepartmentId());
@@ -159,10 +160,12 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		t.setUpdateTime(date);
 		t.setBuyerId(uid);
 		t.setSalesType(salesType);
-		if (salesType== SalesTypes.qd.getCode()&&channelId!=null){
+		if (salesType.equals(SalesTypes.qd.getCode()) &&channelId!=null){
 			t.setChannelId(channelId);
 		}
-		if (other!=null )t.setOther(other);
+		if (other!=null ) {
+			t.setOther(other);
+		}
 		User u=userMapper.selectByPrimaryKey(uid);
 		if(u.getShareType()!=null&&u.getShareType()==2){
 			t.setNewUser(1);
@@ -182,7 +185,9 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		checkOrder(order,t);
 		t.setTaskStatus(TaskState.WFP.getCode());
 		t.setProjectStatus(NewProjectStatus.WQD.getCode());
-		if(t.getCommodityPrice()!=null)order.setTotalAmount(order.getTotalAmount());
+		if(t.getCommodityPrice()!=null) {
+			order.setTotalAmount(order.getTotalAmount());
+		}
 		String str=tOrderTaskMapper.selectByidGetCname(t.getCommodityId());
 		t.setCname(str);
 		tOrderTaskMapper.insertSelective(t);
@@ -193,7 +198,9 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		BusinessProject b=businessProjectMapper.selectByPrimaryKey(t.getCommodityId());
 		if (b.getType()==5){
 			int i=tOrderTaskMapper.getHighNewRetrial(order.getOrderNo());
-			if (i>0) highNewRetrial =1;
+			if (i>0) {
+				highNewRetrial =1;
+			}
 			BusinessCategory bc =businessCategoryMapper.selectByPrimaryKey(b.getCid());
 			if (bc !=null && bc.getSort().equals(6)){
 				TOrderMid tom=new TOrderMid();
@@ -221,12 +228,15 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	}
 
 	public void checkOrder(TOrderNew order,TOrderTask t){
-		if(order == null)
-			 throw new BusinessException(new Error(ErrorConstants.ORDER_NOT_EXIST, "" ,""));
-		if(order.getDeleteSign().equals(ActiveState.ABOLISH.getCode()) )
-			 throw new BusinessException(new Error(ErrorConstants.ORDER_ALREADY_FREEZE, order.getOrderNo(),""));
-		if(order.getDeleteSign().equals( ActiveState.LOCKING.getCode()))
-			 throw new BusinessException(new Error(ErrorConstants.ORDER_ALREADY_REVOKE, order.getOrderNo(),""));
+		if(order == null) {
+			throw new BusinessException(new Error(ErrorConstants.ORDER_NOT_EXIST, "" ,""));
+		}
+		if(order.getDeleteSign().equals(ActiveState.ABOLISH.getCode()) ) {
+			throw new BusinessException(new Error(ErrorConstants.ORDER_ALREADY_FREEZE, order.getOrderNo(),""));
+		}
+		if(order.getDeleteSign().equals( ActiveState.LOCKING.getCode())) {
+			throw new BusinessException(new Error(ErrorConstants.ORDER_ALREADY_REVOKE, order.getOrderNo(),""));
+		}
 		List<LockingReleaseBo> list=userLockReleaseMapper.checkTask(order.getBuyerId(),t.getCommodityId());
 		if (list.size()>0) {
 			for (LockingReleaseBo lockingReleaseBo : list) {
@@ -250,18 +260,18 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			log.setAid(TokenManager.getAdminId());
 			StringBuffer str=new StringBuffer();
 			if ((t.getOfficialCost()==null&&t.getCostReduction()==null&&t.getPatentType()==null)||
-					(t.getOfficialCost()==use.getOfficialCost()&&t.getPatentType()==use.getPatentType()&&t.getCostReduction()==use.getCostReduction())) {
+					(t.getOfficialCost().equals(use.getOfficialCost()) && t.getPatentType().equals(use.getPatentType()) && t.getCostReduction().equals(use.getCostReduction()))) {
 				str.append("未做任何修改。");
 			}else {
 				str.append("修改了:");
-				if (t.getPatentType()!=null&&use.getPatentType()!=t.getPatentType()) {
+				if (t.getPatentType()!=null&& !use.getPatentType().equals(t.getPatentType())) {
 					str.append("官费类型");
 				}
-				if (t.getOfficialCost()!=null&&use.getOfficialCost()!=t.getOfficialCost()) {
+				if (t.getOfficialCost()!=null&& !use.getOfficialCost().equals(t.getOfficialCost())) {
 					str.append(",").append("有无官费");
 						flag=true;
 				}
-				if (t.getCostReduction()!=null&&use.getCostReduction()!=t.getCostReduction()) {
+				if (t.getCostReduction()!=null&& !use.getCostReduction().equals(t.getCostReduction())) {
 					str.append(",").append("有无费减");
 						flag=true;
 				}
@@ -299,9 +309,13 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	@Override
 	public List<TOrderTaskBo> selectOrderTask(String orderNo,Integer type) {
 		if (TokenManager.hasRole(AFTConstants.SALESMAN)||TokenManager.hasRole(AFTConstants.SALESMAN_MANAGER)){
-			if (type==null)type=0;
+			if (type==null) {
+				type=0;
+			}
 		}else {
-			if (type==null)type=1;
+			if (type==null) {
+				type=1;
+			}
 		}
 		List<TOrderTaskBo> list=tOrderTaskMapper.selectOrderTask(orderNo,type);
 			for (TOrderTaskBo t : list) {
@@ -317,7 +331,9 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 					//设置隐藏金额
 					t.setCommodityPrice(new BigDecimal(-1));
 					}
-				if(t.getPatentType()!=null)t.setPatentTypeName(OfficialPatentType.getValueByCode(t.getPatentType()));
+				if(t.getPatentType()!=null) {
+					t.setPatentTypeName(OfficialPatentType.getValueByCode(t.getPatentType()));
+				}
 		}
 		return list;
 	}
@@ -347,7 +363,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			}else {
 				t.setOrderStatus(OrderNewState.QDSHTG.getCode());
 			}
-			if (t2.getApproval()==ApprovalNewState.BH.getCode()){
+			if (t2.getApproval().equals(ApprovalNewState.BH.getCode())){
 				t.setApproval(ApprovalNewState.DSH.getCode());
 			}
 			//生成流转
@@ -376,9 +392,9 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			pushGeneralSendNoticeAndEmail(aids, type,order, TokenManager.getAdminId(),t.getApproval());
 
 		}
-		if (t2.getApproval()==ApprovalNewState.BH.getCode()||
-				t2.getOrderStatus()==OrderNewState.QDSHJJ.getCode()||
-					t2.getOrderStatus()==OrderNewState.YBH.getCode()) {
+		if (t2.getApproval().equals(ApprovalNewState.BH.getCode()) ||
+				t2.getOrderStatus().equals(OrderNewState.QDSHJJ.getCode()) ||
+				t2.getOrderStatus().equals(OrderNewState.YBH.getCode())) {
 			t.setCreateTime(new Date());
 			tOrderBackMapper.updateByOrderNoAndBackStatus(t.getOrderNo());
 		}
@@ -387,7 +403,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		// 1 大于
 		//liquidation_status 清算状态 0-首付待付请,1-尾款待付清,2-已付请,3-部分退款,4-全部退款
 		//settlement_amount 已付  total_amount 总价格   first_amount首付
-		if(t2.getLiquidationStatus()!=LiquidationNewState.FULL_REFUND.getCode()) {
+		if(!t2.getLiquidationStatus().equals(LiquidationNewState.FULL_REFUND.getCode())) {
 			if(t2.getSettlementAmount().compareTo(t.getTotalAmount()) == 0){//如果已付等于总价
 				t.setLiquidationStatus(LiquidationNewState.ALREADY_PAY.getCode());
 			}else if(t2.getSettlementAmount().compareTo(t.getFirstAmount()) >= 0){//如果大于等于首付
@@ -405,7 +421,9 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		Admin a=adminMapper.selectAllByid(TokenManager.getAdminId());
 		User u=userMapper.selectByPrimaryKey(t.getBuyerId());
 
-		if (tm==null) tm=new TOrderMid();
+		if (tm==null) {
+			tm=new TOrderMid();
+		}
 			tm.setOrderNo(t.getOrderNo());
 		if (u!=null&&u.getNickname()!=null) {
 			tm.setBuyerName(u.getNickname());
@@ -521,7 +539,9 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 
 	public void addOrderLog(TOrderLog tl, String reason) {
 		tl.setAid(TokenManager.getAdminId());
-		if(reason!=null)tl.setRemarks(reason);
+		if(reason!=null) {
+			tl.setRemarks(reason);
+		}
 		tOrderLogMapper.insertSelective(tl);
 
 	}
@@ -580,9 +600,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	public Pagination<TOrderNewBo> orderNewList(String aid,String name, String orderNo, String starTime, String endTime,Integer specially,Integer approval,
 			Integer distribution,String depId,String contractNo,Integer outsource,Integer liquidationStatus, Integer amountStatus,
 												String contractStart, String contractEnd,String uid,Integer projectType,Integer processStatus,  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;
+		Map<String, Object> params = new HashMap<>();
 		if (specially!=null&&(specially==0||specially==1||specially==2||specially==4||specially==5||specially==7)) {
 			//0 个人 1 营销员管理 2 驳回 3 特批 4 咨询师管理 5部门订单查询
 			if (specially!=3&&specially!=4) {
@@ -593,28 +611,90 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 				}
 			}
 			//(咨询师管理列表 0 未分配 1部分   2全部)
-			if(specially==4) params.put("distribution",distribution);
+			if(specially==4) {
+				params.put("distribution",distribution);
+			}
 			// 计算出所有本部门及所属部门的ID
-			if(specially==1||specially==5) params.put("deps", orderService.selectMyDeps());
+			if(specially==1||specially==5) {
+				params.put("deps", orderService.selectMyDeps());
+			}
 		}else if(specially==8){
-			if (StringUtils.isNotBlank(uid)) params.put("uid", uid);
+			if (StringUtils.isNotBlank(uid)) {
+				params.put("uid", uid);
+			}
 		}else if (specially==9){
-			if (StringUtils.isNotBlank(aid)) params.put("aid", aid);
+			if (StringUtils.isNotBlank(aid)) {
+				params.put("aid", aid);
+			}
 		}
 			params.put("specially",specially);
-		if (StringUtils.isNotBlank(name)) params.put("name", name);
-		if (StringUtils.isNotBlank(depId)) params.put("depId", depId);
-		if (StringUtils.isNotBlank(contractNo)) params.put("contractNo", contractNo);
-		if (null!=liquidationStatus) params.put("liquidationStatus", liquidationStatus);
-		if (null !=approval)params.put("approval", approval);
-		if(null != amountStatus) params.put("amountStatus", amountStatus);
-		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");
-		if (StringUtils.isNotBlank(contractStart)) params.put("contractStart", contractStart);
-		if (StringUtils.isNotBlank(contractEnd)) params.put("contractEnd", contractEnd+" 23:59:59");
-		if(null != projectType)params.put("projectType",projectType);
-		if(null != processStatus)params.put("processStatus",processStatus);
+		if (StringUtils.isNotBlank(name)) {
+			params.put("name", name);
+		}
+		if (StringUtils.isNotBlank(depId)) {
+			params.put("depId", depId);
+		}
+		if (StringUtils.isNotBlank(contractNo)) {
+			params.put("contractNo", contractNo);
+		}
+		if (null!=liquidationStatus) {
+			params.put("liquidationStatus", liquidationStatus);
+			if (null !=approval) {
+				params.put("approval", approval);
+			}
+			if(null != amountStatus) {
+				params.put("amountStatus", amountStatus);
+			}
+			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");
+			}
+			if (StringUtils.isNotBlank(contractStart)) {
+				params.put("contractStart", contractStart);
+			}
+			if (StringUtils.isNotBlank(contractEnd)) {
+				params.put("contractEnd", contractEnd+" 23:59:59");
+			}
+			if(null != projectType) {
+				params.put("projectType",projectType);
+			}
+			if(null != processStatus) {
+				params.put("processStatus",processStatus);
+			}
+		} else {
+			if (null !=approval) {
+				params.put("approval", approval);
+			}
+			if(null != amountStatus) {
+				params.put("amountStatus", amountStatus);
+			}
+			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");
+			}
+			if (StringUtils.isNotBlank(contractStart)) {
+				params.put("contractStart", contractStart);
+			}
+			if (StringUtils.isNotBlank(contractEnd)) {
+				params.put("contractEnd", contractEnd+" 23:59:59");
+			}
+			if(null != projectType) {
+				params.put("projectType",projectType);
+			}
+			if(null != processStatus) {
+				params.put("processStatus",processStatus);
+			}
+		}
 		params.put("outsource", outsource);
 		Pagination<TOrderNewBo> p = (Pagination<TOrderNewBo>)findPage("selectOrderNewListByPage", "selectOrderNewListCount", params, pageNo, pageSize);
 		return p;
@@ -624,20 +704,67 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	@Override
 	public Pagination<TOrderNewBo> statisticsOrderList(InputStatisticsOrderList in) {
 		Map<String, Object> params = new HashMap<String, Object>();
-		if (in.getProvince()!=null)params.put("province",in.getProvince());
-		if (in.getSalesType()!=null)params.put("salesType",in.getSalesType());
-		if (in.getOrderNo()!=null)params.put("orderNo",in.getOrderNo());
-		if (in.getName()!=null)params.put("name",in.getName());
-		if (in.getContractNo()!=null)params.put("contractNo",in.getContractNo());
-		if (in.getLiquidationStatus()!=null)params.put("liquidationStatus",in.getLiquidationStatus());
-		if (in.getApproval()!=null)params.put("approval",in.getApproval());
-		if (in.getAmountStatus()!=null)params.put("amountStatus",in.getAmountStatus());
-		if (in.getStartDate()!=null)params.put("startDate",in.getStartDate());
-		if (in.getEndDate()!=null)params.put("endDate",in.getEndDate()+" 23:59:59");
-		if (in.getDepId()!=null)params.put("depId",in.getDepId());
-
-
-
+		if (in.getProvince()!=null) {
+			params.put("province",in.getProvince());
+			if (in.getSalesType()!=null) {
+				params.put("salesType",in.getSalesType());
+			}
+			if (in.getOrderNo()!=null) {
+				params.put("orderNo",in.getOrderNo());
+			}
+			if (in.getName()!=null) {
+				params.put("name",in.getName());
+			}
+			if (in.getContractNo()!=null) {
+				params.put("contractNo",in.getContractNo());
+			}
+			if (in.getLiquidationStatus()!=null) {
+				params.put("liquidationStatus",in.getLiquidationStatus());
+			}
+			if (in.getApproval()!=null) {
+				params.put("approval",in.getApproval());
+			}
+			if (in.getAmountStatus()!=null) {
+				params.put("amountStatus",in.getAmountStatus());
+			}
+			if (in.getStartDate()!=null) {
+				params.put("startDate",in.getStartDate());
+			}
+			if (in.getEndDate()!=null) {
+				params.put("endDate",in.getEndDate()+" 23:59:59");
+			}
+		} else {
+			if (in.getSalesType()!=null) {
+				params.put("salesType",in.getSalesType());
+			}
+			if (in.getOrderNo()!=null) {
+				params.put("orderNo",in.getOrderNo());
+			}
+			if (in.getName()!=null) {
+				params.put("name",in.getName());
+			}
+			if (in.getContractNo()!=null) {
+				params.put("contractNo",in.getContractNo());
+			}
+			if (in.getLiquidationStatus()!=null) {
+				params.put("liquidationStatus",in.getLiquidationStatus());
+			}
+			if (in.getApproval()!=null) {
+				params.put("approval",in.getApproval());
+			}
+			if (in.getAmountStatus()!=null) {
+				params.put("amountStatus",in.getAmountStatus());
+			}
+			if (in.getStartDate()!=null) {
+				params.put("startDate",in.getStartDate());
+			}
+			if (in.getEndDate()!=null) {
+				params.put("endDate",in.getEndDate()+" 23:59:59");
+			}
+		}
+		if (in.getDepId()!=null) {
+			params.put("depId",in.getDepId());
+		}
 		Pagination<TOrderNewBo> p = (Pagination<TOrderNewBo>)findPage("selectstatisticsOrderListPage",
 				"selectstatisticsOrderListCount", params, in.getPageNo(), in.getPageSize());
 		return p;
@@ -659,7 +786,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		Integer type=null;
 		TOrderLog tl=new TOrderLog();
 		tl.setAid(TokenManager.getAdminId());
-		if (orderStatus==OrderNewState.QDSHTG.getCode()) {
+		if (orderStatus.equals(OrderNewState.QDSHTG.getCode())) {
 			t.setOutsource(outsource);
 			//外包单给外包审核员 否则给财务专员
 				if(outsource==0) {
@@ -696,7 +823,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 				tOrderTaskMapper.updateByOutsourceToOrderNo(orderNo,1);
 			}
 //			pushOrderDun(t2);
-		}else if (orderStatus==OrderNewState.QDSHJJ.getCode()) {//如果不通过新增驳回
+		}else if (orderStatus.equals(OrderNewState.QDSHJJ.getCode())) {//如果不通过新增驳回
 				if (outsource==0) {//非外包
 				t.setProcessStatus(ProcessStatus.YPYXY.getCode());
 				addBackOrder(orderNo, reason);
@@ -718,6 +845,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	 *  订单分配触发
 	 * @param orderNo
 	 */
+	@Override
 	public void pushOrderDun(String orderNo) {
 		TOrderNew b=tOrderNewMapper.selectByPrimaryKey(orderNo);
 		if(b.getApproval()==0){
@@ -755,6 +883,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	 * @param o	订单催款类实对线
 	 * @return
 	 */
+	@Override
 	@Synchronized
 	public TOrderMid pushOrderMidDun(String orderNo, BigDecimal settlementAmount, Date date, OutNewOrderDunBo o) {
 		TOrderMid tm=tOrderMidMapper.selectByOrderNo(orderNo);
@@ -768,13 +897,18 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		tm.setOrderReceivables(cout);
 		BigDecimal sum=tm.getOrderReceivables().subtract(settlementAmount);
 		//如果金额大于欠款修改欠款为0
-		if (sum.compareTo(new BigDecimal(0))<0)sum=new BigDecimal(0);
+		if (sum.compareTo(new BigDecimal(0))<0) {
+			sum=new BigDecimal(0);
+		}
 		tm.setOrderArrears(sum);
-		if (tm.getDunStartTime()==null)tm.setDunStartTime(date);
+		if (tm.getDunStartTime()==null) {
+			tm.setDunStartTime(date);
+		}
 		tOrderMidMapper.updateByPrimaryKeySelective(tm);
 		return tm;
 	}
 
+	@Override
 	public void addNewDunNoticAndSendEmail(String  orderNo, OutNewOrderDunBo o) {
 		AdminListBo a = adminMapper.getDeptNameByAid(TokenManager.getAdminId()==null?"1":TokenManager.getAdminId());
 		TOrderNewBo b  = tOrderNewMapper.getSaleIdByOno(o.getOrderNo());
@@ -786,7 +920,8 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		}
 	}
 
-	public void addTimingTaskNewDunNoticAndSendEmail( OutNewOrderDunBo o,Integer type) {
+	@Override
+	public void addTimingTaskNewDunNoticAndSendEmail(OutNewOrderDunBo o, Integer type) {
 		AdminListBo a = adminMapper.getDeptNameByAid("1");
 		TOrderNewBo b  = tOrderNewMapper.getSaleIdByOno(o.getOrderNo());
 		StringBuffer sb=new StringBuffer();
@@ -820,7 +955,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			//发送驳回邮件
 		if(SendEmailUtil.isEmail(b.getEmail())) {
 			EmailBo bo =new EmailBo();
-			if (noticType==NoticeStatus.MENBER_DUN.getCode()){
+			if (noticType.equals(NoticeStatus.MENBER_DUN.getCode())){
 				bo = new EmailBo("会员提前催收", b.getEmail(), content);
 			}else {
 				bo = new EmailBo("催收通知", b.getEmail(), a.getDepartmentName(), a.getName(),
@@ -856,21 +991,44 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	public Pagination<outOrderDunListBo> dunOrderNewList(String name, String orderNo,String contractNo, String starTime, String endTime,
 			Integer specially,String  aid, String adminName,String depId,Integer newStatus,Integer approval,Integer amountStatus,Integer memberType,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;
-		if(newStatus!=null&&newStatus==0)params.put("newStatus", 0);
-		else params.put("newStatus", tOrderDunMapper.selectByOrderNo(orderNo).isEmpty()?1:0);
-		if (StringUtils.isNotBlank(name)) params.put("name", name);
-		if (StringUtils.isNotBlank(depId)) params.put("depId", depId);
-		if (StringUtils.isNotBlank(adminName)) params.put("adminName", adminName);
-		if (StringUtils.isNotBlank(orderNo)) params.put("orderNo", orderNo);
-		if (StringUtils.isNotBlank(contractNo)) params.put("contractNo", contractNo);
-		if (StringUtils.isNotBlank(starTime)) params.put("starTime", starTime);
-		if (StringUtils.isNotBlank(endTime)) params.put("endTime", endTime+" 23:59:59");
-		if (approval!=null )params.put("approval",approval);
-		if (amountStatus!=null )params.put("amountStatus",amountStatus);
-		if (memberType!=null )params.put("memberType",memberType);
-		if (specially==null)specially=0;
+		if(newStatus!=null&&newStatus==0) {
+			params.put("newStatus", 0);
+		} else {
+			params.put("newStatus", tOrderDunMapper.selectByOrderNo(orderNo).isEmpty()?1:0);
+		}
+		if (StringUtils.isNotBlank(name)) {
+			params.put("name", name);
+		}
+		if (StringUtils.isNotBlank(depId)) {
+			params.put("depId", depId);
+		}
+		if (StringUtils.isNotBlank(adminName)) {
+			params.put("adminName", adminName);
+		}
+		if (StringUtils.isNotBlank(orderNo)) {
+			params.put("orderNo", orderNo);
+		}
+		if (StringUtils.isNotBlank(contractNo)) {
+			params.put("contractNo", contractNo);
+		}
+		if (StringUtils.isNotBlank(starTime)) {
+			params.put("starTime", starTime);
+		}
+		if (StringUtils.isNotBlank(endTime)) {
+			params.put("endTime", endTime+" 23:59:59");
+		}
+		if (approval!=null ) {
+			params.put("approval",approval);
+		}
+		if (amountStatus!=null ) {
+			params.put("amountStatus",amountStatus);
+		}
+		if (memberType!=null ) {
+			params.put("memberType",memberType);
+		}
+		if (specially==null) {
+			specially=0;
+		}
 		params.put("specially", specially);
 		Integer i=null;
 		if (TokenManager.hasRole(AFTConstants.FINANCE)) {
@@ -891,7 +1049,9 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			params.put("dunStatus", 1);
 
 		}
-		if(i!=null)params.put("shiroType", i);
+		if(i!=null) {
+			params.put("shiroType", i);
+		}
 		Pagination<outOrderDunListBo> p = (Pagination<outOrderDunListBo>)findPage("selectDunOrderNewListByPage", "selectDunOrderNewListCount", params, pageNo, pageSize);
 		List<outOrderDunListBo> list = (List<outOrderDunListBo>) p.getList();
 		for (outOrderDunListBo o : list) {
@@ -902,10 +1062,16 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 
 	public String getDunSubject(outOrderDunListBo o) {
 		//旧催款
-		if(o.getDunSubject()!=null)return OrderDunSubject.getValueByCode(Integer.valueOf(o.getDunSubject()));
+		if(o.getDunSubject()!=null) {
+			return OrderDunSubject.getValueByCode(Integer.valueOf(o.getDunSubject()));
+		}
 		//新催款
-		if(o.getDunType()!=null&&o.getDunType()!=0&&o.getProjectType()!=null)return NewOrderDunType.getValueByCode(Integer.valueOf(""+o.getProjectType()+o.getDunType()));
-		if(o.getDunType()!=null&&o.getDunType()==0&&o.getProjectType()!=null)return NewOrderDunType.getValueByCode(Integer.valueOf(""+o.getProjectType()+o.getDunType()))+o.getCustomizeName();
+		if(o.getDunType()!=null&&o.getDunType()!=0&&o.getProjectType()!=null) {
+			return NewOrderDunType.getValueByCode(Integer.valueOf(""+o.getProjectType()+o.getDunType()));
+		}
+		if(o.getDunType()!=null&&o.getDunType()==0&&o.getProjectType()!=null) {
+			return NewOrderDunType.getValueByCode(Integer.valueOf(""+o.getProjectType()+o.getDunType()))+o.getCustomizeName();
+		}
 		return "";
 	}
 
@@ -934,7 +1100,9 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	@Override
 	public int addOrderRefund(TOrderRefundWithBLOBs t) {
 		TOrderNew order =checkDeleteSign(t.getOrderNo());
-		if(order.getDeleteSign()!=0)throw new BusinessException(new Error( "订单变更锁定中","订单变更锁定中"));
+		if(order.getDeleteSign()!=0) {
+			throw new BusinessException(new Error( "订单变更锁定中","订单变更锁定中"));
+		}
 		t.setRefundStatus(refundState.DSH.getCode());
 		t.setCreateTime(new Date());
 		t.setInitiate(TokenManager.getAdminId()==null?"1":TokenManager.getAdminId());
@@ -997,7 +1165,9 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	public boolean checkOrderMain(TOrderTask t) {
 		List<TOrderTaskBo> list=tOrderTaskMapper.selectOrderTask(t.getOrderNo(),0);
 		int flag=0;
-		if(t.getMain()==1)flag++;
+		if(t.getMain()==1) {
+			flag++;
+		}
 		for (TOrderTask t2 : list) {
 			if(t2.getMain()==1&&t.getId()==null) {
 				flag++;
@@ -1014,18 +1184,28 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	@Override
 	public boolean chekeOrderStatus(String orderNo) {
 		TOrderNew tOrder= tOrderNewMapper.selectByPrimaryKey(orderNo);
-		if (tOrder.getOrderStatus()==OrderNewState.QDDS.getCode()||tOrder.getOrderStatus()==OrderNewState.QDSHTG.getCode()) {
+		if (tOrder.getOrderStatus().equals(OrderNewState.QDDS.getCode()) || tOrder.getOrderStatus().equals(OrderNewState.QDSHTG.getCode())) {
 			return false;
 		}
 		return true;
 	}
 
 	@Override
+	public boolean chekeProcessStatus(String orderNo) {
+		TOrderNew tOrder= tOrderNewMapper.selectByPrimaryKey(orderNo);
+		if (tOrder.getOrderStatus().equals(ProcessStatus.YPYXY.getCode())) {
+			return false;
+		}
+		return true;
+	}
+
+
+	@Override
 	public boolean chekeApprovalOrderStatus(String orderNo) {
 		TOrderNew tOrder= tOrderNewMapper.selectByPrimaryKey(orderNo);
-		if (tOrder.getApproval()==ApprovalNewState.FTP.getCode()||
-				tOrder.getOrderStatus()==OrderNewState.QDSHJJ.getCode()||
-					tOrder.getOrderStatus()==OrderNewState.YBH.getCode()) {
+		if (tOrder.getApproval().equals(ApprovalNewState.FTP.getCode()) ||
+				tOrder.getOrderStatus().equals(OrderNewState.QDSHJJ.getCode()) ||
+				tOrder.getOrderStatus().equals(OrderNewState.YBH.getCode())) {
 			return true;
 		}
 		return false;
@@ -1034,11 +1214,13 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	@Override
 	public int deleteOrderNew(String orderNo) {
 		TOrderNew t=tOrderNewMapper.selectByPrimaryKey(orderNo);
-		if (t.getOrderStatus()==OrderNewState.YBH.getCode()||t.getOrderStatus()==OrderNewState.YTD.getCode()||
-				t.getOrderStatus()==OrderNewState.DQD.getCode()||t.getOrderStatus()==OrderNewState.QDSHJJ.getCode()) {
+		if (t.getOrderStatus().equals(OrderNewState.YBH.getCode()) || t.getOrderStatus().equals(OrderNewState.YTD.getCode()) ||
+				t.getOrderStatus().equals(OrderNewState.DQD.getCode()) || t.getOrderStatus().equals(OrderNewState.QDSHJJ.getCode())) {
 			t.setOrderNo(orderNo);
 			t.setDeleteSign(1);//作废
-			if(t.getContractNo()!=null)contractNoReplace(orderNo, t.getContractNo(),t.getOrderDep());
+			if(t.getContractNo()!=null) {
+				contractNoReplace(orderNo, t.getContractNo(),t.getOrderDep());
+			}
 			t.setContractNo("");
 			return tOrderNewMapper.updateByPrimaryKeySelective(t);
 		}
@@ -1076,7 +1258,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		TOrderNew tOrder= tOrderNewMapper.selectByPrimaryKey(orderNo);
 		if (tOrder.getSettlementAmount()==null||
 				tOrder.getSettlementAmount().doubleValue()==0||
-					tOrder.getOrderStatus()==OrderNewState.TDZ.getCode()){
+				tOrder.getOrderStatus().equals(OrderNewState.TDZ.getCode())){
 				return true;
 		}
 		return false;
@@ -1087,13 +1269,19 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	public Pagination<TOrderRefundBo> orderRefundList(String name, String orderNo, String starTime, String endTime, Integer specially,
 			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;
 			params.put("aid", TokenManager.getAdminId()==null?"1":TokenManager.getAdminId());
-			if (StringUtils.isNotBlank(name)) params.put("name", name);
-			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");
+			if (StringUtils.isNotBlank(name)) {
+				params.put("name", name);
+			}
+			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<TOrderRefundBo> p = (Pagination<TOrderRefundBo>)findPage("selectOrderRefundListByPage", "selectOrderRefundListCount", params, pageNo, pageSize);
 			return p;
 
@@ -1109,6 +1297,8 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		}
 		return true;
 	}
+
+
 	@Override
 	public boolean checkORderDun(String orderNo) {
 		List<OutNewOrderDunBo> list=newOrderDunMapper.selectListNewOrderDun(orderNo,  null);
@@ -1145,13 +1335,13 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	@Override
 	public int updateOrderOver(String orderNo) {
 		TOrderNew t=tOrderNewMapper.selectByPrimaryKey(orderNo);
-		if (t.getLiquidationStatus()!=LiquidationNewState.ALREADY_PAY.getCode()||
-				t.getProcessStatus()!=ProcessStatus.YQBFPZXSGLY.getCode()) {
+		if (!t.getLiquidationStatus().equals(LiquidationNewState.ALREADY_PAY.getCode()) ||
+				!t.getProcessStatus().equals(ProcessStatus.YQBFPZXSGLY.getCode())) {
 			return -1;
 		}
 		List<TOrderTaskBo> list=tOrderTaskMapper.selectOrderTask(orderNo,0);
 		for (TOrderTaskBo task : list) {
-			if (task.getTaskStatus()!=TaskState.CLYWC.getCode()) {
+			if (!task.getTaskStatus().equals(TaskState.CLYWC.getCode())) {
 				return -1;
 			}
 		}
@@ -1203,8 +1393,8 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		//预设值 默认发给营销员
 		aid=b.getSalesmanId();
 		if (str==null){
-			if (type==NoticeStatus.ORDER_ARREARS_DUN.getCode()||type==NoticeStatus.PAYMENT_DUN.getCode()||
-					type==NoticeStatus.ORDER_DUN.getCode()||type==NoticeStatus.MENBER_DUN.getCode()){
+			if (type.equals(NoticeStatus.ORDER_ARREARS_DUN.getCode()) || type.equals(NoticeStatus.PAYMENT_DUN.getCode()) ||
+					type.equals(NoticeStatus.ORDER_DUN.getCode()) || type.equals(NoticeStatus.MENBER_DUN.getCode())){
 				sb=sb.append("客户名称【").append(b.getUserName()).append("】,按时触发应收款欠款,请按时催款,并及时增减项目,以免项目延期等问题。");
 			}
 		}else {
@@ -1220,10 +1410,10 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		String aid=null;
 		List<Admin>admins=new ArrayList<>();
 		sb.append("客户名称【").append(b.getUserName()).append("】,订单编号【").append(b.getOrderNo()).append("】,");
-		if (type==NoticeStatus.MENBER_START.getCode()){
+		if (type.equals(NoticeStatus.MENBER_START.getCode())){
 			sb=sb.append("发起会员项目,请及时审核");
 			aid=b.getFinanceId();
-		}else if (type==NoticeStatus.MENBER_YES.getCode()){
+		}else if (type.equals(NoticeStatus.MENBER_YES.getCode())){
 			sb=sb.append("会员项目审核");
 			if(shiroType==0){
 				sb=sb.append("财务已通过。");
@@ -1236,7 +1426,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 				sb=sb.append("特批已通过。");
 				admins = MemberEnd(b);
 			}
-		}else if (type==NoticeStatus.MENBER_NO.getCode()){
+		}else if (type.equals(NoticeStatus.MENBER_NO.getCode())){
 			if(shiroType==0){
 				sb=sb.append("财务已驳回。");
 			} else if(shiroType==1){
@@ -1279,13 +1469,19 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		int counts =l.size();
 		int x=0;
 		for (TOrderTaskBo t : l) {
-			if (t.getTaskStatus()>0)x++;
+			if (t.getTaskStatus()>0) {
+				x++;
+			}
 		}
 		TOrderNew n = new TOrderNew();
 		n.setOrderNo(b.getOrderNo());
-		if (x==0)n.setProcessStatus(4);
-		else if(x<counts)n.setProcessStatus(5);
-		else if(x==counts)n.setProcessStatus(6);
+		if (x==0) {
+			n.setProcessStatus(4);
+		} else if(x<counts) {
+			n.setProcessStatus(5);
+		} else if(x==counts) {
+			n.setProcessStatus(6);
+		}
 		tOrderNewMapper.updateByPrimaryKeySelective(n);
 	}
 
@@ -1356,18 +1552,24 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return tOrderLogMapper.selectOrderByNo(orderNo);
 	}
 
-	public  void pushGeneralSendNoticeAndEmail(List<String> alist, Integer type,TOrderNewBo order,String adminId,Integer approval) {
+	@Override
+	public  void pushGeneralSendNoticeAndEmail(List<String> alist, Integer type, TOrderNewBo order, String adminId, Integer approval) {
 		pushGeneralSendNoticeAndEmail( alist,  type, order, adminId, approval,null);
 	}
-	public  void pushGeneralSendNoticeAndEmail(List<String> alist, Integer type,TOrderNewBo order,String adminId,Integer approval,Integer tid) {
+	@Override
+	public  void pushGeneralSendNoticeAndEmail(List<String> alist, Integer type, TOrderNewBo order, String adminId, Integer approval, Integer tid) {
 		AdminListBo a = adminMapper.getDeptNameByAid(adminId);
 		String approvalType="";
 		String noticeTypeName = NoticeStatus.getValueByCode(type);
-		if (approval!=ApprovalNewState.FTP.getCode()) approvalType="[特批]";
+		if (!approval.equals(ApprovalNewState.FTP.getCode())) {
+			approvalType="[特批]";
+		}
 		StringBuffer str=new StringBuffer(approvalType).append(noticeTypeName).append(":");
 		if (tid != null) {str=str.append("项目编号[").append(tid).append("],");}
 		str=str.append("客户名称[") .append(order.getUserName()).append("],");
-		if(StringUtils.isNotBlank(order.getContractNo()))str=str.append("合同编号[").append(order.getContractNo()).append("],");
+		if(StringUtils.isNotBlank(order.getContractNo())) {
+			str=str.append("合同编号[").append(order.getContractNo()).append("],");
+		}
 		str=str.append("订单编号[").append(order.getOrderNo()).append("],").append("操作人:")
 				.append(a.getDepartmentName()).append("-").append(a.getName()).append("。");
 		String adminIds="";
@@ -1389,7 +1591,9 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 				}
 			}
 		}
-		if(!nlist.isEmpty())asyncUtils.addNoticeBatch(nlist);
+		if(!nlist.isEmpty()) {
+			asyncUtils.addNoticeBatch(nlist);
+		}
 		if (!nlist.isEmpty()&&StringUtils.isNotBlank(adminIds)) {
 			adminIds=adminIds.substring(0, adminIds.length()-1);
 			EmailBo bo=new EmailBo(noticeTypeName,adminIds,str.toString());
@@ -1409,8 +1613,12 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		}
 		o.setRefundStatus(0);
 		o.setCreateTime(new Date());
-		if(o.getAmount()==null)o.setAmount(new BigDecimal(0));
-		if(o.getStartType()==null)o.setStartType(0);
+		if(o.getAmount()==null) {
+			o.setAmount(new BigDecimal(0));
+		}
+		if(o.getStartType()==null) {
+			o.setStartType(0);
+		}
 		if (o.getStartType()==0) {
 			List<String> aids = new ArrayList<>();
 			for (Admin admin : adminMapper.getAdminRoleList("外包审核员")) {
@@ -1440,7 +1648,9 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		}else {
 			tOrderOutsourceMapper.updateByPrimaryKeySelective(o);
 			//旧项目变更,如果驳回修改成新的项目变更
-			if(o.getUnitNumber()!=null)tOrderOutsourceMapper.updateByidNull(o.getId());
+			if(o.getUnitNumber()!=null) {
+				tOrderOutsourceMapper.updateByidNull(o.getId());
+			}
 		}
 		updateOrderCostAmount(o.getTid(),o.getStartType());
 		return 1;
@@ -1477,7 +1687,9 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		BigDecimal oCount=new BigDecimal(0);
 		List <TTaskMid> tlist=tTaskMidMapper.selectListByTid(tid);
 		for (TTaskMid tm : tlist) {
-			if (tm!=null&&tm.getCostAmount()!=null)oCount=oCount.add(tm.getCostAmount()==null?new BigDecimal(0):tm.getCostAmount());
+			if (tm!=null&&tm.getCostAmount()!=null) {
+				oCount=oCount.add(tm.getCostAmount()==null?new BigDecimal(0):tm.getCostAmount());
+			}
 		}
 		tOrderMidMapper.updateCostAmount(tid,oCount,null);
 	}
@@ -1486,9 +1698,15 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	@Cacheable(cacheNames = "statisticsList#500",key = "'statisticsList:depId:'+#in.depId+'province:'+#in.province+" +
 			"'startCreate:'+#in.startCreate+'endCreate:'+#in.endCreate+'startSign:'+#in.startSign+'endSign:'+#in.endSign+'sort:'+#in.sort")
 	public List<outStatisticsList> statisticsList(InputStatistics in) {
-		if(in.getSort()==null)in.setSort(0);
-		if(in.getEndCreate()!=null)in.setEndCreate(in.getEndCreate()+" 23:59:59");
-		if(in.getEndSign()!=null)in.setEndSign(in.getEndSign()+" 23:59:59");
+		if(in.getSort()==null) {
+			in.setSort(0);
+		}
+		if(in.getEndCreate()!=null) {
+			in.setEndCreate(in.getEndCreate()+" 23:59:59");
+		}
+		if(in.getEndSign()!=null) {
+			in.setEndSign(in.getEndSign()+" 23:59:59");
+		}
 		return tOrderNewMapper.statisticsList(in);
 	}
 
@@ -1496,9 +1714,15 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	@Cacheable(cacheNames = "provinceStatisticsList#500",key = "'provinceStatisticsList:depId:'+#in.depId+'province:'+#in.province+" +
 			"'startCreate:'+#in.startCreate+'endCreate:'+#in.endCreate+'startSign:'+#in.startSign+'endSign:'+#in.endSign+'sort:'+#in.sort")
 	public List<outProvinceStatisticsList> provinceStatisticsList(InputStatistics in) {
-		if(in.getSort()==null)in.setSort(0);
-		if(in.getEndCreate()!=null)in.setEndCreate(in.getEndCreate()+" 23:59:59");
-		if(in.getEndSign()!=null)in.setEndSign(in.getEndSign()+" 23:59:59");
+		if(in.getSort()==null) {
+			in.setSort(0);
+		}
+		if(in.getEndCreate()!=null) {
+			in.setEndCreate(in.getEndCreate()+" 23:59:59");
+		}
+		if(in.getEndSign()!=null) {
+			in.setEndSign(in.getEndSign()+" 23:59:59");
+		}
 		return tOrderNewMapper.provinceStatisticsList(in);
 	}
 
@@ -1507,17 +1731,39 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 	public Pagination<OutArrearsDunListBo> arrearsDunList(InputArrearsDunListBo in) {
 
 		Map<String, Object> params = new HashMap<String, Object>();
-		if(in.getPageSize()==null||in.getPageSize()<0)in.setPageSize(10);
-		if(in.getPageNo()==null||in.getPageNo()<0)in.setPageNo(1);
-		if (StringUtils.isNotBlank(in.getName())) params.put("name", in.getName());
-		if (StringUtils.isNotBlank(in.getDepId())) params.put("depId", in.getDepId());
-		if (StringUtils.isNotBlank(in.getAdminName())) params.put("adminName", in.getAdminName());
-		if (StringUtils.isNotBlank(in.getOrderNo())) params.put("orderNo", in.getOrderNo());
-		if (StringUtils.isNotBlank(in.getContractNo())) params.put("contractNo", in.getContractNo());
-		if (StringUtils.isNotBlank(in.getStarTime())) params.put("starTime", in.getStarTime());
-		if (StringUtils.isNotBlank(in.getEndTime())) params.put("endTime", in.getEndTime()+" 23:59:59");
-		if (StringUtils.isNotBlank(in.gettStarTime())) params.put("tStarTime", in.gettStarTime());
-		if (StringUtils.isNotBlank(in.gettEndTime())) params.put("tEndTime", in.gettEndTime()+" 23:59:59");
+		if(in.getPageSize()==null||in.getPageSize()<0) {
+			in.setPageSize(10);
+		}
+		if(in.getPageNo()==null||in.getPageNo()<0) {
+			in.setPageNo(1);
+		}
+		if (StringUtils.isNotBlank(in.getName())) {
+			params.put("name", in.getName());
+		}
+		if (StringUtils.isNotBlank(in.getDepId())) {
+			params.put("depId", in.getDepId());
+		}
+		if (StringUtils.isNotBlank(in.getAdminName())) {
+			params.put("adminName", in.getAdminName());
+		}
+		if (StringUtils.isNotBlank(in.getOrderNo())) {
+			params.put("orderNo", in.getOrderNo());
+		}
+		if (StringUtils.isNotBlank(in.getContractNo())) {
+			params.put("contractNo", in.getContractNo());
+		}
+		if (StringUtils.isNotBlank(in.getStarTime())) {
+			params.put("starTime", in.getStarTime());
+		}
+		if (StringUtils.isNotBlank(in.getEndTime())) {
+			params.put("endTime", in.getEndTime()+" 23:59:59");
+		}
+		if (StringUtils.isNotBlank(in.gettStarTime())) {
+			params.put("tStarTime", in.gettStarTime());
+		}
+		if (StringUtils.isNotBlank(in.gettEndTime())) {
+			params.put("tEndTime", in.gettEndTime()+" 23:59:59");
+		}
 		Integer i=null;
 		 if (TokenManager.hasRole(AFTConstants.FINANCE)) {
 			i=1;
@@ -1530,8 +1776,12 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		}
 		if (TokenManager.hasRole(AFTConstants.FINANCE_ADMIN)||TokenManager.hasRole(AFTConstants.VICE_CEO)||
 				TokenManager.hasRole(AFTConstants.SUPERADMIN)||TokenManager.hasRole(AFTConstants.CED)||
-				TokenManager.hasRole(AFTConstants.APPROVAL_DECISION))i=3;
-		if(i!=null)params.put("shiroType", i);
+				TokenManager.hasRole(AFTConstants.APPROVAL_DECISION)) {
+			i=3;
+		}
+		if(i!=null) {
+			params.put("shiroType", i);
+		}
 		Pagination<OutArrearsDunListBo> p = (Pagination<OutArrearsDunListBo>)findPage("selectArrearsDunListByPage", "selectArrearsDunListByCount", params, in.getPageNo(), in.getPageSize());
 		return p;
 	}