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

@ -2,6 +2,7 @@ package com.glxp.api.dao.basic;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.api.entity.basic.BasicProductCategory;
import com.glxp.api.req.basic.BasicProductTypeRequest;
import com.glxp.api.res.basic.BasicProductCategoryTypeResponse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -10,7 +11,9 @@ import java.util.List;
@Mapper
public interface BasicProductCategoryMapper extends BaseMapper<BasicProductCategory> {
List<BasicProductCategoryTypeResponse> getTreeList();
List<BasicProductCategoryTypeResponse> getTreeList(BasicProductTypeRequest basicProductTypeRequest);
List<BasicProductCategory> selectLowTypeAll(@Param("code") String code);
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.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import lombok.Data;
/**
@ -63,4 +65,16 @@ public class BasicProductCategory {
*/
@TableField(value = "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 name;
private String remark;
private String deptCode;
private String invCode;
List<String> ids;
}

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

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

@ -22,27 +22,30 @@
<select id="getTreeList" resultType="com.glxp.api.res.basic.BasicProductCategoryTypeResponse">
SELECT id, code, name as label, parentCode, remark
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
</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 (
SELECT
*
FROM
basic_product_category ta
WHERE
code = #{code}
SELECT *
FROM basic_product_category ta
WHERE code = #{code}
UNION ALL
SELECT
tb.*
FROM
basic_product_category tb
SELECT tb.*
FROM basic_product_category tb
INNER JOIN table_a ON table_a.CODE = tb.parentCode
) SELECT
*
FROM
table_a
)
SELECT *
FROM table_a
</select>
<select id="selectProductByRelCode" resultType="Long">
@ -50,5 +53,4 @@
from basic_udirel
where basic_udirel.relCode = #{relCode}
</select>
</mapper>

@ -73,4 +73,12 @@ CREATE TABLE IF NOT EXISTS `sys_app_version`
COLLATE = utf8mb4_0900_ai_ci
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