权限修改

jg-waiwang-pro
XI_TENG\xixi_ 6 months ago
parent 2b65d1d2f5
commit d2c06b80a8

@ -21,36 +21,36 @@
<select id="getBomList" resultMap="getBomMap">
SELECT
t1.*,
t4.NAME AS productName,
t4.CODE AS productCode,
t4.spec AS productSpec,
t5.category_name AS categoryName,
a.*,
d.NAME AS productName,
d.CODE AS productCode,
d.spec AS productSpec,
e.category_name AS categoryName,
CASE
t4.product_type_id
d.product_type_id
WHEN 1 THEN
'标品'
WHEN 2 THEN
'加工'
END AS productTypeId,
t7.unit_name AS inventoryUnitId
g.unit_name AS inventoryUnitId
FROM
jg_bom t1
LEFT JOIN jg_bom_item t2 ON t1.id = t2.bom_id
AND t2.f_delete_mark
IS NULL LEFT JOIN jg_bom_item_value t3 ON t1.id = t3.bom_id
AND t3.f_delete_mark
IS NULL LEFT JOIN jg_product t4 ON t2.product_id = t4.id
AND t4.f_delete_mark
IS NULL LEFT JOIN jg_product_category t5 ON t4.product_category_id = t5.id
AND t5.f_delete_mark
IS NULL LEFT JOIN jg_product_unit t6 ON t6.prouct_id = t4.id
AND t6.f_delete_mark
IS NULL LEFT JOIN jg_product_unitwarehouse t7 ON t6.product_unitwarehouse_id = t7.id
AND t7.f_delete_mark IS NULL
jg_bom a
LEFT JOIN jg_bom_item b ON a.id = b.bom_id
AND b.f_delete_mark
IS NULL LEFT JOIN jg_bom_item_value c ON a.id = c.bom_id
AND c.f_delete_mark
IS NULL LEFT JOIN jg_product d ON b.product_id = d.id
AND d.f_delete_mark
IS NULL LEFT JOIN jg_product_category e ON d.product_category_id = e.id
AND e.f_delete_mark
IS NULL LEFT JOIN jg_product_unit f ON f.prouct_id = d.id
AND f.f_delete_mark
IS NULL LEFT JOIN jg_product_unitwarehouse g ON f.product_unitwarehouse_id = g.id
AND g.f_delete_mark IS NULL
${ew.customSqlSegment}
GROUP BY
t1.id
a.id
<if test="bomPagination.sidx != null and bomPagination.sidx != ''">
ORDER BY ${bomPagination.sidx} ${bomPagination.sort}
</if>

@ -142,5 +142,16 @@
</select>
<select id="queryBusinessFactoryTree" resultMap="businessLine">
SELECT
a.*
FROM
jg_business_line a
WHERE a.f_delete_mark is null
and a.organize_json_id like concat('%',#{organize},'%')
</select>
</mapper>

@ -28,4 +28,7 @@ public interface BusinessLineMapper extends BaseMapper<BusinessLineEntity> {
//业务组织配置左树
List<BusinessLineEntity> queryBusinessOrganizeConfigTree(String organize);
//工厂基地建模左树添加权限
List<BusinessLineEntity> queryBusinessFactoryTree(String organize);
}

@ -51,4 +51,8 @@ public interface BusinessLineService extends IService<BusinessLineEntity> {
int queryUserCountInfo(String id);
//业务组织配置左树
List<BusinessLineEntity> queryBusinessOrganizeConfigTree();
//工厂基地建模左树添加权限
List<BusinessLineEntity> queryBusinessFactory();
}

@ -237,7 +237,7 @@ public class BomServiceImpl extends ServiceImpl<BomMapper, BomEntity> implements
JsonUtil.getObjectToString(bomPagination.getBomCode()) :
String.valueOf(bomPagination.getBomCode());
// bomQueryWrapper.lambda().like(BomEntity::getBomCode,value);
bomQueryWrapper.like("t1.BOM_CODE",value);
bomQueryWrapper.like("a.BOM_CODE",value);
}
if(ObjectUtil.isNotEmpty(bomPagination.getProductName())){
@ -246,7 +246,7 @@ public class BomServiceImpl extends ServiceImpl<BomMapper, BomEntity> implements
JsonUtil.getObjectToString(bomPagination.getProductName()) :
String.valueOf(bomPagination.getProductName());
// bomQueryWrapper.lambda().like(BomEntity::getBomCode,value);
bomQueryWrapper.like("t4.NAME",value);
bomQueryWrapper.like("d.NAME",value);
}
@ -257,13 +257,13 @@ public class BomServiceImpl extends ServiceImpl<BomMapper, BomEntity> implements
JsonUtil.getObjectToString(bomPagination.getBomName()) :
String.valueOf(bomPagination.getBomName());
// bomQueryWrapper.lambda().like(BomEntity::getBomName,value);
bomQueryWrapper.like("t1.BOM_NAME",value);
bomQueryWrapper.like("a.BOM_NAME",value);
}
if(ObjectUtil.isNotEmpty(bomPagination.getBomStatus())){
bomNum++;
// bomQueryWrapper.lambda().eq(BomEntity::getBomStatus,bomPagination.getBomStatus());
bomQueryWrapper.eq("t1.BOM_STATUS",bomPagination.getBomStatus());
bomQueryWrapper.eq("a.BOM_STATUS",bomPagination.getBomStatus());
}
@ -292,7 +292,7 @@ public class BomServiceImpl extends ServiceImpl<BomMapper, BomEntity> implements
intersection.add("jnpfNullList");
}
// bomQueryWrapper.lambda().in(BomEntity::getId, intersection);
bomQueryWrapper.in("t1.id", intersection);
bomQueryWrapper.in("a.id", intersection);
}
//是否有高级查询
if (StringUtil.isNotEmpty(superOp)){
@ -300,7 +300,7 @@ public class BomServiceImpl extends ServiceImpl<BomMapper, BomEntity> implements
allSuperIDlist.add("jnpfNullList");
}
List<String> finalAllSuperIDlist = allSuperIDlist;
bomQueryWrapper.and(t->t.in("t1.id", finalAllSuperIDlist));
bomQueryWrapper.and(t->t.in("a.id", finalAllSuperIDlist));
}
//是否有数据过滤查询
@ -309,15 +309,15 @@ public class BomServiceImpl extends ServiceImpl<BomMapper, BomEntity> implements
allRuleIDlist.add("jnpfNullList");
}
List<String> finalAllRuleIDlist = allRuleIDlist;
bomQueryWrapper.and(t->t.in("t1.id", finalAllRuleIDlist));
bomQueryWrapper.and(t->t.in("a.id", finalAllRuleIDlist));
}
//假删除标志
bomQueryWrapper.isNull("t1.f_delete_mark");
bomQueryWrapper.isNull("a.f_delete_mark");
//排序
if(StringUtil.isEmpty(bomPagination.getSidx())){
// bomQueryWrapper.lambda().orderByDesc(BomEntity::getId);
bomPagination.setSidx("t1.f_creator_time");
bomPagination.setSidx("a.f_creator_time");
bomPagination.setSort("DESC");
}else{
try {
@ -328,7 +328,7 @@ public class BomServiceImpl extends ServiceImpl<BomMapper, BomEntity> implements
declaredField.setAccessible(true);
String value = declaredField.getAnnotation(TableField.class).value();
// bomQueryWrapper="asc".equals(bomPagination.getSort().toLowerCase())?bomQueryWrapper.orderByAsc(value):bomQueryWrapper.orderByDesc(value);
bomPagination.setSidx("t1." + value);
bomPagination.setSidx("a." + value);
} catch (NoSuchFieldException e) {
e.printStackTrace();

@ -708,4 +708,15 @@ public class BusinessLineServiceImpl extends ServiceImpl<BusinessLineMapper, Bus
organize = organize.replace("]","");
return businessLineMapper.queryBusinessOrganizeConfigTree(organize);
}
@Override
public List<BusinessLineEntity> queryBusinessFactory() {
UserInfo userInfo=userProvider.get();
OrganizeEntity organizeEntity = organizeService.getInfo(userInfo.getOrganizeId());
List<String> organizeJsonId = Arrays.stream(organizeEntity.getCompanyIdTree().split(",")).collect(Collectors.toList());
String organize = JSON.toJSONString(organizeJsonId);
organize = organize.replace("[","");
organize = organize.replace("]","");
return businessLineMapper.queryBusinessFactoryTree(organize);
}
}

@ -30,6 +30,9 @@ import jnpf.util.*;
import java.util.*;
import jnpf.base.UserInfo;
import jnpf.permission.entity.UserEntity;
import javax.annotation.Resource;
/**
*
* warehousingInventory
@ -48,7 +51,7 @@ public class WarehousingInventoryServiceImpl extends ServiceImpl<WarehousingInve
@Autowired
private WarehousingInventoryProductService warehousingInventoryProductService;
@Autowired
@Resource
private WarehousingInventoryMapper warehousingInventoryMapper;
@Override
public List<WarehousingInventoryEntity> getList(WarehousingInventoryPagination warehousingInventoryPagination){

@ -835,8 +835,8 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
if (intersection.size()==0){
intersection.add("jnpfNullList");
}
// workOrderQueryWrapper.lambda().in(WorkOrderEntity::getId, intersection);
workOrderQueryWrapper.in("a.id", intersection);
workOrderQueryWrapper.lambda().in(WorkOrderEntity::getId, intersection);
// workOrderQueryWrapper.in("a.id", intersection);
}
//是否有高级查询
if (StringUtil.isNotEmpty(superOp)){

@ -1,6 +1,7 @@
package jnpf.controller;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
import com.aliyun.credentials.utils.StringUtils;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -16,6 +17,7 @@ import jnpf.permission.entity.OrganizeEntity;
import jnpf.permission.entity.UserEntity;
import jnpf.permission.model.organize.OrganizeModel;
import jnpf.permission.model.organize.OrganizeTreeVO;
import jnpf.permission.service.OrganizeService;
import jnpf.service.*;
import jnpf.entity.*;
import jnpf.util.*;
@ -67,6 +69,8 @@ public class BusinessLineController {
private BusinessAddressService businessAddressService;
@Autowired
private BusinessCargoService businessCargoService;
@Autowired
private OrganizeService organizeService;
/**
@ -92,7 +96,10 @@ public class BusinessLineController {
@Operation(summary = "获取工厂和加工车间树形树形")
@GetMapping("/WorkTree")
public ActionResult<List<BusinessLineSonTree>> WorkTree() {
List<BusinessLineEntity> list = businessLineService.list();
// List<BusinessLineEntity> list = businessLineService.list();
List<BusinessLineEntity> list = businessLineService.queryBusinessFactory();
List<BusinessLineEntity> workTreeList =new ArrayList<>();
for (BusinessLineEntity businessLineEntity:list){
if (businessLineEntity.getDiffFlag().equals("2")||businessLineEntity.getDiffFlag().equals("5")){

@ -145,6 +145,7 @@ public class ProductWarehouseController {
@Operation(summary = "加工和bom获取商品列表")
@PostMapping("/getBomProductlist")
public ActionResult bomProductlist(@RequestBody ProductWarehousePagination productWarehousePagination)throws IOException{
productWarehousePagination.setMenuId("522017337285542021");
List<ProductWarehouseEntity> list= productWarehouseService.getProductList(productWarehousePagination);
List<Map<String, Object>> realList = new ArrayList<>();
for (ProductWarehouseEntity entity : list) {
@ -224,6 +225,7 @@ public class ProductWarehouseController {
@Operation(summary = "盘点单根据库存取商品列表")
@PostMapping("/getInventoryLProductlist")
public ActionResult inventoryLProductlist(@RequestBody ProductWarehousePagination productWarehousePagination)throws IOException{
productWarehousePagination.setMenuId("522017337285542021");
List<ProductWarehouseEntity> list= productWarehouseService.getProductInventoryList(productWarehousePagination);
List<Map<String, Object>> realList=new ArrayList<>();
for (ProductWarehouseEntity entity : list) {
@ -394,6 +396,7 @@ public class ProductWarehouseController {
@Operation(summary = "报损单根据库存获取商品")
@PostMapping("/postInventoryReportlossProductlist")
public ActionResult InventoryReportlossProductlist(@RequestBody ProductWarehousePagination productWarehousePagination) throws IOException{
productWarehousePagination.setMenuId("522017337285542021");
List<ProductWarehouseEntity> list= productWarehouseService.getProductInventoryReportlossList(productWarehousePagination);
List<Map<String, Object>> realList=new ArrayList<>();
for (ProductWarehouseEntity entity : list) {

@ -1,6 +1,7 @@
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;
@ -11,7 +12,9 @@ import jnpf.engine.service.FlowTaskNodeService;
import jnpf.engine.service.FlowTaskService;
import jnpf.exception.DataException;
import jnpf.model.voucher.VoucherPagination;
import jnpf.permission.entity.OrganizeEntity;
import jnpf.permission.entity.UserEntity;
import jnpf.permission.service.OrganizeService;
import jnpf.service.*;
import jnpf.entity.*;
import jnpf.util.*;
@ -84,6 +87,8 @@ public class WarehousingNotificationController {
private VoucherService voucherService;
@Autowired
private BusinessCargoService businessCargoService;
@Autowired
private OrganizeService organizeService;
@Autowired
@ -678,10 +683,18 @@ public class WarehousingNotificationController {
@Operation(summary = "获取Notification选择的凭证和商品列表")
@PostMapping("/getNotificationVoucherProductList")
public ActionResult queryNotificationVoucherProductList(@RequestBody VoucherPagination voucherPagination) throws IOException{
UserInfo userInfo=userProvider.get();
OrganizeEntity organizeEntity = organizeService.getInfo(userInfo.getOrganizeId());
List<String> organizeJsonId = Arrays.stream(organizeEntity.getCompanyIdTree().split(",")).collect(Collectors.toList());
String organize = JSON.toJSONString(organizeJsonId);
organize = organize.replace("[","");
organize = organize.replace("]","");
String id = voucherPagination.getNotid();
QueryWrapper<WarehousingProductEntity> warehousingProductEntityQueryWrapper=new QueryWrapper<>();
warehousingProductEntityQueryWrapper.lambda().eq(WarehousingProductEntity::getWarehousingId,id);
List<WarehousingProductEntity> warehousingProductEntityList = warehousingProductService.list(warehousingProductEntityQueryWrapper);
warehousingProductEntityQueryWrapper.like("organize_json_id",organize);
List<WarehousingProductEntity> warehousingProductEntityList = warehousingProductService.list(warehousingProductEntityQueryWrapper);
List<VoucherEntity> list=new ArrayList<>();
for (WarehousingProductEntity warehousingProductEntity:warehousingProductEntityList){

@ -613,6 +613,7 @@ public class WarehousingReceiveController {
WorkOrderPagination workOrderPagination = new WorkOrderPagination();
workOrderPagination.setWarehouseId(warehouseId);
workOrderPagination.setMenuId("523106990231139333");
List<WorkOrderEntity> list = workOrderService.getReceiveList(workOrderPagination);
for (WorkOrderEntity entity : list) {
Map<String, Object> workOrderMap = JsonUtil.entityToMap(entity);

@ -1,6 +1,7 @@
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;
@ -13,7 +14,9 @@ import jnpf.exception.DataException;
import jnpf.model.warehousingstorage.WarehousingStorageForm;
import jnpf.model.warehousingstorage.WarehousingStorageProductModel;
import jnpf.model.workorder.WorkOrderPrimaryModel;
import jnpf.permission.entity.OrganizeEntity;
import jnpf.permission.entity.UserEntity;
import jnpf.permission.service.OrganizeService;
import jnpf.service.*;
import jnpf.entity.*;
import jnpf.util.*;
@ -98,6 +101,8 @@ public class WarehousingReturnController {
private WarehousingStorageService warehousingStorageService;
@Autowired
private InventoryLogService inventoryLogService;
@Autowired
private OrganizeService organizeService;
@Autowired
private ConfigValueUtil configValueUtil;
@ -607,8 +612,17 @@ public class WarehousingReturnController {
@GetMapping("/getreturnReceiveList")
public ActionResult returnReceiveList(@RequestParam("warehouseId") String warehouseId) throws IOException{
// if (businessType.equals("1")){
QueryWrapper<WarehousingReceiveEntity> warehousingReturnEntityQueryWrapper =new QueryWrapper<>();
warehousingReturnEntityQueryWrapper.lambda().eq(WarehousingReceiveEntity::getWarehouseId,warehouseId);
UserInfo userInfo=userProvider.get();
OrganizeEntity organizeEntity = organizeService.getInfo(userInfo.getOrganizeId());
List<String> organizeJsonId = Arrays.stream(organizeEntity.getCompanyIdTree().split(",")).collect(Collectors.toList());
String organize = JSON.toJSONString(organizeJsonId);
organize = organize.replace("[","");
organize = organize.replace("]","");
QueryWrapper<WarehousingReceiveEntity> warehousingReturnEntityQueryWrapper =new QueryWrapper<>();
warehousingReturnEntityQueryWrapper.like("organize_json_id",organize);
warehousingReturnEntityQueryWrapper.lambda().eq(WarehousingReceiveEntity::getWarehouseId,warehouseId);
List<WarehousingReceiveEntity> warehousingReceiveEntityList =warehousingReceiveService.list(warehousingReturnEntityQueryWrapper);
for (WarehousingReceiveEntity warehousingReceiveEntity:warehousingReceiveEntityList){

@ -1,16 +1,18 @@
<template>
<el-dialog title="选择数据" :close-on-click-modal="false" :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center"
lock-scroll append-to-body width="800px">
<el-dialog title="选择数据" :close-on-click-modal="false" :visible.sync="visible"
class="JNPF-dialog JNPF-dialog_center" lock-scroll append-to-body width="800px">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="10">
<el-form-item label="关键词">
<el-input v-model="keyword" placeholder="请输入关键词查询" clearable @keyup.enter.native="search()" />
<el-input v-model="keyword" placeholder="请输入关键词查询" clearable
@keyup.enter.native="search()" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()">{{ $t('common.search') }}
<el-button type="primary" icon="el-icon-search"
@click="search()">{{ $t('common.search') }}
</el-button>
<el-button icon="el-icon-refresh-right" @click="refresh()">{{ $t('common.reset') }}
</el-button>
@ -19,11 +21,13 @@
</el-form>
<div class="JNPF-common-search-box-right">
<el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" @click="search()" />
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="search()" />
</el-tooltip>
</div>
</el-row>
<JNPF-table v-loading="listLoading" :data="list" hasC @selection-change="handleSelectionChange" :border="false">
<JNPF-table v-loading="listLoading" :data="list" hasC @selection-change="handleSelectionChange"
:border="false">
<el-table-column prop="name" label="名称" align="left">
</el-table-column>
<el-table-column prop="mobile" label="驾驶员电话" align="left">
@ -33,7 +37,8 @@
<el-table-column prop="sex" label="性别" align="left">
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="init" />
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="init" />
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">{{ $t('common.cancelButton') }}</el-button>
<el-button type="primary" @click="select()">{{ $t('common.confirmButton') }}</el-button>
@ -77,6 +82,8 @@ export default {
keyword: this.keyword,
excludeIdList: this.excludeIdList,
dataType: 0,
menuId: '531495963697634693'
}
/* GoodsList(query).then(res => {
this.list = res.data.list
@ -120,7 +127,7 @@ export default {
}
</script>
<style lang="scss" scoped>
>>>.el-dialog__body {
>>> .el-dialog__body {
height: 70vh;
padding: 0 0 10px !important;
display: flex;

@ -84,6 +84,8 @@ export default {
keyword: this.keyword,
excludeIdList: this.excludeIdList,
dataType: 0,
menuId: '531496192027155845'
}
/* GoodsList(query).then(res => {
this.list = res.data.list

@ -77,7 +77,8 @@
</div> -->
<div>
<jnpf-form-tip-item label="关联单据" v-if="judgeShow('businessId')" prop="businessId">
<jnpf-form-tip-item label="关联单据"
v-if="judgeShow('businessId') && dataForm.businessType==1" prop="businessId">
<JnpfPopupSelect v-model="dataForm.businessId" @change="changeDataOrder"
:rowIndex="null" :formData="dataForm" :templateJson="interfaceRes.businessId"
placeholder="请选择" hasPage propsValue="id" popupWidth="800px" popupTitle="选择数据"
@ -87,7 +88,8 @@
</JnpfPopupSelect>
</jnpf-form-tip-item>
<!-- <jnpf-form-tip-item label="关联单据" v-if="judgeShow('businessId')" prop="businessId">
<jnpf-form-tip-item label="关联单据"
v-if="judgeShow('businessId') && dataForm.businessType==2" prop="businessId">
<JnpfPopupSelect v-model="dataForm.businessId" @change="changeDataOrder"
:rowIndex="null" :formData="dataForm" :templateJson="interfaceRes.businessId"
placeholder="请选择" hasPage propsValue="id" popupWidth="800px" popupTitle="选择数据"
@ -95,7 +97,7 @@
interfaceId="550333831945675973" :pageSize="20"
:columnOptions="businessIdcolumnOptions" clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</jnpf-form-tip-item> -->
</jnpf-form-tip-item>
</div>
</el-col>
@ -404,7 +406,7 @@ export default {
warehouseIdcolumnOptions: [{ "label": "仓库名称", "value": "name" }, { "label": "仓库编码", "value": "code" },],
returnReasonOptions: [{ "fullName": "质量问题", "id": "1" }, { "fullName": "客户退回", "id": "2" }, { "fullName": "试用", "id": "3" }, { "fullName": "临期报废", "id": "4" }, { "fullName": "维修", "id": "5" }, { "fullName": "保养", "id": "6" }, { "fullName": "作业工具", "id": "7" }, { "fullName": "其他", "id": "8" }],
returnReasonProps: { "label": "fullName", "value": "id" },
businessIdcolumnOptions: [{ "label": "领用单编号", "value": "receiveCode" }],
businessIdcolumnOptions: [{ "label": "领用单编号", "value": "receiveCode" }, { "label": "关联单据", "value": "businessId" }],
warehousingreturnproductproductIdcolumnOptions: [{ "label": "商品名称", "value": "name" }, { "label": "规格", "value": "spec" }, { "label": "批次号", "value": "batchNumber" },],
warehousingreturnproductreturnUnitcolumnOptions: [{ "label": "单位名称", "value": "unit_name" },],
warehousingreturnproductcargoIdcolumnOptions: [{ "label": "货区名称", "value": "cargo_name" }, { "label": "描述", "value": "description" }],

Loading…
Cancel
Save