|
|
@ -1,7 +1,11 @@
|
|
|
|
package com.hw.mes.service.impl;
|
|
|
|
package com.hw.mes.service.impl;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.hw.common.core.constant.MesConstants;
|
|
|
|
import com.hw.common.core.utils.DateUtils;
|
|
|
|
import com.hw.common.core.utils.DateUtils;
|
|
|
|
|
|
|
|
import com.hw.common.security.utils.SecurityUtils;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import com.hw.mes.mapper.MesBaseMaterialInfoMapper;
|
|
|
|
import com.hw.mes.mapper.MesBaseMaterialInfoMapper;
|
|
|
@ -15,8 +19,7 @@ import com.hw.mes.service.IMesBaseMaterialInfoService;
|
|
|
|
* @date 2023-12-21
|
|
|
|
* @date 2023-12-21
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Service
|
|
|
|
@Service
|
|
|
|
public class MesBaseMaterialInfoServiceImpl implements IMesBaseMaterialInfoService
|
|
|
|
public class MesBaseMaterialInfoServiceImpl implements IMesBaseMaterialInfoService {
|
|
|
|
{
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private MesBaseMaterialInfoMapper mesBaseMaterialInfoMapper;
|
|
|
|
private MesBaseMaterialInfoMapper mesBaseMaterialInfoMapper;
|
|
|
|
|
|
|
|
|
|
|
@ -27,8 +30,7 @@ public class MesBaseMaterialInfoServiceImpl implements IMesBaseMaterialInfoServi
|
|
|
|
* @return 物料信息
|
|
|
|
* @return 物料信息
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public MesBaseMaterialInfo selectMesBaseMaterialInfoByMaterialId(Long materialId)
|
|
|
|
public MesBaseMaterialInfo selectMesBaseMaterialInfoByMaterialId(Long materialId) {
|
|
|
|
{
|
|
|
|
|
|
|
|
return mesBaseMaterialInfoMapper.selectMesBaseMaterialInfoByMaterialId(materialId);
|
|
|
|
return mesBaseMaterialInfoMapper.selectMesBaseMaterialInfoByMaterialId(materialId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -39,8 +41,7 @@ public class MesBaseMaterialInfoServiceImpl implements IMesBaseMaterialInfoServi
|
|
|
|
* @return 物料信息
|
|
|
|
* @return 物料信息
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<MesBaseMaterialInfo> selectMesBaseMaterialInfoList(MesBaseMaterialInfo mesBaseMaterialInfo)
|
|
|
|
public List<MesBaseMaterialInfo> selectMesBaseMaterialInfoList(MesBaseMaterialInfo mesBaseMaterialInfo) {
|
|
|
|
{
|
|
|
|
|
|
|
|
return mesBaseMaterialInfoMapper.selectMesBaseMaterialInfoList(mesBaseMaterialInfo);
|
|
|
|
return mesBaseMaterialInfoMapper.selectMesBaseMaterialInfoList(mesBaseMaterialInfo);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -51,8 +52,7 @@ public class MesBaseMaterialInfoServiceImpl implements IMesBaseMaterialInfoServi
|
|
|
|
* @return 结果
|
|
|
|
* @return 结果
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public int insertMesBaseMaterialInfo(MesBaseMaterialInfo mesBaseMaterialInfo)
|
|
|
|
public int insertMesBaseMaterialInfo(MesBaseMaterialInfo mesBaseMaterialInfo) {
|
|
|
|
{
|
|
|
|
|
|
|
|
mesBaseMaterialInfo.setCreateTime(DateUtils.getNowDate());
|
|
|
|
mesBaseMaterialInfo.setCreateTime(DateUtils.getNowDate());
|
|
|
|
return mesBaseMaterialInfoMapper.insertMesBaseMaterialInfo(mesBaseMaterialInfo);
|
|
|
|
return mesBaseMaterialInfoMapper.insertMesBaseMaterialInfo(mesBaseMaterialInfo);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -64,9 +64,12 @@ public class MesBaseMaterialInfoServiceImpl implements IMesBaseMaterialInfoServi
|
|
|
|
* @return 结果
|
|
|
|
* @return 结果
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public int updateMesBaseMaterialInfo(MesBaseMaterialInfo mesBaseMaterialInfo)
|
|
|
|
public int updateMesBaseMaterialInfo(MesBaseMaterialInfo mesBaseMaterialInfo) {
|
|
|
|
{
|
|
|
|
|
|
|
|
mesBaseMaterialInfo.setUpdateTime(DateUtils.getNowDate());
|
|
|
|
mesBaseMaterialInfo.setUpdateTime(DateUtils.getNowDate());
|
|
|
|
|
|
|
|
mesBaseMaterialInfo.setUpdateBy(SecurityUtils.getUsername());
|
|
|
|
|
|
|
|
if (!mesBaseMaterialInfo.getBatchFlag().equals(MesConstants.IS_BATCH)) {
|
|
|
|
|
|
|
|
mesBaseMaterialInfo.setBatchAmount(BigDecimal.ONE);
|
|
|
|
|
|
|
|
}
|
|
|
|
return mesBaseMaterialInfoMapper.updateMesBaseMaterialInfo(mesBaseMaterialInfo);
|
|
|
|
return mesBaseMaterialInfoMapper.updateMesBaseMaterialInfo(mesBaseMaterialInfo);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -77,8 +80,7 @@ public class MesBaseMaterialInfoServiceImpl implements IMesBaseMaterialInfoServi
|
|
|
|
* @return 结果
|
|
|
|
* @return 结果
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public int deleteMesBaseMaterialInfoByMaterialIds(Long[] materialIds)
|
|
|
|
public int deleteMesBaseMaterialInfoByMaterialIds(Long[] materialIds) {
|
|
|
|
{
|
|
|
|
|
|
|
|
return mesBaseMaterialInfoMapper.deleteMesBaseMaterialInfoByMaterialIds(materialIds);
|
|
|
|
return mesBaseMaterialInfoMapper.deleteMesBaseMaterialInfoByMaterialIds(materialIds);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -89,14 +91,11 @@ public class MesBaseMaterialInfoServiceImpl implements IMesBaseMaterialInfoServi
|
|
|
|
* @return 结果
|
|
|
|
* @return 结果
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public int deleteMesBaseMaterialInfoByMaterialId(Long materialId)
|
|
|
|
public int deleteMesBaseMaterialInfoByMaterialId(Long materialId) {
|
|
|
|
{
|
|
|
|
|
|
|
|
return mesBaseMaterialInfoMapper.deleteMesBaseMaterialInfoByMaterialId(materialId);
|
|
|
|
return mesBaseMaterialInfoMapper.deleteMesBaseMaterialInfoByMaterialId(materialId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 查询物料信息列表
|
|
|
|
* 查询物料信息列表
|
|
|
|
*
|
|
|
|
*
|
|
|
@ -104,8 +103,7 @@ public class MesBaseMaterialInfoServiceImpl implements IMesBaseMaterialInfoServi
|
|
|
|
* @return 物料信息
|
|
|
|
* @return 物料信息
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<MesBaseMaterialInfo> selectMesBaseMaterialInfoListByMaterialIds(Long[] materialIds)
|
|
|
|
public List<MesBaseMaterialInfo> selectMesBaseMaterialInfoListByMaterialIds(Long[] materialIds) {
|
|
|
|
{
|
|
|
|
|
|
|
|
return mesBaseMaterialInfoMapper.selectMesBaseMaterialInfoListByMaterialIds(materialIds);
|
|
|
|
return mesBaseMaterialInfoMapper.selectMesBaseMaterialInfoListByMaterialIds(materialIds);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -117,16 +115,11 @@ public class MesBaseMaterialInfoServiceImpl implements IMesBaseMaterialInfoServi
|
|
|
|
* @return 物料信息
|
|
|
|
* @return 物料信息
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public List<MesBaseMaterialInfo> selectMaterialInfos4AllocationWarehouse(MesBaseMaterialInfo mesBaseMaterialInfo)
|
|
|
|
public List<MesBaseMaterialInfo> selectMaterialInfos4AllocationWarehouse(MesBaseMaterialInfo mesBaseMaterialInfo) {
|
|
|
|
{
|
|
|
|
|
|
|
|
return mesBaseMaterialInfoMapper.selectMaterialInfos4AllocationWarehouse(mesBaseMaterialInfo);
|
|
|
|
return mesBaseMaterialInfoMapper.selectMaterialInfos4AllocationWarehouse(mesBaseMaterialInfo);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 查询物料信息
|
|
|
|
* 查询物料信息
|
|
|
|
*
|
|
|
|
*
|
|
|
@ -134,8 +127,7 @@ public class MesBaseMaterialInfoServiceImpl implements IMesBaseMaterialInfoServi
|
|
|
|
* @return 物料信息
|
|
|
|
* @return 物料信息
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public MesBaseMaterialInfo selectMesBaseMaterialInfoByErpId(Long erpId)
|
|
|
|
public MesBaseMaterialInfo selectMesBaseMaterialInfoByErpId(Long erpId) {
|
|
|
|
{
|
|
|
|
|
|
|
|
return mesBaseMaterialInfoMapper.selectMesBaseMaterialInfoByErpId(erpId);
|
|
|
|
return mesBaseMaterialInfoMapper.selectMesBaseMaterialInfoByErpId(erpId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|