Browse Source

2025-10-20

过站采集固定载具改成选择
master
fengyuan_yang 3 months ago
parent
commit
ee965a71fd
  1. 29
      src/main/java/com/gaotao/modules/schedule/controller/ScheduleController.java
  2. 13
      src/main/java/com/gaotao/modules/schedule/mapper/ScheduleMapper.java
  3. 10
      src/main/java/com/gaotao/modules/schedule/service/ScheduleService.java
  4. 22
      src/main/java/com/gaotao/modules/schedule/service/impl/ScheduleServiceImpl.java
  5. 36
      src/main/resources/mapper/schedule/ScheduleMapper.xml

29
src/main/java/com/gaotao/modules/schedule/controller/ScheduleController.java

@ -1964,4 +1964,33 @@ public class ScheduleController extends AbstractController {
scheduleService.deleteSfdcMaterialHist(inData);
return R.ok(getLanguageMsg(SysMsgConstant.OBJECT_ID_200000));
}
/**
* @description: 获取固定载具列表
* @param params 请求参数包含sitecarrierNocarrierTypeNamespecification
* @return: com.gaotao.common.utils.R
*/
@PostMapping("getFixedCarrierList")
public R getFixedCarrierList(@RequestBody Map<String, Object> params) {
try {
String site = (String) params.get("site");
String carrierNo = (String) params.get("carrierNo");
String carrierTypeName = (String) params.get("carrierTypeName");
String specification = (String) params.get("specification");
// 参数校验
if (site == null || site.isEmpty()) {
return R.error("站点不能为空");
}
List<Map<String, Object>> carrierList = scheduleService.getFixedCarrierList(site, carrierNo, carrierTypeName, specification);
return R.ok()
.put("code", 0)
.put("msg", getLanguageMsg(SysMsgConstant.OBJECT_ID_200000))
.put("data", carrierList);
} catch (Exception e) {
logger.error("获取固定载具列表失败", e);
return R.error("获取固定载具列表失败: " + e.getMessage());
}
}
}

13
src/main/java/com/gaotao/modules/schedule/mapper/ScheduleMapper.java

@ -711,4 +711,17 @@ public interface ScheduleMapper {
*/
List<Map<String, String>> deleteSfdcMaterialHist(SFDCMaterialHistOutData inData);
/**
* @description: 获取固定载具列表
* @param site 站点
* @param carrierNo 标签条码模糊查询
* @param carrierTypeName 载具类型名称模糊查询
* @param specification 规格描述模糊查询
* @return: java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
*/
List<Map<String, Object>> getFixedCarrierList(@Param("site") String site,
@Param("carrierNo") String carrierNo,
@Param("carrierTypeName") String carrierTypeName,
@Param("specification") String specification);
}

10
src/main/java/com/gaotao/modules/schedule/service/ScheduleService.java

@ -1218,4 +1218,14 @@ public interface ScheduleService {
*/
void deleteSfdcMaterialHist(SFDCMaterialHistOutData inData);
/**
* @description: 获取固定载具列表
* @param site 站点
* @param carrierNo 标签条码模糊查询
* @param carrierTypeName 载具类型名称模糊查询
* @param specification 规格描述模糊查询
* @return: java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
*/
List<Map<String, Object>> getFixedCarrierList(String site, String carrierNo, String carrierTypeName, String specification);
}

22
src/main/java/com/gaotao/modules/schedule/service/impl/ScheduleServiceImpl.java

@ -7,6 +7,7 @@ import com.gaotao.common.exception.XJException;
import com.gaotao.common.utils.DateUtil;
import com.gaotao.common.utils.DateUtils;
import com.gaotao.common.utils.R;
import com.gaotao.modules.inboundNotification.service.impl.InboundNotificationServiceImpl;
import com.gaotao.modules.rollNoReview.data.SFDCMaterialHistOutData;
import com.gaotao.modules.schedule.data.*;
import com.gaotao.modules.schedule.data.dto.ScheduleDateShifDto;
@ -21,6 +22,8 @@ import com.gaotao.modules.schedule.service.ScheduleService;
import com.gaotao.modules.schedule.service.SchedulingService;
import com.gaotao.modules.shopOrder.entity.OperatorData;
import com.gaotao.modules.sys.service.SysMsgService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -39,6 +42,8 @@ import java.util.*;
*/
@Service
public class ScheduleServiceImpl implements ScheduleService {
private static final Logger logger = LoggerFactory.getLogger(InboundNotificationServiceImpl.class);
@Autowired
private ScheduleMapper scheduleMapper;
@Autowired
@ -5423,4 +5428,21 @@ public class ScheduleServiceImpl implements ScheduleService {
}
}
}
@Override
public List<Map<String, Object>> getFixedCarrierList(String site, String carrierNo, String carrierTypeName, String specification) {
logger.info("获取固定载具列表,站点: {}, 标签条码: {}, 载具类型名称: {}, 规格描述: {}",
site, carrierNo, carrierTypeName, specification);
try {
List<Map<String, Object>> carrierList = scheduleMapper.getFixedCarrierList(site, carrierNo, carrierTypeName, specification);
if (carrierList == null) {
carrierList = new ArrayList<>();
}
logger.info("获取固定载具列表成功,站点: {}, 记录数: {}", site, carrierList.size());
return carrierList;
} catch (Exception e) {
logger.error("获取固定载具列表失败,站点: {}, 错误信息: {}", site, e.getMessage(), e);
throw new RuntimeException("获取固定载具列表失败: " + e.getMessage(), e);
}
}
}

36
src/main/resources/mapper/schedule/ScheduleMapper.xml

@ -1866,4 +1866,40 @@
<select id="deleteSfdcMaterialHist" resultType="java.util.Map">
exec dbo.RemoveSfdcMaterialHist #{site},#{orderNo},#{itemNo},#{seqNo},#{rollNo},#{histSeqNo},#{histType}
</select>
<!-- 获取固定载具列表 -->
<select id="getFixedCarrierList" resultType="map">
SELECT
site,
bu_no AS buNo,
carrier_no AS carrierNo,
carrier_type_code AS carrierTypeCode,
carrier_type_name AS carrierTypeName,
specification,
asset_no AS assetNo,
dimensions,
max_weight AS maxWeight,
expected_life_cycles AS expectedLifeCycles,
expected_life_days AS expectedLifeDays,
status,
current_location AS currentLocation,
last_used_time AS lastUsedTime,
total_usage_count AS totalUsageCount,
purchase_date AS purchaseDate,
create_by AS createBy,
create_date AS createDate,
remark
FROM fixed_carrier
WHERE site = #{site}
<if test="carrierNo != null and carrierNo != ''">
AND carrier_no LIKE '%' + #{carrierNo} + '%'
</if>
<if test="carrierTypeName != null and carrierTypeName != ''">
AND carrier_type_name LIKE '%' + #{carrierTypeName} + '%'
</if>
<if test="specification != null and specification != ''">
AND specification LIKE '%' + #{specification} + '%'
</if>
ORDER BY carrier_no
</select>
</mapper>
Loading…
Cancel
Save