入库人改为自动获取
This commit is contained in:
parent
b6b7612715
commit
8fd45a5d37
|
|
@ -68,9 +68,9 @@ public class PartInputServiceImpl implements PartInputService{
|
|||
try{
|
||||
String params=request.getParameter("params");
|
||||
PartInputVo vo= JSON.parseObject(params,PartInputVo.class);
|
||||
// if(StringHelper.isEmpty(vo.getInputUser())){
|
||||
// return ServerResponse.createErroe("请填写入库人");
|
||||
// }
|
||||
if(StringHelper.isEmpty(vo.getInputUser())){
|
||||
return ServerResponse.createErroe("请填写入库人");
|
||||
}
|
||||
if(StringHelper.isEmpty(vo.getInputDay())){
|
||||
return ServerResponse.createErroe("请填写入库日期");
|
||||
}
|
||||
|
|
@ -83,7 +83,6 @@ public class PartInputServiceImpl implements PartInputService{
|
|||
}
|
||||
Long userId= Objects.requireNonNull(UserUtil.getLoginUser()).getUserId();
|
||||
// String userName=UserUtil.getLoginUser().getUsername();
|
||||
// System.err.println(userName);
|
||||
vo.setInputUser(userId.toString());
|
||||
String code=getCode();
|
||||
vo.setCode(code);
|
||||
|
|
|
|||
|
|
@ -42,21 +42,20 @@
|
|||
|
||||
<!--分页查询-->
|
||||
<select id="findByPage" resultType="com.bonus.gzgqj.business.bases.entity.PartInputVo">
|
||||
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
|
||||
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>
|
||||
<if test="keyWord!=null and keyWord!=''">
|
||||
and (tpi.code like concat('%',#{keyWord},'%') or
|
||||
pu.`NAME` like concat('%',#{keyWord},'%') or
|
||||
tpi.input_day like concat('%',#{keyWord},'%') or
|
||||
tpi.remark like concat('%',#{keyWord},'%')
|
||||
tpi.input_user like concat('%',#{keyWord},'%') or
|
||||
tpi.input_day like concat('%',#{keyWord},'%') or
|
||||
tpi.remark like concat('%',#{keyWord},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="startDay!=null and startDay!='' and endDay!=null and endDay!='' ">
|
||||
and STR_TO_DATE(tpi.input_day, '%Y-%m-%d') between STR_TO_DATE(#{startDay} ,'%Y-%m-%d') AND STR_TO_DATE(#{endDay},'%Y-%m-%d')
|
||||
</if>
|
||||
<if test="startDay!=null and startDay!='' and endDay!=null and endDay!='' ">
|
||||
and STR_TO_DATE(tpi.input_day, '%Y-%m-%d') between STR_TO_DATE(#{startDay} ,'%Y-%m-%d') AND STR_TO_DATE(#{endDay},'%Y-%m-%d')
|
||||
</if>
|
||||
</where>
|
||||
order by tpi.create_time desc
|
||||
</select>
|
||||
|
|
@ -72,10 +71,9 @@
|
|||
</select>
|
||||
<!--查询 入库详情-->
|
||||
<select id="getInputDetails" resultType="com.bonus.gzgqj.business.bases.entity.PartInputVo">
|
||||
select tpi.id,tpi.code,tpi.creator,tpi.input_day inputDay,pu.`NAME` inputUser,
|
||||
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
|
||||
LEFT JOIN pm_user pu on pu.ID=tpi.input_user
|
||||
WHERE tpi.id=#{id}
|
||||
</select>
|
||||
<select id="getInfoById" resultType="java.lang.String">
|
||||
|
|
|
|||
Loading…
Reference in New Issue