Merge remote-tracking branch 'origin/dev_price' into dev_price

test
wj 2 years ago
commit fc4cbf3cf3

@ -131,7 +131,7 @@ public class BasicProductCategoryController {
} }
@GetMapping("/udiwms/basic/product/category/delect") @GetMapping("/udiwms/basic/product/category/delect")
@Log(title = "单据管理", businessType = BusinessType.DELETE) @Log(title = "物资分类删除", businessType = BusinessType.DELETE)
public BaseResponse delect(BasicProductTypeRequest basicProductTypeRequest, BindingResult bindingResult) { public BaseResponse delect(BasicProductTypeRequest basicProductTypeRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) { if (bindingResult.hasErrors()) {
@ -157,8 +157,8 @@ public class BasicProductCategoryController {
} }
@GetMapping("/udiwms/basic/product/category/getTree") @GetMapping("/udiwms/basic/product/category/getTree")
public BaseResponse getTree() { public BaseResponse getTree(BasicProductTypeRequest basicProductTypeRequest) {
List<BasicProductCategoryTypeResponse> treeList = basicProductCategoryService.getTreeList(); List<BasicProductCategoryTypeResponse> treeList = basicProductCategoryService.getTreeList(basicProductTypeRequest);
return ResultVOUtils.success(treeList); return ResultVOUtils.success(treeList);
} }

@ -2,6 +2,7 @@ package com.glxp.api.dao.basic;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.api.entity.basic.BasicProductCategory; import com.glxp.api.entity.basic.BasicProductCategory;
import com.glxp.api.req.basic.BasicProductTypeRequest;
import com.glxp.api.res.basic.BasicProductCategoryTypeResponse; import com.glxp.api.res.basic.BasicProductCategoryTypeResponse;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -10,7 +11,9 @@ import java.util.List;
@Mapper @Mapper
public interface BasicProductCategoryMapper extends BaseMapper<BasicProductCategory> { public interface BasicProductCategoryMapper extends BaseMapper<BasicProductCategory> {
List<BasicProductCategoryTypeResponse> getTreeList();
List<BasicProductCategoryTypeResponse> getTreeList(BasicProductTypeRequest basicProductTypeRequest);
List<BasicProductCategory> selectLowTypeAll(@Param("code") String code); List<BasicProductCategory> selectLowTypeAll(@Param("code") String code);
Long selectProductByRelCode(@Param("relCode") String relCode); Long selectProductByRelCode(@Param("relCode") String relCode);

@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date; import java.util.Date;
import lombok.Data; import lombok.Data;
/** /**
@ -63,4 +65,16 @@ public class BasicProductCategory {
*/ */
@TableField(value = "updateUser") @TableField(value = "updateUser")
private String updateUser; private String updateUser;
/**
*
*/
@TableField(value = "deptCode")
private String deptCode;
/**
*
*/
@TableField(value = "invCode")
private String invCode;
} }

@ -12,5 +12,8 @@ public class BasicProductTypeRequest {
private String parentCode; private String parentCode;
private String name; private String name;
private String remark; private String remark;
private String deptCode;
private String invCode;
List<String> ids; List<String> ids;
} }

@ -36,11 +36,9 @@ public class BasicProductCategoryServiceImpl implements BasicProductCategoryServ
BasicProductCategoryRelMapper basicProductCategoryRelMapper; BasicProductCategoryRelMapper basicProductCategoryRelMapper;
@Override @Override
public List<BasicProductCategoryTypeResponse> getTreeList() { public List<BasicProductCategoryTypeResponse> getTreeList(BasicProductTypeRequest basicProductTypeRequest) {
return basicProductCategoryMapper.getTreeList(basicProductTypeRequest);
return basicProductCategoryMapper.getTreeList();
} }
@Override @Override

@ -11,7 +11,7 @@ import java.util.List;
public interface BasicProductCategoryService { public interface BasicProductCategoryService {
List<BasicProductCategoryTypeResponse> getTreeList(); List<BasicProductCategoryTypeResponse> getTreeList(BasicProductTypeRequest basicProductTypeRequest);
BasicProductCategory selectBasicHospTypeEntity(); BasicProductCategory selectBasicHospTypeEntity();
@ -39,6 +39,5 @@ public interface BasicProductCategoryService {
boolean checkrel(String code); boolean checkrel(String code);
} }

@ -22,27 +22,30 @@
<select id="getTreeList" resultType="com.glxp.api.res.basic.BasicProductCategoryTypeResponse"> <select id="getTreeList" resultType="com.glxp.api.res.basic.BasicProductCategoryTypeResponse">
SELECT id, code, name as label, parentCode, remark SELECT id, code, name as label, parentCode, remark
FROM basic_product_category FROM basic_product_category
<where>
<if test="deptCode != '' and deptCode != null">
and deptCode = #{deptCode}
</if>
<if test="invCode != '' and invCode != null">
and invCode = #{invCode}
</if>
</where>
ORDER BY id DESC ORDER BY id DESC
</select> </select>
<select id="selectLowTypeAll" parameterType="java.lang.String" resultType="com.glxp.api.entity.basic.BasicProductCategory"> <select id="selectLowTypeAll" parameterType="java.lang.String"
resultType="com.glxp.api.entity.basic.BasicProductCategory">
WITH recursive table_a AS ( WITH recursive table_a AS (
SELECT SELECT *
* FROM basic_product_category ta
FROM WHERE code = #{code}
basic_product_category ta
WHERE
code = #{code}
UNION ALL UNION ALL
SELECT SELECT tb.*
tb.* FROM basic_product_category tb
FROM
basic_product_category tb
INNER JOIN table_a ON table_a.CODE = tb.parentCode INNER JOIN table_a ON table_a.CODE = tb.parentCode
) SELECT )
* SELECT *
FROM FROM table_a
table_a
</select> </select>
<select id="selectProductByRelCode" resultType="Long"> <select id="selectProductByRelCode" resultType="Long">
@ -50,5 +53,4 @@
from basic_udirel from basic_udirel
where basic_udirel.relCode = #{relCode} where basic_udirel.relCode = #{relCode}
</select> </select>
</mapper> </mapper>

@ -73,4 +73,12 @@ CREATE TABLE IF NOT EXISTS `sys_app_version`
COLLATE = utf8mb4_0900_ai_ci COLLATE = utf8mb4_0900_ai_ci
ROW_FORMAT = DYNAMIC; ROW_FORMAT = DYNAMIC;
INSERT ignore INTO `sys_app_version`(`id`, `type`, `versionName`, `versionCode`, `appName`, `createTime`, `downloadUrl`, `updateLog`) VALUES (1, 'udi_wms_new', '3.0.6', 306, 'UDI扫码终端', '2023-10-30 18:42:24', 'http://192.168.1.11:9150/udiwms_new.apk', '1.单据审核移除UDI码异常提示2优化多项功能'); INSERT ignore INTO `sys_app_version`(`id`, `type`, `versionName`, `versionCode`, `appName`, `createTime`, `downloadUrl`,
`updateLog`)
VALUES (1, 'udi_wms_new', '3.0.6', 306, 'UDI扫码终端', '2023-10-30 18:42:24', 'http://192.168.1.11:9150/udiwms_new.apk',
'1.单据审核移除UDI码异常提示2优化多项功能');
CALL Pro_Temp_ColumnWork('basic_product_category', 'deptCode', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('basic_product_category', 'invCode', 'varchar(255)', 1);

Loading…
Cancel
Save