This commit is contained in:
parent
7244e07415
commit
6897604764
|
|
@ -76,6 +76,8 @@ public class PartApplyAppVo extends PageInfo {
|
|||
*/
|
||||
private String creater;
|
||||
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import com.bonus.gzgqj.business.utils.FileUploadService;
|
|||
import com.bonus.gzgqj.manager.common.util.DateTimeHelper;
|
||||
import com.bonus.gzgqj.manager.common.util.StringHelper;
|
||||
import com.bonus.gzgqj.manager.common.util.StringUtils;
|
||||
import com.bonus.gzgqj.manager.common.util.UserUtil;
|
||||
import com.bonus.gzgqj.manager.webResult.ServerResponse;
|
||||
import lombok.Data;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -23,6 +24,7 @@ import javax.servlet.http.HttpServletRequest;
|
|||
import java.lang.ref.PhantomReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author 黑子
|
||||
|
|
@ -89,6 +91,14 @@ public class PartApplyAppServiceImp {
|
|||
*/
|
||||
public ServerResponse addPartApply(PartApplyAppVo dto) {
|
||||
try{
|
||||
Long userId= Objects.requireNonNull(UserUtil.getLoginUser()).getUserId();
|
||||
String userName=UserUtil.getLoginUser().getUsername();
|
||||
if(StringHelper.isEmpty(dto.getCreater())){
|
||||
dto.setCreater(userId.toString());
|
||||
}
|
||||
if(StringHelper.isEmpty(dto.getUserName())){
|
||||
dto.setUserName(userName);
|
||||
}
|
||||
String detail=dto.getDetails();
|
||||
if(StringHelper.isEmpty(detail)){
|
||||
return ServerResponse.createErroe("请上传配件明细");
|
||||
|
|
|
|||
|
|
@ -127,6 +127,20 @@ public class PaTypeController {
|
|||
return pageInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询配件入库
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("findByPageList")
|
||||
@DecryptAndVerify(decryptedClass = PaTypeVo.class)
|
||||
public PageInfo<PaTypeVo> findByPageList(EncryptedReq<PaTypeVo> dto) {
|
||||
PageHelper.startPage(dto.getPageNum(),dto.getPageSize());
|
||||
List<PaTypeVo> list = service.findByPageList(dto.getData());;
|
||||
PageInfo<PaTypeVo> pageInfo = new PageInfo<>(list);
|
||||
return pageInfo;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 厂家下拉选
|
||||
|
|
|
|||
|
|
@ -55,9 +55,6 @@ public class PartApplyController {
|
|||
return service.getPartDetails(dto.getData());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 数据审核
|
||||
* @param dto
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public class PartBackController {
|
|||
|
||||
|
||||
/**
|
||||
* 退料人下拉选
|
||||
* 查询退料详情
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -60,6 +60,13 @@ public interface PaTypeMapper {
|
|||
*/
|
||||
List<PaTypeVo> findByPage(PaTypeVo data);
|
||||
|
||||
/**
|
||||
* 分页查询 配件
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
List<PaTypeVo> findByPageList(PaTypeVo data);
|
||||
|
||||
/**
|
||||
* 差价下拉选
|
||||
* @param data
|
||||
|
|
|
|||
|
|
@ -47,6 +47,13 @@ public interface PaTypeService {
|
|||
*/
|
||||
List<PaTypeVo> findByPage(PaTypeVo data);
|
||||
|
||||
/**
|
||||
* 分页查询类型列表
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
List<PaTypeVo> findByPageList(PaTypeVo data);
|
||||
|
||||
/**
|
||||
* 厂家下拉选
|
||||
* @param data
|
||||
|
|
|
|||
|
|
@ -158,6 +158,22 @@ public class PaTypeServiceImpl implements PaTypeService{
|
|||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询列表
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<PaTypeVo> findByPageList(PaTypeVo data) {
|
||||
List<PaTypeVo> list=new ArrayList<>();
|
||||
try{
|
||||
list=mapper.findByPageList(data);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询厂家下拉选
|
||||
* @param data
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ public class PlanAuditServiceImpl implements PlanAuditService {
|
|||
// shiro获取用户信息,shiro管理的session
|
||||
SelfUserEntity acount= UserUtil.getLoginUser();
|
||||
String userName=UserUtil.getLoginUser().getUsername();
|
||||
|
||||
System.err.println("userName===="+userName);
|
||||
String applyId=o.getApplyId();
|
||||
if(StringUtils.isEmpty(applyId)) {
|
||||
|
|
|
|||
|
|
@ -65,6 +65,27 @@
|
|||
and pt.name like concat('%',#{model},'%')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!--分页查询 节点数据-->
|
||||
<select id="findByPageList" resultType="com.bonus.gzgqj.business.bases.entity.PaTypeVo">
|
||||
select pt.id, pt.parent_id parentId,pt.name model ,
|
||||
0 price ,pt.unit ,pt.weight,pt.is_consumables ,
|
||||
pt.remarks,pt.is_active ,pt.level,pt.warn_num,pt1.`name` name ,pt2.name type
|
||||
FROM pa_type pt
|
||||
left join pa_type pt1 on pt.parent_id=pt1.id and pt1.`level`=2 and pt1.is_active=1
|
||||
left join pa_type pt2 on pt1.parent_id=pt2.id and pt2.`level`=1 and pt2.is_active=1
|
||||
WHERE pt.is_active=1 and pt.`level`=3
|
||||
<if test="type!=null and type !=''">
|
||||
and pt2.name like concat('%',#{type},'%')
|
||||
</if>
|
||||
<if test="name!=null and name !=''">
|
||||
and pt1.name like concat('%',#{name},'%')
|
||||
</if>
|
||||
<if test="model!=null and model !=''">
|
||||
and pt.name like concat('%',#{model},'%')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getVendList" resultType="com.bonus.gzgqj.business.bases.entity.VendVo">
|
||||
SELECT ID id,NAME name
|
||||
FROM mm_vender
|
||||
|
|
|
|||
|
|
@ -23,10 +23,8 @@
|
|||
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
|
||||
tpa.dev_type devType,
|
||||
tpa.status_type statusType,tpa.apply_num applyNum
|
||||
FROM t_part_apply tpa
|
||||
left join pm_user pu on tpa.creator=pu.id
|
||||
<where>
|
||||
|
|
@ -34,15 +32,15 @@
|
|||
and (
|
||||
tpa.code like('%',#{keyWord},'%') or
|
||||
tpa.user_name like('%',#{keyWord},'%') or
|
||||
tpa.remark like('%',#{keyWord},'%') or
|
||||
tpa.pro_name like('%',#{keyWord},'%')
|
||||
tpa.remark like('%',#{keyWord},'%')
|
||||
|
||||
)
|
||||
</if>
|
||||
<if test="startDay!=null and startDay!='' and endDay!=null and endDay!='' ">
|
||||
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>
|
||||
|
||||
</where>
|
||||
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,
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
and STR_TO_DATE(tpb.create_time, '%Y-%m-%d') between STR_TO_DATE(#{startDay} ,'%Y-%m-%d') AND STR_TO_DATE(#{endDay},'%Y-%m-%d')
|
||||
</if>
|
||||
</where>
|
||||
order by tpb.create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue