库存表新增字段以及存值
This commit is contained in:
@@ -254,6 +254,9 @@ public class RkInfo extends BaseEntity
|
|||||||
/** 场景 */
|
/** 场景 */
|
||||||
@Excel(name = "场景",readConverterExp = "HJ=货架,DC=堆场")
|
@Excel(name = "场景",readConverterExp = "HJ=货架,DC=堆场")
|
||||||
private String scene;
|
private String scene;
|
||||||
|
|
||||||
|
private String sceneName;
|
||||||
|
|
||||||
public void setId(Long id)
|
public void setId(Long id)
|
||||||
{
|
{
|
||||||
this.id = id;
|
this.id = id;
|
||||||
@@ -808,6 +811,15 @@ public class RkInfo extends BaseEntity
|
|||||||
{
|
{
|
||||||
return scene;
|
return scene;
|
||||||
}
|
}
|
||||||
|
public void setSceneName(String sceneName)
|
||||||
|
{
|
||||||
|
this.sceneName = sceneName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSceneName()
|
||||||
|
{
|
||||||
|
return sceneName;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ import java.util.stream.Collectors;
|
|||||||
import com.zg.common.exception.ServiceException;
|
import com.zg.common.exception.ServiceException;
|
||||||
import com.zg.common.utils.DateUtils;
|
import com.zg.common.utils.DateUtils;
|
||||||
import com.zg.common.utils.StringUtils;
|
import com.zg.common.utils.StringUtils;
|
||||||
|
import com.zg.project.information.domain.PcdeDetail;
|
||||||
|
import com.zg.project.information.mapper.PcdeDetailMapper;
|
||||||
import com.zg.project.wisdom.domain.GysJh;
|
import com.zg.project.wisdom.domain.GysJh;
|
||||||
import com.zg.project.wisdom.domain.RkInfo;
|
import com.zg.project.wisdom.domain.RkInfo;
|
||||||
import com.zg.project.wisdom.domain.vo.RecordStatisticVO;
|
import com.zg.project.wisdom.domain.vo.RecordStatisticVO;
|
||||||
@@ -43,6 +45,8 @@ public class RkRecordServiceImpl implements IRkRecordService
|
|||||||
@Autowired
|
@Autowired
|
||||||
private GysJhMapper gysJhMapper;
|
private GysJhMapper gysJhMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PcdeDetailMapper pcdeDetailMapper;
|
||||||
/**
|
/**
|
||||||
* 查询出入库记录
|
* 查询出入库记录
|
||||||
*
|
*
|
||||||
@@ -199,6 +203,22 @@ public class RkRecordServiceImpl implements IRkRecordService
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* ---------- 同步库存(明确字段,禁止 BeanUtils) ---------- */
|
/* ---------- 同步库存(明确字段,禁止 BeanUtils) ---------- */
|
||||||
|
String scene = "";
|
||||||
|
// 库位校验
|
||||||
|
if (StringUtils.isNotBlank(info.getPcode())) {
|
||||||
|
PcdeDetail pcde = pcdeDetailMapper.selectByPcodeAndWarehouse(
|
||||||
|
rkRecord.getPcode(),
|
||||||
|
rkRecord.getCangku()
|
||||||
|
);
|
||||||
|
if (pcde == null) {
|
||||||
|
throw new RuntimeException("库位不存在:" + info.getPcode());
|
||||||
|
}
|
||||||
|
info.setPcodeId(pcde.getEncodedId());
|
||||||
|
if(StringUtils.isNotBlank(pcde.getScene())){
|
||||||
|
scene = pcde.getScene();
|
||||||
|
info.setScene(scene);
|
||||||
|
}
|
||||||
|
}
|
||||||
info.setRealQty(newInQty);
|
info.setRealQty(newInQty);
|
||||||
info.setWlNo(rkRecord.getWlNo());
|
info.setWlNo(rkRecord.getWlNo());
|
||||||
info.setWlMs(rkRecord.getWlMs());
|
info.setWlMs(rkRecord.getWlMs());
|
||||||
|
|||||||
@@ -67,13 +67,18 @@
|
|||||||
<result property="fycde2" column="fycde_2"/>
|
<result property="fycde2" column="fycde_2"/>
|
||||||
<result property="isUpdate" column="is_update"/>
|
<result property="isUpdate" column="is_update"/>
|
||||||
<result property="scene" column="scene"/>
|
<result property="scene" column="scene"/>
|
||||||
|
<result property="sceneName" column="sceneName"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<!-- ========================= 公共查询 SQL(联表完整版) ========================= -->
|
<!-- ========================= 公共查询 SQL(联表完整版) ========================= -->
|
||||||
<sql id="selectRkInfoVo">
|
<sql id="selectRkInfoVo">
|
||||||
SELECT
|
SELECT
|
||||||
ri.*,
|
ri.*,
|
||||||
|
CASE
|
||||||
|
WHEN ri.scene = 'HJ' THEN '货架'
|
||||||
|
WHEN ri.scene = 'DC' THEN '堆场'
|
||||||
|
ELSE ri.scene
|
||||||
|
END AS sceneName,
|
||||||
/* ===== 新增:计算总金额 ===== */
|
/* ===== 新增:计算总金额 ===== */
|
||||||
ri.real_qty * ri.ht_dj AS total_amount,
|
ri.real_qty * ri.ht_dj AS total_amount,
|
||||||
|
|
||||||
@@ -155,7 +160,9 @@
|
|||||||
<if test="remark != null and remark != ''">
|
<if test="remark != null and remark != ''">
|
||||||
AND ri.remark LIKE CONCAT('%', #{remark}, '%')
|
AND ri.remark LIKE CONCAT('%', #{remark}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="scene != null and scene != ''">
|
||||||
|
AND ri.scene LIKE CONCAT('%', #{scene}, '%')
|
||||||
|
</if>
|
||||||
<if test="isDelete != null and isDelete != ''">
|
<if test="isDelete != null and isDelete != ''">
|
||||||
AND ri.is_delete = #{isDelete}
|
AND ri.is_delete = #{isDelete}
|
||||||
</if>
|
</if>
|
||||||
@@ -241,6 +248,9 @@
|
|||||||
<if test="wlMs != null and wlMs != ''">
|
<if test="wlMs != null and wlMs != ''">
|
||||||
AND ri.wl_ms LIKE CONCAT('%', #{wlMs}, '%')
|
AND ri.wl_ms LIKE CONCAT('%', #{wlMs}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="scene != null and scene != ''">
|
||||||
|
AND ri.scene LIKE CONCAT('%', #{scene}, '%')
|
||||||
|
</if>
|
||||||
<if test="gysMc != null and gysMc != ''">
|
<if test="gysMc != null and gysMc != ''">
|
||||||
AND ri.gys_mc LIKE CONCAT('%', #{gysMc}, '%')
|
AND ri.gys_mc LIKE CONCAT('%', #{gysMc}, '%')
|
||||||
</if>
|
</if>
|
||||||
@@ -373,6 +383,7 @@
|
|||||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
<if test="isDelete != null">is_delete = #{isDelete},</if>
|
<if test="isDelete != null">is_delete = #{isDelete},</if>
|
||||||
|
<if test="scene != null">scene = #{scene}</if>
|
||||||
</trim>
|
</trim>
|
||||||
WHERE id = #{id}
|
WHERE id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
Reference in New Issue
Block a user