分页修改
This commit is contained in:
parent
91dd5a0e4c
commit
3f2cfe83aa
|
|
@ -63,7 +63,7 @@ public class PlanOutController {
|
|||
@GetMapping("getPorInfoDetail")
|
||||
@DecryptAndVerify(decryptedClass = ProNeedInfo.class)
|
||||
public PageInfo<ProNeedInfo> getPorInfoDetail(EncryptedReq<ProNeedInfo> dto) {
|
||||
PageHelper.startPage(dto.getData().getPageNum(),dto.getData().getPageSize());
|
||||
PageHelper.startPage(dto.getPageNum(),dto.getPageSize());
|
||||
PageInfo<ProNeedInfo> pageInfo = service.getPorInfoDetail(dto.getData());;
|
||||
return pageInfo;
|
||||
}
|
||||
|
|
@ -94,19 +94,26 @@ public class PlanOutController {
|
|||
|
||||
|
||||
/**
|
||||
* 发货接口
|
||||
* 查询批次数量
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("getOutTimes")
|
||||
@DecryptAndVerify(decryptedClass = ProNeedInfo.class)
|
||||
public ServerResponse getOutTimes(EncryptedReq<ProNeedInfo> dto) {
|
||||
return service.getOutTimes(dto.getData());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询批次详情
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("getOutDetails")
|
||||
@DecryptAndVerify(decryptedClass = ProNeedInfo.class)
|
||||
public PageInfo<ProNeedInfo> getOutDetails(EncryptedReq<ProNeedInfo> dto) {
|
||||
PageHelper.startPage(dto.getPageNum(),dto.getPageSize());
|
||||
PageInfo<ProNeedInfo> pageInfo = service.getOutDetails(dto.getData());;
|
||||
return pageInfo;
|
||||
public ServerResponse getOutDetails(EncryptedReq<ProNeedInfo> dto) {
|
||||
return service.getOutDetails(dto.getData());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
package com.bonus.gzgqj.business.plan.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 出货详情查询
|
||||
*/
|
||||
@Data
|
||||
public class OutDetailInfoVo {
|
||||
|
||||
private String userName;
|
||||
|
||||
}
|
||||
|
|
@ -43,4 +43,6 @@ public class ProAddInfoDetails {
|
|||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,6 +35,11 @@ public class ProNeedInfo extends PageInfo {
|
|||
* 需求类型 1计划 2新增
|
||||
*/
|
||||
private String needType;
|
||||
/**
|
||||
* 计划内外
|
||||
*/
|
||||
private String typeName;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
|
|
@ -69,4 +74,11 @@ public class ProNeedInfo extends PageInfo {
|
|||
* 数据源 1 计划 2 新增
|
||||
*/
|
||||
private String dataType;
|
||||
|
||||
/**
|
||||
* 进度
|
||||
*/
|
||||
private String progress;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ public class ProOutDetail {
|
|||
/**
|
||||
* 发货数量
|
||||
*/
|
||||
private int fhNum;
|
||||
private int num;
|
||||
/**
|
||||
* 挺住数量
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -98,4 +98,18 @@ public interface PlanOutMapper {
|
|||
* @return
|
||||
*/
|
||||
StatisticsVo getOverNum();
|
||||
|
||||
/**
|
||||
* 查询分页详情
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
List<ProNeedInfo> getOutDetails(ProNeedInfo data);
|
||||
|
||||
/**
|
||||
* 获取 发货批次
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
List<String> getOutTimes(ProNeedInfo data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,5 +46,17 @@ public interface PlanOutService {
|
|||
ServerResponse getStatistics();
|
||||
|
||||
|
||||
PageInfo<ProNeedInfo> getOutDetails(ProNeedInfo data);
|
||||
/**
|
||||
* 查询 发货批次接口
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
ServerResponse getOutTimes(ProNeedInfo data);
|
||||
|
||||
/**
|
||||
* 查询发货 详情
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
ServerResponse getOutDetails(ProNeedInfo data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -188,8 +188,28 @@ public class PlanOutServiceImpl implements PlanOutService{
|
|||
return ServerResponse.createSuccess(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询 发货批次接口
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public PageInfo<ProNeedInfo> getOutDetails(ProNeedInfo data) {
|
||||
public ServerResponse getOutTimes(ProNeedInfo data) {
|
||||
List<String> list=new ArrayList<>();
|
||||
try{
|
||||
list=mapper.getOutTimes(data);
|
||||
}catch (Exception e){
|
||||
list=new ArrayList<>();
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
return ServerResponse.createSuccess(list);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public ServerResponse getOutDetails(ProNeedInfo data) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
@ -197,7 +217,7 @@ public class PlanOutServiceImpl implements PlanOutService{
|
|||
public boolean planOutInfo(List<ProOutDetail> list,ProOutInfoVo vo,int allFhNum, int allTzNum){
|
||||
try {
|
||||
for (ProOutDetail details:list){
|
||||
allFhNum=allFhNum+details.getFhNum();
|
||||
allFhNum=allFhNum+details.getNum();
|
||||
allTzNum=allTzNum+details.getTzNum();
|
||||
//获取 计划数据
|
||||
ProNeedInfo data=mapper.getProNeedInfo(details);
|
||||
|
|
@ -210,17 +230,17 @@ public class PlanOutServiceImpl implements PlanOutService{
|
|||
BeanUtils.copyProperties(insertObj,data);
|
||||
insertObj.setOutId(vo.getId());
|
||||
insertObj.setDataType("1");
|
||||
insertObj.setFhNum(details.getFhNum());
|
||||
insertObj.setFhNum(details.getNum());
|
||||
insertObj.setTzNum(details.getTzNum());
|
||||
insertObj.setRemarks(details.getRemarks());
|
||||
int num2=mapper.insertProNeedDetails(insertObj);
|
||||
if(num2>=0){
|
||||
//更新 工程-计划-发货 清单表
|
||||
int fhNum=data.getFhNum();
|
||||
int tzNum=data.getFhNum();
|
||||
int tzNum=data.getTzNum();
|
||||
data.setRemarks(details.getRemarks());
|
||||
int fhNum2=details.getFhNum();
|
||||
int tzNum2=details.getFhNum();
|
||||
int fhNum2=details.getNum();
|
||||
int tzNum2=details.getTzNum();
|
||||
data.setFhNum(fhNum+fhNum2);
|
||||
data.setTzNum(tzNum+tzNum2);
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,9 @@
|
|||
</select>
|
||||
<select id="getPorInfoDetail" resultType="com.bonus.gzgqj.business.plan.entity.ProNeedInfo">
|
||||
select pni.id,pni.pro_id proId,pni.type,pni.name,pni.module,pni.module_id,pni.need_type needType,
|
||||
IFNULL(pni.unit,'-') unit ,pni.need_num needNum ,pni.fh_num fhNum ,pro.`NAME` proName ,IF(pni.need_num-pni.fh_num <0,0,pni.need_num-pni.fh_num) diff
|
||||
IFNULL(pni.unit,'-') unit ,pni.need_num needNum ,pni.fh_num fhNum ,pro.`NAME` proName ,
|
||||
IF(pni.need_num-pni.fh_num >0,pni.need_num-pni.fh_num,0) diff, IFNULL(ROUND((pni.fh_num+pni.tz_num)*100/pni.need_num,0),0) progress,
|
||||
IF(pni.need_type=1,'计划内','计划外') typeName ,pni.tz_num,pni.remarks
|
||||
from t_pro_need_info pni
|
||||
LEFT JOIN bm_project pro on pni.pro_id=pro.id
|
||||
<where>
|
||||
|
|
@ -108,5 +110,14 @@
|
|||
left join mm_type mt on pni.module_id=mt.id
|
||||
where pni.need_type=1
|
||||
</select>
|
||||
<select id="getOutDetails" resultType="com.bonus.gzgqj.business.plan.entity.ProNeedInfo">
|
||||
|
||||
|
||||
</select>
|
||||
<select id="getOutTimes" resultType="java.lang.String">
|
||||
select create_day
|
||||
from t_plan_out
|
||||
where pro_id=#{proId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue