Merge remote-tracking branch 'origin/master'
# Conflicts: # src/main/resources/mappers/app/PartApplyAppMapper.xml
This commit is contained in:
commit
f1f40d4374
|
|
@ -5,6 +5,7 @@ import cn.afterturn.easypoi.excel.entity.ExportParams;
|
|||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||
import com.bonus.gzgqj.business.bases.entity.PartInputDetails;
|
||||
import com.bonus.gzgqj.business.bases.entity.PartInputVo;
|
||||
import com.bonus.gzgqj.business.bases.entity.UserPatypeInfo;
|
||||
import com.bonus.gzgqj.business.bases.service.PartInputService;
|
||||
import com.bonus.gzgqj.business.plan.entity.PlanApplyBean;
|
||||
import com.bonus.gzgqj.business.plan.entity.PlanApplyBeanPlanExport;
|
||||
|
|
@ -177,6 +178,14 @@ public class PartInputController {
|
|||
return ServerResponse.createSuccess(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取中文名
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("getUserName")
|
||||
@DecryptAndVerify(decryptedClass = UserPatypeInfo.class)
|
||||
public ServerResponse getUserName(EncryptedReq<UserPatypeInfo> dto) {
|
||||
return service.getUserName(dto.getData());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.bonus.gzgqj.business.bases.entity.PaTypeVo;
|
|||
import com.bonus.gzgqj.business.bases.entity.PartInputDetails;
|
||||
import com.bonus.gzgqj.business.bases.entity.PartInputVo;
|
||||
|
||||
import com.bonus.gzgqj.business.bases.entity.UserPatypeInfo;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import java.util.List;
|
||||
|
|
@ -91,4 +92,11 @@ public interface PartInputMapper {
|
|||
* @return
|
||||
*/
|
||||
String getPzPrice(PartInputDetails detail);
|
||||
|
||||
/**
|
||||
* 查询入库详情
|
||||
* @param vo
|
||||
* @return
|
||||
*/
|
||||
UserPatypeInfo getUserName(UserPatypeInfo vo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.bonus.gzgqj.business.bases.service;
|
|||
|
||||
import com.bonus.gzgqj.business.bases.entity.PartInputDetails;
|
||||
import com.bonus.gzgqj.business.bases.entity.PartInputVo;
|
||||
import com.bonus.gzgqj.business.bases.entity.UserPatypeInfo;
|
||||
import com.bonus.gzgqj.manager.webResult.ServerResponse;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
|
|
@ -48,4 +49,11 @@ public interface PartInputService {
|
|||
* @return
|
||||
*/
|
||||
ServerResponse updateInputData(HttpServletRequest request, MultipartFile[] files);
|
||||
|
||||
/**
|
||||
* 获取中文名
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
ServerResponse getUserName(UserPatypeInfo data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON;
|
|||
import com.bonus.gzgqj.business.bases.entity.PaTypeVo;
|
||||
import com.bonus.gzgqj.business.bases.entity.PartInputDetails;
|
||||
import com.bonus.gzgqj.business.bases.entity.PartInputVo;
|
||||
import com.bonus.gzgqj.business.bases.entity.UserPatypeInfo;
|
||||
import com.bonus.gzgqj.business.bases.mapper.PartInputMapper;
|
||||
import com.bonus.gzgqj.business.plan.entity.FileUploadVo;
|
||||
import com.bonus.gzgqj.business.utils.FileUploadService;
|
||||
|
|
@ -83,7 +84,7 @@ public class PartInputServiceImpl implements PartInputService{
|
|||
}
|
||||
Long userId= Objects.requireNonNull(UserUtil.getLoginUser()).getUserId();
|
||||
// String userName=UserUtil.getLoginUser().getUsername();
|
||||
vo.setInputUser(userId.toString());
|
||||
// vo.setInputUser(userId.toString());
|
||||
String code=getCode();
|
||||
vo.setCode(code);
|
||||
vo.setCreator(userId.toString());
|
||||
|
|
@ -282,4 +283,24 @@ public class PartInputServiceImpl implements PartInputService{
|
|||
}
|
||||
return year+num;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取中文名
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ServerResponse getUserName(UserPatypeInfo data) {
|
||||
try{
|
||||
UserPatypeInfo vo=mapper.getUserName(data);
|
||||
if(vo!=null){
|
||||
return ServerResponse.createSuccess(vo);
|
||||
}else{
|
||||
return ServerResponse.createErroe("未找到该用户");
|
||||
}
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return ServerResponse.createSuccess(new UserPatypeInfo());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,14 +51,15 @@ public class PlanDataDetailBean {
|
|||
@Excel(name = "需用量", width = 10.0,height = 20.0, orderNum = "6")
|
||||
private int needNum;
|
||||
/**
|
||||
* 需用天数
|
||||
* 预计使用时间
|
||||
*/
|
||||
@Excel(name = "需用天数", width = 10.0,height = 20.0, orderNum = "7")
|
||||
|
||||
private String times;
|
||||
|
||||
/**
|
||||
* 退还日期
|
||||
*/
|
||||
@Excel(name = "预计使用时间", width = 15.0,height = 20.0, orderNum = "7")
|
||||
private String backDate;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -123,4 +123,10 @@
|
|||
from t_part_put_details ppd
|
||||
where ppd.part_id=#{partId}
|
||||
</select>
|
||||
|
||||
<select id="getUserName" resultType="com.bonus.gzgqj.business.bases.entity.UserPatypeInfo">
|
||||
select pu.name as userName
|
||||
from pm_user pu
|
||||
where id =#{userId}
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue