2024-11-12 10:51:15 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
|
|
|
|
<mapper namespace="com.bonus.gzgqj.business.bases.mapper.PartApplyMapper" >
|
2024-11-12 20:19:09 +08:00
|
|
|
<insert id="insertAuditRecord">
|
|
|
|
|
insert into t_part_apply_record(
|
|
|
|
|
apply_id, auditor, audit_time,
|
|
|
|
|
audit_status, audit_remark
|
|
|
|
|
)values (#{applyId},#{auditor},now(),#{auditStatus},#{auditRemark})
|
|
|
|
|
</insert>
|
|
|
|
|
<update id="updatePartInfo">
|
|
|
|
|
update t_part_apply set fz_user=#{fzUser},fz_time=now() ,status=#{status},status_type=#{statusType}
|
|
|
|
|
where id=#{id}
|
|
|
|
|
</update>
|
|
|
|
|
<!-- 领料 申请-->
|
|
|
|
|
<select id="findByPage" resultType="com.bonus.gzgqj.business.app.entity.PartApplyAppVo">
|
|
|
|
|
select tpa.id,tpa.code,tpa.creator,tpa.user_name userName,
|
|
|
|
|
tpa.create_time createTime,tpa.type ,
|
|
|
|
|
tpa.remark,tpa.status ,tpa.updater,pu.TELPHONE phone,
|
|
|
|
|
tpa.update_time updateTime,tpa.dev_id deviceId,tpa.dev_code devCode,
|
|
|
|
|
tpa.dev_type devType,tpa.pro_id proId,tpa.pro_name proName,
|
|
|
|
|
tpa.status_type statusType,tpa.apply_num applyNum,
|
|
|
|
|
tpa.zd_user zdUser,fz_user fzUser,ck_user ckUser,zd_time zdTime,fz_time fzTime,ck_time ckTime
|
|
|
|
|
FROM t_part_apply tpa
|
|
|
|
|
left join pm_user pu on tpa.creator=pu.id
|
|
|
|
|
<where>
|
|
|
|
|
<if test="keyWord!=null and keyWord!=''">
|
|
|
|
|
and (
|
|
|
|
|
tpa.code like('%',#{keyWord},'%') or
|
|
|
|
|
tpa.user_name like('%',#{keyWord},'%') or
|
|
|
|
|
tpa.remark like('%',#{keyWord},'%') or
|
|
|
|
|
tpa.pro_name like('%',#{keyWord},'%')
|
|
|
|
|
)
|
|
|
|
|
</if>
|
|
|
|
|
<if test="times!=null and times!='' and startDay!=null and endDay!=null ">
|
|
|
|
|
and STR_TO_DATE(tpa.create_time, '%Y-%m-%d') between STR_TO_DATE(#{startDay} ,'%Y-%m-%d') AND STR_TO_DATE(#{endDay},'%Y-%m-%d')
|
|
|
|
|
</if>
|
2024-11-12 10:51:15 +08:00
|
|
|
|
2024-11-12 20:19:09 +08:00
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
<select id="getPartDetails" resultType="com.bonus.gzgqj.business.app.entity.PartApplyAppVo">
|
|
|
|
|
select tpa.id,tpa.code,tpa.creator,tpa.user_name userName,
|
|
|
|
|
tpa.create_time createTime,tpa.type ,
|
|
|
|
|
tpa.remark,tpa.status ,tpa.updater,pu.TELPHONE phone,
|
|
|
|
|
tpa.update_time updateTime,tpa.dev_id deviceId,tpa.dev_code devCode,
|
|
|
|
|
tpa.dev_type devType,tpa.pro_id proId,tpa.pro_name proName,
|
|
|
|
|
tpa.status_type statusType,tpa.apply_num applyNum,
|
|
|
|
|
tpa.zd_user zdUser,fz_user fzUser,ck_user ckUser,zd_time zdTime,fz_time fzTime,ck_time ckTime,
|
|
|
|
|
pu.SIGN_URL lyUrl, pu2.SIGN_URL zdUrl ,pu3.SIGN_URL ckUrl ,pu4.SIGN_URL shUrl
|
|
|
|
|
FROM t_part_apply tpa
|
|
|
|
|
left join pm_user pu on tpa.creator=pu.id -- 领用人
|
|
|
|
|
left join pm_user pu2 on tpa.zd_user=pu2.id -- 制单人
|
|
|
|
|
left join pm_user pu3 on tpa.ck_user=pu3.id -- 出库人
|
|
|
|
|
left join pm_user pu4 on tpa.fz_user=pu4.id -- 审核人
|
|
|
|
|
where tpa.id=#{id}
|
|
|
|
|
</select>
|
|
|
|
|
<select id="getDetailsList" resultType="com.bonus.gzgqj.business.app.entity.PartApplyDetailAppVo">
|
|
|
|
|
select ppd.id,ppd.apply_id applyId, ppd.part_id partId, ppd.apply_num applyNum,
|
|
|
|
|
ppd.part_type partType, ppd.part_name partName, ppd.part_model partModel
|
|
|
|
|
from t_part_put_details ppd
|
|
|
|
|
where ppd.apply_id=#{id}
|
|
|
|
|
</select>
|
|
|
|
|
<!--审核状态-->
|
|
|
|
|
<select id="getAuditStatus" resultType="com.bonus.gzgqj.business.app.entity.PartApplyAppVo">
|
|
|
|
|
select tpa.id,tpa.code,tpa.creator,tpa.user_name userName,
|
|
|
|
|
tpa.create_time createTime,tpa.type ,
|
|
|
|
|
tpa.remark,tpa.status ,tpa.updater,
|
|
|
|
|
tpa.update_time updateTime,tpa.dev_id deviceId,tpa.dev_code devCode,
|
|
|
|
|
tpa.dev_type devType,tpa.pro_id proId,tpa.pro_name proName,
|
|
|
|
|
tpa.status_type statusType,tpa.apply_num applyNum,
|
|
|
|
|
tpa.zd_user zdUser,fz_user fzUser,ck_user ckUser,zd_time zdTime,fz_time fzTime,ck_time ckTime
|
|
|
|
|
FROM t_part_apply tpa
|
|
|
|
|
where tpa.id=#{id}
|
|
|
|
|
</select>
|
2024-11-12 10:51:15 +08:00
|
|
|
</mapper>
|