修复修改商品信息时,后台获取商品信息不准确的问题
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
package com.jsh.erp.service.account;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.jsh.erp.constants.BusinessConstants;
|
||||
import com.jsh.erp.datasource.entities.*;
|
||||
import com.jsh.erp.datasource.mappers.*;
|
||||
import com.jsh.erp.datasource.vo.AccountVo4InOutList;
|
||||
import com.jsh.erp.datasource.vo.AccountVo4List;
|
||||
import com.jsh.erp.service.log.LogService;
|
||||
import com.jsh.erp.utils.StringUtil;
|
||||
import com.jsh.erp.utils.Tools;
|
||||
import org.slf4j.Logger;
|
||||
@@ -12,6 +14,8 @@ import org.slf4j.LoggerFactory;
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@@ -39,6 +43,8 @@ public class AccountService {
|
||||
|
||||
@Resource
|
||||
private AccountItemMapper accountItemMapper;
|
||||
@Resource
|
||||
private LogService logService;
|
||||
|
||||
public Account getAccount(long id) {
|
||||
return accountMapper.selectByPrimaryKey(id);
|
||||
@@ -303,6 +309,7 @@ public class AccountService {
|
||||
|
||||
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||
public int updateAmountIsDefault(Boolean isDefault, Long accountId) {
|
||||
logService.insertLog(BusinessConstants.LOG_INTERFACE_NAME_ACCOUNT,BusinessConstants.LOG_OPERATION_TYPE_EDIT+accountId,((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest());
|
||||
Account account = new Account();
|
||||
account.setIsdefault(isDefault);
|
||||
AccountExample example = new AccountExample();
|
||||
|
||||
@@ -461,6 +461,20 @@ public class DepotItemService {
|
||||
depotItem.setOtherfield4(tempUpdatedJson.getString("OtherField4"));
|
||||
depotItem.setOtherfield5(tempUpdatedJson.getString("OtherField5"));
|
||||
depotItem.setMtype(tempUpdatedJson.getString("MType"));
|
||||
/**
|
||||
* create by: qiankunpingtai
|
||||
* create time: 2019/3/25 15:18
|
||||
* website:http://39.105.146.63/symphony/
|
||||
* description:
|
||||
* 修改了商品类型时,库中的商品和页面传递的不同
|
||||
* 这里需要重新获取页面传递的商品信息
|
||||
*/
|
||||
if(!material.getId().equals(depotItem.getMaterialid())){
|
||||
material= materialService.getMaterial(depotItem.getMaterialid());
|
||||
if(material==null){
|
||||
continue;
|
||||
}
|
||||
}
|
||||
/**出库时处理序列号*/
|
||||
if(BusinessConstants.DEPOTHEAD_TYPE_OUT.equals(depotHead.getType())){
|
||||
if(getCurrentInStock(depotItem.getMaterialid())<depotItem.getBasicnumber().intValue()){
|
||||
|
||||
@@ -15,6 +15,8 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
@@ -172,6 +174,7 @@ public class SerialNumberService {
|
||||
* */
|
||||
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
||||
public SerialNumberEx addSerialNumber(SerialNumberEx serialNumberEx) {
|
||||
logService.insertLog(BusinessConstants.LOG_INTERFACE_NAME_SERIAL_NUMBER,BusinessConstants.LOG_OPERATION_TYPE_ADD,((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest());
|
||||
if(serialNumberEx==null){
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user