报表优化

highway
wws 1 year ago
parent 362a8ac15a
commit 92615d8e28

@ -2,6 +2,7 @@ package com.op.device.domain.vo;
import com.op.device.domain.EquOrder;
import com.op.device.domain.EquOrderDetail;
import com.op.device.domain.EquOrderEquSpare;
import com.op.device.domain.Equipment;
import java.util.List;
@ -11,6 +12,15 @@ public class InspectionWorkVO {
private EquOrder order;
private Equipment equ;
private List<EquOrderDetail> detailList;
private List<EquOrderEquSpare> spareList;
public List<EquOrderEquSpare> getSpareList() {
return spareList;
}
public void setSpareList(List<EquOrderEquSpare> spareList) {
this.spareList = spareList;
}
public EquOrder getOrder() {
return order;

@ -65,4 +65,11 @@ public interface EquOrderEquSpareMapper {
* @return
*/
List<EquOrderEquSpare> selectEquOrderEquSpareByParentCode(String code);
/**
* code
* @param orderCode
* @return
*/
List<EquOrderEquSpare> selectEquOrderEquSpareByOrderCode(String orderCode);
}

@ -33,6 +33,8 @@ public class InspectionWorkServiceImpl implements IInspectionWorkService {
private EquOrderStandardMapper equOrderStandardMapper;
@Autowired
private EquPlanMapper equPlanMapper;
@Autowired
private EquOrderEquSpareMapper equOrderEquSpareMapper;
/**
*
@ -44,6 +46,7 @@ public class InspectionWorkServiceImpl implements IInspectionWorkService {
@DS("#header.poolName")
public AjaxResult selectEquOrderByOrderId(String orderId) {
InspectionWorkVO workVO = new InspectionWorkVO();
// 查询工单信息
EquOrder order = equOrderMapper.selectEquOrderByOrderId(orderId);
// 设置计划名称
EquPlan equPlan = equPlanMapper.selectEquPlanByPlanCode(order.getPlanCode());
@ -51,11 +54,15 @@ public class InspectionWorkServiceImpl implements IInspectionWorkService {
order.setPlanName(equPlan.getPlanName());
}
// 查询备件信息
List<EquOrderEquSpare> spareList = equOrderEquSpareMapper.selectEquOrderEquSpareByOrderCode(order.getOrderCode());
// 替换循环周期
order.setPlanLoopType(equOrderMapper.changeLoopType(order.getPlanLoopType()));
Equipment equipment = equipmentMapper.selectEquipmentByEquipmentCode(order.getEquipmentCode());
// 查询检查项、标准
List<EquOrderDetail> detailList = equOrderDetailMapper.selectEquOrderDetailByOrderCode(order.getOrderCode());
for (EquOrderDetail detail : detailList) {
List<EquOrderStandard> standardList = equOrderStandardMapper.selectEquOrderStandardByParentCode(detail.getCode());
@ -76,6 +83,8 @@ public class InspectionWorkServiceImpl implements IInspectionWorkService {
}
detail.setStandardList(standardList);
}
workVO.setSpareList(spareList);
workVO.setOrder(order);
workVO.setEqu(equipment);
workVO.setDetailList(detailList);

@ -55,6 +55,11 @@
where parent_code = #{parentCode}
</select>
<select id="selectEquOrderEquSpareByOrderCode" parameterType="String" resultMap="EquOrderEquSpareResult">
<include refid="selectEquOrderEquSpareVo"/>
where order_code = #{orderCode}
</select>
<insert id="insertEquOrderEquSpare" parameterType="EquOrderEquSpare">
insert into equ_order_equ_spare
<trim prefix="(" suffix=")" suffixOverrides=",">

Loading…
Cancel
Save