Browse Source

[feat] 采购入库报价修改导出,采购订单过滤转为入库单号通知到货数为空时,不新增。

dev
zhangsiqi 4 months ago
parent
commit
861c8ba40b
  1. 9
      ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseOrderController.java
  2. 15
      ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchasePlan.java
  3. 1
      ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseQuoteMapper.java
  4. 2
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseQuoteService.java
  5. 6
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseOrderServiceImpl.java
  6. 8
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteServiceImpl.java
  7. 49
      ruoyi-admin/src/main/resources/mapper/purchase/PurchaseQuoteMapper.xml
  8. 9
      ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/add.html
  9. 4
      ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/purchaseOrder.html
  10. 3
      ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/taskFzjlVerify.html

9
ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseOrderController.java

@ -277,7 +277,6 @@ public class PurchaseOrderController extends BaseController
@ModelAttribute("preloadObj") PurchaseOrderVo purchaseOrderVo, HttpServletRequest request) {
boolean saveEntityBoolean = BooleanUtils.toBoolean(saveEntity);
String instanceId = purchaseOrderVo.getInstanceId();
String instanceType = purchaseOrderVo.getInstanceType();
boolean approvedFlag = processService.complete(taskId, instanceId, purchaseOrderVo.getApplyTitle(), purchaseOrderVo.getPurchaseOrderCode(),
"purchaseOrder", new HashMap<String, Object>(), request);
@ -294,7 +293,9 @@ public class PurchaseOrderController extends BaseController
if("submit".equals(instanceType)){
// 使用状态-是
purchaseOrderVo.setUseStatus("1");
purchaseOrderService.addPurchaseOrderPayable(purchaseOrderVo);
// if(purchaseOrderVo.getPurchaseOrderChildList().addAll(purchaseOrderVo.getPurchaseOrderChildList())){
// purchaseOrderService.addPurchaseOrderPayable(purchaseOrderVo);
// }
}
// 作废
else if("cancel".equals(instanceType)){
@ -471,11 +472,11 @@ public class PurchaseOrderController extends BaseController
return Result.getSuccessResult(purchaseOrderService.getId());
}
@GetMapping ("/getEngineerList")
@GetMapping ("/getPurchaser")
@ResponseBody
public TableDataInfo getEngineerList(){
startPage();
List<SysUser> list = sysUserService.selectRoleToUserList("cgyRole,cgjlRole,cgzgRole,fzjlRole");
List<SysUser> list = sysUserService.selectRoleToUserList("cgyRole,cgjlRole,cgzgRole");
return getDataTable(list);
}
}

15
ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchasePlan.java

@ -5,6 +5,8 @@ import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.util.List;
/**
* 采购计划单对象 purchase_plan
*
@ -68,7 +70,18 @@ public class PurchasePlan extends BaseEntity
/** 使用状态 */
private String useStatus;
public void setPurchasePlanId(Long purchasePlanId)
private List<PurchasePlanChild> purchasePlanDetailList;
public List<PurchasePlanChild> getPurchasePlanDetailList() {
return purchasePlanDetailList;
}
public void setPurchasePlanDetailList(List<PurchasePlanChild> purchasePlanDetailList) {
this.purchasePlanDetailList = purchasePlanDetailList;
}
public void setPurchasePlanId(Long purchasePlanId)
{
this.purchasePlanId = purchasePlanId;
}

1
ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseQuoteMapper.java

@ -107,4 +107,5 @@ public interface PurchaseQuoteMapper
public Integer cancelPurchaseQuoteByQuoteCodes(String[] purchaseQuoteCodes);
public Page<PurchaseQuote> selectPurchaseQuoteList2(PurchaseQuote purchaseQuote);
}

2
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseQuoteService.java

@ -30,6 +30,8 @@ public interface IPurchaseQuoteService
*/
public Page<PurchaseQuoteVo> selectPurchaseQuoteList(PurchaseQuote purchaseQuote);
public Page<PurchaseQuote> selectPurchaseQuoteList2(PurchaseQuote purchaseQuoteVo);
/**
* 新增采购报价单
*

6
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseOrderServiceImpl.java

@ -51,8 +51,6 @@ import java.util.*;
import java.util.stream.Collectors;
import static com.github.pagehelper.page.PageMethod.offsetPage;
import static com.github.pagehelper.page.PageMethod.startPage;
/**
* 采购订单Service业务层处理
@ -451,6 +449,8 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService
List<WarehouseStorageOrder> warehouseStorageOrderList = warehouseStorageOrderMapper.selectWarehouseStorageOrderList(warehouseStorageOrder1);
List<WarehouseStorageOrderDetail> list = warehouseStorageOrder.getWarehouseStorageOrderDetailList();
//子表中通知到货数位过滤掉物料数位空
list = list.stream().filter(e -> (e.getNotifyArriveNum() != null)).collect(Collectors.toList());
int result = 0;
if(!CollectionUtils.isEmpty(list)) {
//根据物料入库部门划分入库单,入库单类型:0 仓库,1 采购,生成入库单号
@ -524,7 +524,7 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService
@Transactional(rollbackFor = Exception.class)
@Override
public Integer addPurchaseOrderPayable(PurchaseOrder purchaseOrder) {
public Integer addPurchaseOrderPayable(PurchaseOrder purchaseOrder){
//根据供应商划分物料信息,合计物料不含税单价 ,含税单价,含税总价,不含税总价,实际采购数量
// 获取采购订单的子项列表
List<PurchaseOrderChild> children = purchaseOrder.getPurchaseOrderChildList();

8
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteServiceImpl.java

@ -149,6 +149,14 @@ public class PurchaseQuoteServiceImpl implements IPurchaseQuoteService
return returnList;
}
@Override
public Page<PurchaseQuote> selectPurchaseQuoteList2(PurchaseQuote purchaseQuote){
PageDomain pageDomain = TableSupport.buildPageRequest();
Integer pageNum = pageDomain.getPageNum();
Integer pageSize = pageDomain.getPageSize();
Page<PurchaseQuote> list = purchaseQuoteMapper.selectPurchaseQuoteList2(purchaseQuote);
return list;
}
/**
* 新增采购报价单
*

49
ruoyi-admin/src/main/resources/mapper/purchase/PurchaseQuoteMapper.xml

@ -90,7 +90,54 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
order by p.create_time desc
</select>
<select id="selectPurchaseQuoteList2" parameterType="PurchaseQuote" resultMap="PurchaseQuoteResult">
select p.purchase_quote_id, p.purchase_quote_code, p.purchaseBuyer,
p.supplier_quote_code, p.supplier_name, p.tax_rate, p.material_amount,
p.pricingDate, p.material_no,p.material_name, p.create_by, p.create_time, p.update_by,
p.update_time,p.audit_status, p.use_status,p.remark,p.instance_type, p.instance_id,
p.restore_instance_id,p.cancel_instance_id, p.submit_instance_id, p.apply_title,
p.apply_user, p.apply_time,p.del_flag,p.remark,file.url as photo_url
from purchase_quote as p
left join (
select
att.rel_id
,file.url
,min(file.create_time) as create_time
from sys_attach as att
left join sys_attach_file as file
on att.id = file.attach_id
where att.source_type = 'purchaseQuote' and att.source_sub_type = 'photo'
group by att.rel_id
)file
on p.purchase_quote_id = file.rel_id
<where>
and p.del_flag = '0'
<if test="purchaseQuoteCode != null and purchaseQuoteCode != ''"> and p.purchase_quote_code = #{purchaseQuoteCode}</if>
<if test="purchaseBuyer != null and purchaseBuyer != ''"> and p.purchaseBuyer = #{purchaseBuyer}</if>
<if test="supplierQuoteCode != null and supplierQuoteCode != ''"> and p.supplier_quote_code = #{supplierQuoteCode}</if>
<if test="supplierName != null and supplierName != ''"> and p.supplier_name like concat('%', #{supplierName}, '%')</if>
<if test="materialAmount != null and materialAmount != ''"> and p.material_amount = #{materialAmount}</if>
<if test="params.beginPricingDate != null and params.beginPricingDate != '' and params.endPricingDate != null and params.endPricingDate != ''"> and p.pricingDate between #{params.beginPricingDate} and #{params.endPricingDate}</if>
<if test="materialNo != null and materialNo != ''"> and p.material_no = #{materialNo}</if>
<if test="materialName != null and materialName != ''"> and p.material_name like concat('%', #{materialName}, '%')</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and p.create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
<if test="auditStatus != null and auditStatus != ''"> and p.audit_status = #{auditStatus}</if>
<if test="useStatus != null and useStatus != ''"> and p.use_status = #{useStatus}</if>
<if test="instanceId != null and instanceId != ''"> and p.instance_id = #{instanceId}</if>
<if test="instanceType != null and instanceType != ''"> and p.instance_type = #{instanceType}</if>
<if test="submitInstanceId != null and submitInstanceId != ''"> and p.submit_instance_id = #{submitInstanceId}</if>
<if test="cancelInstanceId != null and cancelInstanceId != ''"> and p.cancel_instance_id = #{cancelInstanceId}</if>
<if test="restoreInstanceId != null and restoreInstanceId != ''"> and p.restore_instance_id = #{restoreInstanceId}</if>
<if test="applyTitle != null and applyTitle != ''"> and p.apply_title = #{applyTitle}</if>
<if test="applyUser != null and applyUser != ''"> and p.apply_user = #{applyUser}</if>
<if test="applyTime != null "> and p.apply_time = #{applyTime}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
and p.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
</if>
<if test="keyword != null and keyword != ''"> and p.purchase_quote_code like concat('%',#{keyword},'%')</if>
</where>
order by p.create_time desc
</select>
<select id="selectPurchaseQuoteById" parameterType="Long" resultMap="PurchaseQuoteResult">
select p.purchase_quote_id, p.purchase_quote_code, p.purchaseBuyer,
p.supplier_quote_code, p.supplier_name, p.tax_rate, p.material_amount,

9
ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/add.html

@ -212,15 +212,6 @@
<label>报价编码:</label>
<input type="text" name="quotationCode"/>
</li>
<li>
<label>原辅料代码:</label>
<input type="text" name="rawSubsidiaryCode"/>
</li>
<li>
<label>原辅料名称:</label>
<input type="text" name="rawSubsidiaryName"/>
</li>
<!-- <li>-->
<!-- <label>供应商名称:</label>-->
<!-- <input type="text" name="supplierName"/>-->

4
ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/purchaseOrder.html

@ -138,12 +138,10 @@
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('purchase:purchaseOrder:edit')}]];
var addPurchaseOrderStorageFlag = [[${@permission.hasPermi('purchase:purchaseOrder:addPurchaseOrderStorage')}]];
var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var useStatusDatas = [[${@dict.getType('useStatus')}]];
var eceiptStatusDatas = [[${@dict.getType('sys_eceipt_status')}]];
var paymentStatusDatas = [[${@dict.getType('sys_pay_close')}]];
var loginName = [[${@permission.getPrincipalProperty('loginName')}]];
var prefix = ctx + "purchase/purchaseOrder";
$(function() {
@ -221,8 +219,6 @@
var actions = [];
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.purchaseOrderId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-danger btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.purchaseOrderId + '\')"><i class="fa fa-detail"></i>详情</a>')
if(row.auditStatus=="1" && row.useStatus=="1" && !row.cancelInstanceId) {
// 作废
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.purchaseOrderId + '\')"><i class="fa fa-remove"></i> 作废</a>');

3
ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/taskFzjlVerify.html

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.w3.org/1999/xhtml">
<head>
<th:block th:include="include :: header('采购经理审核')" />
<th:block th:include="include :: header('副总经理审核')" />
<th:block th:include="include :: select2-css" />
</head>
<body class="white-bg">
@ -65,7 +65,6 @@
<script th:src="@{/js/activiti.js}"></script>
<script th:inline="javascript">
var prefix = ctx + "purchase/purchaseOrder";
var purchaseOrder = [[${formData}]];
$("#form-fzjl-edit").validate({focusCleanup: true});
function submitHandler() {

Loading…
Cancel
Save