保养工单备件逻辑变更

highway
wws 1 year ago
parent 50d9d7c19e
commit fe57d99362

@ -300,13 +300,13 @@ public class EquOrder extends BaseEntity {
private List<EquOrderDetail> detailList; private List<EquOrderDetail> detailList;
private List<EquOrderEquSpare> spareList; private List<EquSpareApply> spareList;
public List<EquOrderEquSpare> getSpareList() { public List<EquSpareApply> getSpareList() {
return spareList; return spareList;
} }
public void setSpareList(List<EquOrderEquSpare> spareList) { public void setSpareList(List<EquSpareApply> spareList) {
this.spareList = spareList; this.spareList = spareList;
} }

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

@ -68,4 +68,11 @@ public interface EquSpareApplyMapper {
* @return * @return
*/ */
int selectSerialNumber(); int selectSerialNumber();
/**
* codelist
* @param orderCode
* @return
*/
List<EquSpareApply> selectEquSpareApplyListByParentCode(String orderCode);
} }

@ -62,8 +62,6 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
private EquSpareApplyMapper equSpareApplyMapper; private EquSpareApplyMapper equSpareApplyMapper;
@Autowired @Autowired
private EquFileMapper equFileMapper; private EquFileMapper equFileMapper;
@Autowired
private EquOrderEquSpareMapper equOrderEquSpareMapper;
/** /**
@ -135,7 +133,7 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
} }
// 备件 // 备件
List<EquOrderEquSpare> spareList = equOrderEquSpareMapper.selectEquOrderEquSpareByOrderCode(order.getOrderCode()); List<EquSpareApply> spareList = equSpareApplyMapper.selectEquSpareApplyListByParentCode(order.getOrderCode());
if (spareList != null) { if (spareList != null) {
order.setSpareList(spareList); order.setSpareList(spareList);
} }

@ -48,13 +48,13 @@ public class EquOrderServiceImpl implements IEquOrderService {
@Autowired @Autowired
private PersonMapper personMapper; private PersonMapper personMapper;
@Autowired @Autowired
private EquOrderEquSpareMapper equOrderEquSpareMapper;
@Autowired
private EquRepairOrderMapper equRepairOrderMapper; private EquRepairOrderMapper equRepairOrderMapper;
@Autowired @Autowired
private EquFileMapper equFileMapper; private EquFileMapper equFileMapper;
@Autowired @Autowired
private EquPlanMapper equPlanMapper; private EquPlanMapper equPlanMapper;
@Autowired
private EquSpareApplyMapper equSpareApplyMapper;
/** /**
* *
@ -91,7 +91,7 @@ public class EquOrderServiceImpl implements IEquOrderService {
order.setDetailList(detailList); order.setDetailList(detailList);
// 备件 // 备件
List<EquOrderEquSpare> spareList = equOrderEquSpareMapper.selectEquOrderEquSpareByOrderCode(order.getOrderCode()); List<EquSpareApply> spareList = equSpareApplyMapper.selectEquSpareApplyListByParentCode(order.getOrderCode());
if (spareList.size() > 0) { if (spareList.size() > 0) {
order.setSpareList(spareList); order.setSpareList(spareList);
} }

@ -36,7 +36,7 @@ public class InspectionWorkServiceImpl implements IInspectionWorkService {
@Autowired @Autowired
private EquOrderEquSpareMapper equOrderEquSpareMapper; private EquOrderEquSpareMapper equOrderEquSpareMapper;
@Autowired @Autowired
private EquOrderEquMapper equOrderEquMapper; private EquSpareApplyMapper equSpareApplyMapper;
/** /**
* *
@ -57,7 +57,7 @@ public class InspectionWorkServiceImpl implements IInspectionWorkService {
} }
// 查询备件信息 // 查询备件信息
List<EquOrderEquSpare> spareList = equOrderEquSpareMapper.selectEquOrderEquSpareByOrderCode(order.getOrderCode()); List<EquSpareApply> spareList = equSpareApplyMapper.selectEquSpareApplyListByParentCode(order.getOrderCode());
// 替换循环周期 // 替换循环周期
order.setPlanLoopType(equOrderMapper.changeLoopType(order.getPlanLoopType())); order.setPlanLoopType(equOrderMapper.changeLoopType(order.getPlanLoopType()));

@ -182,4 +182,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE CONVERT(date, GETDATE()) = CONVERT(date,create_time) and del_flag = '0' WHERE CONVERT(date, GETDATE()) = CONVERT(date,create_time) and del_flag = '0'
</select> </select>
<select id="selectEquSpareApplyListByParentCode" parameterType="String" resultMap="EquSpareApplyResult">
<include refid="selectEquSpareApplyVo"/>
where parent_code = #{orderCode} and del_flag = '0'
</select>
</mapper> </mapper>
Loading…
Cancel
Save