更新计量单位为多单位
This commit is contained in:
@@ -286,7 +286,7 @@ public class ExceptionConstants {
|
||||
public static final String MATERIAL_BARCODE_EXISTS_MSG = "商品条码:%s重复";
|
||||
//商品-单位匹配不上
|
||||
public static final int MATERIAL_UNIT_MATE_CODE = 8000006;
|
||||
public static final String MATERIAL_UNIT_MATE_MSG = "抱歉,商品条码:%s的单位匹配不上,请完善计量单位信息!";
|
||||
public static final String MATERIAL_UNIT_MATE_MSG = "抱歉,商品条码:%s的单位匹配不上,请完善多单位信息!";
|
||||
//商品条码长度应该为4到40位
|
||||
public static final int MATERIAL_BARCODE_LENGTH_ERROR_CODE = 8000007;
|
||||
public static final String MATERIAL_BARCODE_LENGTH_ERROR_MSG = "商品条码:%s的长度应该为4到40位";
|
||||
|
||||
@@ -229,7 +229,7 @@ public class DepotItemController {
|
||||
item.put("mfrs", diEx.getMMfrs());
|
||||
item.put("materialOther", depotItemService.getOtherInfo(mpArr, diEx));
|
||||
BigDecimal stock;
|
||||
Unit unitInfo = materialService.findUnit(diEx.getMaterialId()); //查询计量单位信息
|
||||
Unit unitInfo = materialService.findUnit(diEx.getMaterialId()); //查询多单位信息
|
||||
String materialUnit = diEx.getMaterialUnit();
|
||||
if(StringUtil.isNotEmpty(diEx.getSku())){
|
||||
stock = depotItemService.getSkuStockByParam(diEx.getDepotId(),diEx.getMaterialExtendId(),null,null);
|
||||
|
||||
@@ -505,7 +505,7 @@ public class DepotItemService {
|
||||
depotItem.setLinkId(rowObj.getLong("linkId"));
|
||||
}
|
||||
//以下进行单位换算
|
||||
Unit unitInfo = materialService.findUnit(materialExtend.getMaterialId()); //查询计量单位信息
|
||||
Unit unitInfo = materialService.findUnit(materialExtend.getMaterialId()); //查询多单位信息
|
||||
if (StringUtil.isExist(rowObj.get("operNumber"))) {
|
||||
depotItem.setOperNumber(rowObj.getBigDecimal("operNumber"));
|
||||
String unit = rowObj.get("unit").toString();
|
||||
@@ -1071,7 +1071,7 @@ public class DepotItemService {
|
||||
public void updateCurrentUnitPrice(DepotItem depotItem) throws Exception {
|
||||
Boolean forceFlag = systemConfigService.getForceApprovalFlag();
|
||||
Boolean inOutManageFlag = systemConfigService.getInOutManageFlag();
|
||||
//查询计量单位信息
|
||||
//查询多单位信息
|
||||
Unit unitInfo = materialService.findUnit(depotItem.getMaterialId());
|
||||
List<DepotItemVo4DetailByTypeAndMId> itemList = findDetailByDepotIdsAndMaterialIdList(null, forceFlag, inOutManageFlag, depotItem.getSku(),
|
||||
depotItem.getBatchNumber(), null, null, null, depotItem.getMaterialId(), null, null);
|
||||
|
||||
@@ -108,7 +108,7 @@ public class UnitService {
|
||||
parseNameByUnit(unit);
|
||||
unit.setEnabled(true);
|
||||
result=unitMapper.insertSelective(unit);
|
||||
logService.insertLog("计量单位",
|
||||
logService.insertLog("多单位",
|
||||
new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_ADD).append(unit.getName()).toString(), request);
|
||||
}catch(Exception e){
|
||||
JshException.writeFail(logger, e);
|
||||
@@ -129,7 +129,7 @@ public class UnitService {
|
||||
if(unit.getRatioThree()==null) {
|
||||
unitMapperEx.updateRatioThreeById(unit.getId());
|
||||
}
|
||||
logService.insertLog("计量单位",
|
||||
logService.insertLog("多单位",
|
||||
new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_EDIT).append(unit.getName()).toString(), request);
|
||||
}catch(Exception e){
|
||||
JshException.writeFail(logger, e);
|
||||
@@ -186,7 +186,7 @@ public class UnitService {
|
||||
for(Unit unit: list){
|
||||
sb.append("[").append(unit.getName()).append("]");
|
||||
}
|
||||
logService.insertLog("计量单位", sb.toString(),
|
||||
logService.insertLog("多单位", sb.toString(),
|
||||
((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest());
|
||||
User userInfo=userService.getCurrentUser();
|
||||
//校验通过执行删除操作
|
||||
@@ -291,7 +291,7 @@ public class UnitService {
|
||||
|
||||
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||
public int batchSetStatus(Boolean status, String ids)throws Exception {
|
||||
logService.insertLog("计量单位",
|
||||
logService.insertLog("多单位",
|
||||
new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_ENABLED).toString(),
|
||||
((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest());
|
||||
List<Long> unitIds = StringUtil.strToLongList(ids);
|
||||
|
||||
Reference in New Issue
Block a user