tudc 3 năm trước cách đây
mục cha
commit
f2ddd07ac3

+ 16 - 13
adm/src/main/java/com/minpay/guomao/datamanage/action/CustomerManageAction.java

@@ -17,12 +17,14 @@ import com.minpay.common.util.DateUtil;
 import com.minpay.db.table.mapper.ApCompanyInfMapper;
 import com.minpay.db.table.mapper.ApCreditInfMapper;
 import com.minpay.db.table.mapper.ApMoreInfMapper;
+import com.minpay.db.table.mapper.ApWarehouseInfMapper;
 import com.minpay.db.table.mapper.ImBranchMapper;
 import com.minpay.db.table.model.ApCompanyInf;
 import com.minpay.db.table.model.ApCreditInf;
 import com.minpay.db.table.model.ApCreditInfExample;
 import com.minpay.db.table.model.ApMoreInf;
 import com.minpay.db.table.model.ApMoreInfExample;
+import com.minpay.db.table.model.ApWarehouseInf;
 import com.minpay.db.table.model.ImBranch;
 import com.minpay.db.table.model.OwnApCompanyInfExample;
 import com.minpay.db.table.own.mapper.CustomerManageMapper;
@@ -337,20 +339,21 @@ public class CustomerManageAction implements IMINAction {
 		res.set("phone", phone);//电话
 		
 		//查询仓库的所属公司
-		/*ApWarehouseInf info = Service.lookup(IMINDataBaseService.class).getMybatisMapper(ApWarehouseInfMapper.class)
-										.selectByPrimaryKey(wareId);*/
-		String companyName = "";
-//		if(info != null){
-			String companyId = u.getCompanyId();
-//			if(!CommonUtil.isEmpty(companyId)){
-				ApCompanyInf com =  Service.lookup(IMINDataBaseService.class).getMybatisMapper(ApCompanyInfMapper.class)
-										.selectByPrimaryKey(companyId);
-				if(com != null){
-					companyName = com.getName();
-				}
-//			}
-//		}
+		ApWarehouseInf info = Service.lookup(IMINDataBaseService.class).getMybatisMapper(ApWarehouseInfMapper.class)
+										.selectByPrimaryKey(wareId);
 		
+		String companyName = "";
+		if(info != null && !CommonUtil.isEmpty(info.getCompanyId())){
+			ApCompanyInf com =  Service.lookup(IMINDataBaseService.class).getMybatisMapper(ApCompanyInfMapper.class)
+							.selectByPrimaryKey(info.getCompanyId());
+			res.set("companyName", com.getName());
+		}
+		String companyId = u.getCompanyId();
+		ApCompanyInf com =  Service.lookup(IMINDataBaseService.class).getMybatisMapper(ApCompanyInfMapper.class)
+						.selectByPrimaryKey(companyId);
+		if(com != null){
+			companyName = com.getName();
+		}
 		res.set("selfCompanyName", companyName);
 		//获取当前日期
 		Date currentTime = new Date();

+ 3 - 0
adm/src/main/java/com/minpay/guomao/giveoutmanage/GiveStockManageAction.java

@@ -843,6 +843,9 @@ public class GiveStockManageAction implements IMINAction {
 			ApGiveOut orderLogistics = Service.lookup(IMINDataBaseService.class)
 					.getMybatisMapper(ApGiveOutMapper.class)
 					.selectByPrimaryKey(map.get("agoId"));
+			if(!"0".equals(orderLogistics.getState())) {
+				throw new MINBusinessException("发出量已入库!");
+			}
 			if(orderLogistics == null){
 				throw new MINBusinessException("获取信息失败!");
 			}

+ 1 - 1
adm/src/main/webapp/WEB-INF/config.properties

@@ -1,6 +1,6 @@
 #\u5229\u7528p6syp\u6253\u5370\u51fasql\u6267\u884c\u662f\u7684\u8be6\u7ec6\u4fe1\u606f
 #dataSource.driverClassName=com.p6spy.engine.spy.P6SpyDriver
-dataSource.driverClassName=com.mysql.jdbc.Driver
+#dataSource.driverClassName=com.mysql.jdbc.Driver
 
 #ceshi
 #dataSource.url=jdbc:mysql://123.138.111.28:3506/guomaotest?useUnicode=true&characterEncoding=UTF8&autoReconnect=true