|
@@ -87,13 +87,13 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private TOrderMidMapper tOrderMidMapper;
|
|
private TOrderMidMapper tOrderMidMapper;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
- private TOrderRefundMapper tOrderRefundMapper;
|
|
|
|
|
|
|
+ private TOrderRefundMapper tOrderRefundMapper;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private TOrderBackMapper tOrderBackMapper;
|
|
private TOrderBackMapper tOrderBackMapper;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private OrganizationContactBookMapper organizationContactBookMapper;
|
|
private OrganizationContactBookMapper organizationContactBookMapper;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
- private OrganizationManagementMapper organizationManagementMapper ;
|
|
|
|
|
|
|
+ private OrganizationManagementMapper organizationManagementMapper ;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private JDBCIdGenerator idGenerator;
|
|
private JDBCIdGenerator idGenerator;
|
|
|
@Autowired
|
|
@Autowired
|
|
@@ -136,21 +136,21 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
private PushOrderService pushOrderService;
|
|
private PushOrderService pushOrderService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private BusinessProjectMapper businessProjectMapper;
|
|
private BusinessProjectMapper businessProjectMapper;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
@Value(value = "${mobileRemindCodeTemplate}")
|
|
@Value(value = "${mobileRemindCodeTemplate}")
|
|
|
private String mobileRemindCodeTemplate = null;
|
|
private String mobileRemindCodeTemplate = null;
|
|
|
@Value(value = "${upload.path}")
|
|
@Value(value = "${upload.path}")
|
|
|
private String uploadPath = null;
|
|
private String uploadPath = null;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
@Value(value = "${accessKey}")
|
|
@Value(value = "${accessKey}")
|
|
|
private String accessKey = null;
|
|
private String accessKey = null;
|
|
|
|
|
|
|
|
@Value(value = "${accessSecret}")
|
|
@Value(value = "${accessSecret}")
|
|
|
private String accessSecret = null;
|
|
private String accessSecret = null;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
Logger logger = LoggerFactory.getLogger(OrderNewServiceImpl.class);
|
|
Logger logger = LoggerFactory.getLogger(OrderNewServiceImpl.class);
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public int createServiceOrder(String uid, Integer orderType) {
|
|
public int createServiceOrder(String uid, Integer orderType) {
|
|
|
BigDecimal initial = new BigDecimal(0);
|
|
BigDecimal initial = new BigDecimal(0);
|
|
@@ -183,7 +183,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
te.setOrderNo(orderNo);
|
|
te.setOrderNo(orderNo);
|
|
|
te.setServiceStatus(0);
|
|
te.setServiceStatus(0);
|
|
|
tOrderExtendMapper.insertSelective(te);
|
|
tOrderExtendMapper.insertSelective(te);
|
|
|
- return tOrderNewMapper.insertSelective(t);
|
|
|
|
|
|
|
+ return tOrderNewMapper.insertSelective(t);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -213,7 +213,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public void checkOrder(TOrderNew order,TOrderTask t){
|
|
public void checkOrder(TOrderNew order,TOrderTask t){
|
|
|
- if(order == null)
|
|
|
|
|
|
|
+ if(order == null)
|
|
|
throw new BusinessException(new Error(ErrorConstants.ORDER_NOT_EXIST, "" ,""));
|
|
throw new BusinessException(new Error(ErrorConstants.ORDER_NOT_EXIST, "" ,""));
|
|
|
if(order.getDeleteSign() == ActiveState.ABOLISH.getCode())
|
|
if(order.getDeleteSign() == ActiveState.ABOLISH.getCode())
|
|
|
throw new BusinessException(new Error(ErrorConstants.ORDER_ALREADY_FREEZE, order.getOrderNo(),""));
|
|
throw new BusinessException(new Error(ErrorConstants.ORDER_ALREADY_FREEZE, order.getOrderNo(),""));
|
|
@@ -222,14 +222,13 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
List<LockingReleaseBo> list=userLockReleaseMapper.checkTask(order.getBuyerId(),t.getCommodityId());
|
|
List<LockingReleaseBo> list=userLockReleaseMapper.checkTask(order.getBuyerId(),t.getCommodityId());
|
|
|
if (list.size()>0) {
|
|
if (list.size()>0) {
|
|
|
for (LockingReleaseBo lockingReleaseBo : list) {
|
|
for (LockingReleaseBo lockingReleaseBo : list) {
|
|
|
- System.out.println(lockingReleaseBo.getAid() +"======="+order.getSalesmanId());
|
|
|
|
|
if (!lockingReleaseBo.getAid().equals(order.getSalesmanId())) {
|
|
if (!lockingReleaseBo.getAid().equals(order.getSalesmanId())) {
|
|
|
throw new BusinessException(new Error( "该业务已经被其他人锁定","该业务已经被其他人锁定"));
|
|
throw new BusinessException(new Error( "该业务已经被其他人锁定","该业务已经被其他人锁定"));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -280,7 +279,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
if (flag) {
|
|
if (flag) {
|
|
|
patentNewService.updateCostReduction(t.getId());
|
|
patentNewService.updateCostReduction(t.getId());
|
|
|
}
|
|
}
|
|
|
- return i;
|
|
|
|
|
|
|
+ return i;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -387,7 +386,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
tOrderBackMapper.updateByOrderNoAndBackStatus(t.getOrderNo());
|
|
tOrderBackMapper.updateByOrderNoAndBackStatus(t.getOrderNo());
|
|
|
}
|
|
}
|
|
|
// 0 相等
|
|
// 0 相等
|
|
|
- // -1 小于
|
|
|
|
|
|
|
+ // -1 小于
|
|
|
// 1 大于
|
|
// 1 大于
|
|
|
//liquidation_status 清算状态 0-首付待付请,1-尾款待付清,2-已付请,3-部分退款,4-全部退款
|
|
//liquidation_status 清算状态 0-首付待付请,1-尾款待付清,2-已付请,3-部分退款,4-全部退款
|
|
|
//settlement_amount 已付 total_amount 总价格 first_amount首付
|
|
//settlement_amount 已付 total_amount 总价格 first_amount首付
|
|
@@ -399,7 +398,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
} else if(t2.getSettlementAmount().compareTo(t.getFirstAmount()) < 0){//如果小于首付
|
|
} else if(t2.getSettlementAmount().compareTo(t.getFirstAmount()) < 0){//如果小于首付
|
|
|
t.setLiquidationStatus(LiquidationNewState.WAIT_PAY_FIRST_BALANCE.getCode());
|
|
t.setLiquidationStatus(LiquidationNewState.WAIT_PAY_FIRST_BALANCE.getCode());
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
return tOrderNewMapper.updateByPrimaryKeySelective(t);
|
|
return tOrderNewMapper.updateByPrimaryKeySelective(t);
|
|
|
}
|
|
}
|
|
@@ -429,7 +428,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
}else {
|
|
}else {
|
|
|
tOrderMidMapper.insertSelective(tm);
|
|
tOrderMidMapper.insertSelective(tm);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -454,7 +453,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
}else {
|
|
}else {
|
|
|
//根据前缀查询最大编号
|
|
//根据前缀查询最大编号
|
|
|
String max=organizationManagementMapper.getMaxAbbreviation(dep.getAbbreviation()+"-");
|
|
String max=organizationManagementMapper.getMaxAbbreviation(dep.getAbbreviation()+"-");
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
String sno=null;
|
|
String sno=null;
|
|
|
if (StringUtils.isBlank(max)||max.length()<13) {
|
|
if (StringUtils.isBlank(max)||max.length()<13) {
|
|
|
String cn=""+dep.getAbbreviation()+"-"+y+"0001";
|
|
String cn=""+dep.getAbbreviation()+"-"+y+"0001";
|
|
@@ -463,7 +462,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
}else {
|
|
}else {
|
|
|
int ty=Integer.parseInt(max.substring(max.indexOf("-")+1, max.length()-4));
|
|
int ty=Integer.parseInt(max.substring(max.indexOf("-")+1, max.length()-4));
|
|
|
int no=Integer.parseInt(max.substring(max.length()-4, max.length()));
|
|
int no=Integer.parseInt(max.substring(max.length()-4, max.length()));
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
//得出字符串
|
|
//得出字符串
|
|
|
sno = countNo(dep.getAbbreviation(), sno, ty, no);
|
|
sno = countNo(dep.getAbbreviation(), sno, ty, no);
|
|
|
//迭代得出最后编码
|
|
//迭代得出最后编码
|
|
@@ -477,9 +476,9 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
private String iterationNo(String sno ,Object mp, int ty, int no) {
|
|
private String iterationNo(String sno ,Object mp, int ty, int no) {
|
|
|
if (tOrderNewMapper.checkContractNo(sno)>0) {
|
|
if (tOrderNewMapper.checkContractNo(sno)>0) {
|
|
@@ -505,13 +504,13 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
}
|
|
}
|
|
|
return sno;
|
|
return sno;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
public void addOrderLog(TOrderLog tl, String reason) {
|
|
public void addOrderLog(TOrderLog tl, String reason) {
|
|
|
tl.setAid(TokenManager.getAdminId());
|
|
tl.setAid(TokenManager.getAdminId());
|
|
|
if(reason!=null)tl.setRemarks(reason);
|
|
if(reason!=null)tl.setRemarks(reason);
|
|
|
tOrderLogMapper.insertSelective(tl);
|
|
tOrderLogMapper.insertSelective(tl);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -543,7 +542,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
}else {
|
|
}else {
|
|
|
tOrderDunMapper.updateByPrimaryKeySelective(t);
|
|
tOrderDunMapper.updateByPrimaryKeySelective(t);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
boolean flag=true;
|
|
boolean flag=true;
|
|
@@ -561,7 +560,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
}
|
|
}
|
|
|
flag=true;
|
|
flag=true;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
return 1;
|
|
return 1;
|
|
|
}
|
|
}
|
|
@@ -611,7 +610,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
return p;
|
|
return p;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public int updateOrderNew(String orderNo, Integer orderStatus,String reason,Integer outsource, TOrderOutsource o) {
|
|
public int updateOrderNew(String orderNo, Integer orderStatus,String reason,Integer outsource, TOrderOutsource o) {
|
|
@@ -637,9 +636,9 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
tl.setOrderNo(orderNo);
|
|
tl.setOrderNo(orderNo);
|
|
|
tl.setProcess(OrderLogProcess.FQWB.getCode());
|
|
tl.setProcess(OrderLogProcess.FQWB.getCode());
|
|
|
addOrderLog(tl,reason);
|
|
addOrderLog(tl,reason);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
type=NoticeStatus.ORDER_YES.getCode();
|
|
type=NoticeStatus.ORDER_YES.getCode();
|
|
|
tl.setOrderNo(orderNo);
|
|
tl.setOrderNo(orderNo);
|
|
|
tl.setProcess(OrderLogProcess.SH.getCode());
|
|
tl.setProcess(OrderLogProcess.SH.getCode());
|
|
@@ -670,14 +669,14 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
t.setOrderStatus(orderStatus);
|
|
t.setOrderStatus(orderStatus);
|
|
|
tOrderNewMapper.updateByPrimaryKeySelective(t);
|
|
tOrderNewMapper.updateByPrimaryKeySelective(t);
|
|
|
if (aids.isEmpty()) {
|
|
if (aids.isEmpty()) {
|
|
|
- throw new BusinessException(new Error( "邮件发送失败,对方设置邮箱错误","邮件发送失败,对方设置邮箱错误"));
|
|
|
|
|
|
|
+ throw new BusinessException(new Error( "邮件发送失败,对方设置邮箱错误","邮件发送失败,对方设置邮箱错误"));
|
|
|
}
|
|
}
|
|
|
pushGeneralSendNoticeAndEmail(aids, type,t2.getOrderNo(), TokenManager.getAdminId(),t2.getApproval());
|
|
pushGeneralSendNoticeAndEmail(aids, type,t2.getOrderNo(), TokenManager.getAdminId(),t2.getApproval());
|
|
|
- return 1;
|
|
|
|
|
|
|
+ return 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
public void pushOrderDun(String orderNo) {
|
|
public void pushOrderDun(String orderNo) {
|
|
|
TOrderNew b=tOrderNewMapper.selectByPrimaryKey(orderNo);
|
|
TOrderNew b=tOrderNewMapper.selectByPrimaryKey(orderNo);
|
|
|
if(b.getApproval()==0){
|
|
if(b.getApproval()==0){
|
|
@@ -740,8 +739,8 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
throw new BusinessException(new Error("邮件发送错误。"));
|
|
throw new BusinessException(new Error("邮件发送错误。"));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
public void NewDunsendEmail(String orderNo,Integer dunId,AdminListBo a,TOrderNewBo b) throws UnsupportedEncodingException, MessagingException{
|
|
public void NewDunsendEmail(String orderNo,Integer dunId,AdminListBo a,TOrderNewBo b) throws UnsupportedEncodingException, MessagingException{
|
|
|
NewOrderDun ob=newOrderDunMapper.selectByPrimaryKey(dunId);
|
|
NewOrderDun ob=newOrderDunMapper.selectByPrimaryKey(dunId);
|
|
|
AdminListBo a2 = adminMapper.getDeptNameByAid(b.getSalesmanId());
|
|
AdminListBo a2 = adminMapper.getDeptNameByAid(b.getSalesmanId());
|
|
@@ -759,7 +758,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
asyncUtils.patentSend(bo);
|
|
asyncUtils.patentSend(bo);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -860,7 +859,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
//t.setAccept("1");
|
|
//t.setAccept("1");
|
|
|
t.setAccept(order.getFinanceId());
|
|
t.setAccept(order.getFinanceId());
|
|
|
t.setResult("");
|
|
t.setResult("");
|
|
|
- TOrderNew tOrder=new TOrderNew();
|
|
|
|
|
|
|
+ TOrderNew tOrder=new TOrderNew();
|
|
|
tOrder.setOrderNo(t.getOrderNo());
|
|
tOrder.setOrderNo(t.getOrderNo());
|
|
|
tOrder.setOrderStatus(OrderNewState.TDZ.getCode());
|
|
tOrder.setOrderStatus(OrderNewState.TDZ.getCode());
|
|
|
tOrderNewMapper.updateByPrimaryKeySelective(tOrder);
|
|
tOrderNewMapper.updateByPrimaryKeySelective(tOrder);
|
|
@@ -904,7 +903,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
addOrderLog(tl,reason);
|
|
addOrderLog(tl,reason);
|
|
|
pushGeneralSendNoticeAndEmail(aids, type,t2.getOrderNo(), TokenManager.getAdminId(),t2.getApproval());
|
|
pushGeneralSendNoticeAndEmail(aids, type,t2.getOrderNo(), TokenManager.getAdminId(),t2.getApproval());
|
|
|
//新增特批催款信息
|
|
//新增特批催款信息
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
return tOrderNewMapper.updateByPrimaryKeySelective(t);
|
|
return tOrderNewMapper.updateByPrimaryKeySelective(t);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1028,7 +1027,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
if (StringUtils.isNotBlank(endTime)) params.put("endTime", endTime+" 23:59:59");
|
|
if (StringUtils.isNotBlank(endTime)) params.put("endTime", endTime+" 23:59:59");
|
|
|
Pagination<TOrderRefundBo> p = (Pagination<TOrderRefundBo>)findPage("selectOrderRefundListByPage", "selectOrderRefundListCount", params, pageNo, pageSize);
|
|
Pagination<TOrderRefundBo> p = (Pagination<TOrderRefundBo>)findPage("selectOrderRefundListByPage", "selectOrderRefundListCount", params, pageNo, pageSize);
|
|
|
return p;
|
|
return p;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1051,14 +1050,14 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
}else {
|
|
}else {
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 获取催款数据
|
|
* 获取催款数据
|
|
|
- * @throws IOException
|
|
|
|
|
|
|
+ * @throws IOException
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
|
public void exportOrderDunData(String name,String orderNo,String contractNo,String starTime,String endTime,Integer specially,String aid,String adminName,
|
|
public void exportOrderDunData(String name,String orderNo,String contractNo,String starTime,String endTime,Integer specially,String aid,String adminName,
|
|
@@ -1068,7 +1067,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
@SuppressWarnings("unchecked")
|
|
@SuppressWarnings("unchecked")
|
|
|
List<outOrderDunListBo> list=(List<outOrderDunListBo>) dunOrderNewList( name, orderNo, contractNo, starTime, endTime,specially,
|
|
List<outOrderDunListBo> list=(List<outOrderDunListBo>) dunOrderNewList( name, orderNo, contractNo, starTime, endTime,specially,
|
|
|
aid, adminName, depId,newStatus, pageNo, pageSize).getList();
|
|
aid, adminName, depId,newStatus, pageNo, pageSize).getList();
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
String[] comment = {"合同编号","订单编号","客户名称","订单负责人","订单部门","订单状态","签单金额","应收款","已收款","拨款比例","结算状态","未收款","项目状态","催收科目","催款状态","催款启动时间","签单时间"};
|
|
String[] comment = {"合同编号","订单编号","客户名称","订单负责人","订单部门","订单状态","签单金额","应收款","已收款","拨款比例","结算状态","未收款","项目状态","催收科目","催款状态","催款启动时间","签单时间"};
|
|
|
String fileName ="催款信息记录表" + new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()) + ".xls";
|
|
String fileName ="催款信息记录表" + new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date()) + ".xls";
|
|
|
//type 0 变更
|
|
//type 0 变更
|
|
@@ -1107,20 +1106,20 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
//返回名称及参数
|
|
//返回名称及参数
|
|
|
- response.addHeader("Content-Disposition", "attachment;filename=" + new String(fileName.getBytes(),"iso-8859-1"));
|
|
|
|
|
|
|
+ response.addHeader("Content-Disposition", "attachment;filename=" + new String(fileName.getBytes(),"iso-8859-1"));
|
|
|
response.setContentType("application/octet-stream;charset=utf-8");
|
|
response.setContentType("application/octet-stream;charset=utf-8");
|
|
|
// 返回数据流
|
|
// 返回数据流
|
|
|
- wb.write(out);
|
|
|
|
|
|
|
+ wb.write(out);
|
|
|
out.flush();
|
|
out.flush();
|
|
|
out.close();
|
|
out.close();
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
throw new BusinessException(new Error("表格生成错误。"));
|
|
throw new BusinessException(new Error("表格生成错误。"));
|
|
|
}finally {
|
|
}finally {
|
|
|
- out.flush();
|
|
|
|
|
- out.close();
|
|
|
|
|
|
|
+ out.flush();
|
|
|
|
|
+ out.close();
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private String bigToString (BigDecimal o){
|
|
private String bigToString (BigDecimal o){
|
|
@@ -1149,7 +1148,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
t.setSettlementTime(new Date());
|
|
t.setSettlementTime(new Date());
|
|
|
return tOrderNewMapper.updateByPrimaryKeySelective(t);
|
|
return tOrderNewMapper.updateByPrimaryKeySelective(t);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public OrderRefundDetailBo orderRefundDetail(String id) {
|
|
public OrderRefundDetailBo orderRefundDetail(String id) {
|
|
|
return tOrderNewMapper.orderRefundDetail(id);
|
|
return tOrderNewMapper.orderRefundDetail(id);
|
|
@@ -1188,7 +1187,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
//if(t.getDeleteSign()==2) throw new BusinessException(new Error(ErrorConstants.ORDER_ALREADY_REVOKE, t.getOrderNo(),""));
|
|
//if(t.getDeleteSign()==2) throw new BusinessException(new Error(ErrorConstants.ORDER_ALREADY_REVOKE, t.getOrderNo(),""));
|
|
|
return t;
|
|
return t;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public List<OrderDunTaskBo> selectAllOrderDun() {
|
|
public List<OrderDunTaskBo> selectAllOrderDun() {
|
|
|
return tOrderDunMapper.getTaskAllOrderDun();
|
|
return tOrderDunMapper.getTaskAllOrderDun();
|
|
@@ -1200,11 +1199,11 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
public void updateOrderDun(TOrderDun tDun) {
|
|
public void updateOrderDun(TOrderDun tDun) {
|
|
|
tOrderDunMapper.updateByPrimaryKeySelective(tDun);
|
|
tOrderDunMapper.updateByPrimaryKeySelective(tDun);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public void addNoticAndSendEmail(String orderNo,OrderDunTaskBo t,Integer type)
|
|
public void addNoticAndSendEmail(String orderNo,OrderDunTaskBo t,Integer type)
|
|
|
throws UnsupportedEncodingException, MessagingException {
|
|
throws UnsupportedEncodingException, MessagingException {
|
|
@@ -1215,7 +1214,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
if (type==NoticeStatus.ORDER_APPROVA_NO.getCode()) id=TokenManager.getAdminId()==null?"1":TokenManager.getAdminId();
|
|
if (type==NoticeStatus.ORDER_APPROVA_NO.getCode()) id=TokenManager.getAdminId()==null?"1":TokenManager.getAdminId();
|
|
|
AdminListBo a = adminMapper.getDeptNameByAid(id);
|
|
AdminListBo a = adminMapper.getDeptNameByAid(id);
|
|
|
sendEmail( t==null?null:t.getId(), a, b);
|
|
sendEmail( t==null?null:t.getId(), a, b);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
addNotic(type,a, b);
|
|
addNotic(type,a, b);
|
|
|
}
|
|
}
|
|
|
public void addNotic(Integer type,AdminListBo a,TOrderNewBo b) {
|
|
public void addNotic(Integer type,AdminListBo a,TOrderNewBo b) {
|
|
@@ -1230,7 +1229,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
n.setReaded(0);//未读
|
|
n.setReaded(0);//未读
|
|
|
asyncUtils.addNotice(n);
|
|
asyncUtils.addNotice(n);
|
|
|
}
|
|
}
|
|
|
- public void sendEmail(String dunId,AdminListBo a,TOrderNewBo b) throws UnsupportedEncodingException, MessagingException{
|
|
|
|
|
|
|
+ public void sendEmail(String dunId,AdminListBo a,TOrderNewBo b){
|
|
|
LoggerUtils.debug(logger, "======================邮件信息发送===================");
|
|
LoggerUtils.debug(logger, "======================邮件信息发送===================");
|
|
|
String content = "<div>客户名称: "+ b.getUserName() +"</div><div>订单编号: " + b.getOrderNo() + "</div><div>合同编号: " + b.getContractNo() + "</div>";
|
|
String content = "<div>客户名称: "+ b.getUserName() +"</div><div>订单编号: " + b.getOrderNo() + "</div><div>合同编号: " + b.getContractNo() + "</div>";
|
|
|
String tite="订单驳回";
|
|
String tite="订单驳回";
|
|
@@ -1264,10 +1263,10 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
return tOrderLogMapper.selectOrderByNo(orderNo);
|
|
return tOrderLogMapper.selectOrderByNo(orderNo);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
public void pushGeneralSendNoticeAndEmail(List<String> alist, Integer type,String orderNo,String adminId,Integer approval) {
|
|
public void pushGeneralSendNoticeAndEmail(List<String> alist, Integer type,String orderNo,String adminId,Integer approval) {
|
|
|
AdminListBo a = adminMapper.getDeptNameByAid(adminId);
|
|
AdminListBo a = adminMapper.getDeptNameByAid(adminId);
|
|
|
String approvalType="";
|
|
String approvalType="";
|
|
@@ -1300,11 +1299,11 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1358,7 +1357,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 发起外包时,通过计算获取项目的成本,订单的成本
|
|
* 发起外包时,通过计算获取项目的成本,订单的成本
|
|
|
- *
|
|
|
|
|
|
|
+ *
|
|
|
* @param tid 项目编号
|
|
* @param tid 项目编号
|
|
|
* @param type 0外包 1供应商
|
|
* @param type 0外包 1供应商
|
|
|
*/
|
|
*/
|