From 4ace4d28e01a4265a0d5df214459b603b8e3cfda Mon Sep 17 00:00:00 2001
From: jyy <jyy>
Date: Tue, 08 Jun 2021 17:12:25 +0800
Subject: [PATCH]  1

---
 zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/daily-list-new.html |   21 ++++---
 zq-erp/pom.xml                                                                          |    4 
 zq-erp/src/main/java/com/matrix/system/hive/statistics/AchieveAction.java               |    7 ++
 zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-list-new.html     |   21 ++++---
 zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml                         |    7 +-
 zq-erp/src/main/java/com/matrix/system/hive/bean/AchieveNew.java                        |    4 +
 zq-erp/src/main/java/filecopy.java                                                      |   80 ++++++++++++++++++++++++++
 7 files changed, 118 insertions(+), 26 deletions(-)

diff --git a/zq-erp/pom.xml b/zq-erp/pom.xml
index 3bdc5c1..111a11a 100644
--- a/zq-erp/pom.xml
+++ b/zq-erp/pom.xml
@@ -401,12 +401,12 @@
                     <exclude>config/xcx/*</exclude>
                     <exclude>config/xcshop/*</exclude>
 
-                    <!-- -->
+                    <!--
                     <exclude>config/config.json</exclude>
                     <exclude>config/application.properties</exclude>
                     <exclude>config/system.properties</exclude>
 
-
+-->
 
                     <exclude>**/*.woff</exclude>
                     <exclude>**/*.woff2</exclude>
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/bean/AchieveNew.java b/zq-erp/src/main/java/com/matrix/system/hive/bean/AchieveNew.java
index 89e72de..fe414cc 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/bean/AchieveNew.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/bean/AchieveNew.java
@@ -3,6 +3,8 @@
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.matrix.core.anotations.Extend;
 import com.matrix.core.tools.DateUtil;
+import com.matrix.system.app.dto.BasePageDto;
+import com.matrix.system.common.bean.EntityDTOExt;
 import org.springframework.format.annotation.DateTimeFormat;
 
 import java.io.Serializable;
@@ -11,7 +13,7 @@
  *
  * @date 2019-03-24 23:55
  */
-public class AchieveNew implements Serializable{
+public class AchieveNew extends EntityDTOExt {
 	@Extend
 	private static final long serialVersionUID = 1L; 
 
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/statistics/AchieveAction.java b/zq-erp/src/main/java/com/matrix/system/hive/statistics/AchieveAction.java
index 98aaef4..ba436dc 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/statistics/AchieveAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/statistics/AchieveAction.java
@@ -98,11 +98,16 @@
      */
     @RequestMapping(value = "/findDailyInfoNew")
     public @ResponseBody
-    AjaxResult findDailyInfoNew(AchieveNew achieveNew, PaginationVO pageVo) {
+    AjaxResult findDailyInfoNew(@RequestBody  AchieveNew achieveNew) {
         SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
+        achieveNew.setCompanyId(sysUsers.getCompanyId());
         if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){
             achieveNew.setShopId(sysUsers.getShopId());
         }
+        PaginationVO pageVo = new PaginationVO();
+
+        pageVo.setOffset(achieveNew.getOffset());
+        pageVo.setLimit(achieveNew.getLimit());
         pageVo.setSort("datatime");
         pageVo.setOrder("desc");
         AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, achieveNewService.findDayFlow(achieveNew, pageVo),
diff --git a/zq-erp/src/main/java/filecopy.java b/zq-erp/src/main/java/filecopy.java
new file mode 100644
index 0000000..544d6cb
--- /dev/null
+++ b/zq-erp/src/main/java/filecopy.java
@@ -0,0 +1,80 @@
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+
+/**
+ * 文件对比复制
+ * @author JIANGYOUYAO
+ * @date 2021/6/7 0007
+ */
+public class filecopy {
+
+
+    static  String targetFilePath="/mnt/sdc/webresource";
+
+    static  String sourceFilePaht="/mnt/sdc/webresourceback";
+
+    public static void main(String[] args) throws IOException {
+
+
+        File sourceFile=new File(sourceFilePaht);
+        traverseFolder(sourceFile);
+
+
+    }
+
+
+    public static  void traverseFolder(File file) throws IOException {
+
+        if (file.exists()) {
+            File[] files = file.listFiles();
+            if (null == files || files.length == 0) {
+                System.out.println("文件夹是空的!");
+                return;
+            } else {
+                for (File file2 : files) {
+                    if (file2.isDirectory()) {
+                        //对比target是否存在
+                        final String s = file2.getCanonicalPath().replaceAll("webresourceback", "webresource");
+                        File f=new File(s);
+                        if(!f.exists()){
+                            System.out.println("复制文件:" + file2.getAbsolutePath());
+                            f.mkdir();
+                        }else{
+                            System.out.println("文件:" + file2.getAbsolutePath()+"存在");
+                        }
+                        traverseFolder(file2);
+                    } else {
+
+                        //对比target是否存在,不存在则copy
+                        final String s = file2.getCanonicalPath().replaceAll("webresourceback", "webresource");
+                        File f=new File(s);
+                        if(!f.exists()){
+                            System.out.println("复制文件:" + file2.getAbsolutePath());
+                            FileInputStream in=new FileInputStream(file2);
+                            FileOutputStream out=new FileOutputStream(f);
+                            byte[] buff=new byte[1024];
+                            int length=in.read(buff);
+                            while (length>0){
+                                out.write(buff,0,length);
+                                length=in.read(buff);
+                            }
+                            out.close();
+                            in.close();
+
+                        }else{
+                            System.out.println("文件:" + file2.getAbsolutePath()+"存在");
+                        }
+
+                    }
+                }
+            }
+        } else {
+            System.out.println("文件不存在!");
+        }
+    }
+
+
+
+}
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml
index fae293f..651ca07 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml
@@ -95,6 +95,7 @@
 		left join sys_proj_services l on a.service_order_id=l.id
 		left join sys_order_item j on a.order_item_id=j.ID
 		<where>
+			and	a.company_id = #{record.companyId}
 			<if test="record!=null">
 				<if
 					test="(record.shopId!=null and record.shopId!='') or  (record.shopId!='' and record.shopId==0)  ">
@@ -118,9 +119,7 @@
 				<if test="record.beaultId != null and record.beaultId !='' ">
 					and	a.beault_id = #{record.beaultId}
 				</if>
-				<if test="record.companyId != null and record.companyId !='' ">
-					and	a.company_id = #{record.companyId}
-				</if>
+
 				<if test="record.beaultId != null and record.beaultId !='' ">
 					and	a.beault_id = #{record.beaultId}
 				</if>
@@ -1181,7 +1180,7 @@
 			</if>
 
 		</where>
-		GROUP BY g.su_id , f.su_id, a.order_type, h.id,a.achieveType
+		GROUP BY g.su_id , f.su_id, a.order_type, h.id,a.achieveType,u.name
 		<if test="record.sort !=null and record.sort!=''"> order by ${record.sort} ${record.order}</if>
 
 	</select>
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/daily-list-new.html b/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/daily-list-new.html
index f19c967..2243f43 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/daily-list-new.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/daily-list-new.html
@@ -149,7 +149,6 @@
 <script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script>
 <script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
 <script type="text/javascript" th:src="@{/plugin/moment.min.js}"></script>
-<script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script>
 <script type="text/javascript" th:inline="javascript">
 	var vue = new Vue({
 		el : "#app",
@@ -184,10 +183,11 @@
 		},
 		methods : {
 			queryTableData () {
+
 				let _this = this;
-				var form = _this.form;
-				var page = _this.page;
-				var params = _this.form;
+				let form = _this.form;
+				let page = _this.page;
+				let params = _this.form;
 				params.limit = page.size;
 				params.offset = (page.currentPage - 1) * page.size;
 
@@ -195,11 +195,14 @@
 					params.beginTime = form.timeRange?moment(form.timeRange[0]).format("YYYY-MM-DD HH:mm"):'';
 					params.endTime = form.timeRange?moment(form.timeRange[1]).format("YYYY-MM-DD HH:mm"):'';
 				}
-				$.AjaxProxy({
-					p:params
-				}).invoke(basePath + "/admin/achieve/findDailyInfoNew", function (loj) {
-					_this.tableData = loj.getValue("rows");
-					_this.page.total = loj.getResult().total;
+				AjaxProxy.requst({
+					app: _this,
+					data: params,
+					url: basePath + "/admin/achieve/findDailyInfoNew",
+					callback: function (loj) {
+						_this.tableData = loj.rows;
+						_this.page.total = loj.total;
+					}
 				});
 			},
 			queryCustomColumns() {
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-list-new.html b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-list-new.html
index 611e200..8da1de1 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-list-new.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-list-new.html
@@ -151,7 +151,6 @@
 <script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script>
 <script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
 <script type="text/javascript" th:src="@{/plugin/moment.min.js}"></script>
-<script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script>
 <script type="text/javascript" th:inline="javascript">
 	var vue = new Vue({
 		el : "#app",
@@ -187,10 +186,11 @@
 		},
 		methods : {
 			queryTableData () {
+
 				let _this = this;
-				var form = _this.form;
-				var page = _this.page;
-				var params = _this.form;
+				let form = _this.form;
+				let page = _this.page;
+				let params = _this.form;
 				params.limit = page.size;
 				params.offset = (page.currentPage - 1) * page.size;
 
@@ -198,11 +198,14 @@
 					params.beginTime = form.timeRange?moment(form.timeRange[0]).format("YYYY-MM-DD HH:mm"):'';
 					params.endTime = form.timeRange?moment(form.timeRange[1]).format("YYYY-MM-DD HH:mm"):'';
 				}
-				$.AjaxProxy({
-					p:params
-				}).invoke(basePath + "/admin/achieve/findDailyInfoNew", function (loj) {
-					_this.tableData = loj.getValue("rows");
-					_this.page.total = loj.getResult().total;
+				AjaxProxy.requst({
+					app: _this,
+					data: params,
+					url: basePath + "/admin/achieve/findDailyInfoNew",
+					callback: function (loj) {
+						_this.tableData = loj.rows;
+						_this.page.total = loj.total;
+					}
 				});
 			},
 			queryCustomColumns() {

--
Gitblit v1.9.1