巡检工单填写记录

highway
wws 11 months ago
parent fc69128a8c
commit b865658cb2

@ -83,7 +83,7 @@ public class EquOrderController extends BaseController {
@Log(title = "计划工单", businessType = BusinessType.UPDATE) @Log(title = "计划工单", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody EquOrder equOrder) { public AjaxResult edit(@RequestBody EquOrder equOrder) {
return toAjax(equOrderService.updateEquOrder(equOrder)); return equOrderService.updateEquOrder(equOrder);
} }
/** /**

@ -42,7 +42,7 @@ public interface IEquOrderService {
* @param equOrder * @param equOrder
* @return * @return
*/ */
public int updateEquOrder(EquOrder equOrder); public AjaxResult updateEquOrder(EquOrder equOrder);
/** /**
* *

@ -5,6 +5,7 @@ import java.util.Date;
import java.util.List; import java.util.List;
import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.common.core.context.SecurityContextHolder;
import com.op.common.core.utils.DateUtils; import com.op.common.core.utils.DateUtils;
import com.op.common.core.web.domain.AjaxResult; import com.op.common.core.web.domain.AjaxResult;
import com.op.device.domain.EquOrderDetail; import com.op.device.domain.EquOrderDetail;
@ -98,8 +99,6 @@ public class EquOrderServiceImpl implements IEquOrderService {
@DS("#header.poolName") @DS("#header.poolName")
public AjaxResult insertEquOrder(EquOrder equOrder) { public AjaxResult insertEquOrder(EquOrder equOrder) {
equOrder.setCreateTime(DateUtils.getNowDate()); equOrder.setCreateTime(DateUtils.getNowDate());
// TODO 更新标准信息
// TODO 更新工单信息
return success(); return success();
} }
@ -111,13 +110,28 @@ public class EquOrderServiceImpl implements IEquOrderService {
*/ */
@Override @Override
@DS("#header.poolName") @DS("#header.poolName")
public int updateEquOrder(EquOrder equOrder) { public AjaxResult updateEquOrder(EquOrder equOrder) {
equOrder.setUpdateTime(DateUtils.getNowDate()); // 更新工单信息
// TODO 更新标准信息
// TODO 更新工单信息
equOrder.setOrderStart(equOrder.getTimeArray().get(0)); equOrder.setOrderStart(equOrder.getTimeArray().get(0));
equOrder.setOrderEnd(equOrder.getTimeArray().get(1)); equOrder.setOrderEnd(equOrder.getTimeArray().get(1));
return equOrderMapper.updateEquOrder(equOrder); equOrder.setUpdateTime(DateUtils.getNowDate());
equOrder.setUpdateBy(SecurityContextHolder.getUserName());
equOrderMapper.updateEquOrder(equOrder);
// 更新标准信息
List<EquOrderEqu> equList = equOrder.getEquList();
for (EquOrderEqu equ : equList) {
List<EquOrderDetail> detailList = equ.getDetailList();
for (EquOrderDetail detail : detailList) {
List<EquOrderStandard> standardList = detail.getStandardList();
for (EquOrderStandard standard : standardList) {
standard.setUpdateBy(SecurityContextHolder.getUserName());
standard.setUpdateTime(DateUtils.getNowDate());
equOrderStandardMapper.updateEquOrderStandard(standard);
}
}
}
return success();
} }
/** /**

@ -43,10 +43,10 @@
<include refid="selectEquOrderVo"/> <include refid="selectEquOrderVo"/>
<where> <where>
<if test="planId != null and planId != ''"> and plan_id = #{planId}</if> <if test="planId != null and planId != ''"> and plan_id = #{planId}</if>
<if test="planCode != null and planCode != ''"> and plan_code = #{planCode}</if> <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="planType != null and planType != ''"> and plan_type = #{planType}</if>
<if test="orderCode != null and orderCode != ''"> and order_code = #{orderCode}</if> <if test="orderCode != null and orderCode != ''"> and order_code like concat('%', #{orderCode}, '%')</if>
<if test="planWorkshop != null and planWorkshop != ''"> and plan_workshop = #{planWorkshop}</if> <if test="planWorkshop != null and planWorkshop != ''"> and plan_workshop like concat('%', #{planWorkshop}, '%')</if>
<if test="planProdLine != null and planProdLine != ''"> and plan_prod_line = #{planProdLine}</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="planLoop != null and planLoop != ''"> and plan_loop = #{planLoop}</if>
<if test="planLoopType != null and planLoopType != ''"> and plan_loop_type = #{planLoopType}</if> <if test="planLoopType != null and planLoopType != ''"> and plan_loop_type = #{planLoopType}</if>
@ -57,7 +57,7 @@
<if test="equipmentCode != null and equipmentCode != ''"> and equipment_code = #{equipmentCode}</if> <if test="equipmentCode != null and equipmentCode != ''"> and equipment_code = #{equipmentCode}</if>
<if test="orderStatus != null and orderStatus != ''"> and order_status = #{orderStatus}</if> <if test="orderStatus != null and orderStatus != ''"> and order_status = #{orderStatus}</if>
<if test="orderCost != null "> and order_cost = #{orderCost}</if> <if test="orderCost != null "> and order_cost = #{orderCost}</if>
<if test="planPerson != null and planPerson != ''"> and plan_person = #{planPerson}</if> <if test="planPerson != null and planPerson != ''"> and plan_person like concat('%', #{planPerson}, '%')</if>
<if test="orderCostTime != null and orderCostTime != ''"> and order_cost_time = #{orderCostTime}</if> <if test="orderCostTime != null and orderCostTime != ''"> and order_cost_time = #{orderCostTime}</if>
<if test="orderSignPerson != null and orderSignPerson != ''"> and order_sign_person = #{orderSignPerson}</if> <if test="orderSignPerson != null and orderSignPerson != ''"> and order_sign_person = #{orderSignPerson}</if>
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if> <if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
@ -65,9 +65,9 @@
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if> <if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if> <if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
<if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag}</if> <if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag}</if>
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if> <if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
<if test="createTime != null "> and create_time = #{createTime}</if> <if test="createTime != null "> and create_time = #{createTime}</if>
<if test="updateBy != null and updateBy != ''"> and update_by = #{updateBy}</if> <if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
<if test="updateTime != null "> and update_time = #{updateTime}</if> <if test="updateTime != null "> and update_time = #{updateTime}</if>
</where> </where>
</select> </select>

Loading…
Cancel
Save