Browse Source

采购单从uas传到平台增加多个字段。

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@9715 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
dongbw 8 years ago
parent
commit
2a28f0d0ed

+ 32 - 0
src/main/java/com/uas/platform/b2b/controller/SaleInquiryMouldController.java

@@ -237,6 +237,38 @@ public class SaleInquiryMouldController {
 		return searchService.searchPurcInquiryMouldIds(keyword, pageParams);
 	}
 
+//	/**
+//	 * 作为卖家,收到的模具询价(全部)数据库直接获取
+//	 *
+//	 * @param params
+//	 * @return
+//	 */
+//	@RequestMapping(value = "/sql", method = RequestMethod.GET)
+//	@ResponseBody
+//	public SPage<PurchaseInquiryMould> getReceivedMouldInquiriesBySql(PageParams params, String searchFilter) {
+//		logger.log("客户模具询价单", "查看收到的客户模具询价单列表(全部)");
+//		JSONObject jsonObject = JSONObject.parseObject(searchFilter);
+//		String keyword = jsonObject.getString("keyword");
+//		com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, searchFilter);
+//		// 当前登录企业作为供应商
+//		pageParams.getFilters().put("im_venduu", SystemSession.getUser().getEnterprise().getUu());
+//		SearchFilter filter = userService.distribute();
+//		if (filter != null && filter.getDistribute() == null) {
+//			return null;
+//		}
+//		if (filter != null && !CollectionUtils.isEmpty(filter.getDistribute())) {
+//			List<Object> list = new ArrayList<>();
+//			for (Object object : filter.getDistribute()) {
+//				list.add(object);
+//			}
+//			pageParams.getFilters().put("im_enuu", new MultiValue(list, true));
+//		}
+//		List<Sort> sortList = new ArrayList<>();
+//		sortList.add(new Sort("im_id", false, Type.LONG, 1L));
+//		pageParams.getFilters().put(SearchConstants.SORT_KEY, sortList);
+//		return searchService.searchPurcInquiryMouldIds(keyword, pageParams);
+//	}
+
 	/**
 	 * 作为卖家,收到的模具询价明细
 	 * 

+ 73 - 1
src/main/java/com/uas/platform/b2b/erp/model/Purchase.java

@@ -35,7 +35,7 @@ public class Purchase {
 	private String ve_contact;
 	private String pu_currency;
 	private Float pu_rate;
-	private String pu_kind;
+	private String pu_kind;  // 采购类型
 	private String pu_payments;
 	private String pu_remark;
 	private String pu_recordman;
@@ -46,6 +46,12 @@ public class Purchase {
 	private String pu_receivecode;
 	private Long pu_id;
 	private List<PurchaseDetail> purchaseDetails;
+	private String pu_purpose; // 用途,
+	private String pu_arcustcode; // 买家应收客户,
+	private String pu_shcustcode; // 收货客户,
+	private String pu_refcode; // 销售单号
+	private String pu_custcode; // 客户编号,
+	private String pu_custname; // 客户名称。
 
 	public String getPu_code() {
 		return pu_code;
@@ -239,6 +245,54 @@ public class Purchase {
 		this.pu_id = pu_id;
 	}
 
+	public String getPu_purpose() {
+		return pu_purpose;
+	}
+
+	public void setPu_purpose(String pu_purpose) {
+		this.pu_purpose = pu_purpose;
+	}
+
+	public String getPu_arcustcode() {
+		return pu_arcustcode;
+	}
+
+	public void setPu_arcustcode(String pu_arcustcode) {
+		this.pu_arcustcode = pu_arcustcode;
+	}
+
+	public String getPu_shcustcode() {
+		return pu_shcustcode;
+	}
+
+	public void setPu_shcustcode(String pu_shcustcode) {
+		this.pu_shcustcode = pu_shcustcode;
+	}
+
+	public String getPu_refcode() {
+		return pu_refcode;
+	}
+
+	public void setPu_refcode(String pu_refcode) {
+		this.pu_refcode = pu_refcode;
+	}
+
+	public String getPu_custcode() {
+		return pu_custcode;
+	}
+
+	public void setPu_custcode(String pu_custcode) {
+		this.pu_custcode = pu_custcode;
+	}
+
+	public String getPu_custname() {
+		return pu_custname;
+	}
+
+	public void setPu_custname(String pu_custname) {
+		this.pu_custname = pu_custname;
+	}
+
 	/**
 	 * 转为平台的采购订单
 	 * 
@@ -253,6 +307,24 @@ public class Purchase {
 		if (null != this.pu_cop) {
 			order.setCop(this.pu_cop);
 		}
+		if (null != this.pu_purpose) {
+			order.setPurpose(this.pu_purpose);
+		}
+		if (null != this.pu_arcustcode) {
+			order.setArCustCode(this.pu_arcustcode);
+		}
+		if (null != this.pu_shcustcode) {
+			order.setShCustCode(this.pu_shcustcode);
+		}
+		if (null != this.pu_refcode) {
+			order.setRefCode(this.pu_refcode);
+		}
+		if (null != this.pu_custcode) {
+			order.setCustCode(this.pu_custcode);
+		}
+		if (null != this.pu_custname) {
+			order.setCustName(this.pu_custname);
+		}
 		order.setEnUU(SystemSession.getUser().getEnterprise().getUu());
 		order.setEnterprise(new EnterpriseInfo(SystemSession.getUser().getEnterprise()));
 		User user = new User();

+ 8 - 3
src/main/java/com/uas/platform/b2b/mobile/service/impl/MobileReleaseServiceImpl.java

@@ -198,6 +198,7 @@ public class MobileReleaseServiceImpl implements MobileReleaseService {
         ModelMap map = new ModelMap();
         boolean success = false;
         String[] idArray = ids.split(",");
+        List<PagingReleaseDetail> saveDetails = new ArrayList<>();
         for (String id : idArray) {
             PagingRelease release = pagingReleaseDao.findOne(Long.valueOf(id));
             Set<PagingReleaseDetail> releaseDetails = release.getPagingReleaseDetails();
@@ -206,10 +207,11 @@ public class MobileReleaseServiceImpl implements MobileReleaseService {
                 detail.setStatus(Constant.YES);
                 detail.setReadStatus(Constant.YES);
                 detail.setReadDate(new Date());
-                pagingReleaseDetailDao.save(detail);
+                saveDetails.add(detail);
                 success = true;
             }
         }
+        pagingReleaseDetailDao.save(saveDetails);
         map.put("success", success);
         return map;
     }
@@ -217,6 +219,7 @@ public class MobileReleaseServiceImpl implements MobileReleaseService {
 
     @Override
     public void pushReleases(List<PagingReleaseDetail> pagingReleaseDetails) {
+        List<PagingReleaseDetail> saveDetails = new ArrayList<>();
         for (PagingReleaseDetail releaseDetail : pagingReleaseDetails) {
             if (releaseDetail.getVendUserUU() != null) {
                 Map<String, Object> params = new HashMap<>();
@@ -237,15 +240,17 @@ public class MobileReleaseServiceImpl implements MobileReleaseService {
                         ResponseWrap res = HttpUtil.doPost(PROD_URL, params);
                         if (!res.isSuccess()) {
                             throw new Exception(res.getContent());
+                        } else {
+                            releaseDetail.setPushStatus(Constant.YES);
+                            saveDetails.add(releaseDetail);
                         }
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
                 }
-                releaseDetail.setPushStatus(Constant.YES);
-                pagingReleaseDetailDao.save(releaseDetail);
             }
         }
+        pagingReleaseDetailDao.save(saveDetails);
     }
 
 }

+ 2 - 2
src/main/java/com/uas/platform/b2b/model/PagingRelease.java

@@ -105,9 +105,9 @@ public class PagingRelease implements Serializable {
 
 
 
-    public PagingRelease(Long emUU, String emname, Long enUU, Date date, String codeValue, String from, String title, String context, String type) {
+    public PagingRelease(Long emUU, String emName, Long enUU, Date date, String codeValue, String from, String title, String context, String type) {
         this.emUU = emUU;
-        this.emName = emname;
+        this.emName = emName;
         this.enUU = enUU;
         this.date = date;
         this.code = codeValue;

+ 65 - 0
src/main/java/com/uas/platform/b2b/model/PurchaseOrderAll.java

@@ -228,6 +228,71 @@ public class PurchaseOrderAll {
 	@Where(clause = "pl_table = 'purc$orders'")
 	private Set<PrintLog> printLogs;
 
+	@Column(name = "pu_purpose")
+	private String purpose; // 用途,
+
+	@Column(name = "pu_arcustcode")
+	private String arCustCode; // 买家应收客户,
+
+	@Column(name = "pu_shcustcode")
+	private String shCustCode; // 收货客户,
+
+	@Column(name = "pu_refcode")
+	private String refCode; // 销售单号
+
+	@Column(name = "pu_custcode")
+	private String custCode; // 客户编号,
+
+	@Column(name = "pu_custname")
+	private String custName; // 客户名称。
+
+	public String getPurpose() {
+		return purpose;
+	}
+
+	public void setPurpose(String purpose) {
+		this.purpose = purpose;
+	}
+
+	public String getArCustCode() {
+		return arCustCode;
+	}
+
+	public void setArCustCode(String arCustCode) {
+		this.arCustCode = arCustCode;
+	}
+
+	public String getShCustCode() {
+		return shCustCode;
+	}
+
+	public void setShCustCode(String shCustCode) {
+		this.shCustCode = shCustCode;
+	}
+
+	public String getRefCode() {
+		return refCode;
+	}
+
+	public void setRefCode(String refCode) {
+		this.refCode = refCode;
+	}
+
+	public String getCustCode() {
+		return custCode;
+	}
+
+	public void setCustCode(String custCode) {
+		this.custCode = custCode;
+	}
+
+	public String getCustName() {
+		return custName;
+	}
+
+	public void setCustName(String custName) {
+		this.custName = custName;
+	}
 
 	public Long getId() {
 		return id;

+ 66 - 0
src/main/java/com/uas/platform/b2b/model/PurchaseOrderDone.java

@@ -201,6 +201,72 @@ public class PurchaseOrderDone {
 	@Transient
 	private String enName;
 
+	@Column(name = "pu_purpose")
+	private String purpose; // 用途,
+
+	@Column(name = "pu_arcustcode")
+	private String arCustCode; // 买家应收客户,
+
+	@Column(name = "pu_shcustcode")
+	private String shCustCode; // 收货客户,
+
+	@Column(name = "pu_refcode")
+	private String refCode; // 销售单号
+
+	@Column(name = "pu_custcode")
+	private String custCode; // 客户编号,
+
+	@Column(name = "pu_custname")
+	private String custName; // 客户名称。
+
+	public String getPurpose() {
+		return purpose;
+	}
+
+	public void setPurpose(String purpose) {
+		this.purpose = purpose;
+	}
+
+	public String getArCustCode() {
+		return arCustCode;
+	}
+
+	public void setArCustCode(String arCustCode) {
+		this.arCustCode = arCustCode;
+	}
+
+	public String getShCustCode() {
+		return shCustCode;
+	}
+
+	public void setShCustCode(String shCustCode) {
+		this.shCustCode = shCustCode;
+	}
+
+	public String getRefCode() {
+		return refCode;
+	}
+
+	public void setRefCode(String refCode) {
+		this.refCode = refCode;
+	}
+
+	public String getCustCode() {
+		return custCode;
+	}
+
+	public void setCustCode(String custCode) {
+		this.custCode = custCode;
+	}
+
+	public String getCustName() {
+		return custName;
+	}
+
+	public void setCustName(String custName) {
+		this.custName = custName;
+	}
+
 	public Long getId() {
 		return id;
 	}

+ 66 - 0
src/main/java/com/uas/platform/b2b/model/PurchaseOrderEnd.java

@@ -209,6 +209,72 @@ public class PurchaseOrderEnd {
 	@Transient
 	private String enName;
 
+	@Column(name = "pu_purpose")
+	private String purpose; // 用途,
+
+	@Column(name = "pu_arcustcode")
+	private String arCustCode; // 买家应收客户,
+
+	@Column(name = "pu_shcustcode")
+	private String shCustCode; // 收货客户,
+
+	@Column(name = "pu_refcode")
+	private String refCode; // 销售单号
+
+	@Column(name = "pu_custcode")
+	private String custCode; // 客户编号,
+
+	@Column(name = "pu_custname")
+	private String custName; // 客户名称。
+
+	public String getPurpose() {
+		return purpose;
+	}
+
+	public void setPurpose(String purpose) {
+		this.purpose = purpose;
+	}
+
+	public String getArCustCode() {
+		return arCustCode;
+	}
+
+	public void setArCustCode(String arCustCode) {
+		this.arCustCode = arCustCode;
+	}
+
+	public String getShCustCode() {
+		return shCustCode;
+	}
+
+	public void setShCustCode(String shCustCode) {
+		this.shCustCode = shCustCode;
+	}
+
+	public String getRefCode() {
+		return refCode;
+	}
+
+	public void setRefCode(String refCode) {
+		this.refCode = refCode;
+	}
+
+	public String getCustCode() {
+		return custCode;
+	}
+
+	public void setCustCode(String custCode) {
+		this.custCode = custCode;
+	}
+
+	public String getCustName() {
+		return custName;
+	}
+
+	public void setCustName(String custName) {
+		this.custName = custName;
+	}
+
 	public Long getId() {
 		return id;
 	}

+ 66 - 0
src/main/java/com/uas/platform/b2b/model/PurchaseOrderReceived.java

@@ -174,6 +174,72 @@ public class PurchaseOrderReceived {
 	 */
 	@Column(name = "pu_receivecode")
 	private String receiveCode;
+
+	@Column(name = "pu_purpose")
+	private String purpose; // 用途,
+
+	@Column(name = "pu_arcustcode")
+	private String arCustCode; // 买家应收客户,
+
+	@Column(name = "pu_shcustcode")
+	private String shCustCode; // 收货客户,
+
+	@Column(name = "pu_refcode")
+	private String refCode; // 销售单号
+
+	@Column(name = "pu_custcode")
+	private String custCode; // 客户编号,
+
+	@Column(name = "pu_custname")
+	private String custName; // 客户名称。
+
+	public String getPurpose() {
+		return purpose;
+	}
+
+	public void setPurpose(String purpose) {
+		this.purpose = purpose;
+	}
+
+	public String getArCustCode() {
+		return arCustCode;
+	}
+
+	public void setArCustCode(String arCustCode) {
+		this.arCustCode = arCustCode;
+	}
+
+	public String getShCustCode() {
+		return shCustCode;
+	}
+
+	public void setShCustCode(String shCustCode) {
+		this.shCustCode = shCustCode;
+	}
+
+	public String getRefCode() {
+		return refCode;
+	}
+
+	public void setRefCode(String refCode) {
+		this.refCode = refCode;
+	}
+
+	public String getCustCode() {
+		return custCode;
+	}
+
+	public void setCustCode(String custCode) {
+		this.custCode = custCode;
+	}
+
+	public String getCustName() {
+		return custName;
+	}
+
+	public void setCustName(String custName) {
+		this.custName = custName;
+	}
 	
 
 	public Long getId() {

+ 66 - 0
src/main/java/com/uas/platform/b2b/model/PurchaseOrderTodo.java

@@ -194,6 +194,72 @@ public class PurchaseOrderTodo {
 	 */
 	@Transient
 	private String enName;
+
+	@Column(name = "pu_purpose")
+	private String purpose; // 用途,
+
+	@Column(name = "pu_arcustcode")
+	private String arCustCode; // 买家应收客户,
+
+	@Column(name = "pu_shcustcode")
+	private String shCustCode; // 收货客户,
+
+	@Column(name = "pu_refcode")
+	private String refCode; // 销售单号
+
+	@Column(name = "pu_custcode")
+	private String custCode; // 客户编号,
+
+	@Column(name = "pu_custname")
+	private String custName; // 客户名称。
+
+	public String getPurpose() {
+		return purpose;
+	}
+
+	public void setPurpose(String purpose) {
+		this.purpose = purpose;
+	}
+
+	public String getArCustCode() {
+		return arCustCode;
+	}
+
+	public void setArCustCode(String arCustCode) {
+		this.arCustCode = arCustCode;
+	}
+
+	public String getShCustCode() {
+		return shCustCode;
+	}
+
+	public void setShCustCode(String shCustCode) {
+		this.shCustCode = shCustCode;
+	}
+
+	public String getRefCode() {
+		return refCode;
+	}
+
+	public void setRefCode(String refCode) {
+		this.refCode = refCode;
+	}
+
+	public String getCustCode() {
+		return custCode;
+	}
+
+	public void setCustCode(String custCode) {
+		this.custCode = custCode;
+	}
+
+	public String getCustName() {
+		return custName;
+	}
+
+	public void setCustName(String custName) {
+		this.custName = custName;
+	}
 	
 
 	public Long getId() {

+ 66 - 0
src/main/java/com/uas/platform/b2b/model/PurchaseOrderWaiting.java

@@ -200,6 +200,72 @@ public class PurchaseOrderWaiting {
 	 */
 	@Column(name = "pu_receivecode")
 	private String receiveCode;
+
+	@Column(name = "pu_purpose")
+	private String purpose; // 用途,
+
+	@Column(name = "pu_arcustcode")
+	private String arCustCode; // 买家应收客户,
+
+	@Column(name = "pu_shcustcode")
+	private String shCustCode; // 收货客户,
+
+	@Column(name = "pu_refcode")
+	private String refCode; // 销售单号
+
+	@Column(name = "pu_custcode")
+	private String custCode; // 客户编号,
+
+	@Column(name = "pu_custname")
+	private String custName; // 客户名称。
+
+	public String getPurpose() {
+		return purpose;
+	}
+
+	public void setPurpose(String purpose) {
+		this.purpose = purpose;
+	}
+
+	public String getArCustCode() {
+		return arCustCode;
+	}
+
+	public void setArCustCode(String arCustCode) {
+		this.arCustCode = arCustCode;
+	}
+
+	public String getShCustCode() {
+		return shCustCode;
+	}
+
+	public void setShCustCode(String shCustCode) {
+		this.shCustCode = shCustCode;
+	}
+
+	public String getRefCode() {
+		return refCode;
+	}
+
+	public void setRefCode(String refCode) {
+		this.refCode = refCode;
+	}
+
+	public String getCustCode() {
+		return custCode;
+	}
+
+	public void setCustCode(String custCode) {
+		this.custCode = custCode;
+	}
+
+	public String getCustName() {
+		return custName;
+	}
+
+	public void setCustName(String custName) {
+		this.custName = custName;
+	}
 	
 
 	public Long getId() {

+ 11 - 1
src/main/webapp/resources/js/index/app.js

@@ -2028,10 +2028,11 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 				checked : false
 			};
 		$scope.loading = true;
-		AccountUser.findUsers({uu:customer.myEnterprise.uu},null,function(data) {
+        AccountUser.findUsers({uu:customer.myEnterprise.uu},null,function(data) {
 			$scope.userinfos = data;
 			$scope.loading = false;
 		})
+
 		// 点击勾选全部的复选框
 		$scope.checkAll = function() {
 			angular.forEach($scope.userinfos, function(item) {
@@ -5600,6 +5601,15 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 		$scope.removeOne = function(index) {
 			$scope.notices.splice(index, 1);
 		};
+
+        $scope.lockstatus = false;
+        // 锁定时间按钮5秒
+        $scope.lockClick = function() {
+            $scope.lockstatus = true;
+            $timeout(function() {
+                $scope.lockstatus = false;
+            }, 5000);
+        }
 		
 		$scope.lockstatus = false;
         // 锁定时间按钮5秒

+ 1 - 1
src/main/webapp/resources/tpl/index/sale/sendByBatch.html

@@ -86,7 +86,7 @@
 					class="text-num text-bold" ng-bind="total | number:2"></span></li>
 			</ul>
 		</div>
-		<button class="btn btn-primary" ng-click="lockClick();sendByBatch()" type="button">确认发货</button>
+		<button class="btn btn-primary" ng-click="lockClick();sendByBatch()" ng-disabled="!notices||notices.length==0 || lockstatus" type="button">确认发货</button>
 		<button class="btn btn-warning" ng-click="cancel()" type="button">取消</button>
 	</div>
 </form>