From dd6cab3f295e2e9f127313c1ea3dde09eccb2ce6 Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Fri, 11 Jun 2021 21:57:50 +0800 Subject: [PATCH] Merge branch 'score_shop' of http://120.27.238.55:7000/r/beauty-erp into score_shop --- 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/service/imp/AchieveNewServiceImpl.java | 12 ++- zq-erp/src/main/resources/config/application.properties | 1 zq-erp/src/main/java/com/matrix/system/hive/bean/AchieveNew.java | 4 + zq-erp/src/main/java/com/matrix/system/hive/bean/MoneyCardUse.java | 5 + zq-erp/src/main/java/filecopy.java | 80 ++++++++++++++++++++++++++ 10 files changed, 130 insertions(+), 32 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/bean/MoneyCardUse.java b/zq-erp/src/main/java/com/matrix/system/hive/bean/MoneyCardUse.java index d0a63cb..0787c91 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/bean/MoneyCardUse.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/bean/MoneyCardUse.java @@ -1,6 +1,8 @@ package com.matrix.system.hive.bean; +import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; import com.fasterxml.jackson.annotation.JsonFormat; import com.matrix.core.anotations.Extend; import com.matrix.core.tools.DateUtil; @@ -14,9 +16,10 @@ * * @date 2016-09-17 10:17 */ + public class MoneyCardUse { - + @TableId(value = "id",type = IdType.AUTO) private Long id; diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/AchieveNewServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/AchieveNewServiceImpl.java index 201047f..14a1e97 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/AchieveNewServiceImpl.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/AchieveNewServiceImpl.java @@ -204,12 +204,14 @@ if (flag) { // if (!achieveId.equals(beauticianState.getStaffId())) { - AchieveNew saleMan = new AchieveNew(); - BeanUtils.copyProperties(achieveNew, saleMan); - saleMan.setBeaultId(achieveId); + AchieveNew saleManAchieve = new AchieveNew(); + BeanUtils.copyProperties(achieveNew, saleManAchieve); + saleManAchieve.setBeaultId(achieveId); - saleAchieveNumOfPeople(saleMan); - achieveNewList.add(saleMan); + saleAchieveNumOfPeople(saleManAchieve); + //销售人员不计算项目提成 + saleManAchieve.setProjPercentage(0D); + achieveNewList.add(saleManAchieve); // } } 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/config/application.properties b/zq-erp/src/main/resources/config/application.properties index 7589d03..66e9789 100644 --- a/zq-erp/src/main/resources/config/application.properties +++ b/zq-erp/src/main/resources/config/application.properties @@ -73,5 +73,6 @@ default.vip.photo.woman=https://filehive2.jyymatrix.cc/uploadeFile/20210125/db53552e688040afb286686f081e1e68f3fe946f75624598828f01898635152e.png default.vip.photo.man=https://filehive2.jyymatrix.cc/uploadeFile/20210125/3642f1d827c44c76832fea106c85e0f89e089c16cbcc4dd0a82bb52b9ac700f4.png +mybatis-plus.global-config.db-config.id-type=auto mybatis-plus.config-location=classpath:mybatis/mybatis-config.xml mybatis-plus.mapper-locations=classpath*:mybatis/mapper/**/*.xml 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