Merge remote-tracking branch 'origin/dev_1.0.2' into dev_1.0.2
commit
c39ed025b9
|
|
@ -81,6 +81,7 @@
|
||||||
<el-table-column label="产品名称" align="center" prop="productName" />
|
<el-table-column label="产品名称" align="center" prop="productName" />
|
||||||
<el-table-column label="产品型号" align="center" prop="model" />
|
<el-table-column label="产品型号" align="center" prop="model" />
|
||||||
<el-table-column label="制造商" align="center" prop="vendorName" />
|
<el-table-column label="制造商" align="center" prop="vendorName" />
|
||||||
|
<el-table-column label="产品类型" align="center" prop="level2TypeName" />
|
||||||
<el-table-column label="目录单价" align="center" prop="cataloguePrice" />
|
<el-table-column label="目录单价" align="center" prop="cataloguePrice" />
|
||||||
<el-table-column label="指导折扣" align="center" prop="guidanceDiscount">
|
<el-table-column label="指导折扣" align="center" prop="guidanceDiscount">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|
@ -147,8 +148,10 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
<el-form-item label="产品类型" prop="type">
|
<el-form-item label="产品类型" prop="type">
|
||||||
<el-select v-model="form.type" placeholder="请选择产品类型">
|
<el-select v-model="form.type" placeholder="请选择产品类型" @change="handleTypeChange">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in dict.type.product_type"
|
v-for="dict in dict.type.product_type"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
|
|
@ -157,6 +160,69 @@
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="二级类型" prop="level2Type">
|
||||||
|
<el-select v-model="form.level2Type" placeholder="请选择二级产品类型" @change="handleLevel2TypeChange">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in level2TypeOptions"
|
||||||
|
:key="dict.dictValue"
|
||||||
|
:label="dict.dictLabel"
|
||||||
|
:value="dict.dictValue"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入备注" />
|
||||||
|
</el-form-item>
|
||||||
|
<div v-if="level2TypeRelation">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="终端类型" prop="terminalType">
|
||||||
|
<el-radio-group v-model="form.terminalType">
|
||||||
|
<el-radio label="胖终端"/>
|
||||||
|
<el-radio label="瘦终端"/>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="国产化" prop="localization">
|
||||||
|
<el-radio-group v-model="form.localization">
|
||||||
|
<el-radio label="信创"/>
|
||||||
|
<el-radio label="商用"/>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="CPU品牌" prop="cpuBrand">
|
||||||
|
<el-select v-model="form.cpuBrand" placeholder="请选择CPU品牌">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.cpu_brand"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="CPU架构" prop="cpuArchitecture">
|
||||||
|
<el-select v-model="form.cpuArchitecture" placeholder="请选择CPU架构">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.cpu_architecture"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="目录单价" prop="cataloguePrice">
|
<el-form-item label="目录单价" prop="cataloguePrice">
|
||||||
|
|
@ -187,9 +253,6 @@
|
||||||
<el-form-item v-if="form.type == '11' || form.type == '22'" label="维保年限" prop="value">
|
<el-form-item v-if="form.type == '11' || form.type == '22'" label="维保年限" prop="value">
|
||||||
<el-input-number v-model="form.value" placeholder="请输入维保年限" />
|
<el-input-number v-model="form.value" placeholder="请输入维保年限" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注" prop="remark">
|
|
||||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入备注" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
|
@ -202,10 +265,11 @@
|
||||||
<script>
|
<script>
|
||||||
import { listProduct, getProduct, delProduct, addProduct, updateProduct, exportProduct } from "@/api/system/product";
|
import { listProduct, getProduct, delProduct, addProduct, updateProduct, exportProduct } from "@/api/system/product";
|
||||||
import {listAllVendor} from "@/api/base/vendor";
|
import {listAllVendor} from "@/api/base/vendor";
|
||||||
|
import {getDicts} from "@/api/system/dict/data";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Product",
|
name: "Product",
|
||||||
dicts: ['product_type'],
|
dicts: ['product_type', 'cpu_brand', 'cpu_architecture'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
|
|
@ -228,6 +292,10 @@ export default {
|
||||||
open: false,
|
open: false,
|
||||||
// 制造商选项
|
// 制造商选项
|
||||||
vendorOptions: [],
|
vendorOptions: [],
|
||||||
|
// 制造商选项
|
||||||
|
level2TypeOptions: [],
|
||||||
|
// 二级类型关联信息
|
||||||
|
level2TypeRelation: false,
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
|
|
@ -258,6 +326,13 @@ export default {
|
||||||
type: [
|
type: [
|
||||||
{ required: true, message: "产品类型不能为空", trigger: "change" }
|
{ required: true, message: "产品类型不能为空", trigger: "change" }
|
||||||
],
|
],
|
||||||
|
level2Type: [
|
||||||
|
{ required: true, message: "二级产品类型不能为空", trigger: "change" }
|
||||||
|
],
|
||||||
|
terminalType: [],
|
||||||
|
localization: [],
|
||||||
|
cpuBrand: [],
|
||||||
|
cpuArchitecture: [],
|
||||||
cataloguePrice: [
|
cataloguePrice: [
|
||||||
{ required: true, message: "目录单价不能为空", trigger: "blur" }
|
{ required: true, message: "目录单价不能为空", trigger: "blur" }
|
||||||
],
|
],
|
||||||
|
|
@ -291,18 +366,53 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
// 先加载字典数据,然后再获取产品列表
|
||||||
|
this.getDicts().then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
});
|
||||||
this.getVendorList();
|
this.getVendorList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/** 加载字典数据 */
|
||||||
|
getDicts() {
|
||||||
|
return getDicts('product_type').then(response => {
|
||||||
|
// 这里只是加载主产品类型字典,二级类型字典会在需要时动态加载
|
||||||
|
return Promise.resolve();
|
||||||
|
});
|
||||||
|
},
|
||||||
/** 查询产品管理列表 */
|
/** 查询产品管理列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listProduct(this.queryParams).then(response => {
|
listProduct(this.queryParams).then(response => {
|
||||||
this.productList = response.rows;
|
// 先获取所有产品类型的字典数据
|
||||||
|
const productTypes = this.dict.type.product_type || [];
|
||||||
|
// 为每个产品添加level2TypeName字段
|
||||||
|
Promise.all(
|
||||||
|
response.rows.map(product => {
|
||||||
|
return new Promise(resolve => {
|
||||||
|
if (product.level2Type && product.type) {
|
||||||
|
// 动态加载对应产品类型的二级类型字典
|
||||||
|
getDicts('product_type_' + product.type).then(dictResponse => {
|
||||||
|
const level2TypeOptions = dictResponse.data || [];
|
||||||
|
const option = level2TypeOptions.find(opt => opt.dictValue === product.level2Type);
|
||||||
|
product.level2TypeName = option ? option.dictLabel : '';
|
||||||
|
resolve(product);
|
||||||
|
}).catch(() => {
|
||||||
|
product.level2TypeName = '';
|
||||||
|
resolve(product);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
product.level2TypeName = '';
|
||||||
|
resolve(product);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
).then(processedProducts => {
|
||||||
|
this.productList = processedProducts;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
/** 查询制造商列表 */
|
/** 查询制造商列表 */
|
||||||
getVendorList() {
|
getVendorList() {
|
||||||
|
|
@ -324,6 +434,11 @@ export default {
|
||||||
productName: null,
|
productName: null,
|
||||||
model: null,
|
model: null,
|
||||||
type: null,
|
type: null,
|
||||||
|
level2Type: null,
|
||||||
|
terminalType: null,
|
||||||
|
localization: null,
|
||||||
|
cpuBrand: null,
|
||||||
|
cpuArchitecture: null,
|
||||||
cataloguePrice: null,
|
cataloguePrice: null,
|
||||||
guidanceDiscount: null,
|
guidanceDiscount: null,
|
||||||
vendorCode: null,
|
vendorCode: null,
|
||||||
|
|
@ -366,6 +481,14 @@ export default {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改产品管理";
|
this.title = "修改产品管理";
|
||||||
|
// 加载二级类型选项
|
||||||
|
if (this.form.type) {
|
||||||
|
getDicts('product_type_' + this.form.type).then(response => {
|
||||||
|
this.level2TypeOptions = response.data;
|
||||||
|
// 调用二级类型变化处理
|
||||||
|
this.handleLevel2TypeChange(this.form.level2Type);
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
|
|
@ -411,6 +534,51 @@ export default {
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.exportLoading = false;
|
this.exportLoading = false;
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
handleTypeChange(type) {
|
||||||
|
this.form.level2Type = null;
|
||||||
|
this.level2TypeOptions = [];
|
||||||
|
// 当产品类型改变时,隐藏云终端配置部分
|
||||||
|
this.level2TypeRelation = false;
|
||||||
|
// 移除相关验证
|
||||||
|
this.rules.terminalType = [];
|
||||||
|
this.rules.localization = [];
|
||||||
|
this.rules.cpuBrand = [];
|
||||||
|
this.rules.cpuArchitecture = [];
|
||||||
|
// 清空字段值
|
||||||
|
this.form.terminalType = null;
|
||||||
|
this.form.localization = null;
|
||||||
|
this.form.cpuBrand = null;
|
||||||
|
this.form.cpuArchitecture = null;
|
||||||
|
getDicts('product_type_' + type).then(response => {
|
||||||
|
this.level2TypeOptions = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleLevel2TypeChange(level2Type) {
|
||||||
|
/*
|
||||||
|
产品类型:硬件
|
||||||
|
二级类型:汇智云终端、H3C云终端、转售云终端
|
||||||
|
*/
|
||||||
|
if (this.form.type == 2 && (level2Type == 3 || level2Type == 4 || level2Type == 5)) {
|
||||||
|
this.level2TypeRelation = true;
|
||||||
|
// 显示时添加必填验证
|
||||||
|
this.rules.terminalType = [{ required: true, message: "终端类型不能为空", trigger: "change" }];
|
||||||
|
this.rules.localization = [{ required: true, message: "国产化不能为空", trigger: "change" }];
|
||||||
|
this.rules.cpuBrand = [{ required: true, message: "CPU品牌不能为空", trigger: "change" }];
|
||||||
|
this.rules.cpuArchitecture = [{ required: true, message: "CPU架构不能为空", trigger: "change" }];
|
||||||
|
} else {
|
||||||
|
this.level2TypeRelation = false;
|
||||||
|
// 隐藏时移除必填验证
|
||||||
|
this.rules.terminalType = [];
|
||||||
|
this.rules.localization = [];
|
||||||
|
this.rules.cpuBrand = [];
|
||||||
|
this.rules.cpuArchitecture = [];
|
||||||
|
// 清空字段值
|
||||||
|
this.form.terminalType = null;
|
||||||
|
this.form.localization = null;
|
||||||
|
this.form.cpuBrand = null;
|
||||||
|
this.form.cpuArchitecture = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,7 @@ import com.ruoyi.common.annotation.Anonymous;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import com.ruoyi.sip.dto.ApiDataQueryDto;
|
import com.ruoyi.sip.dto.ApiDataQueryDto;
|
||||||
import com.ruoyi.sip.service.IDeliveryListService;
|
import com.ruoyi.sip.service.*;
|
||||||
import com.ruoyi.sip.service.IInventoryDeliveryService;
|
|
||||||
import com.ruoyi.sip.service.IOrderInfoService;
|
|
||||||
import com.ruoyi.sip.service.IProjectOrderInfoService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
@ -34,16 +31,15 @@ public class ExternalController {
|
||||||
private IDeliveryListService deliveryListService;
|
private IDeliveryListService deliveryListService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IOrderInfoService orderInfoService;
|
private IOrderInfoService orderInfoService;
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IProjectOrderInfoService projectOrderInfoService;
|
private IProjectOrderInfoService projectOrderInfoService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IInventoryDeliveryService deliveryService;
|
private IInventoryDeliveryService deliveryService;
|
||||||
|
@Autowired
|
||||||
|
private IProjectOrderInfoRecallService projectOrderInfoRecallService;
|
||||||
|
|
||||||
private final static String API_KEY = "c7f858d0-30b8-4b7f-9ea1-0ccf5ceb1c54";
|
private final static String API_KEY = "c7f858d0-30b8-4b7f-9ea1-0ccf5ceb1c54";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/v1/order/info")
|
@GetMapping("/v1/order/info")
|
||||||
@Anonymous
|
@Anonymous
|
||||||
public AjaxResult getOrderInfo(@Validated ApiDataQueryDto dto, @RequestHeader(value = "apiKey",required = false) String apiKey) {
|
public AjaxResult getOrderInfo(@Validated ApiDataQueryDto dto, @RequestHeader(value = "apiKey",required = false) String apiKey) {
|
||||||
|
|
@ -68,4 +64,17 @@ public class ExternalController {
|
||||||
}
|
}
|
||||||
return AjaxResult.success(deliveryService.getNumberInfo(dto));
|
return AjaxResult.success(deliveryService.getNumberInfo(dto));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/v1/order/recall/info")
|
||||||
|
@Anonymous
|
||||||
|
public AjaxResult getOrderRecallInfo(@Validated ApiDataQueryDto dto, @RequestHeader(value = "apiKey",required = false) String apiKey) {
|
||||||
|
if (StringUtils.isEmpty(apiKey)) {
|
||||||
|
return AjaxResult.error("apiKey不能为空");
|
||||||
|
}
|
||||||
|
if (!API_KEY.equals(apiKey)){
|
||||||
|
return AjaxResult.error("鉴权失败");
|
||||||
|
}
|
||||||
|
return AjaxResult.success(projectOrderInfoRecallService.getOrderRecallInfo(dto));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -171,7 +171,7 @@ public class InventoryDeliveryController extends BaseController
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult remove(Long id)
|
public AjaxResult remove(Long id)
|
||||||
{
|
{
|
||||||
return toAjax(inventoryDeliveryService.deleteInventoryOuterById(id));
|
return toAjax(inventoryDeliveryService.deleteInventoryOuterById(id, true));
|
||||||
}
|
}
|
||||||
@Log(title = "发货记录", businessType = BusinessType.DELETE)
|
@Log(title = "发货记录", businessType = BusinessType.DELETE)
|
||||||
@PostMapping( "/recall")
|
@PostMapping( "/recall")
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ public class VueDeliveryController extends BaseController {
|
||||||
@Log(title = "发货记录", businessType = BusinessType.DELETE)
|
@Log(title = "发货记录", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{id}")
|
@DeleteMapping("/{id}")
|
||||||
public AjaxResult remove(@PathVariable(value = "id") Long id) {
|
public AjaxResult remove(@PathVariable(value = "id") Long id) {
|
||||||
return toAjax(inventoryDeliveryService.deleteInventoryOuterById(id));
|
return toAjax(inventoryDeliveryService.deleteInventoryOuterById(id, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,7 @@ public class InventoryDelivery extends BaseEntity
|
||||||
public enum DeliveryStatusEnum {
|
public enum DeliveryStatusEnum {
|
||||||
WAIT_DELIVERY("0","待发货"),
|
WAIT_DELIVERY("0","待发货"),
|
||||||
CONFIRM_DELIVERY("1","已发货"),
|
CONFIRM_DELIVERY("1","已发货"),
|
||||||
|
RECALL_DELIVERY("2","撤回"),
|
||||||
;
|
;
|
||||||
|
|
||||||
private final String code;
|
private final String code;
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,16 @@ public class ProductInfo extends BaseEntity
|
||||||
private Long inventoryCount;
|
private Long inventoryCount;
|
||||||
private Long warehouseId;
|
private Long warehouseId;
|
||||||
private String warehouseName;
|
private String warehouseName;
|
||||||
|
// 二级类型
|
||||||
|
private String level2Type;
|
||||||
|
// 终端类型
|
||||||
|
private String terminalType;
|
||||||
|
// 国产化
|
||||||
|
private String localization;
|
||||||
|
// CPU品牌
|
||||||
|
private String cpuBrand;
|
||||||
|
// CPU架构
|
||||||
|
private String cpuArchitecture;
|
||||||
@Getter
|
@Getter
|
||||||
public enum ProductTypeEnum {
|
public enum ProductTypeEnum {
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -292,6 +292,11 @@ public class ProjectOrderInfo extends BaseEntity {
|
||||||
|
|
||||||
private String keyword;
|
private String keyword;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作版本
|
||||||
|
*/
|
||||||
|
private Integer operationVersion;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
public enum OrderStatus {
|
public enum OrderStatus {
|
||||||
WAIT_COMMIT("0", "待提交"),
|
WAIT_COMMIT("0", "待提交"),
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
package com.ruoyi.sip.domain;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同订单撤回记录对象 project_order_info_recall
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-03-20
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ProjectOrderInfoRecall extends BaseEntity {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键,自增 */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 合同编号 */
|
||||||
|
@Excel(name = "合同编号")
|
||||||
|
private String orderCode;
|
||||||
|
|
||||||
|
/** 版本号 */
|
||||||
|
@Excel(name = "版本号")
|
||||||
|
private Integer versionCode;
|
||||||
|
|
||||||
|
/** 操作版本 */
|
||||||
|
@Excel(name = "操作版本")
|
||||||
|
private Integer operationVersion;
|
||||||
|
|
||||||
|
/** 更新时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/** 创建人 id */
|
||||||
|
@Excel(name = "创建人 id")
|
||||||
|
private String createBy;
|
||||||
|
}
|
||||||
|
|
@ -3,6 +3,7 @@ package com.ruoyi.sip.mapper;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.ruoyi.sip.domain.InventoryDelivery;
|
import com.ruoyi.sip.domain.InventoryDelivery;
|
||||||
import com.ruoyi.sip.dto.ApiDataQueryDto;
|
import com.ruoyi.sip.dto.ApiDataQueryDto;
|
||||||
|
import com.ruoyi.sip.vo.DeliveryApproveVo;
|
||||||
import com.ruoyi.sip.vo.DeliveryInfoVo;
|
import com.ruoyi.sip.vo.DeliveryInfoVo;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
@ -67,4 +68,7 @@ public interface InventoryDeliveryMapper
|
||||||
List<InventoryDelivery> selectQuantityByOrderCodeStatus(@Param("orderCode") String orderCode, @Param("status") String code);
|
List<InventoryDelivery> selectQuantityByOrderCodeStatus(@Param("orderCode") String orderCode, @Param("status") String code);
|
||||||
|
|
||||||
List<DeliveryInfoVo> listSn(ApiDataQueryDto dto);
|
List<DeliveryInfoVo> listSn(ApiDataQueryDto dto);
|
||||||
|
|
||||||
|
List<DeliveryApproveVo> selectDeliveryApproveList(@Param("id") Long id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
package com.ruoyi.sip.mapper;
|
package com.ruoyi.sip.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.ruoyi.sip.domain.InventoryDelivery;
|
||||||
import com.ruoyi.sip.domain.ProjectOrderInfo;
|
import com.ruoyi.sip.domain.ProjectOrderInfo;
|
||||||
import com.ruoyi.sip.dto.HomepageQueryDto;
|
import com.ruoyi.sip.dto.HomepageQueryDto;
|
||||||
import com.ruoyi.sip.dto.StatisticsDetailDto;
|
import com.ruoyi.sip.dto.StatisticsDetailDto;
|
||||||
|
|
@ -84,4 +86,6 @@ public interface ProjectOrderInfoMapper
|
||||||
|
|
||||||
List<ProjectOrderInfo> listLog(ProjectOrderInfo projectOrderInfo);
|
List<ProjectOrderInfo> listLog(ProjectOrderInfo projectOrderInfo);
|
||||||
|
|
||||||
|
List<InventoryDelivery> selectInentoryDeliveryByProjectOrderInfoId(@Param("id") Long id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.ruoyi.sip.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.sip.domain.ProjectOrderInfoRecall;
|
||||||
|
import com.ruoyi.sip.dto.ApiDataQueryDto;
|
||||||
|
import com.ruoyi.sip.vo.ProjectOrderInfoRecallVO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同订单撤回记录 Mapper 接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-03-20
|
||||||
|
*/
|
||||||
|
public interface ProjectOrderInfoRecallMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 新增合同订单撤回记录
|
||||||
|
*
|
||||||
|
* @param projectOrderInfoRecall 合同订单撤回记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int insertProjectOrderInfoRecall(ProjectOrderInfoRecall projectOrderInfoRecall);
|
||||||
|
|
||||||
|
List<ProjectOrderInfoRecallVO> getOrderRecallInfo(ApiDataQueryDto dto);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -64,7 +64,7 @@ public interface IInventoryDeliveryService
|
||||||
|
|
||||||
void statusUpdate(InventoryDelivery inventoryDelivery);
|
void statusUpdate(InventoryDelivery inventoryDelivery);
|
||||||
|
|
||||||
int deleteInventoryOuterById(Long id);
|
int deleteInventoryOuterById(Long id, boolean realDeleted);
|
||||||
|
|
||||||
List<DeliveryInfoVo> getNumberInfo(ApiDataQueryDto dto);
|
List<DeliveryInfoVo> getNumberInfo(ApiDataQueryDto dto);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
package com.ruoyi.sip.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.sip.domain.ProjectOrderInfoRecall;
|
||||||
|
import com.ruoyi.sip.dto.ApiDataQueryDto;
|
||||||
|
import com.ruoyi.sip.vo.ProjectOrderInfoRecallVO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同订单撤回记录 Service 接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-03-20
|
||||||
|
*/
|
||||||
|
public interface IProjectOrderInfoRecallService
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增合同订单撤回记录
|
||||||
|
*
|
||||||
|
* @param projectOrderInfoRecall 合同订单撤回记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int insertProjectOrderInfoRecall(ProjectOrderInfoRecall projectOrderInfoRecall);
|
||||||
|
|
||||||
|
List<ProjectOrderInfoRecallVO> getOrderRecallInfo(ApiDataQueryDto dto);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -3,6 +3,8 @@ package com.ruoyi.sip.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import com.ruoyi.common.exception.ServiceException;
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import com.ruoyi.common.utils.ShiroUtils;
|
||||||
import com.ruoyi.sip.domain.*;
|
import com.ruoyi.sip.domain.*;
|
||||||
import com.ruoyi.sip.dto.inventory.ProductDetail;
|
import com.ruoyi.sip.dto.inventory.ProductDetail;
|
||||||
import com.ruoyi.sip.dto.inventory.ProductWarehouseInfo;
|
import com.ruoyi.sip.dto.inventory.ProductWarehouseInfo;
|
||||||
|
|
@ -10,7 +12,9 @@ import com.ruoyi.sip.flowable.service.TodoService;
|
||||||
import com.ruoyi.sip.mapper.InventoryDeliveryMapper;
|
import com.ruoyi.sip.mapper.InventoryDeliveryMapper;
|
||||||
import com.ruoyi.sip.mapper.ProjectOrderInfoMapper;
|
import com.ruoyi.sip.mapper.ProjectOrderInfoMapper;
|
||||||
import com.ruoyi.sip.service.*;
|
import com.ruoyi.sip.service.*;
|
||||||
|
import com.ruoyi.sip.vo.DeliveryApproveVo;
|
||||||
import com.ruoyi.sip.vo.ExecutionOrderVo;
|
import com.ruoyi.sip.vo.ExecutionOrderVo;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
@ -55,6 +59,8 @@ public class ExecutionTrackServiceImpl implements IExecutionTrackService {
|
||||||
private TodoService todoService;
|
private TodoService todoService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IProjectProductInfoBakService projectProductInfoBakService;
|
private IProjectProductInfoBakService projectProductInfoBakService;
|
||||||
|
@Autowired
|
||||||
|
private IProjectOrderInfoRecallService projectOrderInfoRecallService;
|
||||||
@Override
|
@Override
|
||||||
public ExecutionOrderVo selectInfo(Long id) {
|
public ExecutionOrderVo selectInfo(Long id) {
|
||||||
ExecutionOrderVo vo = new ExecutionOrderVo();
|
ExecutionOrderVo vo = new ExecutionOrderVo();
|
||||||
|
|
@ -237,6 +243,14 @@ public class ExecutionTrackServiceImpl implements IExecutionTrackService {
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void recall(Long id) {
|
public void recall(Long id) {
|
||||||
|
List<InventoryDelivery> inventoryDeliveryList = projectOrderInfoMapper.selectInentoryDeliveryByProjectOrderInfoId(id);
|
||||||
|
for (InventoryDelivery inventoryDelivery : inventoryDeliveryList) {
|
||||||
|
List<DeliveryApproveVo> deliveryApproveVoList = deliveryMapper.selectDeliveryApproveList(inventoryDelivery.getId());
|
||||||
|
if (CollectionUtils.isNotEmpty(deliveryApproveVoList)) {
|
||||||
|
throw new ServiceException("存在已完成或审批中的应收、应付信息,无法执行撤回操作");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//查询订单
|
//查询订单
|
||||||
ProjectOrderInfo projectOrderInfo = projectOrderInfoMapper.selectProjectOrderInfoById(id);
|
ProjectOrderInfo projectOrderInfo = projectOrderInfoMapper.selectProjectOrderInfoById(id);
|
||||||
//还原数据
|
//还原数据
|
||||||
|
|
@ -249,8 +263,16 @@ public class ExecutionTrackServiceImpl implements IExecutionTrackService {
|
||||||
updateOrder.setVersionCode(String.valueOf(Integer.parseInt(projectOrderInfo.getVersionCode())+1));
|
updateOrder.setVersionCode(String.valueOf(Integer.parseInt(projectOrderInfo.getVersionCode())+1));
|
||||||
updateOrder.setOrderStatus(ProjectOrderInfo.OrderStatus.APPROVE_REJECT.getCode());
|
updateOrder.setOrderStatus(ProjectOrderInfo.OrderStatus.APPROVE_REJECT.getCode());
|
||||||
updateOrder.setActualPurchaseAmount(projectOrderInfo.getShipmentAmount());
|
updateOrder.setActualPurchaseAmount(projectOrderInfo.getShipmentAmount());
|
||||||
|
updateOrder.setUpdateTime(new Date());
|
||||||
updateOrder.setId(id);
|
updateOrder.setId(id);
|
||||||
projectOrderInfoMapper.updateProjectOrderInfo(updateOrder);
|
projectOrderInfoMapper.updateProjectOrderInfo(updateOrder);
|
||||||
|
//订单撤回记录
|
||||||
|
ProjectOrderInfoRecall projectOrderInfoRecall = new ProjectOrderInfoRecall();
|
||||||
|
projectOrderInfoRecall.setOrderCode(projectOrderInfo.getOrderCode());
|
||||||
|
projectOrderInfoRecall.setVersionCode(Integer.parseInt(projectOrderInfo.getVersionCode()));
|
||||||
|
projectOrderInfoRecall.setOperationVersion(projectOrderInfo.getOperationVersion());
|
||||||
|
projectOrderInfoRecall.setCreateBy(ShiroUtils.getUserId().toString());
|
||||||
|
projectOrderInfoRecallService.insertProjectOrderInfoRecall(projectOrderInfoRecall);
|
||||||
//剔除流程
|
//剔除流程
|
||||||
todoService.deleteTodoByBusinessKey(projectOrderInfo.getOrderCode());
|
todoService.deleteTodoByBusinessKey(projectOrderInfo.getOrderCode());
|
||||||
//修改库存
|
//修改库存
|
||||||
|
|
@ -265,7 +287,13 @@ public class ExecutionTrackServiceImpl implements IExecutionTrackService {
|
||||||
//累计发货
|
//累计发货
|
||||||
List<InventoryDelivery> inventoryDeliveries = deliveryMapper.selectQuantityByOrderCodeStatus(projectOrderInfo.getOrderCode(), InventoryDelivery.DeliveryStatusEnum.CONFIRM_DELIVERY.getCode());
|
List<InventoryDelivery> inventoryDeliveries = deliveryMapper.selectQuantityByOrderCodeStatus(projectOrderInfo.getOrderCode(), InventoryDelivery.DeliveryStatusEnum.CONFIRM_DELIVERY.getCode());
|
||||||
if (CollUtil.isNotEmpty(inventoryDeliveries)) {
|
if (CollUtil.isNotEmpty(inventoryDeliveries)) {
|
||||||
deliveryMapper.deleteInventoryDeliveryByIds(inventoryOuters.stream().map(item -> item.getId().toString()).toArray(String[]::new));
|
// deliveryMapper.deleteInventoryDeliveryByIds(inventoryOuters.stream().map(item -> item.getId().toString()).toArray(String[]::new));
|
||||||
|
for (InventoryDelivery inventoryDeliverie : inventoryDeliveries) {
|
||||||
|
InventoryDelivery updateDelivery = new InventoryDelivery();
|
||||||
|
updateDelivery.setId(inventoryDeliverie.getId());
|
||||||
|
updateDelivery.setDeliveryStatus(InventoryDelivery.DeliveryStatusEnum.RECALL_DELIVERY.getCode());
|
||||||
|
deliveryMapper.updateInventoryDelivery(updateDelivery);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Map<String, Long> deliveryMap = inventoryDeliveries.stream().collect(Collectors.toMap(InventoryDelivery::getProductCode, InventoryDelivery::getQuantity, Long::sum));
|
Map<String, Long> deliveryMap = inventoryDeliveries.stream().collect(Collectors.toMap(InventoryDelivery::getProductCode, InventoryDelivery::getQuantity, Long::sum));
|
||||||
Map<String, ProductInfo> updateMap = new HashMap<>();
|
Map<String, ProductInfo> updateMap = new HashMap<>();
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,9 @@ import com.ruoyi.sip.dto.inventory.InventoryDeliveryDetailExcelDto;
|
||||||
import com.ruoyi.sip.mapper.InventoryOuterDetailMapper;
|
import com.ruoyi.sip.mapper.InventoryOuterDetailMapper;
|
||||||
import com.ruoyi.sip.mapper.InventoryOuterMapper;
|
import com.ruoyi.sip.mapper.InventoryOuterMapper;
|
||||||
import com.ruoyi.sip.service.*;
|
import com.ruoyi.sip.service.*;
|
||||||
|
import com.ruoyi.sip.vo.DeliveryApproveVo;
|
||||||
import com.ruoyi.sip.vo.DeliveryInfoVo;
|
import com.ruoyi.sip.vo.DeliveryInfoVo;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
|
|
@ -318,7 +320,7 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int deleteInventoryOuterById(Long id) {
|
public int deleteInventoryOuterById(Long id, boolean realDelete) {
|
||||||
InventoryDelivery inventoryDelivery = inventoryDeliveryMapper.selectInventoryDeliveryById(id);
|
InventoryDelivery inventoryDelivery = inventoryDeliveryMapper.selectInventoryDeliveryById(id);
|
||||||
//还原库存信息
|
//还原库存信息
|
||||||
InventoryInfo inventoryInfo = new InventoryInfo();
|
InventoryInfo inventoryInfo = new InventoryInfo();
|
||||||
|
|
@ -328,8 +330,17 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService {
|
||||||
if (CollUtil.isNotEmpty(inventoryInfos)) {
|
if (CollUtil.isNotEmpty(inventoryInfos)) {
|
||||||
inventoryInfoService.clearOutInfo(inventoryInfos.stream().map(InventoryInfo::getId).collect(Collectors.toList()));
|
inventoryInfoService.clearOutInfo(inventoryInfos.stream().map(InventoryInfo::getId).collect(Collectors.toList()));
|
||||||
}
|
}
|
||||||
|
if (realDelete) {
|
||||||
|
// 原逻辑,删除库存表以及sn码的关联
|
||||||
deliveryDetailService.deleteOmsInventoryDeliveryDetailByDeliveryId(id);
|
deliveryDetailService.deleteOmsInventoryDeliveryDetailByDeliveryId(id);
|
||||||
return inventoryDeliveryMapper.deleteInventoryDeliveryById(id);
|
return inventoryDeliveryMapper.deleteInventoryDeliveryById(id);
|
||||||
|
} else {
|
||||||
|
// 2026-03-19:新逻辑,仅修改发货单状态为撤回,不删除库存表
|
||||||
|
inventoryDelivery = new InventoryDelivery();
|
||||||
|
inventoryDelivery.setId(id);
|
||||||
|
inventoryDelivery.setDeliveryStatus(InventoryDelivery.DeliveryStatusEnum.RECALL_DELIVERY.getCode());
|
||||||
|
return inventoryDeliveryMapper.updateInventoryDelivery(inventoryDelivery);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -362,10 +373,13 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService {
|
||||||
@Override
|
@Override
|
||||||
public void recall(Long id) {
|
public void recall(Long id) {
|
||||||
//todo 判断应付或应收状态 不允许退
|
//todo 判断应付或应收状态 不允许退
|
||||||
|
List<DeliveryApproveVo> deliveryApproveVoList = inventoryDeliveryMapper.selectDeliveryApproveList(id);
|
||||||
|
if (CollectionUtils.isNotEmpty(deliveryApproveVoList)) {
|
||||||
|
throw new ServiceException("存在已完成或审批中的应收、应付信息,无法执行撤回操作");
|
||||||
|
}
|
||||||
|
|
||||||
InventoryDelivery inventoryDelivery = inventoryDeliveryMapper.selectInventoryDeliveryById(id);
|
InventoryDelivery inventoryDelivery = inventoryDeliveryMapper.selectInventoryDeliveryById(id);
|
||||||
deleteInventoryOuterById(id);
|
deleteInventoryOuterById(id, false);
|
||||||
List<ProjectProductInfo> projectProductInfos = projectProductInfoService.listDeliveryProductByOrderCode(Collections.singletonList(inventoryDelivery.getOrderCode()));
|
List<ProjectProductInfo> projectProductInfos = projectProductInfoService.listDeliveryProductByOrderCode(Collections.singletonList(inventoryDelivery.getOrderCode()));
|
||||||
//软硬件之和
|
//软硬件之和
|
||||||
long sum = projectProductInfos.stream().mapToLong(ProjectProductInfo::getQuantity).sum();
|
long sum = projectProductInfos.stream().mapToLong(ProjectProductInfo::getQuantity).sum();
|
||||||
|
|
@ -394,6 +408,7 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService {
|
||||||
updateOrder.setUpdateTime(new Date());
|
updateOrder.setUpdateTime(new Date());
|
||||||
updateOrder.setUpdateBy(ShiroUtils.getUserId().toString());
|
updateOrder.setUpdateBy(ShiroUtils.getUserId().toString());
|
||||||
updateOrder.setDeliveryStatus(sum == allSum ? ProjectOrderInfo.DeliveryStatusEnum.ALL_DELIVERY.getCode() : ProjectOrderInfo.DeliveryStatusEnum.PART_DELIVERY.getCode());
|
updateOrder.setDeliveryStatus(sum == allSum ? ProjectOrderInfo.DeliveryStatusEnum.ALL_DELIVERY.getCode() : ProjectOrderInfo.DeliveryStatusEnum.PART_DELIVERY.getCode());
|
||||||
|
updateOrder.setOperationVersion(updateOrder.getOperationVersion() + 1);
|
||||||
projectOrderInfoService.updateProjectOrderInfoByCode(updateOrder);
|
projectOrderInfoService.updateProjectOrderInfoByCode(updateOrder);
|
||||||
//修改累计发货数量
|
//修改累计发货数量
|
||||||
productInfoService.updateCumulativeCount(-inventoryDelivery.getQuantity(), inventoryDelivery.getProductCode());
|
productInfoService.updateCumulativeCount(-inventoryDelivery.getQuantity(), inventoryDelivery.getProductCode());
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ import org.flowable.engine.runtime.ProcessInstance;
|
||||||
import org.flowable.task.api.Task;
|
import org.flowable.task.api.Task;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
|
@ -79,6 +80,27 @@ public class OmsPurchaseOrderServiceImpl implements IOmsPurchaseOrderService, To
|
||||||
protected ManagementService managementService;
|
protected ManagementService managementService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IOmsFileLogService omsFileLogService;
|
private IOmsFileLogService omsFileLogService;
|
||||||
|
|
||||||
|
@Value("${sip.nex.vendor-code:P100}")
|
||||||
|
private String nexVendorCode;
|
||||||
|
|
||||||
|
@Value("${sip.nex.purchaser-username:xuxinyu}")
|
||||||
|
private String nexPurchaserUsername;
|
||||||
|
|
||||||
|
@Value("${sip.nex.owner-id:102}")
|
||||||
|
private Long nexOwnerId;
|
||||||
|
|
||||||
|
@Value("${sip.nex.owner-name:叶宇豪}")
|
||||||
|
private String nexOwnerName;
|
||||||
|
|
||||||
|
@Value("${sip.nex.warehouse-id:3}")
|
||||||
|
private Long nexWarehouseId;
|
||||||
|
|
||||||
|
@Value("${sip.nex.pay-method:1}")
|
||||||
|
private String nexPayMethod;
|
||||||
|
|
||||||
|
@Value("${sip.nex.total-amount:1000}")
|
||||||
|
private String nexTotalAmount;
|
||||||
/**
|
/**
|
||||||
* 查询采购单主表
|
* 查询采购单主表
|
||||||
*
|
*
|
||||||
|
|
@ -589,11 +611,11 @@ public class OmsPurchaseOrderServiceImpl implements IOmsPurchaseOrderService, To
|
||||||
omsPurchaseOrder.setBuyerAddress("重庆市两江新区云杉南路6号涉外商务区B6栋7楼");
|
omsPurchaseOrder.setBuyerAddress("重庆市两江新区云杉南路6号涉外商务区B6栋7楼");
|
||||||
omsPurchaseOrder.setRemark("nex授权申请流程");
|
omsPurchaseOrder.setRemark("nex授权申请流程");
|
||||||
// 查询制造商id, 制造商编码P008
|
// 查询制造商id, 制造商编码P008
|
||||||
VendorInfo vendorInfo = vendorInfoMapper.selectVendorInfoByVendorCode("P002");
|
VendorInfo vendorInfo = vendorInfoMapper.selectVendorInfoByVendorCode(nexVendorCode);
|
||||||
omsPurchaseOrder.setVendorId(vendorInfo == null ? null :vendorInfo.getVendorId());
|
omsPurchaseOrder.setVendorId(vendorInfo == null ? null :vendorInfo.getVendorId());
|
||||||
omsPurchaseOrder.setCurrency("RMB");
|
omsPurchaseOrder.setCurrency("RMB");
|
||||||
// 采购员:userName=徐心钰
|
// 采购员:userName=徐心钰
|
||||||
SysUser user = userMapper.selectUserByLoginName("xuxinyu");
|
SysUser user = userMapper.selectUserByLoginName(nexPurchaserUsername);
|
||||||
if(user == null){
|
if(user == null){
|
||||||
user = userMapper.selectUserById(1L);
|
user = userMapper.selectUserById(1L);
|
||||||
}
|
}
|
||||||
|
|
@ -602,11 +624,11 @@ public class OmsPurchaseOrderServiceImpl implements IOmsPurchaseOrderService, To
|
||||||
omsPurchaseOrder.setPurchaserMobile("");
|
omsPurchaseOrder.setPurchaserMobile("");
|
||||||
omsPurchaseOrder.setPurchaserEmail("");
|
omsPurchaseOrder.setPurchaserEmail("");
|
||||||
// 入库仓id
|
// 入库仓id
|
||||||
omsPurchaseOrder.setWarehouseId(3L);
|
omsPurchaseOrder.setWarehouseId(nexWarehouseId);
|
||||||
omsPurchaseOrder.setPayMethod("1");
|
omsPurchaseOrder.setPayMethod(nexPayMethod);
|
||||||
omsPurchaseOrder.setOwnerId(102L);
|
omsPurchaseOrder.setOwnerId(nexOwnerId);
|
||||||
omsPurchaseOrder.setOwnerName("叶宇豪");
|
omsPurchaseOrder.setOwnerName(nexOwnerName);
|
||||||
omsPurchaseOrder.setTotalAmount(new BigDecimal("1000"));
|
omsPurchaseOrder.setTotalAmount(new BigDecimal(nexTotalAmount));
|
||||||
omsPurchaseOrder.setStatus(OmsPurchaseOrder.StatusEnum.WAIT_COMPLETED.getCode()); // 0
|
omsPurchaseOrder.setStatus(OmsPurchaseOrder.StatusEnum.WAIT_COMPLETED.getCode()); // 0
|
||||||
omsPurchaseOrder.setApproveStatus(ApproveStatusEnum.WAIT_COMMIT.getCode()); // 0
|
omsPurchaseOrder.setApproveStatus(ApproveStatusEnum.WAIT_COMMIT.getCode()); // 0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
package com.ruoyi.sip.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import com.ruoyi.common.utils.ShiroUtils;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import com.ruoyi.sip.dto.ApiDataQueryDto;
|
||||||
|
import com.ruoyi.sip.vo.ProjectOrderInfoRecallVO;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.sip.mapper.ProjectOrderInfoRecallMapper;
|
||||||
|
import com.ruoyi.sip.domain.ProjectOrderInfoRecall;
|
||||||
|
import com.ruoyi.sip.service.IProjectOrderInfoRecallService;
|
||||||
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合同订单撤回记录 Service 业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-03-20
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ProjectOrderInfoRecallServiceImpl implements IProjectOrderInfoRecallService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ProjectOrderInfoRecallMapper projectOrderInfoRecallMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增合同订单撤回记录
|
||||||
|
*
|
||||||
|
* @param projectOrderInfoRecall 合同订单撤回记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertProjectOrderInfoRecall(ProjectOrderInfoRecall projectOrderInfoRecall)
|
||||||
|
{
|
||||||
|
projectOrderInfoRecall.setCreateTime(DateUtils.getNowDate());
|
||||||
|
if (StringUtils.isEmpty(projectOrderInfoRecall.getCreateBy())) {
|
||||||
|
projectOrderInfoRecall.setCreateBy(ShiroUtils.getUserId().toString());
|
||||||
|
}
|
||||||
|
return projectOrderInfoRecallMapper.insertProjectOrderInfoRecall(projectOrderInfoRecall);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ProjectOrderInfoRecallVO> getOrderRecallInfo(ApiDataQueryDto dto) {
|
||||||
|
return projectOrderInfoRecallMapper.getOrderRecallInfo(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.ruoyi.sip.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class DeliveryApproveVo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出库单ID
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批状态
|
||||||
|
*/
|
||||||
|
private Integer approveStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批类型
|
||||||
|
*/
|
||||||
|
private String approveType;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.ruoyi.sip.vo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class ProjectOrderInfoRecallVO {
|
||||||
|
|
||||||
|
//合同号
|
||||||
|
private String orderCode;
|
||||||
|
//版本号
|
||||||
|
private String versionCode;
|
||||||
|
|
||||||
|
private Date lastUpdateTime;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -81,8 +81,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</select>
|
</select>
|
||||||
<select id="listSn" resultType="com.ruoyi.sip.vo.DeliveryInfoVo">
|
<select id="listSn" resultType="com.ruoyi.sip.vo.DeliveryInfoVo">
|
||||||
SELECT
|
SELECT
|
||||||
t3.order_code,t5.version_code,t5.project_id ,t2.product_sn as 'serialNumber' ,t2.product_code,t4.description
|
t3.order_code,
|
||||||
as 'productDescription',t4.type as 'productType',t1.delivery_time as service_start_time,
|
(ifnull(t5.version_code,0) + ifnull(t5.operation_version,0)) AS version_code,
|
||||||
|
t5.project_id ,
|
||||||
|
t2.product_sn as 'serialNumber' ,
|
||||||
|
t2.product_code,
|
||||||
|
t4.description as 'productDescription',
|
||||||
|
t4.type as 'productType',
|
||||||
|
t1.delivery_time as service_start_time,
|
||||||
t1.update_time as 'lastUpdateTime'
|
t1.update_time as 'lastUpdateTime'
|
||||||
FROM
|
FROM
|
||||||
oms_inventory_delivery t1
|
oms_inventory_delivery t1
|
||||||
|
|
@ -178,4 +184,50 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<select id="selectDeliveryApproveList" resultType="com.ruoyi.sip.vo.DeliveryApproveVo">
|
||||||
|
select t1.id,t4.approve_status,'FK' as data_type
|
||||||
|
from oms_inventory_delivery as t1
|
||||||
|
inner join oms_payable_bill as t2
|
||||||
|
on t1.outer_code = t2.inventory_code
|
||||||
|
inner join oms_payable_payment_detail as t3
|
||||||
|
on t2.id = t3.payable_bill_id
|
||||||
|
inner join oms_payment_bill as t4
|
||||||
|
on t3.payment_bill_code = t4.payment_bill_code
|
||||||
|
where ifnull(t4.approve_status,0) in (1,2)
|
||||||
|
and t1.id = #{id}
|
||||||
|
union all
|
||||||
|
select t1.id,t4.approve_status,'SP' as data_type
|
||||||
|
from oms_inventory_delivery as t1
|
||||||
|
inner join oms_payable_bill as t2
|
||||||
|
on t1.outer_code = t2.inventory_code
|
||||||
|
inner join oms_payable_ticket_detail as t3
|
||||||
|
on t2.id = t3.payable_bill_id
|
||||||
|
inner join oms_ticket_bill as t4
|
||||||
|
on t3.ticket_bill_code = t4.ticket_bill_code
|
||||||
|
where ifnull(t4.approve_status,0) in (1,2)
|
||||||
|
and t1.id = #{id}
|
||||||
|
union all
|
||||||
|
select t1.id,t4.approve_status,'SK' as data_type
|
||||||
|
from oms_inventory_delivery as t1
|
||||||
|
inner join oms_receivable_bill as t2
|
||||||
|
on t1.outer_code = t2.inventory_code
|
||||||
|
inner join oms_receivable_receipt_detail as t3
|
||||||
|
on t2.id = t3.receivable_bill_id
|
||||||
|
inner join oms_receipt_bill as t4
|
||||||
|
on t3.receipt_bill_code = t4.receipt_bill_code
|
||||||
|
where ifnull(t4.approve_status,0) in (1,2)
|
||||||
|
and t1.id = #{id}
|
||||||
|
union all
|
||||||
|
select t1.id,t4.approve_status,'KP' as data_type
|
||||||
|
from oms_inventory_delivery as t1
|
||||||
|
inner join oms_receivable_bill as t2
|
||||||
|
on t1.outer_code = t2.inventory_code
|
||||||
|
inner join oms_receivable_invoice_detail as t3
|
||||||
|
on t2.id = t3.receivable_bill_id
|
||||||
|
inner join oms_invoice_bill as t4
|
||||||
|
on t3.invoice_bill_code = t4.invoice_bill_code
|
||||||
|
where ifnull(t4.approve_status,0) in (1,2)
|
||||||
|
and t1.id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -37,6 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="paymentMethod" column="payment_method" />
|
<result property="paymentMethod" column="payment_method" />
|
||||||
<result property="paymentRatio" column="payment_ratio" />
|
<result property="paymentRatio" column="payment_ratio" />
|
||||||
<result property="paymentDescription" column="payment_description" />
|
<result property="paymentDescription" column="payment_description" />
|
||||||
|
<result property="operationVersion" column="operation_version" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectProjectOrderInfoVo">
|
<sql id="selectProjectOrderInfoVo">
|
||||||
|
|
@ -44,7 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
shipment_amount, actual_purchase_amount, order_end_time, delivery_time, company_delivery, notifier,finance_status,
|
shipment_amount, actual_purchase_amount, order_end_time, delivery_time, company_delivery, notifier,finance_status,
|
||||||
notifier_email, notifier_phone, duty, duty_email, duty_phone, order_channel, partner_code, supplier,notifier_address,
|
notifier_email, notifier_phone, duty, duty_email, duty_phone, order_channel, partner_code, supplier,notifier_address,
|
||||||
remark, order_status, create_by, create_time, update_by, update_time,version_code,process_type,process_template,discount_fold,
|
remark, order_status, create_by, create_time, update_by, update_time,version_code,process_type,process_template,discount_fold,
|
||||||
delivery_status,sign_status,outer_status,approve_time,payment_method,payment_ratio,payment_description,order_type
|
delivery_status,sign_status,outer_status,approve_time,payment_method,payment_ratio,payment_description,order_type,operation_version
|
||||||
|
|
||||||
from project_order_info t1
|
from project_order_info t1
|
||||||
</sql>
|
</sql>
|
||||||
|
|
@ -54,7 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
t1.notifier_email, t1.notifier_phone, t1.duty, t1.duty_email, t1.duty_phone, t1.order_channel, t1.partner_code, t1.supplier,
|
t1.notifier_email, t1.notifier_phone, t1.duty, t1.duty_email, t1.duty_phone, t1.order_channel, t1.partner_code, t1.supplier,
|
||||||
t1.remark, t1.order_status, t1.create_by, t1.create_time, t1.update_by, t1.update_time,t1.partner_user_name,t1.partner_email
|
t1.remark, t1.order_status, t1.create_by, t1.create_time, t1.update_by, t1.update_time,t1.partner_user_name,t1.partner_email
|
||||||
,t1.partner_phone,t1.version_code,t1.process_type,t1.process_template,t1.discount_fold,t1.notifier_address,t1.finance_status,
|
,t1.partner_phone,t1.version_code,t1.process_type,t1.process_template,t1.discount_fold,t1.notifier_address,t1.finance_status,
|
||||||
t1.delivery_status,t1.sign_status,t1.outer_status,t1.approve_time,t1.payment_method,t1.payment_ratio,t1.payment_description
|
t1.delivery_status,t1.sign_status,t1.outer_status,t1.approve_time,t1.payment_method,t1.payment_ratio,t1.payment_description,t1.operation_version
|
||||||
,t2.project_code,t2.project_name,t2.province,t2.customer_name,t2.customer_code,t2.industry_type,t2.bg_property,t2.agent_code,t2.estimated_order_time
|
,t2.project_code,t2.project_name,t2.province,t2.customer_name,t2.customer_code,t2.industry_type,t2.bg_property,t2.agent_code,t2.estimated_order_time
|
||||||
,t2.customer_phone,t2.customer_user_name,t2.agent_code,t2.customer_code,t2.partner_name project_partner_name
|
,t2.customer_phone,t2.customer_user_name,t2.agent_code,t2.customer_code,t2.partner_name project_partner_name
|
||||||
,t3.partner_name,t3.level,t3.system_user_id,t3.address partner_address
|
,t3.partner_name,t3.level,t3.system_user_id,t3.address partner_address
|
||||||
|
|
@ -332,7 +333,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
SELECT
|
SELECT
|
||||||
t1.order_code,
|
t1.order_code,
|
||||||
t2.project_name AS 'order_name',
|
t2.project_name AS 'order_name',
|
||||||
t1.version_code,
|
(ifnull(t1.version_code,0) + ifnull(t1.operation_version,0)) AS version_code,
|
||||||
t3.contact_person AS 'sale_name',
|
t3.contact_person AS 'sale_name',
|
||||||
t3.contact_email AS 'sale_email' ,
|
t3.contact_email AS 'sale_email' ,
|
||||||
t4.customer_name as 'customer_name',
|
t4.customer_name as 'customer_name',
|
||||||
|
|
@ -377,7 +378,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
t1.notifier_email, t1.notifier_phone, t1.duty, t1.duty_email, t1.duty_phone, t1.order_channel, t1.partner_code, t1.supplier,
|
t1.notifier_email, t1.notifier_phone, t1.duty, t1.duty_email, t1.duty_phone, t1.order_channel, t1.partner_code, t1.supplier,
|
||||||
t1.remark, t1.order_status, t1.create_by, t1.create_time, t1.update_by, t1.update_time,t1.partner_user_name,t1.partner_email
|
t1.remark, t1.order_status, t1.create_by, t1.create_time, t1.update_by, t1.update_time,t1.partner_user_name,t1.partner_email
|
||||||
,t1.partner_phone,t1.version_code,t1.process_type,t1.process_template,t1.discount_fold,t1.notifier_address,t1.finance_status,
|
,t1.partner_phone,t1.version_code,t1.process_type,t1.process_template,t1.discount_fold,t1.notifier_address,t1.finance_status,
|
||||||
t1.delivery_status,t1.sign_status,t1.outer_status,t1.approve_time,t1.payment_method,t1.payment_ratio,t1.payment_description
|
t1.delivery_status,t1.sign_status,t1.outer_status,t1.approve_time,t1.payment_method,t1.payment_ratio,t1.payment_description,t1.operation_version
|
||||||
,t2.project_code,t2.project_name,t2.province,t2.customer_name,t2.customer_code,t2.industry_type,t2.bg_property,t2.agent_code,t2.estimated_order_time
|
,t2.project_code,t2.project_name,t2.province,t2.customer_name,t2.customer_code,t2.industry_type,t2.bg_property,t2.agent_code,t2.estimated_order_time
|
||||||
,t2.customer_phone,t2.customer_user_name,t2.agent_code,t2.customer_code,t2.partner_name project_partner_name
|
,t2.customer_phone,t2.customer_user_name,t2.agent_code,t2.customer_code,t2.partner_name project_partner_name
|
||||||
,t3.partner_name,t3.level,t3.system_user_id,t3.address partner_address
|
,t3.partner_name,t3.level,t3.system_user_id,t3.address partner_address
|
||||||
|
|
@ -599,6 +600,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="paymentMethod != null and paymentMethod != ''">payment_method,</if>
|
<if test="paymentMethod != null and paymentMethod != ''">payment_method,</if>
|
||||||
<if test="paymentRatio != null">payment_ratio,</if>
|
<if test="paymentRatio != null">payment_ratio,</if>
|
||||||
<if test="paymentDescription != null and paymentDescription != ''">payment_description,</if>
|
<if test="paymentDescription != null and paymentDescription != ''">payment_description,</if>
|
||||||
|
<if test="operationVersion != null">operation_version,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="projectId != null">#{projectId},</if>
|
<if test="projectId != null">#{projectId},</if>
|
||||||
|
|
@ -641,6 +643,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="paymentMethod != null and paymentMethod != ''">#{paymentMethod},</if>
|
<if test="paymentMethod != null and paymentMethod != ''">#{paymentMethod},</if>
|
||||||
<if test="paymentRatio != null">#{paymentRatio},</if>
|
<if test="paymentRatio != null">#{paymentRatio},</if>
|
||||||
<if test="paymentDescription != null and paymentDescription != ''">#{paymentDescription},</if>
|
<if test="paymentDescription != null and paymentDescription != ''">#{paymentDescription},</if>
|
||||||
|
<if test="operationVersion != null">#{operationVersion},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="bakData">
|
<insert id="bakData">
|
||||||
|
|
@ -685,7 +688,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
process_type,
|
process_type,
|
||||||
process_template,
|
process_template,
|
||||||
order_type,
|
order_type,
|
||||||
discount_fold)
|
discount_fold,
|
||||||
|
operation_version)
|
||||||
select id,
|
select id,
|
||||||
project_id,
|
project_id,
|
||||||
province,
|
province,
|
||||||
|
|
@ -727,7 +731,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
process_type,
|
process_type,
|
||||||
process_template,
|
process_template,
|
||||||
order_type,
|
order_type,
|
||||||
discount_fold
|
discount_fold,
|
||||||
|
operation_version
|
||||||
from project_order_info
|
from project_order_info
|
||||||
where order_code = #{orderCode}
|
where order_code = #{orderCode}
|
||||||
</insert>
|
</insert>
|
||||||
|
|
@ -780,6 +785,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="paymentRatio != null">payment_ratio = #{paymentRatio},</if>
|
<if test="paymentRatio != null">payment_ratio = #{paymentRatio},</if>
|
||||||
<if test="paymentDescription != null and paymentDescription != ''">payment_description = #{paymentDescription},</if>
|
<if test="paymentDescription != null and paymentDescription != ''">payment_description = #{paymentDescription},</if>
|
||||||
<if test="financeStatus != null and financeStatus != ''">finance_status = #{financeStatus},</if>
|
<if test="financeStatus != null and financeStatus != ''">finance_status = #{financeStatus},</if>
|
||||||
|
<if test="operationVersion != null">operation_version = #{operationVersion},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
@ -796,6 +802,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="paymentMethod != null and paymentMethod != ''">payment_method = #{paymentMethod},</if>
|
<if test="paymentMethod != null and paymentMethod != ''">payment_method = #{paymentMethod},</if>
|
||||||
<if test="paymentRatio != null">payment_ratio = #{paymentRatio},</if>
|
<if test="paymentRatio != null">payment_ratio = #{paymentRatio},</if>
|
||||||
<if test="paymentDescription != null and paymentDescription != ''">payment_description = #{paymentDescription},</if>
|
<if test="paymentDescription != null and paymentDescription != ''">payment_description = #{paymentDescription},</if>
|
||||||
|
<if test="operationVersion != null">operation_version = #{operationVersion},</if>
|
||||||
|
|
||||||
<if test="versionCode != null">
|
<if test="versionCode != null">
|
||||||
<choose>
|
<choose>
|
||||||
|
|
@ -852,4 +859,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<select id="selectInentoryDeliveryByProjectOrderInfoId" resultType="com.ruoyi.sip.domain.InventoryDelivery">
|
||||||
|
select t3.*
|
||||||
|
from project_order_info as t1
|
||||||
|
inner join oms_inventory_outer as t2
|
||||||
|
on t1.order_code = t2.order_code
|
||||||
|
inner join oms_inventory_delivery as t3
|
||||||
|
on t2.outer_code = t3.outer_code
|
||||||
|
where t1.id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ruoyi.sip.mapper.ProjectOrderInfoRecallMapper">
|
||||||
|
|
||||||
|
<resultMap type="ProjectOrderInfoRecall" id="ProjectOrderInfoRecallResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="orderCode" column="order_code" />
|
||||||
|
<result property="versionCode" column="version_code" />
|
||||||
|
<result property="operationVersion" column="operation_version" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectProjectOrderInfoRecallVo">
|
||||||
|
select id, order_code, version_code, operation_version, create_time, create_by
|
||||||
|
from project_order_info_recall
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<insert id="insertProjectOrderInfoRecall" parameterType="ProjectOrderInfoRecall" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into project_order_info_recall
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="orderCode != null and orderCode != ''">order_code,</if>
|
||||||
|
<if test="versionCode != null">version_code,</if>
|
||||||
|
<if test="operationVersion != null">operation_version,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="orderCode != null and orderCode != ''">#{orderCode},</if>
|
||||||
|
<if test="versionCode != null">#{versionCode},</if>
|
||||||
|
<if test="operationVersion != null">#{operationVersion},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<select id="getOrderRecallInfo" parameterType="com.ruoyi.sip.dto.ApiDataQueryDto" resultType="com.ruoyi.sip.vo.ProjectOrderInfoRecallVO">
|
||||||
|
select order_code, (ifnull(version_code,0) + ifnull(operation_version,0)) as version_code, create_time as last_update_time
|
||||||
|
from project_order_info_recall
|
||||||
|
<where>
|
||||||
|
<choose>
|
||||||
|
<when test="queryStartTime!=null and queryEndTime!=null">
|
||||||
|
and create_time between #{queryStartTime} and #{queryEndTime}
|
||||||
|
</when>
|
||||||
|
<when test="queryStartTime!=null">
|
||||||
|
and create_time <![CDATA[ >= ]]> #{queryStartTime}
|
||||||
|
</when>
|
||||||
|
<when test="queryEndTime!=null">
|
||||||
|
and create_time <![CDATA[ <= ]]> #{queryEndTime}
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -17,11 +17,17 @@
|
||||||
<result property="updatedAt" column="updated_at" />
|
<result property="updatedAt" column="updated_at" />
|
||||||
<result property="deletedAt" column="deleted_at" />
|
<result property="deletedAt" column="deleted_at" />
|
||||||
<result property="hzCode" column="hz_code" />
|
<result property="hzCode" column="hz_code" />
|
||||||
|
<result property="level2Type" column="level2_type" />
|
||||||
|
<result property="terminalType" column="terminal_type" />
|
||||||
|
<result property="localization" column="localization" />
|
||||||
|
<result property="cpuBrand" column="cpu_brand" />
|
||||||
|
<result property="cpuArchitecture" column="cpu_architecture" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectProductInfoVo">
|
<sql id="selectProductInfoVo">
|
||||||
select t1.id, t1.product_code, t1.product_name, t1.model, t1.description, t1.remark, t1.created_at, t1.updated_at,
|
select t1.id, t1.product_code, t1.product_name, t1.model, t1.description, t1.remark, t1.created_at, t1.updated_at,
|
||||||
t1.deleted_at,t1.value,t1.type,t1.hz_code,t1.catalogue_price,t1.guidance_discount,t1.vendor_code,t1.available_count,t1.cumulative_count
|
t1.deleted_at,t1.value,t1.type,t1.hz_code,t1.catalogue_price,t1.guidance_discount,t1.vendor_code,t1.available_count,t1.cumulative_count,
|
||||||
|
t1.level2_type, t1.terminal_type, t1.localization, t1.cpu_brand, t1.cpu_architecture
|
||||||
,t2.vendor_name
|
,t2.vendor_name
|
||||||
from product_info t1 left join oms_vendor_info t2 on t1.vendor_code = t2.vendor_code
|
from product_info t1 left join oms_vendor_info t2 on t1.vendor_code = t2.vendor_code
|
||||||
</sql>
|
</sql>
|
||||||
|
|
@ -162,6 +168,11 @@
|
||||||
<if test="type != null">type,</if>
|
<if test="type != null">type,</if>
|
||||||
<if test="value != null">value,</if>
|
<if test="value != null">value,</if>
|
||||||
<if test="hzCode != null">hz_code,</if>
|
<if test="hzCode != null">hz_code,</if>
|
||||||
|
<if test="level2Type != null and level2Type != ''">level2_type,</if>
|
||||||
|
<if test="terminalType != null and terminalType != ''">terminal_type,</if>
|
||||||
|
<if test="localization != null and localization != ''">localization,</if>
|
||||||
|
<if test="cpuBrand != null and cpuBrand != ''">cpu_brand,</if>
|
||||||
|
<if test="cpuArchitecture != null and cpuArchitecture != ''">cpu_architecture,</if>
|
||||||
created_at,status,create_by
|
created_at,status,create_by
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
|
@ -176,6 +187,11 @@
|
||||||
<if test="type != null">#{type},</if>
|
<if test="type != null">#{type},</if>
|
||||||
<if test="value != null">#{value},</if>
|
<if test="value != null">#{value},</if>
|
||||||
<if test="hzCode != null">#{hzCode},</if>
|
<if test="hzCode != null">#{hzCode},</if>
|
||||||
|
<if test="level2Type != null and level2Type != ''">#{level2Type},</if>
|
||||||
|
<if test="terminalType != null and terminalType != ''">#{terminalType},</if>
|
||||||
|
<if test="localization != null and localization != ''">#{localization},</if>
|
||||||
|
<if test="cpuBrand != null and cpuBrand != ''">#{cpuBrand},</if>
|
||||||
|
<if test="cpuArchitecture != null and cpuArchitecture != ''">#{cpuArchitecture},</if>
|
||||||
NOW(),0,#{createBy}
|
NOW(),0,#{createBy}
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
@ -194,6 +210,11 @@
|
||||||
<if test="type != null">type = #{type},</if>
|
<if test="type != null">type = #{type},</if>
|
||||||
<if test="value != null">value = #{value},</if>
|
<if test="value != null">value = #{value},</if>
|
||||||
<if test="hzCode != null">hz_code = #{hzCode},</if>
|
<if test="hzCode != null">hz_code = #{hzCode},</if>
|
||||||
|
<if test="level2Type != null and level2Type != ''">level2_type = #{level2Type},</if>
|
||||||
|
<if test="terminalType != null and terminalType != ''">terminal_type = #{terminalType},</if>
|
||||||
|
<if test="localization != null and localization != ''">localization = #{localization},</if>
|
||||||
|
<if test="cpuBrand != null and cpuBrand != ''">cpu_brand = #{cpuBrand},</if>
|
||||||
|
<if test="cpuArchitecture != null and cpuArchitecture != ''">cpu_architecture = #{cpuArchitecture},</if>
|
||||||
<if test="createdAt != null">created_at = #{createdAt},</if>
|
<if test="createdAt != null">created_at = #{createdAt},</if>
|
||||||
updated_at = NOW(),update_by=#{updateBy}
|
updated_at = NOW(),update_by=#{updateBy}
|
||||||
<if test="deletedAt != null">deleted_at = #{deletedAt},</if>
|
<if test="deletedAt != null">deleted_at = #{deletedAt},</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue