新购二级详情模块接口
This commit is contained in:
parent
f4d8dc4954
commit
231c914bea
|
|
@ -7,6 +7,7 @@ import com.bonus.purchase.domain.BpmPurchaseInfo;
|
||||||
import com.bonus.purchase.dto.PurchaseDto;
|
import com.bonus.purchase.dto.PurchaseDto;
|
||||||
import com.bonus.purchase.dto.PurchaseTaskDto;
|
import com.bonus.purchase.dto.PurchaseTaskDto;
|
||||||
import com.bonus.purchase.service.impl.BpmPurchaseInfoService;
|
import com.bonus.purchase.service.impl.BpmPurchaseInfoService;
|
||||||
|
import com.bonus.purchase.vo.PurchaseAcceptVo;
|
||||||
import com.bonus.purchase.vo.PurchaseVo;
|
import com.bonus.purchase.vo.PurchaseVo;
|
||||||
import com.bonus.task.service.BpmTaskService;
|
import com.bonus.task.service.BpmTaskService;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
@ -53,9 +54,9 @@ public class BpmPurchaseInfoController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/detailsList")
|
@GetMapping(value = "/detailsList")
|
||||||
@RequiresPermissions("purchase:bpmPurchaseInfo:query")
|
@RequiresPermissions("purchase:bpmPurchaseInfo:query")
|
||||||
public TableDataInfo getDetailsList(BpmPurchaseInfo bpmPurchaseInfo) {
|
public TableDataInfo getDetailsList(PurchaseDto record) {
|
||||||
startPage();
|
startPage();
|
||||||
List<BpmPurchaseInfo> list = this.bpmPurchaseInfoService.selectAll(bpmPurchaseInfo);
|
List<PurchaseAcceptVo> list = this.bpmPurchaseInfoService.getDetailsList(record);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,10 +37,10 @@ public class PurchaseDto {
|
||||||
@ApiModelProperty(value = "出厂日期")
|
@ApiModelProperty(value = "出厂日期")
|
||||||
private String productDate;
|
private String productDate;
|
||||||
|
|
||||||
@ApiModelProperty(value = "id集合")
|
@ApiModelProperty(value = "id列表")
|
||||||
private List<Integer> taskIds;
|
private List<Integer> taskIds;
|
||||||
|
|
||||||
@ApiModelProperty(value = "任务id集合")
|
@ApiModelProperty(value = "任务id")
|
||||||
private String taskId;
|
private String taskId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "二级明细id")
|
@ApiModelProperty(value = "二级明细id")
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.bonus.purchase.mapper;
|
package com.bonus.purchase.mapper;
|
||||||
import com.bonus.base.api.domain.MaType;
|
import com.bonus.base.api.domain.MaType;
|
||||||
import com.bonus.purchase.dto.PurchaseDto;
|
import com.bonus.purchase.dto.PurchaseDto;
|
||||||
|
import com.bonus.purchase.vo.PurchaseAcceptVo;
|
||||||
import com.bonus.purchase.vo.PurchaseVo;
|
import com.bonus.purchase.vo.PurchaseVo;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -35,6 +36,14 @@ public interface BpmPurchaseInfoMapper {
|
||||||
*/
|
*/
|
||||||
List<MaType> selectMaTypeCascader();
|
List<MaType> selectMaTypeCascader();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询---根据任务ID详情设备列表
|
||||||
|
*
|
||||||
|
* @param record 请求体
|
||||||
|
* @return 详情列表
|
||||||
|
*/
|
||||||
|
List<PurchaseAcceptVo> getDetailsList(PurchaseDto record);
|
||||||
|
|
||||||
MaType selectMaTypeById(@Param("id") Integer id);
|
MaType selectMaTypeById(@Param("id") Integer id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import com.bonus.common.core.utils.DateTimeHelper;
|
||||||
import com.bonus.common.core.utils.StringHelper;
|
import com.bonus.common.core.utils.StringHelper;
|
||||||
import com.bonus.common.security.utils.SecurityUtils;
|
import com.bonus.common.security.utils.SecurityUtils;
|
||||||
import com.bonus.purchase.dto.PurchaseDto;
|
import com.bonus.purchase.dto.PurchaseDto;
|
||||||
|
import com.bonus.purchase.vo.PurchaseAcceptVo;
|
||||||
import com.bonus.purchase.vo.PurchaseVo;
|
import com.bonus.purchase.vo.PurchaseVo;
|
||||||
import com.bonus.task.domain.BpmTask;
|
import com.bonus.task.domain.BpmTask;
|
||||||
import com.bonus.purchase.dto.PurchaseTaskDto;
|
import com.bonus.purchase.dto.PurchaseTaskDto;
|
||||||
|
|
@ -81,6 +82,16 @@ public class BpmPurchaseInfoService{
|
||||||
return bpmPurchaseInfoMapper.selectAll(bpmPurchaseInfo);
|
return bpmPurchaseInfoMapper.selectAll(bpmPurchaseInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询---根据任务ID详情设备列表
|
||||||
|
*
|
||||||
|
* @param record 请求体
|
||||||
|
* @return 详情列表
|
||||||
|
*/
|
||||||
|
public List<PurchaseAcceptVo> getDetailsList(PurchaseDto record) {
|
||||||
|
return bpmPurchaseInfoMapper.getDetailsList(record);
|
||||||
|
}
|
||||||
|
|
||||||
public int insertList(PurchaseTaskDto purchaseTaskDto) {
|
public int insertList(PurchaseTaskDto purchaseTaskDto) {
|
||||||
// 映射Dto至Pojo对象
|
// 映射Dto至Pojo对象
|
||||||
BpmTask task = new BpmTask();
|
BpmTask task = new BpmTask();
|
||||||
|
|
|
||||||
|
|
@ -670,4 +670,30 @@
|
||||||
left join ma_type mt1 ON mt.parent_id = mt1.id
|
left join ma_type mt1 ON mt.parent_id = mt1.id
|
||||||
where mt.is_active = '1' and mt.id = #{id,jdbcType=INTEGER}
|
where mt.is_active = '1' and mt.id = #{id,jdbcType=INTEGER}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getDetailsList" resultType="com.bonus.purchase.vo.PurchaseAcceptVo">
|
||||||
|
SELECT
|
||||||
|
bp.id,
|
||||||
|
mt1.`name` AS materialName,
|
||||||
|
mt.`name` AS specificationCode,
|
||||||
|
sda.dict_label AS unitName,
|
||||||
|
bp.purchase_price AS purchasePrice,
|
||||||
|
bp.notax_price AS notaxPrice,
|
||||||
|
bp.purchase_num AS purchaseNum,
|
||||||
|
bs.`name` AS supplierName,
|
||||||
|
bp.product_date AS productDate,
|
||||||
|
bp.`status` AS STATUS,
|
||||||
|
sda1.dict_label AS statusName
|
||||||
|
FROM
|
||||||
|
bpm_purchase_info bp
|
||||||
|
LEFT JOIN bpm_task bt ON bp.task_id = bt.id
|
||||||
|
LEFT JOIN ma_type mt ON bp.type_id = mt.id
|
||||||
|
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.id
|
||||||
|
LEFT JOIN sys_dict_data sda ON mt.unit_id = sda.dict_code
|
||||||
|
LEFT JOIN bm_supplier bs ON bp.supplier_id = bs.id
|
||||||
|
LEFT JOIN sys_dict_data sda1 ON sda1.dict_code = bp.`status`
|
||||||
|
WHERE
|
||||||
|
bp.is_active = '1'
|
||||||
|
AND bp.task_id = #{taskId,jdbcType=INTEGER}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue