数据接口
This commit is contained in:
parent
87d959f621
commit
cea67e683a
|
|
@ -74,7 +74,16 @@ public class PaTypeController {
|
|||
return service.deleteTypeData(dto.getData());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询 树集合
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("getTypeDetails")
|
||||
@DecryptAndVerify(decryptedClass = PaTypeVo.class)
|
||||
public ServerResponse getTypeDetails(EncryptedReq<PaTypeVo> dto) {
|
||||
return service.getTypeDetails(dto.getData());
|
||||
}
|
||||
/**
|
||||
* 分页查询配件入库
|
||||
* @param dto
|
||||
|
|
|
|||
|
|
@ -54,4 +54,6 @@ public class PaTypeVo {
|
|||
|
||||
private String type;
|
||||
|
||||
private String parentName;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,4 +48,11 @@ public interface PaTypeService {
|
|||
List<PaTypeVo> findByPage(PaTypeVo data);
|
||||
|
||||
ServerResponse getVendList(VendVo data);
|
||||
|
||||
/**
|
||||
* 依据id查询详情
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
ServerResponse getTypeDetails(PaTypeVo data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -174,5 +174,16 @@ public class PaTypeServiceImpl implements PaTypeService{
|
|||
return ServerResponse.createSuccess(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ServerResponse getTypeDetails(PaTypeVo data) {
|
||||
try{
|
||||
PaTypeVo vo=mapper.getTypeDetails(data.getId());
|
||||
return ServerResponse.createSuccess(vo);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return ServerResponse.createSuccess(new PaTypeVo());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,6 +57,15 @@ public class PartInputServiceImpl implements PartInputService{
|
|||
try{
|
||||
String params=request.getParameter("params");
|
||||
PartInputVo vo= JSON.parseObject(params,PartInputVo.class);
|
||||
if(StringHelper.isEmpty(vo.getCreator())){
|
||||
return ServerResponse.createErroe("请填写入库人");
|
||||
}
|
||||
if(StringHelper.isEmpty(vo.getInputDay())){
|
||||
return ServerResponse.createErroe("请填写入库日期");
|
||||
}
|
||||
if(files==null || files.length<=0){
|
||||
return ServerResponse.createErroe("未上传入库单");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -19,11 +19,12 @@
|
|||
WHERE is_active=1
|
||||
</select>
|
||||
<select id="getTypeDetails" resultType="com.bonus.gzgqj.business.bases.entity.PaTypeVo">
|
||||
select id,parent_id pId,name,num,
|
||||
price,unit,weight,is_consumables ,
|
||||
remarks,is_active ,level,warn_num
|
||||
FROM pa_type
|
||||
WHERE is_active=1 and id=#{id}
|
||||
select pt.id,pt.parent_id parentId,pt.name,pt.num,pt1.name parentName,
|
||||
pt.price,pt.unit,pt.weight,pt.is_consumables ,
|
||||
pt.remarks,pt.is_active ,pt.level,pt.warn_num
|
||||
FROM pa_type pt
|
||||
left join pa_type pt1 on pt.parent_id=pt1.id and pt1.`level`=2 and pt1.is_active=1
|
||||
WHERE pt.is_active=1 and id=#{id}
|
||||
</select>
|
||||
<select id="getChildList" resultType="java.lang.String">
|
||||
select id
|
||||
|
|
|
|||
Loading…
Reference in New Issue