库存日志
This commit is contained in:
parent
9dc4a1d514
commit
84a2a8a33c
|
|
@ -39,6 +39,12 @@ public class MaInputRecord extends BaseEntity
|
|||
@ApiModelProperty(value = "入库类型(1新购入库,2退料入库,3修试后入库)")
|
||||
private String inputType;
|
||||
|
||||
/**
|
||||
* 库存数量
|
||||
*/
|
||||
@ApiModelProperty(value = "库存数量")
|
||||
private Double num;
|
||||
|
||||
/** 入库数量 */
|
||||
@ApiModelProperty(value = "入库数量")
|
||||
private BigDecimal inputNum;
|
||||
|
|
@ -104,7 +110,16 @@ public class MaInputRecord extends BaseEntity
|
|||
{
|
||||
return inputType;
|
||||
}
|
||||
public void setInputNum(BigDecimal inputNum)
|
||||
|
||||
public Double getNum() {
|
||||
return num;
|
||||
}
|
||||
|
||||
public void setNum(Double num) {
|
||||
this.num = num;
|
||||
}
|
||||
|
||||
public void setInputNum(BigDecimal inputNum)
|
||||
{
|
||||
this.inputNum = inputNum;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,9 +4,7 @@ import java.util.*;
|
|||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.bonus.sgzb.base.api.domain.HttpResult;
|
||||
import com.bonus.sgzb.base.api.domain.MachIneDto;
|
||||
import com.bonus.sgzb.base.api.domain.SavePutInfoDto;
|
||||
import com.bonus.sgzb.base.api.domain.*;
|
||||
import com.bonus.sgzb.common.core.constant.SecurityConstants;
|
||||
import com.bonus.sgzb.common.core.domain.R;
|
||||
import com.bonus.sgzb.common.log.annotation.Log;
|
||||
|
|
@ -234,23 +232,6 @@ public class LogAspect
|
|||
}
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 获取注解中对方法的描述信息 用于Controller层注解
|
||||
// *
|
||||
// * @param log 日志
|
||||
// * @param bmStorageLogList 物资日志
|
||||
// * @throws Exception
|
||||
// */
|
||||
// public void getControllerMethodDescriptionByMaterial(JoinPoint joinPoint, Log log, List<BmStorageLog> bmStorageLogList, Object jsonResult) throws Exception
|
||||
// {
|
||||
// // 设置标题
|
||||
//
|
||||
// // 获取参数的信息,传入到数据库中。
|
||||
// setRequestValue(joinPoint, materialLog, log.excludeParamNames());
|
||||
// // 保存response,参数和值
|
||||
//
|
||||
// }
|
||||
|
||||
/**
|
||||
* 获取请求的参数,放到log中
|
||||
*
|
||||
|
|
@ -280,6 +261,7 @@ public class LogAspect
|
|||
String requestMethod = ServletUtils.getRequest().getMethod();
|
||||
Map<?, ?> paramsMap = ServletUtils.getParamMap(ServletUtils.getRequest());
|
||||
if (StringUtils.isEmpty(paramsMap) && (HttpMethod.PUT.name().equals(requestMethod) || HttpMethod.POST.name().equals(requestMethod))) {
|
||||
// 盘点入库操作
|
||||
if (joinPoint.getArgs()[0] instanceof SavePutInfoDto) {
|
||||
SavePutInfoDto savePutInfoDto = (SavePutInfoDto) joinPoint.getArgs()[0];
|
||||
for (MachIneDto machineDto : savePutInfoDto.getMachIneDtoList()) {
|
||||
|
|
@ -288,9 +270,27 @@ public class LogAspect
|
|||
bmStorageLog.setTypeName(machineDto.getMaCode());
|
||||
bmStorageLog.setPreStoreNum(machineDto.getNum().intValue());
|
||||
bmStorageLog.setInNum(machineDto.getPutInStoreNum().intValue());
|
||||
bmStorageLog.setPostStoreNum(bmStorageLog.getPreStoreNum() + bmStorageLog.getInNum());
|
||||
bmStorageLogList.add(bmStorageLog);
|
||||
}
|
||||
}
|
||||
// 新购验收任务
|
||||
if (joinPoint.getArgs()[0] instanceof MaInputVO) {
|
||||
MaInputVO maInputVO = (MaInputVO) joinPoint.getArgs()[0];
|
||||
for (MaInputRecord maInputRecord : maInputVO.getInputRecordList()) {
|
||||
BmStorageLog bmStorageLog = new BmStorageLog();
|
||||
bmStorageLog.setTypeId(maInputRecord.getTypeId().intValue());
|
||||
bmStorageLog.setTypeName(maInputRecord.getMaCode());
|
||||
bmStorageLog.setPreStoreNum(maInputRecord.getNum().intValue());
|
||||
bmStorageLog.setInNum(maInputRecord.getInputNum().intValue());
|
||||
bmStorageLog.setPostStoreNum(bmStorageLog.getPreStoreNum() + bmStorageLog.getInNum());
|
||||
bmStorageLog.setTaskId(String.valueOf(maInputRecord.getTaskId()));
|
||||
bmStorageLogList.add(bmStorageLog);
|
||||
}
|
||||
}
|
||||
// 领料出库
|
||||
// 退料接收-完成退料
|
||||
// 二级库出入库
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue