Quellcode durchsuchen

xiongzx commit1

xiongzx vor 7 Jahren
Ursprung
Commit
09fa3c3a79

+ 37 - 0
src/main/java/com/uas/eis/controller/HelloWorldController.java

@@ -1,9 +1,11 @@
 package com.uas.eis.controller;
 
+import java.util.HashMap;
 import java.util.Map;
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.bind.annotation.RestController;
 
 import com.uas.eis.service.UserService;
@@ -39,4 +41,39 @@ public class HelloWorldController {
 	public String test(String username){
 		return "success";
 	}
+	/**
+	 * 出入库单审核传云顶数据中心接口
+	 */
+	@RequestMapping("/ProdInOutAuidted.action")
+	@ResponseBody
+	public Map<String, Object> ProdInOutAuidted(int id,String piclass){
+		Map<String, Object> modelMap = new HashMap<String, Object>();
+		userService.ProdInOutAuidted(id,piclass);
+		modelMap.put("success", true);
+		return modelMap;
+	} 
+	
+	/**
+	 * 出入库单云顶数据中心传UAS过账接口
+	 */
+	@RequestMapping("/ProdInOutPOST.action")
+	@ResponseBody
+	public Map<String, Object> ProdInOutPOST(String Store){
+		Map<String, Object> modelMap = new HashMap<String, Object>();
+		userService.ProdInOutPOST(Store);
+		modelMap.put("success", true);
+		return modelMap;
+	} 
+	
+	/**
+	 * 销售订单云顶数据中心传UAS并生成一张已过账销售出货单接口
+	 */
+	@RequestMapping("/Salereceive.action")
+	@ResponseBody
+	public Map<String, Object> Salereceive(String Store){
+		Map<String, Object> modelMap = new HashMap<String, Object>();
+		userService.Salereceive(Store);
+		modelMap.put("success", true);
+		return modelMap;
+	} 
 }

+ 9 - 0
src/main/java/com/uas/eis/service/UserService.java

@@ -11,5 +11,14 @@ public interface UserService {
 	public abstract boolean checkUser(String username, String password);
 	
 	public abstract boolean checkAction(String username, String action);
+	
+	public void  ProdInOutAuidted(int id,String piclass);
+	
+	public void  ProdInOutPOST(String Store);
+	
+	public void  Salereceive(String Store);
+
+	
+
 
 }

+ 83 - 0
src/main/java/com/uas/eis/serviceImpl/UserServiceImpl.java

@@ -1,17 +1,26 @@
 package com.uas.eis.serviceImpl;
 
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import javax.servlet.http.HttpUtils;
+
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Service;
 
+import com.alibaba.fastjson.JSON;
 import com.uas.eis.core.support.TokenHandler;
 import com.uas.eis.dao.BaseDao;
 import com.uas.eis.service.UserService;
+//import com.uas.erp.core.BaseUtil;
+
+import com.uas.eis.utils.BaseUtil;
+import com.uas.erp.core.support.SystemSession;
 
 import net.sf.json.JSONObject;
+//import com.uas.erp.service.prodInOutService;
 
 @Service
 public class UserServiceImpl implements UserService {
@@ -31,6 +40,80 @@ public class UserServiceImpl implements UserService {
 		System.out.println("uuuu...........");
 		return baseDao.getJdbcTemplate().queryForMap("select em_auditman from employee where em_name = ?",username);
 	}
+	/**
+	 * 出入库单审核接口
+	 * 
+	 * @param id
+	 * @param piclass
+	 *            单据主表id
+	 *            单据类型piclass
+	 *            
+	 */
+	@Override
+	public void  ProdInOutAuidted(int id,String piclass) {
+		Map<Object, Object> store = new HashMap<Object, Object>();	
+		//传入查询code、单据ID传回单据主从表信息Map
+		if (piclass=="采购验收单"||piclass=="委外验收单"){
+		//云顶插入采购/委外验收单接口
+		}
+		if (piclass=="采购验退单"||piclass=="委外验退单"){
+			//云顶插入采购/委外验退单接口	
+		}
+		if (piclass=="拨出单"){
+			//云顶插入拨出单接口	
+		}
+		if (piclass=="其他入库单"){
+			//云顶插入其他入库单接口	
+		}
+		if (piclass=="其他出库单"){
+			//云顶插入其他出库单接口	
+		}
+	}
+	
+	
+	/**
+	 * 出入库单云顶数据中心传UAS过账接口
+	 * 
+	 * @param Store
+	 *            单据编号,类型等Json数据 Store
+	 *            
+	 */
+	@Override
+	public void  ProdInOutPOST(String Store) {
+		com.alibaba.fastjson.JSONObject json = JSON.parseObject(Store);
+		String Code=json.getString("xxxxxx").toString();
+		String Piclass=json.getString("xxxxxx").toString();
+		String Caller= String.valueOf(baseDao.getFieldDataByCondition("Form", "FO_CALLER", "FO_TITLE=" + Piclass));
+		int piid= Integer.valueOf(String.valueOf(baseDao.getFieldDataByCondition("ProdInOut", "pi_id", "pi_inoutno=" + Code+"and pi_class="+Piclass)));
+		Map<String, Object> map = new HashMap<String, Object>();
+		map.put("id", piid);
+		map.put("caller", Caller);
+		//调用出入库单过账的action(/scm/reserve/postProdInOut.action),返回过账是否成功
+
+		
+	}
+	
+	/**
+	 * 销售订单云顶数据中心传UAS并生成一张已过账销售出货单接口
+	 * 
+	 * @param Store
+	 *            销售订单主从表Json数据 Store
+	 *            
+	 */
+	@Override
+	public void  Salereceive(String Store) {
+		com.alibaba.fastjson.JSONObject json = JSON.parseObject(Store);
+		Map<String, Object> njson=BaseUtil.jsonToMap(json, keyMap);
+		int id= Integer.valueOf(String.valueOf(baseDao.getFieldDataByCondition("dual", "sale_seq.nextval", "1=1")));
+		njson.put("sa_id", id);
+		
+		Map<String, Object> map = new HashMap<String, Object>();
+		//调用出入库单过账的action(/scm/reserve/postProdInOut.action)
+
+		
+	}
+	
+	
 	
 	@Override
 	@Cacheable(value="userEnableCache")