Merge remote-tracking branch 'origin/main'

product
bawei 2 years ago
commit dd72fae9bd

@ -64,6 +64,9 @@ public class CustomerVOController {
@Autowired
private CustomerService customerService;
@Autowired
private RedisUtil redisUtil;
@ -79,14 +82,30 @@ public class CustomerVOController {
//处理id字段转名称若无需转或者为空可删除
for(CustomerMobileEntity entity:list){
Map<String,Object> orgIdMap = new HashMap<>();
entity.setOrgId(generaterSwapUtil.getPopupSelectValue("394016341591396805","F_Id","F_FullName",entity.getOrgId(),orgIdMap));
String orgIdKey = "394016341591396805" + "F_Id" + "F_FullName"+entity.getOrgId()+orgIdMap;
String orgId =null;
if (orgIdKey!=null&&!redisUtil.exists(orgIdKey)) {
orgId = generaterSwapUtil.getPopupSelectValue("394016341591396805","F_Id","F_FullName",entity.getOrgId(),orgIdMap);
redisUtil.insert(orgIdKey, orgId,86000);
} else {
orgId = String.valueOf(redisUtil.getString(orgIdKey));
}
entity.setOrgId(orgId);
String provinceKey = entity.getProvince();
String province=null;
if (provinceKey!=null){
if (!redisUtil.exists(provinceKey)) {
province = generaterSwapUtil.provinceData(entity.getProvince());
redisUtil.insert(provinceKey, province,86000);
} else {
province = String.valueOf(redisUtil.getString(provinceKey));
}
entity.setProvince(province);
}else {
entity.setProvince(generaterSwapUtil.provinceData(entity.getProvince()));
}
}
List<CustomerListVO> listVO=JsonUtil.getJsonToList(list,CustomerListVO.class);
for(CustomerListVO customerVO:listVO){
}
PageListVO vo=new PageListVO();
vo.setList(listVO);
PaginationVO page=JsonUtil.getJsonToBean(customerPagination,PaginationVO.class);

@ -35,7 +35,6 @@ import jnpf.permission.service.AuthorizeService;
import jnpf.poundlist.entity.PoundlistEntity;
import jnpf.poundlist.mapper.PoundlistMapper;
import jnpf.poundlist.service.PoundlistService;
import jnpf.purchaseback.entity.PurchasebackEntity;
import jnpf.purchaseorder.entity.*;
import jnpf.purchaseorder.mapper.Purchaseorder_item0Mapper;
import jnpf.purchaseorder.mapper.PurchaseorderitemMapper;
@ -1459,8 +1458,10 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
if (contractMEntities != null && contractMEntities.size() > 0) {
model.setPurchaseId(contractMEntities.get(0).getId());
// 客户id
model.setCustomerId(contractMEntities.get(0).getCode());
// 供应商id
model.setSupplierId(contractMEntities.get(0).getCode());
} else {
model.setCauseError("采购合同不存在!请添加采购合同后尝试添加!");
errList.add(model);
@ -1493,7 +1494,8 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
if (contractMEntities != null && contractMEntities.size() > 0) {
model.setSalesId(contractMEntities.get(0).getId());
model.setSupplierId(contractMEntities.get(0).getCode());
// 客户
model.setCustomerId(contractMEntities.get(0).getCode());
} else {
model.setCauseError("销售合同不存在!请添加销售合同后尝试添加!");
errList.add(model);

@ -64,6 +64,9 @@ public class SupplierController {
@Autowired
private SupplierService supplierService;
@Autowired
private RedisUtil redisUtil;
@ -79,15 +82,39 @@ public class SupplierController {
//处理id字段转名称若无需转或者为空可删除
for(SupplierMobileEntity entity:list){
Map<String,Object> companyIdMap = new HashMap<>();
entity.setCompanyId(generaterSwapUtil.getPopupSelectValue("394016341591396805","F_Id","F_FullName",entity.getCompanyId(),companyIdMap));
String companyIdKey="394016341591396805"+"F_Id"+"F_FullName"+entity.getCompanyId()+companyIdMap;
String companyId=null;
if (!redisUtil.exists(companyIdKey)) {
companyId = generaterSwapUtil.getPopupSelectValue("394016341591396805","F_Id","F_FullName",entity.getCompanyId(),companyIdMap);
redisUtil.insert(companyIdKey, companyId,86000);
} else {
companyId = String.valueOf(redisUtil.getString(companyIdKey));
}
entity.setCompanyId(companyId);
String provinceId=null;
String provinceKey=entity.getProvince();
if (provinceKey!=null){
if (!redisUtil.exists(provinceKey)) {
provinceId = generaterSwapUtil.provinceData(entity.getProvince());
redisUtil.insert(provinceKey, provinceId,86000);
} else {
provinceId = String.valueOf(redisUtil.getString(provinceKey));
}
entity.setProvince(provinceId);
}else {
entity.setProvince(generaterSwapUtil.provinceData(entity.getProvince()));
entity.setStatus(generaterSwapUtil.switchSelectValue(entity.getStatus() ,"1" ,"0"));
}
String statusKey=entity.getStatus() +"1" +"0";
String statusValue=null;
if (!redisUtil.exists(statusKey)) {
statusValue = generaterSwapUtil.switchSelectValue(entity.getStatus() ,"1" ,"0");
redisUtil.insert(statusKey, statusValue,86000);
} else {
statusValue = String.valueOf(redisUtil.getString(statusKey));
}
entity.setStatus(statusValue);
}
List<SupplierListVO> listVO=JsonUtil.getJsonToList(list,SupplierListVO.class);
for(SupplierListVO supplierVO:listVO){
}
PageListVO vo=new PageListVO();
vo.setList(listVO);
PaginationVO page=JsonUtil.getJsonToBean(supplierPagination,PaginationVO.class);

@ -48,7 +48,6 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, SupplierEnt
private SupplierMapper supplierMapper;
@Override
public List<SupplierMobileEntity> getList(SupplierPagination supplierPagination){
String userId=userProvider.get().getUserId();
@ -117,8 +116,6 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, SupplierEnt
}else{
try {
String sidx = supplierPagination.getSidx();
// SupplierEntity supplierEntity = new SupplierEntity();
SupperlierMobileEntitySidex supplierEntity = new SupperlierMobileEntitySidex();
Field declaredField = supplierEntity.getClass().getDeclaredField(sidx);
declaredField.setAccessible(true);

@ -456,16 +456,16 @@
(
SELECT
count(*) poundNum,
ROUND( SUM( CASE a.unit WHEN '0' THEN a.buckle_weight WHEN '1' THEN a.buckle_weight / 1000 END ), 6 ) buckleWeightSum,
ROUND( SUM( CASE a.unit WHEN '0' THEN a.settlement WHEN '1' THEN a.settlement / 1000 END ), 6 ) settlementSum,
ROUND( SUM( a.settlement * a.purchase_price ), 6 ) purchaseAmountSum,
ROUND( SUM( a.settlement * a.sales_price ), 6 ) salesAmountSum
IFNULL(ROUND( SUM( CASE a.unit WHEN '0' THEN a.buckle_weight WHEN '1' THEN a.buckle_weight / 1000 END ), 6 ),0) buckleWeightSum,
IFNULL(ROUND( SUM( CASE a.unit WHEN '0' THEN a.settlement WHEN '1' THEN a.settlement / 1000 END ), 6 ),0) settlementSum,
IFNULL(ROUND( SUM( a.settlement * a.purchase_price ), 6 ),0) purchaseAmountSum,
IFNULL(ROUND( SUM( a.settlement * a.sales_price ), 6 ),0) salesAmountSum
FROM
jg_poundlist a
WHERE
a.delete_mark = '0'
AND TO_DAYS(
NOW()) - TO_DAYS( a.creator_time ) = 0
'2023-03-25') - TO_DAYS( a.creator_time ) = 0
) aaa
</select>

@ -26,7 +26,7 @@ LEFT JOIN jg_contract d ON a.sales_id=d.id
LEFT JOIN jg_receiptout_item0 e ON a.id=e.poundlist_id
LEFT JOIN jg_salesorder g ON g.contract_id=d.id
WHERE a.delete_mark = 0 and b.delete_mark = 0 and c.delete_mark = 0 and d.delete_mark = 0 and e.delete_mark = 0 and g.delete_mark = 0 and
WHERE a.delete_mark = 0 and
a.creator_time BETWEEN #{startTime} and #{endTime}
OR
a.department_id =#{departmentIdS}
@ -50,7 +50,7 @@ WHERE a.delete_mark = 0 and b.delete_mark = 0 and c.delete_mark = 0 and d.delete
LEFT JOIN jg_supplier b ON a.supplier_id=b.id
LEFT JOIN jg_customer c ON a.customer_id=c.id
LEFT JOIN jg_material d ON a.material_id=d.id
WHERE a.delete_mark = 0 and b.delete_mark = 0 and c.delete_mark = 0 and d.delete_mark = 0
WHERE a.delete_mark = 0 and
a.creator_time BETWEEN #{startTime} and #{endTime}
</select>
@ -69,7 +69,7 @@ WHERE a.delete_mark = 0 and b.delete_mark = 0 and c.delete_mark = 0 and d.delete
LEFT JOIN jg_natural i on a.natural_id = i.id
LEFT JOIN jg_purchaseorder_item0 j on a.id = j.poundlist_id
LEFT JOIN jg_salesorder_item0 k on a.id = k.poundlist_id
where a.is_examine = '1'
where a.is_examine = '1' and a.delete_mark = 0
<if test="poundlistPagination.keyword != null and poundlistPagination.keyword != ''">
AND (b.ticketno LIKE CONCAT('%',#{poundlistPagination.keyword},'%') OR c.supplier_name LIKE CONCAT('%',#{poundlistPagination.keyword},'%') OR d.supplier_nm LIKE CONCAT('%',#{poundlistPagination.keyword},'%'))
</if>

@ -0,0 +1,175 @@
<template>
<div class="UploadFile-container">
<template v-if="fileList.length">
<transition-group class="el-upload-list el-upload-list--picture-card" tag="ul" name="el-list">
<li class="el-upload-list__item is-success" v-for="(file, index) in fileList" :key="file.fileId">
<el-image :src="define.comUrl + file.url" class="el-upload-list__item-thumbnail"
:preview-src-list="getImgList(fileList)" :z-index="10000" :ref="'image' + index">
</el-image>
<span class="el-upload-list__item-actions">
<span class="el-upload-list__item-preview" @click="handlePictureCardPreview(index)">
<i class="el-icon-zoom-in"></i>
</span>
<span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(index)">
<i class="el-icon-delete"></i>
</span>
</span>
</li>
</transition-group>
</template>
<template v-if="!detailed">
<el-upload :action="define.comUploadUrl + '/' + type" :headers="uploadHeaders" ref="elUpload"
:on-success="handleSuccess" :multiple="limit !== 1" :show-file-list="false" accept="image/*"
:before-upload="beforeUpload" :on-exceed="handleExceed" :disabled="disabled" list-type="picture-card"
:limit="limit" class="upload-btn" drag>
<i class="el-icon-plus"></i>
<div slot="tip" class="el-upload__tip" v-show="showTip">
只能上传不超过{{ fileSize }}{{ sizeUnit }}{{ accept }}图片
</div>
</el-upload>
</template>
</div>
</template>
<script>
const units = {
KB: 1024,
MB: 1024 * 1024,
GB: 1024 * 1024 * 1024
}
export default {
name: 'UploadImgB',
props: {
value: {
type: Array,
default: () => []
},
type: {
type: String,
default: 'annexpic'
},
disabled: {
type: Boolean,
default: false
},
detailed: {
type: Boolean,
default: false
},
showTip: {
type: Boolean,
default: false
},
limit: {
type: Number,
default: 0
},
accept: {
type: String,
default: 'image/*'
},
sizeUnit: {
type: String,
default: 'MB'
},
fileSize: {
default: 5
},
},
data() {
return {
fileList: [],
uploadHeaders: { Authorization: this.$store.getters.token }
}
},
watch: {
value: {
immediate: true,
handler(val) {
this.fileList = val
this.$nextTick(() => {
if (!val.length) {
this.$refs.elUpload && this.$refs.elUpload.uploadFiles.splice(0)
} else {
if (!this.$refs.elUpload) return
this.$refs.elUpload.uploadFiles = val.map(o => ({
...o,
uid: o.fileId
}))
}
})
}
}
},
methods: {
beforeUpload(file) {
const unitNum = units[this.sizeUnit];
if (!this.fileSize) return true
let isRightSize = file.size / unitNum < this.fileSize
if (!isRightSize) {
this.$message.error(`图片大小超过${this.fileSize}${this.sizeUnit}`)
return isRightSize;
}
let isAccept = new RegExp('image/*').test(file.type)
if (!isAccept) {
this.$message.error(`请上传图片`)
return isAccept;
}
return isRightSize && isAccept;
},
handleSuccess(res, file, fileList) {
if (res.code == 200) {
this.fileList.push({
name: file.name,
fileId: res.data.name,
url: res.data.url
})
this.$emit('input', this.fileList)
this.$emit('change', this.fileList)
} else {
this.$refs.elUpload.uploadFiles.splice(fileList.length - 1, 1)
fileList.filter(o => o.uid != file.uid)
this.$emit('input', this.fileList)
this.$emit('change', this.fileList)
this.$message({ message: res.msg, type: 'error', duration: 1500 })
}
},
handleExceed(files, fileList) {
this.$message.warning(`当前限制最多可以上传${this.limit}张图片`)
},
handlePictureCardPreview(index) {
this.$refs['image' + index][0].clickHandler()
},
handleRemove(index) {
this.fileList.splice(index, 1)
this.$refs.elUpload.uploadFiles.splice(index, 1)
this.$emit("input", this.fileList)
this.$emit('change', this.fileList)
},
getImgList(list) {
const newList = list.map(o => this.define.comUrl + o.url)
return newList
}
}
}
</script>
<style lang="scss" scoped>
.el-upload-list--picture-card .el-upload-list__item {
width: 120px;
height: 120px;
}
.el-upload--picture-card {
width: 120px;
height: 120px;
line-height: 120px;
}
.upload-btn {
display: inline-block;
}
.UploadFile-container .el-upload-dragger{
width: 144px;
height: 144px;
}
</style>

@ -46,8 +46,8 @@
<div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head">
<div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button>
<!-- <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button> -->
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
@ -68,14 +68,14 @@
</template>
</el-table-column>
<el-table-column prop="creatorTime" label="创建时间" width="0" align="left" />
<el-table-column label="操作" fixed="right" width="100">
<!-- <el-table-column label="操作" fixed="right" width="100">
<template slot-scope="scope">
<el-button type="text" @click="addOrUpdateHandle(scope.row.id)">
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
</template>
</el-table-column>
</el-table-column> -->
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" />

@ -100,7 +100,7 @@ export default {
bankAccount: '',
bank: '',
bankNo: '',
photos: null,
photos: [],
creatorUserName: '',
creatorTime: "",
},
@ -147,7 +147,7 @@ export default {
method: 'get'
}).then(res => {
if (res.data.photos == null) {
res.data.photos = JSON.stringify([]);
res.data.photos = [];
}
this.dataInfo(res.data)
this.loading = false
@ -210,6 +210,9 @@ export default {
dataInfo(dataAll) {
let _dataAll = dataAll
_dataAll.photos = JSON.parse(_dataAll.photos)
if(_dataAll.photos == ''||_dataAll.photos == null){
_dataAll.photos = [];
}
this.dataForm = _dataAll
},
},

@ -170,16 +170,12 @@ export default {
method: 'post',
data: _query
}).then(res => {
console.log(res)
var _list = [];
for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i];
console.log(_data);
i
_list.push(_data)
}
this.list = _list
console.log(this.list)
this.total = res.data.pagination.total
this.listLoading = false

@ -37,31 +37,20 @@
</el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<!-- <el-col :span="24">
<el-form-item label="车辆照片" prop="vehiclephotos">
<JNPF-UploadImg v-model="dataForm.vehiclephotos" :fileSize="5" sizeUnit="MB" :limit="9">
</JNPF-UploadImg>
</el-form-item>
</el-col>
<!-- <el-col :span="12" >
<el-form-item label="录入人"
prop="creatorusername" >
<el-input v-model="dataForm.creatorusername"
placeholder="请输入录入人" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="创建时间"
prop="creatortime" >
<el-input v-model="dataForm.creatortime"
placeholder="系统自动生成" readonly >
</el-col> -->
<el-col :span="24">
<el-form-item label="车辆照片" prop="vehiclephotos">
<JNPF-UploadImgB v-model="dataForm.vehiclephotos" :fileSize="5" sizeUnit="MB" :limit="9">
</el-input>
</el-form-item>
</el-col> -->
</JNPF-UploadImgB>
</el-form-item>
</el-col>
</template>
</el-form>
</el-row>
@ -232,3 +221,9 @@
},
}
</script>
<style>
.el-upload-dragger {
width: 148px;
height: 148px;
}
</style>
Loading…
Cancel
Save