main
黄海 2 years ago
parent 75bf43532f
commit 4a3e5d9a34

Binary file not shown.

@ -12,7 +12,7 @@
<body>
<div id="header">
<img src="/FengHuang/images/school_logo.jpg" style="margin-left: 30px;margin-top: 8px;width: 80px;height:80px"/>
<img src="/FengHuang/images/yangpu.png" style="margin-left: 30px;margin-top: 8px;width: 80px;height:80px"/>
<span style="font-size:36px;display: block;margin-left: 133px;margin-top: -58px;font-weight:bold"
id="system_name"></span>
</div>

@ -119,31 +119,6 @@
success: function (data) {
// 使用地区名称
geoMapName=data.area_name;
// 隶属的省份名称
// var province_name=data.province_name;
// if(province_name.indexOf("省")!== -1){
// province_name=province_name.replace("省","") ;
// }else if(province_name.indexOf("市")!== -1){
// province_name=province_name.replace("市","") ;
// }else if(province_name.indexOf("自治区")!== -1){
// province_name=province_name.replace("自治区","") ;
// }
// province_name=CC2PY(province_name).toLowerCase();
// $.ajax({
// type:'GET',
// dataType:'json',
// async:false,
// url:'../district/map/province/'+province_name+'.json',
// success:function (data) {
// for( var i=0;i<data.features.length;i++ ){
// if(data.features[i].properties.name==geoMapName){
// area_cp=data.features[i].properties.cp;
// }
// }
// }
// })
// getData();
// geoCoordMap= getData();
$.ajax({
type:'GET',
dataType:'json',

@ -87,6 +87,8 @@
</form>
</div>
<script src="../../lib/layui/layui.js" charset="utf-8"></script>
<script src="../../../js/jquery-3.6.0.min.js"></script>
<script src="../../../js/jquery_Extend.js"></script>
<script type="text/javascript">
layui.extend({
admin: '{/}../../static/js/admin'
@ -99,6 +101,7 @@
laytpl = layui.laytpl;
var ids = "";
$.getUrlParam("")
$(function () {
//定位焦点
$("#global_name").focus();

@ -122,7 +122,6 @@
del(data.global_id);
});
} else if (obj.event === 'edit') {
WeAdminEdit('编辑', './edit.html', data.global_id, 650, 350)
}
});

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="AdditionalModuleElements">
<content url="file://$MODULE_DIR$" dumb="true">
<sourceFolder url="file://$MODULE_DIR$/src/main/resource" type="java-resource" />
</content>
</component>
</module>

@ -1,137 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resource" type="java-resource" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="aspose-cells-20.7-crack" level="project" />
<orderEntry type="library" name="Maven: com.jfinal:jfinal:5.0.7" level="project" />
<orderEntry type="library" name="Maven: com.jfinal:jfinal-undertow:3.3" level="project" />
<orderEntry type="library" name="Maven: io.undertow:undertow-core:2.2.20.Final" level="project" />
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.1.Final" level="project" />
<orderEntry type="library" name="Maven: org.jboss.xnio:xnio-api:3.8.7.Final" level="project" />
<orderEntry type="library" name="Maven: org.wildfly.common:wildfly-common:1.5.4.Final" level="project" />
<orderEntry type="library" name="Maven: org.wildfly.client:wildfly-client-config:1.0.1.Final" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.jboss.xnio:xnio-nio:3.8.7.Final" level="project" />
<orderEntry type="library" name="Maven: org.jboss.threads:jboss-threads:3.1.0.Final" level="project" />
<orderEntry type="library" name="Maven: io.undertow:undertow-servlet:2.2.20.Final" level="project" />
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" />
<orderEntry type="library" name="Maven: com.jfinal:cos:2022.2" level="project" />
<orderEntry type="library" name="Maven: com.github.icecooly:FastHttpClient:1.10" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
<orderEntry type="library" name="Maven: com.huaweicloud:esdk-obs-java:3.22.3.1" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.13.0" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.13.0" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.13.0" level="project" />
<orderEntry type="library" name="Maven: net.sf.json-lib:json-lib:jdk15:2.4" level="project" />
<orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.8.0" level="project" />
<orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.1" level="project" />
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.5" level="project" />
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
<orderEntry type="library" name="Maven: net.sf.ezmorph:ezmorph:1.0.6" level="project" />
<orderEntry type="library" name="Maven: it.sauronsoftware.cron4j:cron4j:2.2.5" level="project" />
<orderEntry type="library" name="Maven: com.jcraft:jsch:0.1.55" level="project" />
<orderEntry type="library" name="Maven: com.alibaba:druid:1.2.15" level="project" />
<orderEntry type="library" name="Maven: net.coobird:thumbnailator:0.4.18" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.4.4" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.4.4" level="project" />
<orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.8.10" level="project" />
<orderEntry type="library" name="Maven: com.alibaba:fastjson:2.0.20" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.fastjson2:fastjson2-extension:2.0.20" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.fastjson2:fastjson2:2.0.20" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:poi:5.2.2" level="project" />
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.15" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.4" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-math3:3.6.1" level="project" />
<orderEntry type="library" name="Maven: com.zaxxer:SparseBitSet:1.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:5.2.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-lite:5.2.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:5.0.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.21" level="project" />
<orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.07" level="project" />
<orderEntry type="library" name="Maven: org.jsoup:jsoup:1.15.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.13" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.15" level="project" />
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:8.0.30" level="project" />
<orderEntry type="library" name="Maven: com.google.protobuf:protobuf-java:3.19.4" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.10" level="project" />
<orderEntry type="library" name="Maven: commons-io:commons-io:2.11.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-email:1.5" level="project" />
<orderEntry type="library" name="Maven: com.sun.mail:javax.mail:1.5.6" level="project" />
<orderEntry type="library" name="Maven: javax.activation:activation:1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.12.0" level="project" />
<orderEntry type="library" name="Maven: org.dom4j:dom4j:2.1.3" level="project" />
<orderEntry type="library" name="Maven: redis.clients:jedis:3.8.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.11.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.5.13" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:aliyun-java-sdk-ram:3.3.0" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:aliyun-java-sdk-core:4.6.2" level="project" />
<orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
<orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
<orderEntry type="library" name="Maven: org.glassfish.jaxb:jaxb-runtime:3.0.2" level="project" />
<orderEntry type="library" name="Maven: com.sun.activation:jakarta.activation:2.0.1" level="project" />
<orderEntry type="library" name="Maven: org.glassfish.jaxb:jaxb-core:3.0.2" level="project" />
<orderEntry type="library" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:3.0.1" level="project" />
<orderEntry type="library" name="Maven: org.glassfish.jaxb:txw2:3.0.2" level="project" />
<orderEntry type="library" name="Maven: com.sun.istack:istack-commons-runtime:4.0.1" level="project" />
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.70" level="project" />
<orderEntry type="library" name="Maven: org.jacoco:org.jacoco.agent:runtime:0.8.8" level="project" />
<orderEntry type="library" name="Maven: org.ini4j:ini4j:0.5.4" level="project" />
<orderEntry type="library" name="Maven: io.opentracing:opentracing-api:0.33.0" level="project" />
<orderEntry type="library" name="Maven: io.opentracing:opentracing-util:0.33.0" level="project" />
<orderEntry type="library" name="Maven: io.opentracing:opentracing-noop:0.33.0" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:aliyun-java-sdk-dysmsapi:2.2.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-core:2.19.0" level="project" />
<orderEntry type="library" name="Maven: de.ruedigermoeller:fst:2.43" level="project" />
<orderEntry type="library" name="Maven: org.javassist:javassist:3.19.0-GA" level="project" />
<orderEntry type="library" name="Maven: org.objenesis:objenesis:2.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.19.0" level="project" />
<orderEntry type="library" name="Maven: org.web3j:core:5.0.0" level="project" />
<orderEntry type="library" name="Maven: org.web3j:abi:5.0.0" level="project" />
<orderEntry type="library" name="Maven: org.web3j:utils:5.0.0" level="project" />
<orderEntry type="library" name="Maven: org.web3j:crypto:5.0.0" level="project" />
<orderEntry type="library" name="Maven: org.web3j:rlp:5.0.0" level="project" />
<orderEntry type="library" name="Maven: org.web3j:tuples:5.0.0" level="project" />
<orderEntry type="library" name="Maven: com.github.jnr:jnr-unixsocket:0.21" level="project" />
<orderEntry type="library" name="Maven: com.github.jnr:jnr-ffi:2.1.9" level="project" />
<orderEntry type="library" name="Maven: com.github.jnr:jffi:1.2.17" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.github.jnr:jffi:native:1.2.16" level="project" />
<orderEntry type="library" name="Maven: org.ow2.asm:asm:5.0.3" level="project" />
<orderEntry type="library" name="Maven: org.ow2.asm:asm-commons:5.0.3" level="project" />
<orderEntry type="library" name="Maven: org.ow2.asm:asm-analysis:5.0.3" level="project" />
<orderEntry type="library" name="Maven: org.ow2.asm:asm-tree:5.0.3" level="project" />
<orderEntry type="library" name="Maven: org.ow2.asm:asm-util:5.0.3" level="project" />
<orderEntry type="library" name="Maven: com.github.jnr:jnr-a64asm:1.0.0" level="project" />
<orderEntry type="library" name="Maven: com.github.jnr:jnr-x86asm:1.0.2" level="project" />
<orderEntry type="library" name="Maven: com.github.jnr:jnr-constants:0.9.11" level="project" />
<orderEntry type="library" name="Maven: com.github.jnr:jnr-enxio:0.19" level="project" />
<orderEntry type="library" name="Maven: com.github.jnr:jnr-posix:3.0.47" level="project" />
<orderEntry type="library" name="Maven: com.squareup.okhttp3:logging-interceptor:4.3.1" level="project" />
<orderEntry type="library" name="Maven: io.reactivex.rxjava2:rxjava:2.2.2" level="project" />
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.2" level="project" />
<orderEntry type="library" name="Maven: org.java-websocket:Java-WebSocket:1.3.8" level="project" />
<orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:4.10.0" level="project" />
<orderEntry type="library" name="Maven: com.squareup.okio:okio-jvm:3.0.0" level="project" />
<orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31" level="project" />
<orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.31" level="project" />
<orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib-common:1.5.31" level="project" />
<orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib:1.6.20" level="project" />
<orderEntry type="library" name="Maven: org.jetbrains:annotations:13.0" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-simple:1.7.36" level="project" />
<orderEntry type="library" name="Maven: org.apache.rocketmq:rocketmq-client:4.9.4" level="project" />
<orderEntry type="library" name="Maven: org.apache.rocketmq:rocketmq-common:4.9.4" level="project" />
<orderEntry type="library" name="Maven: org.apache.rocketmq:rocketmq-remoting:4.9.4" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-all:4.1.65.Final" level="project" />
<orderEntry type="library" name="Maven: org.apache.rocketmq:rocketmq-logging:4.9.4" level="project" />
<orderEntry type="library" name="Maven: commons-validator:commons-validator:1.7" level="project" />
<orderEntry type="library" name="Maven: commons-digester:commons-digester:2.1" level="project" />
<orderEntry type="library" name="Maven: com.github.luben:zstd-jni:1.5.2-2" level="project" />
<orderEntry type="library" name="Maven: org.lz4:lz4-java:1.8.0" level="project" />
</component>
</module>

@ -4,24 +4,8 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>dsideal</groupId>
<artifactId>ZhuangJiaBingProject</artifactId>
<artifactId>YangPuBaoMing</artifactId>
<version>1.0-SNAPSHOT</version>
<!--https://blog.csdn.net/duchao123duchao/article/details/71480106-->
<!-- 使用阿里 maven 库 -->
<repositories>
<repository>
<id>ali-maven</id>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</snapshots>
</repository>
</repositories>
<!--使用jdk1.8进行编译-->
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
@ -29,6 +13,28 @@
</properties>
<dependencies>
<!--引用本地jar包-->
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-words</artifactId>
<version>20.12</version>
<scope>system</scope> <!--system类似provided需要显式提供依赖的jar以后Maven就不会在Repository中查找它-->
<systemPath>${project.basedir}/ExtendJar/aspose-words-20.12-jdk17-crack.jar</systemPath>
</dependency>
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-cells</artifactId>
<version>20.7</version>
<scope>system</scope>
<systemPath>${project.basedir}/ExtendJar/aspose-cells-20.7-crack.jar</systemPath>
</dependency>
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose.slides</artifactId>
<version>19.3</version>
<scope>system</scope>
<systemPath>${project.basedir}/ExtendJar/aspose.slides-19.3.jar</systemPath>
</dependency>
<!--jfinal主框架-->
<dependency>
<groupId>com.jfinal</groupId>

@ -20,7 +20,6 @@ import com.dsideal.FengHuang.TeacherYd.Controller.TeacherYdController;
import com.dsideal.FengHuang.Util.FileUtil;
import com.dsideal.FengHuang.Util.LogBackLogFactory;
import com.dsideal.FengHuang.Util.PkUtil;
import com.dsideal.FengHuang.Zjb.Controller.ZjbController;
import com.jfinal.config.*;
import com.jfinal.kit.PropKit;
import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
@ -83,8 +82,6 @@ public class Start extends JFinalConfig {
me.add("/studentYd", StudentYdController.class);
//菜单管理
me.add("/menu", MenuController.class);
//装甲兵
me.add("/zjb", ZjbController.class);
// 配置Swagger UI访问路由
// http://127.0.0.1:9000/FengHuang/swagger/index

@ -1,142 +0,0 @@
package com.dsideal.FengHuang.Zjb.Controller;
import Backup.BackupAll;
import com.dsideal.FengHuang.Interceptor.EmptyInterface;
import com.dsideal.FengHuang.Interceptor.IsNumericInterface;
import com.dsideal.FengHuang.Util.CommonUtil;
import com.dsideal.FengHuang.Zjb.Model.ZjbModel;
import com.jfinal.aop.Before;
import com.jfinal.core.Controller;
import com.jfinal.ext.interceptor.GET;
import com.jfinal.ext.interceptor.POST;
import com.jfinal.kit.Kv;
import com.jfinal.kit.PathKit;
import com.jfinal.kit.StrKit;
import com.jfinal.plugin.activerecord.Record;
import com.jfinal.upload.UploadFile;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.util.List;
import java.util.UUID;
public class ZjbController extends Controller {
ZjbModel zm = new ZjbModel();
private static Logger log = LoggerFactory.getLogger(ZjbController.class);
@Before({POST.class})
@IsNumericInterface({"module_id", "page"})
public void saveModulePage(int module_id, int page, String json) {
zm.saveModulePage(module_id, page, json);
renderJson(CommonUtil.returnMessageJson(true, "保存成功!"));
}
@Before({POST.class})
@IsNumericInterface({"task_id", "page"})
public void saveFillPage(int task_id, int page, String json) {
zm.saveFillPage(task_id, page, json);
renderJson(CommonUtil.returnMessageJson(true, "保存成功!"));
}
@Before({GET.class})
@IsNumericInterface({"module_id", "page"})
public void getModulePage(int module_id, int page) {
String json = zm.getModulePage(module_id, page);
renderJson(json);
}
@Before({GET.class})
@IsNumericInterface({"task_id", "page"})
public void getTaskPage(int task_id, int page) {
String json = zm.getTaskPage(task_id, page);
renderJson(json);
}
@Before({GET.class})
@IsNumericInterface({"module_id"})
public void getModulePageFillInfo(int module_id) {
List<Record> list = zm.getModulePageFillInfo(module_id);
renderJson(CommonUtil.renderJsonForLayUI(list));
}
@Before({GET.class})
@IsNumericInterface({"task_id"})
public void getTaskPageFillInfo(int task_id) {
List<Record> list = zm.getTaskPageFillInfo(task_id);
renderJson(CommonUtil.renderJsonForLayUI(list));
}
@Before({POST.class})
@IsNumericInterface({"task_id", "page"})
public void upload(int task_id, int page, String upload_id) {
if (StrKit.isBlank(upload_id)) {
renderJson(CommonUtil.returnMessageJson(false, "传入的参数upload_id为空"));
log.error("传入的参数upload_id为空");
return;
}
UploadFile uploadFile = getFile();//得到 文件对象
String fileName = uploadFile.getFileName();
//获取上传文件的文件流
File file = uploadFile.getFile();
String suffix = fileName.substring(fileName.lastIndexOf(".") + 1).trim();
File target = new File(PathKit.getWebRootPath() + "/upload/" + UUID.randomUUID() + "." + suffix);
file.renameTo(target);
zm.saveUploadFile(task_id, page, upload_id, target.getName());
renderJson(CommonUtil.returnMessageJson(true, "上传成功!"));
}
@Before({POST.class})
@IsNumericInterface({"task_id", "page"})
public void clearUpload(int task_id, int page) {
zm.clearUpload(task_id, page);
renderJson(CommonUtil.returnMessageJson(true, "清除成功!"));
}
@Before({POST.class})
@IsNumericInterface({"module_id", "page"})
public void uploadDoc(int module_id, int page) {
UploadFile uploadFile = getFile();
String fileName = uploadFile.getFileName();
File file = uploadFile.getFile();
String suffix = fileName.substring(fileName.lastIndexOf(".") + 1).trim();
File target = new File(PathKit.getWebRootPath() + "/upload/" + UUID.randomUUID() + "." + suffix);
file.renameTo(target);
zm.saveDoc(module_id, page, target.getName());
renderJson(CommonUtil.returnMessageJson(true, "上传成功!"));
}
@Before({GET.class})
public void getTreeData() {
List<Record> list = zm.getTreeData();
renderJson(list);
}
@Before({POST.class})
public void saveTreeNode(int level_id, int parent_id, String name, int sort_id) {
zm.saveTreeNode(level_id, parent_id, name, sort_id);
renderJson(CommonUtil.returnMessageJson(true, "保存成功!"));
}
@Before({POST.class})
public void deleteNode(int id) {
zm.deleteNode(id);
renderJson(CommonUtil.returnMessageJson(true, "删除成功!"));
}
@Before({POST.class})
public void updateTreeNode(int id, String name,int sort_id) {
zm.updateTreeNode(id, name,sort_id);
renderJson(CommonUtil.returnMessageJson(true, "保存成功!"));
}
@Before({GET.class})
public void getTreeNode(int id) {
Record record = zm.getTreeNode(id);
Kv kv = Kv.create();
kv.set("success", true);
kv.set("name", record.getStr("name"));
kv.set("sort_id", record.getInt("sort_id"));
renderJson(kv);
}
}

@ -1,208 +0,0 @@
package com.dsideal.FengHuang.Zjb.Model;
import cn.hutool.core.date.DateTime;
import com.dsideal.FengHuang.LoginPerson.Model.LoginPersonModel;
import com.dsideal.FengHuang.Util.CommonUtil;
import com.dsideal.FengHuang.Util.IpUtil;
import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Page;
import com.jfinal.plugin.activerecord.Record;
import com.jfinal.plugin.activerecord.SqlPara;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ZjbModel {
/*
*/
public void delModulePage(int module_id, int page) {
String sql = "delete from t_zjb_module_page where module_id=? and page=?";
Db.update(sql, module_id, page);
}
public void delFillPage(int task_id, int page) {
String sql = "delete from t_zjb_task_fill where task_id=? and page=?";
Db.update(sql, task_id, page);
}
/*
2022-12-26
*/
public void saveModulePage(int module_id, int page, String json) {
delModulePage(module_id, page);
Record record = new Record();
record.set("module_id", module_id);
record.set("page", page);
record.set("json", json);
Db.save("t_zjb_module_page", "module_id,page", record);
}
public void saveFillPage(int task_id, int page, String json) {
delFillPage(task_id, page);
Record record = new Record();
record.set("task_id", task_id);
Record rTask = getTaskInfo(task_id);
int module_id = rTask.getInt("module_id");
record.set("module_id", module_id);
record.set("page", page);
record.set("json", json);
record.set("create_time", DateTime.now());
Db.save("t_zjb_task_fill", "task_id,page", record);
}
/*
JSON
*/
public String getModulePage(int module_id, int page) {
String sql = "select json from t_zjb_module_page where module_id=? and page=?";
List<Record> list = Db.find(sql, module_id, page);
if (list.size() > 0) return list.get(0).getStr("json");
return "[]";
}
public String getTaskPage(int task_id, int page) {
String sql = "select json from t_zjb_task_fill where task_id=? and page=?";
List<Record> list = Db.find(sql, task_id, page);
if (list.size() > 0) return list.get(0).getStr("json");
//直接获取原始模板json进行显示
Record record = getTaskInfo(task_id);
return getModulePage(record.getInt("module_id"), page);
}
public Record getMoudleInfo(int module_id) {
String sql = "select * from t_zjb_module where module_id=?";
return Db.findFirst(sql, module_id);
}
public List<Record> getModulePageFillInfo(int module_id) {
String sql = "select * from t_zjb_module_page where module_id=?";
List<Record> exist = Db.find(sql, module_id);
Map<Integer, String> _map = new HashMap<>();
Map<Integer, String> _map2 = new HashMap<>();
for (Record record : exist) {
_map.put(record.getInt("page"), record.getStr("json"));
_map2.put(record.getInt("page"), record.getStr("doc_file"));
}
Record record = getMoudleInfo(module_id);
int page_count = record.getInt("page_count");
List<Record> res = new ArrayList<>();
for (int i = 1; i <= page_count; i++) {
Record r = new Record();
r.set("page", i);
if (_map.containsKey(i)) {
r.set("json", _map.get(i));
r.set("filled", true);
} else {
r.set("json", "[]");
r.set("filled", false);
}
r.set("doc_file", _map2.get(i));
res.add(r);
}
return res;
}
public Record getTaskInfo(int task_id) {
return Db.findById("t_zjb_task", "task_id", task_id);
}
public List<Record> getTaskPageFillInfo(int task_id) {
Record rTask = getTaskInfo(task_id);
int module_id = rTask.getInt("module_id");
Record record = getMoudleInfo(module_id);
int page_count = record.getInt("page_count");
String sql = "select * from t_zjb_task_fill where task_id=?";
List<Record> exist = Db.find(sql, task_id);
Map<Integer, String> _map = new HashMap<>();
for (Record r1 : exist) {
_map.put(r1.getInt("page"), r1.getStr("json"));
}
//模板的填充完成情况
sql = "select * from t_zjb_module_page where module_id=?";
List<Record> listModuleFinish = Db.find(sql, module_id);
Map<Integer, String> _mapModuleFinish = new HashMap<>();
for (Record r2 : listModuleFinish) {
_mapModuleFinish.put(r2.getInt("page"), r2.getStr("json"));
}
List<Record> res = new ArrayList<>();
for (int i = 1; i <= page_count; i++) {
Record r = new Record();
r.set("page", i);
r.set("module_id", module_id);
if (_map.containsKey(i)) {
r.set("json", _map.get(i));
r.set("page_finish", true);
} else {
r.set("json", "[]");
r.set("page_finish", false);
}
if (_mapModuleFinish.containsKey(i)) {
r.set("module_finish", true);
} else {
r.set("module_finish", false);
}
res.add(r);
}
return res;
}
public void saveUploadFile(int task_id, int page, String upload_id, String file_name) {
Record record = new Record();
record.set("task_id", task_id);
record.set("page", page);
record.set("upload_id", upload_id);
record.set("file_name", file_name);
Db.save("t_zjb_task_fill_upload", "task_id,page,upload_id,file_name", record);
}
public void saveDoc(int module_id, int page, String doc_file) {
String sql = "update t_zjb_module_page set doc_file=? where module_id=? and page=?";
Db.update(sql, doc_file, module_id, page);
}
public void clearUpload(int task_id, int page) {
String sql = "delete from t_zjb_task_fill_upload where task_id=? and page=?";
Db.update(sql, task_id, page);
}
public List<Record> getTreeData() {
String sql = "select t1.id,t1.name,t1.parent_id as pId,t1.sort_id,t1.level_id,true as open,(select count(1) from t_zjb_tree as t2 where t1.id=t2.parent_id) as childCount from t_zjb_tree as t1 order by sort_id";
return Db.find(sql);
}
public void deleteNode(int id) {
Db.deleteById("t_zjb_tree", "id", id);
}
public void saveTreeNode(int level_id, int parent_id, String name,int sort_id) {
Record record = new Record();
record.set("name", name);
record.set("level_id", level_id + 1);
record.set("parent_id", parent_id);
record.set("sort_id",sort_id);
Db.save("t_zjb_tree", "id", record);
}
public void updateTreeNode(int id, String name,int sort_id) {
Record record = getTreeNode(id);
record.set("name", name);
record.set("sort_id",sort_id);
Db.update("t_zjb_tree", "id", record);
}
public Record getTreeNode(int id) {
Record record = Db.findById("t_zjb_tree", "id", id);
return record;
}
}

@ -1,17 +0,0 @@
#namespace("TouPiao")
#sql("TongJi")
select *,format(1.0 * ta.pingweihui_count /#(PingWeiHuiAllCount) *10 + 1.0*ta.qunzhong_count/#(QunZhongAllCount) *15,1) as score
from (select t1.houxuanren_tel,t1.houxuanren_name,t1.houxuanren_type_id,
(select count(1) from t_toupiao_result as t2 where t2.toupiaoren_type_id=1 and t1.houxuanren_tel=t2.houxuanren_tel) as pingweihui_count,
(select count(1) from t_toupiao_result as t2 where t2.toupiaoren_type_id=2 and t1.houxuanren_tel=t2.houxuanren_tel) as qunzhong_count
from t_toupiao_houxuanren as t1) as ta where ta.houxuanren_type_id=#(houxuanren_type_id)
order by 1.0 * ta.pingweihui_count /#(PingWeiHuiAllCount) *10 + 1.0*ta.qunzhong_count/#(QunZhongAllCount) *15 desc
#end
#sql("getTouPiaoInfo")
select toupiaoren_tel,toupiaoren_name,toupiaoren_type_id,(
select count(1) as c from t_toupiao_result as t2 where t2.toupiaoren_tel=t1.toupiaoren_tel
) as c from t_toupiao_toupiaoren as t1 order by toupiaoren_type_id,c desc
#end
#end

@ -1,521 +0,0 @@
-- 命名空间
#namespace("Gtzz")
-- 获取指定步骤的项目列表(待办) max()...group by 只显示同一个项目+步骤CODE的最后一条
#sql("getToDoStepList")
select '#(person_id)' as operator_id,progress_id,subject_id,subject_name,org_code,subject_type_id,subject_type_name,
step_code,step_name,action_bureau,year,check_status,is_current,begin_time,
task_number,data_type,is_back_log,lixiang_time,org_name as xmdw
from t_gtzz_progress as ta where is_finish_flag <3 and progress_id in
(
select max(progress_id) from t_gtzz_progress where step_code in
(
#for(id:step_codes)
#(for.index > 0 ? ", " : "") '#(id)'
#end
)
and is_current = #(is_current)
#if(org_code)
and org_code='#(org_code)'
#end
#if(keyword)
and ((subject_name like '%#(keyword)%') or (task_number like '%#(keyword)%') or (org_name like '%#(keyword)%'))
#end
#if(begin_date)
and lixiang_time >= '#(begin_date)'
#end
#if(end_date)
and lixiang_time <= '#(end_date)'
#end
-- 专家
#if(expert_person_id)
and subject_id in (select subject_id from t_gtzz_subject_expert where progress_id=0 and step_code in
(
#for(id:step_codes)
#(for.index > 0 ? ", " : "") '#(id)'
#end
)
and person_id='#(expert_person_id)')
#end
-- 监理
#if(jianli_person_id)
and subject_id in (select subject_id from t_gtzz_subject_jianli where step_code in
(
#for(id:step_codes)
#(for.index > 0 ? ", " : "") '#(id)'
#end
)
and person_id='#(jianli_person_id)')
#end
-- 已上报,不显示退回
#if(is_current==0)
and check_status<>2
#end
group by subject_id, step_code
) order by progress_id desc
#end
-- 哪些步骤有上传附件的需要
#sql("getStepDocument")
select t1.step_code,t1.type_id,t2.type_name from t_gtzz_step_document as t1
inner join t_gtzz_document_type as t2 on t1.type_id=t2.type_id
where 1=1
#if(step_code)
and t1.step_code='#(step_code)'
#end
#end
-- 获取指定项目的详细信息
#sql("getSubjectExtInfo")
-- pay_flag:第二阶段业务完成标记(项目资金支付)0未完成 1完成
-- use_flag:项目启用废除标记0废除,1启用
-- delete_flag 删除标记0有效 1删除
-- task_type: 0培训 1新建 2维修 3绿化 4校园文化 5软件平台 6 购买服务 7安全 8装备
-- 数据类型0-新建 1-支付 2-续拨)
-- process_node_id: 流程节点id
-- process_node_name: 流程节点名称
select t1.sn,(select parent_name from t_pro_detail where task_sn=t1.sn limit 1) as subject_type_name,t1.task_number,t1.task_title,t1.task_year,t1.ex_send_org_name,t1.pay_flag,t1.use_flag,t1.delete_flag,t1.task_type,t1.create_time,t1.data_type,t1.process_node_id,t1.process_node_name,
t2.itemvalue11 as xmjj, -- 项目简介
t2.itemValue20 as ztz, -- 总投资
t2.itemValue47 as zbj, -- 中标价(合同金额)
t2.itemValue20211 as pfje2021, -- 批复金额2021
t2.itemValue20221 as pfje2022, -- 批复金额2022
t2.itemValue20231 as pfje2023, -- 批复金额2023
t2.itemValue20241 as pfje2024, -- 批复金额2024
t2.itemValue20251 as pfje2025 -- 批复金额2025
from t_pro_task as t1 left join t_pro_form_value as t2 on t2.task_sn=t1.sn
where t1.sn='#(task_sn)'
#end
-- 填充项目数据
#sql("fillSubject")
select t1.sn,t1.task_number,t1.task_title,t1.task_year,t1.ex_send_org_name,t1.task_type as subject_type_id ,
t3.subject_type_name, t3.subject_type_name,t1.create_time
from t_pro_task as t1
left join t_pro_form_value as t2 on t2.task_sn=t1.sn
left join t_gtzz_subject_type as t3 on t1.task_type=t3.subject_type_id
where
-- 只关心市直属学校的数据
t1.ex_send_org_name in (select org_name from t_gtzz_school)
-- 立项通过,审批完成
and t1.use_flag=1 and t1.draft_flag=0 and t1.close_flag=1 and t1.data_type=0
-- 按申报时间倒序
order by t1.create_time desc
#end
-- 获取项目财务审批流水
#sql("getSubjectPreInfo")
select handle_node_name,receive_user_name as send_user_name,msg_title, handle_opinion,create_time,modify_time
from t_pro_message where task_sn='#(task_sn)' and DELETE_FLAG=0 order by create_time
#end
-- 获取指定年份的项目查询列表
#sql("getXmxcList")
select * from t_gtzz_progress where progress_id in
(select max(progress_id) from t_gtzz_progress group by subject_id)
#if(year)
and year=#(year)
#end
#if(org_code)
and org_code='#(org_code)'
#end
#if(year)
and year='#(year)'
#end
#if(subject_type_id)
and subject_type_id=#(subject_type_id)
#end
#if(keyword)
and subject_name like '%#(keyword)%'
#end
and step_code like '#(step_code)%' order by begin_time desc
#end
-- 获取符合条件的专家列表
#sql("getExpertList")
select t1.*,
(select group_concat(zc_name) from t_gtzz_expert_domain as t2 where t1.person_id=t2.person_id group by t2.zc_id) zc_name
from t_gtzz_expert as t1 where b_use=1
#if(keyword)
and t1.person_name like '%#(keyword)%'
#end
#if(zc_id)
and t1.person_id in (select person_id from t_gtzz_expert_domain where zc_id=#(zc_id))
#end
order by t1.bureau_name,t1.person_name
#end
-- 项目查询列表之专家分配
#sql("getSubjectListForSettingExpert")
select * from (
select t1.*,
(select count(1) from t_gtzz_subject_expert as t2 where t1.subject_id=t2.subject_id and t2.step_code='#(step_code)' and t2.progress_id=0) as zj_count,
(select count(1) from t_gtzz_progress as t2 where t1.subject_id=t2.subject_id and t2.step_code='#(end_step_code)' ) as can_update
from t_gtzz_subject as t1 where
subject_id in (select subject_id from t_gtzz_progress where
step_code>='#(start_step_code)' and step_code<='#(end_step_code)'
#if(not_setting_zj)
and is_current=1
#end
)
#if(data_type)
and t1.data_type=#(data_type)
#end
#if(begin_date)
and t1.lixiang_time between '#(begin_date)' and '#(end_date)'
#end
#if(keyword)
and (t1.xmmc like '%#(keyword)%' or t1.xmdw like '%#(keyword)%' or t1.task_number like '%#(keyword)%')
#end
order by t1.lixiang_time
) as ta where 1=1
#if(setting_zj)
and ta.zj_count>0
#end
#if(not_setting_zj)
and ta.zj_count=0
#end
#end
-- 项目查询列表之监理公司分配
#sql("getFenPeiJianLiList")
select * from (
select t1.*,
(select progress_id from t_gtzz_progress as t2 where t1.subject_id=t2.subject_id order by progress_id desc limit 1 ) as progress_id,
(select max(step_code) from t_gtzz_progress as t2 where t2.subject_id=t1.subject_id) as last_step_code,
(select count(1) from t_gtzz_subject_jianli as t2 where t1.subject_id=t2.subject_id and t2.step_code='#(step_code)' and t2.person_id='-1') as no_need_jl,
(select count(1) from t_gtzz_subject_jianli as t2 where t1.subject_id=t2.subject_id and t2.step_code='#(step_code)') as jl_count,
(select count(1) from t_gtzz_progress as t2 where t1.subject_id=t2.subject_id and t2.step_code='#(end_step_code)') as can_update
from t_gtzz_subject as t1 where t1.bureau_id='#(bureau_id)'
#if(data_type)
and t1.data_type=#(data_type)
#end
#if(begin_date)
and t1.lixiang_time between '#(begin_date)' and '#(end_date)'
#end
#if(keyword)
and (t1.xmmc like '%#(keyword)%' or t1.xmdw like '%#(keyword)%' or t1.task_number like '%#(keyword)%' )
#end
) as ta where last_step_code>='0206'
#if(setting_jl)
and ta.jl_count>0
#end
#if(not_setting_jl)
and ta.jl_count=0
#end
order by ta.progress_id desc
#end
-- 获取指定处理流水中指定流水号的上传文件类型列表
#sql("getProgressIdDocTypeList")
select ta.document_type_id,count(1) as c from
(select t1.progress_id,t2.* from t_gtzz_progress_file as t1 inner join t_gtzz_file as t2 on t1.file_id=t2.file_id) as ta
where ta.progress_id=#(progress_id) group by ta.document_type_id
#end
-- 综合查询(项目)
#sql("querySubject")
select t1.*,
(select progress_id from t_gtzz_progress where subject_id=t1.subject_id order by progress_id desc limit 1) as progress_id,
(select step_code from t_gtzz_progress where subject_id=t1.subject_id order by progress_id desc limit 1) as step_code
from t_gtzz_subject as t1 where 1=1
#if(keyword)
and (t1.xmmc like '%#(keyword)%' or t1.task_number like '%#(keyword)%')
#end
#if(subject_type_ids)
and t1.subject_type_id in
(
#for(id:subject_type_ids)
#(for.index > 0 ? ", " : "") '#(id)'
#end
)
#end
#if(org_code)
and t1.org_code='#(org_code)'
#end
#if(begin_date)
and (t1.lixiang_time between '#(begin_date)' and '#(end_date)')
#end
#if(data_type)
and t1.data_type=#(data_type)
#end
#if(sbnd)
and t1.sbnd=#(sbnd)
#end
#if(step_code)
and t1.subject_id in (select subject_id from t_gtzz_progress where is_current=#(is_current) and step_code like '#(step_code)%')
#end
#end
-- 综合查询(项目关闭)
#sql("querySubjectForClose")
select *,
(select progress_id from t_gtzz_progress where subject_id=t1.subject_id order by progress_id desc limit 1) as progress_id,
(select step_code from t_gtzz_progress where subject_id=t1.subject_id order by progress_id desc limit 1) as step_code,
(select is_finish_flag from t_gtzz_progress where subject_id=t1.subject_id order by progress_id desc limit 1) as is_finish_flag
from t_gtzz_subject as t1
where 1=1
#if(keyword)
and (t1.xmmc like '%#(keyword)%' or t1.task_number like '%#(keyword)%')
#end
#if(subject_type_ids)
and t1.subject_type_id in
(
#for(id:subject_type_ids)
#(for.index > 0 ? ", " : "") '#(id)'
#end
)
#end
#if(org_code)
and t1.org_code='#(org_code)'
#end
#if(begin_date)
and (t1.lixiang_time between '#(begin_date)' and '#(end_date)')
#end
#if(data_type)
and t1.data_type=#(data_type)
#end
#if(sbnd)
and t1.sbnd=#(sbnd)
#end
and (select t2.is_finish_flag from t_gtzz_progress as t2 where t2.subject_id=t1.subject_id order by t2.progress_id desc limit 1)=2
#end
-- 综合查询(文件)
#sql("queryFile")
select t2.*,t3.*,concat('/FengHuang/upload/',t2.file_id,'.', t2.suffix) as url from t_gtzz_progress_file as t1 inner join t_gtzz_file as t2 on t1.file_id=t2.file_id
inner join t_gtzz_progress as t3 on t1.progress_id=t3.progress_id
where 1=1
#if(keyword)
and((t3.subject_name like '%#(keyword)%') or (t3.task_number like '%#(keyword)%'))
#end
#if(document_type_ids)
and t2.document_type_id in
(
#for(id:document_type_ids)
#(for.index > 0 ? ", " : "") '#(id)'
#end
)
#end
#if(subject_type_ids)
and t3.subject_type_id in
(
#for(id:subject_type_ids)
#(for.index > 0 ? ", " : "") '#(id)'
#end
)
#end
#if(org_code)
and t1.org_code='#(org_code)'
#end
#if(begin_date)
and t2.update_ts between '#(begin_date)' and '#(end_date)'
#end
#if(data_type)
and t3.data_type=#(data_type)
#end
#if(sbnd)
and t3.year=#(sbnd)
#end
#if(step_code)
and t3.step_code like '#(step_code)%'
#end
#end
-- 四个阶段的统计信息(市、校两级兼容)
#sql("tjTopFourStep")
select
(select count(1) from t_gtzz_sy_laststep where year=year(now())-1
#if(org_code)
and org_code='#(org_code)'
#end
) as xmlx,
(select count(1) from t_gtzz_sy_laststep where year=year(now())-1
#if(org_code)
and org_code='#(org_code)'
#end
and step_code like '02%') as zbcg,
(select count(1) from t_gtzz_sy_laststep where year=year(now())-1
#if(org_code)
and org_code='#(org_code)'
#end
and is_finish_flag=0 and step_code like '03%') as ssys,
(select count(1) from t_gtzz_sy_laststep where year=year(now())-1
#if(org_code)
and org_code='#(org_code)'
#end
and is_finish_flag=1) as xmbf
#end
-- 今年项目概览(市专用)
#sql("tjSubjectSummaryCurrentYear")
select sum(subject_count) as subject_count,
sum(finish_count) as finish_count,
sum(close_count) as close_count,
sum(jz_count) as jz_count,
sum(yq_count) as yq_count,
ROUND(sum(money),2) as money
from t_gtzz_sy_base_year where year=year(now())-1
#end
-- 逾期提醒(市、校两级兼容)
#sql("tjYqList")
select * from t_gtzz_sy_laststep where 1=1
#if(org_code)
and org_code='#(org_code)'
#end
and yq_count>0;
#end
-- 项目待办(市、校两级兼容)
#sql("tjSubjectWaitStep")
select t1.step_code,t1.step_name,ifnull(t2.count,0) as count from t_gtzz_step as t1 left join (
select step_code,count(1) as count from t_gtzz_sy_laststep
where is_current=1 and is_finish_flag<3
#if(org_code)
and org_code='#(org_code)'
#end
group by step_code) as t2 on t1.step_code=t2.step_code where (t1.step_code like '02%' or t1.step_code like '03%')
#end
-- 今年项目分布(市专用) -- year=year(now())
#sql("tjFenBu")
select * from
(
select org_code,org_name,sum(subject_count) as subject_count,sum(finish_count) as finish_count,
sum(close_count) as close_count,
sum(jz_count) as jz_count,
sum(yq_count) as yq_count,
ROUND(sum(money),2) as money
from t_gtzz_sy_base_year where year=year(now())-1
group by org_code,org_name
) as ta order by ta.subject_count desc,money desc,finish_count desc
#end
-- 项目进展(学校专用)
#sql("tjxmJz")
select id,year,subject_id,subject_name,date_format(lixiang_time, '%Y-%m-%d') as lixiang_time,step_code,step_name,
step_order_id,big_step_name,
all_step_count,is_finish_flag,is_current,org_code,begin_time,end_time,duration,days_limit,
date_diff_count,create_time,yq_count from t_gtzz_sy_laststep where org_code='#(org_code)'
#end
-- 获取结转的项目列表
#sql("getJzList")
select max(progress_id) as progress_id,
subject_id,org_code,org_name,subject_name,subject_type_id,subject_type_name,
year,step_code,step_name,begin_time,end_time,action_bureau,input_value,radio_id,
is_current,is_back_log,is_finish_flag,check_status,lixiang_time,bxlx_name,cxlx_name,
jsfa_type_id,task_number,data_type,is_finish_time from t_gtzz_progress where org_code='#(org_code)'
and is_finish_flag=#(is_finish_flag)
group by subject_id order by progress_id
#end
-- 归档列表
#sql("getGdList")
select org_code,org_name, sum(subject_count) as subject_count, sum(finish_count) as finish_count,
sum(close_count) as close_count, sum(jz_count) as jz_count, sum(yq_count) as yq_count,ROUND(sum(money),2) as money
from t_gtzz_sy_base_year where 1=1
#if(year)
and year=#(year)
#end
#if(org_code)
and org_code='#(org_code)'
#end
group by org_code,org_name order by sum(subject_count) desc
#end
-- 获取监理项目列表
#sql("getJlSubjectList")
select * from (select t1.*,
ifnull((select count(distinct group_question_id) from t_gtzz_jianli_question as t2 where t2.subject_id=t1.subject_id),0) as question_count,
ifnull((select count(distinct group_question_id) from t_gtzz_jianli_question as t2 where t2.subject_id=t1.subject_id and t2.state_id=3),0) as finish_count,
(select t4.begin_time from t_gtzz_progress as t4 where t4.subject_id=t1.subject_id and t4.step_code='0301' and t4.progress_id<t1.progress_id
order by progress_id desc limit 1) as qd_time from t_gtzz_progress as t1 inner join t_gtzz_subject_jianli as t3 on t1.subject_id=t3.subject_id
where t3.person_id='#(person_id)' and t1.step_code='0302' and t1.is_current=#(is_current))
as ta where 1=1
#if(being_date)
and ta.qd_time >='#(being_date)' and ta.qd_time <='#(end_date) 23:59:59'
#end
#if(keyword)
and (ta.subject_name like '%#(keyword)%' or ta.org_name like '%#(keyword)%')
#end
order by ta.begin_time desc
#end
-- 获取指定项目的监理流水
#sql("getSubjectQuestion")
select t1.* from t_gtzz_jianli_question as t1 where t1.group_question_id=t1.progress_id
and t1.subject_id=#(subject_id)
#if(question_level_id)
and t1.question_level_id=#(question_level_id)
#end
#if(question_type_id)
and t1.question_type_id=#(question_type_id)
#end
#if(begin_date)
and t1.create_time between '#(begin_date)' and '#(end_date) 23:59:59'
#end
#if(state_id)
and t1.state_id=#(state_id)
#end
order by t1.progress_id desc
#end
-- ==========统计分析 ============================================================================================================================================
-- p_shouye_init_base_year
-- 插入单位数据
-- 刷新频率:项目变更+项目单位变更
-- 策略:项目变更时更新
#sql("insertBureauData")
insert into t_gtzz_sy_base_year(org_code,org_name,year)
select t1.org_code,t1.org_name,t2.year from t_gtzz_school as t1 cross join
(select distinct sbnd as year from t_gtzz_subject) as t2
#end
-- 按年度更新项目总数
-- 策略:项目变更时更新
#sql("updateProjectCountByYear")
update t_gtzz_sy_base_year as t1, (select org_code,sbnd,count(1) as subject_count from t_gtzz_subject group by org_code,sbnd) as t2
set t1.subject_count=t2.subject_count where t1.org_code=t2.org_code and t1.year=t2.sbnd;
#end
-- 按年度更新预算金额
#sql("updateMoneyByYear")
update t_gtzz_sy_base_year p,(select org_code,sbnd, sum(ifnull(money,0)) as money
from t_gtzz_subject group by org_code,sbnd) as s set p.money = s.money
where p.org_code = s.org_code and p.year=s.sbnd
#end
-- p_shouye_init_laststep
#sql("get_02_step_count")
select count(1) as c from (select step_order_id from t_gtzz_step where step_code like '02%' and LENGTH(step_code)=4 group by step_order_id ) as t1
#end
#sql("get_03_step_count")
select count(1) as c from (select step_order_id from t_gtzz_step where step_code like '03%' and LENGTH(step_code)=4 group by step_order_id ) as t1
#end
-- 按年度+单位查询完成个数、关闭个数、延期个数
#sql("getRefreshCountByYearOrgCode")
select t1.id, t1.year,t1.org_code,
(select count(distinct t2.subject_id) from t_gtzz_progress as t2 where t2.is_finish_flag=1 and t2.year=t1.year and t2.org_code=t1.org_code) as c1,
(select count(distinct t2.subject_id) from t_gtzz_progress as t2 where t2.is_finish_flag=2 and t2.year=t1.year and t2.org_code=t1.org_code) as c2,
(select ifnull(sum(t2.yq_count),0) from t_gtzz_sy_laststep as t2 where t2.year =t1.year and t2.org_code =t1.org_code) as c3
from t_gtzz_sy_base_year as t1
#end
-- 0:未完成项目流程1已完成项目流程2项目流程已取消,3:项目结转,本年结束,转入明年。
#sql("laststep_1")
insert into t_gtzz_sy_laststep(year,subject_id,step_code,is_finish_flag,is_current,org_code,begin_time,end_time,subject_name,lixiang_time)
select year,subject_id,step_code,is_finish_flag,is_current,org_code,begin_time,end_time,subject_name,lixiang_time from t_gtzz_progress where progress_id in
(select progress_id from (select max(progress_id),subject_id from t_gtzz_progress group by subject_id) as ta)
#end
-- 对于结束时间为空的,写入当前时间
#sql("laststep_2")
update t_gtzz_sy_laststep set end_time=now() where end_time is null
#end
-- 补充步骤名称和内部排序号
#sql("laststep_3")
update t_gtzz_sy_laststep as t1,t_gtzz_step as t2 set t1.step_name=t2.step_name,t1.days_limit=t2.days_limit where t1.step_code=t2.step_code
#end
#sql("laststep_4")
update t_gtzz_sy_laststep as t1,t_gtzz_step as t2 set t1.step_order_id=t2.in_order_id where t1.step_code=t2.step_code and t1.step_code like '02%'
#end
#sql("laststep_5")
update t_gtzz_sy_laststep as t1,t_gtzz_step as t2 set t1.step_order_id=#para(v_02_step_count)+t2.in_order_id where t1.step_code=t2.step_code and t1.step_code like '03%'
#end
-- 补充大类名称
-- 写入运行时长
-- 写入超时时长
#sql("laststep_6")
update t_gtzz_sy_laststep as t1 set t1.duration=datediff(end_time,begin_time),
t1.date_diff_count=days_limit-duration,
t1.big_step_name=(select step_name from t_gtzz_step as t2 where substr(t1.step_code,1,2)=t2.step_code),
t1.all_step_count=#para(v_02_step_count)+#para(v_03_step_count)
#end
#end

@ -2,7 +2,7 @@
driverClassName=com.mysql.cj.jdbc.Driver
user=root
password=DsideaL147258369
jdbcUrl=jdbc:mysql://10.10.14.169:22066/zjb_db?rewriteBatchedStatements=true&useUnicode=true&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
jdbcUrl=jdbc:mysql://10.10.14.169:22066/yangpu_db?rewriteBatchedStatements=true&useUnicode=true&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
# redis ip
redis_ip=10.10.14.169
# redis port

@ -2,8 +2,8 @@
undertow.devMode=true
undertow.port=9000
undertow.host=0.0.0.0
#undertow.resourcePath =/usr/local/tomcat8/webapps/ccZhiChengTouPiao,classpath:static
undertow.resourcePath =D:/dsWork/ZhuangJiaBing/WebRoot,classpath:static
#undertow.resourcePath =/usr/local/tomcat8/webapps/YangPuBaoMing,classpath:static
undertow.resourcePath =D:/dsWork/YangPuBaoMing/WebRoot,classpath:static
# 目录名称
undertow.contextPath=/FengHuang

@ -1,17 +0,0 @@
#namespace("TouPiao")
#sql("TongJi")
select *,format(1.0 * ta.pingweihui_count /#(PingWeiHuiAllCount) *10 + 1.0*ta.qunzhong_count/#(QunZhongAllCount) *15,1) as score
from (select t1.houxuanren_tel,t1.houxuanren_name,t1.houxuanren_type_id,
(select count(1) from t_toupiao_result as t2 where t2.toupiaoren_type_id=1 and t1.houxuanren_tel=t2.houxuanren_tel) as pingweihui_count,
(select count(1) from t_toupiao_result as t2 where t2.toupiaoren_type_id=2 and t1.houxuanren_tel=t2.houxuanren_tel) as qunzhong_count
from t_toupiao_houxuanren as t1) as ta where ta.houxuanren_type_id=#(houxuanren_type_id)
order by 1.0 * ta.pingweihui_count /#(PingWeiHuiAllCount) *10 + 1.0*ta.qunzhong_count/#(QunZhongAllCount) *15 desc
#end
#sql("getTouPiaoInfo")
select toupiaoren_tel,toupiaoren_name,toupiaoren_type_id,(
select count(1) as c from t_toupiao_result as t2 where t2.toupiaoren_tel=t1.toupiaoren_tel
) as c from t_toupiao_toupiaoren as t1 order by toupiaoren_type_id,c desc
#end
#end

@ -1,521 +0,0 @@
-- 命名空间
#namespace("Gtzz")
-- 获取指定步骤的项目列表(待办) max()...group by 只显示同一个项目+步骤CODE的最后一条
#sql("getToDoStepList")
select '#(person_id)' as operator_id,progress_id,subject_id,subject_name,org_code,subject_type_id,subject_type_name,
step_code,step_name,action_bureau,year,check_status,is_current,begin_time,
task_number,data_type,is_back_log,lixiang_time,org_name as xmdw
from t_gtzz_progress as ta where is_finish_flag <3 and progress_id in
(
select max(progress_id) from t_gtzz_progress where step_code in
(
#for(id:step_codes)
#(for.index > 0 ? ", " : "") '#(id)'
#end
)
and is_current = #(is_current)
#if(org_code)
and org_code='#(org_code)'
#end
#if(keyword)
and ((subject_name like '%#(keyword)%') or (task_number like '%#(keyword)%') or (org_name like '%#(keyword)%'))
#end
#if(begin_date)
and lixiang_time >= '#(begin_date)'
#end
#if(end_date)
and lixiang_time <= '#(end_date)'
#end
-- 专家
#if(expert_person_id)
and subject_id in (select subject_id from t_gtzz_subject_expert where progress_id=0 and step_code in
(
#for(id:step_codes)
#(for.index > 0 ? ", " : "") '#(id)'
#end
)
and person_id='#(expert_person_id)')
#end
-- 监理
#if(jianli_person_id)
and subject_id in (select subject_id from t_gtzz_subject_jianli where step_code in
(
#for(id:step_codes)
#(for.index > 0 ? ", " : "") '#(id)'
#end
)
and person_id='#(jianli_person_id)')
#end
-- 已上报,不显示退回
#if(is_current==0)
and check_status<>2
#end
group by subject_id, step_code
) order by progress_id desc
#end
-- 哪些步骤有上传附件的需要
#sql("getStepDocument")
select t1.step_code,t1.type_id,t2.type_name from t_gtzz_step_document as t1
inner join t_gtzz_document_type as t2 on t1.type_id=t2.type_id
where 1=1
#if(step_code)
and t1.step_code='#(step_code)'
#end
#end
-- 获取指定项目的详细信息
#sql("getSubjectExtInfo")
-- pay_flag:第二阶段业务完成标记(项目资金支付)0未完成 1完成
-- use_flag:项目启用废除标记0废除,1启用
-- delete_flag 删除标记0有效 1删除
-- task_type: 0培训 1新建 2维修 3绿化 4校园文化 5软件平台 6 购买服务 7安全 8装备
-- 数据类型0-新建 1-支付 2-续拨)
-- process_node_id: 流程节点id
-- process_node_name: 流程节点名称
select t1.sn,(select parent_name from t_pro_detail where task_sn=t1.sn limit 1) as subject_type_name,t1.task_number,t1.task_title,t1.task_year,t1.ex_send_org_name,t1.pay_flag,t1.use_flag,t1.delete_flag,t1.task_type,t1.create_time,t1.data_type,t1.process_node_id,t1.process_node_name,
t2.itemvalue11 as xmjj, -- 项目简介
t2.itemValue20 as ztz, -- 总投资
t2.itemValue47 as zbj, -- 中标价(合同金额)
t2.itemValue20211 as pfje2021, -- 批复金额2021
t2.itemValue20221 as pfje2022, -- 批复金额2022
t2.itemValue20231 as pfje2023, -- 批复金额2023
t2.itemValue20241 as pfje2024, -- 批复金额2024
t2.itemValue20251 as pfje2025 -- 批复金额2025
from t_pro_task as t1 left join t_pro_form_value as t2 on t2.task_sn=t1.sn
where t1.sn='#(task_sn)'
#end
-- 填充项目数据
#sql("fillSubject")
select t1.sn,t1.task_number,t1.task_title,t1.task_year,t1.ex_send_org_name,t1.task_type as subject_type_id ,
t3.subject_type_name, t3.subject_type_name,t1.create_time
from t_pro_task as t1
left join t_pro_form_value as t2 on t2.task_sn=t1.sn
left join t_gtzz_subject_type as t3 on t1.task_type=t3.subject_type_id
where
-- 只关心市直属学校的数据
t1.ex_send_org_name in (select org_name from t_gtzz_school)
-- 立项通过,审批完成
and t1.use_flag=1 and t1.draft_flag=0 and t1.close_flag=1 and t1.data_type=0
-- 按申报时间倒序
order by t1.create_time desc
#end
-- 获取项目财务审批流水
#sql("getSubjectPreInfo")
select handle_node_name,receive_user_name as send_user_name,msg_title, handle_opinion,create_time,modify_time
from t_pro_message where task_sn='#(task_sn)' and DELETE_FLAG=0 order by create_time
#end
-- 获取指定年份的项目查询列表
#sql("getXmxcList")
select * from t_gtzz_progress where progress_id in
(select max(progress_id) from t_gtzz_progress group by subject_id)
#if(year)
and year=#(year)
#end
#if(org_code)
and org_code='#(org_code)'
#end
#if(year)
and year='#(year)'
#end
#if(subject_type_id)
and subject_type_id=#(subject_type_id)
#end
#if(keyword)
and subject_name like '%#(keyword)%'
#end
and step_code like '#(step_code)%' order by begin_time desc
#end
-- 获取符合条件的专家列表
#sql("getExpertList")
select t1.*,
(select group_concat(zc_name) from t_gtzz_expert_domain as t2 where t1.person_id=t2.person_id group by t2.zc_id) zc_name
from t_gtzz_expert as t1 where b_use=1
#if(keyword)
and t1.person_name like '%#(keyword)%'
#end
#if(zc_id)
and t1.person_id in (select person_id from t_gtzz_expert_domain where zc_id=#(zc_id))
#end
order by t1.bureau_name,t1.person_name
#end
-- 项目查询列表之专家分配
#sql("getSubjectListForSettingExpert")
select * from (
select t1.*,
(select count(1) from t_gtzz_subject_expert as t2 where t1.subject_id=t2.subject_id and t2.step_code='#(step_code)' and t2.progress_id=0) as zj_count,
(select count(1) from t_gtzz_progress as t2 where t1.subject_id=t2.subject_id and t2.step_code='#(end_step_code)' ) as can_update
from t_gtzz_subject as t1 where
subject_id in (select subject_id from t_gtzz_progress where
step_code>='#(start_step_code)' and step_code<='#(end_step_code)'
#if(not_setting_zj)
and is_current=1
#end
)
#if(data_type)
and t1.data_type=#(data_type)
#end
#if(begin_date)
and t1.lixiang_time between '#(begin_date)' and '#(end_date)'
#end
#if(keyword)
and (t1.xmmc like '%#(keyword)%' or t1.xmdw like '%#(keyword)%' or t1.task_number like '%#(keyword)%')
#end
order by t1.lixiang_time
) as ta where 1=1
#if(setting_zj)
and ta.zj_count>0
#end
#if(not_setting_zj)
and ta.zj_count=0
#end
#end
-- 项目查询列表之监理公司分配
#sql("getFenPeiJianLiList")
select * from (
select t1.*,
(select progress_id from t_gtzz_progress as t2 where t1.subject_id=t2.subject_id order by progress_id desc limit 1 ) as progress_id,
(select max(step_code) from t_gtzz_progress as t2 where t2.subject_id=t1.subject_id) as last_step_code,
(select count(1) from t_gtzz_subject_jianli as t2 where t1.subject_id=t2.subject_id and t2.step_code='#(step_code)' and t2.person_id='-1') as no_need_jl,
(select count(1) from t_gtzz_subject_jianli as t2 where t1.subject_id=t2.subject_id and t2.step_code='#(step_code)') as jl_count,
(select count(1) from t_gtzz_progress as t2 where t1.subject_id=t2.subject_id and t2.step_code='#(end_step_code)') as can_update
from t_gtzz_subject as t1 where t1.bureau_id='#(bureau_id)'
#if(data_type)
and t1.data_type=#(data_type)
#end
#if(begin_date)
and t1.lixiang_time between '#(begin_date)' and '#(end_date)'
#end
#if(keyword)
and (t1.xmmc like '%#(keyword)%' or t1.xmdw like '%#(keyword)%' or t1.task_number like '%#(keyword)%' )
#end
) as ta where last_step_code>='0206'
#if(setting_jl)
and ta.jl_count>0
#end
#if(not_setting_jl)
and ta.jl_count=0
#end
order by ta.progress_id desc
#end
-- 获取指定处理流水中指定流水号的上传文件类型列表
#sql("getProgressIdDocTypeList")
select ta.document_type_id,count(1) as c from
(select t1.progress_id,t2.* from t_gtzz_progress_file as t1 inner join t_gtzz_file as t2 on t1.file_id=t2.file_id) as ta
where ta.progress_id=#(progress_id) group by ta.document_type_id
#end
-- 综合查询(项目)
#sql("querySubject")
select t1.*,
(select progress_id from t_gtzz_progress where subject_id=t1.subject_id order by progress_id desc limit 1) as progress_id,
(select step_code from t_gtzz_progress where subject_id=t1.subject_id order by progress_id desc limit 1) as step_code
from t_gtzz_subject as t1 where 1=1
#if(keyword)
and (t1.xmmc like '%#(keyword)%' or t1.task_number like '%#(keyword)%')
#end
#if(subject_type_ids)
and t1.subject_type_id in
(
#for(id:subject_type_ids)
#(for.index > 0 ? ", " : "") '#(id)'
#end
)
#end
#if(org_code)
and t1.org_code='#(org_code)'
#end
#if(begin_date)
and (t1.lixiang_time between '#(begin_date)' and '#(end_date)')
#end
#if(data_type)
and t1.data_type=#(data_type)
#end
#if(sbnd)
and t1.sbnd=#(sbnd)
#end
#if(step_code)
and t1.subject_id in (select subject_id from t_gtzz_progress where is_current=#(is_current) and step_code like '#(step_code)%')
#end
#end
-- 综合查询(项目关闭)
#sql("querySubjectForClose")
select *,
(select progress_id from t_gtzz_progress where subject_id=t1.subject_id order by progress_id desc limit 1) as progress_id,
(select step_code from t_gtzz_progress where subject_id=t1.subject_id order by progress_id desc limit 1) as step_code,
(select is_finish_flag from t_gtzz_progress where subject_id=t1.subject_id order by progress_id desc limit 1) as is_finish_flag
from t_gtzz_subject as t1
where 1=1
#if(keyword)
and (t1.xmmc like '%#(keyword)%' or t1.task_number like '%#(keyword)%')
#end
#if(subject_type_ids)
and t1.subject_type_id in
(
#for(id:subject_type_ids)
#(for.index > 0 ? ", " : "") '#(id)'
#end
)
#end
#if(org_code)
and t1.org_code='#(org_code)'
#end
#if(begin_date)
and (t1.lixiang_time between '#(begin_date)' and '#(end_date)')
#end
#if(data_type)
and t1.data_type=#(data_type)
#end
#if(sbnd)
and t1.sbnd=#(sbnd)
#end
and (select t2.is_finish_flag from t_gtzz_progress as t2 where t2.subject_id=t1.subject_id order by t2.progress_id desc limit 1)=2
#end
-- 综合查询(文件)
#sql("queryFile")
select t2.*,t3.*,concat('/FengHuang/upload/',t2.file_id,'.', t2.suffix) as url from t_gtzz_progress_file as t1 inner join t_gtzz_file as t2 on t1.file_id=t2.file_id
inner join t_gtzz_progress as t3 on t1.progress_id=t3.progress_id
where 1=1
#if(keyword)
and((t3.subject_name like '%#(keyword)%') or (t3.task_number like '%#(keyword)%'))
#end
#if(document_type_ids)
and t2.document_type_id in
(
#for(id:document_type_ids)
#(for.index > 0 ? ", " : "") '#(id)'
#end
)
#end
#if(subject_type_ids)
and t3.subject_type_id in
(
#for(id:subject_type_ids)
#(for.index > 0 ? ", " : "") '#(id)'
#end
)
#end
#if(org_code)
and t1.org_code='#(org_code)'
#end
#if(begin_date)
and t2.update_ts between '#(begin_date)' and '#(end_date)'
#end
#if(data_type)
and t3.data_type=#(data_type)
#end
#if(sbnd)
and t3.year=#(sbnd)
#end
#if(step_code)
and t3.step_code like '#(step_code)%'
#end
#end
-- 四个阶段的统计信息(市、校两级兼容)
#sql("tjTopFourStep")
select
(select count(1) from t_gtzz_sy_laststep where year=year(now())-1
#if(org_code)
and org_code='#(org_code)'
#end
) as xmlx,
(select count(1) from t_gtzz_sy_laststep where year=year(now())-1
#if(org_code)
and org_code='#(org_code)'
#end
and step_code like '02%') as zbcg,
(select count(1) from t_gtzz_sy_laststep where year=year(now())-1
#if(org_code)
and org_code='#(org_code)'
#end
and is_finish_flag=0 and step_code like '03%') as ssys,
(select count(1) from t_gtzz_sy_laststep where year=year(now())-1
#if(org_code)
and org_code='#(org_code)'
#end
and is_finish_flag=1) as xmbf
#end
-- 今年项目概览(市专用)
#sql("tjSubjectSummaryCurrentYear")
select sum(subject_count) as subject_count,
sum(finish_count) as finish_count,
sum(close_count) as close_count,
sum(jz_count) as jz_count,
sum(yq_count) as yq_count,
ROUND(sum(money),2) as money
from t_gtzz_sy_base_year where year=year(now())-1
#end
-- 逾期提醒(市、校两级兼容)
#sql("tjYqList")
select * from t_gtzz_sy_laststep where 1=1
#if(org_code)
and org_code='#(org_code)'
#end
and yq_count>0;
#end
-- 项目待办(市、校两级兼容)
#sql("tjSubjectWaitStep")
select t1.step_code,t1.step_name,ifnull(t2.count,0) as count from t_gtzz_step as t1 left join (
select step_code,count(1) as count from t_gtzz_sy_laststep
where is_current=1 and is_finish_flag<3
#if(org_code)
and org_code='#(org_code)'
#end
group by step_code) as t2 on t1.step_code=t2.step_code where (t1.step_code like '02%' or t1.step_code like '03%')
#end
-- 今年项目分布(市专用) -- year=year(now())
#sql("tjFenBu")
select * from
(
select org_code,org_name,sum(subject_count) as subject_count,sum(finish_count) as finish_count,
sum(close_count) as close_count,
sum(jz_count) as jz_count,
sum(yq_count) as yq_count,
ROUND(sum(money),2) as money
from t_gtzz_sy_base_year where year=year(now())-1
group by org_code,org_name
) as ta order by ta.subject_count desc,money desc,finish_count desc
#end
-- 项目进展(学校专用)
#sql("tjxmJz")
select id,year,subject_id,subject_name,date_format(lixiang_time, '%Y-%m-%d') as lixiang_time,step_code,step_name,
step_order_id,big_step_name,
all_step_count,is_finish_flag,is_current,org_code,begin_time,end_time,duration,days_limit,
date_diff_count,create_time,yq_count from t_gtzz_sy_laststep where org_code='#(org_code)'
#end
-- 获取结转的项目列表
#sql("getJzList")
select max(progress_id) as progress_id,
subject_id,org_code,org_name,subject_name,subject_type_id,subject_type_name,
year,step_code,step_name,begin_time,end_time,action_bureau,input_value,radio_id,
is_current,is_back_log,is_finish_flag,check_status,lixiang_time,bxlx_name,cxlx_name,
jsfa_type_id,task_number,data_type,is_finish_time from t_gtzz_progress where org_code='#(org_code)'
and is_finish_flag=#(is_finish_flag)
group by subject_id order by progress_id
#end
-- 归档列表
#sql("getGdList")
select org_code,org_name, sum(subject_count) as subject_count, sum(finish_count) as finish_count,
sum(close_count) as close_count, sum(jz_count) as jz_count, sum(yq_count) as yq_count,ROUND(sum(money),2) as money
from t_gtzz_sy_base_year where 1=1
#if(year)
and year=#(year)
#end
#if(org_code)
and org_code='#(org_code)'
#end
group by org_code,org_name order by sum(subject_count) desc
#end
-- 获取监理项目列表
#sql("getJlSubjectList")
select * from (select t1.*,
ifnull((select count(distinct group_question_id) from t_gtzz_jianli_question as t2 where t2.subject_id=t1.subject_id),0) as question_count,
ifnull((select count(distinct group_question_id) from t_gtzz_jianli_question as t2 where t2.subject_id=t1.subject_id and t2.state_id=3),0) as finish_count,
(select t4.begin_time from t_gtzz_progress as t4 where t4.subject_id=t1.subject_id and t4.step_code='0301' and t4.progress_id<t1.progress_id
order by progress_id desc limit 1) as qd_time from t_gtzz_progress as t1 inner join t_gtzz_subject_jianli as t3 on t1.subject_id=t3.subject_id
where t3.person_id='#(person_id)' and t1.step_code='0302' and t1.is_current=#(is_current))
as ta where 1=1
#if(being_date)
and ta.qd_time >='#(being_date)' and ta.qd_time <='#(end_date) 23:59:59'
#end
#if(keyword)
and (ta.subject_name like '%#(keyword)%' or ta.org_name like '%#(keyword)%')
#end
order by ta.begin_time desc
#end
-- 获取指定项目的监理流水
#sql("getSubjectQuestion")
select t1.* from t_gtzz_jianli_question as t1 where t1.group_question_id=t1.progress_id
and t1.subject_id=#(subject_id)
#if(question_level_id)
and t1.question_level_id=#(question_level_id)
#end
#if(question_type_id)
and t1.question_type_id=#(question_type_id)
#end
#if(begin_date)
and t1.create_time between '#(begin_date)' and '#(end_date) 23:59:59'
#end
#if(state_id)
and t1.state_id=#(state_id)
#end
order by t1.progress_id desc
#end
-- ==========统计分析 ============================================================================================================================================
-- p_shouye_init_base_year
-- 插入单位数据
-- 刷新频率:项目变更+项目单位变更
-- 策略:项目变更时更新
#sql("insertBureauData")
insert into t_gtzz_sy_base_year(org_code,org_name,year)
select t1.org_code,t1.org_name,t2.year from t_gtzz_school as t1 cross join
(select distinct sbnd as year from t_gtzz_subject) as t2
#end
-- 按年度更新项目总数
-- 策略:项目变更时更新
#sql("updateProjectCountByYear")
update t_gtzz_sy_base_year as t1, (select org_code,sbnd,count(1) as subject_count from t_gtzz_subject group by org_code,sbnd) as t2
set t1.subject_count=t2.subject_count where t1.org_code=t2.org_code and t1.year=t2.sbnd;
#end
-- 按年度更新预算金额
#sql("updateMoneyByYear")
update t_gtzz_sy_base_year p,(select org_code,sbnd, sum(ifnull(money,0)) as money
from t_gtzz_subject group by org_code,sbnd) as s set p.money = s.money
where p.org_code = s.org_code and p.year=s.sbnd
#end
-- p_shouye_init_laststep
#sql("get_02_step_count")
select count(1) as c from (select step_order_id from t_gtzz_step where step_code like '02%' and LENGTH(step_code)=4 group by step_order_id ) as t1
#end
#sql("get_03_step_count")
select count(1) as c from (select step_order_id from t_gtzz_step where step_code like '03%' and LENGTH(step_code)=4 group by step_order_id ) as t1
#end
-- 按年度+单位查询完成个数、关闭个数、延期个数
#sql("getRefreshCountByYearOrgCode")
select t1.id, t1.year,t1.org_code,
(select count(distinct t2.subject_id) from t_gtzz_progress as t2 where t2.is_finish_flag=1 and t2.year=t1.year and t2.org_code=t1.org_code) as c1,
(select count(distinct t2.subject_id) from t_gtzz_progress as t2 where t2.is_finish_flag=2 and t2.year=t1.year and t2.org_code=t1.org_code) as c2,
(select ifnull(sum(t2.yq_count),0) from t_gtzz_sy_laststep as t2 where t2.year =t1.year and t2.org_code =t1.org_code) as c3
from t_gtzz_sy_base_year as t1
#end
-- 0:未完成项目流程1已完成项目流程2项目流程已取消,3:项目结转,本年结束,转入明年。
#sql("laststep_1")
insert into t_gtzz_sy_laststep(year,subject_id,step_code,is_finish_flag,is_current,org_code,begin_time,end_time,subject_name,lixiang_time)
select year,subject_id,step_code,is_finish_flag,is_current,org_code,begin_time,end_time,subject_name,lixiang_time from t_gtzz_progress where progress_id in
(select progress_id from (select max(progress_id),subject_id from t_gtzz_progress group by subject_id) as ta)
#end
-- 对于结束时间为空的,写入当前时间
#sql("laststep_2")
update t_gtzz_sy_laststep set end_time=now() where end_time is null
#end
-- 补充步骤名称和内部排序号
#sql("laststep_3")
update t_gtzz_sy_laststep as t1,t_gtzz_step as t2 set t1.step_name=t2.step_name,t1.days_limit=t2.days_limit where t1.step_code=t2.step_code
#end
#sql("laststep_4")
update t_gtzz_sy_laststep as t1,t_gtzz_step as t2 set t1.step_order_id=t2.in_order_id where t1.step_code=t2.step_code and t1.step_code like '02%'
#end
#sql("laststep_5")
update t_gtzz_sy_laststep as t1,t_gtzz_step as t2 set t1.step_order_id=#para(v_02_step_count)+t2.in_order_id where t1.step_code=t2.step_code and t1.step_code like '03%'
#end
-- 补充大类名称
-- 写入运行时长
-- 写入超时时长
#sql("laststep_6")
update t_gtzz_sy_laststep as t1 set t1.duration=datediff(end_time,begin_time),
t1.date_diff_count=days_limit-duration,
t1.big_step_name=(select step_name from t_gtzz_step as t2 where substr(t1.step_code,1,2)=t2.step_code),
t1.all_step_count=#para(v_02_step_count)+#para(v_03_step_count)
#end
#end

@ -2,7 +2,7 @@
driverClassName=com.mysql.cj.jdbc.Driver
user=root
password=DsideaL147258369
jdbcUrl=jdbc:mysql://10.10.14.169:22066/zjb_db?rewriteBatchedStatements=true&useUnicode=true&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
jdbcUrl=jdbc:mysql://10.10.14.169:22066/yangpu_db?rewriteBatchedStatements=true&useUnicode=true&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
# redis ip
redis_ip=10.10.14.169
# redis port

@ -2,8 +2,8 @@
undertow.devMode=true
undertow.port=9000
undertow.host=0.0.0.0
#undertow.resourcePath =/usr/local/tomcat8/webapps/ccZhiChengTouPiao,classpath:static
undertow.resourcePath =D:/dsWork/ZhuangJiaBing/WebRoot,classpath:static
#undertow.resourcePath =/usr/local/tomcat8/webapps/YangPuBaoMing,classpath:static
undertow.resourcePath =D:/dsWork/YangPuBaoMing/WebRoot,classpath:static
# 目录名称
undertow.contextPath=/FengHuang

Loading…
Cancel
Save