Przeglądaj źródła

变更发起问题BUG修复

anderx 4 lat temu
rodzic
commit
9426bf2d95

+ 27 - 27
src/main/java/com/goafanti/common/mapper/NewOrderChangeMapper.xml

@@ -36,14 +36,14 @@
     <result column="attachment_url" jdbcType="VARCHAR" property="attachmentUrl" />
   </resultMap>
   <sql id="Base_Column_List">
-    id, order_no, process_state, `status`, `type`, create_time, remarks, voucher_url, 
-    total_amount, settlement_amount, change_amount, applicant, dep_name, project_state, 
-    zxs_cost, zxs_remarks, payment_time, payment_amount, invoice_time, invoice_amount, 
-    invoice_type, cw_cost, refundable_amount, cw_remarks, estimate_cost, estimate_refundable, 
+    id, order_no, process_state, `status`, `type`, create_time, remarks, voucher_url,
+    total_amount, settlement_amount, change_amount, applicant, dep_name, project_state,
+    zxs_cost, zxs_remarks, payment_time, payment_amount, invoice_time, invoice_amount,
+    invoice_type, cw_cost, refundable_amount, cw_remarks, estimate_cost, estimate_refundable,
     refund_Invoice, used_order, refund_status, refund_url, back_status, attachment_url
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
-    select 
+    select
     <include refid="Base_Column_List" />
     from new_order_change
     where id = #{id,jdbcType=INTEGER}
@@ -53,27 +53,27 @@
     where id = #{id,jdbcType=INTEGER}
   </delete>
   <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.NewOrderChange" useGeneratedKeys="true">
-    insert into new_order_change (order_no, process_state, `status`, 
-      `type`, create_time, remarks, 
-      voucher_url, total_amount, settlement_amount, 
-      change_amount, applicant, dep_name, 
-      project_state, zxs_cost, zxs_remarks, 
-      payment_time, payment_amount, invoice_time, 
-      invoice_amount, invoice_type, cw_cost, 
-      refundable_amount, cw_remarks, estimate_cost, 
-      estimate_refundable, refund_Invoice, used_order, 
-      refund_status, refund_url, back_status, 
+    insert into new_order_change (order_no, process_state, `status`,
+      `type`, create_time, remarks,
+      voucher_url, total_amount, settlement_amount,
+      change_amount, applicant, dep_name,
+      project_state, zxs_cost, zxs_remarks,
+      payment_time, payment_amount, invoice_time,
+      invoice_amount, invoice_type, cw_cost,
+      refundable_amount, cw_remarks, estimate_cost,
+      estimate_refundable, refund_Invoice, used_order,
+      refund_status, refund_url, back_status,
       attachment_url)
-    values (#{orderNo,jdbcType=VARCHAR}, #{processState,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, 
-      #{type,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, 
-      #{voucherUrl,jdbcType=VARCHAR}, #{totalAmount,jdbcType=DECIMAL}, #{settlementAmount,jdbcType=DECIMAL}, 
-      #{changeAmount,jdbcType=DECIMAL}, #{applicant,jdbcType=VARCHAR}, #{depName,jdbcType=VARCHAR}, 
-      #{projectState,jdbcType=VARCHAR}, #{zxsCost,jdbcType=DECIMAL}, #{zxsRemarks,jdbcType=VARCHAR}, 
-      #{paymentTime,jdbcType=TIMESTAMP}, #{paymentAmount,jdbcType=DECIMAL}, #{invoiceTime,jdbcType=TIMESTAMP}, 
-      #{invoiceAmount,jdbcType=DECIMAL}, #{invoiceType,jdbcType=VARCHAR}, #{cwCost,jdbcType=DECIMAL}, 
-      #{refundableAmount,jdbcType=DECIMAL}, #{cwRemarks,jdbcType=VARCHAR}, #{estimateCost,jdbcType=DECIMAL}, 
-      #{estimateRefundable,jdbcType=DECIMAL}, #{refundInvoice,jdbcType=DECIMAL}, #{usedOrder,jdbcType=VARCHAR}, 
-      #{refundStatus,jdbcType=INTEGER}, #{refundUrl,jdbcType=VARCHAR}, #{backStatus,jdbcType=INTEGER}, 
+    values (#{orderNo,jdbcType=VARCHAR}, #{processState,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
+      #{type,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR},
+      #{voucherUrl,jdbcType=VARCHAR}, #{totalAmount,jdbcType=DECIMAL}, #{settlementAmount,jdbcType=DECIMAL},
+      #{changeAmount,jdbcType=DECIMAL}, #{applicant,jdbcType=VARCHAR}, #{depName,jdbcType=VARCHAR},
+      #{projectState,jdbcType=VARCHAR}, #{zxsCost,jdbcType=DECIMAL}, #{zxsRemarks,jdbcType=VARCHAR},
+      #{paymentTime,jdbcType=TIMESTAMP}, #{paymentAmount,jdbcType=DECIMAL}, #{invoiceTime,jdbcType=TIMESTAMP},
+      #{invoiceAmount,jdbcType=DECIMAL}, #{invoiceType,jdbcType=VARCHAR}, #{cwCost,jdbcType=DECIMAL},
+      #{refundableAmount,jdbcType=DECIMAL}, #{cwRemarks,jdbcType=VARCHAR}, #{estimateCost,jdbcType=DECIMAL},
+      #{estimateRefundable,jdbcType=DECIMAL}, #{refundInvoice,jdbcType=DECIMAL}, #{usedOrder,jdbcType=VARCHAR},
+      #{refundStatus,jdbcType=INTEGER}, #{refundUrl,jdbcType=VARCHAR}, #{backStatus,jdbcType=INTEGER},
       #{attachmentUrl,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.NewOrderChange" useGeneratedKeys="true">
@@ -454,7 +454,7 @@ select
   </select>
   <select id="checkOderNo" resultType="java.lang.Integer">
   select count(*) from new_order_change
-	where order_no= #{orderNo} and status in (0,1,2,3,5,6)
+	where order_no= #{orderNo} and status in (0,1,2,3,6)
   </select>
   <select id="selectOrderChangeList" resultType="com.goafanti.order.bo.NewOderCahngeListBo">
 	select a.id,a.order_no orderNo,b.contract_no contractNo, date_format(a.create_time,'%Y-%m-%d %H:%i:%S')createTimes,c.nickname,b.order_type orderType,
@@ -693,4 +693,4 @@ select
 	<select id="getOrderChange" resultType="java.util.Map">
 	select id,used_order usedOrder from new_order_change where  order_no= #{orderNo} order by id
 	</select>
-</mapper>
+</mapper>

+ 1 - 1
src/main/java/com/goafanti/core/cache/ExtendedRedisCacheManager.java

@@ -59,7 +59,7 @@ public class ExtendedRedisCacheManager extends RedisCacheManager {
                 expiration = NumberUtils.toLong(expirationAsString, defalutExp);
             }
         } catch (ScriptException e) {
-            LoggerUtils.fmtError(this.getClass(),e,"缓存时间转换错误:{},异常:{}",name,e.getMessage());
+            LoggerUtils.fmtError(this.getClass(),e,"缓存时间转换错误:{%s},异常:{%s}",name,e.getMessage());
         }
         return Objects.nonNull(expiration) ? expiration.longValue() : defalutExp;
     }

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

@@ -151,7 +151,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 
 	Logger							logger	= LoggerFactory.getLogger(OrderNewServiceImpl.class);
 
-
 	@Override
 	public int createServiceOrder(String uid, Integer orderType) {
 		BigDecimal initial = new BigDecimal(0);
@@ -188,8 +187,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return tOrderNewMapper.insertSelective(t);
 	}
 
-
-
 	@Override
 	public int addOrderTask(TOrderTask t) {
 		TOrderNew order=tOrderNewMapper.selectByPrimaryKey(t.getOrderNo());
@@ -233,7 +230,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 
 	}
 
-
 	@Override
 	public int updateOrderTask(TOrderTask t) {
 		TOrderTask use=tOrderTaskMapper.selectByPrimaryKey(t.getId());
@@ -284,8 +280,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return i;
 	}
 
-
-
 	@Override
 	public int delectOrderTask(Integer id) {
 		//连带催款一起删除
@@ -293,8 +287,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return tOrderTaskMapper.deleteByPrimaryKey(id);
 	}
 
-
-
 	@Override
 	public List<TOrderTaskBo> selectOrderTask(String orderNo) {
 		List<TOrderTaskBo> list=tOrderTaskMapper.selectOrderTask(orderNo);
@@ -315,10 +307,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return list;
 	}
 
-
-
-
-
 	@Override
 	public int updateServiceOrder(TOrderNewWithBLOBs t, Integer isSubmit) {
 		TOrderNew t2=tOrderNewMapper.selectByPrimaryKey(t.getOrderNo());
@@ -405,7 +393,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return tOrderNewMapper.updateByPrimaryKeySelective(t);
 	}
 
-
 	private void updateOrderMid(TOrderNew t) {
 		TOrderMid tm=tOrderMidMapper.selectByOrderNo(t.getOrderNo());
 		Admin admin=adminMapper.selectFinanceAdminByOrderDep(t.getOrderDep());
@@ -433,8 +420,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 
 	}
 
-
-
 	/**
 	 * 		新建合同编号,优先获取闲置合同编号,否则按年份生成编号
 	 * @param t
@@ -479,9 +464,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		}
 	}
 
-
-
-
 	private String iterationNo(String sno ,Object mp, int ty, int no) {
 		if (tOrderNewMapper.checkContractNo(sno)>0) {
 			int i=Integer.parseInt(sno.substring(sno.indexOf("-")+5, sno.length()));
@@ -491,8 +473,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return sno;
 	}
 
-
-
 	private String countNo(Object object, String sno, int ty, int no) {
 		no++;
 		if (no>0&&no<10) {
@@ -507,7 +487,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return sno;
 	}
 
-
 	public void addOrderLog(TOrderLog tl, String reason) {
 		tl.setAid(TokenManager.getAdminId());
 		if(reason!=null)tl.setRemarks(reason);
@@ -515,8 +494,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 
 	}
 
-
-
 	@Override
 	public TOrderNewBo getOrderNewDetail(String orderNo) {
 		TOrderNewBo tOrder= tOrderNewMapper.getOrderNewDetail(orderNo);
@@ -525,8 +502,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return tOrder;
 	}
 
-
-
 	@Override
 	public int createOrderDun(String orderDun,String orderNo) {
 		List<TOrderDun> l=  JSON.parseArray(orderDun, TOrderDun.class);
@@ -567,8 +542,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return 1;
 	}
 
-
-
 	@SuppressWarnings("unchecked")
 	@Override
 	public Pagination<TOrderNewBo> orderNewList(String aid,String name, String orderNo, String starTime, String endTime,Integer specially,Integer approval,
@@ -612,8 +585,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return p;
 	}
 
-
-
 	@Override
 	public int updateOrderNew(String orderNo, Integer orderStatus,String reason,Integer outsource, TOrderOutsource o) {
 		TOrderNew t= new TOrderNew();
@@ -677,8 +648,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return 1;
 	}
 
-
-
 	public void pushOrderDun(String orderNo) {
 		TOrderNew b=tOrderNewMapper.selectByPrimaryKey(orderNo);
 		if(b.getApproval()==0){
@@ -728,7 +697,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return tm;
 	}
 
-
 	public void addNewDunNoticAndSendEmail(String  orderNo, OutNewOrderDunBo o) {
 		AdminListBo a = adminMapper.getDeptNameByAid(TokenManager.getAdminId()==null?"1":TokenManager.getAdminId());
 		TOrderNewBo b  = tOrderNewMapper.getSaleIdByOno(orderNo);
@@ -739,6 +707,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			throw new BusinessException(new Error("邮件发送错误。"));
 		}
 	}
+
 	public void addTimingTaskNewDunNoticAndSendEmail(TOrderNew t2, OutNewOrderDunBo o) {
 		AdminListBo a = adminMapper.getDeptNameByAid("1");
 		TOrderNewBo b  = tOrderNewMapper.getSaleIdByOno(t2.getOrderNo());
@@ -750,7 +719,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		}
 	}
 
-
 	public void  NewDunsendEmail(String orderNo,Integer dunId,AdminListBo a,TOrderNewBo b) throws UnsupportedEncodingException, MessagingException{
 		NewOrderDun ob=newOrderDunMapper.selectByPrimaryKey(dunId);
 		AdminListBo a2 = adminMapper.getDeptNameByAid(b.getSalesmanId());
@@ -788,7 +756,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		tOrderBackMapper.insertSelective(ob);
 	}
 
-
 	@SuppressWarnings("unchecked")
 	@Override
 	public Pagination<outOrderDunListBo> dunOrderNewList(String name, String orderNo,String contractNo, String starTime, String endTime,
@@ -831,8 +798,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return p;
 	}
 
-
-
 	@Override
 	public int createDunLog( String dunId, String dumTime, String remarks, String attUrl) {
 		TDunLog d=new TDunLog();
@@ -850,15 +815,11 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return tDunLogMapper.insertSelective(d);
 	}
 
-
-
 	@Override
 	public List<TDunLogListBo> selectDunLogList(String dunId) {
 		return tDunLogMapper.selectByDunId(dunId);
 	}
 
-
-
 	@Override
 	public int addOrderRefund(TOrderRefundWithBLOBs t) {
 		TOrderNew order =checkDeleteSign(t.getOrderNo());
@@ -880,8 +841,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return tOrderRefundMapper.insertSelective(t);
 	}
 
-
-
 	@Override
 	public int updateApprovalOrder(String orderNo,Integer confirm,String reason) {
 		TOrderNew t=new TOrderNew();
@@ -917,15 +876,11 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return tOrderNewMapper.updateByPrimaryKeySelective(t);
 	}
 
-
-
 	@Override
 	public List<TOrderDun> selectOrderDun(String orderNo) {
 		return tOrderDunMapper.selectByOrderNoDunSubject(orderNo);
 	}
 
-
-
 	@Override
 	public boolean checkOrderMain(TOrderTask t) {
 		List<TOrderTaskBo> list=tOrderTaskMapper.selectOrderTask(t.getOrderNo());
@@ -944,8 +899,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return false;
 	}
 
-
-
 	@Override
 	public boolean chekeOrderStatus(String orderNo) {
 		TOrderNew tOrder= tOrderNewMapper.selectByPrimaryKey(orderNo);
@@ -955,8 +908,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return true;
 	}
 
-
-
 	@Override
 	public boolean chekeApprovalOrderStatus(String orderNo) {
 		TOrderNew tOrder= tOrderNewMapper.selectByPrimaryKey(orderNo);
@@ -968,8 +919,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return false;
 	}
 
-
-
 	@Override
 	public int deleteOrderNew(String orderNo) {
 		TOrderNew t=tOrderNewMapper.selectByPrimaryKey(orderNo);
@@ -984,7 +933,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return -1;
 	}
 
-
 	/**
 	 *  	将合同编号置为闲置编号
 	 * @param orderNo
@@ -1022,7 +970,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return false;
 	}
 
-
 	@SuppressWarnings("unchecked")
 	@Override
 	public Pagination<TOrderRefundBo> orderRefundList(String name, String orderNo, String starTime, String endTime, Integer specially,
@@ -1040,8 +987,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 
 	}
 
-
-
 	@Override
 	public boolean checkORderTask(String orderNo) {
 		List<TOrderTaskBo> list=tOrderTaskMapper.selectOrderTask(orderNo);
@@ -1063,8 +1008,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 
 	}
 
-
-
 	/**
 	 * 获取催款数据
 	 * @throws IOException
@@ -1139,8 +1082,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		}
 	}
 
-
-
 	@Override
 	public int updateOrderOver(String orderNo) {
 		TOrderNew t=tOrderNewMapper.selectByPrimaryKey(orderNo);
@@ -1164,16 +1105,12 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return tOrderNewMapper.orderRefundDetail(id);
 	}
 
-
-
 	@Override
 	public int updateOrderRefund(TOrderRefundWithBLOBs t) {
 		checkDeleteSign(t.getOrderNo());
 		return tOrderRefundMapper.updateByPrimaryKeySelective(t);
 	}
 
-
-
 	@Override
 	public int updatetechnicianBackOrder(String orderNo,String reason) {
 		TOrderNew t = checkDeleteSign(orderNo);
@@ -1190,8 +1127,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return tOrderNewMapper.updateByPrimaryKeySelective(t);
 	}
 
-
-
 	private TOrderNew checkDeleteSign(String orderNo) {
 		TOrderNew t=tOrderNewMapper.selectByPrimaryKey(orderNo);
 		//if(t.getDeleteSign()==2) throw new BusinessException(new Error(ErrorConstants.ORDER_ALREADY_REVOKE, t.getOrderNo(),""));
@@ -1203,17 +1138,11 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return tOrderDunMapper.getTaskAllOrderDun();
 	}
 
-
-
 	@Override
 	public void updateOrderDun(TOrderDun tDun) {
 		 tOrderDunMapper.updateByPrimaryKeySelective(tDun);
 	}
 
-
-
-
-
 	@Override
 	public void addNoticAndSendEmail(String orderNo,OrderDunTaskBo t,Integer type)
 			throws UnsupportedEncodingException, MessagingException {
@@ -1227,6 +1156,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 
 		 addNotic(type,a, b);
 	}
+
 	public void addNotic(Integer type,AdminListBo a,TOrderNewBo b) {
 		StringBuffer sb=new StringBuffer();
 		sb=sb.append(b.getUserName()).append(", 合同编号-").append(b.getContractNo())
@@ -1239,6 +1169,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		n.setReaded(0);//未读
 		asyncUtils.addNotice(n);
 	}
+
 	public void  sendEmail(String dunId,AdminListBo a,TOrderNewBo b){
 		LoggerUtils.debug(logger, "======================邮件信息发送===================");
 		String content = "<div>客户名称: "+ b.getUserName() +"</div><div>订单编号: " + b.getOrderNo() + "</div><div>合同编号: " + b.getContractNo() + "</div>";
@@ -1258,7 +1189,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			LoggerUtils.debug(logger, "=========================================发送邮件成功");
 	}
 
-
 	@Override
 	public int updateFinance(String orderNo, String newFinance) {
 		String aid=TokenManager.getAdminId();
@@ -1273,10 +1203,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return tOrderLogMapper.selectOrderByNo(orderNo);
 	}
 
-
-
-
-
 	public  void pushGeneralSendNoticeAndEmail(List<String> alist, Integer type,String orderNo,String adminId,Integer approval) {
 		AdminListBo a = adminMapper.getDeptNameByAid(adminId);
 		String approvalType="";
@@ -1310,13 +1236,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		}
 	}
 
-
-
-
-
-
-
-
 	@Override
 	@Transactional
 	public int pushOutsourceProjectAudit(TOrderOutsource o) {
@@ -1455,8 +1374,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		return p;
 	}
 
-
-
 	@Override
 	public boolean checkOfficialType(TOrderOutsource o) {
 		TOrderTaskDetailBo t=tOrderTaskMapper.getOrderTaskDetail(o.getTid().toString());
@@ -1470,18 +1387,4 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		}
 		return false;
 	}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 }