给序列号增加入库单价字段
This commit is contained in:
@@ -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