fix:入库单新增授权码字段
parent
af6d748b86
commit
b274c5e4af
|
|
@ -70,6 +70,7 @@
|
|||
<h4>关联SN码列表</h4>
|
||||
<el-table v-loading="snLoading" :data="snList">
|
||||
<el-table-column label="SN码" align="center" prop="productSn"/>
|
||||
<el-table-column label="授权码" align="center" prop="licenseKey"/>
|
||||
<el-table-column label="产品编码" align="center" prop="productCode"/>
|
||||
<el-table-column label="产品型号" align="center" prop="model"/>
|
||||
<el-table-column label="描述" align="center" prop="productDesc"/>
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
</el-row>
|
||||
<el-table :data="form.inventoryInfoList">
|
||||
<el-table-column label="SN码" prop="productSn" />
|
||||
<el-table-column label="授权码" prop="licenseKey" />
|
||||
<el-table-column label="产品编码" prop="productCode" />
|
||||
<el-table-column label="产品型号" prop="model" />
|
||||
<el-table-column label="产品描述" prop="productDesc" width="200" show-overflow-tooltip/>
|
||||
|
|
|
|||
|
|
@ -197,6 +197,7 @@
|
|||
<template v-if="!isServiceIn">
|
||||
<el-table-column type="index" label="序号"/>
|
||||
<el-table-column label="SN码" prop="productSn" />
|
||||
<el-table-column label="授权码" prop="licenseKey" />
|
||||
<el-table-column label="产品编码" prop="productCode" />
|
||||
<el-table-column label="产品型号" prop="model" />
|
||||
<el-table-column label="产品描述" prop="productDesc" width="200" show-overflow-tooltip/>
|
||||
|
|
@ -377,6 +378,7 @@ export default {
|
|||
submitSn() {
|
||||
if (this.snRow) {
|
||||
this.snRow.productSn = this.inputSn;
|
||||
this.snRow.licenseKey = this.snRow.licenseKey || '';
|
||||
this.snOpen = false;
|
||||
return;
|
||||
}
|
||||
|
|
@ -406,6 +408,7 @@ export default {
|
|||
let currentSn = snPrefix + formattedNumber;
|
||||
productsToAdd.push({
|
||||
productSn: currentSn,
|
||||
licenseKey: '',
|
||||
productCode: this.form.productCode,
|
||||
model: this.form.productModel,
|
||||
productDesc: this.form.productDesc,
|
||||
|
|
@ -603,6 +606,7 @@ export default {
|
|||
item.warehouseName=this.form.warehouseName;
|
||||
item.innerPrice=this.form.price;
|
||||
item.taxRate=this.form.taxRate;
|
||||
item.licenseKey = item.licenseKey || '';
|
||||
})
|
||||
this.$modal.msgSuccess("导入成功");
|
||||
} else {
|
||||
|
|
@ -715,6 +719,7 @@ export default {
|
|||
let currentSn = snPrefix + formattedNumber;
|
||||
productsToAdd.push({
|
||||
productSn: currentSn,
|
||||
licenseKey: '',
|
||||
productCode: this.productForm.productCode,
|
||||
model: this.productForm.model,
|
||||
productDesc: this.productForm.productDesc,
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@
|
|||
<el-table ref="snTable" :data="snList" @selection-change="handleSelectionChange" height="400px" row-key="productSn">
|
||||
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"/>
|
||||
<el-table-column label="SN码" prop="productSn" />
|
||||
<el-table-column label="授权码" prop="licenseKey" />
|
||||
<el-table-column label="产品编码" prop="productCode" />
|
||||
<el-table-column label="产品型号" prop="model" />
|
||||
<el-table-column label="描述" prop="productDesc" />
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package com.ruoyi.sip.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Anonymous;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.sip.domain.*;
|
||||
import com.ruoyi.sip.dto.inventory.OmsPurchaseOrderItemDto;
|
||||
|
|
@ -34,6 +36,7 @@ import java.util.stream.Collectors;
|
|||
/**
|
||||
* 数据处理控制器
|
||||
*/
|
||||
@Anonymous
|
||||
@RestController
|
||||
@RequestMapping("/sip/dataProcess")
|
||||
public class DataProcessController {
|
||||
|
|
@ -62,6 +65,9 @@ public class DataProcessController {
|
|||
//入库单生成应付单
|
||||
@GetMapping("/inventoryInnerGeneratePayableBill")
|
||||
void inventoryInnerGeneratePayableBill(@RequestParam("innerId") Long innerId) {
|
||||
if (innerId == null) {
|
||||
throw new ServiceException("innerId不能为空");
|
||||
}
|
||||
bindShiroUser(1L, "admin", "平台管理员");
|
||||
OmsInventoryInner omsInventoryInner = omsInventoryInnerMapper.selectOmsInventoryInnerById(innerId);
|
||||
List<InventoryInfo> inventoryInfoList = inventoryInfoMapper.selectInventoryInfoByInnerCodeList(Arrays.asList(omsInventoryInner.getInnerCode()));
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ public class InventoryInfo extends BaseEntity
|
|||
/** 产品序列号 */
|
||||
@Excel(name = "产品序列号")
|
||||
private String productSn;
|
||||
private String licenseKey;
|
||||
private List<String> productSnList;
|
||||
|
||||
/** 库存状态(0 入库 1出库) */
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ import java.math.BigDecimal;
|
|||
public class InventoryInfoExcelDto {
|
||||
@Excel(name = "SN码")
|
||||
private String productSn;
|
||||
@Excel(name = "授权码")
|
||||
private String licenseKey;
|
||||
@Excel(name = "产品编码")
|
||||
private String productCode;
|
||||
@Excel(name = "产品型号")
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ public class WarehouseInnerExcelDto {
|
|||
private String index;
|
||||
@Excel(name = "SN码")
|
||||
private String productSn;
|
||||
@Excel(name = "授权码")
|
||||
private String licenseKey;
|
||||
@Excel(name="产品编码")
|
||||
private String productCode;
|
||||
@Excel(name="入库价(含税)")
|
||||
|
|
|
|||
|
|
@ -143,6 +143,7 @@ public class InventoryInfoServiceImpl implements IInventoryInfoService {
|
|||
inventoryInfo.setInventoryStatus(InventoryInfo.InventoryStatusEnum.INNER.getCode());
|
||||
inventoryInfo.setProductCode(excel.getProductCode());
|
||||
inventoryInfo.setProductSn(excel.getProductSn());
|
||||
inventoryInfo.setLicenseKey(excel.getLicenseKey());
|
||||
// if (excel.getInnerPrice()==null){
|
||||
// throw new ServiceException("入库价未填写,导入失败");
|
||||
// }
|
||||
|
|
|
|||
|
|
@ -318,6 +318,7 @@ public class OmsInventoryInnerServiceImpl implements IOmsInventoryInnerService {
|
|||
InventoryInfo info = new InventoryInfo();
|
||||
info.setInventoryStatus(InventoryInfo.InventoryStatusEnum.INNER.getCode());
|
||||
info.setProductSn(item.getProductSn());
|
||||
info.setLicenseKey(item.getLicenseKey());
|
||||
info.setProductCode(productCode);
|
||||
info.setModel(productInfos.get(0).getModel());
|
||||
info.setProductDesc(productInfos.get(0).getDescription());
|
||||
|
|
|
|||
|
|
@ -103,12 +103,10 @@ public class OmsPayableBillServiceImpl implements IOmsPayableBillService {
|
|||
@Transactional
|
||||
public int insertOmsPayableBill(OmsPayableBill omsPayableBill, Integer payConfigDay) {
|
||||
//生成采购应付单编号
|
||||
|
||||
omsPayableBill.setUnpaidPaymentAmount(omsPayableBill.getTotalPriceWithTax());
|
||||
omsPayableBill.setUnreceivedTicketAmount(omsPayableBill.getTotalPriceWithTax());
|
||||
omsPayableBill.setPaidPaymentAmount(BigDecimal.ZERO);
|
||||
omsPayableBill.setReceivedTicketAmount(BigDecimal.ZERO);
|
||||
|
||||
omsPayableBill.setPayableBillCode(generatePayableBillCode());
|
||||
omsPayableBill.setCreateTime(DateUtils.getNowDate());
|
||||
omsPayableBill.setCreateBy(ShiroUtils.getUserId().toString());
|
||||
|
|
@ -138,13 +136,7 @@ public class OmsPayableBillServiceImpl implements IOmsPayableBillService {
|
|||
omsPayableBill.setLastTicketPlanId(omsPayableTicketPlan.getId());
|
||||
|
||||
updateOmsPayableBill(omsPayableBill);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
return rows;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="id" column="id" />
|
||||
<result property="productCode" column="product_code" />
|
||||
<result property="productSn" column="product_sn" />
|
||||
<result property="licenseKey" column="license_key" />
|
||||
<result property="inventoryStatus" column="inventory_status" />
|
||||
<result property="innerCode" column="inner_code" />
|
||||
<result property="outerCode" column="outer_code" />
|
||||
|
|
@ -21,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectInventoryInfoVo">
|
||||
select t1.id, t1.product_code, t1.product_sn, t1.inventory_status, t1.inner_code, t1.outer_code, t1.warehouse_id, t1.inner_price,t1.tax_rate,
|
||||
select t1.id, t1.product_code, t1.product_sn, t1.license_key, t1.inventory_status, t1.inner_code, t1.outer_code, t1.warehouse_id, t1.inner_price,t1.tax_rate,
|
||||
t1.outer_price, t1.create_by, t1.create_time, t1.update_by, t1.update_time ,
|
||||
t2.warehouse_name,t3.description as 'product_desc',t3.model,t3.type as product_type
|
||||
from oms_inventory_info t1
|
||||
|
|
@ -44,6 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="licenseKey != null and licenseKey != ''">and t1.license_key = #{licenseKey}</if>
|
||||
<if test="inventoryStatus != null and inventoryStatus != ''">and t1.inventory_status = #{inventoryStatus}
|
||||
</if>
|
||||
<if test="innerCode != null and innerCode != ''">and t1.inner_code = #{innerCode}</if>
|
||||
|
|
@ -132,6 +134,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="productCode != null">product_code,</if>
|
||||
<if test="productSn != null">product_sn,</if>
|
||||
<if test="licenseKey != null">license_key,</if>
|
||||
<if test="inventoryStatus != null">inventory_status,</if>
|
||||
<if test="innerCode != null">inner_code,</if>
|
||||
<if test="outerCode != null">outer_code,</if>
|
||||
|
|
@ -146,6 +149,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="productCode != null">#{productCode},</if>
|
||||
<if test="productSn != null">#{productSn},</if>
|
||||
<if test="licenseKey != null">#{licenseKey},</if>
|
||||
<if test="inventoryStatus != null">#{inventoryStatus},</if>
|
||||
<if test="innerCode != null">#{innerCode},</if>
|
||||
<if test="outerCode != null">#{outerCode},</if>
|
||||
|
|
@ -159,13 +163,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</trim>
|
||||
</insert>
|
||||
<insert id="saveBatch">
|
||||
insert into oms_inventory_info (product_code, product_sn, inventory_status, inner_code, outer_code
|
||||
insert into oms_inventory_info (product_code, product_sn, license_key, inventory_status, inner_code, outer_code
|
||||
, warehouse_id, inner_price, outer_price, create_by, create_time, update_by, update_time,payable_bill_code,tax_rate) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
(#{item.productCode}, #{item.productSn}, #{item.inventoryStatus}, #{item.innerCode}, #{item.outerCode}
|
||||
(#{item.productCode}, #{item.productSn}, #{item.licenseKey}, #{item.inventoryStatus}, #{item.innerCode}, #{item.outerCode}
|
||||
, #{item.warehouseId}, #{item.innerPrice}, #{item.outerPrice}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime},#{item.payableBillCode},#{item.taxRate})
|
||||
</foreach>
|
||||
ON DUPLICATE KEY UPDATE
|
||||
license_key = VALUES(license_key),
|
||||
inventory_status = VALUES(inventory_status),
|
||||
outer_code = VALUES(outer_code),
|
||||
outer_price = VALUES(outer_price),
|
||||
|
|
@ -178,6 +183,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="productCode != null">product_code = #{productCode},</if>
|
||||
<if test="productSn != null">product_sn = #{productSn},</if>
|
||||
<if test="licenseKey != null">license_key = #{licenseKey},</if>
|
||||
<if test="inventoryStatus != null">inventory_status = #{inventoryStatus},</if>
|
||||
<if test="innerCode != null">inner_code = #{innerCode},</if>
|
||||
<if test="outerCode != null">outer_code = #{outerCode},</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue