不获取外租资产类,入库人改为自动获取,以及其他修改
This commit is contained in:
parent
cf4fa55eff
commit
4b21b55246
|
|
@ -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("请填写入库日期");
|
||||
}
|
||||
|
|
@ -82,7 +82,9 @@ public class PartInputServiceImpl implements PartInputService{
|
|||
return ServerResponse.createErroe("请上传入库配件");
|
||||
}
|
||||
Long userId= Objects.requireNonNull(UserUtil.getLoginUser()).getUserId();
|
||||
// String userName=UserUtil.getLoginUser().getUsername();
|
||||
// String userName=UserUtil.getLoginUser().getUsername();
|
||||
// System.err.println(userName);
|
||||
vo.setInputUser(userId.toString());
|
||||
String code=getCode();
|
||||
vo.setCode(code);
|
||||
vo.setCreator(userId.toString());
|
||||
|
|
|
|||
|
|
@ -21,36 +21,39 @@ public class PlanDataDetailBean {
|
|||
private String applyId;
|
||||
|
||||
private String id;
|
||||
|
||||
@Excel(name = "工程名称", width = 10.0,height = 20.0, orderNum = "1")
|
||||
private String proName;
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
@Excel(name = "物机类型", width = 10.0,height = 20.0, orderNum = "1")
|
||||
@Excel(name = "物机类型", width = 10.0,height = 20.0, orderNum = "2")
|
||||
private String type;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@Excel(name = "物机名称", width = 10.0,height = 20.0, orderNum = "2")
|
||||
@Excel(name = "物机名称", width = 10.0,height = 20.0, orderNum = "3")
|
||||
private String typeName;
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
@Excel(name = "规格型号", width = 10.0,height = 20.0, orderNum = "3")
|
||||
@Excel(name = "规格型号", width = 10.0,height = 20.0, orderNum = "4")
|
||||
private String module;
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
@Excel(name = "单位", width = 10.0,height = 20.0, orderNum = "4")
|
||||
@Excel(name = "单位", width = 10.0,height = 20.0, orderNum = "5")
|
||||
private String unit;
|
||||
/**
|
||||
* 需用量
|
||||
*/
|
||||
@Excel(name = "需用量", width = 10.0,height = 20.0, orderNum = "5")
|
||||
@Excel(name = "需用量", width = 10.0,height = 20.0, orderNum = "6")
|
||||
private int needNum;
|
||||
/**
|
||||
* 需用天数
|
||||
*/
|
||||
@Excel(name = "需用天数", width = 10.0,height = 20.0, orderNum = "6")
|
||||
@Excel(name = "需用天数", width = 10.0,height = 20.0, orderNum = "7")
|
||||
private String times;
|
||||
/**
|
||||
* 备注
|
||||
|
|
@ -69,8 +72,5 @@ public class PlanDataDetailBean {
|
|||
private String model;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,9 +72,10 @@
|
|||
</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,
|
||||
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">
|
||||
|
|
|
|||
|
|
@ -152,22 +152,33 @@
|
|||
</select>
|
||||
<!-- 查询 内容集合-->
|
||||
<select id="getDetailsList" parameterType="com.bonus.gzgqj.business.plan.entity.PlanDataDetailBean" resultType="com.bonus.gzgqj.business.plan.entity.PlanDataDetailBean">
|
||||
select id,apply_id applyId,model_id moduleId,
|
||||
need_num needNum,need_day times,
|
||||
remark remarks,type,name typeName,
|
||||
module,unit
|
||||
from t_plan_details
|
||||
where apply_id=#{id}
|
||||
SELECT
|
||||
tpd.id,
|
||||
tpd.apply_id applyId,
|
||||
tpd.model_id moduleId,
|
||||
tpd.need_num needNum,
|
||||
tpd.need_day times,
|
||||
tpd.remark remarks,
|
||||
tpd.type,
|
||||
tpd.NAME typeName,
|
||||
tpd.module,
|
||||
tpd.unit,
|
||||
pro.`NAME` as proName
|
||||
FROM
|
||||
t_plan_details tpd
|
||||
LEFT JOIN t_plan_apply tpa on tpa.id=tpd.apply_id
|
||||
LEFT JOIN bm_project pro on tpa.project_id=pro.ID
|
||||
where tpd.apply_id=#{id}
|
||||
<if test="type!=null and type !=''">
|
||||
and type like concat('%',#{type},'%')
|
||||
and tpd.type like concat('%',#{type},'%')
|
||||
</if>
|
||||
<if test="name!=null and name !=''">
|
||||
and name like concat('%',#{name},'%')
|
||||
and tpd.name like concat('%',#{name},'%')
|
||||
</if>
|
||||
<if test="model!=null and model !=''">
|
||||
and module like concat('%',#{model},'%')
|
||||
and tpd.module like concat('%',#{model},'%')
|
||||
</if>
|
||||
ORDER BY id asc
|
||||
ORDER BY tpd.id asc
|
||||
</select>
|
||||
<!-- 查询 工程集合-->
|
||||
<select id="getProList" parameterType="com.bonus.gzgqj.business.plan.entity.PlanDevBean" resultType="com.bonus.gzgqj.business.plan.entity.PlanProBean">
|
||||
|
|
@ -177,21 +188,38 @@
|
|||
ORDER BY TIME desc
|
||||
</select>
|
||||
<select id="getTypeList" resultType="com.bonus.gzgqj.business.plan.entity.PlanDevBean">
|
||||
SELECT mt.ID id ,mt.PARENT_ID pId,mt.`LEVEL` level,mt.UNIT unit,mt.NUM num ,mt.`NAME` name ,mt1.`NAME` pName ,
|
||||
mt2.`NAME` ppName,"" needNum,"" times,"" remarks
|
||||
from mm_type mt
|
||||
LEFT JOIN mm_type mt1 on mt.PARENT_ID=mt1.id and mt1.IS_ACTIVE=1
|
||||
LEFT JOIN mm_type mt2 on mt1.PARENT_ID=mt2.id and mt2.IS_ACTIVE=1
|
||||
WHERE mt.IS_ACTIVE=1 and mt.`LEVEL`=4
|
||||
<if test="name!=null and name !=''">
|
||||
and mt.name like concat('%',#{name},'%')
|
||||
</if>
|
||||
<if test="pName!=null and pName !=''">
|
||||
and mt1.name like concat('%',#{pName},'%')
|
||||
</if>
|
||||
<if test="ppName!=null and ppName !=''">
|
||||
and mt2.name like concat('%',#{ppName},'%')
|
||||
</if>
|
||||
SELECT mt.ID id ,mt.PARENT_ID pId,mt.`LEVEL` level,mt.UNIT unit,mt.NUM num ,mt.`NAME` name ,mt1.`NAME` pName ,
|
||||
mt2.`NAME` ppName,"" needNum,"" times,"" remarks
|
||||
from mm_type mt
|
||||
LEFT JOIN mm_type mt1 on mt.PARENT_ID=mt1.id and mt1.IS_ACTIVE=1
|
||||
LEFT JOIN mm_type mt2 on mt1.PARENT_ID=mt2.id and mt2.IS_ACTIVE=1
|
||||
WHERE mt.IS_ACTIVE=1
|
||||
and mt.ID not in (
|
||||
SELECT
|
||||
ID
|
||||
FROM
|
||||
mm_type
|
||||
WHERE
|
||||
PARENT_ID IN (
|
||||
SELECT
|
||||
ID
|
||||
FROM
|
||||
mm_type
|
||||
WHERE
|
||||
PARENT_ID IN ( SELECT ID FROM mm_type WHERE PARENT_ID = ( SELECT ID FROM mm_type WHERE NAME = '外租资产类' AND
|
||||
PARENT_ID = 0 AND LEVEL = 1 ) )
|
||||
)
|
||||
)
|
||||
and mt.`LEVEL`=4
|
||||
<if test="name!=null and name !=''">
|
||||
and mt.name like concat('%',#{name},'%')
|
||||
</if>
|
||||
<if test="pName!=null and pName !=''">
|
||||
and mt1.name like concat('%',#{pName},'%')
|
||||
</if>
|
||||
<if test="ppName!=null and ppName !=''">
|
||||
and mt2.name like concat('%',#{ppName},'%')
|
||||
</if>
|
||||
|
||||
|
||||
ORDER BY mt.`NAME` desc
|
||||
|
|
|
|||
Loading…
Reference in New Issue