功能修改
This commit is contained in:
parent
73b8ebfd68
commit
fc67b62448
|
|
@ -75,7 +75,7 @@ public interface PartInputMapper {
|
|||
|
||||
/**
|
||||
* 修改 入库信息
|
||||
* @param list
|
||||
* @param data
|
||||
*/
|
||||
int uploadDetails(PartInputDetails data);
|
||||
|
||||
|
|
|
|||
|
|
@ -161,6 +161,15 @@
|
|||
pt.name like concat('%',#{name},'%')
|
||||
)
|
||||
</if>
|
||||
ORDER BY CASE
|
||||
WHEN pt.name REGEXP '^[0-9]+$' THEN 1
|
||||
ELSE 0
|
||||
END,
|
||||
CASE
|
||||
WHEN pt.name REGEXP '^[0-9]+$' THEN CAST(pt.name AS UNSIGNED)
|
||||
ELSE NULL
|
||||
END,
|
||||
pt.name ASC
|
||||
</select>
|
||||
<select id="getSqList" resultType="java.lang.Integer">
|
||||
select count(1)
|
||||
|
|
|
|||
|
|
@ -84,6 +84,15 @@
|
|||
<if test="model!=null and model !=''">
|
||||
and pt.name like concat('%',#{model},'%')
|
||||
</if>
|
||||
ORDER BY CASE
|
||||
WHEN pt.nam REGEXP '^[0-9]+$' THEN 1
|
||||
ELSE 0
|
||||
END,
|
||||
CASE
|
||||
WHEN pt.nam REGEXP '^[0-9]+$' THEN CAST(pt.nam AS UNSIGNED)
|
||||
ELSE NULL
|
||||
END,
|
||||
pt.nam ASC
|
||||
</select>
|
||||
|
||||
<select id="getVendList" resultType="com.bonus.gzgqj.business.bases.entity.VendVo">
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
</if>
|
||||
<if test="ckUser!=null and ckUser!=''">
|
||||
,ck_user=#{ckUser} ,ck_time=now()
|
||||
,zd_user=#{ckUser},zd_time=now()
|
||||
</if>
|
||||
where id=#{id}
|
||||
</update>
|
||||
|
|
@ -45,20 +46,40 @@
|
|||
order by tpa.create_time desc
|
||||
</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
|
||||
select tpa.id,
|
||||
tpa.code,
|
||||
pu.`NAME` as 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,
|
||||
pu2.`NAME` as zdUser,
|
||||
pu4.`NAME` as fzUser,
|
||||
pu3.`NAME` as 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}
|
||||
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.remark,
|
||||
|
|
|
|||
|
|
@ -42,13 +42,14 @@
|
|||
|
||||
<!--分页查询-->
|
||||
<select id="findByPage" resultType="com.bonus.gzgqj.business.bases.entity.PartInputVo">
|
||||
select tpi.id,tpi.code,tpi.creator,tpi.input_day inputDay,tpi.input_user inputUser,
|
||||
select tpi.id,tpi.code,tpi.creator,tpi.input_day inputDay,pu.`NAME` inputUser,
|
||||
tpi.input_num inputNum,tpi.all_price allPrice,tpi.remark,tpi.is_flag isFlag
|
||||
from t_part_input tpi
|
||||
LEFT JOIN pm_user pu on pu.ID=tpi.input_user
|
||||
<where>
|
||||
<if test="keyWord!=null and keyWord!=''">
|
||||
and (tpi.code like concat('%',#{keyWord},'%') or
|
||||
tpi.input_user like concat('%',#{keyWord},'%') or
|
||||
pu.`NAME` like concat('%',#{keyWord},'%') or
|
||||
tpi.input_day like concat('%',#{keyWord},'%') or
|
||||
tpi.remark like concat('%',#{keyWord},'%')
|
||||
)
|
||||
|
|
@ -71,10 +72,18 @@
|
|||
</select>
|
||||
<!--查询 入库详情-->
|
||||
<select id="getInputDetails" resultType="com.bonus.gzgqj.business.bases.entity.PartInputVo">
|
||||
select tpi.id,tpi.code,tpi.creator,tpi.input_day inputDay,tpi.input_user inputUser,
|
||||
tpi.input_num inputNum,tpi.all_price allPrice,tpi.remark,tpi.is_flag isFlag
|
||||
from t_part_input tpi
|
||||
WHERE tpi.id=#{id}
|
||||
select tpi.id,
|
||||
tpi.code,
|
||||
tpi.creator,
|
||||
tpi.input_day inputDay,
|
||||
pu.`NAME` inputUser,
|
||||
tpi.input_num inputNum,
|
||||
tpi.all_price allPrice,
|
||||
tpi.remark,
|
||||
tpi.is_flag isFlag
|
||||
from t_part_input tpi
|
||||
LEFT JOIN pm_user pu on pu.ID = tpi.input_user
|
||||
WHERE tpi.id = #{id}
|
||||
</select>
|
||||
<select id="getInfoById" resultType="java.lang.String">
|
||||
select CONCAT(part_name,":",SUM(input_num)) detail
|
||||
|
|
@ -99,6 +108,15 @@
|
|||
<if test="model!=null and model!=''">
|
||||
and ppd.part_model like concat('%',#{model},'%')
|
||||
</if>
|
||||
ORDER BY CASE
|
||||
WHEN ppd.part_model REGEXP '^[0-9]+$' THEN 1
|
||||
ELSE 0
|
||||
END,
|
||||
CASE
|
||||
WHEN ppd.part_model REGEXP '^[0-9]+$' THEN CAST(ppd.part_model AS UNSIGNED)
|
||||
ELSE NULL
|
||||
END,
|
||||
ppd.part_model ASC
|
||||
</select>
|
||||
<select id="getPzPrice" resultType="java.lang.String">
|
||||
select ROUND(IFNULL(AVG(part_price),0),2) price
|
||||
|
|
|
|||
Loading…
Reference in New Issue