新购绑定修改
This commit is contained in:
parent
572a5fdae1
commit
6a045c9901
|
|
@ -5,6 +5,7 @@ import com.bonus.common.core.web.controller.BaseController;
|
|||
import com.bonus.common.core.web.page.TableDataInfo;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import com.bonus.purchase.domain.BpmPurchaseInfo;
|
||||
import com.bonus.purchase.dto.PurchaseBindDto;
|
||||
import com.bonus.purchase.dto.PurchaseDto;
|
||||
import com.bonus.purchase.dto.PurchaseTaskDto;
|
||||
import com.bonus.purchase.service.BpmPurchaseBindService;
|
||||
|
|
@ -14,6 +15,7 @@ import com.bonus.purchase.vo.PurchaseVo;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Positive;
|
||||
import java.util.List;
|
||||
|
|
@ -56,4 +58,19 @@ public class BpmPurchaseBindController extends BaseController {
|
|||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新购管理--物资绑定
|
||||
*
|
||||
* @param bindDto 新购设备DTO
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping(value = "/addBind")
|
||||
@RequiresPermissions("purchase:bpmPurchaseInfo:add")
|
||||
public ResultBean<Object> addBind(@RequestBody PurchaseBindDto bindDto) {
|
||||
|
||||
int res = this.bpmPurchaseBindService.addBind(bindDto);
|
||||
|
||||
return ResultBean.toIsSuccess(1,"急急急");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import java.util.List;
|
|||
@RequestMapping("/purchase/store")
|
||||
public class BpmPurchaseStorageController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
|
||||
private BpmPurchaseStorageService purchaseStorageService;
|
||||
|
||||
@Autowired
|
||||
|
|
|
|||
|
|
@ -0,0 +1,37 @@
|
|||
package com.bonus.purchase.dto;
|
||||
|
||||
import com.bonus.purchase.domain.BpmPurchaseInfo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 新购模块查询传参类
|
||||
* @Author ma_sh
|
||||
* @create 2024/8/19 17:50
|
||||
*/
|
||||
@Data
|
||||
public class PurchaseBindDto {
|
||||
|
||||
@ApiModelProperty(value = "id")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "类型id")
|
||||
private Integer typeId;
|
||||
|
||||
@ApiModelProperty(value = "任务详细表dId")
|
||||
private String detailId;
|
||||
|
||||
@ApiModelProperty(value = "机具编号")
|
||||
private String maCode;
|
||||
|
||||
@ApiModelProperty(value = "出厂编号")
|
||||
private String productionCode;
|
||||
|
||||
@ApiModelProperty(value = "本次检验时间")
|
||||
private String thisCheckTime;
|
||||
|
||||
@ApiModelProperty(value="新购绑定设备列表")
|
||||
private List<PurchaseBindDto> dtoList;
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@ package com.bonus.purchase.service;
|
|||
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.purchase.domain.BpmPurchaseInfo;
|
||||
import com.bonus.purchase.dto.PurchaseBindDto;
|
||||
import com.bonus.purchase.dto.PurchaseDto;
|
||||
import com.bonus.purchase.vo.PurchaseAcceptVo;
|
||||
import com.bonus.purchase.vo.PurchaseVo;
|
||||
|
|
@ -17,4 +18,6 @@ public interface BpmPurchaseBindService {
|
|||
List<PurchaseVo> selectManageList(PurchaseDto purchaseDto);
|
||||
|
||||
List<PurchaseAcceptVo> getDetailsList(PurchaseDto record);
|
||||
|
||||
int addBind(PurchaseBindDto bindDto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.bonus.purchase.service.impl;
|
|||
import com.alibaba.nacos.common.utils.CollectionUtils;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.purchase.domain.BpmPurchaseInfo;
|
||||
import com.bonus.purchase.dto.PurchaseBindDto;
|
||||
import com.bonus.purchase.dto.PurchaseDto;
|
||||
import com.bonus.purchase.mapper.BpmPurchaseAcceptMapper;
|
||||
import com.bonus.purchase.mapper.BpmPurchaseBindMapper;
|
||||
|
|
@ -40,4 +41,21 @@ public class BpmPurchaseBindServiceImpl implements BpmPurchaseBindService {
|
|||
public List<PurchaseAcceptVo> getDetailsList(PurchaseDto record) {
|
||||
return mapper.getDetailsList(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int addBind(PurchaseBindDto bindDto) {
|
||||
int res =0;
|
||||
try{
|
||||
if(CollectionUtils.isNotEmpty(bindDto.getDtoList())){
|
||||
for(PurchaseBindDto dto:bindDto.getDtoList()){
|
||||
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.getMessage().toString();
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,14 +17,17 @@ public class PurchaseAcceptVo {
|
|||
|
||||
@ApiModelProperty(value="任务id")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value="任务详细id")
|
||||
private Integer detailId;
|
||||
@ApiModelProperty(value="typeId")
|
||||
private Integer typeId;
|
||||
@ApiModelProperty("物资名称")
|
||||
private String materialName;
|
||||
|
||||
@ApiModelProperty("规格型号")
|
||||
private String materialModel;
|
||||
private String specificationCode;
|
||||
|
||||
@ApiModelProperty(value="单位名称")
|
||||
@ApiModelProperty(value="单位")
|
||||
private String unitName;
|
||||
|
||||
@ApiModelProperty(value="供应商名称")
|
||||
|
|
@ -60,7 +63,8 @@ public class PurchaseAcceptVo {
|
|||
private Integer notaxPrice;
|
||||
|
||||
@ApiModelProperty(value="税率")
|
||||
private String taxRate;
|
||||
@Excel(name = "税率")
|
||||
private Integer taxRate;
|
||||
|
||||
@ApiModelProperty(value="验收数量")
|
||||
@Excel(name = "验收数量")
|
||||
|
|
@ -88,11 +92,4 @@ public class PurchaseAcceptVo {
|
|||
@ApiModelProperty(value="备注")
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(value = "二级明细id")
|
||||
private String purchaseId;
|
||||
|
||||
@ApiModelProperty(value = "管理类型0是编码1计数")
|
||||
private String manageType;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,9 +97,11 @@
|
|||
|
||||
<select id="getDetailsList" resultType="com.bonus.purchase.vo.PurchaseAcceptVo">
|
||||
SELECT
|
||||
bp.id,
|
||||
bp.task_id AS id,
|
||||
bp.id AS detailId,
|
||||
mt1.`name` AS materialName,
|
||||
mt.`name` AS specificationCode,
|
||||
bp.type_id AS typeId,
|
||||
sda.dict_label AS unitName,
|
||||
bp.purchase_price AS purchasePrice,
|
||||
bp.notax_price AS notaxPrice,
|
||||
|
|
|
|||
Loading…
Reference in New Issue