给序列号增加入库单价字段
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.jsh.erp.datasource.entities;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public class SerialNumber {
|
||||
@@ -13,6 +14,8 @@ public class SerialNumber {
|
||||
|
||||
private String isSell;
|
||||
|
||||
private BigDecimal inPrice;
|
||||
|
||||
private String remark;
|
||||
|
||||
private String deleteFlag;
|
||||
@@ -71,6 +74,14 @@ public class SerialNumber {
|
||||
this.isSell = isSell == null ? null : isSell.trim();
|
||||
}
|
||||
|
||||
public BigDecimal getInPrice() {
|
||||
return inPrice;
|
||||
}
|
||||
|
||||
public void setInPrice(BigDecimal inPrice) {
|
||||
this.inPrice = inPrice;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.jsh.erp.datasource.entities;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -425,6 +426,66 @@ public class SerialNumberExample {
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andInPriceIsNull() {
|
||||
addCriterion("in_price is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andInPriceIsNotNull() {
|
||||
addCriterion("in_price is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andInPriceEqualTo(BigDecimal value) {
|
||||
addCriterion("in_price =", value, "inPrice");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andInPriceNotEqualTo(BigDecimal value) {
|
||||
addCriterion("in_price <>", value, "inPrice");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andInPriceGreaterThan(BigDecimal value) {
|
||||
addCriterion("in_price >", value, "inPrice");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andInPriceGreaterThanOrEqualTo(BigDecimal value) {
|
||||
addCriterion("in_price >=", value, "inPrice");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andInPriceLessThan(BigDecimal value) {
|
||||
addCriterion("in_price <", value, "inPrice");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andInPriceLessThanOrEqualTo(BigDecimal value) {
|
||||
addCriterion("in_price <=", value, "inPrice");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andInPriceIn(List<BigDecimal> values) {
|
||||
addCriterion("in_price in", values, "inPrice");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andInPriceNotIn(List<BigDecimal> values) {
|
||||
addCriterion("in_price not in", values, "inPrice");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andInPriceBetween(BigDecimal value1, BigDecimal value2) {
|
||||
addCriterion("in_price between", value1, value2, "inPrice");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andInPriceNotBetween(BigDecimal value1, BigDecimal value2) {
|
||||
addCriterion("in_price not between", value1, value2, "inPrice");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRemarkIsNull() {
|
||||
addCriterion("remark is null");
|
||||
return (Criteria) this;
|
||||
|
||||
@@ -455,8 +455,12 @@ public class DepotItemService {
|
||||
int operNum = rowObj.getInteger("operNumber");
|
||||
if(snArray.length == operNum) {
|
||||
Long depotId = rowObj.getLong("depotId");
|
||||
BigDecimal inPrice = BigDecimal.ZERO;
|
||||
if (StringUtil.isExist(rowObj.get("unitPrice"))) {
|
||||
inPrice = rowObj.getBigDecimal("unitPrice");
|
||||
}
|
||||
serialNumberService.addSerialNumberByBill(depotHead.getType(), depotHead.getSubType(),
|
||||
depotHead.getNumber(), materialExtend.getMaterialId(), depotId, depotItem.getSnList());
|
||||
depotHead.getNumber(), materialExtend.getMaterialId(), depotId, inPrice, depotItem.getSnList());
|
||||
} else {
|
||||
throw new BusinessRunTimeException(ExceptionConstants.DEPOT_HEAD_SN_NUMBERE_FAILED_CODE,
|
||||
String.format(ExceptionConstants.DEPOT_HEAD_SN_NUMBERE_FAILED_MSG, barCode));
|
||||
|
||||
@@ -20,6 +20,7 @@ import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -352,7 +353,7 @@ public class SerialNumberService {
|
||||
return count;
|
||||
}
|
||||
|
||||
public void addSerialNumberByBill(String type, String subType, String inBillNo, Long materialId, Long depotId, String snList) throws Exception {
|
||||
public void addSerialNumberByBill(String type, String subType, String inBillNo, Long materialId, Long depotId, BigDecimal inPrice, String snList) throws Exception {
|
||||
//录入序列号的时候不能和库里面的重复-入库
|
||||
if ((BusinessConstants.SUB_TYPE_PURCHASE.equals(subType) ||
|
||||
BusinessConstants.SUB_TYPE_OTHER.equals(subType) ||
|
||||
@@ -374,6 +375,7 @@ public class SerialNumberService {
|
||||
serialNumber.setMaterialId(materialId);
|
||||
serialNumber.setDepotId(depotId);
|
||||
serialNumber.setSerialNumber(sn);
|
||||
serialNumber.setInPrice(inPrice);
|
||||
Date date = new Date();
|
||||
serialNumber.setCreateTime(date);
|
||||
serialNumber.setUpdateTime(date);
|
||||
|
||||
Reference in New Issue
Block a user