highway
wws 1 year ago
parent c044825dd4
commit 32c08aaec5

@ -68,12 +68,6 @@ public interface EquOrderStandardMapper {
*/
List<EquOrderStandard> selectEquOrderStandardByParentCode(String code);
/**
*
* @param files
*/
void insertBaseFileBatch(List<BaseFileData> files);
/**
*
* @param equOrder

@ -62,6 +62,8 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
private EquEquipmentMapper equEquipmentMapper;
@Autowired
private EquSpareApplyMapper equSpareApplyMapper;
@Autowired
private EquFileMapper equFileMapper;
/**
@ -186,9 +188,10 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
file.setSourceId(standard.getId());
file.setCreateBy(SecurityUtils.getUsername());
file.setCreateTime(new Date());
file.setImageType("3");
files.add(file);
}
equOrderStandardMapper.insertBaseFileBatch(files);
equFileMapper.insertEquFileBatch(files);
}
// 校验标准信息-是否申请报修

@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import com.alibaba.nacos.shaded.org.checkerframework.checker.units.qual.A;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.common.core.context.SecurityContextHolder;
import com.op.common.core.domain.BaseFileData;
@ -50,6 +51,8 @@ public class EquOrderServiceImpl implements IEquOrderService {
private EquOrderEquSpareMapper equOrderEquSpareMapper;
@Autowired
private EquRepairOrderMapper equRepairOrderMapper;
@Autowired
private EquFileMapper equFileMapper;
/**
*
@ -178,9 +181,10 @@ public class EquOrderServiceImpl implements IEquOrderService {
file.setSourceId(standard.getId());
file.setCreateBy(SecurityUtils.getUsername());
file.setCreateTime(new Date());
file.setImageType("3");
files.add(file);
}
equOrderStandardMapper.insertBaseFileBatch(files);
equFileMapper.insertEquFileBatch(files);
}
// 校验标准信息-是否申请报修

@ -39,10 +39,11 @@
<result property="orderInspect" column="order_inspect" />
<result property="repairCode" column="repair_code" />
<result property="workCode" column="work_code" />
<result property="planRestrict" column="plan_restrict" />
</resultMap>
<sql id="selectEquOrderVo">
select order_id, plan_id, plan_code, plan_type, order_code, plan_workshop, plan_prod_line, plan_loop, plan_loop_type, plan_loop_start, plan_loop_end, order_start, order_end, equipment_code, order_status, order_cost, plan_person, order_cost_time, order_sign_person, factory_code, attr1, attr2, attr3, del_flag, create_by, create_time, update_by, update_time,upkeep,calculation_rule,shut_down,order_inspect,repair_code,work_code from equ_order
select order_id, plan_id, plan_code, plan_type, order_code, plan_workshop, plan_prod_line, plan_loop, plan_loop_type, plan_loop_start, plan_loop_end, order_start, order_end, equipment_code, order_status, order_cost, plan_person, order_cost_time, order_sign_person, factory_code, attr1, attr2, attr3, del_flag, create_by, create_time, update_by, update_time,upkeep,calculation_rule,shut_down,order_inspect,repair_code,work_code,plan_restrict from equ_order
</sql>
<select id="selectEquOrderList" parameterType="EquOrder" resultMap="EquOrderResult">
@ -80,6 +81,7 @@
<if test="orderInspect != null "> and order_inspect = #{orderInspect}</if>
<if test="repairCode != null "> and repair_code = #{repairCode}</if>
<if test="workCode != null "> and work_code = #{workCode}</if>
<if test="planRestrict != null "> and plan_restrict = #{planRestrict}</if>
and del_flag = '0'
<if test="(equipmentCode != null and equipmentCode != '') or (equipmentName != null and equipmentName != '')">
and order_code in (
@ -172,6 +174,7 @@
<if test="repairCode != null">repair_code,</if>
<if test="repairCode != null">repair_code,</if>
<if test="workCode != null">work_code,</if>
<if test="planRestrict != null">plan_restrict,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="orderId != null">#{orderId},</if>
@ -208,6 +211,7 @@
<if test="orderInspect != null">#{orderInspect},</if>
<if test="repairCode != null">#{repairCode},</if>
<if test="workCode != null">#{workCode},</if>
<if test="planRestrict != null">#{planRestrict},</if>
</trim>
</insert>
@ -247,6 +251,7 @@
<if test="orderInspect != null">order_inspect = #{orderInspect},</if>
<if test="repairCode != null">repair_code = #{repairCode},</if>
<if test="workCode != null">work_code = #{workCode},</if>
<if test="planRestrict != null">plan_restrict = #{planRestrict},</if>
</trim>
where order_id = #{orderId}
</update>

@ -137,22 +137,6 @@
</trim>
</insert>
<insert id="insertBaseFileBatch">
INSERT INTO base_file(file_id, file_name, file_address, source_id, remark, create_by, create_time)
VALUES
<foreach collection="baseFiles" index="" item="baseFile" separator=",">
(
#{baseFile.fileId},
#{baseFile.fileName},
#{baseFile.fileAddress},
#{baseFile.sourceId},
#{baseFile.remark},
#{baseFile.createBy},
#{baseFile.createTime}
)
</foreach>
</insert>
<update id="updateEquOrderStandard" parameterType="EquOrderStandard">
update equ_order_standard
<trim prefix="SET" suffixOverrides=",">

Loading…
Cancel
Save