V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  jhdxr  ›  全部回复第 86 页 / 共 102 页
回复总数  2033
1 ... 82  83  84  85  86  87  88  89  90  91 ... 102  
2016-10-19 23:05:15 +08:00
回复了 Priest 创建的主题 推广 抽奖送苹果喽!
55
@dphdjy 那个前端界面是现成框架的。。。 bootstrap + adminlte
@mhycy 我觉得需要些复杂 sql 的时候,一般来说首先就不会选择 MySQL 了。。。然后跟着也不大会考虑 PHP 了。。。(国内 php+pgsql 的组合几乎没见过,日本那倒不少)
@q397064399 然而 php5 也是 2005 年发布的,也已经 10+年了,别说的好像刚发布一样。另外国内的 php 环境至少落后国际上一个时代,看看 composer 在国内和国际的普及程度就知道了。
顺便说一句,那个帖子里提到的很多东西,我觉得更多的是借鉴 ruby (更准确的说, ror )而非 java 。


@mhycy 绝大多数业务场景还不需要考虑运行效率,而 ORM 在那些场景下能够大幅提升开发效率。
2016-10-13 15:22:59 +08:00
回复了 ncworm 创建的主题 Android 大家来看看这篇百万烧一个 APP 的文章,看着挺搞笑的
华为, 10 年技术经验,大牛。连个 APP 的流程能不能跑通都看不出来?
2016-10-10 23:23:27 +08:00
回复了 depress 创建的主题 ACG VIP 会员制“大会员”——B 站终于开始向用户伸手要钱了
放心, A 站不会收费的,连网站都能跪好几天至今数据还没恢复完的(估计没指望了),怎么会收费呢。(滑稽.jpg
2016-10-10 23:14:41 +08:00
回复了 barretlee 创建的主题 程序员 你用的哪个编辑器, ST/Atom/VSC?
@BMW 第一反应依然是 Photoshop ,心想高人就是不一样。。。
然后看到了我开始菜单里的 phpstorm 。。。
2016-10-10 17:33:14 +08:00
回复了 dataman 创建的主题 推广 数人云|赠书,从容器的全世界路过
路过看看运气,毕竟那么多不看帖就刷楼的 23333333
2016-10-09 18:59:38 +08:00
回复了 starvedcat 创建的主题 PHP 如何方便的转义所有从 mysql 中提取出来的字符串?
@lslqtz mysql_escape_string / mysql_real_escape_string 是属于 ext-mysql 的,这个在 5.5 里就已经废弃,并且从 7.0 开始被移除了。对于数据库连接,推荐使用 PDO 。

然后 LZ 你并没有解释 & 为什么是特殊符号(你对特殊符号是怎么定义的)?

最后,$GLOBALS 可以用来遍历所有变量,然而除非万不得已,不要这么做
2016-10-09 13:43:59 +08:00
回复了 depress 创建的主题 支付宝 作为支付宝本职工作的支付做的这么混乱真的大丈夫?
因为它扫你是商户接入了商家支付,最直接的表现是你可以信用卡
另外一种你扫它多半只是个人转账,只能用余额或者借记卡。。。
2016-10-05 18:06:44 +08:00
回复了 ebony0319 创建的主题 随想 前端把查询插入写成这样是要闹哪样!
@ebony0319 你需要 navicat (的自动格式化

INSERT INTO cb (
   orderno,
   ordersn,
   cbtype,
   slcb,
   pjcb,
   rgfscb,
   rgktcb,
   rgxscb,
   rgzscb,
   rgbzcb,
   ddcb,
   slsycb,
   ktgz,
   xsgz,
   zsgz,
   bzgz,
   wfj,
   cbycyy
) SELECT
   orderno,
   ordersn,
   cbtype,
   slcb,
   pjcb,
   fscb,
   ktcb,
   xscb,
   zscb,
   bzcb,
   ddcb,
   slsycb,
   ktgz,
   xsgz,
   zsgz,
   bzgz,
   wfprice,
   cbycyy
FROM
  (
     SELECT
       a.orderno,
       a.ordersn,
       a.cbtype,
       isnull(fs.cbycyy, '') + isnull(sl.cbycyy, '') + isnull(pj.cbycyy, '') + isnull(rg.cbycyy, '') + isnull(dd.cbycyy, '') + CASE
     WHEN a.iswf = 1
     AND isnull(wfj.price, 0) = 0 THEN
      '外发价格为零'
     ELSE
      ''
     END cbycyy,
     wfj.price wfprice,
     fs.fscb,
     sl.slcb,
     pj.pjcb,
     rg.ktcb,
     rg.xscb,
     rg.zscb,
     rg.bzcb,
     dd.ddcb,
     sycb.sycb / a.num slsycb,
     rggz.ktgz,
     rggz.xsgz,
     rggz.zsgz,
     rggz.bzgz
   FROM
    (
       SELECT
         a.orderno,
         a.ordersn,
         a.num,
         a.productid,
         0 cbtype,
         a.jgs,
         a.iswf,
         a.orderdate
       FROM
         ORDER a
       WHERE
         num > 0
       AND isnull(isch, 0) = 0
       UNION ALL
         SELECT
           a.orderno,
           a.ordersn,
           a.num,
           a.productid,
           1 cbtype,
           a.jgs,
           a.iswf,
           a.orderdate
         FROM
           ORDER a
         WHERE
           num > 0
         AND isnull(isch, 0) = 0
    ) a
   LEFT OUTER JOIN (
     SELECT
       a.orderno,
       a.ordersn,
       CASE
     WHEN b.jgs <> '工厂' THEN
       1
     ELSE
       0
     END cbtype,
     max(
       CASE
       WHEN b.id IS NULL THEN
        '空台材料与 BOM 不符'
       ELSE
        ''
       END
    ) cbycyy,
     sum(
       CASE
       WHEN isnull(b.price, 0) = 0 THEN
         c.pjnum * c.bomweight * d.cbj2
       ELSE
         b.price * c.pjnum * c.bomweight
       END
    ) fscb
   FROM
     ORDER a
   INNER JOIN bom c ON a.productid = c.productid
   INNER JOIN product d ON d.id = c.pjid
   LEFT OUTER JOIN orderktrg b ON a.orderno = b.orderno
   AND a.ordersn = b.ordersn
   AND c.pjid = b.rgid
   WHERE
     d.productno LIKE 'K%'
   AND a.orderno = 'S0116050030'
   AND a.ordersn = 10
   GROUP BY
     a.orderno,
     a.ordersn,
     b.jgs
  ) fs ON a.orderno = fs.orderno
   AND a.ordersn = fs.ordersn
   AND a.cbtype = fs.cbtype
   LEFT OUTER JOIN (
     SELECT
       a.orderno,
       a.ordersn,
       max(
         CASE
         WHEN c.orderno IS NOT NULL
         AND isnull(c.wlly, '') <> '客户'
         AND isnull(c.cbj2, 0) = 0
         AND isnull(b.cbj2, 0) = 0
         AND isnull(b.rkprice, 0) = 0 THEN
          '价格为零'
         ELSE
          ''
         END
      ) + CASE
     WHEN isnull(need.need, 0) <> cc.slnumtotal * a.num THEN
      '数量不符'
     ELSE
      ''
     END cbycyy,
     CASE
   WHEN c.wlly <> '工厂' THEN
     1
   ELSE
     0
   END cbtype,
   sum(
     c.num * CASE
     WHEN isnull(c.cbj2, 0) > 0 THEN
       c.cbj2
     WHEN isnull(b.cbj2, 0) < isnull(b.rkprice, 0) THEN
       b.rkprice
     ELSE
       b.cbj2
     END
  ) / CASE
WHEN a.num = 0 THEN
   NULL
ELSE
   a.num
END slcb
FROM
   ORDER a
LEFT OUTER JOIN orderslxq c ON a.orderno = c.orderno
AND a.ordersn = c.ordersn
AND c.wlly <> '客户'
LEFT OUTER JOIN product b ON c.slid = b.id
INNER JOIN product cc ON a.productid = cc.id
LEFT OUTER JOIN (
   SELECT
     orderno,
     ordersn,
     sum(num) need
   FROM
     orderslxq a
   WHERE
     1 = 1
   AND a.orderno = 'S0116050030'
   AND a.ordersn = 10
   GROUP BY
     a.orderno,
     a.ordersn
) need ON a.orderno = need.orderno
AND a.ordersn = need.ordersn
WHERE
   1 = 1
AND a.orderno = 'S0116050030'
AND a.ordersn = 10
GROUP BY
   a.orderno,
   a.ordersn,
   a.num,
   c.wlly,
   cc.slnumtotal,
   need.need
  ) sl ON a.orderno = sl.orderno
   AND a.ordersn = sl.ordersn
   AND a.cbtype = sl.cbtype
   LEFT OUTER JOIN (
     SELECT
       a.orderno,
       a.ordersn,
       max(
         CASE
         WHEN isnull(b.cbj2, 0) = 0
         AND isnull(b.rkprice, 0) = 0 THEN
          '配件价格为零'
         ELSE
          ''
         END
      ) + CASE
     WHEN need.need <> cc.pjnumtotal * c.num THEN
      '数量不符'
     ELSE
      ''
     END cbycyy,
     CASE
   WHEN a.wlly <> '工厂' THEN
     1
   ELSE
     0
   END cbtype,
   sum(
     a.num * CASE
     WHEN isnull(b.cbj2, 0) < isnull(b.rkprice, 0) THEN
       b.rkprice
     ELSE
       b.cbj2
     END
  ) / CASE
WHEN c.num = 0 THEN
   NULL
ELSE
   c.num
END pjcb
FROM
   orderpjxq a
INNER JOIN product b ON a.xxid = b.id
INNER JOIN ORDER c ON a.orderno = c.orderno
AND a.ordersn = c.ordersn
INNER JOIN product cc ON c.productid = cc.id
INNER JOIN (
   SELECT
     orderno,
     ordersn,
     sum(num) need
   FROM
     orderpjxq a
   WHERE
     1 = 1
   AND a.orderno = 'S0116050030'
   AND a.ordersn = 10
   GROUP BY
     a.orderno,
     a.ordersn
) need ON a.orderno = need.orderno
AND a.ordersn = need.ordersn
WHERE
   1 = 1
AND a.wlly <> '客户'
AND a.orderno = 'S0116050030'
AND a.ordersn = 10
GROUP BY
   a.orderno,
   a.ordersn,
   c.num,
   a.wlly,
   cc.pjnumtotal,
   need.need
  ) pj ON a.orderno = pj.orderno
   AND a.ordersn = pj.ordersn
   AND a.cbtype = pj.cbtype
   LEFT OUTER JOIN (
     SELECT
       a.orderno,
       a.ordersn,
       max(
         CASE
         WHEN b.id IS NULL
         AND d.productname NOT LIKE '%镶%' THEN
          '项目不符'
         WHEN d.productname LIKE '%镶%'
         AND a.orderdate >= '2012-03-21'
         AND isnull(xsrg2.ycyy, 0) > 0 THEN
          '人工项目与 BOM 不符'
         ELSE
          ''
         END
      ) cbycyy,
       CASE
     WHEN b.jgs <> '工厂' THEN
       1
     ELSE
       0
     END cbtype,
     sum(
       CASE
       WHEN d.productno LIKE 'R%'
       AND d.productname NOT LIKE '%镶%'
       AND d.productname NOT LIKE '%包装%'
       AND d.productname NOT LIKE '%抹黑%'
       AND d.productname NOT LIKE '%粘%'
       AND d.productname NOT LIKE '%滴%' THEN
         CASE
       WHEN isnull(b.price, 0) = 0 THEN
         c.bomprice
       ELSE
         b.price
       END * c.pjnum * c.bs
       ELSE
         NULL
       END
    ) ktcb,
     CASE
   WHEN a.orderdate >= '2012-03-21' THEN
     xsrg2.xsrg
   WHEN isnull(xsrg2.xsrg, 0) = 0 THEN
     sum(
       CASE
       WHEN d.productno LIKE 'R%'
       AND d.productname LIKE '%镶%' THEN
         CASE
       WHEN isnull(b.price, 0) = 0 THEN
         c.bomprice
       ELSE
         b.price
       END * c.pjnum * c.bs
       ELSE
         NULL
       END
    )
   ELSE
     xsrg2.xsrg
   END xscb,
   sum(
     CASE
     WHEN d.productno LIKE 'R%'
     AND (
       d.productname LIKE '%粘%'
       OR d.productname LIKE '%抹黑%'
       OR d.productname LIKE '%滴%'
    ) THEN
       CASE
     WHEN isnull(b.price, 0) = 0 THEN
       c.bomprice
     ELSE
       b.price
     END * c.pjnum * c.bs
     ELSE
       NULL
     END
  ) zscb,
   sum(
     CASE
     WHEN d.productno LIKE 'R%'
     AND d.productname LIKE '%包装%' THEN
       CASE
     WHEN isnull(b.price, 0) = 0 THEN
       c.bomprice
     ELSE
       b.price
     END * c.pjnum * c.bs
     ELSE
       NULL
     END
  ) bzcb
FROM
   ORDER a
INNER JOIN bom c ON a.productid = c.productid
INNER JOIN product d ON d.id = c.pjid
LEFT OUTER JOIN orderktrg b ON a.orderno = b.orderno
AND a.ordersn = b.ordersn
AND c.pjid = b.rgid
LEFT OUTER JOIN (
   SELECT
     a.orderno,
     a.ordersn,
     CASE
   WHEN isnull(a.jgs, '') <> '工厂'
   AND isnull(a.jgs, '') <> '' THEN
     1
   ELSE
     0
   END cbtype,
   sum(
     CASE
     WHEN isnull(a.price_jgs, 0) = 0
     AND isnull(b.price_bom, 0) = 0 THEN
       1
     ELSE
       0
     END
  ) ycyy,
   sum(
     CASE
     WHEN isnull(a.price_jgs, 0) = 0 THEN
       b.price_bom
     ELSE
       a.price_jgs
     END * a.num / CASE
     WHEN isnull(c.num, 0) = 0 THEN
       NULL
     ELSE
       c.num
     END
  ) xsrg
FROM
   orderslxq a
INNER JOIN product p ON a.slid = p.id
AND p.productno NOT LIKE 'P%'
LEFT OUTER JOIN gyname b ON a.gyid = b.id
INNER JOIN ORDER c ON a.orderno = c.orderno
AND a.ordersn = c.ordersn
WHERE
   1 = 1
AND a.orderno LIKE '%S0116050030%'
AND a.ordersn = 10
AND isnull(a.gxid, 0) <> 6
GROUP BY
   a.orderno,
   a.ordersn,
   a.jgs
) xsrg2 ON a.orderno = xsrg2.orderno
AND a.ordersn = xsrg2.ordersn
AND CASE
WHEN b.jgs <> '工厂' THEN
   1
ELSE
   0
END = xsrg2.cbtype
WHERE
   1 = 1
AND d.productno LIKE 'R%'
AND a.orderno LIKE '%S0116050030%'
AND a.ordersn = 10
GROUP BY
   a.orderdate,
   a.orderno,
   a.ordersn,
   xsrg2.ycyy,
   xsrg2.xsrg,
   CASE
WHEN b.jgs <> '工厂' THEN
   1
ELSE
   0
END
  ) rg ON a.orderno = rg.orderno
   AND a.ordersn = rg.ordersn
   AND a.cbtype = rg.cbtype
   LEFT OUTER JOIN (
     SELECT
       a.orderno,
       a.ordersn,
       a.cbtype,
       a.productid,
       max(
         CASE
         WHEN a.ddprice = 0 THEN
          '价格为零'
         ELSE
          ''
         END
      ) cbycyy,
       CASE
     WHEN SUM(a.ddnum) = 0 THEN
       sum(1 * a.ddprice)
     ELSE
       SUM(a.ddnum * a.ddprice) / CASE
     WHEN SUM(a.ddnum) = 0 THEN
       1
     ELSE
       sum(a.ddnum)
     END
     END AS ddcb,
     CASE
   WHEN SUM(a.ddnum) = 0 THEN
     1
   ELSE
     sum(a.ddnum)
   END AS ddnum
   FROM
    (
       SELECT
         a.orderno,
         a.ordersn,
         a.cbtype,
         a.productid,
         a.ddnum,
         a.cureid,
         CASE

。。。(字数限制,以下省略。。。铜币在燃烧。。。
2016-10-05 17:32:52 +08:00
回复了 ebony0319 创建的主题 MySQL sql 一段代码优化
我也来补充个方案,换 Oracle
2016-10-02 14:26:06 +08:00
回复了 billion 创建的主题 问与答 如何创建一个文本文件,里面的内容是它自己的 MD5 值?
@crs0910 『唯一性』这三个字从哪冒出来的? md5 的取值范围是 32 位大小写不敏感的英文数字,是有限的。无限域到有限域的映射,怎么可能唯一
2016-10-01 17:50:15 +08:00
回复了 tvallday 创建的主题 分享发现 12306 给旅客画像 弹广告分类投放
@tvallday 我来给你例子,药价是不是变贵了,并且是很多很多倍(我不否认药品涨价的合理性)。
相反的,我很好奇,你觉得在中国有什么东西是市场化只会变便宜的?
让我想想。。。滴滴打车?扣除补贴,然后再把该买的保险买上后再比比。
2016-10-01 15:13:30 +08:00
回复了 tvallday 创建的主题 分享发现 12306 给旅客画像 弹广告分类投放
@tvallday 绿化那是没办法,政策有要求啊。客运也是如此,上面限制着呢。。。
进出的便利问题,按照你的理论,同样价格的飞机,以及更便宜的汽车,都能满足啊

最后回答下你的问题,资源稀缺的时候,别说花园绿化了,连厨房卫生间客厅都未必能有独立的,极端的显示案例可以百度『笼屋』。铁路现在也是这种供小于求,并且极端情况(春节)下供远小于求的情况。
2016-10-01 14:56:09 +08:00
回复了 tvallday 创建的主题 分享发现 12306 给旅客画像 弹广告分类投放
@tvallday 你既然知道『因为铁路主要收入是货运而不是客运』,那还怎么得出票价绝对不会太贵这么荒谬的结论的?现在都是货运铺贴客运,要为了利润,肯定客运直接砍了全部做货运啊
2016-10-01 13:22:45 +08:00
回复了 benatsh 创建的主题 问与答 不知道 V2EX 上有多少开发人员对数据分析发展方向感兴趣
感兴趣。但是很尴尬的一点(我相信不少人也是这样)就是对于数据相关的能力还停留在学校水平(甚至更低),直接带来匹配的岗位也会是初级的岗位,那么转行(虽然同为 IT ,但是对于内行来说这也算是一次转行了)极有可能会导致自己薪资的降低。。。
1 ... 82  83  84  85  86  87  88  89  90  91 ... 102  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2850 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 44ms · UTC 02:28 · PVG 10:28 · LAX 18:28 · JFK 21:28
Developed with CodeLauncher
♥ Do have faith in what you're doing.