Merge branch '0.8.X' of http://49.232.154.205:10100/DeXun/klp-oa into 0.8.X
This commit is contained in:
@@ -156,6 +156,15 @@ public class WmsCoilPendingActionController extends BaseController {
|
||||
return toAjax(iWmsCoilPendingActionService.restoreAction(actionId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询待操作记录中,关联钢卷已是历史钢卷(dataType=0)且操作未完成(actionStatus != 2)的记录
|
||||
* 用于展示哪些操作虽然未完成,但钢卷已是历史钢卷,可手动完成
|
||||
*/
|
||||
@GetMapping("/staleList")
|
||||
public TableDataInfo<WmsCoilPendingActionVo> staleList( PageQuery pageQuery) {
|
||||
return iWmsCoilPendingActionService.queryStaleActionPageList(pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算理论节拍回归(默认近6个月),并返回散点+拟合线
|
||||
*/
|
||||
|
||||
@@ -18,6 +18,11 @@ public interface WmsCoilPendingActionMapper extends BaseMapperPlus<WmsCoilPendin
|
||||
|
||||
Page<WmsCoilPendingActionVo> selectVoPagePlus(Page<Object> build,@Param("ew") QueryWrapper<WmsCoilPendingAction> lqw);
|
||||
|
||||
/**
|
||||
* 分页查询待操作记录中,关联钢卷已是历史钢卷(dataType=0)且操作未完成(actionStatus != 2)的记录
|
||||
*/
|
||||
Page<WmsCoilPendingActionVo> selectStaleActionVoPagePlus(Page<?> page, @Param("ew") QueryWrapper<WmsCoilPendingAction> lqw);
|
||||
|
||||
/**
|
||||
* 仅返回 actionId 与 coilId
|
||||
*/
|
||||
|
||||
@@ -80,7 +80,13 @@ public interface IWmsCoilPendingActionService {
|
||||
Boolean restoreAction(Long actionId);
|
||||
|
||||
/**
|
||||
* 计算理论节拍线性回归(默认近6个月),同时返回散点用于前端绘图并将结果缓存。
|
||||
* 查询待操作记录中,关联钢卷已是历史钢卷(dataType=0)且操作未完成(actionStatus != 2)的记录
|
||||
* 用于展示哪些操作虽然未完成,但钢卷已是历史钢卷,可手动完成
|
||||
*/
|
||||
TableDataInfo<WmsCoilPendingActionVo> queryStaleActionPageList(PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 计算理论节拍线性回归(默认近6个月),并返回散点+拟合线
|
||||
*/
|
||||
TheoryCycleRegressionResultVo calcTheoryCycleRegression(Date startTime, Date endTime);
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ import com.klp.system.service.ISysUserService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
@@ -167,6 +168,19 @@ public class WmsCoilPendingActionServiceImpl implements IWmsCoilPendingActionSer
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询待操作记录中,关联钢卷已是历史钢卷(dataType=0)且操作未完成(actionStatus != 2)的记录
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public TableDataInfo<WmsCoilPendingActionVo> queryStaleActionPageList(PageQuery pageQuery) {
|
||||
QueryWrapper<WmsCoilPendingAction> lqw = Wrappers.query();
|
||||
lqw.ne("wcpa.action_status", 2);
|
||||
lqw.eq("wcpa.del_flag", 0);
|
||||
Page<WmsCoilPendingActionVo> result = baseMapper.selectStaleActionVoPagePlus(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WmsCoilPendingActionIdCoilVo> queryActionIdCoilIdList(WmsCoilPendingActionBo bo) {
|
||||
// 复用与 /list 相同的查询条件(buildQueryWrapperPlus)
|
||||
|
||||
@@ -90,6 +90,72 @@
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
<!-- 查询待操作记录中,关联钢卷已是历史钢卷(dataType=0)且操作未完成(actionStatus != 2)的记录 -->
|
||||
<select id="selectStaleActionVoPagePlus" resultType="com.klp.domain.vo.WmsCoilPendingActionVo">
|
||||
select
|
||||
wcpa.action_id as actionId,
|
||||
wcpa.coil_id as coilId,
|
||||
wcpa.current_coil_no as currentCoilNo,
|
||||
wcpa.action_type as actionType,
|
||||
wcpa.action_status as actionStatus,
|
||||
wcpa.scan_time as scanTime,
|
||||
wcpa.scan_device as scanDevice,
|
||||
wcpa.priority as priority,
|
||||
wcpa.source_type as sourceType,
|
||||
wcpa.warehouse_id as warehouseId,
|
||||
wcpa.operator_id as operatorId,
|
||||
wcpa.operator_name as operatorName,
|
||||
wcpa.process_time as processTime,
|
||||
wcpa.complete_time as completeTime,
|
||||
wcpa.processed_coil_ids as processedCoilIds,
|
||||
wcpa.remark as remark,
|
||||
wcpa.del_flag as delFlag,
|
||||
wcpa.create_time as createTime,
|
||||
wcpa.create_by as createBy,
|
||||
wcpa.update_time as updateTime,
|
||||
wcpa.update_by as updateBy,
|
||||
wmc.enter_coil_no as enterCoilNo,
|
||||
wmc.supplier_coil_no as supplierCoilNo,
|
||||
wmc.item_id as itemId,
|
||||
wmc.item_type as itemType,
|
||||
w.warehouse_name AS warehouseName,
|
||||
aw.actual_warehouse_name AS actualWarehouseName,
|
||||
CASE WHEN wmc.item_type = 'raw_material' THEN rm.specification
|
||||
WHEN wmc.item_type = 'product' THEN p.specification
|
||||
ELSE NULL END AS specification,
|
||||
CASE WHEN wmc.item_type = 'raw_material' THEN rm.material
|
||||
WHEN wmc.item_type = 'product' THEN p.material
|
||||
ELSE NULL END AS material,
|
||||
CASE WHEN wmc.item_type = 'raw_material' THEN rm.manufacturer
|
||||
WHEN wmc.item_type = 'product' THEN p.manufacturer
|
||||
ELSE NULL END AS manufacturer,
|
||||
CASE WHEN wmc.item_type = 'raw_material' THEN rm.surface_treatment_desc
|
||||
WHEN wmc.item_type = 'product' THEN p.surface_treatment_desc
|
||||
ELSE NULL END AS surfaceTreatmentDesc,
|
||||
CASE WHEN wmc.item_type = 'raw_material' THEN rm.zinc_layer
|
||||
WHEN wmc.item_type = 'product' THEN p.zinc_layer
|
||||
ELSE NULL END AS zincLayer,
|
||||
CASE
|
||||
WHEN wmc.item_type = 'raw_material' THEN rm.raw_material_name
|
||||
WHEN wmc.item_type = 'product' THEN p.product_name
|
||||
ELSE NULL
|
||||
END as itemName,
|
||||
CASE
|
||||
WHEN wmc.item_type = 'raw_material' THEN rm.raw_material_code
|
||||
WHEN wmc.item_type = 'product' THEN p.product_code
|
||||
ELSE NULL
|
||||
END as itemCode
|
||||
from wms_coil_pending_action wcpa
|
||||
inner join wms_material_coil wmc ON wcpa.coil_id = wmc.coil_id
|
||||
AND wmc.del_flag = 0
|
||||
AND wmc.data_type = 0
|
||||
LEFT JOIN wms_warehouse w ON wmc.warehouse_id = w.warehouse_id
|
||||
LEFT JOIN wms_actual_warehouse aw ON wmc.actual_warehouse_id = aw.actual_warehouse_id
|
||||
LEFT JOIN wms_raw_material rm ON wmc.item_type = 'raw_material' AND wmc.item_id = rm.raw_material_id
|
||||
LEFT JOIN wms_product p ON wmc.item_type = 'product' AND wmc.item_id = p.product_id
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
<!-- 仅返回 actionId 与 coilId -->
|
||||
<select id="selectActionIdCoilIdList" resultType="com.klp.domain.vo.WmsCoilPendingActionIdCoilVo">
|
||||
select
|
||||
|
||||
Reference in New Issue
Block a user