| | |
| | | @ApiOperation(value="tms_tool_sharpening-添加", notes="tms_tool_sharpening-添加") |
| | | @PostMapping(value = "/add") |
| | | public Result<String> add(@RequestBody ToolSharpening toolSharpening) { |
| | | toolSharpening.setSharpeningStatus("1"); |
| | | toolSharpeningService.save(toolSharpening); |
| | | return Result.OK("添加成功!"); |
| | | } |
| | |
| | | import java.util.Date; |
| | | |
| | | 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 com.fasterxml.jackson.annotation.JsonFormat; |
| | |
| | | private String toolMaterial; |
| | | |
| | | @TableField(exist = false) |
| | | private String partMaterial; |
| | | |
| | | @TableField(exist = false) |
| | | private String toolModel; |
| | | /** |
| | | * 库位号 |
| | |
| | | |
| | | <select id="pageWithLedgerAndConfig" resultType="org.jeecg.modules.tms.entity.vo.StocktakingPoundVo"> |
| | | SELECT |
| | | DISTINCT |
| | | t.id, |
| | | t.classify_id AS classifyId, |
| | | t.tool_id AS toolId, |
| | | t1.classify_id AS classifyId, |
| | | t.tool_code AS toolCode, |
| | | t.foreign_language_name AS foreignLanguageName, |
| | | t.standard_level AS standardLevel, |
| | | t.standard_code AS standardCode, |
| | | t.tool_model AS toolModel, |
| | | t.parama_table_name AS paramaTableName, |
| | | t.tool_id AS toolId, |
| | | t2.tool_model AS toolModel, |
| | | t2.parama_table_name AS paramaTableName, |
| | | t1.total_count AS totalCount, |
| | | t1.available_count AS availableCount, |
| | | t3.position_code AS positionCode, |
| | | t3.application_type AS applicationType, |
| | | t3.chinese_name AS chineseName, |
| | | t2.chinese_name AS chineseName, |
| | | t3.supplier_id AS supplierId, |
| | | t3.storage_location AS storageLocation, |
| | | t3.main_unit AS mainUnit, |
| | |
| | | c.part_material AS partMaterial |
| | | </otherwise> |
| | | </choose> |
| | | |
| | | FROM tms_base_tools t |
| | | LEFT JOIN tms_tool_ledger t1 ON t1.tool_id = t.id |
| | | LEFT JOIN tms_tools_config_property t3 ON t3.tool_code = t.id |
| | | FROM tms_tool_ledger_detail t |
| | | left join tms_tool_ledger t1 ON t1.tool_id= t.tool_Code |
| | | left join tms_tools_classify t4 on t4.id = t1.classify_id |
| | | left join tms_base_tools t2 on t2.id = t.tool_code |
| | | left join tms_tools_config_property t3 on t3.tool_code = t.tool_code |
| | | |
| | | |
| | | <!-- 动态表关联,确保所有情况都有对应的 LEFT JOIN --> |
| | |
| | | </choose> |
| | | |
| | | <where> |
| | | <if test="ew.paramNameValuePairs.toolCode != null and ew.paramNameValuePairs.toolCode != ''"> |
| | | AND t.tool_code LIKE CONCAT('%', #{ew.paramNameValuePairs.toolCode}, '%') |
| | | <if test="ew.paramNameValuePairs.toolId != null and ew.paramNameValuePairs.toolId != ''"> |
| | | AND t.tool_id LIKE CONCAT('%', #{ew.paramNameValuePairs.toolId}, '%') |
| | | </if> |
| | | </where> |
| | | |
| | |
| | | |
| | | <select id="pageWithSharpedAndConfig" resultType="org.jeecg.modules.tms.entity.vo.SharpeeningVo"> |
| | | SELECT |
| | | DISTINCT |
| | | t.id, |
| | | t.create_time AS createTime, |
| | | t.classify_id AS classifyId, |
| | | t.tool_code AS toolCode, |
| | | t.foreign_language_name AS foreignLanguageName, |
| | | t.standard_level AS standardLevel, |
| | | t.standard_code AS standardCode, |
| | | t.tool_model AS toolModel, |
| | | t.parama_table_name AS paramaTableName, |
| | | t2.tool_model AS toolModel, |
| | | t2.parama_table_name AS paramaTableName, |
| | | t.tool_id AS toolId, |
| | | t1.total_count AS totalCount, |
| | | t1.available_count AS availableCount, |
| | | t3.position_code AS positionCode, |
| | | t3.application_type AS applicationType, |
| | | t3.chinese_name AS chineseName, |
| | |
| | | t3.storage_location AS storageLocation, |
| | | t3.main_unit AS mainUnit, |
| | | t3.warehouse_id AS warehouseId, |
| | | t4.classify_id AS classifyId, |
| | | t3.province_city AS provinceCity |
| | | |
| | | FROM tms_base_tools t |
| | | LEFT JOIN tms_tool_ledger t1 ON t1.tool_id = t.id |
| | | LEFT JOIN tms_tools_config_property t3 ON t3.tool_code = t.id |
| | | FROM tms_tool_ledger_detail t |
| | | left join tms_tool_ledger t1 ON t1.tool_id= t.tool_Code |
| | | left join tms_tools_classify t4 on t4.id = t1.classify_id |
| | | left join tms_base_tools t2 on t2.id = t.tool_code |
| | | left join tms_tools_config_property t3 on t3.tool_code = t.tool_code |
| | | -- FROM tms_base_tools t |
| | | -- LEFT JOIN tms_tool_ledger t1 ON t1.tool_id = t.id |
| | | -- LEFT JOIN tms_tools_config_property t3 ON t3.tool_code = t.id |
| | | |
| | | |
| | | <where> |
| | | <if test="ew.paramNameValuePairs.toolCode != null and ew.paramNameValuePairs.toolCode != ''"> |
| | | AND t.tool_code LIKE CONCAT('%', #{ew.paramNameValuePairs.toolCode}, '%') |
| | | <if test="ew.paramNameValuePairs.toolId != null and ew.paramNameValuePairs.toolId != ''"> |
| | | AND t.tool_id LIKE CONCAT('%', #{ew.paramNameValuePairs.toolId}, '%') |
| | | </if> |
| | | </where> |
| | | |
| | |
| | | </select> |
| | | <select id="queryPageList" resultType="org.jeecg.modules.tms.entity.ToolsLossBoundDetail"> |
| | | SELECT |
| | | t1.*, |
| | | t2.chinese_name chineseName, |
| | | t2.tool_model toolModel, |
| | | t2.classify_id classifyId, |
| | | t2.parama_table_name paramaTableName, |
| | | t3.application_type applicationType, |
| | | t3.supplier_id supplierId, |
| | | t.*, |
| | | t1.classify_id AS classifyId, |
| | | t2.tool_model AS toolModel, |
| | | t2.parama_table_name AS paramaTableName, |
| | | t3.position_code AS positionCode, |
| | | t3.application_type AS applicationType, |
| | | t2.chinese_name AS chineseName, |
| | | t3.supplier_id AS supplierId, |
| | | t3.storage_location AS storageLocation, |
| | | <choose> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '1'"> |
| | | t4.tool_material toolMaterial, |
| | | t4.part_material partMaterial |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '2'"> |
| | | t5.tool_material toolMaterial, |
| | | t5.part_material partMaterial |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '3'"> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '2'"> |
| | | t6.tool_material toolMaterial, |
| | | t6.part_material partMaterial |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '4'"> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '3'"> |
| | | t7.tool_material toolMaterial, |
| | | t7.part_material partMaterial |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '5'"> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '4'"> |
| | | t8.tool_material toolMaterial, |
| | | t8.part_material partMaterial |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '6'"> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '5'"> |
| | | t9.tool_material toolMaterial, |
| | | t9.part_material partMaterial |
| | | </when> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '6'"> |
| | | t10.tool_material toolMaterial, |
| | | t10.part_material partMaterial |
| | | </when> |
| | | <otherwise> |
| | | t10.tool_material toolMaterial, |
| | | t10.part_material partMaterial |
| | | </otherwise> |
| | | </choose> |
| | | FROM tms_loss_bound_detail t1 |
| | | LEFT JOIN tms_base_tools t2 on t1.tool_id = t2.id |
| | | LEFT JOIN tms_tools_config_property t3 on t3.tool_code = t2.id |
| | | FROM tms_loss_bound_detail t |
| | | left join tms_tool_ledger t1 ON t1.tool_id= t.tool_Code |
| | | left join tms_tools_classify t4 on t4.id = t1.classify_id |
| | | left join tms_base_tools t2 on t2.id = t.tool_code |
| | | left join tms_tools_config_property t3 on t3.tool_code = t.tool_code |
| | | |
| | | |
| | | -- LEFT JOIN tms_base_tools t2 on t1.tool_id = t2.id |
| | | -- LEFT JOIN tms_tools_config_property t3 on t3.tool_code = t2.id |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <choose> |
| | | <when test="ew.paramNameValuePairs.paramaTableName == '1'"> |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.jeecg.modules.tms.mapper.ToolsSharpeningMapper"> |
| | | <select id="queryPageList" resultType="org.jeecg.modules.tms.entity.vo.ToolSharpeningVo"> |
| | | SELECT |
| | | t.*, |
| | | t1.classify_id AS classifyId, |
| | | t1.parama_table_name AS paramaTableName, |
| | | t2.type_name AS typeName, |
| | | t3.application_type AS applicationType, |
| | | t3.tool_model AS toolModel, |
| | | t3.province_city AS provinceCity, |
| | | t3.chinese_name AS chineseName, |
| | | t3.supplier_id AS supplierId, |
| | | t3.storage_location AS storageLocation, |
| | | t3.main_unit AS mainUnit, |
| | | t4.position_code AS positionCode, |
| | | t4.warehouse_id AS warehouseId |
| | | |
| | | |
| | | SELECT t.*, |
| | | t2.tool_model AS toolModel, |
| | | t2.parama_table_name AS paramaTableName, |
| | | t.tool_id AS toolId, |
| | | t3.position_code AS positionCode, |
| | | t3.application_type AS applicationType, |
| | | t3.chinese_name AS chineseName, |
| | | t3.supplier_id AS supplierId, |
| | | t3.storage_location AS storageLocation, |
| | | t3.main_unit AS mainUnit, |
| | | t3.warehouse_id AS warehouseId, |
| | | t4.classify_id AS classifyId, |
| | | t3.province_city AS provinceCity |
| | | FROM tms_tool_sharpening t |
| | | LEFT JOIN tms_base_tools t1 ON t1.id = t.tool_code |
| | | LEFT JOIN tms_tools_classify t2 ON t1.classify_id = t2.id |
| | | LEFT JOIN tms_tools_config_property t3 ON t3.tool_code = t.tool_id |
| | | LEFT JOIN tms_tool_ledger_detail t4 ON t4.tool_code = t.tool_id |
| | | ${ew.customSqlSegment} |
| | | |
| | | left join tms_tool_ledger t1 ON t1.tool_id = t.tool_Code |
| | | left join tms_tool_ledger_detail t5 ON t5.tool_id = t.tool_Code |
| | | left join tms_tools_classify t4 on t4.id = t1.classify_id |
| | | left join tms_base_tools t2 on t2.id = t.tool_code |
| | | left join tms_tools_config_property t3 on t3.tool_code = t.tool_code |
| | | ${ew.customSqlSegment} |
| | | </select> |
| | | |
| | | <select id="toolSharpeningList" resultType="map" parameterType="String"> |
| | |
| | | QueryWrapper<ToolsLossBoundDetail> queryWrapper = Wrappers.query(); |
| | | String[] outStorehouseIds = parameterMap.get("lossBoundId"); |
| | | if (outStorehouseIds != null && outStorehouseIds.length > 0) { |
| | | queryWrapper.eq("t1.loss_bound_id", outStorehouseIds[0]); |
| | | queryWrapper.eq("t.loss_bound_id", outStorehouseIds[0]); |
| | | } |
| | | return this.baseMapper.queryPageList(page, queryWrapper); |
| | | } |