盘点入库修正
This commit is contained in:
parent
591b7fcbde
commit
c2970de1b8
|
|
@ -302,4 +302,9 @@ public class Type extends BaseEntity {
|
|||
|
||||
@ApiModelProperty(value="状态:默认0,其他为异常状态")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value="操作结果")
|
||||
private String resultMsg;
|
||||
|
||||
private Integer inputType;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -254,6 +254,7 @@ public class TypeServiceImpl implements ITypeService {
|
|||
type.setMaterialName(info.getMaterialName());
|
||||
type.setTypeName(info.getTypeName());
|
||||
type.setMethod("/warehousing/addList");
|
||||
type.setResultMsg("操作成功");
|
||||
type.setStatus(0);
|
||||
// 插入修改记录
|
||||
if ("1".equals(type.getStyle())) {
|
||||
|
|
@ -280,13 +281,25 @@ public class TypeServiceImpl implements ITypeService {
|
|||
} else {
|
||||
throw new RuntimeException("更新库存失败");
|
||||
}
|
||||
try {
|
||||
//盘点往bm_storage_log表
|
||||
if ("3".equals(type.getStyle())) {
|
||||
if(type.getMaId()!=null){
|
||||
type.setInputType(0);
|
||||
}else{
|
||||
type.setInputType(1);
|
||||
}
|
||||
typeMapper.insertBmStorageNumLog(type);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
type.setResultMsg("操作失败");
|
||||
type.setStatus(1);
|
||||
typeMapper.insertBmStorageNumLog(type);
|
||||
throw new RuntimeException("更新库存失败");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
} finally {
|
||||
}finally {
|
||||
// 释放锁
|
||||
lock.unlock();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1000,6 +1000,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
create_time,
|
||||
<if test="status != null">status,</if>
|
||||
<if test="createBy != null and createBy != ''">creator,</if>
|
||||
<if test="resultMsg != null and resultMsg != ''">result_msg,</if>
|
||||
<if test="inputType != null">input_type,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="modelTitle != null and modelTitle != ''">#{modelTitle},</if>
|
||||
|
|
@ -1014,6 +1016,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
NOW(),
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="resultMsg != null and resultMsg != ''">#{resultMsg},</if>
|
||||
<if test="inputType != null">#{inputType},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue