Prechádzať zdrojové kódy

Merge remote-tracking branch 'origin/master'

wanglm 5 rokov pred
rodič
commit
99a3ad0ff2
22 zmenil súbory, kde vykonal 290 pridanie a 56 odobranie
  1. 7 0
      .idea/misc.xml
  2. 2 1
      src/main/java/com/minpay/common/service/IPublicService.java
  3. 29 3
      src/main/java/com/minpay/common/service/impl/PublicServiceImpl.java
  4. 4 0
      src/main/java/com/minpay/db/table/own/mapper/OrderManageMapper.java
  5. 9 1
      src/main/java/com/minpay/huicai/system/action/FileManageAction.java
  6. 4 0
      src/main/java/com/minpay/huicai/system/action/RoleManageAction.java
  7. 81 21
      src/main/java/com/minpay/mt/machine/action/MachineManageAction.java
  8. 8 3
      src/main/java/com/minpay/payManage/action/BusinessNumManageAction.java
  9. 1 1
      src/main/java/com/minpay/shouhuo/ShOrderManageAction.java
  10. 21 1
      src/main/java/com/minpay/shouhuo/invCardManageAction.java
  11. 41 6
      src/main/resources/com/minpay/db/table/own/mapper/OrderManageMapper.xml
  12. 4 1
      src/main/resources/com/minpay/db/table/own/mapper/RoleMapper.xml
  13. 2 2
      src/main/resources/com/minpay/db/table/own/mapper/ShOrderMapper.xml
  14. 5 0
      src/main/webapp/WEB-INF/config.properties
  15. 1 1
      src/main/webapp/admin/businessNumManage/businessNumManage.html
  16. 0 1
      src/main/webapp/admin/businessNumManage/businessNumUpdate.html
  17. 17 2
      src/main/webapp/admin/incomeStatisticsManage/incomeStatistics.html
  18. 0 1
      src/main/webapp/admin/login.html
  19. 49 4
      src/main/webapp/admin/machineManage/editEquproduct.html
  20. 3 3
      src/main/webapp/admin/orderManage/orderManage.html
  21. 1 3
      src/main/webapp/admin/productManage/productAdd.html
  22. 1 1
      src/main/webapp/plugins/layui/lay/modules/upload.js

+ 7 - 0
.idea/misc.xml

@@ -1,5 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
+  <component name="MavenProjectsManager">
+    <option name="originalFiles">
+      <list>
+        <option value="$PROJECT_DIR$/pom.xml" />
+      </list>
+    </option>
+  </component>
   <component name="ProjectRootManager">
     <output url="file://$PROJECT_DIR$/out" />
   </component>

+ 2 - 1
src/main/java/com/minpay/common/service/IPublicService.java

@@ -158,11 +158,12 @@ public interface IPublicService extends IMINLocalService, IMINInitializer {
 	 * @param fileType 文件类型,用于区分文件路径上传
 	 * @param size 缓冲区 默认512,大文件需要手动修改
 	 * @param renameFlag 是否重命名
+	 * @param v01
 	 * @return
 	 * @throws MINBusinessException
 	 * @throws BusinessCodeException
 	 */
-	public Map<String, Object> uploadFile(FileItem file,String fileType,int size,boolean renameFlag) throws MINBusinessException,BusinessCodeException;
+	public Map<String, Object> uploadFileBD(FileItem file, String fileType, int size, boolean renameFlag, String v01) throws MINBusinessException,BusinessCodeException;
 	
 	
 	/**

+ 29 - 3
src/main/java/com/minpay/common/service/impl/PublicServiceImpl.java

@@ -334,13 +334,35 @@ public class PublicServiceImpl implements IPublicService {
 	 * @throws MINBusinessException
 	 * @throws BusinessCodeException
 	 */
-	public Map<String, Object> uploadFile(FileItem file, String fileType, int size, boolean renameFlag)
+	public Map<String, Object> uploadFileBD(FileItem file, String fileType, int size, boolean renameFlag,String channel)
 			throws MINBusinessException, BusinessCodeException {
 		String savePath = System.getProperty("catalina.home") + File.separator + "webapps" + File.separator + "upload"
 				+ File.separator;
+
+		//文件目录
+		String fileTypePath = Service.lookup(IPublicService.class)
+				.getSysParValue(channel+"_FILE_PATH_" + fileType);
+		// 获取当前时间
+		String nowDate = DateUtil.format(new Date(), "yyyyMMdd");
+		// 获取根路径(nginx文件服务器路径)
+		String basePath = Service.lookup(IPublicService.class)
+				.getSysParValue(channel+"_FILE_SERVER_BASE_PATH");// 为nginx根路径
+		savePath = basePath.concat(fileTypePath).concat(nowDate).concat("/");
+
+		// 获取web服务器访问路径
+		String baseUrl = Service.lookup(IPublicService.class)
+				.getSysParValue(channel+"_FILE_SERVER_URL"); // 为nginx访问路径
+		baseUrl = baseUrl.concat(fileTypePath).concat(nowDate).concat("/");
+
 		File files = new File(savePath);
+
 		if (!files.exists()) {
-			files.mkdir();
+			boolean file_true = files.mkdir();
+			if (file_true) {
+				System.out.println("文件夹建立成功");
+			} else {
+				System.out.println("文件建立失败");
+			}
 		}
 		FileOutputStream fs = null;
 		InputStream in = null;
@@ -351,13 +373,17 @@ public class PublicServiceImpl implements IPublicService {
 			fs = new FileOutputStream(saveUrl);
 			in = file.getInputStream();
 			FileCopyUtils.copy(in, fs);
+			in.close();
+			fs.flush();
+			fs.close();
 		} catch (Exception e) {
 			e.printStackTrace();
 		}
+
 		double width = -1; // 记录图片宽度
 		double height = -1; // 记录图片的高度
 
-		String baseUrl = Service.lookup(IPublicService.class).getSysParValue("FILE_SERVER_URL"); // 为nginx访问路径
+		//String baseUrl = Service.lookup(IPublicService.class).getSysParValue("FILE_SERVER_URL"); // 为nginx访问路径
 		Map<String, Object> map = new HashMap<String, Object>();
 		map.put("url", baseUrl + fileName);
 		map.put("width", width);

+ 4 - 0
src/main/java/com/minpay/db/table/own/mapper/OrderManageMapper.java

@@ -56,4 +56,8 @@ public interface OrderManageMapper extends IMINMybatisEntityMapper {
 	 * 预估利润
 	 */
 	String selectPredictIncome(Map<String, String> m);
+	/**
+	 * 查询累计收入 只查询微信支付宝
+	 */
+	List<Map<String, String>>  selectCountIncomeb(Map<String, String> m);
 }

+ 9 - 1
src/main/java/com/minpay/huicai/system/action/FileManageAction.java

@@ -70,9 +70,17 @@ public class FileManageAction implements IMINAction {
 		if (size < 0) {
 			throw new MINBusinessException("size参数异常,size不能小于0");
 		}
+		String ambient = Service.lookup(IPublicService.class)
+				.getSysParValue("AMBIENT");//当前环境
+		Map<String, Object> map = null;
+		if("00".equals(ambient)){//测试
+			 map =Service.lookup(IPublicService.class).uploadFile(file, fileType, 0, true,"V01");
+		}
+		if("01".equals(ambient)){//生产
+			map =Service.lookup(IPublicService.class).uploadFileBD(file, fileType, 0, true,"V01");
+		}
 
 		//Map<String, Object> map = Service.lookup(IPublicService.class).uploadFile(file, fileType, 0, true);
-		Map<String, Object> map =Service.lookup(IPublicService.class).uploadFile(file, fileType, 0, true,"V01");
 
 		if ("00".equals(fileType) && !CommonUtil.isEmpty(proportion)) {
 			double minRatio = -1;

+ 4 - 0
src/main/java/com/minpay/huicai/system/action/RoleManageAction.java

@@ -485,6 +485,10 @@ public class RoleManageAction implements IMINAction {
 			throws MINBusinessException {
 		MINActionResult res = new MINActionResult();
 		Map<String, String> map = new HashMap<String, String>();
+		User user = session.getUser();
+		if(!Constant.ADMINISTRATION_SYSTEM_NUMBER.equals(user.getBranchId()) ){ //超級管理員
+			map.put("authority", "00");
+		}
 		map.put("roleid", id);
 		List<Map<String, String>> ls = null;
 		if (id == null || "".equals(id)) {// 新增角色时使用

+ 81 - 21
src/main/java/com/minpay/mt/machine/action/MachineManageAction.java

@@ -31,6 +31,9 @@ import com.startup.minpay.frame.session.MINSession;
 import com.startup.minpay.frame.target.MINAction;
 import com.startup.minpay.frame.target.MINComponent;
 import com.startup.minpay.frame.target.MINParam;
+import org.apache.commons.fileupload.FileItem;
+import org.apache.commons.fileupload.FileItemFactory;
+import org.apache.commons.fileupload.disk.DiskFileItemFactory;
 
 import java.io.*;
 import java.util.HashMap;
@@ -290,8 +293,19 @@ public class MachineManageAction implements IMINAction {
         outputStream.close();
         // 上传图片到服务器
         InputStream inputSteam = new FileInputStream(file);
-        String url = UpLoadFile.uploadImg(inputSteam,"jpg",channel,"00");
 
+        String ambient = Service.lookup(IPublicService.class)
+                .getSysParValue("AMBIENT");//当前环境
+        FileItem  fileItem = createFileItem(file ,"itemFileName");
+        Map<String, Object> map = null;
+        if("00".equals(ambient)){//测试
+            map =Service.lookup(IPublicService.class).uploadFile(fileItem, "00", 0, true,"V01");
+        }
+        if("01".equals(ambient)){//生产
+            map =Service.lookup(IPublicService.class).uploadFileBD(fileItem, "00", 0, true,"V01");
+        }
+        //String url = UpLoadFile.uploadImg(inputSteam,"jpg",channel,"00");
+        String url  = String.valueOf(map.get("url"));
         inputSteam.close();
         // 删除本地图片
         file.delete();
@@ -324,9 +338,19 @@ public class MachineManageAction implements IMINAction {
                 e.printStackTrace();
             }
             outputStreams.close();
-            // 上传图片到服务器
             InputStream inputSteams = new FileInputStream(file);
-            url = UpLoadFile.uploadImg(inputSteams,"jpg",channel,"00");
+            FileItem  fileItemb = createFileItem(file ,"itemFileName");
+            Map<String, Object> mapb = null;
+            if("00".equals(ambient)){//测试
+                mapb =Service.lookup(IPublicService.class).uploadFile(fileItemb, "00", 0, true,"V01");
+            }
+            if("01".equals(ambient)){//生产
+                mapb =Service.lookup(IPublicService.class).uploadFileBD(fileItemb, "00", 0, true,"V01");
+            }
+            //String url = UpLoadFile.uploadImg(inputSteam,"jpg",channel,"00");
+             url  = String.valueOf(mapb.get("url"));
+
+            //url = UpLoadFile.uploadImg(inputSteams,"jpg",channel,"00");
 
             inputSteams.close();
             // 删除本地图片
@@ -1335,7 +1359,7 @@ public class MachineManageAction implements IMINAction {
      * @param flash 是否刷新
      */
     @MINAction(value = CREATE_QRCODE, transaction = IMINTransactionEnum.CMT)
-    public static MINActionResult createQrCode(
+    public  MINActionResult createQrCode(
             @MINParam(key = "flash") String flash,
             @MINParam(key = "equId") String equId,
             @MINParam(key = "equType") String equType,
@@ -1383,7 +1407,20 @@ public class MachineManageAction implements IMINAction {
         outputStream.close();
         // 上传图片到服务器
         InputStream inputSteam = new FileInputStream(file);
-        String url = UpLoadFile.uploadImg(inputSteam,"jpg",channel,"00");
+        //String url = UpLoadFile.uploadImg(inputSteam,"jpg",channel,"00");
+        String ambient = Service.lookup(IPublicService.class)
+                .getSysParValue("AMBIENT");//当前环境
+        InputStream inputSteams = new FileInputStream(file);
+        FileItem  fileItemb = createFileItem(file ,"itemFileName");
+        Map<String, Object> map = null;
+        if("00".equals(ambient)){//测试
+            map =Service.lookup(IPublicService.class).uploadFile(fileItemb, "00", 0, true,"V01");
+        }
+        if("01".equals(ambient)){//生产
+            map =Service.lookup(IPublicService.class).uploadFileBD(fileItemb, "00", 0, true,"V01");
+        }
+        //String url = UpLoadFile.uploadImg(inputSteam,"jpg",channel,"00");
+        String url  = String.valueOf(map.get("url"));
 
         inputSteam.close();
         // 删除本地图片
@@ -1647,12 +1684,12 @@ public class MachineManageAction implements IMINAction {
      */
     @MINAction(value = TENCENTMANAGE_QUERY)
     public MINActionResult businessNumManageQuery(MINSession session,
-          @MINParam(key = "branchId") String branchId,
-          @MINParam(key = "accountName") String accountName,
-          @MINParam(key = "accountId") String accountId,
-          @MINParam(key = "type") String type,
-          @MINParam(key = "page", defaultValue = "1") int page,
-          @MINParam(key = "limit", defaultValue = "10") int limit) throws MINBusinessException {
+                                                  @MINParam(key = "branchId") String branchId,
+                                                  @MINParam(key = "accountName") String accountName,
+                                                  @MINParam(key = "accountId") String accountId,
+                                                  @MINParam(key = "type") String type,
+                                                  @MINParam(key = "page", defaultValue = "1") int page,
+                                                  @MINParam(key = "limit", defaultValue = "10") int limit) throws MINBusinessException {
         MINActionResult res = new MINActionResult();
         // 查询当前角色编号
         User u = session.getUser();
@@ -1664,15 +1701,17 @@ public class MachineManageAction implements IMINAction {
         if(!StringUtils.isNullOrEmpty(accountName)){
             createCriteria.andNameLike("%"+accountName+"%");
         }
-        if(!StringUtils.isNullOrEmpty(accountId)){
-            createCriteria.andUsridEqualTo(accountId);
-        }
         if(!StringUtils.isNullOrEmpty(type)){
             createCriteria.andTypeEqualTo(type);
         }
-        if(!branchId.equals(Constant.DEFAULT_INSTITUTIONS)){
-            createCriteria.andUsridEqualTo(branchId);
+        if(Constant.ADMINISTRATION_SYSTEM_NUMBER.equals(u.getBranchId())){
+            if(!StringUtils.isNullOrEmpty(accountId)){
+                createCriteria.andUsridEqualTo(accountId);
+            }
+        }else{
+            createCriteria.andUsridEqualTo(u.getBranchId());
         }
+        createCriteria.andStateEqualTo("00");
         List<VmHlAccount> businessNumList = Service.lookup(IMINDataBaseService.class)
                 .getMybatisMapper(VmHlAccountMapper.class).selectByExample(vmHlAccountExample,rows);
 
@@ -1697,11 +1736,11 @@ public class MachineManageAction implements IMINAction {
      */
     @MINAction(value = QUERY_BRANCH)
     public MINActionResult queryBranch(MINSession session,
-      @MINParam(key = "accountName") String accountName,
-      @MINParam(key = "accountId") String accountId,
-      @MINParam(key = "type") String type,
-      @MINParam(key = "page", defaultValue = "1") int page,
-      @MINParam(key = "limit", defaultValue = "10") int limit) throws MINBusinessException {
+                                       @MINParam(key = "accountName") String accountName,
+                                       @MINParam(key = "accountId") String accountId,
+                                       @MINParam(key = "type") String type,
+                                       @MINParam(key = "page", defaultValue = "1") int page,
+                                       @MINParam(key = "limit", defaultValue = "10") int limit) throws MINBusinessException {
         MINActionResult res = new MINActionResult();
         // 查询当前角色编号
         User u = session.getUser();
@@ -1758,4 +1797,25 @@ public class MachineManageAction implements IMINAction {
 		Service.lookup(ILogService.class).logging(session, logInfo);*/
         return res;
     }
+    /*
+    创建FileItem
+     */
+    private FileItem createFileItem(File file, String fieldName) {
+        FileItemFactory factory = new DiskFileItemFactory(16, null);
+        FileItem item = factory.createItem(fieldName, "text/plain", true, file.getName());
+        int bytesRead = 0;
+        byte[] buffer = new byte[8192];
+        try {
+            FileInputStream fis = new FileInputStream(file);
+            OutputStream os = item.getOutputStream();
+            while ((bytesRead = fis.read(buffer, 0, 8192)) != -1) {
+                os.write(buffer, 0, bytesRead);
+            }
+            os.close();
+            fis.close();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        return item;
+    }
 }

+ 8 - 3
src/main/java/com/minpay/payManage/action/BusinessNumManageAction.java

@@ -83,12 +83,17 @@ public class BusinessNumManageAction implements IMINAction {
 		if(!StringUtils.isNullOrEmpty(accountName)){
 			createCriteria.andNameLike("%"+accountName+"%");
 		}
-		if(!StringUtils.isNullOrEmpty(accountId)){
-			createCriteria.andUsridEqualTo(accountId);
-		}
 		if(!StringUtils.isNullOrEmpty(type)){
 			createCriteria.andTypeEqualTo(type);
 		}
+		if(Constant.ADMINISTRATION_SYSTEM_NUMBER.equals(u.getBranchId())){
+			if(!StringUtils.isNullOrEmpty(accountId)){
+				createCriteria.andUsridEqualTo(accountId);
+			}
+		}else{
+			createCriteria.andUsridEqualTo(u.getBranchId());
+		}
+		createCriteria.andStateEqualTo("00");
 		List<VmHlAccount> businessNumList = Service.lookup(IMINDataBaseService.class)
 				.getMybatisMapper(VmHlAccountMapper.class).selectByExample(vmHlAccountExample,rows);
 

+ 1 - 1
src/main/java/com/minpay/shouhuo/ShOrderManageAction.java

@@ -275,7 +275,7 @@ public class ShOrderManageAction implements IMINAction {
 		// 格式化
 		ls = Service.lookup(IFormatService.class).formatDateTime(ls, "createTime");
 		ls = new MINCopyFormat("{isDraw:'isDrawdesc',payMode:'payModedesc','state':'statedesc','pickupStt':'pickupSttdesc'}").format(ls);
-		ls = Service.lookup(IFormatService.class).formatEnum(ls, "{isDrawdesc:'IS_DRAW',payModedesc:'PAY_TYPE',statedesc:'ORDER_STATE',pickupSttdesc:'ORDER_PICKUP_STT'}");
+		ls = Service.lookup(IFormatService.class).formatEnum(ls, "{isDrawdesc:'IS_DRAW',payModedesc:'PAY_MODE',statedesc:'ORDER_STATE',pickupSttdesc:'ORDER_PICKUP_STT'}");
 
 
 		Map<String, String> lss = Service.lookup(IMINDataBaseService.class).getMybatisMapper(ShOrderMapper.class).queryOrderStatisticsNew(p);

+ 21 - 1
src/main/java/com/minpay/shouhuo/invCardManageAction.java

@@ -107,10 +107,30 @@ public class invCardManageAction implements IMINAction {
 		String predictIncome = Service.lookup(IMINDataBaseService.class)
 				.getMybatisMapper(OrderManageMapper.class).selectPredictIncome(m);
 
+		//查询累计收入
+		List<Map<String, String>> mapList = Service.lookup(IMINDataBaseService.class)
+														.getMybatisMapper(OrderManageMapper.class).selectCountIncomeb(m);
+
+		String  wxzfbAmout = "0";
+		String  czAmout = "0";
+		for (int i = 0; i < mapList.size(); i++) {
+			Map<String, String> map = mapList.get(i);
+			String transType = map.get("transType");
+			if(transType.equals("00")){ //充值金额
+				 czAmout =  String.valueOf(map.get("amout"));
+			}
+			if(transType.equals("10")){ //支付金额
+				wxzfbAmout =   String.valueOf(map.get("amout"));
+			}
+		}
+
 		predictIncome = CommonUtil.subtract(countIncome,predictIncome);
+		String zsrAmout = CommonUtil.add(czAmout,wxzfbAmout);
 		//返回数据
 		res.set("countIncome", countIncome);
 		res.set("predictIncome", predictIncome);
+		res.set("czAmout", czAmout);
+		res.set("zsrAmout", zsrAmout);
 		res.set("time", time);
 		return res;
 	}
@@ -221,7 +241,7 @@ public class invCardManageAction implements IMINAction {
 		String branchId = user.getBranchId();
 		MINRowBounds rows = new MINRowBounds(page, limit);
 		//获取当前时间
-		Date currentTime = new Date();
+ 		Date currentTime = new Date();
 		String nowDate = DateUtil.format(currentTime,"yyyyMMdd");
 		Map<String, String> m = new HashMap<String, String>();
 		m.put("equNum", equNum);

+ 41 - 6
src/main/resources/com/minpay/db/table/own/mapper/OrderManageMapper.xml

@@ -91,17 +91,19 @@
 
 	<select id="selectIncomeDetail" resultType="hashmap" parameterType="java.util.Map">
 		SELECT succTime sellTime,
-			SUM(allCount) newCount,
-			SUM(wxSum) sellWxSum,
-			SUM(zfSum) sellZfSum,
-			SUM(mfSum) sellMfSum,
-			IFNULL(SUM(wxSum), 0.00)+IFNULL(SUM(zfSum), 0.00) allSell,
+			ROUND(SUM(allCount),2) newCount,
+			ROUND(SUM(wxSum),2) sellWxSum,
+			ROUND(SUM(zfSum),2) sellZfSum,
+			ROUND(SUM(yeSum),2) sellYESum,
+			ROUND(SUM(mfSum),2)  sellMfSum,
+			ROUND(IFNULL(SUM(wxSum), 0.00) + IFNULL(SUM(zfSum), 0.00) +  IFNULL(SUM(yeSum), 0.00),2)  allSell,
 			VEQ_MACHINE_NO vciId
 		FROM (
 			SELECT SUBSTR(PIF_SUCCTIME, 1, 8) AS succTime,VEQ_MACHINE_NO,
 				COUNT(1) allCount,
 				SUM(VOI_ORDER_AMT) wxSum,
 				'0' zfSum,
+				'0' yeSum,
 				'0' mfSum
 			FROM vm_payment_inf, vm_order_inf,vm_equipment_inf
 			WHERE PIF_STATUS = '1'
@@ -118,6 +120,7 @@
 				COUNT(1) allCount,
 				'0' wxSum,
 				SUM(VOI_ORDER_AMT) zfSum,
+				'0' yeSum,
 				'0' mfSum
 			FROM vm_payment_inf, vm_order_inf,vm_equipment_inf
 			WHERE PIF_STATUS = '1'
@@ -130,16 +133,33 @@
 			</if>
 			GROUP BY SUBSTR(PIF_SUCCTIME, 1, 8), VEQ_MACHINE_NO
 			UNION ALL
+
+			SELECT SUBSTR(PIF_SUCCTIME, 1, 8) AS succTime,VEQ_MACHINE_NO,
+			COUNT(1) allCount,
+			'0' wxSum,
+			 '0' zfSum,
+		SUM(VOI_ORDER_AMT) yeSum,
+		'0' mfSum
+			FROM vm_payment_inf, vm_order_inf,vm_equipment_inf
+			WHERE PIF_STATUS = '1'
+			AND VOI_ID = PIF_TRANFLOWNO
+			AND VOI_EQUIPMENT_ID = VEQ_ID
+			AND PIF_PAYTYPE IN ('93')
+			AND VOI_ORDER_AMT != '0.00'
+			GROUP BY SUBSTR(PIF_SUCCTIME, 1, 8), VEQ_MACHINE_NO
+
+			UNION ALL
 			SELECT SUBSTR(PIF_SUCCTIME, 1, 8) AS succTime,VEQ_MACHINE_NO,
 				COUNT(1) allCount,
 				'0' wxSum,
 				'0' zfSum,
+				'0' yeSum,
 				SUM(PIF_ORDERAMOUT) mfSum
 			FROM vm_payment_inf, vm_order_inf,vm_equipment_inf
 			WHERE PIF_STATUS = '1'
 			AND VOI_ID = PIF_TRANFLOWNO
 			AND VOI_EQUIPMENT_ID = VEQ_ID
-			AND PIF_PAYTYPE IN ('91', '92')
+			AND PIF_PAYTYPE IN ('91', '92','93')
 			AND VOI_ORDER_AMT = '0.00'
 			<if test="branchId != null and branchId != ''">
 				AND	VEQ_BRANCHID  = #{branchId,jdbcType=VARCHAR}
@@ -242,4 +262,19 @@
 			GROUP BY aa.PRT_ID
 		) cc
 	</select>
+	<select id="selectCountIncomeb" resultType="hashmap" parameterType="java.util.Map">
+		select PIF_TRANSTYPE transType, IFNULL(CAST(SUM(PIF_ORDERAMOUT) AS DECIMAL(15,2)), 0.00) amout
+		from vm_payment_inf
+		where PIF_STATUS = '1' and PIF_PAYTYPE in ('91','92') and PIF_TRANSTYPE in ('00','10')
+		<if test="nowDate != null and nowDate != ''">
+			and substr(PIF_SUCCTIME,1,8) = #{nowDate,jdbcType=VARCHAR}
+		</if>
+		<if test="yesDate != null and yesDate != ''">
+			and substr(PIF_SUCCTIME,1,8) = #{yesDate,jdbcType=VARCHAR}
+		</if>
+		<if test="weekDate != null and weekDate != ''">
+			and substr(PIF_SUCCTIME,1,8) >= #{weekDate,jdbcType=VARCHAR}
+		</if>
+		group  by PIF_TRANSTYPE
+	</select>
 </mapper>

+ 4 - 1
src/main/resources/com/minpay/db/table/own/mapper/RoleMapper.xml

@@ -224,7 +224,10 @@
 				FROM im_item_auth GROUP BY TMA_ITEMID ) auth
 			ON auth.TMA_ITEMID = c.itm_id
 		WHERE
-			a.meu_parentid != 'M00000' 
+			a.meu_parentid != 'M00000'
+		<if test="authority != null and authority != ''">
+			AND c.ITM_AUTHORITY ='00'
+		</if>
 			ORDER BY  c.itm_id
 	</select>
 	

+ 2 - 2
src/main/resources/com/minpay/db/table/own/mapper/ShOrderMapper.xml

@@ -106,7 +106,7 @@
 	<select id="queryOrderStatisticsNew" resultType="hashmap" parameterType="java.lang.String">
 		SELECT
 		count(1)  number,
-		IFNULL(sum(d.VOD_AMOUNT),0)	sumAmt
+		IFNULL(ROUND(SUM(d.VOD_AMOUNT),2) , 0) sumAmt
 		FROM vm_order_details d LEFT JOIN   vm_order_inf a  ON d.VOD_ORDER_ID = a.VOI_ID
 		LEFT JOIN  vm_equipment_inf c ON a.VOI_EQUIPMENT_ID = c.VEQ_ID
 		LEFT JOIN vm_person_inf b ON a.VOI_PERSON_ID = b.VCI_ID
@@ -212,7 +212,7 @@
 			and d.VOD_IS_WINNING = #{isDraw,jdbcType=VARCHAR}
 		</if>
 		<if test="orderNo != null and orderNo != ''">
-			and d.VOD_DETAILS_ID = #{orderNo,jdbcType=VARCHAR}
+			and d.VOD_DETAILS_ID like CONCAT('%', #{orderNo,jdbcType=VARCHAR}, '%')
 		</if>
 		<if test="productName != null and productName != ''">
 			and d.VOD_PRO_NAME like CONCAT('%', #{productName,jdbcType=VARCHAR}, '%')

+ 5 - 0
src/main/webapp/WEB-INF/config.properties

@@ -4,6 +4,11 @@ dataSource.url=jdbc:mysql://123.138.111.28:3506/shouhuoji?useUnicode=true&charac
 dataSource.username=shouhuoji_user
 dataSource.password=123456
 
+#Éú²ú
+#dataSource.url=jdbc:mysql://bj-cdb-cwuz68g2.sql.tencentcdb.com:61132/shouhuoji?useUnicode=true&characterEncoding=UTF8
+#dataSource.username=root
+#dataSource.password=root@2020
+
 #dataSource.url=jdbc:mysql://172.16.3.235:3306/trade?useUnicode=true&characterEncoding=UTF8
 #dataSource.username=trade
 #dataSource.password=Trade_pro1024

+ 1 - 1
src/main/webapp/admin/businessNumManage/businessNumManage.html

@@ -112,7 +112,7 @@
 		        $.request({
 					action : "../../BusinessNumManageAction/deleteBusinessNum",
 					data : {
-						id : data.accountId
+						id : data.id
 					},
 					success : function(resData) {
 						if (resData.MINStatus == 0) {

+ 0 - 1
src/main/webapp/admin/businessNumManage/businessNumUpdate.html

@@ -65,7 +65,6 @@
 
 		layui.each(rowData, function(index, item){
 			if(index =="type") {
-				alert(item);
 				if(item == '04'){
 					$("[name='accountType'][value='04']").prop("checked", "checked");
 

+ 17 - 2
src/main/webapp/admin/incomeStatisticsManage/incomeStatistics.html

@@ -31,7 +31,7 @@
             </div>
             <div class="d-dashed" style="margin: 10px 0;"></div>
 
-            <div class="layui-inline">
+            <div class="layui-inline" style = "width: 300px">
                 <label class="f12-gray4">交易总额汇总:</label>
                 <div class="layui-input-inline">
                     <input type="text" class="layui-input" id="countIncome" name="countIncome" style="border:none;color: red" disabled="disabled" class="search-select">
@@ -44,6 +44,18 @@
                 </div>
             </div>
             <div class="layui-inline">
+                <label class="f12-gray4">充值汇总:</label>
+                <div class="layui-input-inline">
+                    <input type="text" class="layui-input" id="czAmout" name="czAmout" style="border:none;color: red" disabled="disabled" class="search-select">
+                </div>
+            </div>
+            <div class="layui-inline">
+                <label class="f12-gray4">实际收入:</label>
+                <div class="layui-input-inline">
+                    <input type="text" class="layui-input" id="zsrAmout" name="zsrAmout" style="border:none;color: red" disabled="disabled" class="search-select">
+                </div>
+            </div>
+            <div class="layui-inline">
                 <label class="f12-gray4">统计时间:</label>
                 <div class="layui-input-inline">
                     <input type="text" class="layui-input" id="time" name="time" style="border:none;color: red" disabled="disabled" class="search-select">
@@ -110,6 +122,7 @@
 		      	,{field: 'newCount', title: '支付次数', width:'10%', sort: true}
 				,{field: 'sellWxSum', title: '微信支付金额', width:'18%'}
 		      	,{field: 'sellZfSum', title: '支付宝支付金额', width:'18%'}
+                ,{field: 'sellYESum', title: '余额支付金额', width:'18%'}
 		      	,{field: 'sellMfSum', title: '免费支付金额', width:'18%'}
 		      	,{field: 'allSell', title: '合计金额',width:'18%'}
 		    ]]
@@ -120,7 +133,7 @@
 		        console.log(curr);
 		        //得到数据总量
 		        console.log(count);
-                wyyq(1);
+                wyyq(0);
 		      }
 		    ,even: true //开启隔行背景
         });
@@ -227,6 +240,8 @@
             success : function(data) {
                 $("#countIncome").val(data.countIncome);
                 $("#predictIncome").val(data.predictIncome);
+                $("#czAmout").val(data.czAmout);
+                $("#zsrAmout").val(data.zsrAmout);
                 $("#time").val(data.time);
             }
         });

+ 0 - 1
src/main/webapp/admin/login.html

@@ -19,7 +19,6 @@
 <body style="height: 100%;margin: 0;">
 	<div class="login-back">
 		<div class="login-title">
-			<p>中国人不打中国人</p>
 			<p>内管系统</p>
 		</div>
 		<form class="layui-form">

+ 49 - 4
src/main/webapp/admin/machineManage/editEquproduct.html

@@ -49,11 +49,11 @@
 		<div class="layui-form-item">
 		    <label class="layui-form-label">*售货价:</label>
 		    <div class="layui-input-inline">
-		        <input type="text" name="sallPrice" maxlength="30" id ="sallPrice" lay-verify="sallPrice" autocomplete="off" placeholder="请输入售货价" class="layui-input">
+		        <input  type="number"  onblur="value=zhzs(this.value)"  name="sallPrice" placeholder="¥"  maxlength="30" id ="sallPrice" lay-verify="sallPrice" autocomplete="off" placeholder="请输入售货价" class="layui-input">
 		    </div>
 		    <label class="layui-form-label">*成本价:</label>
 		    <div class="layui-input-inline">
-		        <input type="text" name="costPrice" maxlength="30" id ="costPrice" lay-verify="costPrice" autocomplete="off" placeholder="请输入成本价" class="layui-input">
+		        <input  type="number"    onblur="value=zhzs(this.value)"  name="costPrice" maxlength="30" id ="costPrice" lay-verify="costPrice" autocomplete="off" placeholder="请输入成本价" class="layui-input">
 		    </div>
 		
 		</div>
@@ -63,14 +63,14 @@
             </div>
            <label class="layui-form-label">*促销价:</label>
 		    <div class="layui-input-inline">
-		        <input type="text" name="promottonPrice" maxlength="30" id ="promottonPrice" lay-verify="promottonPrice" autocomplete="off" placeholder="请输入促销价" class="layui-input">
+		        <input  type="number"   onblur="value=zhzs(this.value)"  name="promottonPrice" maxlength="30" id ="promottonPrice" lay-verify="promottonPrice" autocomplete="off" placeholder="请输入促销价" class="layui-input">
 		    </div>
 		    
 		</div>		
 		<div class="layui-form-item" >
 		    <label class="layui-form-label">*游戏价:</label>
 		    <div class="layui-input-inline">
-		        <input type="text" name="gamePrice" maxlength="30" id ="gamePrice" lay-verify="gamePrice" autocomplete="off" placeholder="请输入游戏价" class="layui-input">
+		        <input  type="number"   onblur="value=zhzs(this.value)"  name="gamePrice" maxlength="30" id ="gamePrice" lay-verify="gamePrice" autocomplete="off" placeholder="请输入游戏价" class="layui-input">
 		    </div>
 		</div>
 		<div class="layui-form-item" id = "game" >
@@ -245,6 +245,9 @@
 				if(type == '02'){
 					var price_min = $('#price_min').val();
 					var price_max = $('#price_max').val();
+
+
+
 					if(isEmpty(price_min)){
 						layer.msg('中奖范围不能为空',function() {time:2000});
 						return false;
@@ -253,6 +256,14 @@
 						layer.msg('中奖范围不能为空',function() {time:2000});
 						return false;
 					}
+					if(isNaN(price_min)){
+						layer.msg('中奖范围类型错误',function() {time:2000});
+						return false;
+					}
+					if(isNaN(price_max)){
+						layer.msg('中奖范围类型错误',function() {time:2000});
+						return false;
+					}
 					data.field.drawAmount = price_min+'-'+price_max;
 				}
 	  			$.request({
@@ -373,6 +384,40 @@
         });
 	 })
 	initSelect('isPromotton', "IS_PROMOTION", "isPromotton", '', true);
+	//(商品售价+促销价)~(商品售价+游戏价)
+	$("#sallPrice").bind('input propertychange',function(){
+		zjfwstr();
+	});
+	$("#gamePrice").bind('input propertychange',function(){
+		zjfwstr();
+	});
+	$("#promottonPrice").bind('input propertychange',function(){
+		zjfwstr();
+	});
+	function  zjfwstr() {
+		var type =$("#type").val();
+		if(type == '02'){
+			//售价
+			var sallPrice = parseInt($('#sallPrice').val()); ;
+			//游戏价
+			var gamePrice = parseInt($('#gamePrice').val());
+			//促销价
+			var promottonPrice = parseInt($('#promottonPrice').val());
+			$('#price_min').val(sallPrice + promottonPrice);
+			$('#price_max').val(sallPrice + gamePrice);
+		}
+
+	}
+	/*自定义处理数字*/
+	function zhzs(value) {
+		value = value.replace(/^0{1,}/g, '');
+		if (value != '')
+			value = parseFloat(value).toFixed(2);
+		else
+			value = parseFloat(0).toFixed(2);
+		return value;
+	}
+
     </script>
 </body>
 

+ 3 - 3
src/main/webapp/admin/orderManage/orderManage.html

@@ -114,7 +114,7 @@
 			}
 		});
 		form = layui.form;
-		initSelect('state', "PAY_STATE", "state", '', true,'支付状态');
+		initSelect('state', "PAY_STATE", "state", '00', true,'支付状态');
 		initSelect('payMode', "PAY_MODE", "payMode", '', true,'支付方式');
 		initSelect('gameRule', "GAME_RULE", "gameRule", '', true,'购买方式');
 		initSelect('pickupStt', "PICKUP_STT", "pickupStt", '', true,'出货状态');
@@ -149,7 +149,7 @@
 			// ,height: 315
 			,url: 'ShOrderManageAction/queryOrderNew' //数据接口
 			,method: 'post'
-			,where:{MINView:"JSON"}
+			,where:{MINView:"JSON","state":"00"}
 			,page: true //开启分页
 			,cols: [[ //表头
 				{field:'num', title: '序号',width:'5%', type:'numbers', fixed: true, align: 'center'}
@@ -374,7 +374,7 @@
 	}
 	function removeSearch(t) {
 		if ($(t).attr("name") == 'subjects') {
-			initSelect('state', "PAY_STATE", "state", '', true,'支付状态');
+			initSelect('state', "PAY_STATE", "state", '00', true,'支付状态');
 			initSelect('payMode', "PAY_MODE", "payMode", '', true,'支付方式');
 			initSelect('gameRule', "GAME_RULE", "gameRule", '', true,'购买方式');
 			initSelect('pickupStt', "PICKUP_STT", "pickupStt", '', true,'出货状态');

+ 1 - 3
src/main/webapp/admin/productManage/productAdd.html

@@ -17,12 +17,10 @@
 		                </div>
 		                <input type="tel" style= "display:none" name="categoryId" id = "categoryId" autocomplete="off" class="layui-input"    maxlength=30>
 		            </div>
-			   <div class="layui-inline">
 					<label class="layui-form-label">商品名称:</label>
-					<div class="layui-input-block">
+					<div class="layui-input-inline">
 						<input type="text" class="layui-input" name="name"  placeholder="请输入商品名称" lay-verify="name">
 					</div>
-            	</div>  
         	</div>
         	<div class="layui-upload">
 			    <label class="layui-form-label">商品封面图片:</label>

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 1 - 1
src/main/webapp/plugins/layui/lay/modules/upload.js