Merge remote-tracking branch 'origin/orderChange' into zhairh

# Conflicts:
#	api-admin/src/main/java/com/glxp/api/admin/controller/inventory/InvSubWarehouseController.java
feature-order-fix
x_z 2 years ago
commit b932e8ff24

@ -77,13 +77,15 @@ public class InvSubWarehouseController {
// }
AuthAdmin authAdmin = customerService.getUserBean();
if (filterInvWarehouseRequest.getFilter() == null || filterInvWarehouseRequest.getFilter() == 1 || StrUtil.isNotEmpty(filterInvWarehouseRequest.getPcode())) {
if (null != authAdmin.getCustomerId() && authAdmin.getCustomerId() == 110)
filterInvWarehouseRequest.setUserId(authAdmin.getId().intValue());
else{
filterInvWarehouseRequest.setSpUse(true);
if (StrUtil.isNotEmpty(filterInvWarehouseRequest.getPcode())) {
if (filterInvWarehouseRequest.getFilter() == null || filterInvWarehouseRequest.getFilter() == 1) {
if (authAdmin.getCustomerId()==110) {
filterInvWarehouseRequest.setUserId(authAdmin.getId().intValue());
}else {
filterInvWarehouseRequest.setSpUse(true);
}
}
}else{
} else{
//走这边表示单据选择的是往来单位里面调出调入的库
//判断单据类型是1就是设置单据需要需要查询除自己以外的分库
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("corp_innor_inv");

@ -220,12 +220,17 @@ public class InvWarehouseController {
return ResultVOUtils.error(500, "已存在相同类型的一级仓库,无法继续添加!");
}
}
InvWarehouseEntity invWarehouseEntity1 = invWarehouseService.selectByName(invWarehouseEntity.getName());
if (invWarehouseEntity1 != null) {
return ResultVOUtils.error(500, "已存在相同名称的仓库,无法继续添加!");
List<InvWarehouseEntity> invWarehouseEntityList = invWarehouseService.selectByNameList(invWarehouseEntity.getName());
if (invWarehouseEntityList!=null && invWarehouseEntityList.size()>0) {
for (InvWarehouseEntity obj:invWarehouseEntityList){
if(obj.getName().equals(invWarehouseEntity.getName()) && !obj.getId().equals(invWarehouseEntity.getId())){
return ResultVOUtils.error(500, "已存在相同名称的仓库,无法继续添加!");
}
}
}
if (invWarehouseEntity.getPid() == null || invWarehouseEntity.getPid() == 0) {//仓库
invWarehouseEntity.setPid(0); // 默认设置
FilterInvWarehouseRequest filterInvWarehouseRequest = new FilterInvWarehouseRequest();
@ -277,6 +282,15 @@ public class InvWarehouseController {
if (invWarehouseEntity.getId() == null) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
}
List<InvWarehouseEntity> invWarehouseEntityList = invWarehouseService.selectByNameList(invWarehouseEntity.getName());
if (invWarehouseEntityList!=null && invWarehouseEntityList.size()>0) {
for (InvWarehouseEntity obj:invWarehouseEntityList){
if(obj.getName().equals(invWarehouseEntity.getName()) && !obj.getId().equals(invWarehouseEntity.getId())){
return ResultVOUtils.error(500, "已存在相同名称的仓库,无法继续添加!");
}
}
}
invWarehouseEntity.setPid(null); // 不能修改父级 pid
invWarehouseEntity.setUpdateTime(new Date());
boolean b = invWarehouseService.updateInvWarehouse(invWarehouseEntity);

@ -36,7 +36,7 @@ public class SupCertSetController {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
filterCertSetsRequest.setNeed(0);
List<SupCertSetEntity> supCertEntityList
= supCertSetService.filterCertSets(filterCertSetsRequest);
PageInfo<SupCertSetEntity> pageInfo;

@ -33,6 +33,8 @@ public interface InvWarehouseService {
boolean deleteById(String id);
List<InvWarehouseEntity> selectByNameList(String name);
/**
*
*

@ -122,6 +122,15 @@ public class InvWarehouseServiceImpl implements InvWarehouseService {
return invWarehouseEntities.get(0);
return null;
}
@Override
public List<InvWarehouseEntity> selectByNameList(String name) {
FilterInvWarehouseRequest filterInvWarehouseRequest = new FilterInvWarehouseRequest();
filterInvWarehouseRequest.setName(name);
List<InvWarehouseEntity> invWarehouseEntities = invWarehouseDao.filterInvWarehouse(filterInvWarehouseRequest);
if (invWarehouseEntities != null && invWarehouseEntities.size() > 0)
return invWarehouseEntities;
return null;
}
@Override
public boolean deleteById(String id) {

@ -128,24 +128,39 @@
<select id="filterJoinByUser" parameterType="com.glxp.api.admin.req.basic.BussinessLocalTypeFilterRequest"
resultType="com.glxp.api.admin.entity.basic.BussinessLocalTypeEntity">
SELECT basic_bustype_local.id,basic_bustype_local.name localName, basic_bustype_local.action
localAction,originAction,
basic_bussiness_type.name ,
basic_bussiness_type.action,basic_bussiness_type.checkEnable,basic_bustype_local.advanceType,basic_bustype_local.changeEnable,
basic_bustype_local.spUse,basic_bussiness_type.storageCode,basic_bussiness_type.corpType,basic_bussiness_type.mainAction,
basic_bussiness_type.defaultUnit,basic_bussiness_type.genUnit,basic_bustype_origin.action
thirdAction,basic_bustype_origin.thirdSys,basic_bussiness_type.prefix,basic_bustype_local.prefix
localPrefix,preIn,
basic_bussiness_type.ullageFill, basic_bussiness_type.scanPreIn, basic_bussiness_type.vailInv,
basic_bussiness_type.codeFillCheck,supplementAll
FROM basic_bustype_local
inner join basic_bussiness_type on basic_bustype_local.action = basic_bussiness_type.localAction
INNER JOIN inv_warehouse_bussiness_type on basic_bussiness_type.action = inv_warehouse_bussiness_type.action
INNER JOIN inv_warehouse_sub on inv_warehouse_sub.`code` = inv_warehouse_bussiness_type.code
INNER JOIN inv_warehouse on inv_warehouse_sub.parentId = inv_warehouse.`code`
INNER JOIN inv_warehouse_user on inv_warehouse_sub.`code` =inv_warehouse_user.`code`
left join basic_bustype_origin on basic_bustype_local.originAction = basic_bustype_origin.action
INNER JOIN inv_bustype_user on inv_warehouse_bussiness_type.action = inv_bustype_user.scAction
SELECT
basic_bustype_local.id,
basic_bustype_local.NAME localName,
basic_bustype_local.action localAction,
originAction,
basic_bussiness_type.NAME,
basic_bussiness_type.action,
basic_bussiness_type.checkEnable,
basic_bustype_local.advanceType,
basic_bustype_local.changeEnable,
basic_bustype_local.spUse,
basic_bussiness_type.storageCode,
basic_bussiness_type.corpType,
basic_bussiness_type.mainAction,
basic_bussiness_type.defaultUnit,
basic_bussiness_type.genUnit,
basic_bussiness_type.prefix,
basic_bustype_local.prefix,
basic_bussiness_type.ullageFill,
basic_bussiness_type.scanPreIn,
basic_bussiness_type.vailInv,
basic_bussiness_type.codeFillCheck,
basic_bussiness_type.prefix,
basic_bustype_local.prefix localPrefix,
basic_bussiness_type.ullageFill,
basic_bussiness_type.scanPreIn,
basic_bussiness_type.vailInv,
basic_bussiness_type.codeFillCheck,
supplementAll
FROM
basic_bustype_local
INNER JOIN basic_bussiness_type ON basic_bustype_local.action = basic_bussiness_type.localAction
INNER JOIN inv_bustype_user ON basic_bussiness_type.action = inv_bustype_user.scAction
<where>
<if test="name != ''and name != null">
AND basic_bustype_local.name LIKE concat('%',#{name},'%')
@ -159,11 +174,9 @@
<if test="spUse != ''and spUse != null">
AND basic_bustype_local.spUse =#{spUse}
</if>
<if test="code != ''and code != null">
AND inv_warehouse_user.`code` = #{code}
</if>
<if test="invWarehouseCode != ''and invWarehouseCode != null">
AND inv_warehouse_sub.`code` = #{invWarehouseCode}
AND subInvCode = #{code}
</if>
<if test="userId != ''and userId != null">
AND inv_bustype_user.`userId` = #{userId}

@ -127,11 +127,11 @@
<if test="billdate != '' and billdate!=null">
and billdate = #{billdate}
</if>
<if test="startDate != '' and startDate != null">
and billdate >= #{startDate}
<if test="startDate!=null and startDate!=''">
<![CDATA[ and DATE_FORMAT(billdate, '%Y-%m-%d')>= DATE_FORMAT(#{startDate}, '%Y-%m-%d') ]]>
</if>
<if test="endDate != '' and endDate != null">
and billdate <![CDATA[ <= ]]> #{endDate}
<if test="endDate!=null and endDate!=''">
<![CDATA[ and DATE_FORMAT(billdate, '%Y-%m-%d') <= DATE_FORMAT(#{endDate}, '%Y-%m-%d') ]]>
</if>
<if test="corpId != '' and corpId!=null">
and corpId = #{corpId}

Loading…
Cancel
Save