ソースを参照

Merge remote-tracking branch 'origin/master'

heguanxun 8 ヶ月 前
コミット
fe1f8c17f0
共有16 個のファイルを変更した340 個の追加126 個の削除を含む
  1. 4 1
      snowy-admin-web/src/api/yqyc/qySecondlineHfdApi.js
  2. 2 2
      snowy-admin-web/src/components/XnUpload/index.vue
  3. 77 18
      snowy-admin-web/src/views/yqyc/zero/enterprise-ledger/detail.vue
  4. 4 0
      snowy-admin-web/src/views/yqyc/zero/enterprise-ledger/index.vue
  5. 6 9
      snowy-admin-web/src/views/yqyc/zero/two/out-nuclear-annotation/detail.vue
  6. 7 5
      snowy-admin-web/src/views/yqyc/zero/two/out-nuclear-annotation/index.vue
  7. 39 51
      snowy-admin-web/src/views/yqyc/zero/two/out-nuclear-release/detail.vue
  8. 17 15
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qyrecordinfo/entity/BusinessIdGenerator.java
  9. 8 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehfd/controller/QySecondlineHfdController.java
  10. 3 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehfd/param/QySecondlineHfdPageParam.java
  11. 3 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehfd/service/QySecondlineHfdService.java
  12. 72 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehfd/service/impl/QySecondlineHfdServiceImpl.java
  13. 1 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehfdlist/service/impl/QySecondlineHfdListServiceImpl.java
  14. 24 23
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehzdtz/entity/QySecondlineHzdTz.java
  15. 9 0
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehzdtz/param/QySecondlineHzdTzPageParam.java
  16. 64 1
      snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehzdtz/service/impl/QySecondlineHzdTzServiceImpl.java

+ 4 - 1
snowy-admin-web/src/api/yqyc/qySecondlineHfdApi.js

@@ -39,5 +39,8 @@ export default {
 	},
 	qysecondlinehfdlistGetHfdBgInfoByBgCode(data) {
 		return baseRequest(`/biz/qysecondlinehfd/getHfdBgInfoByBgCode`, data, 'get')
-	}
+	},
+	qySecondlineHfdGetHzListByCondition(data) {
+		return request('getHzListByCondition', data, 'get')
+	},
 }

+ 2 - 2
snowy-admin-web/src/components/XnUpload/index.vue

@@ -330,8 +330,8 @@
 			}
 			return
 		}
-		emit('update:value', undefined)
-		emit('onChange', undefined)
+		emit('update:value', typeof props.value == 'object' ? [] : '')
+		emit('onChange', typeof props.value == 'object' ? [] : '')
 	}
 	// 通过DOM获取上传的文件
 	const uploadFileList = () => {

+ 77 - 18
snowy-admin-web/src/views/yqyc/zero/enterprise-ledger/detail.vue

@@ -99,12 +99,28 @@
 					<a-row :gutter="16">
 						<a-col :span="8">
 							<a-form-item label="料件编码:" name="productCode">
-								<a-input v-model:value="bodyData.productCode" :disabled="isView" placeholder="请输入商品编码" allow-clear />
+								<a-select
+									v-model:value="bodyData.productCode"
+									placeholder="请选择料件编码"
+									style="width: 100%"
+									:filter-option="false"
+									:not-found-content="fetchingLj ? undefined : null"
+									:options="ljOptions"
+									:show-search="true"
+									@search="fetchLj"
+									@change="onChangeLj"
+									option-label-prop="value"
+									:disabled="isView"
+								>
+									<template v-if="fetchingLj" #notFoundContent>
+										<a-spin size="small" />
+									</template>
+								</a-select>
 							</a-form-item>
 						</a-col>
 						<a-col :span="8">
 							<a-form-item label="料件名称:" name="productName">
-								<a-input v-model:value="bodyData.productName" :disabled="isView" placeholder="请输入商品名称" allow-clear />
+								<a-input v-model:value="bodyData.productName" :disabled="true" placeholder="请选择料件编码" allow-clear />
 							</a-form-item>
 						</a-col>
 						<a-col :span="8">
@@ -129,12 +145,12 @@
 						</a-col>
 						<a-col :span="8">
 							<a-form-item label="法定计量单位:" name="legalUnit">
-								<a-select v-model:value="bodyData.legalUnit" :disabled="isView" placeholder="请输入法定计量单位" :options="legalUnitOptions" show-search allow-clear option-filter-prop="label"/>
+								<a-input v-model:value="bodyData.legalUnit" :disabled="true" placeholder="请选择料件编码" allow-clear/>
 							</a-form-item>
 						</a-col>
 						<a-col :span="8">
 							<a-form-item label="法定第二计量单位:" name="legalSecondUnit">
-								<a-select v-model:value="bodyData.legalSecondUnit" :disabled="isView" placeholder="请输入法定第二计量单位" :options="legalUnitOptions" show-search allow-clear option-filter-prop="label"/>
+								<a-input v-model:value="bodyData.legalSecondUnit" :disabled="true" placeholder="请选择料件编码" allow-clear/>
 							</a-form-item>
 						</a-col>
 						<a-col :span="8">
@@ -169,7 +185,7 @@
 						</a-col>
 						<a-col :span="8">
 							<a-form-item label="重量比例因子:" name="weightRatioFactor">
-								<a-input v-model:value="bodyData.weightRatioFactor" :disabled="true" placeholder="备案数量 / 法定数量" @change="onChangeWeightRatioFactor"/>
+								<a-input v-model:value="bodyData.weightRatioFactor" :disabled="true" placeholder="备案数量 / 法定数量"/>
 							</a-form-item>
 						</a-col>
 						<a-col :span="8">
@@ -363,6 +379,8 @@
 									:show-search="true"
 									@search="fetchSp"
 									@change="onChangeSp"
+									option-label-prop="value"
+									:disabled="isView"
 								>
 									<template v-if="fetchingSp" #notFoundContent>
 										<a-spin size="small" />
@@ -402,17 +420,17 @@
 						</a-col>
 						<a-col :span="8">
 							<a-form-item label="成品内销人民币价格:" name="domesticSalePrice">
-								<a-input v-model:value="productData.domesticSalePrice" :disabled="isView"  :min="0" style="width: 100%;" placeholder="请输入成品内销人民币价格" />
+								<a-input v-model:value="productData.domesticSalePrice" :disabled="isView"  :min="0" style="width: 100%;" placeholder="请输入成品内销人民币价格"  @change="onChangeSelfRate"/>
 							</a-form-item>
 						</a-col>
 						<a-col :span="8">
 							<a-form-item label="境外进口料件总价(RMB):" name="importTotal">
-								<a-input v-model:value="productData.importTotal" :disabled="isView" :min="0" style="width: 100%;" placeholder="请输入境外进口料件总价(RMB)" />
+								<a-input v-model:value="productData.importTotal" :disabled="isView" :min="0" style="width: 100%;" placeholder="请输入境外进口料件总价(RMB)"  @change="onChangeSelfRate"/>
 							</a-form-item>
 						</a-col>
 						<a-col :span="8">
 							<a-form-item label="国内采购料件总价(RMB):" name="domesticTotal">
-								<a-input v-model:value="productData.domesticTotal" :disabled="isView" :min="0" style="width: 100%;" placeholder="请输入国内采购料件总价(RMB)" />
+								<a-input v-model:value="productData.domesticTotal" :disabled="isView" :min="0" style="width: 100%;" placeholder="请输入国内采购料件总价(RMB)"  @change="onChangeSelfRate"/>
 							</a-form-item>
 						</a-col>
 						<a-col :span="8">
@@ -421,8 +439,14 @@
 							</a-form-item>
 						</a-col>
 						<a-col :span="8">
-							<a-form-item label="企业自主核算加工增值率:" name="selfRate">
-								<a-input v-model:value="productData.selfRate" :disabled="isView" placeholder="请输入企业自主核算加工增值率" allow-clear />
+							<a-form-item label="企业自主核算加工增值率(%):" name="selfRate">
+								<a-input v-model:value="productData.selfRate" :disabled="true" placeholder="请输入企业自主核算加工增值率(%)" allow-clear>
+									<template #suffix>
+										<a-tooltip title="(成品内销人民币价格 - 境外进口料件总价(RMB) - 国内采购料件总价(RMB))/ (境外进口料件总价(RMB) + 国内采购料件总价(RMB))">
+											<info-circle-outlined style="color: rgba(0, 0, 0, 0.45)" />
+										</a-tooltip>
+									</template>
+								</a-input>
 							</a-form-item>
 						</a-col>
 						<a-col :span="8">
@@ -558,6 +582,8 @@ const currencyOptions = ref([])
 const regionCodeOptions = ref([])
 const spOptions = ref([])
 const fetchingSp = ref(false)
+const ljOptions = ref([])
+const fetchingLj = ref(false)
 
 // 列表选择配置
 const bodyOptions = {
@@ -937,7 +963,7 @@ const productColumns = [
 		width: 200
 	},
 	{
-		title: '企业自主核算加工增值率',
+		title: '企业自主核算加工增值率(%)',
 		dataIndex: 'selfRate',
 		width: 200
 	},
@@ -1228,10 +1254,11 @@ const onChangeRecordQuantity = () => {
 			bodyData.value.recordTotalPrice = ''
 		}
 		if (proxy.$util.isValue(bodyData.value.recordQuantity) && proxy.$util.isValue(bodyData.value.legalQuantity) && (Number(bodyData.value.legalQuantity) > 0)) {
-			bodyData.value.weightRatioFactor = Number(bodyData.value.recordQuantity) / Number(bodyData.value.legalQuantity)
+			bodyData.value.weightRatioFactor = (Number(bodyData.value.recordQuantity) / Number(bodyData.value.legalQuantity) * 100).toFixed(2)
 		} else {
 			bodyData.value.weightRatioFactor = ''
 		}
+		bodyData.value.firstRatioFactor = bodyData.value.weightRatioFactor
 		if (proxy.$util.isValue(bodyData.value.recordQuantity) && proxy.$util.isValue(bodyData.value.inAccountCumulativeAmount) && proxy.$util.isValue(bodyData.value.outAccountCumulativeAmount)) {
 			bodyData.value.remainingRecordAmount = Number(bodyData.value.inAccountCumulativeAmount) - Number(bodyData.value.outAccountCumulativeAmount) - Number(bodyData.value.recordQuantity)
 		} else {
@@ -1251,14 +1278,10 @@ const onChangeRecordPrice = () => {
 const onChangeLegalQuantity = () => {
 	setTimeout(() => {
 		if (proxy.$util.isValue(bodyData.value.recordQuantity) && proxy.$util.isValue(bodyData.value.legalQuantity) && (Number(bodyData.value.legalQuantity) > 0)) {
-			bodyData.value.weightRatioFactor = Number(bodyData.value.recordQuantity) / Number(bodyData.value.legalQuantity)
+			bodyData.value.weightRatioFactor = (Number(bodyData.value.recordQuantity) / Number(bodyData.value.legalQuantity) * 100).toFixed(2)
 		} else {
 			bodyData.value.weightRatioFactor = ''
 		}
-	}, 100)
-}
-const onChangeWeightRatioFactor = () => {
-	setTimeout(() => {
 		bodyData.value.firstRatioFactor = bodyData.value.weightRatioFactor
 	}, 100)
 }
@@ -1307,7 +1330,43 @@ const onChangeSp = (val, obj) => {
 	productData.value.productName = obj.productName
 	productData.value.version = 1
 	productData.value.hsCode = val
-	productData.value.measurementUnit = obj.firstUnitCode + '-' + obj.firstUnitName
+	productData.value.measurementUnit = (obj.firstUnitCode || obj.firstUnitName) ? (obj.firstUnitCode + '-' + obj.firstUnitName) : ''
+}
+const fetchLj = debounce(value => {
+	lastFetchId += 1;
+	const fetchId = lastFetchId;
+	ljOptions.value = [];
+	fetchingLj.value = true;
+	qyRecordProductDictApi.qyRecordProductDictPage({
+		current: 1,
+		size: 10000,
+		productCode: value
+	}).then((res) => {
+		if (fetchId !== lastFetchId) {
+			return;
+		}
+		const arr = res.records.map(v => {
+			v.label = v.productName
+			v.value = v.productCode
+			return v
+		});
+		ljOptions.value = arr
+		fetchingLj.value = false
+	})
+}, 300);
+const onChangeLj = (val, obj) => {
+	bodyData.value.productName = obj.productName
+	bodyData.value.legalUnit = (obj.firstUnitCode || obj.firstUnitName) ? (obj.firstUnitCode + '-' + obj.firstUnitName) : ''
+	bodyData.value.legalSecondUnit = (obj.secondUnitCode || obj.secondUnitName) ? (obj.secondUnitCode + '-' + obj.secondUnitName) : ''
+}
+const onChangeSelfRate = () => {
+	setTimeout(() => {
+		if (proxy.$util.isValue(productData.value.domesticSalePrice) && proxy.$util.isValue(productData.value.importTotal) && proxy.$util.isValue(productData.value.domesticTotal) && (Number(productData.value.importTotal) + Number(productData.value.domesticTotal) > 0)) {
+			productData.value.selfRate = ((Number(productData.value.domesticSalePrice) - Number(productData.value.importTotal) - Number(productData.value.domesticTotal)) / (Number(productData.value.importTotal) + Number(productData.value.domesticTotal)) * 100).toFixed(2)
+		} else {
+			productData.value.selfRate = ''
+		}
+	}, 100)
 }
 // 抛出函数
 defineExpose({

+ 4 - 0
snowy-admin-web/src/views/yqyc/zero/enterprise-ledger/index.vue

@@ -170,6 +170,10 @@
 			title: '审核状态',
 			dataIndex: 'status',
 		},
+		{
+			title: '申报时间',
+			dataIndex: 'createTime',
+		},
 	]
 	// 操作栏通过权限判断是否显示
 	if (hasPerm(['qyRecordInfoEdit', 'qyRecordInfoDelete'])) {

+ 6 - 9
snowy-admin-web/src/views/yqyc/zero/two/out-nuclear-annotation/detail.vue

@@ -73,13 +73,13 @@
 						<a-col :span="8">
 							<a-form-item label="对应报关申报编号:" name="dybgCode">
 								<a-input v-model:value="formData.dybgCode" :disabled="true"
-										 placeholder="请输入对应报关申报编号" allow-clear/>
+										 placeholder="请选择关联清单编号" allow-clear/>
 							</a-form-item>
 						</a-col>
 						<a-col :span="8">
 							<a-form-item label="对应报关单申报单位名称:" name="dybgDept">
 								<a-input v-model:value="formData.dybgDept" :disabled="true"
-										 placeholder="请输入对应报关单申报单位名称" allow-clear/>
+										 placeholder="请选择关联清单编号" allow-clear/>
 							</a-form-item>
 						</a-col>
 						<a-col :span="8">
@@ -231,7 +231,7 @@
 						<a-col :span="8">
 							<a-form-item label="重量比例因子:" name="weightRatioFactor">
 								<a-input v-model:value="bodyData.weightRatioFactor" :disabled="true"
-										 placeholder="申报数量 / 法定数量" allow-clear @change="onChangeWeightRatioFactor"/>
+										 placeholder="申报数量 / 法定数量" allow-clear/>
 							</a-form-item>
 						</a-col>
 						<a-col :span="8">
@@ -549,6 +549,7 @@ const onClose = () => {
 // 默认要校验的
 const formRules = {
 	dybgDept: [required('请输入对应报关单申报单位名称')],
+	glqdCode: [required('请输入关联清单编号')],
 }
 // 验证并提交数据
 const onSubmit = () => {
@@ -1052,7 +1053,7 @@ const onChangProductOrderCode = (val) => {
 const onChangeSbNum = () => {
 	setTimeout(() => {
 		if (proxy.$util.isValue(bodyData.value.sbNum) && proxy.$util.isValue(bodyData.value.legalQuantity) && (Number(bodyData.value.legalQuantity) > 0)) {
-			bodyData.value.weightRatioFactor = Number(bodyData.value.sbNum) / Number(bodyData.value.legalQuantity)
+			bodyData.value.weightRatioFactor = (Number(bodyData.value.sbNum) / Number(bodyData.value.legalQuantity) * 100).toFixed(2)
 		} else {
 			bodyData.value.weightRatioFactor = ''
 		}
@@ -1061,14 +1062,10 @@ const onChangeSbNum = () => {
 const onChangeLegalQuantity = () => {
 	setTimeout(() => {
 		if (proxy.$util.isValue(bodyData.value.sbNum) && proxy.$util.isValue(bodyData.value.legalQuantity) && (Number(bodyData.value.legalQuantity) > 0)) {
-			bodyData.value.weightRatioFactor = Number(bodyData.value.sbNum) / Number(bodyData.value.legalQuantity)
+			bodyData.value.weightRatioFactor = (Number(bodyData.value.sbNum) / Number(bodyData.value.legalQuantity) * 100).toFixed(2)
 		} else {
 			bodyData.value.weightRatioFactor = ''
 		}
-	}, 100)
-}
-const onChangeWeightRatioFactor = () => {
-	setTimeout(() => {
 		bodyData.value.firstRatioFactor = bodyData.value.weightRatioFactor
 	}, 100)
 }

+ 7 - 5
snowy-admin-web/src/views/yqyc/zero/two/out-nuclear-annotation/index.vue

@@ -14,7 +14,7 @@
                 </a-col>
                 <a-col :span="6">
                     <a-form-item label="台账类型" name="tzType">
-                        <a-select v-model:value="searchFormState.tzType" placeholder="请选择台账类型" :options="tzTypeOptions" show-search allow-clear option-filter-prop="label"/>
+                        <a-input v-model:value="searchFormState.tzType" placeholder="请输入台账类型" allow-clear/>
                     </a-form-item>
                 </a-col>
                 <a-col :span="6">
@@ -29,7 +29,7 @@
                 </a-col>
                 <a-col :span="6">
                     <a-form-item label="申报类型" name="sblx">
-                        <a-input v-model:value="searchFormState.sblx" placeholder="请输入申报类型" allow-clear/>
+						<a-select v-model:value="searchFormState.sblx" placeholder="请选择申报类型" :options="applyTypeOptions" show-search allow-clear option-filter-prop="label"/>
                     </a-form-item>
                 </a-col>
                 <a-col :span="6">
@@ -75,12 +75,12 @@
 				</a-space>
 			</template>
 			<template #bodyCell="{ column, record }">
-				<template v-if="column.dataIndex === 'tzType'">
-					{{ $TOOL.dictTypeData('tzlx', record.tzType) }}
-				</template>
 				<template v-if="column.dataIndex === 'status'">
 					{{ $TOOL.dictTypeData('djzt', record.status) }}
 				</template>
+				<template v-if="column.dataIndex === 'sblx'">
+					{{ $TOOL.dictTypeData('qybalx', record.sblx) }}
+				</template>
 				<template v-if="column.dataIndex === 'action'">
 					<a-space>
                         <a @click="resultDetailRef.onOpen(record)" v-if="record.status == 3 || record.status == 4">查看回执</a>
@@ -272,6 +272,8 @@
     }
 	const tzTypeOptions = tool.dictList('tzlx')
 	const statusOptions = tool.dictList('djzt')
+	const applyTypeOptions = tool.dictList('qybalx')
+
 </script>
 
 <style lang="less" scoped>

+ 39 - 51
snowy-admin-web/src/views/yqyc/zero/two/out-nuclear-release/detail.vue

@@ -34,23 +34,23 @@
 							</a-form-item>
 						</a-col>
 						<a-col :span="8">
-							<a-form-item label="台账编号:" name="ledgerCode">
-								<a-select v-model:value="formData.ledgerCode" :disabled="isView" placeholder="请选择台账编号" :options="tzOptions" show-search allow-clear option-filter-prop="label" @change="onChangTz"/>
+							<a-form-item label="绑定类型:" name="bdlx">
+								<a-select v-model:value="formData.bdlx" :disabled="isView" placeholder="请选择绑定类型" :options="bdlxOptions" show-search allow-clear option-filter-prop="label" @change="onChangeBdlx"/>
 							</a-form-item>
 						</a-col>
 						<a-col :span="8">
-							<a-form-item label="进出标志:" name="jcbz">
-								<a-select v-model:value="formData.jcbz" :disabled="isView" placeholder="请选择进出标志" :options="jcbzOptions" show-search allow-clear option-filter-prop="label"/>
+							<a-form-item label="关联核注清单编号:" name="glhzqdbh">
+								<a-select v-model:value="formData.glhzqdbh" :disabled="isView || !formData.bdlx || formData.bdlx == 2" placeholder="请选择关联核注清单编号" :options="hzqdOptions" show-search allow-clear option-filter-prop="label" @change="onChangHzqd"/>
 							</a-form-item>
 						</a-col>
 						<a-col :span="8">
-							<a-form-item label="绑定类型:" name="bdlx">
-								<a-select v-model:value="formData.bdlx" :disabled="isView" placeholder="请选择绑定类型" :options="bdlxOptions" show-search allow-clear option-filter-prop="label" @change="onChangeBdlx"/>
+							<a-form-item label="台账编号:" name="ledgerCode">
+								<a-input v-model:value="formData.ledgerCode" :disabled="true" placeholder="请选择关联核注清单编号" allow-clear/>
 							</a-form-item>
 						</a-col>
 						<a-col :span="8">
-							<a-form-item label="关联核注清单编号:" name="glhzqdbh">
-								<a-select v-model:value="formData.glhzqdbh" :disabled="isView || !showHfdbt" placeholder="请输入关联核注清单编号" :options="hzqdOptions" show-search allow-clear option-filter-prop="label" @change="onChangHzqd"/>
+							<a-form-item label="进出标志:" name="jcbz">
+								<a-select v-model:value="formData.jcbz" :disabled="isView" placeholder="请选择进出标志" :options="jcbzOptions" show-search allow-clear option-filter-prop="label"/>
 							</a-form-item>
 						</a-col>
 						<a-col :span="8">
@@ -172,8 +172,8 @@
 				</a-form>
 			</a-collapse-panel>
 			<a-collapse-panel key="2" header="核放单表体" v-if="showHfdbt">
-				<a-button type="primary" @click="onBodyReset" v-if="!isView" style="margin-bottom: 20px;">重置</a-button>
-				<a-form ref="bodyFormRef" :model="bodyData" :rules="bodyRules" style="margin-bottom: 20px;">
+<!--				<a-button type="primary" @click="onBodyReset" v-if="!isView" style="margin-bottom: 20px;">重置</a-button>-->
+				<a-form ref="bodyFormRef" :model="bodyData" style="margin-bottom: 20px;">
 					<a-row :gutter="16">
 						<a-col :span="8">
 							<a-form-item label="关联商品序号:" name="productId">
@@ -217,14 +217,14 @@
 						</a-col>
 					</a-row>
 				</a-form>
-				<template v-if="!isView">
-					<a-button type="primary" style="margin-right: 8px;" v-if="!(bodyData.id || bodyData.__index)" @click="onBodyAdd">插入</a-button>
-					<a-button type="primary" style="margin-right: 8px;" v-else @click="onBodyEdit">保存</a-button>
-					<xn-batch-delete
-						:selectedRowKeys="bodySelectedRowKeys"
-						@batchDelete="deleteBatchBody"
-					/>
-				</template>
+<!--				<template v-if="!isView">-->
+<!--					<a-button type="primary" style="margin-right: 8px;" v-if="!(bodyData.id || bodyData.__index)" @click="onBodyAdd">插入</a-button>-->
+<!--					<a-button type="primary" style="margin-right: 8px;" v-else @click="onBodyEdit">保存</a-button>-->
+<!--					<xn-batch-delete-->
+<!--						:selectedRowKeys="bodySelectedRowKeys"-->
+<!--						@batchDelete="deleteBatchBody"-->
+<!--					/>-->
+<!--				</template>-->
 				<a-table
 					style="margin-top: 10px"
 					bordered
@@ -236,13 +236,14 @@
 				>
 					<template #bodyCell="{ column, record, index }">
 						<template v-if="column.dataIndex === 'action'">
-							<template v-if="isView">
-								<a-button type="link" primary size="small" @click="onBodyReset(), bodyData = cloneDeep(record)">查看</a-button>
-							</template>
-							<template v-else>
-								<a-button type="link" primary size="small" @click="onBodyReset(), bodyData = cloneDeep(record)">编辑</a-button>
-								<a-button type="link" danger size="small" @click="onBodyDel(index)">删除</a-button>
-							</template>
+							<a-button type="link" primary size="small" @click="onBodyReset(), bodyData = cloneDeep(record)">查看</a-button>
+<!--							<template v-if="isView">-->
+<!--								<a-button type="link" primary size="small" @click="onBodyReset(), bodyData = cloneDeep(record)">查看</a-button>-->
+<!--							</template>-->
+<!--							<template v-else>-->
+<!--								<a-button type="link" primary size="small" @click="onBodyReset(), bodyData = cloneDeep(record)">编辑</a-button>-->
+<!--								<a-button type="link" danger size="small" @click="onBodyDel(index)">删除</a-button>-->
+<!--							</template>-->
 						</template>
 					</template>
 				</a-table>
@@ -286,6 +287,9 @@
 					:row-selection="relationOptions.rowSelection"
 				>
 					<template #bodyCell="{ column, record, index }">
+						<template v-if="column.dataIndex === 'dzType'">
+							{{ $TOOL.dictTypeData('gldzlx', record.dzType) }}
+						</template>
 						<template v-if="column.dataIndex === 'action'">
 							<template v-if="isView">
 								<a-button type="link" primary size="small" @click="onRelationReset(), relationData = cloneDeep(record)">查看</a-button>
@@ -382,7 +386,6 @@
 	const bdlxOptions = ref([])
 	const dzTypeOptions = ref([])
 	const hzqdOptions = ref([])
-	const tzOptions = ref([])
 	const bgdhOptions = ref([])
 	const jzxhOptions = ref([])
 	const statusOptions = ref([])
@@ -513,7 +516,7 @@
 				bodyList.value = res.productList
 				relationList.value = res.dzList
 				fileList.value = res.attachmentList
-				if (formData.value.bdlx == 1) {
+				if (formData.value.bdlx == 1 || formData.value.bdlx == 3) {
 					showGldz.value = false
 					showHfdbt.value = true
 				} else if (formData.value.bdlx == 2) {
@@ -523,11 +526,6 @@
 				if (type) {
 					formData.value.sblx = type
 				}
-				if (formData.value.ledgerCode) {
-					qySecondlineHzdTzApi.qySecondlineHzdTzHgHzdCodeByTzCode({tzCode: formData.value.ledgerCode}).then(res => {
-						hzqdOptions.value = res.map(v => ({label: v, value: v}))
-					})
-				}
 				if (formData.value.hfdBgCode) {
 					qySecondlineHfdApi.qysecondlinehfdlistGetHfdBgInfoByBgCode({hfdBgCode: formData.value.hfdBgCode}).then(res => {
 						jzxhOptions.value = res.jzxList.map(v => {
@@ -547,8 +545,8 @@
 			formData.value.sbqyshxydm = userInfo.companyNumber
 			formData.value.sblx = type
 		}
-		qySecondlineHzdTzApi.qySecondlineHzdTzTzCodeByCondition().then(res => {
-			tzOptions.value = res.map(v => ({label: v, value: v}))
+		qySecondlineHfdApi.qySecondlineHfdGetHzListByCondition().then(res => {
+			hzqdOptions.value = res.map(v => Object.assign(v, {label: v.hgHzdCode, value: v.hgHzdCode}))
 		})
 		qySecondlineHfdApi.qysecondlinehfdlistGetBgCodeList().then(res => {
 			bgdhOptions.value = res.map(v => ({label: v, value: v}))
@@ -570,7 +568,6 @@
 	// 默认要校验的
 	const formRules = ref({
 		hfdLx: [required('请选择核放单类型')],
-		ledgerCode: [required('请选择台账编号')],
 		jcbz: [required('请选择进出口标志')],
 		bdlx: [required('请选择绑定类型')],
 		sblx: [required('请选择申报类型')],
@@ -586,11 +583,11 @@
 		jzxh: [required('请选择集装箱号')],
 	})
 	watch(() => formData.value.bdlx, (n) => {
-		if (n == 1) {
-			formRules.value.glhzqdbh = [required('请输入关联核注单编号')]
-		} else {
+		if (n == 2) {
 			delete formRules.value.glhzqdbh
 			formRef.value.clearValidate('glhzqdbh')
+		} else {
+			formRules.value.glhzqdbh = [required('请输入关联核注单编号')]
 		}
 	})
 	// 默认要校验的
@@ -835,25 +832,15 @@
 			return flag
 		})
 	}
-	const onChangTz = (val) => {
-		if (val) {
-			qySecondlineHzdTzApi.qySecondlineHzdTzHgHzdCodeByTzCode({tzCode: val}).then(res => {
-				hzqdOptions.value = res.map(v => ({label: v, value: v}))
-			})
-		} else {
-			formData.value.glhzqdbh = ''
-			hzqdOptions.value = []
-			bodyList.value = []
-			onBodyReset()
-		}
-	}
-	const onChangHzqd = (val) => {
+	const onChangHzqd = (val, obj) => {
 		if (val) {
+			formData.value.tzCode = obj.tzCode
 			qySecondlineHzdTzApi.qySecondlineHzdTzGetProductByHgHzdCode({hgHzCode: val}).then(res => {
 				bodyList.value = res
 				onBodyReset()
 			})
 		} else {
+			formData.value.tzCode = ''
 			bodyList.value = []
 			onBodyReset()
 		}
@@ -870,6 +857,7 @@
 			showGldz.value = true
 			showHfdbt.value = false
 			formData.value.glhzqdbh = ''
+			formData.value.ledgerCode = ''
 		} else {
 			showGldz.value = false
 			showHfdbt.value = false

+ 17 - 15
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qyrecordinfo/entity/BusinessIdGenerator.java

@@ -1,5 +1,6 @@
 package vip.xiaonuo.biz.modular.qyrecordinfo.entity;
 
+import com.baomidou.mybatisplus.core.incrementer.DefaultIdentifierGenerator;
 import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
 import com.baomidou.mybatisplus.extension.ddl.history.IDdlGenerator;
 import org.springframework.util.IdGenerator;
@@ -80,11 +81,17 @@ public class BusinessIdGenerator {
     }
 
     public static void main(String[] args) {
-        for (int i = 0; i < 10; i++) {
-            String code = generateBusinessId(i);
-            System.out.println("Generated Code: " + code);
+//        for (int i = 0; i < 10; i++) {
+//            String code = generateBusinessId(i);
+//            System.out.println("Generated Code: " + code);
+//        }
+        for (int i = 0; i < 100; i++) {
+            DefaultIdentifierGenerator defaultIdentifierGenerator = new DefaultIdentifierGenerator();
+            System.out.println(defaultIdentifierGenerator.nextId(null));
         }
-        System.out.println("UUID:"+generateNumBerUUID(18));
+
+        DefaultIdentifierGenerator defaultIdentifierGenerator = new DefaultIdentifierGenerator();
+        System.out.println(defaultIdentifierGenerator.nextId(null));
     }
 
     /**
@@ -93,16 +100,11 @@ public class BusinessIdGenerator {
      * @return
      */
     public static String generateNumBerUUID(int number) {
-        UUID uuid = UUID.randomUUID();
-        String uuidStr = uuid.toString().replace("_", "");
-        //只保留数字部分
-        StringBuilder sb = new StringBuilder();
-        for (char c : uuidStr.toCharArray()) {
-            if (Character.isDigit(c)) {
-                sb.append(c);
-            }
-        }
-        //截取指定位左右最终结果
-        return sb.toString().substring(0, number);
+
+        DefaultIdentifierGenerator defaultIdentifierGenerator = new DefaultIdentifierGenerator();
+        Long l = defaultIdentifierGenerator.nextId(null);
+        return String.valueOf(l);
     }
+
+
 }

+ 8 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehfd/controller/QySecondlineHfdController.java

@@ -25,6 +25,7 @@ import org.springframework.web.bind.annotation.RestController;
 import vip.xiaonuo.biz.modular.qysecondlinehfd.param.*;
 import vip.xiaonuo.biz.modular.qysecondlinehfd.vo.QySecondlineHfdBgInfoVo;
 import vip.xiaonuo.biz.modular.qysecondlinehfd.vo.QySecondlineHfdDetailVo;
+import vip.xiaonuo.biz.modular.qysecondlinehzdtz.entity.QySecondlineHzdTz;
 import vip.xiaonuo.common.annotation.CommonLog;
 import vip.xiaonuo.common.pojo.CommonResult;
 import vip.xiaonuo.biz.modular.qysecondlinehfd.entity.QySecondlineHfd;
@@ -190,4 +191,11 @@ public class QySecondlineHfdController {
     public CommonResult<List<String>> getBgCodeList() {
         return CommonResult.data(qySecondlineHfdService.getBgCodeList());
     }
+
+    @Operation(summary = "获取已经审核通过的核注单")
+//    @SaCheckPermission("/biz/qysecondlinehfd/getHfdBgInfoByBgCode")
+    @GetMapping("/biz/qysecondlinehfd/getHzListByCondition")
+    public CommonResult<List<QySecondlineHzdTz>> getHzListByCondition() {
+        return CommonResult.data(qySecondlineHfdService.getHzListByCondition());
+    }
 }

+ 3 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehfd/param/QySecondlineHfdPageParam.java

@@ -17,6 +17,7 @@ import lombok.Getter;
 import lombok.Setter;
 import java.math.BigDecimal;
 import java.util.Date;
+import java.util.List;
 
 /**
  * 二线出区核放单管理查询参数
@@ -75,4 +76,6 @@ public class QySecondlineHfdPageParam {
     @Schema(description = "申报类型")
     private String sblx;
 
+    private List<String> ids;
+
 }

+ 3 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehfd/service/QySecondlineHfdService.java

@@ -18,6 +18,7 @@ import vip.xiaonuo.biz.modular.qysecondlinehfd.entity.QySecondlineHfd;
 import vip.xiaonuo.biz.modular.qysecondlinehfd.param.*;
 import vip.xiaonuo.biz.modular.qysecondlinehfd.vo.QySecondlineHfdBgInfoVo;
 import vip.xiaonuo.biz.modular.qysecondlinehfd.vo.QySecondlineHfdDetailVo;
+import vip.xiaonuo.biz.modular.qysecondlinehzdtz.entity.QySecondlineHzdTz;
 
 import java.util.List;
 
@@ -80,4 +81,6 @@ public interface QySecondlineHfdService extends IService<QySecondlineHfd> {
     QySecondlineHfdBgInfoVo getHfdBgInfoByBgCode(String hfdBgCode);
 
     List<String> getBgCodeList();
+
+    List<QySecondlineHzdTz> getHzListByCondition();
 }

+ 72 - 1
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehfd/service/impl/QySecondlineHfdServiceImpl.java

@@ -25,6 +25,7 @@ import org.apache.http.auth.AUTH;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import vip.xiaonuo.auth.core.util.StpLoginUserUtil;
 import vip.xiaonuo.biz.modular.qyrecordinfo.entity.BusinessIdGenerator;
 import vip.xiaonuo.biz.modular.qysecondlinehfd.param.*;
 import vip.xiaonuo.biz.modular.qysecondlinehfd.vo.QySecondlineHfdBgInfoVo;
@@ -44,6 +45,10 @@ import vip.xiaonuo.biz.modular.qysecondlinehfdlist.service.QySecondlineHfdListSe
 import vip.xiaonuo.biz.modular.qysecondlinehfdproduct.entity.QySecondlineHfdProduct;
 import vip.xiaonuo.biz.modular.qysecondlinehfdproduct.param.QySecondlineHfdProductAddParam;
 import vip.xiaonuo.biz.modular.qysecondlinehfdproduct.service.QySecondlineHfdProductService;
+import vip.xiaonuo.biz.modular.qysecondlinehzdlist.entity.QySecondlineHzdList;
+import vip.xiaonuo.biz.modular.qysecondlinehzdtz.entity.QySecondlineHzdTz;
+import vip.xiaonuo.biz.modular.qysecondlinehzdtz.param.QySecondlineHzdTzBaseParam;
+import vip.xiaonuo.biz.modular.qysecondlinehzdtz.service.QySecondlineHzdTzService;
 import vip.xiaonuo.common.enums.CommonSortOrderEnum;
 import vip.xiaonuo.common.exception.CommonException;
 import vip.xiaonuo.common.page.CommonPageRequest;
@@ -75,9 +80,15 @@ public class QySecondlineHfdServiceImpl extends ServiceImpl<QySecondlineHfdMappe
     QySecondlineHfdCycService qySecondlineHfdCycService;
     @Autowired
     QySecondlineHfdJzxService qySecondlineHfdJzxService;
+    @Autowired
+    QySecondlineHzdTzService qySecondlineHzdTzService;
+
     @Override
     public Page<QySecondlineHfd> page(QySecondlineHfdPageParam qySecondlineHfdPageParam) {
         QueryWrapper<QySecondlineHfd> queryWrapper = new QueryWrapper<QySecondlineHfd>().checkSqlInjection();
+        if(ObjectUtil.isNotEmpty(qySecondlineHfdPageParam.getIds())) {
+            queryWrapper.lambda().eq(QySecondlineHfd::getId, qySecondlineHfdPageParam.getIds());
+        }
         if(ObjectUtil.isNotEmpty(qySecondlineHfdPageParam.getSblx())) {
             queryWrapper.lambda().eq(QySecondlineHfd::getSblx, qySecondlineHfdPageParam.getSblx());
         }
@@ -96,12 +107,15 @@ public class QySecondlineHfdServiceImpl extends ServiceImpl<QySecondlineHfdMappe
         if(ObjectUtil.isNotEmpty(qySecondlineHfdPageParam.getStatus())) {
             queryWrapper.lambda().eq(QySecondlineHfd::getStatus, qySecondlineHfdPageParam.getStatus());
         }
+        if(ObjectUtil.isNotEmpty(qySecondlineHfdPageParam.getHfdrCode())) {
+            queryWrapper.lambda().eq(QySecondlineHfd::getHfdrCode, qySecondlineHfdPageParam.getHfdrCode());
+        }
         if(ObjectUtil.isAllNotEmpty(qySecondlineHfdPageParam.getSortField(), qySecondlineHfdPageParam.getSortOrder())) {
             CommonSortOrderEnum.validate(qySecondlineHfdPageParam.getSortOrder());
             queryWrapper.orderBy(true, qySecondlineHfdPageParam.getSortOrder().equalsIgnoreCase(CommonSortOrderEnum.ASC.getValue()),
                     StrUtil.toUnderlineCase(qySecondlineHfdPageParam.getSortField()));
         } else {
-            queryWrapper.lambda().orderByAsc(QySecondlineHfd::getId);
+            queryWrapper.lambda().orderByDesc(QySecondlineHfd::getId);
         }
         return this.page(CommonPageRequest.defaultPage(), queryWrapper);
     }
@@ -117,11 +131,18 @@ public class QySecondlineHfdServiceImpl extends ServiceImpl<QySecondlineHfdMappe
         QySecondlineHfd qySecondlineHfd = this.queryEntity(hfdId);
         QySecondlineHfdAddParam baseInfo = qySecondlineHfdBaseParam.getBaseInfo();
         BeanUtil.copyProperties(baseInfo, qySecondlineHfd);
+        //生成核注单号(审核通过时)
+        if(ObjectUtil.isNotEmpty(baseInfo.getStatus()) && "3".equals(baseInfo.getStatus())){
+            qySecondlineHfd.setHfdCode(BusinessIdGenerator.generateNumBerUUID(18));
+        }
         this.updateById(qySecondlineHfd);
         //删除相关信息
         deleteHfdRelation(hfdId);
         //关联相关信息
         saveHfdRelation(hfdId,qySecondlineHfdBaseParam);
+
+        //新增回执
+        this.saveHz(qySecondlineHfd.getId(),qySecondlineHfdBaseParam);
     }
 
     @Transactional(rollbackFor = Exception.class)
@@ -198,7 +219,46 @@ public class QySecondlineHfdServiceImpl extends ServiceImpl<QySecondlineHfdMappe
         this.save(qySecondlineHfd);
         //新增核放单关联信息
         this.saveHfdRelation(qySecondlineHfd.getId(),qySecondlineHfdBaseParam);
+        //新增回执
+        this.saveHz(qySecondlineHfd.getId(),qySecondlineHfdBaseParam);
+    }
+
+    private void saveHz(String hfdId,QySecondlineHfdBaseParam qySecondlineHfdBaseParam){
+        if(!qySecondlineHfdBaseParam.getBaseInfo().getStatus().equals("3")){
+            return;
+        }
+        Date date = new Date();
+        QySecondlineHfdList qySecondlineHfdListSq = new QySecondlineHfdList();
+        qySecondlineHfdListSq.setHfdId(hfdId);
+        qySecondlineHfdListSq.setCheckTime(date);
+        qySecondlineHfdListSq.setStatus("审核中");
+        qySecondlineHfdListSq.setResult("提交成功,待审核");
+
+        String applyTypeName = "备案";
 
+        if ("bgsq".equals(qySecondlineHfdBaseParam.getBaseInfo().getSblx())){
+            applyTypeName = "变更";
+        }
+        if ("zxsq".equals(qySecondlineHfdBaseParam.getBaseInfo().getSblx())){
+            applyTypeName = "注销";
+        }
+        qySecondlineHfdListSq.setApplyType(applyTypeName);
+        String nickname = StpLoginUserUtil.getLoginUser().getName();
+        qySecondlineHfdListSq.setApplicant(nickname);
+
+
+        QySecondlineHfdList qySecondlineHfdListSh= new QySecondlineHfdList();
+        qySecondlineHfdListSh.setHfdId(hfdId);
+        qySecondlineHfdListSh.setCheckTime(date);
+        qySecondlineHfdListSh.setStatus("审核通过");
+        qySecondlineHfdListSh.setApplyMan(nickname);
+        qySecondlineHfdListSh.setResult("提交成功,审核通过");
+        qySecondlineHfdListSh.setApplyType(applyTypeName);
+
+
+
+        qySecondlineHfdListService.save(qySecondlineHfdListSq);
+        qySecondlineHfdListService.save(qySecondlineHfdListSh);
     }
 
     /**
@@ -287,4 +347,15 @@ public class QySecondlineHfdServiceImpl extends ServiceImpl<QySecondlineHfdMappe
         List<String> list = cycList.stream().map(QySecondlineHfdCyc::getHfdBgCode).toList();
         return list;
     }
+
+    /**
+     * 获取审核通过的核注单
+     * @return
+     */
+    @Override
+    public List<QySecondlineHzdTz> getHzListByCondition(){
+        QueryWrapper<QySecondlineHzdTz> queryWrapper = new QueryWrapper<QySecondlineHzdTz>().checkSqlInjection();
+        queryWrapper.lambda().eq(QySecondlineHzdTz::getStatus,"3");
+        return qySecondlineHzdTzService.list(queryWrapper);
+    }
 }

+ 1 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehfdlist/service/impl/QySecondlineHfdListServiceImpl.java

@@ -103,6 +103,7 @@ public class QySecondlineHfdListServiceImpl extends ServiceImpl<QySecondlineHfdL
     public List<QySecondlineHfdList> getListByHfdId(String hfdId){
         QueryWrapper<QySecondlineHfdList> hfdListQueryWrapper = new QueryWrapper<QySecondlineHfdList>().checkSqlInjection();
         hfdListQueryWrapper.lambda().eq(QySecondlineHfdList::getHfdId,hfdId);
+        hfdListQueryWrapper.lambda().orderByDesc(QySecondlineHfdList::getId);
         List<QySecondlineHfdList> hfdLists = this.list(hfdListQueryWrapper);
         return hfdLists;
     }

+ 24 - 23
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehzdtz/entity/QySecondlineHzdTz.java

@@ -11,6 +11,7 @@
  * 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
  */
 package vip.xiaonuo.biz.modular.qysecondlinehzdtz.entity;
+import com.alibaba.excel.annotation.ExcelIgnore;
 import com.alibaba.excel.annotation.ExcelProperty;
 import com.alibaba.excel.annotation.write.style.ColumnWidth;
 import com.baomidou.mybatisplus.annotation.*;
@@ -35,138 +36,138 @@ public class QySecondlineHzdTz {
     @TableId
     @Schema(description = "主键")
     @ColumnWidth(12)
-    @ExcelProperty(index = 0,value = "主键")
+    @ExcelIgnore
     private String id;
 
     /** 核注单主键 */
     @Schema(description = "核注单主键")
     @ColumnWidth(12)
-    @ExcelProperty(index = 1,value = "核注单主键")
+    @ExcelIgnore
     private String hzdId;
 
     /** 台账编号 */
     @Schema(description = "台账编号")
     @ColumnWidth(12)
-    @ExcelProperty(index = 2,value = "台账编号")
+    @ExcelProperty(index = 3,value = "台账编号")
     private String tzCode;
 
     /** 台账性质 */
     @Schema(description = "台账类型")
     @ColumnWidth(12)
-    @ExcelProperty(index = 3,value = "台账类型")
+    @ExcelProperty(index = 2,value = "台账类型")
     private String tzType;
 
     /** 使用单位 */
     @Schema(description = "使用单位")
     @ColumnWidth(12)
-    @ExcelProperty(index = 4,value = "使用单位")
+    @ExcelIgnore
     private String useDept;
 
     /** 海关备案编号 */
     @Schema(description = "海关备案编号")
     @ColumnWidth(12)
-    @ExcelProperty(index = 5,value = "海关备案编号")
+    @ExcelIgnore
     private String companyMainHgCode;
 
     /** 统一社会信用代码 */
     @Schema(description = "统一社会信用代码")
     @ColumnWidth(12)
-    @ExcelProperty(index = 6,value = "统一社会信用代码")
+    @ExcelIgnore
     private String companyCode;
 
     /** 监管方式 */
     @Schema(description = "监管方式")
     @ColumnWidth(12)
-    @ExcelProperty(index = 7,value = "监管方式")
+    @ExcelIgnore
     private String regulaMethod;
 
     /** 运输方式 */
     @Schema(description = "运输方式")
     @ColumnWidth(12)
-    @ExcelProperty(index = 8,value = "运输方式")
+    @ExcelIgnore
     private String ysfs;
 
     /** 关联清单编号 */
     @Schema(description = "关联清单编号")
     @ColumnWidth(12)
-    @ExcelProperty(index = 9,value = "关联清单编号")
+    @ExcelIgnore
     private String glqdCode;
 
     /** 对应报关申报编号 */
     @Schema(description = "对应报关申报编号")
     @ColumnWidth(12)
-    @ExcelProperty(index = 10,value = "对应报关申报编号")
+    @ExcelIgnore
     private String dybgCode;
 
     /** 对应报关单申报单位名称 */
     @Schema(description = "对应报关单申报单位名称")
     @ColumnWidth(12)
-    @ExcelProperty(index = 11,value = "对应报关单申报单位名称")
+    @ExcelIgnore
     private String dybgDept;
 
     /** 备注 */
     @Schema(description = "备注")
     @ColumnWidth(12)
-    @ExcelProperty(index = 12,value = "备注")
+    @ExcelIgnore
     private String remark;
 
     /** 创建人 */
     @Schema(description = "创建人")
     @ColumnWidth(12)
-    @ExcelProperty(index = 13,value = "创建人")
+    @ExcelIgnore
     @TableField(fill = FieldFill.INSERT)
     private String createUser;
 
     /** 创建时间 */
     @Schema(description = "创建时间")
     @ColumnWidth(12)
-    @ExcelProperty(index = 14,value = "创建时间")
+    @ExcelIgnore
     @TableField(fill = FieldFill.INSERT)
     private Date createTime;
 
     /** 更新人 */
     @Schema(description = "更新人")
     @ColumnWidth(12)
-    @ExcelProperty(index = 15,value = "更新人")
+    @ExcelIgnore
     @TableField(fill = FieldFill.UPDATE)
     private String updateUser;
 
     /** 更新时间 */
     @Schema(description = "更新时间")
     @ColumnWidth(12)
-    @ExcelProperty(index = 16,value = "更新时间")
+    @ExcelIgnore
     @TableField(fill = FieldFill.UPDATE)
     private Date updateTime;
 
     @Schema(description = "海关核注单编号")
     @ColumnWidth(12)
-    @ExcelProperty(index = 17,value = "海关核注单编号")
+    @ExcelProperty(index = 1,value = "核注单编号")
     private String hgHzdCode;
 
     @Schema(description = "核注单预录入编号")
     @ColumnWidth(12)
-    @ExcelProperty(index = 18,value = "核注单预录入编号")
+    @ExcelProperty(index = 0,value = "核注单预录入编号")
     private String hzdrCode;
 
     @Schema(description = "台账性质")
     @ColumnWidth(12)
-    @ExcelProperty(index = 18,value = "台账性质")
+    @ExcelIgnore
     private String tzNature;
 
     @Schema(description = "申报类型")
     @ColumnWidth(12)
-    @ExcelProperty(index = 19,value = "申报类型")
+    @ExcelProperty(index = 5,value = "申报类型")
     private String sblx;
 
 
 
     @Schema(description = "单据状态")
     @ColumnWidth(12)
-    @ExcelProperty(index = 20,value = "单据状态")
+    @ExcelProperty(index = 6,value = "单据状态")
     private String status;
 
     @Schema(description = "申报时间")
     @ColumnWidth(12)
-    @ExcelProperty(index = 21,value = "申报时间")
+    @ExcelProperty(index = 4,value = "申报时间")
     private Date sbsj;
 }

+ 9 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehzdtz/param/QySecondlineHzdTzPageParam.java

@@ -12,11 +12,13 @@
  */
 package vip.xiaonuo.biz.modular.qysecondlinehzdtz.param;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Getter;
 import lombok.Setter;
 import java.math.BigDecimal;
 import java.util.Date;
+import java.util.List;
 
 /**
  * 二线核注单台账信息查询参数
@@ -72,4 +74,11 @@ public class QySecondlineHzdTzPageParam {
     @Schema(description = "单据状态")
     private String status;
 
+//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private String startSbsj;
+
+//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private String endSbsj;
+
+    private List<String> ids;
 }

+ 64 - 1
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qysecondlinehzdtz/service/impl/QySecondlineHzdTzServiceImpl.java

@@ -26,12 +26,14 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import vip.xiaonuo.auth.core.util.StpLoginUserUtil;
 import vip.xiaonuo.biz.modular.qyrecardbody.entity.QyRecardBody;
 import vip.xiaonuo.biz.modular.qyrecardbody.param.QyRecardBodyIdParam;
 import vip.xiaonuo.biz.modular.qyrecardbody.service.QyRecardBodyService;
 import vip.xiaonuo.biz.modular.qyrecordinfo.entity.BusinessIdGenerator;
 import vip.xiaonuo.biz.modular.qyrecordinfo.entity.QyRecordInfo;
 import vip.xiaonuo.biz.modular.qyrecordinfo.service.QyRecordInfoService;
+import vip.xiaonuo.biz.modular.qyrecordinfochecklist.entity.QyRecordInfoCheckList;
 import vip.xiaonuo.biz.modular.qyrecordproduct.entity.QyRecordProduct;
 import vip.xiaonuo.biz.modular.qyrecordproduct.service.QyRecordProductService;
 import vip.xiaonuo.biz.modular.qysecondlinehfdproduct.entity.QySecondlineHfdProduct;
@@ -83,6 +85,9 @@ public class QySecondlineHzdTzServiceImpl extends ServiceImpl<QySecondlineHzdTzM
     @Override
     public Page<QySecondlineHzdTz> page(QySecondlineHzdTzPageParam qySecondlineHzdTzPageParam) {
         QueryWrapper<QySecondlineHzdTz> queryWrapper = new QueryWrapper<QySecondlineHzdTz>().checkSqlInjection();
+        if(ObjectUtil.isNotEmpty(qySecondlineHzdTzPageParam.getIds())) {
+            queryWrapper.lambda().in(QySecondlineHzdTz::getId,qySecondlineHzdTzPageParam.getIds());
+        }
         if(ObjectUtil.isNotEmpty(qySecondlineHzdTzPageParam.getTzCode())) {
             queryWrapper.lambda().like(QySecondlineHzdTz::getTzCode, qySecondlineHzdTzPageParam.getTzCode());
         }
@@ -105,13 +110,19 @@ public class QySecondlineHzdTzServiceImpl extends ServiceImpl<QySecondlineHzdTzM
         if(ObjectUtil.isNotEmpty(qySecondlineHzdTzPageParam.getSblx())) {
             queryWrapper.lambda().eq(QySecondlineHzdTz::getSblx, qySecondlineHzdTzPageParam.getSblx());
         }
+        if(ObjectUtil.isNotEmpty(qySecondlineHzdTzPageParam.getStartSbsj())) {
+            queryWrapper.lambda().ge(QySecondlineHzdTz::getSbsj, qySecondlineHzdTzPageParam.getStartSbsj());
+        }
+        if(ObjectUtil.isNotEmpty(qySecondlineHzdTzPageParam.getEndSbsj())) {
+            queryWrapper.lambda().le(QySecondlineHzdTz::getSbsj, qySecondlineHzdTzPageParam.getEndSbsj());
+        }
 
         if(ObjectUtil.isAllNotEmpty(qySecondlineHzdTzPageParam.getSortField(), qySecondlineHzdTzPageParam.getSortOrder())) {
             CommonSortOrderEnum.validate(qySecondlineHzdTzPageParam.getSortOrder());
             queryWrapper.orderBy(true, qySecondlineHzdTzPageParam.getSortOrder().equalsIgnoreCase(CommonSortOrderEnum.ASC.getValue()),
                     StrUtil.toUnderlineCase(qySecondlineHzdTzPageParam.getSortField()));
         } else {
-            queryWrapper.lambda().orderByAsc(QySecondlineHzdTz::getId);
+            queryWrapper.lambda().orderByDesc(QySecondlineHzdTz::getId);
         }
         return this.page(CommonPageRequest.defaultPage(), queryWrapper);
     }
@@ -126,6 +137,8 @@ public class QySecondlineHzdTzServiceImpl extends ServiceImpl<QySecondlineHzdTzM
         QySecondlineHzdTz qySecondlineHzdTz = BeanUtil.toBean(baseInfo, QySecondlineHzdTz.class);
         //新增关联
         this.saveRelation(hzdId,qySecondlineHzdTzBaseParam);
+        //保存回执
+        this.saveHz(hzdId,qySecondlineHzdTzBaseParam);
         qySecondlineHzdTz.setSbsj(new Date());
         //默认的申报类型
         if(ObjectUtil.isEmpty(baseInfo.getSblx())){
@@ -142,6 +155,48 @@ public class QySecondlineHzdTzServiceImpl extends ServiceImpl<QySecondlineHzdTzM
         this.save(qySecondlineHzdTz);
     }
 
+    /**
+     * 插入回执
+     */
+    private void saveHz(String hzdId, QySecondlineHzdTzBaseParam qySecondlineHzdTzBaseParam){
+        if(!qySecondlineHzdTzBaseParam.getBaseInfo().getStatus().equals("3")){
+                return;
+        }
+        Date date = new Date();
+        QySecondlineHzdList qySecondlineHzdListSq = new QySecondlineHzdList();
+        qySecondlineHzdListSq.setHzdId(hzdId);
+        qySecondlineHzdListSq.setCheckTime(date);
+        qySecondlineHzdListSq.setStatus("审核中");
+        qySecondlineHzdListSq.setResult("提交成功,待审核");
+
+        String applyTypeName = "备案";
+
+        if ("bgsq".equals(qySecondlineHzdTzBaseParam.getBaseInfo().getSblx())){
+           applyTypeName = "变更";
+        }
+        if ("zxsq".equals(qySecondlineHzdTzBaseParam.getBaseInfo().getSblx())){
+            applyTypeName = "注销";
+        }
+        qySecondlineHzdListSq.setApplyType(applyTypeName);
+        String nickname = StpLoginUserUtil.getLoginUser().getName();
+        qySecondlineHzdListSq.setApplicant(nickname);
+
+
+        QySecondlineHzdList qySecondlineHzdListSh= new QySecondlineHzdList();
+        qySecondlineHzdListSh.setHzdId(hzdId);
+        qySecondlineHzdListSh.setCheckTime(date);
+        qySecondlineHzdListSh.setStatus("审核通过");
+        qySecondlineHzdListSh.setApplyMan(nickname);
+        qySecondlineHzdListSh.setResult("提交成功,审核通过");
+        qySecondlineHzdListSh.setApplyType(applyTypeName);
+
+
+
+        qySecondlineHzdListService.save(qySecondlineHzdListSq);
+        qySecondlineHzdListService.save(qySecondlineHzdListSh);
+    }
+
+
     private void saveRelation(String hzdId, QySecondlineHzdTzBaseParam qySecondlineHzdTzBaseParam) {
         //新增商品
         List<QySecondlineHzdProductAddParam> productList = qySecondlineHzdTzBaseParam.getProductList();
@@ -173,6 +228,10 @@ public class QySecondlineHzdTzServiceImpl extends ServiceImpl<QySecondlineHzdTzM
 
         QySecondlineHzdTz qySecondlineHzdTz = this.queryEntity(qySecondlineHzdTzBaseParam.getBaseInfo().getId());
         BeanUtil.copyProperties(qySecondlineHzdTzBaseParam.getBaseInfo(), qySecondlineHzdTz);
+        //生成核注单号(审核通过时)
+        if(ObjectUtil.isNotEmpty(qySecondlineHzdTzBaseParam.getBaseInfo().getStatus()) && "3".equals(qySecondlineHzdTzBaseParam.getBaseInfo().getStatus())){
+            qySecondlineHzdTz.setHgHzdCode(BusinessIdGenerator.generateNumBerUUID(18));
+        }
         this.updateById(qySecondlineHzdTz);
 
         String hzdId = qySecondlineHzdTz.getHzdId();
@@ -180,6 +239,8 @@ public class QySecondlineHzdTzServiceImpl extends ServiceImpl<QySecondlineHzdTzM
         this.deleteRelation(hzdId);
         //添加关联
         this.saveRelation(hzdId,qySecondlineHzdTzBaseParam);
+        //保存回执
+        this.saveHz(hzdId,qySecondlineHzdTzBaseParam);
     }
 
     private void deleteRelation(String hzdId) {
@@ -216,6 +277,7 @@ public class QySecondlineHzdTzServiceImpl extends ServiceImpl<QySecondlineHzdTzM
         //附件信息
         QueryWrapper<QySecondlineHzdAttachment> attachmentWrapper = new QueryWrapper<QySecondlineHzdAttachment>().checkSqlInjection();
         attachmentWrapper.lambda().eq(QySecondlineHzdAttachment::getHzdId,hzdId);
+
         List<QySecondlineHzdAttachment> attachmentList = qySecondlineHzdAttachmentService.list(attachmentWrapper);
         allInfo.setAttachmentList(attachmentList);
         List<QySecondlineHzdList> hzList = this.getHzListByTzId(tzInfo.getId(), hzdId);
@@ -237,6 +299,7 @@ public class QySecondlineHzdTzServiceImpl extends ServiceImpl<QySecondlineHzdTzM
         }
         QueryWrapper<QySecondlineHzdList> hzdListQuery = new QueryWrapper<QySecondlineHzdList>().checkSqlInjection();
         hzdListQuery.lambda().eq(QySecondlineHzdList::getHzdId,hzdId);
+        hzdListQuery.lambda().orderByDesc(QySecondlineHzdList::getId);
         List<QySecondlineHzdList> list = qySecondlineHzdListService.list(hzdListQuery);
         return list;
     }