2018.4

1、增加了表ThirdAudit

/*
Navicat MySQL Data Transfer


Source Server         : localhost_3306
Source Server Version : 50624
Source Host           : localhost:3306
Source Database       : bwdb_2


Target Server Type    : MYSQL
Target Server Version : 50624
File Encoding         : 65001


Date: 2018-04-19 15:56:08
*/


SET FOREIGN_KEY_CHECKS=0;


-- ----------------------------
-- Table structure for `threeaudit`
-- ----------------------------
DROP TABLE IF EXISTS `threeaudit`;
CREATE TABLE `threeaudit` (
  `sn` int(11) NOT NULL AUTO_INCREMENT,
  `psn` int(11) DEFAULT NULL,
  `subpsn` int(11) DEFAULT NULL COMMENT '子项目编号,具体的审核任务',
  `level` int(11) DEFAULT NULL,
  `esn` int(11) DEFAULT NULL,
  `passornot` smallint(6) DEFAULT NULL,
  `ly` varchar(100) DEFAULT NULL,
  `dtime` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`sn`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='三级审核记录表';

2、获取三级项目信息
SELECT * from projectsub 
where psn=26 and fpsn in (select sn FROM(SELECT * from projectsub where fpsn in (SELECT sn from (SELECT * from projectsub where fpsn=0 and psn=26) as firsttb)) as SECONDtb)
3、trigger of project for mysql
begin  
delete from xunjia where xunjia.psn=old.psn;  
delete from zaojia where zaojia.psn=old.psn;
delete from fyrecord1 where fyrecord1.psn=old.psn;
delete from fyrecord2 where fyrecord2.psn=old.psn;
delete from dealfilebill where dealfilebill.psn=old.psn;
delete from projectshenpi where projectshenpi.psn=old.psn;
delete from d2 where d2.psn=old.psn;
end
3、完成三级质量控制

4、项目状态:0立项;1副主任审核;2主任审核;3实施;4二级审核;5三级审核;6 发文稿;7完成项目;8归档;

5、二级和三级审核不通过都退回到项目的实施状态(3)。


阅读更多

没有更多推荐了,返回首页