fanxw %!s(int64=5) %!d(string=hai) anos
pai
achega
1794048965

+ 3 - 2
src/main/java/com/chinaitop/depot/basic/mapper/BasicWarehouseMapper.xml

@@ -528,12 +528,13 @@
528 528
   
529 529
   <!-- 修改货位表的出入库状态 -->
530 530
   <select id="updateWareStatus" parameterType="java.util.Map">
531
-    update basic_warehouse set crk_status=#{status} where 1=1 and warehouse_id=#{wareId} and org_id=#{orgId}
531
+    update basic_warehouse set crk_status=#{status},updatetime=NOW() where 1=1 and warehouse_id=#{wareId} and org_id=#{orgId}
532 532
   </select>
533 533
 
534 534
   <!-- 查询封仓时间 -->
535 535
   <select id="queryFcdate" parameterType="java.util.Map" resultType="java.util.Map">
536 536
     SELECT filling_time from storage_foodbasicinfo WHERE warehouse_id=${wareId} 
537
-    AND history_status=0 AND seal_status='1' ORDER BY filling_time DESC
537
+    AND history_status=0 AND seal_status='1' 
538
+    ORDER BY STR_TO_DATE(filling_time, "%Y-%m-%d") DESC
538 539
   </select>
539 540
 </mapper>

+ 14 - 0
src/main/java/com/chinaitop/depot/unissoft/webservice/BasicWarehouseWebServiceImpl.java

@@ -8,6 +8,8 @@ import java.util.Map;
8 8
 import javax.annotation.Resource;
9 9
 
10 10
 import org.apache.commons.lang.ObjectUtils;
11
+import org.slf4j.Logger;
12
+import org.slf4j.LoggerFactory;
11 13
 import org.springframework.stereotype.Service;
12 14
 
13 15
 import com.alibaba.fastjson.JSONArray;
@@ -19,6 +21,8 @@ import com.chinaitop.utils.ParameterUtil;
19 21
 @Service
20 22
 public class BasicWarehouseWebServiceImpl implements BasicWarehouseWebService {
21 23
 
24
+	final static Logger logger = LoggerFactory.getLogger(BasicWarehouse.class);
25
+
22 26
 	@Resource
23 27
 	private BasicWarehouseMapper warehouseMapper;
24 28
 
@@ -27,6 +31,8 @@ public class BasicWarehouseWebServiceImpl implements BasicWarehouseWebService {
27 31
 	public String uploadCfStatus(String json) {
28 32
 		Map<String, Object> result = new HashMap<String, Object>();
29 33
 
34
+		String date = ParameterUtil.getSysDateTime();
35
+		logger.info("时间:"+date+",出入库状态回写接口,出入库系统调用,接收参数是:"+json);
30 36
 		try {
31 37
 			if (null != json) {
32 38
 				/* 将获取到的json串转换成json数组 */
@@ -42,8 +48,14 @@ public class BasicWarehouseWebServiceImpl implements BasicWarehouseWebService {
42 48
 						continue;
43 49
 					}
44 50
 
51
+					//仓房ID(云南没有油罐的业务,不用判断是否是油罐)
52
+					String houseId = ObjectUtils.toString(json_object.get("chId"), "");
45 53
 					//货位ID(云南没有油罐的业务,不用判断是否是油罐)
46 54
 					String wareId = ObjectUtils.toString(json_object.get("hwId"), "");
55
+					//如果是油罐,那么调过
56
+					if (houseId.equals(wareId)) {
57
+						continue;
58
+					}
47 59
 					//单位ID
48 60
 					String orgId = ObjectUtils.toString(json_object.get("org_Id"), "");
49 61
 					//货位状态值1空仓,2入库中,3封仓,4出库中,9其它
@@ -86,10 +98,12 @@ public class BasicWarehouseWebServiceImpl implements BasicWarehouseWebService {
86 98
 			}
87 99
 			result.put("success", "true");
88 100
 			result.put("msg", "上传成功");
101
+			logger.info("时间:"+date+",出入库状态回写接口,出入库系统调用,调用成功!");
89 102
 		} catch (NumberFormatException e) {
90 103
 			e.printStackTrace();
91 104
 			result.put("success", "false");
92 105
 			result.put("msg", "上传失败");
106
+			logger.info("时间:"+date+",出入库状态回写接口,出入库系统调用,调用失败!");
93 107
 		}
94 108
 		finally {
95 109
 			JSONArray jsonArray = new JSONArray();

+ 2 - 2
src/main/resources/generatorConfig.xml

@@ -14,7 +14,7 @@
14 14
 		<!--数据库连接的信息:驱动类、连接地址、用户名、密码 -->
15 15
 		<jdbcConnection 
16 16
 			driverClass="com.mysql.jdbc.Driver"
17
-			connectionURL="jdbc:mysql://192.168.123.38:3306/depot_yunnan" 
17
+			connectionURL="jdbc:mysql://101.36.160.140:10311/depot-yunnan" 
18 18
 			userId="root"
19 19
 			password="123456">
20 20
 		</jdbcConnection>
@@ -50,7 +50,7 @@
50 50
 		</javaClientGenerator>
51 51
 		
52 52
 		<!-- 指定要反向生成的数据库表 -->
53
-		<table schema="" tableName="basic_warehouse"></table>
53
+		<table schema="" tableName="basic_tank_hw"></table>
54 54
 <!-- 		<table schema="" tableName="basic_process_sub"></table> -->
55 55
 <!-- 		<table schema="" tableName="basic_process_contrail"></table> -->
56 56