xubh %!s(int64=4) %!d(string=hai) anos
pai
achega
7df09b990b

+ 66 - 20
src/main/java/com/minpay/mt/machine/action/MachineManageAction.java

@@ -1156,33 +1156,79 @@ public class MachineManageAction implements IMINAction {
         }else{
             pro.setName(name);
         }
-        pro.setIotCardNumber(ioiCardNumber);
-        pro.setIotServiceProvider(ioiServicePrivider);
-        pro.setModifyUser(user.getId());
-        pro.setModifyTime(nowTime);
-        pro.setAddress(address);
+        if(!CommonUtil.isEmpty(name)){
+            pro.setIotCardNumber(ioiCardNumber);
+        }
+
+
+        if(!CommonUtil.isEmpty(ioiServicePrivider)){
+            pro.setIotServiceProvider(ioiServicePrivider);
+        }
+        if(!CommonUtil.isEmpty(user.getId())){
+            pro.setModifyUser(user.getId());
+        }
+        if(!CommonUtil.isEmpty(nowTime)){
+            pro.setModifyTime(nowTime);
+        }
+        if(!CommonUtil.isEmpty(address)){
+            pro.setAddress(address);
+        }
 
         if(!CommonUtil.isEmpty(equType)){
             pro.setEquType(equType);
         }
-        pro.setWcAccount(wcAccount);
-        pro.setZfbAccount(zfbAccount);
-        pro.setCharge(charge);
-        pro.setPayeeNo(payeeNo);
-        pro.setCreditChannel(creditChannel);
-        pro.setPayment(payment);
-        pro.setVersionType(versionType);
-        pro.setPaymentType(paymentType);
-        pro.setExchangeRate(exchangeRate);
-        pro.setSupportBalance(supportBalance);
-        pro.setModifyUser(user.getId());
-        pro.setModifyTime(nowTime);
+
+
+
+
+        if(!CommonUtil.isEmpty(wcAccount)){
+            pro.setWcAccount(wcAccount);
+        }
+        if(!CommonUtil.isEmpty(zfbAccount)){
+            pro.setZfbAccount(zfbAccount);
+        }
+
+
+
+        if(!CommonUtil.isEmpty(charge)){
+            pro.setCharge(charge);
+        }
+        if(!CommonUtil.isEmpty(payeeNo)){
+            pro.setPayeeNo(payeeNo);
+        }
+        if(!CommonUtil.isEmpty(creditChannel)){
+            pro.setCreditChannel(creditChannel);
+        }
+        if(!CommonUtil.isEmpty(payment)){
+            pro.setPayment(payment);
+        }
+        if(!CommonUtil.isEmpty(versionType)){
+            pro.setVersionType(versionType);
+        }
+
+        if(!CommonUtil.isEmpty(paymentType)){
+            pro.setPaymentType(paymentType);
+        }
+        if(!CommonUtil.isEmpty(exchangeRate)){
+            pro.setExchangeRate(exchangeRate);
+        }
+        if(!CommonUtil.isEmpty(supportBalance)){
+            pro.setSupportBalance(supportBalance);
+        }
+        if(!CommonUtil.isEmpty(user.getId())){
+            pro.setModifyUser(user.getId());
+        }
+        if(!CommonUtil.isEmpty(nowTime)){
+            pro.setModifyTime(nowTime);
+        }
+
+
         Service.lookup(IMINDataBaseService.class)
                 .getMybatisMapper(VmEquipmentInfMapper.class)
                 .updateByPrimaryKeySelective(pro);
-		/*// 记录操作日志
-		String logInfo = "操作员:" + user.getName() + "添加商品,商品编号:" + id;
-		Service.lookup(ILogService.class).logging(session, logInfo);*/
+		// 记录操作日志
+		String logInfo = "操作员:" + user.getName() + "编辑设备,编号:" + id;
+		Service.lookup(ILogService.class).logging(session, logInfo);
         return res;
     }
     /**

+ 7 - 0
src/main/java/com/minpay/shouhuo/invCardManageAction.java

@@ -1,6 +1,7 @@
 package com.minpay.shouhuo;
 
 import com.minpay.common.bean.User;
+import com.minpay.common.constant.Constant;
 import com.minpay.common.format.IFormatService;
 import com.minpay.common.service.ILogService;
 import com.minpay.common.service.IPropertiesService;
@@ -108,6 +109,9 @@ public class invCardManageAction implements IMINAction {
 			String  dateStringb = new SimpleDateFormat("yyyy-MM-dd").format(parseb);
 			 time = dateString.concat(" 至 ").concat(dateStringb);
 		}
+		if(!Constant.ADMINISTRATION_SYSTEM_NUMBER.equals(user.getBranchId())){
+			m.put("branchId",user.getBranchId());
+		}
 		//查询累计收入
 		String countIncome = Service.lookup(IMINDataBaseService.class)
 				.getMybatisMapper(OrderManageMapper.class).selectCountIncome(m);
@@ -187,6 +191,9 @@ public class invCardManageAction implements IMINAction {
 		User user = session.getUser();
 		Map<String, String> m = new HashMap<String, String>();
 		m.put("proName", proName);
+		if(!Constant.ADMINISTRATION_SYSTEM_NUMBER.equals(user.getBranchId())){
+			m.put("branchId", user.getBranchId());
+		}
 
 		MINRowBounds rows = new MINRowBounds(page, limit);
 		List<Map<String, String>> detailList = Service.lookup(IMINDataBaseService.class)

+ 16 - 0
src/main/resources/com/minpay/db/table/own/mapper/OrderManageMapper.xml

@@ -158,6 +158,9 @@
 		AND VOI_ID = PIF_TRANFLOWNO
 		AND VOI_EQUIPMENT_ID = VEQ_ID
 		AND PIF_PAYTYPE IN ('93')
+		<if test="branchId != null and branchId != ''">
+			AND	VEQ_BRANCHID  = #{branchId,jdbcType=VARCHAR}
+		</if>
 		AND VOI_ORDER_AMT != '0.00'
 		GROUP BY SUBSTR(PIF_SUCCTIME, 1, 8), VEQ_MACHINE_NO
 
@@ -213,6 +216,9 @@
 		<if test="weekDate != null and weekDate != ''">
 			and substr(PIF_SUCCTIME,1,8) >= #{weekDate,jdbcType=VARCHAR}
 		</if>
+		<if test="branchId != null and branchId != ''">
+			AND	PIF_RCVCSTNO  = #{branchId,jdbcType=VARCHAR}
+		</if>
 	</select>
 	<!--	预估利润-->
 	<select id="selectPredictIncome" resultType="java.lang.String" parameterType="java.util.Map">
@@ -230,6 +236,9 @@
 		<if test="weekDate != null and weekDate != ''">
 			and substr(PIF_SUCCTIME,1,8) >= #{weekDate,jdbcType=VARCHAR}
 		</if>
+		<if test="branchId != null and branchId != ''">
+			AND	b.PIF_RCVCSTNO  = #{branchId,jdbcType=VARCHAR}
+		</if>
 	</select>
 	<!--	总机台数-->
 	<select id="selectCountDevice" resultType="java.lang.String" parameterType="java.util.Map">
@@ -254,6 +263,9 @@
 		<if test="proName != null and proName != ''">
 			AND	aa.PRT_NAME  like  concat('%' , #{proName,jdbcType=VARCHAR},'%')
 		</if>
+		<if test="branchId != null and branchId != ''">
+			AND	dd.VOI_BRANCHID  = #{branchId,jdbcType=VARCHAR}
+		</if>
 		GROUP BY aa.PRT_ID
 		ORDER BY aa.PRT_MODIFY_TIME DESC
 	</select>
@@ -287,6 +299,10 @@
 		<if test="weekDate != null and weekDate != ''">
 			and substr(PIF_SUCCTIME,1,8) >= #{weekDate,jdbcType=VARCHAR}
 		</if>
+		<if test="branchId != null and branchId != ''">
+			AND	PIF_RCVCSTNO  = #{branchId,jdbcType=VARCHAR}
+		</if>
+
 		group  by PIF_TRANSTYPE
 	</select>
 </mapper>