Commit e548d1fc authored by 曹盼盼's avatar 曹盼盼

管材和设备库

parent 3b1c186b
...@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.module.ugp.api.entity.Equipment; ...@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.module.ugp.api.entity.Equipment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.openxmlformats.schemas.drawingml.x2006.main.STAdjAngle;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -28,4 +29,7 @@ public interface EquipmentMapper extends BaseMapper<Equipment> { ...@@ -28,4 +29,7 @@ public interface EquipmentMapper extends BaseMapper<Equipment> {
List<Map<String, Object>> boundWelderList(@Param("projectId") String projectId, @Param("companyId") Long companyId, @Param("name") String name); List<Map<String, Object>> boundWelderList(@Param("projectId") String projectId, @Param("companyId") Long companyId, @Param("name") String name);
Page<Map<String,Object>> getEqChangeList(IPage<Map<String, Object>> page,@Param("projectId") String projectId);
} }
package com.yeejoin.amos.boot.module.ugp.api.mapper; package com.yeejoin.amos.boot.module.ugp.api.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.ugp.api.dto.MaterialCount; import com.yeejoin.amos.boot.module.ugp.api.dto.MaterialCount;
import com.yeejoin.amos.boot.module.ugp.api.entity.Material; import com.yeejoin.amos.boot.module.ugp.api.entity.Material;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...@@ -27,4 +29,7 @@ public interface MaterialMapper extends BaseMapper<Material> { ...@@ -27,4 +29,7 @@ public interface MaterialMapper extends BaseMapper<Material> {
List<MaterialCount> getMaterialCount();// List<MaterialCount> getMaterialCount();//
List<MaterialCount> getConditionCount( @Param("listIdList") List<Long> listIdList); List<MaterialCount> getConditionCount( @Param("listIdList") List<Long> listIdList);
Page<Map<String,Object>> getMterChangeList(IPage<Map<String, Object>> page, @Param("projectId") String projectId);
} }
...@@ -74,5 +74,20 @@ ...@@ -74,5 +74,20 @@
</where> </where>
</select> </select>
<select id="getEqChangeList" resultType="java.util.Map">
SELECT
te.*,
tm.info
FROM
tz_ugp_equipment te
LEFT JOIN tz_ugp_attachment tm ON te.sequence_nbr = tm.source_id
AND tm."type" = 'enuipment'
WHERE
te.company_id = ( SELECT tt.installation_unit_id FROM tz_ugp_project tt WHERE tt.sequence_nbr = #{projectId} )
AND te.sequence_nbr NOT IN ( SELECT re.resource_id FROM tz_ugp_project_resource re)
</select>
</mapper> </mapper>
...@@ -35,4 +35,23 @@ ...@@ -35,4 +35,23 @@
GROUP BY GROUP BY
manufacture_addr manufacture_addr
</select> </select>
<select id="getMterChangeList" resultType="java.util.Map">
SELECT
te.*,
tm.info
FROM
tz_ugp_material te
LEFT JOIN tz_ugp_attachment tm ON te.sequence_nbr = tm.source_id
AND tm."type" = 'material'
WHERE
te.company_id = ( SELECT tt.installation_unit_id FROM tz_ugp_project tt WHERE tt.sequence_nbr = #{projectId} )
AND te.sequence_nbr NOT IN ( SELECT re.resource_id FROM tz_ugp_project_resource re WHERE re.type='material')
</select>
</mapper> </mapper>
...@@ -311,4 +311,21 @@ public class EquipmentController extends BaseController { ...@@ -311,4 +311,21 @@ public class EquipmentController extends BaseController {
@RequestParam(value = "name", required = false) String name) { @RequestParam(value = "name", required = false) String name) {
return ResponseHelper.buildResponse(equipmentServiceImpl.boundWelder(projectId, current, size, name, "all")); return ResponseHelper.buildResponse(equipmentServiceImpl.boundWelder(projectId, current, size, name, "all"));
} }
/**
* 查询设备库
* */
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/getEqChangeList")
@ApiOperation(httpMethod = "GET", value = "查询设备库", notes = "查询设备库")
public ResponseModel<Object> getEqChangeList(@RequestParam(value = "projectId") String projectId,
@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size
) {
return ResponseHelper.buildResponse(equipmentServiceImpl.getEqChangeList(projectId,current,size));
}
} }
...@@ -312,4 +312,17 @@ public class MaterialController extends BaseController { ...@@ -312,4 +312,17 @@ public class MaterialController extends BaseController {
jsonObject.put("subForm", designSubForm); jsonObject.put("subForm", designSubForm);
return ResponseHelper.buildResponse(jsonObject); return ResponseHelper.buildResponse(jsonObject);
} }
/**
* 查询管材库
* */
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/getMterChangeList")
@ApiOperation(httpMethod = "GET", value = "查询管材库", notes = "查询管材库")
public ResponseModel<Object> getMterChangeList(@RequestParam(value = "projectId") String projectId,
@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size
) {
return ResponseHelper.buildResponse(materialServiceImpl.getMterChangeList(projectId,current,size));
}
} }
...@@ -316,4 +316,10 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E ...@@ -316,4 +316,10 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
return listPage; return listPage;
} }
} }
public Page<Map<String, Object>> getEqChangeList(String projectId, Integer current, Integer size) {
Page<Map<String, Object>> eqChangeList = equipmentMapper.getEqChangeList(new Page<Map<String, Object>>(current, size), projectId);
return eqChangeList;
}
} }
\ No newline at end of file
...@@ -412,4 +412,8 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate ...@@ -412,4 +412,8 @@ public class MaterialServiceImpl extends BaseService<MaterialDto, Material, Mate
} }
public Page<Map<String, Object>> getMterChangeList(String projectId, int current, int size) {
Page<Map<String, Object>> mterChangeList = materialMapper.getMterChangeList(new Page<Map<String, Object>>(current, size), projectId);
return mterChangeList;
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment