导出修改,是否长协修改,加工单编码

jg-waiwang-pro
XI_TENG\xixi_ 3 months ago
parent 8d42ce0b9e
commit eeb60f39e1

@ -89,4 +89,28 @@
GROUP BY a.product_id,a.batch_number
</select>
<select id="queryExecl" resultMap="getInventoryMap">
SELECT a.*,
c.f_full_name productTypeName,
d.brand_name brandName,
e.unit_name inventoryUnitName,
f.name warehouseName,
g.cargo_name storageAreaName,
SUM(a.inventory_number) inventoryNumberSum
from jg_inventory a
LEFT JOIN jg_product b on a.product_id = b.id
LEFT JOIN (SELECT * from base_dictionary_data where f_dictionary_type_id = '521699870097015173' and f_delete_mark is null) c on a.product_type_id = c.f_en_code
LEFT JOIN jg_product_brand d on a.brand_id = d.id
LEFT JOIN (SELECT aa.*,bb.product_unit_code from jg_product_unitwarehouse aa LEFT JOIN jg_product_unit bb on aa.id = bb.product_unitwarehouse_id WHERE aa.F_Delete_mark is null and bb.F_delete_mark is null) e on a.inventory_unit_id = e.product_unit_code
LEFT JOIN jg_business_line f on a.warehouse_id = f.id
LEFT JOIN jg_business_cargo g on a.storage_area_id = g.id
${ew.customSqlSegment} and a.f_delete_mark is null and b.f_delete_mark is null
and c.f_delete_mark is null and d.f_delete_mark is null and e.f_delete_mark is null and f.f_delete_mark is null and g.f_delete_mark is null
and a.inventory_number>0
GROUP BY
a.id
</select>
</mapper>

@ -31,4 +31,6 @@ public interface InventoryMapper extends BaseMapper<InventoryEntity> {
* @return
*/
List<InventoryEntity> queryByKeywordNotPage();
List<InventoryEntity> queryExecl(@Param("ew") QueryWrapper<InventoryEntity> queryWrapper);
}

@ -35,4 +35,6 @@ public interface InventoryService extends IService<InventoryEntity> {
void saveOrUpdate(InventoryForm inventoryForm,String id, boolean isSave) throws Exception;
List<InventoryEntity> queryByKeywordNotPage();
}

@ -1,7 +1,10 @@
package jnpf.service.impl;
import com.alibaba.fastjson.JSON;
import jnpf.entity.*;
import jnpf.mapper.InventoryMapper;
import jnpf.permission.entity.OrganizeEntity;
import jnpf.permission.service.OrganizeService;
import jnpf.service.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.model.inventory.*;
@ -47,6 +50,8 @@ public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory
private UserProvider userProvider;
@Autowired
private InventoryMapper inventoryMapper;
@Autowired
private OrganizeService organizeService;
@Override
public List<InventoryEntity> getList(InventoryPagination inventoryPagination){
@ -252,8 +257,8 @@ public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory
return inventoryPagination.setData(list, list.size());
}
}else{
return this.list(inventoryQueryWrapper);
}
// return this.list(inventoryQueryWrapper);
return inventoryMapper.queryExecl(inventoryQueryWrapper); }
}
@Override
public InventoryEntity getInfo(String id){
@ -316,4 +321,6 @@ public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory
public List<InventoryEntity> queryByKeywordNotPage() {
return inventoryMapper.queryByKeywordNotPage();
}
}

@ -1158,7 +1158,7 @@ public class BusinessOrderController {
List<ContractLEntity> list= businessOrderService.querySaleContractInfo(businessLineId);
for (ContractLEntity entity : list){
List<ProductByContractModel> productByContractModelList = businessOrderService.queryProductByContractInfo(entity.getId());
if (entity.getIsLongAgreement().equals("2")){
if (entity.getIsLongAgreement().equals("1")){ //1是非长协
QueryWrapper<BusinessOrderEntity> businessOrderEntityQueryWrapper = new QueryWrapper<>();
businessOrderEntityQueryWrapper.lambda().eq(BusinessOrderEntity::getContractId,entity.getId());
List<BusinessOrderEntity> businessOrderEntityList = businessOrderService.list(businessOrderEntityQueryWrapper);

@ -1,13 +1,16 @@
package jnpf.controller;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jnpf.base.ActionResult;
import jnpf.base.UserInfo;
import jnpf.exception.DataException;
import jnpf.permission.entity.OrganizeEntity;
import jnpf.permission.entity.UserEntity;
import jnpf.permission.service.OrganizeService;
import jnpf.service.*;
import jnpf.entity.*;
import jnpf.util.*;
@ -79,6 +82,8 @@ public class InventoryController {
private WarehousingReceiveService warehousingReceiveService;
@Autowired
private ConfigValueUtil configValueUtil;
@Autowired
private OrganizeService organizeService;
/**
*
@ -173,6 +178,10 @@ public class InventoryController {
return ActionResult.fail("请选择导出字段");
}
List<InventoryEntity> list= inventoryService.getList(inventoryPagination);
// List<InventoryEntity> list = inventoryService.getExeclList(inventoryPagination);
List<Map<String, Object>> realList=new ArrayList<>();
for (InventoryEntity entity : list) {
Map<String, Object> inventoryMap=JsonUtil.entityToMap(entity);

@ -246,6 +246,20 @@
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="条码" prop="barCode" width="250px" align="center">
<template slot="header">
<span class="required-sign">*</span>商品编码
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.code" placeholder="请输入" disabled clearable
:style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="条码" prop="barCode" width="250px" align="center">
<template slot="header">

Loading…
Cancel
Save