commit
parent
8fe30499fc
commit
c15d838e0b
|
@ -1,5 +1,5 @@
|
|||
CREATE DATABASE IF NOT EXISTS `wms` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci */;
|
||||
USE `wms`;
|
||||
CREATE DATABASE IF NOT EXISTS `jee-wms` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci */;
|
||||
USE `jee-wms`;
|
||||
-- MySQL dump 10.13 Distrib 8.0.28, for Win64 (x86_64)
|
||||
--
|
||||
-- Host: localhost Database: wms
|
||||
|
@ -8641,58 +8641,111 @@ DELIMITER ;
|
|||
DELIMITER ;;
|
||||
CREATE DEFINER=`root`@`localhost` PROCEDURE `update_rp_period_in_out`(IN datefrom VARCHAR(45), IN dateto VARCHAR(45), IN username VARCHAR(45))
|
||||
BEGIN
|
||||
|
||||
delete from `rp_period_in_out` where username = username;
|
||||
|
||||
|
||||
|
||||
INSERT INTO `rp_period_in_out`
|
||||
|
||||
(
|
||||
|
||||
`create_by`,
|
||||
|
||||
`date_period`,
|
||||
|
||||
`username`,
|
||||
|
||||
`goods_id`,
|
||||
|
||||
`goods_name`,
|
||||
|
||||
`goods_unit`,
|
||||
|
||||
`goods_guige`,
|
||||
|
||||
`goods_qc`,
|
||||
|
||||
`goods_in`,
|
||||
|
||||
`goods_out`,
|
||||
|
||||
`goods_qm`,
|
||||
|
||||
`sup_code`,
|
||||
|
||||
`sup_name`,
|
||||
|
||||
`goods_now`
|
||||
|
||||
|
||||
|
||||
)
|
||||
|
||||
SELECT username, CONCAT(datefrom,'~',dateto),username,wv.goods_id,wv.shp_ming_cheng,wv.shl_dan_wei,wv.shp_gui_ge,
|
||||
|
||||
(SELECT
|
||||
|
||||
SUM(IFNULL(iwm.base_goodscount,0) )
|
||||
|
||||
FROM
|
||||
|
||||
mv_down_and_up iwm
|
||||
|
||||
WHERE
|
||||
|
||||
TO_DAYS(iwm.create_date) < TO_DAYS(datefrom)
|
||||
|
||||
AND iwm.goods_id = wv.goods_id),
|
||||
|
||||
(SELECT
|
||||
|
||||
SUM(IFNULL(iwm.base_goodscount,0) )
|
||||
|
||||
FROM
|
||||
|
||||
wm_to_up_goods iwm
|
||||
|
||||
WHERE
|
||||
|
||||
TO_DAYS(iwm.create_date) >= TO_DAYS(datefrom) AND TO_DAYS(iwm.create_date) <= TO_DAYS(dateto)
|
||||
|
||||
AND iwm.order_id <> 'ZY' AND iwm.goods_id = wv.goods_id) ,
|
||||
|
||||
(SELECT
|
||||
|
||||
SUM(IFNULL(ABS(iwm.base_goodscount),0) )
|
||||
|
||||
FROM
|
||||
|
||||
wm_to_down_goods iwm
|
||||
|
||||
WHERE
|
||||
|
||||
TO_DAYS(iwm.create_date) >= TO_DAYS(datefrom) AND TO_DAYS(iwm.create_date) <= TO_DAYS(dateto)
|
||||
|
||||
AND iwm.order_id <> 'ZY' AND iwm.goods_id = wv.goods_id),
|
||||
|
||||
(SELECT
|
||||
|
||||
SUM(IFNULL( iwm.base_goodscount,0) )
|
||||
|
||||
FROM
|
||||
|
||||
mv_down_and_up iwm
|
||||
|
||||
WHERE
|
||||
|
||||
TO_DAYS(iwm.create_date) <= TO_DAYS(dateto)
|
||||
|
||||
AND iwm.goods_id = wv.goods_id),
|
||||
|
||||
(select sup_code from wm_im_notice_h where notice_id in (SELECT order_id FROM wms.wm_to_up_goods where goods_id= wv.goods_id ) limit 1) ,
|
||||
|
||||
(select sup_name from wm_im_notice_h where notice_id in (SELECT order_id FROM wms.wm_to_up_goods where goods_id= wv.goods_id ) limit 1) ,
|
||||
|
||||
IFNULL(SUM(IFNULL(base_goodscount,0)) ,0) FROM wv_stock wv GROUP BY wv.goods_id;
|
||||
|
||||
END ;;
|
||||
DELIMITER ;
|
||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||
|
|
|
@ -148,6 +148,7 @@ public class WvDayCostSumController extends BaseController {
|
|||
+ sdayCostBhs + ",shuie:" + sdayCostSe + ",hansj:"
|
||||
+ sdayCostHsj + "");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
// TODO: handle exception
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ validationQuery.sqlserver=SELECT 1
|
|||
jdbc.url.jeecg=jdbc:mysql://127.0.0.1:3306/jee-wms?useUnicode=true&characterEncoding=UTF-8
|
||||
|
||||
jdbc.username.jeecg=root
|
||||
jdbc.password.jeecg=password
|
||||
jdbc.password.jeecg=Zzerp123
|
||||
jdbc.dbType=mysql
|
||||
|
||||
#Oracle
|
||||
|
|
Loading…
Reference in New Issue