点检、巡检、保养页面优化

highway
wws 10 months ago
parent 688fe5c39e
commit 74dfb91633

@ -153,6 +153,121 @@ public class EquOrder extends BaseEntity {
private String planRestrict;
private String outsourceCode;
private List<Date> loopStartArray;
private Date loopStart;
private Date loopEnd;
private List<Date> loopEndArray;
private Date loopEndArrayStart;
private Date getLoopEndArrayEnd;
private List<Date> orderStartArray;
private Date orderStartArrayStart;
private Date orderStartArrayEnd;
private List<Date> orderEndArray;
private Date orderEndArrayStart;
private Date orderEndArrayEnd;
public List<Date> getOrderStartArray() {
return orderStartArray;
}
public void setOrderStartArray(List<Date> orderStartArray) {
this.orderStartArray = orderStartArray;
}
public Date getOrderStartArrayStart() {
return orderStartArrayStart;
}
public void setOrderStartArrayStart(Date orderStartArrayStart) {
this.orderStartArrayStart = orderStartArrayStart;
}
public Date getOrderStartArrayEnd() {
return orderStartArrayEnd;
}
public void setOrderStartArrayEnd(Date orderStartArrayEnd) {
this.orderStartArrayEnd = orderStartArrayEnd;
}
public List<Date> getOrderEndArray() {
return orderEndArray;
}
public void setOrderEndArray(List<Date> orderEndArray) {
this.orderEndArray = orderEndArray;
}
public Date getOrderEndArrayStart() {
return orderEndArrayStart;
}
public void setOrderEndArrayStart(Date orderEndArrayStart) {
this.orderEndArrayStart = orderEndArrayStart;
}
public Date getOrderEndArrayEnd() {
return orderEndArrayEnd;
}
public void setOrderEndArrayEnd(Date orderEndArrayEnd) {
this.orderEndArrayEnd = orderEndArrayEnd;
}
public List<Date> getLoopEndArray() {
return loopEndArray;
}
public void setLoopEndArray(List<Date> loopEndArray) {
this.loopEndArray = loopEndArray;
}
public Date getLoopEndArrayStart() {
return loopEndArrayStart;
}
public void setLoopEndArrayStart(Date loopEndArrayStart) {
this.loopEndArrayStart = loopEndArrayStart;
}
public Date getGetLoopEndArrayEnd() {
return getLoopEndArrayEnd;
}
public void setGetLoopEndArrayEnd(Date getLoopEndArrayEnd) {
this.getLoopEndArrayEnd = getLoopEndArrayEnd;
}
public List<Date> getLoopStartArray() {
return loopStartArray;
}
public void setLoopStartArray(List<Date> loopStartArray) {
this.loopStartArray = loopStartArray;
}
public Date getLoopStart() {
return loopStart;
}
public void setLoopStart(Date loopStart) {
this.loopStart = loopStart;
}
public Date getLoopEnd() {
return loopEnd;
}
public void setLoopEnd(Date loopEnd) {
this.loopEnd = loopEnd;
}
public String getOutsourceCode() {
return outsourceCode;
}

@ -53,6 +53,8 @@ public class EquOrderServiceImpl implements IEquOrderService {
private EquRepairOrderMapper equRepairOrderMapper;
@Autowired
private EquFileMapper equFileMapper;
@Autowired
private EquPlanMapper equPlanMapper;
/**
*
@ -117,8 +119,40 @@ public class EquOrderServiceImpl implements IEquOrderService {
@Override
@DS("#header.poolName")
public List<EquOrder> selectEquOrderList(EquOrder equOrder) {
if (equOrder.getLoopStartArray() != null) {
equOrder.setLoopStart(equOrder.getLoopStartArray().get(0));
equOrder.setLoopEnd(equOrder.getLoopStartArray().get(1));
}
if (equOrder.getLoopEndArray() != null) {
equOrder.setLoopEndArrayStart(equOrder.getLoopEndArray().get(0));
equOrder.setGetLoopEndArrayEnd(equOrder.getLoopEndArray().get(1));
}
if (equOrder.getOrderStartArray() != null) {
equOrder.setOrderStartArrayStart(equOrder.getOrderStartArray().get(0));
equOrder.setOrderStartArrayEnd(equOrder.getOrderStartArray().get(1));
}
if (equOrder.getOrderEndArray() != null) {
equOrder.setOrderEndArrayStart(equOrder.getOrderEndArray().get(0));
equOrder.setOrderEndArrayEnd(equOrder.getOrderEndArray().get(1));
}
List<EquOrder> orderList = equOrderMapper.selectEquOrderList(equOrder);
//获取当前所选工厂
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String key = "#header.poolName";
String str = request.getHeader(key.substring(8));
int index = str.indexOf("_");
String factory = str.substring(index + 1);
List<WorkCenter> workCenters = equPlanMapper.selectWorkCenter(factory);
for (EquOrder order : orderList) {
for (WorkCenter center : workCenters) {
if (center.getFactoryCode().equals(order.getPlanWorkshop())) {
order.setWorkCenterName(center.getFactoryName());
}
}
order.setEquipmentName(equOrderMapper.selectEquipmentNameByEquCode(order.getEquipmentCode()));
}
return orderList;

@ -58,10 +58,11 @@
<if test="planCode != null and planCode != ''"> and plan_code like concat('%', #{planCode}, '%')</if>
<if test="planType != null and planType != ''"> and plan_type = #{planType}</if>
<if test="orderCode != null and orderCode != ''"> and order_code like concat('%', #{orderCode}, '%')</if>
<if test="planWorkshop != null and planWorkshop != ''"> and plan_workshop like concat('%', #{planWorkshop}, '%')</if>
<if test="planWorkshop != null and planWorkshop != ''"> and plan_workshop = #{planWorkshop}</if>
<if test="planProdLine != null and planProdLine != ''"> and plan_prod_line = #{planProdLine}</if>
<if test="planLoop != null and planLoop != ''"> and plan_loop = #{planLoop}</if>
<if test="planLoopType != null and planLoopType != ''"> and plan_loop_type = #{planLoopType}</if>
<if test="equipmentCode != null and equipmentCode != ''"> and equipment_code like concat('%', #{equipmentCode}, '%')</if>
<if test="planLoopStart != null "> and plan_loop_start = #{planLoopStart}</if>
<if test="planLoopEnd != null "> and plan_loop_end = #{planLoopEnd}</if>
<if test="orderStart != null "> and order_start = #{orderStart}</if>
@ -87,15 +88,15 @@
<if test="repairCode != null "> and repair_code = #{repairCode}</if>
<if test="outsourceCode != null "> and outsource_code = #{outsourceCode}</if>
<if test="workCode != null "> and work_code = #{workCode}</if>
<if test="loopStart != null "> and CONVERT(date,plan_loop_start) >= #{loopStart}</if>
<if test="loopEnd != null "> and #{loopEnd} >= CONVERT(date,plan_loop_start)</if>
<if test="loopEndArrayStart != null "> and CONVERT(date,plan_loop_end) >= #{loopEndArrayStart}</if>
<if test="getLoopEndArrayEnd != null "> and #{getLoopEndArrayEnd} >= CONVERT(date,plan_loop_end)</if>
<if test="orderStartArrayStart != null "> and CONVERT(date,order_start) >= #{orderStartArrayStart}</if>
<if test="orderStartArrayEnd != null "> and #{orderStartArrayEnd} >= CONVERT(date,order_start)</if>
<if test="orderEndArrayStart != null "> and CONVERT(date,order_end) >= #{orderEndArrayStart}</if>
<if test="orderEndArrayEnd != null "> and #{orderEndArrayEnd} >= CONVERT(date,order_end)</if>
and del_flag = '0'
<if test="(equipmentCode != null and equipmentCode != '') or (equipmentName != null and equipmentName != '')">
and order_code in (
select order_code from equ_order_equ
where equ_order.order_code = equ_order_equ.order_code
<if test="equipmentCode != null and equipmentCode != ''">and equ_order_equ.equipment_code like concat('%', #{equipmentCode}, '%')</if>
<if test="equipmentName != null and equipmentName != ''">and equ_order_equ.equipment_name like concat('%', #{equipmentName}, '%')</if>
)
</if>
</where>
</select>

Loading…
Cancel
Save