change - SAP订单查询

master
yinq 1 year ago
parent b6fcf4828b
commit 1b55fe0e78

@ -27,6 +27,14 @@ public interface BaseOrderInfoMapper {
*/ */
public List<BaseOrderInfo> selectBaseOrderInfoList(BaseOrderInfo baseOrderInfo); public List<BaseOrderInfo> selectBaseOrderInfoList(BaseOrderInfo baseOrderInfo);
/**
* ALL
*
* @param baseOrderInfo
* @return
*/
public List<BaseOrderInfo> selectAllOrderInfoList(BaseOrderInfo baseOrderInfo);
/** /**
* *
* *

@ -20,13 +20,21 @@ public interface IBaseOrderInfoService {
public BaseOrderInfo selectBaseOrderInfoByObjId(Long objId); public BaseOrderInfo selectBaseOrderInfoByObjId(Long objId);
/** /**
* *
* *
* @param baseOrderInfo * @param baseOrderInfo
* @return * @return
*/ */
public List<BaseOrderInfo> selectBaseOrderInfoList(BaseOrderInfo baseOrderInfo); public List<BaseOrderInfo> selectBaseOrderInfoList(BaseOrderInfo baseOrderInfo);
/**
* ALL
*
* @param baseOrderInfo
* @return
*/
public List<BaseOrderInfo> selectAllOrderInfoList(BaseOrderInfo baseOrderInfo);
/** /**
* *
* *

@ -42,6 +42,17 @@ public class BaseOrderInfoServiceImpl implements IBaseOrderInfoService {
return baseOrderInfoMapper.selectBaseOrderInfoList(baseOrderInfo); return baseOrderInfoMapper.selectBaseOrderInfoList(baseOrderInfo);
} }
/**
* ALL
*
* @param baseOrderInfo
* @return
*/
@Override
public List<BaseOrderInfo> selectAllOrderInfoList(BaseOrderInfo baseOrderInfo) {
return baseOrderInfoMapper.selectAllOrderInfoList(baseOrderInfo);
}
/** /**
* *
* *

@ -76,7 +76,8 @@
<if test="orderAmount != null ">and oi.order_amount = #{orderAmount}</if> <if test="orderAmount != null ">and oi.order_amount = #{orderAmount}</if>
<if test="completeAmount != null ">and oi.complete_amount = #{completeAmount}</if> <if test="completeAmount != null ">and oi.complete_amount = #{completeAmount}</if>
<if test="orderType != null and orderType != ''">and oi.order_type = #{orderType}</if> <if test="orderType != null and orderType != ''">and oi.order_type = #{orderType}</if>
<if test="orderStatus != null and orderStatus != ''">and oi.order_status = #{orderStatus}</if> <if test="orderStatus != null and orderStatus != '' and orderStatus != 'RELCRTD'">and oi.order_status LIKE #{orderStatus} || '%'</if>
<if test="orderStatus != null and orderStatus != '' and orderStatus == 'RELCRTD'">and (oi.order_status LIKE 'REL%' OR oi.order_status LIKE 'CRTD%')</if>
<if test="manualUpdateFlag != null and manualUpdateFlag != ''">and oi.manual_update_flag = #{manualUpdateFlag}</if> <if test="manualUpdateFlag != null and manualUpdateFlag != ''">and oi.manual_update_flag = #{manualUpdateFlag}</if>
<if test="beginDate != null ">and oi.begin_date = #{beginDate}</if> <if test="beginDate != null ">and oi.begin_date = #{beginDate}</if>
<if test="endDate != null ">and oi.end_date = #{endDate}</if> <if test="endDate != null ">and oi.end_date = #{endDate}</if>
@ -102,6 +103,19 @@
where obj_id = #{objId} where obj_id = #{objId}
</select> </select>
<select id="selectAllOrderInfoList" parameterType="BaseOrderInfo" resultMap="BaseOrderInfoResult">
<include refid="selectBaseOrderInfoVo"/>
<where>
<if test="orderCode != null and orderCode != ''">and oi.order_code = #{orderCode}</if>
<if test="materialCode != null and materialCode != ''">and oi.material_code = #{materialCode}</if>
<if test="materialName != null and materialName != ''">and oi.material_name like concat(concat('%',
#{materialName}), '%')
</if>
<if test="workCenterCode != null ">and oi.work_center_code = #{workCenterCode}</if>
</where>
order by oi.material_name, order_code desc
</select>
<insert id="insertBaseOrderInfo" parameterType="BaseOrderInfo"> <insert id="insertBaseOrderInfo" parameterType="BaseOrderInfo">
<selectKey keyProperty="objId" resultType="long" order="BEFORE"> <selectKey keyProperty="objId" resultType="long" order="BEFORE">
SELECT seq_base_orderinfo.NEXTVAL as objId FROM DUAL SELECT seq_base_orderinfo.NEXTVAL as objId FROM DUAL

@ -69,7 +69,22 @@ public class ProductPlanInfoServiceImpl implements IProductPlanInfoService {
@Override @Override
public int insertProductPlanInfo(ProductPlanInfo productPlanInfo) { public int insertProductPlanInfo(ProductPlanInfo productPlanInfo) {
productPlanInfo.setCreatedTime(DateUtils.getNowDate()); productPlanInfo.setCreatedTime(DateUtils.getNowDate());
return productPlanInfoMapper.insertProductPlanInfo(productPlanInfo); try {
ProductPlanInfo info = new ProductPlanInfo();
info.setOrderCode(productPlanInfo.getOrderCode());
info.setProductLineCode(productPlanInfo.getProductLineCode());
List<ProductPlanInfo> productPlanInfos = this.selectProductPlanInfoList(info);
if (productPlanInfos.size() > 0){
productPlanInfo.setUpdatedBy("user");
productPlanInfo.setObjId(productPlanInfos.get(0).getObjId());
return productPlanInfoMapper.updateProductPlanInfo(productPlanInfo);
}else {
return productPlanInfoMapper.insertProductPlanInfo(productPlanInfo);
}
} catch (Exception e) {
e.printStackTrace();
}
return 0;
} }
/** /**

@ -137,7 +137,7 @@ public class ReportQualityInspectionServiceImpl implements IReportQualityInspect
markLocation = i; markLocation = i;
} }
} }
if (markLocation <= 1){ if (markLocation <= 2){
return null; return null;
} }
BaseProductLine productLineInfo = productLineList.get(markLocation - 1); BaseProductLine productLineInfo = productLineList.get(markLocation - 1);

Loading…
Cancel
Save